]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
cygwin.asm: Include auto-host.h.
[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
55c4f715 906enable_comdat
5213506e
RW
907enable_gnu_unique_object
908enable_linker_build_id
909with_long_double_128
910with_gc
911with_system_zlib
912enable_maintainer_mode
913enable_version_specific_runtime_libs
914with_slibdir
5213506e
RW
915enable_plugin
916'
917 ac_precious_vars='build_alias
918host_alias
919target_alias
920CC
921CFLAGS
922LDFLAGS
923LIBS
924CPPFLAGS
925CXX
926CXXFLAGS
927CCC
928CPP
929CXXCPP
930GMPLIBS
931GMPINC
932PPLLIBS
933PPLINC
934CLOOGLIBS
d7f09764
DN
935CLOOGINC
936LIBELFLIBS
937LIBELFINC'
5213506e 938
861bb6c1
JL
939
940# Initialize some variables set by options.
ba479fd2
NN
941ac_init_help=
942ac_init_version=false
5213506e
RW
943ac_unrecognized_opts=
944ac_unrecognized_sep=
861bb6c1
JL
945# The variables have the same names as the options, with
946# dashes changed to underlines.
ba479fd2 947cache_file=/dev/null
861bb6c1 948exec_prefix=NONE
861bb6c1 949no_create=
861bb6c1
JL
950no_recursion=
951prefix=NONE
952program_prefix=NONE
953program_suffix=NONE
954program_transform_name=s,x,x,
955silent=
956site=
957srcdir=
861bb6c1
JL
958verbose=
959x_includes=NONE
960x_libraries=NONE
ba479fd2
NN
961
962# Installation directory options.
963# These are left unexpanded so users can "make install exec_prefix=/foo"
964# and all the variables that are supposed to be based on exec_prefix
965# by default will actually change.
966# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 967# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
968bindir='${exec_prefix}/bin'
969sbindir='${exec_prefix}/sbin'
970libexecdir='${exec_prefix}/libexec'
5213506e
RW
971datarootdir='${prefix}/share'
972datadir='${datarootdir}'
861bb6c1
JL
973sysconfdir='${prefix}/etc'
974sharedstatedir='${prefix}/com'
975localstatedir='${prefix}/var'
861bb6c1
JL
976includedir='${prefix}/include'
977oldincludedir='/usr/include'
5213506e
RW
978docdir='${datarootdir}/doc/${PACKAGE}'
979infodir='${datarootdir}/info'
980htmldir='${docdir}'
981dvidir='${docdir}'
982pdfdir='${docdir}'
983psdir='${docdir}'
984libdir='${exec_prefix}/lib'
985localedir='${datarootdir}/locale'
986mandir='${datarootdir}/man'
861bb6c1 987
861bb6c1 988ac_prev=
5213506e 989ac_dashdash=
861bb6c1
JL
990for ac_option
991do
861bb6c1
JL
992 # If the previous option needs an argument, assign it.
993 if test -n "$ac_prev"; then
5213506e 994 eval $ac_prev=\$ac_option
861bb6c1
JL
995 ac_prev=
996 continue
997 fi
998
5213506e
RW
999 case $ac_option in
1000 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1001 *) ac_optarg=yes ;;
1002 esac
861bb6c1
JL
1003
1004 # Accept the important Cygnus configure options, so we can diagnose typos.
1005
5213506e
RW
1006 case $ac_dashdash$ac_option in
1007 --)
1008 ac_dashdash=yes ;;
861bb6c1
JL
1009
1010 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1011 ac_prev=bindir ;;
1012 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 1013 bindir=$ac_optarg ;;
861bb6c1
JL
1014
1015 -build | --build | --buil | --bui | --bu)
ba479fd2 1016 ac_prev=build_alias ;;
861bb6c1 1017 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 1018 build_alias=$ac_optarg ;;
861bb6c1
JL
1019
1020 -cache-file | --cache-file | --cache-fil | --cache-fi \
1021 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1022 ac_prev=cache_file ;;
1023 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1024 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
1025 cache_file=$ac_optarg ;;
1026
1027 --config-cache | -C)
1028 cache_file=config.cache ;;
861bb6c1 1029
5213506e 1030 -datadir | --datadir | --datadi | --datad)
861bb6c1 1031 ac_prev=datadir ;;
5213506e 1032 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 1033 datadir=$ac_optarg ;;
861bb6c1 1034
5213506e
RW
1035 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1036 | --dataroo | --dataro | --datar)
1037 ac_prev=datarootdir ;;
1038 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1039 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1040 datarootdir=$ac_optarg ;;
1041
861bb6c1 1042 -disable-* | --disable-*)
5213506e 1043 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 1044 # Reject names that are not valid shell variable names.
5213506e
RW
1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046 as_fn_error "invalid feature name: $ac_useropt"
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1050 *"
1051"enable_$ac_useropt"
1052"*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=no ;;
1057
1058 -docdir | --docdir | --docdi | --doc | --do)
1059 ac_prev=docdir ;;
1060 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1061 docdir=$ac_optarg ;;
1062
1063 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1064 ac_prev=dvidir ;;
1065 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1066 dvidir=$ac_optarg ;;
861bb6c1
JL
1067
1068 -enable-* | --enable-*)
5213506e 1069 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 1070 # Reject names that are not valid shell variable names.
5213506e
RW
1071 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1072 as_fn_error "invalid feature name: $ac_useropt"
1073 ac_useropt_orig=$ac_useropt
1074 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1075 case $ac_user_opts in
1076 *"
1077"enable_$ac_useropt"
1078"*) ;;
1079 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1080 ac_unrecognized_sep=', ';;
b61ff9c8 1081 esac
5213506e 1082 eval enable_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1083
1084 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1085 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1086 | --exec | --exe | --ex)
1087 ac_prev=exec_prefix ;;
1088 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1089 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1090 | --exec=* | --exe=* | --ex=*)
ba479fd2 1091 exec_prefix=$ac_optarg ;;
861bb6c1
JL
1092
1093 -gas | --gas | --ga | --g)
1094 # Obsolete; use --with-gas.
1095 with_gas=yes ;;
1096
ba479fd2
NN
1097 -help | --help | --hel | --he | -h)
1098 ac_init_help=long ;;
1099 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1100 ac_init_help=recursive ;;
1101 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1102 ac_init_help=short ;;
861bb6c1
JL
1103
1104 -host | --host | --hos | --ho)
ba479fd2 1105 ac_prev=host_alias ;;
861bb6c1 1106 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 1107 host_alias=$ac_optarg ;;
861bb6c1 1108
5213506e
RW
1109 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1110 ac_prev=htmldir ;;
1111 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1112 | --ht=*)
1113 htmldir=$ac_optarg ;;
1114
861bb6c1
JL
1115 -includedir | --includedir | --includedi | --included | --include \
1116 | --includ | --inclu | --incl | --inc)
1117 ac_prev=includedir ;;
1118 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1119 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1120 includedir=$ac_optarg ;;
861bb6c1
JL
1121
1122 -infodir | --infodir | --infodi | --infod | --info | --inf)
1123 ac_prev=infodir ;;
1124 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1125 infodir=$ac_optarg ;;
861bb6c1
JL
1126
1127 -libdir | --libdir | --libdi | --libd)
1128 ac_prev=libdir ;;
1129 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1130 libdir=$ac_optarg ;;
861bb6c1
JL
1131
1132 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1133 | --libexe | --libex | --libe)
1134 ac_prev=libexecdir ;;
1135 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1136 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1137 libexecdir=$ac_optarg ;;
861bb6c1 1138
5213506e
RW
1139 -localedir | --localedir | --localedi | --localed | --locale)
1140 ac_prev=localedir ;;
1141 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1142 localedir=$ac_optarg ;;
1143
861bb6c1 1144 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 1145 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1146 ac_prev=localstatedir ;;
1147 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 1148 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1149 localstatedir=$ac_optarg ;;
861bb6c1
JL
1150
1151 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1152 ac_prev=mandir ;;
1153 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1154 mandir=$ac_optarg ;;
861bb6c1
JL
1155
1156 -nfp | --nfp | --nf)
1157 # Obsolete; use --without-fp.
1158 with_fp=no ;;
1159
1160 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1161 | --no-cr | --no-c | -n)
861bb6c1
JL
1162 no_create=yes ;;
1163
1164 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1165 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1166 no_recursion=yes ;;
1167
1168 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1169 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1170 | --oldin | --oldi | --old | --ol | --o)
1171 ac_prev=oldincludedir ;;
1172 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1173 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1174 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1175 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1176
1177 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1178 ac_prev=prefix ;;
1179 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1180 prefix=$ac_optarg ;;
861bb6c1
JL
1181
1182 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1183 | --program-pre | --program-pr | --program-p)
1184 ac_prev=program_prefix ;;
1185 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1186 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1187 program_prefix=$ac_optarg ;;
861bb6c1
JL
1188
1189 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1190 | --program-suf | --program-su | --program-s)
1191 ac_prev=program_suffix ;;
1192 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1193 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1194 program_suffix=$ac_optarg ;;
861bb6c1
JL
1195
1196 -program-transform-name | --program-transform-name \
1197 | --program-transform-nam | --program-transform-na \
1198 | --program-transform-n | --program-transform- \
1199 | --program-transform | --program-transfor \
1200 | --program-transfo | --program-transf \
1201 | --program-trans | --program-tran \
1202 | --progr-tra | --program-tr | --program-t)
1203 ac_prev=program_transform_name ;;
1204 -program-transform-name=* | --program-transform-name=* \
1205 | --program-transform-nam=* | --program-transform-na=* \
1206 | --program-transform-n=* | --program-transform-=* \
1207 | --program-transform=* | --program-transfor=* \
1208 | --program-transfo=* | --program-transf=* \
1209 | --program-trans=* | --program-tran=* \
1210 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 1211 program_transform_name=$ac_optarg ;;
861bb6c1 1212
5213506e
RW
1213 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1214 ac_prev=pdfdir ;;
1215 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1216 pdfdir=$ac_optarg ;;
1217
1218 -psdir | --psdir | --psdi | --psd | --ps)
1219 ac_prev=psdir ;;
1220 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1221 psdir=$ac_optarg ;;
1222
861bb6c1
JL
1223 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1224 | -silent | --silent | --silen | --sile | --sil)
1225 silent=yes ;;
1226
1227 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1228 ac_prev=sbindir ;;
1229 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1230 | --sbi=* | --sb=*)
ba479fd2 1231 sbindir=$ac_optarg ;;
861bb6c1
JL
1232
1233 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1234 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1235 | --sharedst | --shareds | --shared | --share | --shar \
1236 | --sha | --sh)
1237 ac_prev=sharedstatedir ;;
1238 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1239 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1240 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1241 | --sha=* | --sh=*)
ba479fd2 1242 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1243
1244 -site | --site | --sit)
1245 ac_prev=site ;;
1246 -site=* | --site=* | --sit=*)
ba479fd2 1247 site=$ac_optarg ;;
861bb6c1
JL
1248
1249 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1250 ac_prev=srcdir ;;
1251 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1252 srcdir=$ac_optarg ;;
861bb6c1
JL
1253
1254 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1255 | --syscon | --sysco | --sysc | --sys | --sy)
1256 ac_prev=sysconfdir ;;
1257 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1258 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1259 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1260
1261 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1262 ac_prev=target_alias ;;
861bb6c1 1263 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1264 target_alias=$ac_optarg ;;
861bb6c1
JL
1265
1266 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1267 verbose=yes ;;
1268
ba479fd2
NN
1269 -version | --version | --versio | --versi | --vers | -V)
1270 ac_init_version=: ;;
861bb6c1
JL
1271
1272 -with-* | --with-*)
5213506e 1273 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1274 # Reject names that are not valid shell variable names.
5213506e
RW
1275 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1276 as_fn_error "invalid package name: $ac_useropt"
1277 ac_useropt_orig=$ac_useropt
1278 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279 case $ac_user_opts in
1280 *"
1281"with_$ac_useropt"
1282"*) ;;
1283 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1284 ac_unrecognized_sep=', ';;
b61ff9c8 1285 esac
5213506e 1286 eval with_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1287
1288 -without-* | --without-*)
5213506e 1289 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1290 # Reject names that are not valid shell variable names.
5213506e
RW
1291 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1292 as_fn_error "invalid package name: $ac_useropt"
1293 ac_useropt_orig=$ac_useropt
1294 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1295 case $ac_user_opts in
1296 *"
1297"with_$ac_useropt"
1298"*) ;;
1299 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1300 ac_unrecognized_sep=', ';;
1301 esac
1302 eval with_$ac_useropt=no ;;
861bb6c1
JL
1303
1304 --x)
1305 # Obsolete; use --with-x.
1306 with_x=yes ;;
1307
1308 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1309 | --x-incl | --x-inc | --x-in | --x-i)
1310 ac_prev=x_includes ;;
1311 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1312 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1313 x_includes=$ac_optarg ;;
861bb6c1
JL
1314
1315 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1316 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1317 ac_prev=x_libraries ;;
1318 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1319 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1320 x_libraries=$ac_optarg ;;
861bb6c1 1321
5213506e
RW
1322 -*) as_fn_error "unrecognized option: \`$ac_option'
1323Try \`$0 --help' for more information."
861bb6c1
JL
1324 ;;
1325
ba479fd2
NN
1326 *=*)
1327 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1328 # Reject names that are not valid shell variable names.
5213506e
RW
1329 case $ac_envvar in #(
1330 '' | [0-9]* | *[!_$as_cr_alnum]* )
1331 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1332 esac
1333 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1334 export $ac_envvar ;;
1335
861bb6c1 1336 *)
ba479fd2 1337 # FIXME: should be removed in autoconf 3.0.
5213506e 1338 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
ba479fd2 1339 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1340 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ba479fd2 1341 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1342 ;;
1343
1344 esac
1345done
1346
1347if test -n "$ac_prev"; then
ba479fd2 1348 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5213506e 1349 as_fn_error "missing argument to $ac_option"
63cf211a 1350fi
63cf211a 1351
5213506e
RW
1352if test -n "$ac_unrecognized_opts"; then
1353 case $enable_option_checking in
1354 no) ;;
1355 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1356 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2f41c1d6 1357 esac
5213506e 1358fi
2f41c1d6 1359
5213506e
RW
1360# Check all directory arguments for consistency.
1361for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1362 datadir sysconfdir sharedstatedir localstatedir includedir \
1363 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1364 libdir localedir mandir
b61ff9c8 1365do
5213506e
RW
1366 eval ac_val=\$$ac_var
1367 # Remove trailing slashes.
1368 case $ac_val in
1369 */ )
1370 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1371 eval $ac_var=\$ac_val;;
1372 esac
1373 # Be sure to have absolute directory names.
b61ff9c8 1374 case $ac_val in
5213506e
RW
1375 [\\/$]* | ?:[\\/]* ) continue;;
1376 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
b61ff9c8 1377 esac
5213506e 1378 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
b61ff9c8
BS
1379done
1380
1381# There might be people who depend on the old broken behavior: `$host'
1382# used to hold the argument of --host etc.
1383# FIXME: To remove some day.
1384build=$build_alias
1385host=$host_alias
ba479fd2
NN
1386target=$target_alias
1387
1388# FIXME: To remove some day.
1389if test "x$host_alias" != x; then
1390 if test "x$build_alias" = x; then
1391 cross_compiling=maybe
5213506e 1392 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
ba479fd2
NN
1393 If a cross compiler is detected then cross compile mode will be used." >&2
1394 elif test "x$build_alias" != "x$host_alias"; then
1395 cross_compiling=yes
1396 fi
1397fi
6e3f3080 1398
ba479fd2
NN
1399ac_tool_prefix=
1400test -n "$host_alias" && ac_tool_prefix=$host_alias-
1401
1402test "$silent" = yes && exec 6>/dev/null
861bb6c1 1403
861bb6c1 1404
5213506e
RW
1405ac_pwd=`pwd` && test -n "$ac_pwd" &&
1406ac_ls_di=`ls -di .` &&
1407ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1408 as_fn_error "working directory cannot be determined"
1409test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1410 as_fn_error "pwd does not report name of working directory"
1411
1412
861bb6c1
JL
1413# Find the source files, if location was not specified.
1414if test -z "$srcdir"; then
1415 ac_srcdir_defaulted=yes
5213506e
RW
1416 # Try the directory containing this script, then the parent directory.
1417 ac_confdir=`$as_dirname -- "$as_myself" ||
1418$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1419 X"$as_myself" : 'X\(//\)[^/]' \| \
1420 X"$as_myself" : 'X\(//\)$' \| \
1421 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1422$as_echo X"$as_myself" |
1423 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1424 s//\1/
1425 q
1426 }
1427 /^X\(\/\/\)[^/].*/{
1428 s//\1/
1429 q
1430 }
1431 /^X\(\/\/\)$/{
1432 s//\1/
1433 q
1434 }
1435 /^X\(\/\).*/{
1436 s//\1/
1437 q
1438 }
1439 s/.*/./; q'`
861bb6c1 1440 srcdir=$ac_confdir
5213506e 1441 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1442 srcdir=..
1443 fi
1444else
1445 ac_srcdir_defaulted=no
1446fi
5213506e
RW
1447if test ! -r "$srcdir/$ac_unique_file"; then
1448 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1449 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1450fi
1451ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1452ac_abs_confdir=`(
1453 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1454 pwd)`
1455# When building in place, set srcdir=.
1456if test "$ac_abs_confdir" = "$ac_pwd"; then
1457 srcdir=.
1458fi
1459# Remove unnecessary trailing slashes from srcdir.
1460# Double slashes in file names in object file debugging info
1461# mess up M-x gdb in Emacs.
1462case $srcdir in
1463*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1464esac
1465for ac_var in $ac_precious_vars; do
1466 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1467 eval ac_env_${ac_var}_value=\$${ac_var}
1468 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1469 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1470done
63cf211a 1471
ba479fd2
NN
1472#
1473# Report the --help message.
1474#
1475if test "$ac_init_help" = "long"; then
1476 # Omit some internal or obsolete options to make the list less imposing.
1477 # This message is too long to be a string in the A/UX 3.1 sh.
1478 cat <<_ACEOF
1479\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1480
ba479fd2 1481Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1482
ba479fd2
NN
1483To assign environment variables (e.g., CC, CFLAGS...), specify them as
1484VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1485
ba479fd2 1486Defaults for the options are specified in brackets.
861bb6c1 1487
ba479fd2
NN
1488Configuration:
1489 -h, --help display this help and exit
1490 --help=short display options specific to this package
1491 --help=recursive display the short help of all the included packages
1492 -V, --version display version information and exit
1493 -q, --quiet, --silent do not print \`checking...' messages
1494 --cache-file=FILE cache test results in FILE [disabled]
1495 -C, --config-cache alias for \`--cache-file=config.cache'
1496 -n, --no-create do not create output files
1497 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1498
ba479fd2
NN
1499Installation directories:
1500 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1501 [$ac_default_prefix]
ba479fd2 1502 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1503 [PREFIX]
861bb6c1 1504
ba479fd2
NN
1505By default, \`make install' will install all the files in
1506\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1507an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1508for instance \`--prefix=\$HOME'.
13c22933 1509
ba479fd2 1510For better control, use the options below.
13c22933 1511
ba479fd2 1512Fine tuning of the installation directories:
5213506e
RW
1513 --bindir=DIR user executables [EPREFIX/bin]
1514 --sbindir=DIR system admin executables [EPREFIX/sbin]
1515 --libexecdir=DIR program executables [EPREFIX/libexec]
1516 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1517 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1518 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1519 --libdir=DIR object code libraries [EPREFIX/lib]
1520 --includedir=DIR C header files [PREFIX/include]
1521 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1522 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1523 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1524 --infodir=DIR info documentation [DATAROOTDIR/info]
1525 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1526 --mandir=DIR man documentation [DATAROOTDIR/man]
1527 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1528 --htmldir=DIR html documentation [DOCDIR]
1529 --dvidir=DIR dvi documentation [DOCDIR]
1530 --pdfdir=DIR pdf documentation [DOCDIR]
1531 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1532_ACEOF
13c22933 1533
ba479fd2 1534 cat <<\_ACEOF
13c22933 1535
ba479fd2
NN
1536Program names:
1537 --program-prefix=PREFIX prepend PREFIX to installed program names
1538 --program-suffix=SUFFIX append SUFFIX to installed program names
1539 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1540
ba479fd2
NN
1541System types:
1542 --build=BUILD configure for building on BUILD [guessed]
1543 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1544 --target=TARGET configure for building compilers for TARGET [HOST]
1545_ACEOF
13c22933
JJ
1546fi
1547
ba479fd2 1548if test -n "$ac_init_help"; then
13c22933 1549
ba479fd2 1550 cat <<\_ACEOF
13c22933 1551
ba479fd2 1552Optional Features:
5213506e 1553 --disable-option-checking ignore unrecognized --enable/--with options
ba479fd2
NN
1554 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1555 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1556 --enable-generated-files-in-srcdir
1557 put copies of generated files in source dir
1558 intended for creating source tarballs for users
1559 without texinfo bison or flex.
3bbd5a19 1560 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1561 --enable-checking=LIST
1562 enable expensive run-time checks. With LIST,
1563 enable only specific categories of checks.
cdce5c16 1564 Categories are: yes,no,all,none,release.
726a989a 1565 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1566 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1567 --enable-coverage=LEVEL
fb38008e 1568 enable compiler's code coverage collection.
ba479fd2
NN
1569 Use to measure compiler performance and locate
1570 unused parts of the compiler. With LEVEL, specify
1571 optimization. Values are opt, noopt,
1572 default is noopt
1573 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
00020c16 1574 --enable-build-with-cxx build with C++ compiler instead of C compiler
ba479fd2
NN
1575 --enable-multilib enable library support for multiple ABIs
1576 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1577 --enable-decimal-float={no,yes,bid,dpd}
1578 enable decimal float extension to C. Selecting 'bid'
1579 or 'dpd' choses which decimal floating point format
1580 to use
ab22c1fa 1581 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1582 --enable-threads enable thread usage for target GCC
1583 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1584 --enable-tls enable or disable generation of tls code
1585 overriding the assembler check for tls support
ba479fd2
NN
1586 --enable-objc-gc enable the use of Boehm's garbage collector with
1587 the GNU Objective-C runtime
1588 --disable-shared don't provide a shared libgcc
f3c9f174 1589 --enable-languages=LIST specify which front-ends to build
dfb77e37 1590 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1591 --enable-initfini-array use .init_array/.fini_array sections
1592 --enable-sjlj-exceptions
1593 arrange to use setjmp/longjmp exception handling
7f970b70 1594 --enable-secureplt enable -msecure-plt by default for PowerPC
ad211091
KT
1595 --enable-leading-mingw64-underscores
1596 Enable leading underscores on 64 bit mingw targets
922e3e33 1597 --enable-cld enable -mcld by default for 32bit x86
d79389af 1598 --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86
ba479fd2
NN
1599 --disable-win32-registry
1600 disable lookup of installation paths in the
1601 Registry on Windows hosts
1602 --enable-win32-registry enable registry lookup (default)
1603 --enable-win32-registry=KEY
1604 use KEY instead of GCC version as the last portion
1605 of the registry key
5213506e
RW
1606 --enable-shared[=PKGS] build shared libraries [default=yes]
1607 --enable-static[=PKGS] build static libraries [default=yes]
da0f6381
PB
1608 --enable-fast-install[=PKGS]
1609 optimize for fast installation [default=yes]
1610 --disable-libtool-lock avoid locking (might break parallel builds)
55c4f715 1611 --enable-comdat enable COMDAT group support
e31bcd1b
JM
1612 --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on
1613 glibc systems
cd533689
PP
1614 --enable-linker-build-id
1615 compiler will always pass --build-id to linker
ba479fd2
NN
1616 --enable-maintainer-mode
1617 enable make rules and dependencies not useful
1618 (and sometimes confusing) to the casual installer
1619 --enable-version-specific-runtime-libs
1620 specify that runtime libraries should be
1621 installed in a compiler-specific directory
68a607d8 1622 --enable-plugin enable plugin support
093e61a6 1623
ba479fd2
NN
1624Optional Packages:
1625 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1626 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1627 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1628 --with-local-prefix=DIR specifies directory to put local include
1629 --with-gxx-include-dir=DIR
1630 specifies directory to put g++ header files
1631 --with-cpp-install-dir=DIR
1632 install the user visible C preprocessor in DIR
1633 (relative to PREFIX) as well as PREFIX/bin
1634 --with-gnu-ld arrange to work with GNU ld.
1635 --with-ld arrange to use the specified ld (full pathname)
d594623a 1636 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1637 --with-gnu-as arrange to work with GNU as
1638 --with-as arrange to use the specified as (full pathname)
1639 --with-stabs arrange to use stabs instead of host debug format
1640 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1641 --with-build-sysroot=sysroot
1642 use sysroot as the system root during the build
ba479fd2 1643 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
e11ddaf5 1644 --with-specs=SPECS add SPECS to driver command-line processing
2f41c1d6
PB
1645 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1646 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1647 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1648 --with-gnu-ld assume the C compiler uses GNU ld default=no
1649 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1650 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1651 --with-system-libunwind use installed libunwind
da0f6381
PB
1652 --with-pic try to use only PIC/non-PIC objects [default=use
1653 both]
1654 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
5938f74d 1655 --with-plugin-ld=[ARG] specify the plugin linker
ed965309 1656 --with-long-double-128 Use 128-bit long double by default.
59415997 1657 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1658 with the compiler
1659 --with-system-zlib use installed libz
22482f74 1660 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
13c22933 1661
ba479fd2
NN
1662Some influential environment variables:
1663 CC C compiler command
1664 CFLAGS C compiler flags
1665 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1666 nonstandard directory <lib dir>
5213506e
RW
1667 LIBS libraries to pass to the linker, e.g. -l<library>
1668 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1669 you have headers in a nonstandard directory <include dir>
00020c16
ILT
1670 CXX C++ compiler command
1671 CXXFLAGS C++ compiler flags
ba479fd2 1672 CPP C preprocessor
00020c16 1673 CXXCPP C++ preprocessor
6de9cd9a
DN
1674 GMPLIBS How to link GMP
1675 GMPINC How to find GMP include files
f8bf9252
SP
1676 PPLLIBS How to link PPL
1677 PPLINC How to find PPL include files
1678 CLOOGLIBS How to link CLOOG
1679 CLOOGINC How to find CLOOG include files
d7f09764
DN
1680 LIBELFLIBS How to link libelf
1681 LIBELFINC How to find libelf include files
13c22933 1682
ba479fd2
NN
1683Use these variables to override the choices made by `configure' or to help
1684it to find libraries and programs with nonstandard names/locations.
73458fb7 1685
5213506e 1686Report bugs to the package provider.
ba479fd2 1687_ACEOF
5213506e 1688ac_status=$?
ba479fd2 1689fi
6e3f3080 1690
ba479fd2
NN
1691if test "$ac_init_help" = "recursive"; then
1692 # If there are subdirs, report their specific --help.
ba479fd2 1693 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1694 test -d "$ac_dir" ||
1695 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1696 continue
ba479fd2
NN
1697 ac_builddir=.
1698
5213506e
RW
1699case "$ac_dir" in
1700.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1701*)
1702 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1703 # A ".." for each directory in $ac_dir_suffix.
1704 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1705 case $ac_top_builddir_sub in
1706 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1707 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1708 esac ;;
1709esac
1710ac_abs_top_builddir=$ac_pwd
1711ac_abs_builddir=$ac_pwd$ac_dir_suffix
1712# for backward compatibility:
1713ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1714
1715case $srcdir in
5213506e 1716 .) # We are building in place.
ba479fd2 1717 ac_srcdir=.
5213506e
RW
1718 ac_top_srcdir=$ac_top_builddir_sub
1719 ac_abs_top_srcdir=$ac_pwd ;;
1720 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1721 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1722 ac_top_srcdir=$srcdir
1723 ac_abs_top_srcdir=$srcdir ;;
1724 *) # Relative name.
1725 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1726 ac_top_srcdir=$ac_top_build_prefix$srcdir
1727 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1728esac
5213506e
RW
1729ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1730
1731 cd "$ac_dir" || { ac_status=$?; continue; }
1732 # Check for guested configure.
1733 if test -f "$ac_srcdir/configure.gnu"; then
1734 echo &&
1735 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1736 elif test -f "$ac_srcdir/configure"; then
1737 echo &&
1738 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2 1739 else
5213506e
RW
1740 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1741 fi || ac_status=$?
1742 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1743 done
1744fi
1745
5213506e 1746test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1747if $ac_init_version; then
1748 cat <<\_ACEOF
5213506e
RW
1749configure
1750generated by GNU Autoconf 2.64
ba479fd2 1751
5213506e 1752Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
1753This configure script is free software; the Free Software Foundation
1754gives unlimited permission to copy, distribute and modify it.
1755_ACEOF
5213506e 1756 exit
ba479fd2 1757fi
ba479fd2 1758
5213506e
RW
1759## ------------------------ ##
1760## Autoconf initialization. ##
1761## ------------------------ ##
ba479fd2 1762
5213506e
RW
1763# ac_fn_c_try_compile LINENO
1764# --------------------------
1765# Try to compile conftest.$ac_ext, and return whether this succeeded.
1766ac_fn_c_try_compile ()
ba479fd2 1767{
5213506e
RW
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 rm -f conftest.$ac_objext
1770 if { { ac_try="$ac_compile"
1771case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774esac
1775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776$as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_compile") 2>conftest.err
1778 ac_status=$?
1779 if test -s conftest.err; then
1780 grep -v '^ *+' conftest.err >conftest.er1
1781 cat conftest.er1 >&5
1782 mv -f conftest.er1 conftest.err
1783 fi
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && {
1786 test -z "$ac_c_werror_flag" ||
1787 test ! -s conftest.err
1788 } && test -s conftest.$ac_objext; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1793
5213506e
RW
1794 ac_retval=1
1795fi
1796 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1797 return $ac_retval
ba479fd2 1798
5213506e 1799} # ac_fn_c_try_compile
ba479fd2 1800
5213506e
RW
1801# ac_fn_cxx_try_compile LINENO
1802# ----------------------------
1803# Try to compile conftest.$ac_ext, and return whether this succeeded.
1804ac_fn_cxx_try_compile ()
1805{
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 rm -f conftest.$ac_objext
1808 if { { ac_try="$ac_compile"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_compile") 2>conftest.err
1816 ac_status=$?
1817 if test -s conftest.err; then
1818 grep -v '^ *+' conftest.err >conftest.er1
1819 cat conftest.er1 >&5
1820 mv -f conftest.er1 conftest.err
1821 fi
1822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1823 test $ac_status = 0; } && {
1824 test -z "$ac_cxx_werror_flag" ||
1825 test ! -s conftest.err
1826 } && test -s conftest.$ac_objext; then :
1827 ac_retval=0
1828else
1829 $as_echo "$as_me: failed program was:" >&5
1830sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1831
5213506e
RW
1832 ac_retval=1
1833fi
1834 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1835 return $ac_retval
ba479fd2 1836
5213506e 1837} # ac_fn_cxx_try_compile
ba479fd2 1838
5213506e
RW
1839# ac_fn_c_try_cpp LINENO
1840# ----------------------
1841# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1842ac_fn_c_try_cpp ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 if { { ac_try="$ac_cpp conftest.$ac_ext"
1846case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1853 ac_status=$?
1854 if test -s conftest.err; then
1855 grep -v '^ *+' conftest.err >conftest.er1
1856 cat conftest.er1 >&5
1857 mv -f conftest.er1 conftest.err
1858 fi
1859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1860 test $ac_status = 0; } >/dev/null && {
1861 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1862 test ! -s conftest.err
1863 }; then :
1864 ac_retval=0
1865else
1866 $as_echo "$as_me: failed program was:" >&5
1867sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1868
5213506e
RW
1869 ac_retval=1
1870fi
1871 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1872 return $ac_retval
ba479fd2 1873
5213506e 1874} # ac_fn_c_try_cpp
ba479fd2 1875
5213506e
RW
1876# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1877# -------------------------------------------------------
1878# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1879# the include files in INCLUDES and setting the cache variable VAR
1880# accordingly.
1881ac_fn_c_check_header_mongrel ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1886$as_echo_n "checking for $2... " >&6; }
1887if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1888 $as_echo_n "(cached) " >&6
1889fi
1890eval ac_res=\$$3
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1892$as_echo "$ac_res" >&6; }
1893else
1894 # Is the header compilable?
1895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1896$as_echo_n "checking $2 usability... " >&6; }
1897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898/* end confdefs.h. */
1899$4
1900#include <$2>
ba479fd2 1901_ACEOF
5213506e
RW
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 ac_header_compiler=yes
1904else
1905 ac_header_compiler=no
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1909$as_echo "$ac_header_compiler" >&6; }
ba479fd2 1910
5213506e
RW
1911# Is the header present?
1912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1913$as_echo_n "checking $2 presence... " >&6; }
1914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_cpp "$LINENO"; then :
1919 ac_header_preproc=yes
1920else
1921 ac_header_preproc=no
1922fi
1923rm -f conftest.err conftest.$ac_ext
1924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1925$as_echo "$ac_header_preproc" >&6; }
ba479fd2 1926
5213506e
RW
1927# So? What about this header?
1928case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1929 yes:no: )
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1931$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1933$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1934 ;;
1935 no:yes:* )
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1937$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1939$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1941$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1943$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1945$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1946 ;;
1947esac
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1949$as_echo_n "checking for $2... " >&6; }
1950if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=\$ac_header_compiler"
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
1958fi
1959 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 1960
5213506e 1961} # ac_fn_c_check_header_mongrel
ba479fd2 1962
5213506e
RW
1963# ac_fn_c_try_run LINENO
1964# ----------------------
1965# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1966# that executables *can* be run.
1967ac_fn_c_try_run ()
b61ff9c8 1968{
5213506e
RW
1969 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1970 if { { ac_try="$ac_link"
1971case "(($ac_try" in
1972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1973 *) ac_try_echo=$ac_try;;
1974esac
1975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1976$as_echo "$ac_try_echo"; } >&5
1977 (eval "$ac_link") 2>&5
1978 ac_status=$?
1979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1981 { { case "(($ac_try" in
1982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1983 *) ac_try_echo=$ac_try;;
1984esac
1985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1986$as_echo "$ac_try_echo"; } >&5
1987 (eval "$ac_try") 2>&5
1988 ac_status=$?
1989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1990 test $ac_status = 0; }; }; then :
1991 ac_retval=0
1992else
1993 $as_echo "$as_me: program exited with status $ac_status" >&5
1994 $as_echo "$as_me: failed program was:" >&5
1995sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1996
5213506e
RW
1997 ac_retval=$ac_status
1998fi
1999 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2000 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2001 return $ac_retval
ba479fd2 2002
5213506e 2003} # ac_fn_c_try_run
ba479fd2 2004
5213506e
RW
2005# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2006# -------------------------------------------------------
2007# Tests whether HEADER exists and can be compiled using the include files in
2008# INCLUDES, setting the cache variable VAR accordingly.
2009ac_fn_c_check_header_compile ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2013$as_echo_n "checking for $2... " >&6; }
2014if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2015 $as_echo_n "(cached) " >&6
2016else
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020#include <$2>
ba479fd2 2021_ACEOF
5213506e
RW
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 eval "$3=yes"
2024else
2025 eval "$3=no"
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029eval ac_res=\$$3
2030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2031$as_echo "$ac_res" >&6; }
2032 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2033
5213506e 2034} # ac_fn_c_check_header_compile
ba479fd2 2035
5213506e
RW
2036# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2037# --------------------------------------------
2038# Tries to find the compile-time value of EXPR in a program that includes
2039# INCLUDES, setting VAR accordingly. Returns whether the value could be
2040# computed
2041ac_fn_c_compute_int ()
2042{
2043 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044 if test "$cross_compiling" = yes; then
2045 # Depending upon the size, compute the lo and hi bounds.
2046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) >= 0)];
2053test_array [0] = 0
ba479fd2 2054
5213506e
RW
2055 ;
2056 return 0;
2057}
ba479fd2 2058_ACEOF
5213506e
RW
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_lo=0 ac_mid=0
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2069test_array [0] = 0
ba479fd2 2070
5213506e
RW
2071 ;
2072 return 0;
2073}
ba479fd2 2074_ACEOF
5213506e
RW
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_hi=$ac_mid; break
2077else
2078 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2079 if test $ac_lo -le $ac_mid; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) < 0)];
2095test_array [0] = 0
ba479fd2 2096
5213506e
RW
2097 ;
2098 return 0;
2099}
ba479fd2 2100_ACEOF
5213506e
RW
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_hi=-1 ac_mid=-1
2103 while :; do
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2111test_array [0] = 0
ba479fd2 2112
5213506e
RW
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_lo=$ac_mid; break
2119else
2120 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2121 if test $ac_mid -le $ac_hi; then
2122 ac_lo= ac_hi=
2123 break
2124 fi
2125 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
ba479fd2 2126fi
5213506e
RW
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128 done
ba479fd2 2129else
5213506e 2130 ac_lo= ac_hi=
ba479fd2 2131fi
5213506e
RW
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135# Binary search between lo and hi bounds.
2136while test "x$ac_lo" != "x$ac_hi"; do
2137 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2145test_array [0] = 0
ba479fd2 2146
5213506e
RW
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=$ac_mid
2153else
2154 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
ba479fd2 2155fi
5213506e
RW
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157done
2158case $ac_lo in #((
2159?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2160'') ac_retval=1 ;;
2161esac
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166static long int longval () { return $2; }
2167static unsigned long int ulongval () { return $2; }
2168#include <stdio.h>
2169#include <stdlib.h>
2170int
2171main ()
2172{
ba479fd2 2173
5213506e
RW
2174 FILE *f = fopen ("conftest.val", "w");
2175 if (! f)
2176 return 1;
2177 if (($2) < 0)
2178 {
2179 long int i = longval ();
2180 if (i != ($2))
2181 return 1;
2182 fprintf (f, "%ld", i);
2183 }
2184 else
2185 {
2186 unsigned long int i = ulongval ();
2187 if (i != ($2))
2188 return 1;
2189 fprintf (f, "%lu", i);
2190 }
2191 /* Do not output a trailing newline, as this causes \r\n confusion
2192 on some platforms. */
2193 return ferror (f) || fclose (f) != 0;
ba479fd2 2194
5213506e
RW
2195 ;
2196 return 0;
2197}
2198_ACEOF
2199if ac_fn_c_try_run "$LINENO"; then :
2200 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2201else
2202 ac_retval=1
2203fi
2204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2205 conftest.$ac_objext conftest.beam conftest.$ac_ext
2206rm -f conftest.val
ba479fd2 2207
5213506e
RW
2208 fi
2209 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2210 return $ac_retval
ba479fd2 2211
5213506e 2212} # ac_fn_c_compute_int
ba479fd2 2213
5213506e
RW
2214# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2215# -------------------------------------------
2216# Tests whether TYPE exists after having included INCLUDES, setting cache
2217# variable VAR accordingly.
2218ac_fn_c_check_type ()
2219{
2220 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222$as_echo_n "checking for $2... " >&6; }
2223if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2224 $as_echo_n "(cached) " >&6
2225else
2226 eval "$3=no"
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230int
2231main ()
2232{
2233if (sizeof ($2))
2234 return 0;
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_compile "$LINENO"; then :
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246if (sizeof (($2)))
2247 return 0;
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 2253
5213506e
RW
2254else
2255 eval "$3=yes"
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258fi
2259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260fi
2261eval ac_res=\$$3
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2263$as_echo "$ac_res" >&6; }
2264 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2265
5213506e 2266} # ac_fn_c_check_type
ba479fd2 2267
fa802374
KT
2268# ac_fn_c_find_intX_t LINENO BITS VAR
2269# -----------------------------------
2270# Finds a signed integer type with width BITS, setting cache variable VAR
2271# accordingly.
2272ac_fn_c_find_intX_t ()
5213506e
RW
2273{
2274 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
fa802374
KT
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2276$as_echo_n "checking for int$2_t... " >&6; }
5213506e
RW
2277if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2278 $as_echo_n "(cached) " >&6
2279else
fa802374
KT
2280 eval "$3=no"
2281 for ac_type in int$2_t 'int' 'long int' \
2282 'long long int' 'short int' 'signed char'; do
2283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h. */
2285$ac_includes_default
2286int
2287main ()
2288{
2289static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
2290test_array [0] = 0
2291
2292 ;
2293 return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_compile "$LINENO"; then :
5213506e
RW
2297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h. */
fa802374
KT
2299$ac_includes_default
2300int
2301main ()
2302{
2303static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
2304 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
2305test_array [0] = 0
2306
2307 ;
2308 return 0;
2309}
5213506e 2310_ACEOF
fa802374
KT
2311if ac_fn_c_try_compile "$LINENO"; then :
2312
5213506e 2313else
fa802374
KT
2314 case $ac_type in #(
2315 int$2_t) :
2316 eval "$3=yes" ;; #(
2317 *) :
2318 eval "$3=\$ac_type" ;;
2319esac
5213506e 2320fi
fa802374
KT
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324 eval as_val=\$$3
2325 if test "x$as_val" = x""no; then :
2326
2327else
2328 break
2329fi
2330 done
5213506e
RW
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
2335 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2336
fa802374 2337} # ac_fn_c_find_intX_t
18c04407 2338
5213506e
RW
2339# ac_fn_c_try_link LINENO
2340# -----------------------
2341# Try to link conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_c_try_link ()
2343{
2344 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345 rm -f conftest.$ac_objext conftest$ac_exeext
2346 if { { ac_try="$ac_link"
2347case "(($ac_try" in
2348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349 *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353 (eval "$ac_link") 2>conftest.err
2354 ac_status=$?
2355 if test -s conftest.err; then
2356 grep -v '^ *+' conftest.err >conftest.er1
2357 cat conftest.er1 >&5
2358 mv -f conftest.er1 conftest.err
2359 fi
2360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361 test $ac_status = 0; } && {
2362 test -z "$ac_c_werror_flag" ||
2363 test ! -s conftest.err
2364 } && test -s conftest$ac_exeext && {
2365 test "$cross_compiling" = yes ||
2366 $as_test_x conftest$ac_exeext
2367 }; then :
2368 ac_retval=0
2369else
2370 $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
18c04407 2372
5213506e
RW
2373 ac_retval=1
2374fi
2375 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2376 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2377 # interfere with the next link command; also delete a directory that is
2378 # left behind by Apple's compiler. We do this before executing the actions.
2379 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2380 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2381 return $ac_retval
18c04407 2382
5213506e 2383} # ac_fn_c_try_link
ba479fd2 2384
fa802374
KT
2385# ac_fn_c_find_uintX_t LINENO BITS VAR
2386# ------------------------------------
2387# Finds an unsigned integer type with width BITS, setting cache variable VAR
2388# accordingly.
2389ac_fn_c_find_uintX_t ()
2390{
2391 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2393$as_echo_n "checking for uint$2_t... " >&6; }
2394if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2395 $as_echo_n "(cached) " >&6
2396else
2397 eval "$3=no"
2398 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2399 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2401/* end confdefs.h. */
2402$ac_includes_default
2403int
2404main ()
2405{
2406static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
2407test_array [0] = 0
2408
2409 ;
2410 return 0;
2411}
2412_ACEOF
2413if ac_fn_c_try_compile "$LINENO"; then :
2414 case $ac_type in #(
2415 uint$2_t) :
2416 eval "$3=yes" ;; #(
2417 *) :
2418 eval "$3=\$ac_type" ;;
2419esac
2420fi
2421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2422 eval as_val=\$$3
2423 if test "x$as_val" = x""no; then :
2424
2425else
2426 break
2427fi
2428 done
2429fi
2430eval ac_res=\$$3
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2434
2435} # ac_fn_c_find_uintX_t
2436
2437# ac_fn_c_check_header_preproc LINENO HEADER VAR
2438# ----------------------------------------------
2439# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2440ac_fn_c_check_header_preproc ()
2441{
2442 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2444$as_echo_n "checking for $2... " >&6; }
2445if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2446 $as_echo_n "(cached) " >&6
2447else
2448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h. */
2450#include <$2>
2451_ACEOF
2452if ac_fn_c_try_cpp "$LINENO"; then :
2453 eval "$3=yes"
2454else
2455 eval "$3=no"
2456fi
2457rm -f conftest.err conftest.$ac_ext
2458fi
2459eval ac_res=\$$3
2460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2461$as_echo "$ac_res" >&6; }
2462 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2463
2464} # ac_fn_c_check_header_preproc
2465
5213506e
RW
2466# ac_fn_c_check_func LINENO FUNC VAR
2467# ----------------------------------
2468# Tests whether FUNC exists, setting the cache variable VAR accordingly
2469ac_fn_c_check_func ()
2470{
2471 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2475 $as_echo_n "(cached) " >&6
2476else
2477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h. */
2479/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2481#define $2 innocuous_$2
ba479fd2 2482
5213506e
RW
2483/* System header to define __stub macros and hopefully few prototypes,
2484 which can conflict with char $2 (); below.
2485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2486 <limits.h> exists even on freestanding compilers. */
914c5af7 2487
5213506e
RW
2488#ifdef __STDC__
2489# include <limits.h>
2490#else
2491# include <assert.h>
2492#endif
ba479fd2 2493
5213506e 2494#undef $2
ba479fd2 2495
5213506e
RW
2496/* Override any GCC internal prototype to avoid an error.
2497 Use char because int might match the return type of a GCC
2498 builtin and then its argument prototype would still apply. */
2499#ifdef __cplusplus
2500extern "C"
2501#endif
2502char $2 ();
2503/* The GNU C library defines this for functions which it implements
2504 to always fail with ENOSYS. Some functions are actually named
2505 something starting with __ and the normal name is an alias. */
2506#if defined __stub_$2 || defined __stub___$2
2507choke me
2508#endif
9f18db39 2509
5213506e
RW
2510int
2511main ()
2512{
2513return $2 ();
2514 ;
2515 return 0;
2516}
2517_ACEOF
2518if ac_fn_c_try_link "$LINENO"; then :
2519 eval "$3=yes"
2520else
2521 eval "$3=no"
ba479fd2 2522fi
5213506e
RW
2523rm -f core conftest.err conftest.$ac_objext \
2524 conftest$ac_exeext conftest.$ac_ext
2525fi
2526eval ac_res=\$$3
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2528$as_echo "$ac_res" >&6; }
2529 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
b61ff9c8 2530
5213506e 2531} # ac_fn_c_check_func
b61ff9c8 2532
5213506e
RW
2533# ac_fn_cxx_try_cpp LINENO
2534# ------------------------
2535# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2536ac_fn_cxx_try_cpp ()
2537{
2538 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2539 if { { ac_try="$ac_cpp conftest.$ac_ext"
2540case "(($ac_try" in
2541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2542 *) ac_try_echo=$ac_try;;
2543esac
2544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2545$as_echo "$ac_try_echo"; } >&5
2546 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2547 ac_status=$?
2548 if test -s conftest.err; then
2549 grep -v '^ *+' conftest.err >conftest.er1
2550 cat conftest.er1 >&5
2551 mv -f conftest.er1 conftest.err
2552 fi
2553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2554 test $ac_status = 0; } >/dev/null && {
2555 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2556 test ! -s conftest.err
2557 }; then :
2558 ac_retval=0
2559else
2560 $as_echo "$as_me: failed program was:" >&5
2561sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2562
5213506e 2563 ac_retval=1
ba479fd2 2564fi
5213506e
RW
2565 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2566 return $ac_retval
b61ff9c8 2567
5213506e 2568} # ac_fn_cxx_try_cpp
b61ff9c8 2569
5213506e
RW
2570# ac_fn_cxx_try_link LINENO
2571# -------------------------
2572# Try to link conftest.$ac_ext, and return whether this succeeded.
2573ac_fn_cxx_try_link ()
2574{
2575 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576 rm -f conftest.$ac_objext conftest$ac_exeext
2577 if { { ac_try="$ac_link"
2578case "(($ac_try" in
2579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2580 *) ac_try_echo=$ac_try;;
2581esac
2582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2583$as_echo "$ac_try_echo"; } >&5
2584 (eval "$ac_link") 2>conftest.err
2585 ac_status=$?
2586 if test -s conftest.err; then
2587 grep -v '^ *+' conftest.err >conftest.er1
2588 cat conftest.er1 >&5
2589 mv -f conftest.er1 conftest.err
2590 fi
2591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2592 test $ac_status = 0; } && {
2593 test -z "$ac_cxx_werror_flag" ||
2594 test ! -s conftest.err
2595 } && test -s conftest$ac_exeext && {
2596 test "$cross_compiling" = yes ||
2597 $as_test_x conftest$ac_exeext
2598 }; then :
2599 ac_retval=0
2600else
2601 $as_echo "$as_me: failed program was:" >&5
2602sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2603
5213506e 2604 ac_retval=1
ba479fd2 2605fi
5213506e
RW
2606 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2607 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2608 # interfere with the next link command; also delete a directory that is
2609 # left behind by Apple's compiler. We do this before executing the actions.
2610 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2611 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2612 return $ac_retval
ba479fd2 2613
5213506e
RW
2614} # ac_fn_cxx_try_link
2615cat >config.log <<_ACEOF
2616This file contains any messages produced by compilers while
2617running configure, to aid debugging if configure makes a mistake.
ba479fd2 2618
5213506e
RW
2619It was created by $as_me, which was
2620generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2 2621
5213506e 2622 $ $0 $@
18fc9bd4 2623
5213506e
RW
2624_ACEOF
2625exec 5>>config.log
2626{
2627cat <<_ASUNAME
2628## --------- ##
2629## Platform. ##
2630## --------- ##
18fc9bd4 2631
5213506e
RW
2632hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2633uname -m = `(uname -m) 2>/dev/null || echo unknown`
2634uname -r = `(uname -r) 2>/dev/null || echo unknown`
2635uname -s = `(uname -s) 2>/dev/null || echo unknown`
2636uname -v = `(uname -v) 2>/dev/null || echo unknown`
18fc9bd4 2637
5213506e
RW
2638/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2639/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
18fc9bd4 2640
5213506e
RW
2641/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2642/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2643/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2644/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2645/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2646/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2647/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
18fc9bd4 2648
5213506e 2649_ASUNAME
8f1529e6 2650
5213506e
RW
2651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2652for as_dir in $PATH
2653do
2654 IFS=$as_save_IFS
2655 test -z "$as_dir" && as_dir=.
2656 $as_echo "PATH: $as_dir"
2657 done
2658IFS=$as_save_IFS
57255173 2659
5213506e 2660} >&5
57255173 2661
5213506e 2662cat >&5 <<_ACEOF
1546bb64 2663
18fc9bd4 2664
5213506e
RW
2665## ----------- ##
2666## Core tests. ##
2667## ----------- ##
73458fb7 2668
ba479fd2 2669_ACEOF
13c22933
JJ
2670
2671
5213506e
RW
2672# Keep a trace of the command line.
2673# Strip out --no-create and --no-recursion so they do not pile up.
2674# Strip out --silent because we don't want to record it for future runs.
2675# Also quote any args containing shell meta-characters.
2676# Make two passes to allow for proper duplicate-argument suppression.
2677ac_configure_args=
2678ac_configure_args0=
2679ac_configure_args1=
2680ac_must_keep_next=false
2681for ac_pass in 1 2
00020c16 2682do
5213506e
RW
2683 for ac_arg
2684 do
2685 case $ac_arg in
2686 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2687 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2688 | -silent | --silent | --silen | --sile | --sil)
2689 continue ;;
2690 *\'*)
2691 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2692 esac
2693 case $ac_pass in
2694 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2695 2)
2696 as_fn_append ac_configure_args1 " '$ac_arg'"
2697 if test $ac_must_keep_next = true; then
2698 ac_must_keep_next=false # Got value, back to normal.
2699 else
2700 case $ac_arg in
2701 *=* | --config-cache | -C | -disable-* | --disable-* \
2702 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2703 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2704 | -with-* | --with-* | -without-* | --without-* | --x)
2705 case "$ac_configure_args0 " in
2706 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2707 esac
2708 ;;
2709 -* ) ac_must_keep_next=true ;;
2710 esac
2711 fi
2712 as_fn_append ac_configure_args " '$ac_arg'"
2713 ;;
2714 esac
2715 done
00020c16 2716done
5213506e
RW
2717{ ac_configure_args0=; unset ac_configure_args0;}
2718{ ac_configure_args1=; unset ac_configure_args1;}
60d26958 2719
5213506e
RW
2720# When interrupted or exit'd, cleanup temporary files, and complete
2721# config.log. We remove comments because anyway the quotes in there
2722# would cause problems or look ugly.
2723# WARNING: Use '\'' to represent an apostrophe within the trap.
2724# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2725trap 'exit_status=$?
2726 # Save into config.log some information that might help in debugging.
2727 {
2728 echo
1a4b763e 2729
5213506e
RW
2730 cat <<\_ASBOX
2731## ---------------- ##
2732## Cache variables. ##
2733## ---------------- ##
2734_ASBOX
2735 echo
2736 # The following way of writing the cache mishandles newlines in values,
2737(
2738 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2739 eval ac_val=\$$ac_var
2740 case $ac_val in #(
2741 *${as_nl}*)
2742 case $ac_var in #(
2743 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2744$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2745 esac
2746 case $ac_var in #(
2747 _ | IFS | as_nl) ;; #(
2748 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2749 *) { eval $ac_var=; unset $ac_var;} ;;
2750 esac ;;
2751 esac
2752 done
2753 (set) 2>&1 |
2754 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2755 *${as_nl}ac_space=\ *)
2756 sed -n \
2757 "s/'\''/'\''\\\\'\'''\''/g;
2758 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2759 ;; #(
2760 *)
2761 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2762 ;;
2763 esac |
2764 sort
2765)
2766 echo
1a4b763e 2767
5213506e
RW
2768 cat <<\_ASBOX
2769## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##
2772_ASBOX
2773 echo
2774 for ac_var in $ac_subst_vars
2775 do
2776 eval ac_val=\$$ac_var
2777 case $ac_val in
2778 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2779 esac
2780 $as_echo "$ac_var='\''$ac_val'\''"
2781 done | sort
2782 echo
60d26958 2783
5213506e
RW
2784 if test -n "$ac_subst_files"; then
2785 cat <<\_ASBOX
2786## ------------------- ##
2787## File substitutions. ##
2788## ------------------- ##
2789_ASBOX
2790 echo
2791 for ac_var in $ac_subst_files
2792 do
2793 eval ac_val=\$$ac_var
2794 case $ac_val in
2795 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2796 esac
2797 $as_echo "$ac_var='\''$ac_val'\''"
2798 done | sort
2799 echo
2800 fi
60d26958 2801
5213506e
RW
2802 if test -s confdefs.h; then
2803 cat <<\_ASBOX
2804## ----------- ##
2805## confdefs.h. ##
2806## ----------- ##
2807_ASBOX
2808 echo
2809 cat confdefs.h
2810 echo
2811 fi
2812 test "$ac_signal" != 0 &&
2813 $as_echo "$as_me: caught signal $ac_signal"
2814 $as_echo "$as_me: exit $exit_status"
2815 } >&5
2816 rm -f core *.core core.conftest.* &&
2817 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2818 exit $exit_status
2819' 0
2820for ac_signal in 1 2 13 15; do
2821 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
00020c16 2822done
5213506e 2823ac_signal=0
00020c16 2824
5213506e
RW
2825# confdefs.h avoids OS command line length limits that DEFS can exceed.
2826rm -f -r conftest* confdefs.h
00020c16 2827
5213506e
RW
2828$as_echo "/* confdefs.h */" > confdefs.h
2829
2830# Predefined preprocessor variables.
2831
2832cat >>confdefs.h <<_ACEOF
2833#define PACKAGE_NAME "$PACKAGE_NAME"
60d26958 2834_ACEOF
60d26958 2835
5213506e
RW
2836cat >>confdefs.h <<_ACEOF
2837#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2838_ACEOF
60d26958 2839
5213506e
RW
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_VERSION "$PACKAGE_VERSION"
60d26958 2842_ACEOF
5213506e
RW
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_STRING "$PACKAGE_STRING"
60d26958 2846_ACEOF
60d26958 2847
5213506e
RW
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2850_ACEOF
60d26958 2851
5213506e
RW
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_URL "$PACKAGE_URL"
2854_ACEOF
00020c16 2855
60d26958 2856
5213506e
RW
2857# Let the site file select an alternate cache file if it wants to.
2858# Prefer an explicitly selected file to automatically selected ones.
2859ac_site_file1=NONE
2860ac_site_file2=NONE
2861if test -n "$CONFIG_SITE"; then
2862 ac_site_file1=$CONFIG_SITE
2863elif test "x$prefix" != xNONE; then
2864 ac_site_file1=$prefix/share/config.site
2865 ac_site_file2=$prefix/etc/config.site
2866else
2867 ac_site_file1=$ac_default_prefix/share/config.site
2868 ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
00020c16 2871do
5213506e
RW
2872 test "x$ac_site_file" = xNONE && continue
2873 if test -r "$ac_site_file"; then
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876 sed 's/^/| /' "$ac_site_file" >&5
2877 . "$ac_site_file"
60d26958 2878 fi
5213506e 2879done
60d26958 2880
5213506e
RW
2881if test -r "$cache_file"; then
2882 # Some versions of bash will fail to source /dev/null (special
2883 # files actually), so we avoid doing that.
2884 if test -f "$cache_file"; then
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2886$as_echo "$as_me: loading cache $cache_file" >&6;}
2887 case $cache_file in
2888 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2889 *) . "./$cache_file";;
2890 esac
60d26958
PB
2891 fi
2892else
5213506e
RW
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2894$as_echo "$as_me: creating cache $cache_file" >&6;}
2895 >$cache_file
bf3b7cd3
JD
2896fi
2897
5213506e
RW
2898# Check that the precious variables saved in the cache have kept the same
2899# value.
2900ac_cache_corrupted=false
2901for ac_var in $ac_precious_vars; do
2902 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2903 eval ac_new_set=\$ac_env_${ac_var}_set
2904 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2905 eval ac_new_val=\$ac_env_${ac_var}_value
2906 case $ac_old_set,$ac_new_set in
2907 set,)
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2909$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2910 ac_cache_corrupted=: ;;
2911 ,set)
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2914 ac_cache_corrupted=: ;;
2915 ,);;
2916 *)
2917 if test "x$ac_old_val" != "x$ac_new_val"; then
2918 # differences in whitespace do not lead to failure.
2919 ac_old_val_w=`echo x $ac_old_val`
2920 ac_new_val_w=`echo x $ac_new_val`
2921 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2923$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2924 ac_cache_corrupted=:
2925 else
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2927$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2928 eval $ac_var=\$ac_old_val
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2931$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2933$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2934 fi;;
2935 esac
2936 # Pass precious variables to config.status.
2937 if test "$ac_new_set" = set; then
2938 case $ac_new_val in
2939 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2940 *) ac_arg=$ac_var=$ac_new_val ;;
2941 esac
2942 case " $ac_configure_args " in
2943 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2944 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2945 esac
2946 fi
60d26958 2947done
5213506e
RW
2948if $ac_cache_corrupted; then
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2952$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2953 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
60d26958 2954fi
5213506e
RW
2955## -------------------- ##
2956## Main body of script. ##
2957## -------------------- ##
60d26958 2958
00020c16
ILT
2959ac_ext=c
2960ac_cpp='$CPP $CPPFLAGS'
2961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2963ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 2964
00020c16 2965
bf3b7cd3 2966
bf3b7cd3 2967
00020c16 2968
bf3b7cd3 2969
5213506e 2970ac_config_headers="$ac_config_headers auto-host.h:config.in"
bf3b7cd3 2971
bf3b7cd3 2972
5213506e 2973gcc_version=`cat $srcdir/BASE-VER`
bf3b7cd3 2974
5213506e
RW
2975# Determine the host, build, and target systems
2976ac_aux_dir=
2977for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2978 for ac_t in install-sh install.sh shtool; do
2979 if test -f "$ac_dir/$ac_t"; then
2980 ac_aux_dir=$ac_dir
2981 ac_install_sh="$ac_aux_dir/$ac_t -c"
2982 break 2
2983 fi
2984 done
2985done
2986if test -z "$ac_aux_dir"; then
2987 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
00020c16 2988fi
5213506e
RW
2989
2990# These three variables are undocumented and unsupported,
2991# and are intended to be withdrawn in a future Autoconf release.
2992# They can cause serious problems if a builder's source tree is in a directory
2993# whose full name contains unusual characters.
2994ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2995ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2996ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2997
2998
2999# Make sure we can run config.sub.
3000$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3001 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3002
3003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3004$as_echo_n "checking build system type... " >&6; }
3005if test "${ac_cv_build+set}" = set; then :
3006 $as_echo_n "(cached) " >&6
3007else
3008 ac_build_alias=$build_alias
3009test "x$ac_build_alias" = x &&
3010 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3011test "x$ac_build_alias" = x &&
3012 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3013ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3014 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3015
3016fi
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3018$as_echo "$ac_cv_build" >&6; }
3019case $ac_cv_build in
3020*-*-*) ;;
3021*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3022esac
3023build=$ac_cv_build
3024ac_save_IFS=$IFS; IFS='-'
3025set x $ac_cv_build
3026shift
3027build_cpu=$1
3028build_vendor=$2
3029shift; shift
3030# Remember, the first character of IFS is used to create $*,
3031# except with old shells:
3032build_os=$*
3033IFS=$ac_save_IFS
3034case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3035
3036
3037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3038$as_echo_n "checking host system type... " >&6; }
3039if test "${ac_cv_host+set}" = set; then :
3040 $as_echo_n "(cached) " >&6
3041else
3042 if test "x$host_alias" = x; then
3043 ac_cv_host=$ac_cv_build
3044else
3045 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3046 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
00020c16 3047fi
5213506e 3048
00020c16 3049fi
5213506e
RW
3050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3051$as_echo "$ac_cv_host" >&6; }
3052case $ac_cv_host in
3053*-*-*) ;;
3054*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3055esac
3056host=$ac_cv_host
3057ac_save_IFS=$IFS; IFS='-'
3058set x $ac_cv_host
3059shift
3060host_cpu=$1
3061host_vendor=$2
3062shift; shift
3063# Remember, the first character of IFS is used to create $*,
3064# except with old shells:
3065host_os=$*
3066IFS=$ac_save_IFS
3067case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
00020c16 3068
bf3b7cd3 3069
5213506e
RW
3070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3071$as_echo_n "checking target system type... " >&6; }
3072if test "${ac_cv_target+set}" = set; then :
3073 $as_echo_n "(cached) " >&6
3074else
3075 if test "x$target_alias" = x; then
3076 ac_cv_target=$ac_cv_host
3077else
3078 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3079 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
bf3b7cd3
JD
3080fi
3081
5213506e
RW
3082fi
3083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3084$as_echo "$ac_cv_target" >&6; }
3085case $ac_cv_target in
3086*-*-*) ;;
3087*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
3088esac
3089target=$ac_cv_target
3090ac_save_IFS=$IFS; IFS='-'
3091set x $ac_cv_target
3092shift
3093target_cpu=$1
3094target_vendor=$2
3095shift; shift
3096# Remember, the first character of IFS is used to create $*,
3097# except with old shells:
3098target_os=$*
3099IFS=$ac_save_IFS
3100case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
60d26958 3101
bf3b7cd3 3102
5213506e
RW
3103# The aliases save the names the user supplied, while $host etc.
3104# will get canonicalized.
3105test -n "$target_alias" &&
3106 test "$program_prefix$program_suffix$program_transform_name" = \
3107 NONENONEs,x,x, &&
3108 program_prefix=${target_alias}-
bf3b7cd3 3109
5213506e
RW
3110# Determine the noncanonical target name, for directory use.
3111 case ${build_alias} in
3112 "") build_noncanonical=${build} ;;
3113 *) build_noncanonical=${build_alias} ;;
3114esac
00020c16 3115
5213506e
RW
3116 case ${host_alias} in
3117 "") host_noncanonical=${build_noncanonical} ;;
3118 *) host_noncanonical=${host_alias} ;;
3119esac
00020c16 3120
5213506e
RW
3121 case ${target_alias} in
3122 "") target_noncanonical=${host_noncanonical} ;;
3123 *) target_noncanonical=${target_alias} ;;
3124esac
00020c16
ILT
3125
3126
3127
3128
5213506e 3129# Determine the target- and build-specific subdirectories
00020c16 3130
5213506e
RW
3131# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
3132# have matching libraries, they should use host libraries: Makefile.tpl
3133# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
3134# However, they still use the build modules, because the corresponding
3135# host modules (e.g. bison) are only built for the host when bootstrap
3136# finishes. So:
3137# - build_subdir is where we find build modules, and never changes.
3138# - build_libsubdir is where we find build libraries, and can be overridden.
bf3b7cd3 3139
5213506e
RW
3140# Prefix 'build-' so this never conflicts with target_subdir.
3141build_subdir="build-${build_noncanonical}"
3142
3143# Check whether --with-build-libsubdir was given.
3144if test "${with_build_libsubdir+set}" = set; then :
3145 withval=$with_build_libsubdir; build_libsubdir="$withval"
3146else
3147 build_libsubdir="$build_subdir"
bf3b7cd3 3148fi
bf3b7cd3 3149
5213506e
RW
3150# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
3151if ( test $srcdir = . && test -d gcc ) \
3152 || test -d $srcdir/../host-${host_noncanonical}; then
3153 host_subdir="host-${host_noncanonical}"
3154else
3155 host_subdir=.
00020c16 3156fi
5213506e
RW
3157# No prefix.
3158target_subdir=${target_noncanonical}
00020c16 3159
00020c16 3160
5213506e
RW
3161# Set program_transform_name
3162test "$program_prefix" != NONE &&
3163 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3164# Use a double $ so make ignores it.
3165test "$program_suffix" != NONE &&
3166 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3167# Double any \ or $.
3168# By default was `s,x,x', remove it if useless.
3169ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3170program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
00020c16
ILT
3171
3172
5213506e
RW
3173# Check for bogus environment variables.
3174# Test if LIBRARY_PATH contains the notation for the current directory
3175# since this would lead to problems installing/building glibc.
3176# LIBRARY_PATH contains the current directory if one of the following
3177# is true:
3178# - one of the terminals (":" and ";") is the first or last sign
3179# - two terminals occur directly after each other
3180# - the path contains an element with a dot in it
3181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5
3182$as_echo_n "checking LIBRARY_PATH variable... " >&6; }
3183case ${LIBRARY_PATH} in
3184 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3185 library_path_setting="contains current directory"
3186 ;;
3187 *)
3188 library_path_setting="ok"
3189 ;;
3190esac
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5
3192$as_echo "$library_path_setting" >&6; }
3193if test "$library_path_setting" != "ok"; then
3194as_fn_error "
3195*** LIBRARY_PATH shouldn't contain the current directory when
3196*** building gcc. Please change the environment variable
3197*** and run configure again." "$LINENO" 5
00020c16 3198fi
00020c16 3199
5213506e
RW
3200# Test if GCC_EXEC_PREFIX contains the notation for the current directory
3201# since this would lead to problems installing/building glibc.
3202# GCC_EXEC_PREFIX contains the current directory if one of the following
3203# is true:
3204# - one of the terminals (":" and ";") is the first or last sign
3205# - two terminals occur directly after each other
3206# - the path contains an element with a dot in it
3207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5
3208$as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; }
3209case ${GCC_EXEC_PREFIX} in
3210 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3211 gcc_exec_prefix_setting="contains current directory"
3212 ;;
3213 *)
3214 gcc_exec_prefix_setting="ok"
3215 ;;
3216esac
3217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5
3218$as_echo "$gcc_exec_prefix_setting" >&6; }
3219if test "$gcc_exec_prefix_setting" != "ok"; then
3220as_fn_error "
3221*** GCC_EXEC_PREFIX shouldn't contain the current directory when
3222*** building gcc. Please change the environment variable
3223*** and run configure again." "$LINENO" 5
00020c16 3224fi
00020c16 3225
5213506e
RW
3226# -----------
3227# Directories
3228# -----------
3229
3230# Specify the local prefix
3231local_prefix=
3232
3233# Check whether --with-local-prefix was given.
3234if test "${with_local_prefix+set}" = set; then :
3235 withval=$with_local_prefix; case "${withval}" in
3236yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;;
3237no) ;;
3238*) local_prefix=$with_local_prefix ;;
3239esac
00020c16 3240fi
bf3b7cd3 3241
5213506e
RW
3242
3243# Default local prefix if it is empty
3244if test x$local_prefix = x; then
3245 local_prefix=/usr/local
bf3b7cd3 3246fi
00020c16 3247
5213506e
RW
3248# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
3249# passed in by the toplevel make and thus we'd get different behavior
3250# depending on where we built the sources.
3251gcc_gxx_include_dir=
3252# Specify the g++ header file directory
3253
3254# Check whether --with-gxx-include-dir was given.
3255if test "${with_gxx_include_dir+set}" = set; then :
3256 withval=$with_gxx_include_dir; case "${withval}" in
3257yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;;
3258no) ;;
3259*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
00020c16 3260esac
00020c16 3261fi
bf3b7cd3 3262
5213506e
RW
3263
3264# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
3265if test x${gcc_gxx_include_dir} = x; then
3266 if test x${enable_version_specific_runtime_libs} = xyes; then
3267 gcc_gxx_include_dir='${libsubdir}/include/c++'
3268 else
3269 libstdcxx_incdir='include/c++/$(version)'
3270 if test x$host != x$target; then
3271 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
3272 fi
3273 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
3274 fi
00020c16
ILT
3275fi
3276
3277
5213506e
RW
3278# Check whether --with-cpp_install_dir was given.
3279if test "${with_cpp_install_dir+set}" = set; then :
3280 withval=$with_cpp_install_dir; if test x$withval = xyes; then
3281 as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5
3282elif test x$withval != xno; then
3283 cpp_install_dir=$withval
3284fi
3285fi
00020c16 3286
00020c16 3287
5213506e
RW
3288# We would like to our source tree to be readonly. However when releases or
3289# pre-releases are generated, the flex/bison generated files as well as the
3290# various formats of manuals need to be included along with the rest of the
3291# sources. Therefore we have --enable-generated-files-in-srcdir to do
3292# just that.
00020c16 3293
5213506e
RW
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5
3295$as_echo_n "checking whether to place generated files in the source directory... " >&6; }
3296 # Check whether --enable-generated-files-in-srcdir was given.
3297if test "${enable_generated_files_in_srcdir+set}" = set; then :
3298 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
3299else
3300 generated_files_in_srcdir=no
3301fi
00020c16
ILT
3302
3303
5213506e
RW
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5
3305$as_echo "$generated_files_in_srcdir" >&6; }
00020c16 3306
5213506e
RW
3307if test "$generated_files_in_srcdir" = "yes"; then
3308 GENINSRC=''
3309else
3310 GENINSRC='#'
3311fi
00020c16
ILT
3312
3313
5213506e
RW
3314# -------------------
3315# Find default linker
3316# -------------------
3317
3318# With GNU ld
00020c16 3319
5213506e
RW
3320# Check whether --with-gnu-ld was given.
3321if test "${with_gnu_ld+set}" = set; then :
3322 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
00020c16 3323else
5213506e
RW
3324 gnu_ld_flag=no
3325fi
00020c16 3326
bf3b7cd3 3327
5213506e 3328# With pre-defined ld
00020c16 3329
5213506e
RW
3330# Check whether --with-ld was given.
3331if test "${with_ld+set}" = set; then :
3332 withval=$with_ld; DEFAULT_LINKER="$with_ld"
00020c16 3333fi
00020c16 3334
5213506e
RW
3335if test x"${DEFAULT_LINKER+set}" = x"set"; then
3336 if test ! -x "$DEFAULT_LINKER"; then
3337 as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
3338 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3339 gnu_ld_flag=yes
3340 fi
3341
3342cat >>confdefs.h <<_ACEOF
3343#define DEFAULT_LINKER "$DEFAULT_LINKER"
00020c16
ILT
3344_ACEOF
3345
5213506e 3346fi
00020c16 3347
5213506e 3348gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
00020c16 3349
5213506e
RW
3350cat >>confdefs.h <<_ACEOF
3351#define HAVE_GNU_LD $gnu_ld
00020c16
ILT
3352_ACEOF
3353
3354
5213506e
RW
3355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5
3356$as_echo_n "checking whether a default linker was specified... " >&6; }
3357if test x"${DEFAULT_LINKER+set}" = x"set"; then
3358 if test x"$gnu_ld_flag" = x"no"; then
3359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5
3360$as_echo "yes ($DEFAULT_LINKER)" >&6; }
00020c16 3361 else
5213506e
RW
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
3363$as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; }
00020c16 3364 fi
bf3b7cd3 3365else
5213506e
RW
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3367$as_echo "no" >&6; }
bf3b7cd3 3368fi
bf3b7cd3 3369
5213506e 3370# With demangler in GNU ld
00020c16 3371
5213506e
RW
3372# Check whether --with-demangler-in-ld was given.
3373if test "${with_demangler_in_ld+set}" = set; then :
3374 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
00020c16 3375else
5213506e 3376 demangler_in_ld=no
00020c16 3377fi
bf3b7cd3 3378
00020c16 3379
5213506e
RW
3380# ----------------------
3381# Find default assembler
3382# ----------------------
00020c16 3383
5213506e 3384# With GNU as
00020c16 3385
5213506e
RW
3386# Check whether --with-gnu-as was given.
3387if test "${with_gnu_as+set}" = set; then :
3388 withval=$with_gnu_as; gas_flag="$with_gnu_as"
00020c16 3389else
5213506e 3390 gas_flag=no
00020c16 3391fi
00020c16 3392
5213506e
RW
3393
3394
3395# Check whether --with-as was given.
3396if test "${with_as+set}" = set; then :
3397 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
00020c16 3398fi
00020c16 3399
5213506e
RW
3400if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3401 if test ! -x "$DEFAULT_ASSEMBLER"; then
3402 as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
3403 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3404 gas_flag=yes
3405 fi
3406
3407cat >>confdefs.h <<_ACEOF
3408#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
00020c16 3409_ACEOF
5213506e
RW
3410
3411fi
3412
3413gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
3414
3415cat >>confdefs.h <<_ACEOF
3416#define HAVE_GNU_AS $gnu_as
00020c16 3417_ACEOF
5213506e
RW
3418
3419
3420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
3421$as_echo_n "checking whether a default assembler was specified... " >&6; }
3422if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3423 if test x"$gas_flag" = x"no"; then
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5
3425$as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; }
00020c16 3426 else
5213506e
RW
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
3428$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
00020c16 3429 fi
bf3b7cd3 3430else
5213506e
RW
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3432$as_echo "no" >&6; }
00020c16 3433fi
bf3b7cd3 3434
5213506e
RW
3435# ---------------
3436# Find C compiler
3437# ---------------
00020c16 3438
5213506e
RW
3439# If a non-executable a.out is present (e.g. created by GNU as above even if
3440# invoked with -v only), the IRIX 6 native ld just overwrites the existing
3441# file, even when creating an executable, so an execution test fails.
3442# Remove possible default executable files to avoid this.
3443#
3444# FIXME: This really belongs into AC_PROG_CC and can be removed once
3445# Autoconf includes it.
3446rm -f a.out a.exe b.out
bf3b7cd3 3447
5213506e 3448# Find the native compiler
00020c16
ILT
3449ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
5213506e
RW
3454if test -n "$ac_tool_prefix"; then
3455 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3456set dummy ${ac_tool_prefix}gcc; ac_word=$2
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3458$as_echo_n "checking for $ac_word... " >&6; }
3459if test "${ac_cv_prog_CC+set}" = set; then :
3460 $as_echo_n "(cached) " >&6
bf3b7cd3 3461else
5213506e
RW
3462 if test -n "$CC"; then
3463 ac_cv_prog_CC="$CC" # Let the user override the test.
3464else
3465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3466for as_dir in $PATH
3467do
3468 IFS=$as_save_IFS
3469 test -z "$as_dir" && as_dir=.
3470 for ac_exec_ext in '' $ac_executable_extensions; do
3471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3472 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3474 break 2
3475 fi
3476done
3477 done
3478IFS=$as_save_IFS
00020c16 3479
5213506e
RW
3480fi
3481fi
3482CC=$ac_cv_prog_CC
3483if test -n "$CC"; then
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3485$as_echo "$CC" >&6; }
bf3b7cd3 3486else
5213506e
RW
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3488$as_echo "no" >&6; }
3489fi
3490
bf3b7cd3 3491
bf3b7cd3 3492fi
5213506e
RW
3493if test -z "$ac_cv_prog_CC"; then
3494 ac_ct_CC=$CC
3495 # Extract the first word of "gcc", so it can be a program name with args.
3496set dummy gcc; ac_word=$2
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3498$as_echo_n "checking for $ac_word... " >&6; }
3499if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3500 $as_echo_n "(cached) " >&6
3501else
3502 if test -n "$ac_ct_CC"; then
3503 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3504else
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3512 ac_cv_prog_ac_ct_CC="gcc"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3515 fi
00020c16 3516done
5213506e
RW
3517 done
3518IFS=$as_save_IFS
00020c16 3519
bf3b7cd3 3520fi
5213506e
RW
3521fi
3522ac_ct_CC=$ac_cv_prog_ac_ct_CC
3523if test -n "$ac_ct_CC"; then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3525$as_echo "$ac_ct_CC" >&6; }
3526else
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3528$as_echo "no" >&6; }
3529fi
00020c16 3530
5213506e
RW
3531 if test "x$ac_ct_CC" = x; then
3532 CC=""
3533 else
3534 case $cross_compiling:$ac_tool_warned in
3535yes:)
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3538ac_tool_warned=yes ;;
3539esac
3540 CC=$ac_ct_CC
3541 fi
3542else
3543 CC="$ac_cv_prog_CC"
3544fi
00020c16 3545
5213506e
RW
3546if test -z "$CC"; then
3547 if test -n "$ac_tool_prefix"; then
3548 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3549set dummy ${ac_tool_prefix}cc; ac_word=$2
3550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3551$as_echo_n "checking for $ac_word... " >&6; }
3552if test "${ac_cv_prog_CC+set}" = set; then :
3553 $as_echo_n "(cached) " >&6
bf3b7cd3 3554else
5213506e
RW
3555 if test -n "$CC"; then
3556 ac_cv_prog_CC="$CC" # Let the user override the test.
00020c16 3557else
5213506e
RW
3558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3559for as_dir in $PATH
3560do
3561 IFS=$as_save_IFS
3562 test -z "$as_dir" && as_dir=.
3563 for ac_exec_ext in '' $ac_executable_extensions; do
3564 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3565 ac_cv_prog_CC="${ac_tool_prefix}cc"
3566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3567 break 2
3568 fi
3569done
3570 done
3571IFS=$as_save_IFS
00020c16 3572
00020c16 3573fi
00020c16 3574fi
5213506e
RW
3575CC=$ac_cv_prog_CC
3576if test -n "$CC"; then
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3578$as_echo "$CC" >&6; }
00020c16 3579else
5213506e
RW
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3581$as_echo "no" >&6; }
3582fi
bf3b7cd3 3583
bf3b7cd3 3584
5213506e
RW
3585 fi
3586fi
3587if test -z "$CC"; then
3588 # Extract the first word of "cc", so it can be a program name with args.
3589set dummy cc; ac_word=$2
3590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591$as_echo_n "checking for $ac_word... " >&6; }
3592if test "${ac_cv_prog_CC+set}" = set; then :
3593 $as_echo_n "(cached) " >&6
bf3b7cd3 3594else
5213506e
RW
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
3598 ac_prog_rejected=no
3599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
3604 for ac_exec_ext in '' $ac_executable_extensions; do
3605 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3606 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3607 ac_prog_rejected=yes
3608 continue
3609 fi
3610 ac_cv_prog_CC="cc"
3611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3612 break 2
3613 fi
3614done
3615 done
3616IFS=$as_save_IFS
bf3b7cd3 3617
5213506e
RW
3618if test $ac_prog_rejected = yes; then
3619 # We found a bogon in the path, so make sure we never use it.
3620 set dummy $ac_cv_prog_CC
3621 shift
3622 if test $# != 0; then
3623 # We chose a different compiler from the bogus one.
3624 # However, it has the same basename, so the bogon will be chosen
3625 # first if we set CC to just the basename; use the full file name.
3626 shift
3627 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3628 fi
bf3b7cd3 3629fi
5213506e
RW
3630fi
3631fi
3632CC=$ac_cv_prog_CC
3633if test -n "$CC"; then
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3635$as_echo "$CC" >&6; }
bf3b7cd3 3636else
5213506e
RW
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638$as_echo "no" >&6; }
3639fi
bf3b7cd3 3640
bf3b7cd3 3641
5213506e
RW
3642fi
3643if test -z "$CC"; then
3644 if test -n "$ac_tool_prefix"; then
3645 for ac_prog in cl.exe
3646 do
3647 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3650$as_echo_n "checking for $ac_word... " >&6; }
3651if test "${ac_cv_prog_CC+set}" = set; then :
3652 $as_echo_n "(cached) " >&6
bf3b7cd3 3653else
5213506e
RW
3654 if test -n "$CC"; then
3655 ac_cv_prog_CC="$CC" # Let the user override the test.
3656else
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
3663 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3664 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668done
3669 done
3670IFS=$as_save_IFS
bf3b7cd3 3671
bf3b7cd3 3672fi
5213506e
RW
3673fi
3674CC=$ac_cv_prog_CC
3675if test -n "$CC"; then
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3677$as_echo "$CC" >&6; }
3678else
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3680$as_echo "no" >&6; }
3681fi
3682
3683
3684 test -n "$CC" && break
bf3b7cd3 3685 done
5213506e
RW
3686fi
3687if test -z "$CC"; then
3688 ac_ct_CC=$CC
3689 for ac_prog in cl.exe
3690do
3691 # Extract the first word of "$ac_prog", so it can be a program name with args.
3692set dummy $ac_prog; ac_word=$2
3693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
3695if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3696 $as_echo_n "(cached) " >&6
bf3b7cd3 3697else
5213506e
RW
3698 if test -n "$ac_ct_CC"; then
3699 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3700else
3701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
3706 for ac_exec_ext in '' $ac_executable_extensions; do
3707 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3708 ac_cv_prog_ac_ct_CC="$ac_prog"
3709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3710 break 2
3711 fi
3712done
3713 done
3714IFS=$as_save_IFS
bf3b7cd3 3715
bf3b7cd3 3716fi
bf3b7cd3 3717fi
5213506e
RW
3718ac_ct_CC=$ac_cv_prog_ac_ct_CC
3719if test -n "$ac_ct_CC"; then
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3721$as_echo "$ac_ct_CC" >&6; }
bf3b7cd3 3722else
5213506e
RW
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
3725fi
3726
3727
3728 test -n "$ac_ct_CC" && break
3729done
3730
3731 if test "x$ac_ct_CC" = x; then
3732 CC=""
3733 else
3734 case $cross_compiling:$ac_tool_warned in
3735yes:)
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3738ac_tool_warned=yes ;;
3739esac
3740 CC=$ac_ct_CC
3741 fi
3742fi
bf3b7cd3 3743
bf3b7cd3 3744fi
5213506e
RW
3745
3746
3747test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3749as_fn_error "no acceptable C compiler found in \$PATH
3750See \`config.log' for more details." "$LINENO" 5; }
3751
3752# Provide some information about the compiler.
3753$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3754set X $ac_compile
3755ac_compiler=$2
3756for ac_option in --version -v -V -qversion; do
3757 { { ac_try="$ac_compiler $ac_option >&5"
3758case "(($ac_try" in
3759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3760 *) ac_try_echo=$ac_try;;
bf3b7cd3 3761esac
5213506e
RW
3762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3763$as_echo "$ac_try_echo"; } >&5
3764 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3765 ac_status=$?
3766 if test -s conftest.err; then
3767 sed '10a\
3768... rest of stderr output deleted ...
3769 10q' conftest.err >conftest.er1
3770 cat conftest.er1 >&5
3771 rm -f conftest.er1 conftest.err
3772 fi
3773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3774 test $ac_status = 0; }
3775done
3776
3777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3778/* end confdefs.h. */
5213506e 3779
bf3b7cd3
JD
3780int
3781main ()
3782{
3783
bf3b7cd3
JD
3784 ;
3785 return 0;
3786}
3787_ACEOF
5213506e
RW
3788ac_clean_files_save=$ac_clean_files
3789ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3790# Try to create an executable without -o first, disregard a.out.
3791# It will help us diagnose broken compilers, and finding out an intuition
3792# of exeext.
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3794$as_echo_n "checking for C compiler default output file name... " >&6; }
3795ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3796
3797# The possible output files:
3798ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3799
3800ac_rmfiles=
3801for ac_file in $ac_files
3802do
3803 case $ac_file in
3804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3805 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3806 esac
3807done
3808rm -f $ac_rmfiles
3809
3810if { { ac_try="$ac_link_default"
3811case "(($ac_try" in
3812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3813 *) ac_try_echo=$ac_try;;
3814esac
3815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3816$as_echo "$ac_try_echo"; } >&5
3817 (eval "$ac_link_default") 2>&5
3818 ac_status=$?
3819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3820 test $ac_status = 0; }; then :
3821 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3822# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3823# in a Makefile. We should not override ac_cv_exeext if it was cached,
3824# so that the user can short-circuit this test for compilers unknown to
3825# Autoconf.
3826for ac_file in $ac_files ''
3827do
3828 test -f "$ac_file" || continue
3829 case $ac_file in
3830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3831 ;;
3832 [ab].out )
3833 # We found the default executable, but exeext='' is most
3834 # certainly right.
3835 break;;
3836 *.* )
3837 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3838 then :; else
3839 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3840 fi
3841 # We set ac_cv_exeext here because the later test for it is not
3842 # safe: cross compilers may not add the suffix if given an `-o'
3843 # argument, so we may need to know it at that point already.
3844 # Even if this section looks crufty: it has the advantage of
3845 # actually working.
3846 break;;
3847 * )
3848 break;;
3849 esac
3850done
3851test "$ac_cv_exeext" = no && ac_cv_exeext=
3852
bf3b7cd3 3853else
5213506e
RW
3854 ac_file=''
3855fi
3856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3857$as_echo "$ac_file" >&6; }
3858if test -z "$ac_file"; then :
3859 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3860sed 's/^/| /' conftest.$ac_ext >&5
3861
5213506e
RW
3862{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3864{ as_fn_set_status 77
3865as_fn_error "C compiler cannot create executables
3866See \`config.log' for more details." "$LINENO" 5; }; }
bf3b7cd3 3867fi
5213506e
RW
3868ac_exeext=$ac_cv_exeext
3869
3870# Check that the compiler produces executables we can run. If not, either
3871# the compiler is broken, or we cross compile.
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3873$as_echo_n "checking whether the C compiler works... " >&6; }
3874# If not cross compiling, check that we can run a simple program.
3875if test "$cross_compiling" != yes; then
3876 if { ac_try='./$ac_file'
3877 { { case "(($ac_try" in
3878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3879 *) ac_try_echo=$ac_try;;
3880esac
3881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3882$as_echo "$ac_try_echo"; } >&5
3883 (eval "$ac_try") 2>&5
3884 ac_status=$?
3885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3886 test $ac_status = 0; }; }; then
3887 cross_compiling=no
3888 else
3889 if test "$cross_compiling" = maybe; then
3890 cross_compiling=yes
3891 else
3892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3894as_fn_error "cannot run C compiled programs.
3895If you meant to cross compile, use \`--host'.
3896See \`config.log' for more details." "$LINENO" 5; }
3897 fi
3898 fi
bf3b7cd3 3899fi
5213506e
RW
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3901$as_echo "yes" >&6; }
3902
3903rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3904ac_clean_files=$ac_clean_files_save
3905# Check that the compiler produces executables we can run. If not, either
3906# the compiler is broken, or we cross compile.
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3908$as_echo_n "checking whether we are cross compiling... " >&6; }
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3910$as_echo "$cross_compiling" >&6; }
3911
3912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3913$as_echo_n "checking for suffix of executables... " >&6; }
3914if { { ac_try="$ac_link"
3915case "(($ac_try" in
3916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3917 *) ac_try_echo=$ac_try;;
3918esac
3919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3920$as_echo "$ac_try_echo"; } >&5
3921 (eval "$ac_link") 2>&5
3922 ac_status=$?
3923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3924 test $ac_status = 0; }; then :
3925 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3926# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3927# work properly (i.e., refer to `conftest.exe'), while it won't with
3928# `rm'.
3929for ac_file in conftest.exe conftest conftest.*; do
3930 test -f "$ac_file" || continue
3931 case $ac_file in
3932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3933 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3934 break;;
3935 * ) break;;
3936 esac
3937done
b61ff9c8 3938else
5213506e
RW
3939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3941as_fn_error "cannot compute suffix of executables: cannot compile and link
3942See \`config.log' for more details." "$LINENO" 5; }
b61ff9c8 3943fi
5213506e
RW
3944rm -f conftest$ac_cv_exeext
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3946$as_echo "$ac_cv_exeext" >&6; }
bf3b7cd3 3947
5213506e
RW
3948rm -f conftest.$ac_ext
3949EXEEXT=$ac_cv_exeext
3950ac_exeext=$EXEEXT
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3952$as_echo_n "checking for suffix of object files... " >&6; }
3953if test "${ac_cv_objext+set}" = set; then :
3954 $as_echo_n "(cached) " >&6
bf3b7cd3 3955else
5213506e 3956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3957/* end confdefs.h. */
5213506e 3958
bf3b7cd3
JD
3959int
3960main ()
3961{
5213506e 3962
bf3b7cd3
JD
3963 ;
3964 return 0;
3965}
3966_ACEOF
5213506e
RW
3967rm -f conftest.o conftest.obj
3968if { { ac_try="$ac_compile"
3969case "(($ac_try" in
3970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971 *) ac_try_echo=$ac_try;;
3972esac
3973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3974$as_echo "$ac_try_echo"; } >&5
3975 (eval "$ac_compile") 2>&5
3976 ac_status=$?
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }; then :
3979 for ac_file in conftest.o conftest.obj conftest.*; do
3980 test -f "$ac_file" || continue;
3981 case $ac_file in
3982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3983 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3984 break;;
3985 esac
3986done
bf3b7cd3 3987else
5213506e 3988 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3989sed 's/^/| /' conftest.$ac_ext >&5
3990
5213506e
RW
3991{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3993as_fn_error "cannot compute suffix of object files: cannot compile
3994See \`config.log' for more details." "$LINENO" 5; }
bf3b7cd3 3995fi
5213506e 3996rm -f conftest.$ac_cv_objext conftest.$ac_ext
bf3b7cd3 3997fi
5213506e
RW
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3999$as_echo "$ac_cv_objext" >&6; }
4000OBJEXT=$ac_cv_objext
4001ac_objext=$OBJEXT
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4003$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4004if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4005 $as_echo_n "(cached) " >&6
bf3b7cd3 4006else
5213506e 4007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4008/* end confdefs.h. */
5213506e 4009
bf3b7cd3
JD
4010int
4011main ()
4012{
5213506e
RW
4013#ifndef __GNUC__
4014 choke me
4015#endif
bf3b7cd3
JD
4016
4017 ;
4018 return 0;
4019}
4020_ACEOF
5213506e
RW
4021if ac_fn_c_try_compile "$LINENO"; then :
4022 ac_compiler_gnu=yes
4023else
4024 ac_compiler_gnu=no
4025fi
4026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4027ac_cv_c_compiler_gnu=$ac_compiler_gnu
4028
4029fi
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4031$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4032if test $ac_compiler_gnu = yes; then
4033 GCC=yes
4034else
4035 GCC=
4036fi
4037ac_test_CFLAGS=${CFLAGS+set}
4038ac_save_CFLAGS=$CFLAGS
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4040$as_echo_n "checking whether $CC accepts -g... " >&6; }
4041if test "${ac_cv_prog_cc_g+set}" = set; then :
4042 $as_echo_n "(cached) " >&6
4043else
4044 ac_save_c_werror_flag=$ac_c_werror_flag
4045 ac_c_werror_flag=yes
4046 ac_cv_prog_cc_g=no
4047 CFLAGS="-g"
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4049/* end confdefs.h. */
5213506e 4050
bf3b7cd3
JD
4051int
4052main ()
4053{
bf3b7cd3
JD
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
5213506e
RW
4059if ac_fn_c_try_compile "$LINENO"; then :
4060 ac_cv_prog_cc_g=yes
bf3b7cd3 4061else
5213506e
RW
4062 CFLAGS=""
4063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4064/* end confdefs.h. */
5213506e 4065
bf3b7cd3
JD
4066int
4067main ()
4068{
bf3b7cd3
JD
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
5213506e
RW
4074if ac_fn_c_try_compile "$LINENO"; then :
4075
4076else
4077 ac_c_werror_flag=$ac_save_c_werror_flag
4078 CFLAGS="-g"
4079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4080/* end confdefs.h. */
5213506e 4081
bf3b7cd3
JD
4082int
4083main ()
4084{
bf3b7cd3
JD
4085
4086 ;
4087 return 0;
4088}
4089_ACEOF
5213506e
RW
4090if ac_fn_c_try_compile "$LINENO"; then :
4091 ac_cv_prog_cc_g=yes
bf3b7cd3 4092fi
5213506e 4093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4094fi
5213506e 4095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4096fi
5213506e
RW
4097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4098 ac_c_werror_flag=$ac_save_c_werror_flag
4099fi
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4101$as_echo "$ac_cv_prog_cc_g" >&6; }
4102if test "$ac_test_CFLAGS" = set; then
4103 CFLAGS=$ac_save_CFLAGS
4104elif test $ac_cv_prog_cc_g = yes; then
4105 if test "$GCC" = yes; then
4106 CFLAGS="-g -O2"
4107 else
4108 CFLAGS="-g"
4109 fi
4110else
4111 if test "$GCC" = yes; then
4112 CFLAGS="-O2"
4113 else
4114 CFLAGS=
4115 fi
4116fi
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4118$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4119if test "${ac_cv_prog_cc_c89+set}" = set; then :
4120 $as_echo_n "(cached) " >&6
4121else
4122 ac_cv_prog_cc_c89=no
4123ac_save_CC=$CC
4124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4125/* end confdefs.h. */
5213506e
RW
4126#include <stdarg.h>
4127#include <stdio.h>
4128#include <sys/types.h>
4129#include <sys/stat.h>
4130/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4131struct buf { int x; };
4132FILE * (*rcsopen) (struct buf *, struct stat *, int);
4133static char *e (p, i)
4134 char **p;
4135 int i;
4136{
4137 return p[i];
4138}
4139static char *f (char * (*g) (char **, int), char **p, ...)
4140{
4141 char *s;
4142 va_list v;
4143 va_start (v,p);
4144 s = g (p, va_arg (v,int));
4145 va_end (v);
4146 return s;
4147}
4148
4149/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4150 function prototypes and stuff, but not '\xHH' hex character constants.
4151 These don't provoke an error unfortunately, instead are silently treated
4152 as 'x'. The following induces an error, until -std is added to get
4153 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4154 array size at least. It's necessary to write '\x00'==0 to get something
4155 that's true only with -std. */
4156int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4157
4158/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4159 inside strings and character constants. */
4160#define FOO(x) 'x'
4161int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4162
4163int test (int i, double x);
4164struct s1 {int (*f) (int a);};
4165struct s2 {int (*f) (double a);};
4166int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4167int argc;
4168char **argv;
bf3b7cd3
JD
4169int
4170main ()
4171{
5213506e 4172return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bf3b7cd3
JD
4173 ;
4174 return 0;
4175}
4176_ACEOF
5213506e
RW
4177for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4178 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4179do
4180 CC="$ac_save_CC $ac_arg"
4181 if ac_fn_c_try_compile "$LINENO"; then :
4182 ac_cv_prog_cc_c89=$ac_arg
bf3b7cd3 4183fi
5213506e
RW
4184rm -f core conftest.err conftest.$ac_objext
4185 test "x$ac_cv_prog_cc_c89" != "xno" && break
bf3b7cd3 4186done
5213506e
RW
4187rm -f conftest.$ac_ext
4188CC=$ac_save_CC
4189
4190fi
4191# AC_CACHE_VAL
4192case "x$ac_cv_prog_cc_c89" in
4193 x)
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4195$as_echo "none needed" >&6; } ;;
4196 xno)
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4198$as_echo "unsupported" >&6; } ;;
4199 *)
4200 CC="$CC $ac_cv_prog_cc_c89"
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4202$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bf3b7cd3 4203esac
5213506e
RW
4204if test "x$ac_cv_prog_cc_c89" != xno; then :
4205
4206fi
4207
4208ac_ext=c
4209ac_cpp='$CPP $CPPFLAGS'
4210ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4211ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4212ac_compiler_gnu=$ac_cv_c_compiler_gnu
4213
4214if test "x$CC" != xcc; then
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4216$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
b61ff9c8 4217else
5213506e
RW
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4219$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4220fi
4221set dummy $CC; ac_cc=`$as_echo "$2" |
4222 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4223if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4224 $as_echo_n "(cached) " >&6
4225else
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4227/* end confdefs.h. */
5213506e 4228
bf3b7cd3
JD
4229int
4230main ()
4231{
4232
bf3b7cd3
JD
4233 ;
4234 return 0;
4235}
4236_ACEOF
5213506e
RW
4237# Make sure it works both with $CC and with simple cc.
4238# We do the test twice because some compilers refuse to overwrite an
4239# existing .o file with -o, though they will create one.
4240ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4241rm -f conftest2.*
4242if { { case "(($ac_try" in
4243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4244 *) ac_try_echo=$ac_try;;
4245esac
4246eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4247$as_echo "$ac_try_echo"; } >&5
4248 (eval "$ac_try") 2>&5
4249 ac_status=$?
4250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4251 test $ac_status = 0; } &&
4252 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4254 *) ac_try_echo=$ac_try;;
4255esac
4256eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4257$as_echo "$ac_try_echo"; } >&5
4258 (eval "$ac_try") 2>&5
bf3b7cd3 4259 ac_status=$?
5213506e
RW
4260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4261 test $ac_status = 0; };
4262then
4263 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4264 if test "x$CC" != xcc; then
4265 # Test first that cc exists at all.
4266 if { ac_try='cc -c conftest.$ac_ext >&5'
4267 { { case "(($ac_try" in
4268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4269 *) ac_try_echo=$ac_try;;
4270esac
4271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4272$as_echo "$ac_try_echo"; } >&5
4273 (eval "$ac_try") 2>&5
4274 ac_status=$?
4275 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4276 test $ac_status = 0; }; }; then
4277 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4278 rm -f conftest2.*
4279 if { { case "(($ac_try" in
4280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4281 *) ac_try_echo=$ac_try;;
4282esac
4283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4284$as_echo "$ac_try_echo"; } >&5
4285 (eval "$ac_try") 2>&5
4286 ac_status=$?
4287 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4288 test $ac_status = 0; } &&
4289 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4291 *) ac_try_echo=$ac_try;;
4292esac
4293eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4294$as_echo "$ac_try_echo"; } >&5
4295 (eval "$ac_try") 2>&5
bf3b7cd3 4296 ac_status=$?
5213506e
RW
4297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4298 test $ac_status = 0; };
4299 then
4300 # cc works too.
4301 :
4302 else
4303 # cc exists but doesn't like -o.
4304 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4305 fi
4306 fi
4307 fi
bf3b7cd3 4308else
5213506e
RW
4309 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4310fi
4311rm -f core conftest*
bf3b7cd3 4312
b61ff9c8 4313fi
5213506e
RW
4314if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4316$as_echo "yes" >&6; }
4317else
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4319$as_echo "no" >&6; }
4320
4321$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4322
bf3b7cd3 4323fi
5213506e
RW
4324
4325# expand $ac_aux_dir to an absolute path
4326am_aux_dir=`cd $ac_aux_dir && pwd`
4327
4328# FIXME: we rely on the cache variable name because
4329# there is no other way.
4330set dummy $CC
4331am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4332eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4333if test "$am_t" != yes; then
4334 # Losing compiler, so override with the script.
4335 # FIXME: It is wrong to rewrite CC.
4336 # But if we don't then we get into trouble of one sort or another.
4337 # A longer-term fix would be to have automake use am__CC in this case,
4338 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4339 CC="$am_aux_dir/compile $CC"
bf3b7cd3 4340fi
5213506e
RW
4341
4342
4343ac_ext=cpp
4344ac_cpp='$CXXCPP $CPPFLAGS'
4345ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4346ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4347ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4348if test -z "$CXX"; then
4349 if test -n "$CCC"; then
4350 CXX=$CCC
4351 else
4352 if test -n "$ac_tool_prefix"; then
4353 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4354 do
4355 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4356set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4358$as_echo_n "checking for $ac_word... " >&6; }
4359if test "${ac_cv_prog_CXX+set}" = set; then :
4360 $as_echo_n "(cached) " >&6
b61ff9c8 4361else
5213506e
RW
4362 if test -n "$CXX"; then
4363 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4364else
4365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366for as_dir in $PATH
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
4370 for ac_exec_ext in '' $ac_executable_extensions; do
4371 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4372 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4374 break 2
4375 fi
4376done
4377 done
4378IFS=$as_save_IFS
4379
bf3b7cd3 4380fi
b61ff9c8 4381fi
5213506e
RW
4382CXX=$ac_cv_prog_CXX
4383if test -n "$CXX"; then
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4385$as_echo "$CXX" >&6; }
4386else
4387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
4389fi
bf3b7cd3
JD
4390
4391
5213506e
RW
4392 test -n "$CXX" && break
4393 done
4394fi
4395if test -z "$CXX"; then
4396 ac_ct_CXX=$CXX
4397 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4398do
4399 # Extract the first word of "$ac_prog", so it can be a program name with args.
4400set dummy $ac_prog; ac_word=$2
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4402$as_echo_n "checking for $ac_word... " >&6; }
4403if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
4404 $as_echo_n "(cached) " >&6
bf3b7cd3 4405else
5213506e
RW
4406 if test -n "$ac_ct_CXX"; then
4407 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
bf3b7cd3 4408else
5213506e
RW
4409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4410for as_dir in $PATH
4411do
4412 IFS=$as_save_IFS
4413 test -z "$as_dir" && as_dir=.
4414 for ac_exec_ext in '' $ac_executable_extensions; do
4415 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4416 ac_cv_prog_ac_ct_CXX="$ac_prog"
4417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4418 break 2
4419 fi
4420done
4421 done
4422IFS=$as_save_IFS
bf3b7cd3 4423
bf3b7cd3 4424fi
bf3b7cd3 4425fi
5213506e
RW
4426ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4427if test -n "$ac_ct_CXX"; then
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4429$as_echo "$ac_ct_CXX" >&6; }
bf3b7cd3 4430else
5213506e
RW
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4432$as_echo "no" >&6; }
4433fi
bf3b7cd3 4434
5213506e
RW
4435
4436 test -n "$ac_ct_CXX" && break
4437done
4438
4439 if test "x$ac_ct_CXX" = x; then
4440 CXX="g++"
4441 else
4442 case $cross_compiling:$ac_tool_warned in
4443yes:)
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4445$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4446ac_tool_warned=yes ;;
4447esac
4448 CXX=$ac_ct_CXX
4449 fi
4450fi
4451
4452 fi
4453fi
4454# Provide some information about the compiler.
4455$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4456set X $ac_compile
4457ac_compiler=$2
4458for ac_option in --version -v -V -qversion; do
4459 { { ac_try="$ac_compiler $ac_option >&5"
4460case "(($ac_try" in
4461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4462 *) ac_try_echo=$ac_try;;
4463esac
4464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4465$as_echo "$ac_try_echo"; } >&5
4466 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
b61ff9c8 4467 ac_status=$?
5213506e
RW
4468 if test -s conftest.err; then
4469 sed '10a\
4470... rest of stderr output deleted ...
4471 10q' conftest.err >conftest.er1
4472 cat conftest.er1 >&5
4473 rm -f conftest.er1 conftest.err
4474 fi
4475 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4476 test $ac_status = 0; }
4477done
4478
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4480$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4481if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
4482 $as_echo_n "(cached) " >&6
4483else
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4485/* end confdefs.h. */
5213506e 4486
bf3b7cd3
JD
4487int
4488main ()
4489{
5213506e
RW
4490#ifndef __GNUC__
4491 choke me
4492#endif
bf3b7cd3
JD
4493
4494 ;
4495 return 0;
4496}
4497_ACEOF
5213506e
RW
4498if ac_fn_cxx_try_compile "$LINENO"; then :
4499 ac_compiler_gnu=yes
bf3b7cd3 4500else
5213506e
RW
4501 ac_compiler_gnu=no
4502fi
4503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4504ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
bf3b7cd3 4505
bf3b7cd3 4506fi
5213506e
RW
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4508$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4509if test $ac_compiler_gnu = yes; then
4510 GXX=yes
bf3b7cd3 4511else
5213506e
RW
4512 GXX=
4513fi
4514ac_test_CXXFLAGS=${CXXFLAGS+set}
4515ac_save_CXXFLAGS=$CXXFLAGS
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4517$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4518if test "${ac_cv_prog_cxx_g+set}" = set; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4522 ac_cxx_werror_flag=yes
4523 ac_cv_prog_cxx_g=no
4524 CXXFLAGS="-g"
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4526/* end confdefs.h. */
5213506e 4527
bf3b7cd3
JD
4528int
4529main ()
4530{
bf3b7cd3
JD
4531
4532 ;
4533 return 0;
4534}
4535_ACEOF
5213506e
RW
4536if ac_fn_cxx_try_compile "$LINENO"; then :
4537 ac_cv_prog_cxx_g=yes
4538else
4539 CXXFLAGS=""
4540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4541/* end confdefs.h. */
5213506e 4542
bf3b7cd3
JD
4543int
4544main ()
4545{
bf3b7cd3
JD
4546
4547 ;
4548 return 0;
4549}
4550_ACEOF
5213506e 4551if ac_fn_cxx_try_compile "$LINENO"; then :
bf3b7cd3 4552
bf3b7cd3 4553else
5213506e
RW
4554 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4555 CXXFLAGS="-g"
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4557/* end confdefs.h. */
5213506e 4558
bf3b7cd3
JD
4559int
4560main ()
4561{
bf3b7cd3
JD
4562
4563 ;
4564 return 0;
4565}
4566_ACEOF
5213506e
RW
4567if ac_fn_cxx_try_compile "$LINENO"; then :
4568 ac_cv_prog_cxx_g=yes
4569fi
4570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4571fi
4572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4573fi
4574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4576fi
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4578$as_echo "$ac_cv_prog_cxx_g" >&6; }
4579if test "$ac_test_CXXFLAGS" = set; then
4580 CXXFLAGS=$ac_save_CXXFLAGS
4581elif test $ac_cv_prog_cxx_g = yes; then
4582 if test "$GXX" = yes; then
4583 CXXFLAGS="-g -O2"
4584 else
4585 CXXFLAGS="-g"
4586 fi
bf3b7cd3 4587else
5213506e
RW
4588 if test "$GXX" = yes; then
4589 CXXFLAGS="-O2"
4590 else
4591 CXXFLAGS=
4592 fi
4593fi
4594ac_ext=c
4595ac_cpp='$CPP $CPPFLAGS'
4596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4598ac_compiler_gnu=$ac_cv_c_compiler_gnu
4599
4600
4601
4602
4603if test -n "$ac_tool_prefix"; then
4604 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
4605set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4607$as_echo_n "checking for $ac_word... " >&6; }
4608if test "${ac_cv_prog_GNATBIND+set}" = set; then :
4609 $as_echo_n "(cached) " >&6
4610else
4611 if test -n "$GNATBIND"; then
4612 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
4613else
4614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4615for as_dir in $PATH
4616do
4617 IFS=$as_save_IFS
4618 test -z "$as_dir" && as_dir=.
4619 for ac_exec_ext in '' $ac_executable_extensions; do
4620 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4621 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
4622 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4623 break 2
4624 fi
4625done
4626 done
4627IFS=$as_save_IFS
4628
4629fi
4630fi
4631GNATBIND=$ac_cv_prog_GNATBIND
4632if test -n "$GNATBIND"; then
4633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5
4634$as_echo "$GNATBIND" >&6; }
4635else
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4637$as_echo "no" >&6; }
4638fi
4639
bf3b7cd3 4640
bf3b7cd3 4641fi
5213506e
RW
4642if test -z "$ac_cv_prog_GNATBIND"; then
4643 ac_ct_GNATBIND=$GNATBIND
4644 # Extract the first word of "gnatbind", so it can be a program name with args.
4645set dummy gnatbind; ac_word=$2
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4647$as_echo_n "checking for $ac_word... " >&6; }
4648if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then :
4649 $as_echo_n "(cached) " >&6
4650else
4651 if test -n "$ac_ct_GNATBIND"; then
4652 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
4653else
4654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_exec_ext in '' $ac_executable_extensions; do
4660 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4661 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
4662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4663 break 2
4664 fi
bf3b7cd3 4665done
5213506e
RW
4666 done
4667IFS=$as_save_IFS
4668
4669fi
4670fi
4671ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
4672if test -n "$ac_ct_GNATBIND"; then
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5
4674$as_echo "$ac_ct_GNATBIND" >&6; }
4675else
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680 if test "x$ac_ct_GNATBIND" = x; then
4681 GNATBIND="no"
4682 else
4683 case $cross_compiling:$ac_tool_warned in
4684yes:)
4685{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4687ac_tool_warned=yes ;;
bf3b7cd3 4688esac
5213506e
RW
4689 GNATBIND=$ac_ct_GNATBIND
4690 fi
b61ff9c8 4691else
5213506e
RW
4692 GNATBIND="$ac_cv_prog_GNATBIND"
4693fi
bf3b7cd3 4694
5213506e
RW
4695if test -n "$ac_tool_prefix"; then
4696 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
4697set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4699$as_echo_n "checking for $ac_word... " >&6; }
4700if test "${ac_cv_prog_GNATMAKE+set}" = set; then :
4701 $as_echo_n "(cached) " >&6
4702else
4703 if test -n "$GNATMAKE"; then
4704 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
4705else
4706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in $PATH
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
4712 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4713 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721fi
4722fi
4723GNATMAKE=$ac_cv_prog_GNATMAKE
4724if test -n "$GNATMAKE"; then
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5
4726$as_echo "$GNATMAKE" >&6; }
4727else
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4729$as_echo "no" >&6; }
4730fi
4731
4732
4733fi
4734if test -z "$ac_cv_prog_GNATMAKE"; then
4735 ac_ct_GNATMAKE=$GNATMAKE
4736 # Extract the first word of "gnatmake", so it can be a program name with args.
4737set dummy gnatmake; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then :
4741 $as_echo_n "(cached) " >&6
4742else
4743 if test -n "$ac_ct_GNATMAKE"; then
4744 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
4745else
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
4752 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4753 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758 done
4759IFS=$as_save_IFS
4760
4761fi
4762fi
4763ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
4764if test -n "$ac_ct_GNATMAKE"; then
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5
4766$as_echo "$ac_ct_GNATMAKE" >&6; }
4767else
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
4770fi
4771
4772 if test "x$ac_ct_GNATMAKE" = x; then
4773 GNATMAKE="no"
bf3b7cd3 4774 else
5213506e
RW
4775 case $cross_compiling:$ac_tool_warned in
4776yes:)
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4779ac_tool_warned=yes ;;
4780esac
4781 GNATMAKE=$ac_ct_GNATMAKE
4782 fi
4783else
4784 GNATMAKE="$ac_cv_prog_GNATMAKE"
4785fi
bf3b7cd3 4786
5213506e
RW
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5
4788$as_echo_n "checking whether compiler driver understands Ada... " >&6; }
4789if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then :
4790 $as_echo_n "(cached) " >&6
bf3b7cd3 4791else
5213506e
RW
4792 cat >conftest.adb <<EOF
4793procedure conftest is begin null; end conftest;
4794EOF
4795acx_cv_cc_gcc_supports_ada=no
4796# There is a bug in old released versions of GCC which causes the
4797# driver to exit successfully when the appropriate language module
4798# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
4799# Therefore we must check for the error message as well as an
4800# unsuccessful exit.
4801# Other compilers, like HP Tru64 UNIX cc, exit successfully when
4802# given a .adb file, but produce no object file. So we must check
4803# if an object file was really produced to guard against this.
4804errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
4805if test x"$errors" = x && test -f conftest.$ac_objext; then
4806 acx_cv_cc_gcc_supports_ada=yes
4807fi
4808rm -f conftest.*
4809fi
4810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
4811$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
bf3b7cd3 4812
5213506e
RW
4813if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
4814 have_gnat=yes
4815else
4816 have_gnat=no
b61ff9c8 4817fi
5213506e
RW
4818
4819
4820# autoconf is lame and doesn't give us any substitution variable for this.
4821if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
4822 NO_MINUS_C_MINUS_O=yes
4823else
4824 OUTPUT_OPTION='-o $@'
bf3b7cd3 4825fi
5213506e
RW
4826
4827
4828
4829# Remove the -O2: for historical reasons, unless bootstrapping we prefer
4830# optimizations to be activated explicitly by the toplevel.
4831case "$CC" in
4832 */prev-gcc/xgcc*) ;;
4833 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
4834esac
4835
4836
4837# -------------------------
4838# Check C compiler features
4839# -------------------------
4840
4841
4842ac_ext=c
4843ac_cpp='$CPP $CPPFLAGS'
4844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4846ac_compiler_gnu=$ac_cv_c_compiler_gnu
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4848$as_echo_n "checking how to run the C preprocessor... " >&6; }
4849# On Suns, sometimes $CPP names a directory.
4850if test -n "$CPP" && test -d "$CPP"; then
4851 CPP=
bf3b7cd3 4852fi
5213506e
RW
4853if test -z "$CPP"; then
4854 if test "${ac_cv_prog_CPP+set}" = set; then :
4855 $as_echo_n "(cached) " >&6
b61ff9c8 4856else
5213506e
RW
4857 # Double quotes because CPP needs to be expanded
4858 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4859 do
4860 ac_preproc_ok=false
4861for ac_c_preproc_warn_flag in '' yes
4862do
4863 # Use a header file that comes with gcc, so configuring glibc
4864 # with a fresh cross-compiler works.
4865 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4866 # <limits.h> exists even on freestanding compilers.
4867 # On the NeXT, cc -E runs the code through the compiler's parser,
4868 # not just through cpp. "Syntax error" is here to catch this case.
4869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h. */
4871#ifdef __STDC__
4872# include <limits.h>
4873#else
4874# include <assert.h>
4875#endif
4876 Syntax error
bf3b7cd3 4877_ACEOF
5213506e 4878if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4879
bf3b7cd3 4880else
5213506e
RW
4881 # Broken: fails on valid input.
4882continue
4883fi
4884rm -f conftest.err conftest.$ac_ext
4885
4886 # OK, works on sane cases. Now check whether nonexistent headers
4887 # can be detected and how.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4889/* end confdefs.h. */
5213506e 4890#include <ac_nonexistent.h>
bf3b7cd3 4891_ACEOF
5213506e
RW
4892if ac_fn_c_try_cpp "$LINENO"; then :
4893 # Broken: success on invalid input.
4894continue
b61ff9c8 4895else
5213506e
RW
4896 # Passes both tests.
4897ac_preproc_ok=:
4898break
bf3b7cd3 4899fi
5213506e 4900rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4901
5213506e
RW
4902done
4903# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4904rm -f conftest.err conftest.$ac_ext
4905if $ac_preproc_ok; then :
4906 break
4907fi
bf3b7cd3 4908
5213506e
RW
4909 done
4910 ac_cv_prog_CPP=$CPP
bf3b7cd3 4911
8b1f719a 4912fi
5213506e 4913 CPP=$ac_cv_prog_CPP
8b1f719a 4914else
5213506e
RW
4915 ac_cv_prog_CPP=$CPP
4916fi
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4918$as_echo "$CPP" >&6; }
4919ac_preproc_ok=false
4920for ac_c_preproc_warn_flag in '' yes
4921do
4922 # Use a header file that comes with gcc, so configuring glibc
4923 # with a fresh cross-compiler works.
4924 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4925 # <limits.h> exists even on freestanding compilers.
4926 # On the NeXT, cc -E runs the code through the compiler's parser,
4927 # not just through cpp. "Syntax error" is here to catch this case.
4928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4929/* end confdefs.h. */
5213506e
RW
4930#ifdef __STDC__
4931# include <limits.h>
4932#else
4933# include <assert.h>
4934#endif
4935 Syntax error
bf3b7cd3 4936_ACEOF
5213506e 4937if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4938
bf3b7cd3 4939else
5213506e
RW
4940 # Broken: fails on valid input.
4941continue
bf3b7cd3 4942fi
5213506e 4943rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4944
5213506e
RW
4945 # OK, works on sane cases. Now check whether nonexistent headers
4946 # can be detected and how.
4947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4948/* end confdefs.h. */
5213506e 4949#include <ac_nonexistent.h>
bf3b7cd3 4950_ACEOF
5213506e
RW
4951if ac_fn_c_try_cpp "$LINENO"; then :
4952 # Broken: success on invalid input.
4953continue
bf3b7cd3 4954else
5213506e
RW
4955 # Passes both tests.
4956ac_preproc_ok=:
4957break
bf3b7cd3 4958fi
5213506e
RW
4959rm -f conftest.err conftest.$ac_ext
4960
bf3b7cd3 4961done
5213506e
RW
4962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4963rm -f conftest.err conftest.$ac_ext
4964if $ac_preproc_ok; then :
4965
b61ff9c8 4966else
5213506e
RW
4967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4969as_fn_error "C preprocessor \"$CPP\" fails sanity check
4970See \`config.log' for more details." "$LINENO" 5; }
4971fi
bf3b7cd3 4972
5213506e
RW
4973ac_ext=c
4974ac_cpp='$CPP $CPPFLAGS'
4975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4977ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4978
bf3b7cd3 4979
5213506e
RW
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4981$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4982if test "${ac_cv_path_GREP+set}" = set; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 if test -z "$GREP"; then
4986 ac_path_GREP_found=false
4987 # Loop through the user's path and test for each of PROGNAME-LIST
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_prog in grep ggrep; do
4994 for ac_exec_ext in '' $ac_executable_extensions; do
4995 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4996 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4997# Check for GNU ac_path_GREP and select it if it is found.
4998 # Check for GNU $ac_path_GREP
4999case `"$ac_path_GREP" --version 2>&1` in
5000*GNU*)
5001 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5002*)
5003 ac_count=0
5004 $as_echo_n 0123456789 >"conftest.in"
5005 while :
5006 do
5007 cat "conftest.in" "conftest.in" >"conftest.tmp"
5008 mv "conftest.tmp" "conftest.in"
5009 cp "conftest.in" "conftest.nl"
5010 $as_echo 'GREP' >> "conftest.nl"
5011 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5012 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5013 as_fn_arith $ac_count + 1 && ac_count=$as_val
5014 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5015 # Best one so far, save it but keep looking for a better one
5016 ac_cv_path_GREP="$ac_path_GREP"
5017 ac_path_GREP_max=$ac_count
5018 fi
5019 # 10*(2^10) chars as input seems more than enough
5020 test $ac_count -gt 10 && break
5021 done
5022 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5023esac
5024
5025 $ac_path_GREP_found && break 3
5026 done
5027 done
5028 done
5029IFS=$as_save_IFS
5030 if test -z "$ac_cv_path_GREP"; then
5031 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5032 fi
b61ff9c8 5033else
5213506e 5034 ac_cv_path_GREP=$GREP
2f41c1d6 5035fi
5213506e 5036
b61ff9c8 5037fi
5213506e
RW
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5039$as_echo "$ac_cv_path_GREP" >&6; }
5040 GREP="$ac_cv_path_GREP"
bf3b7cd3
JD
5041
5042
5213506e
RW
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5044$as_echo_n "checking for egrep... " >&6; }
5045if test "${ac_cv_path_EGREP+set}" = set; then :
5046 $as_echo_n "(cached) " >&6
5ec1c5e6 5047else
5213506e
RW
5048 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5049 then ac_cv_path_EGREP="$GREP -E"
5050 else
5051 if test -z "$EGREP"; then
5052 ac_path_EGREP_found=false
5053 # Loop through the user's path and test for each of PROGNAME-LIST
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_prog in egrep; do
5060 for ac_exec_ext in '' $ac_executable_extensions; do
5061 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5062 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5063# Check for GNU ac_path_EGREP and select it if it is found.
5064 # Check for GNU $ac_path_EGREP
5065case `"$ac_path_EGREP" --version 2>&1` in
5066*GNU*)
5067 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5068*)
5069 ac_count=0
5070 $as_echo_n 0123456789 >"conftest.in"
5071 while :
5072 do
5073 cat "conftest.in" "conftest.in" >"conftest.tmp"
5074 mv "conftest.tmp" "conftest.in"
5075 cp "conftest.in" "conftest.nl"
5076 $as_echo 'EGREP' >> "conftest.nl"
5077 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5078 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5079 as_fn_arith $ac_count + 1 && ac_count=$as_val
5080 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5081 # Best one so far, save it but keep looking for a better one
5082 ac_cv_path_EGREP="$ac_path_EGREP"
5083 ac_path_EGREP_max=$ac_count
5084 fi
5085 # 10*(2^10) chars as input seems more than enough
5086 test $ac_count -gt 10 && break
5087 done
5088 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5089esac
5ec1c5e6 5090
5213506e
RW
5091 $ac_path_EGREP_found && break 3
5092 done
5093 done
5094 done
5095IFS=$as_save_IFS
5096 if test -z "$ac_cv_path_EGREP"; then
5097 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5098 fi
5099else
5100 ac_cv_path_EGREP=$EGREP
5ec1c5e6 5101fi
5213506e
RW
5102
5103 fi
5ec1c5e6 5104fi
5213506e
RW
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5106$as_echo "$ac_cv_path_EGREP" >&6; }
5107 EGREP="$ac_cv_path_EGREP"
5ec1c5e6 5108
5ec1c5e6 5109
5213506e
RW
5110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5111$as_echo_n "checking for ANSI C header files... " >&6; }
5112if test "${ac_cv_header_stdc+set}" = set; then :
5113 $as_echo_n "(cached) " >&6
bf3b7cd3 5114else
5213506e 5115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5116/* end confdefs.h. */
5213506e
RW
5117#include <stdlib.h>
5118#include <stdarg.h>
5119#include <string.h>
5120#include <float.h>
5121
ba479fd2
NN
5122int
5123main ()
5124{
5213506e 5125
ba479fd2
NN
5126 ;
5127 return 0;
5128}
5129_ACEOF
5213506e
RW
5130if ac_fn_c_try_compile "$LINENO"; then :
5131 ac_cv_header_stdc=yes
75b6f3fd 5132else
5213506e 5133 ac_cv_header_stdc=no
75b6f3fd 5134fi
5213506e 5135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5136
5213506e
RW
5137if test $ac_cv_header_stdc = yes; then
5138 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5140/* end confdefs.h. */
5213506e 5141#include <string.h>
bf3b7cd3 5142
ba479fd2 5143_ACEOF
5213506e
RW
5144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5145 $EGREP "memchr" >/dev/null 2>&1; then :
bf3b7cd3 5146
75e93faa 5147else
5213506e
RW
5148 ac_cv_header_stdc=no
5149fi
5150rm -f conftest*
ba479fd2 5151
75e93faa 5152fi
bf3b7cd3 5153
5213506e
RW
5154if test $ac_cv_header_stdc = yes; then
5155 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5157/* end confdefs.h. */
5213506e 5158#include <stdlib.h>
bf3b7cd3 5159
ba479fd2 5160_ACEOF
5213506e
RW
5161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5162 $EGREP "free" >/dev/null 2>&1; then :
bf3b7cd3 5163
04cabffc 5164else
5213506e 5165 ac_cv_header_stdc=no
04cabffc 5166fi
5213506e 5167rm -f conftest*
04cabffc 5168
414d23ae 5169fi
ba479fd2 5170
5213506e
RW
5171if test $ac_cv_header_stdc = yes; then
5172 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5173 if test "$cross_compiling" = yes; then :
5174 :
b61ff9c8 5175else
5213506e 5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5177/* end confdefs.h. */
5213506e 5178#include <ctype.h>
bf3b7cd3 5179#include <stdlib.h>
5213506e
RW
5180#if ((' ' & 0x0FF) == 0x020)
5181# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5182# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5183#else
5184# define ISLOWER(c) \
5185 (('a' <= (c) && (c) <= 'i') \
5186 || ('j' <= (c) && (c) <= 'r') \
5187 || ('s' <= (c) && (c) <= 'z'))
5188# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5189#endif
5190
5191#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bf3b7cd3
JD
5192int
5193main ()
5194{
5213506e
RW
5195 int i;
5196 for (i = 0; i < 256; i++)
5197 if (XOR (islower (i), ISLOWER (i))
5198 || toupper (i) != TOUPPER (i))
5199 return 2;
bf3b7cd3
JD
5200 return 0;
5201}
5202_ACEOF
5213506e 5203if ac_fn_c_try_run "$LINENO"; then :
75e93faa 5204
5213506e
RW
5205else
5206 ac_cv_header_stdc=no
b61ff9c8 5207fi
5213506e
RW
5208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5209 conftest.$ac_objext conftest.beam conftest.$ac_ext
bf3b7cd3 5210fi
5213506e 5211
bf3b7cd3 5212fi
bf3b7cd3 5213fi
5213506e
RW
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5215$as_echo "$ac_cv_header_stdc" >&6; }
5216if test $ac_cv_header_stdc = yes; then
5217
5218$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5219
b61ff9c8 5220fi
5213506e
RW
5221
5222# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5223for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5224 inttypes.h stdint.h unistd.h
5225do :
5226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5227ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5228"
5229eval as_val=\$$as_ac_Header
5230 if test "x$as_val" = x""yes; then :
5231 cat >>confdefs.h <<_ACEOF
5232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2 5233_ACEOF
414d23ae 5234
5213506e
RW
5235fi
5236
5237done
5238
5239
cafe096b 5240
5213506e
RW
5241 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5242if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5243 MINIX=yes
5244else
5245 MINIX=
414d23ae
HPN
5246fi
5247
5213506e
RW
5248
5249 if test "$MINIX" = yes; then
5250
5251$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5252
5253
5254$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5255
5256
5257$as_echo "#define _MINIX 1" >>confdefs.h
5258
5259 fi
5260
5261
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5263$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5264if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5265 $as_echo_n "(cached) " >&6
b5472e1d 5266else
5213506e 5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b5472e1d 5268/* end confdefs.h. */
5213506e
RW
5269
5270# define __EXTENSIONS__ 1
5271 $ac_includes_default
3bbd5a19
PB
5272int
5273main ()
5274{
5213506e 5275
3bbd5a19
PB
5276 ;
5277 return 0;
5278}
b5472e1d 5279_ACEOF
5213506e
RW
5280if ac_fn_c_try_compile "$LINENO"; then :
5281 ac_cv_safe_to_define___extensions__=yes
b5472e1d 5282else
5213506e 5283 ac_cv_safe_to_define___extensions__=no
b5472e1d 5284fi
5213506e 5285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 5286fi
5213506e
RW
5287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5288$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5289 test $ac_cv_safe_to_define___extensions__ = yes &&
5290 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3bbd5a19 5291
5213506e
RW
5292 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5293
5294 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3bbd5a19 5295
5213506e
RW
5296 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5297
5298 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5299
5300
5301ac_ext=c
5302ac_cpp='$CPP $CPPFLAGS'
5303ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5304ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5305ac_compiler_gnu=$ac_cv_c_compiler_gnu
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5307$as_echo_n "checking how to run the C preprocessor... " >&6; }
5308# On Suns, sometimes $CPP names a directory.
5309if test -n "$CPP" && test -d "$CPP"; then
5310 CPP=
5311fi
5312if test -z "$CPP"; then
5313 if test "${ac_cv_prog_CPP+set}" = set; then :
5314 $as_echo_n "(cached) " >&6
89a42ac8 5315else
5213506e
RW
5316 # Double quotes because CPP needs to be expanded
5317 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5318 do
5319 ac_preproc_ok=false
5320for ac_c_preproc_warn_flag in '' yes
5321do
5322 # Use a header file that comes with gcc, so configuring glibc
5323 # with a fresh cross-compiler works.
5324 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5325 # <limits.h> exists even on freestanding compilers.
5326 # On the NeXT, cc -E runs the code through the compiler's parser,
5327 # not just through cpp. "Syntax error" is here to catch this case.
5328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89a42ac8 5329/* end confdefs.h. */
5213506e
RW
5330#ifdef __STDC__
5331# include <limits.h>
5332#else
5333# include <assert.h>
5334#endif
5335 Syntax error
89a42ac8 5336_ACEOF
5213506e
RW
5337if ac_fn_c_try_cpp "$LINENO"; then :
5338
89a42ac8 5339else
5213506e
RW
5340 # Broken: fails on valid input.
5341continue
5342fi
5343rm -f conftest.err conftest.$ac_ext
89a42ac8 5344
5213506e
RW
5345 # OK, works on sane cases. Now check whether nonexistent headers
5346 # can be detected and how.
5347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5348/* end confdefs.h. */
5349#include <ac_nonexistent.h>
5350_ACEOF
5351if ac_fn_c_try_cpp "$LINENO"; then :
5352 # Broken: success on invalid input.
5353continue
5354else
5355 # Passes both tests.
5356ac_preproc_ok=:
5357break
89a42ac8 5358fi
5213506e
RW
5359rm -f conftest.err conftest.$ac_ext
5360
5361done
5362# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5363rm -f conftest.err conftest.$ac_ext
5364if $ac_preproc_ok; then :
5365 break
34a86c2b
NN
5366fi
5367
5213506e
RW
5368 done
5369 ac_cv_prog_CPP=$CPP
5370
5371fi
5372 CPP=$ac_cv_prog_CPP
643d3bd2 5373else
5213506e
RW
5374 ac_cv_prog_CPP=$CPP
5375fi
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5377$as_echo "$CPP" >&6; }
5378ac_preproc_ok=false
5379for ac_c_preproc_warn_flag in '' yes
5380do
5381 # Use a header file that comes with gcc, so configuring glibc
5382 # with a fresh cross-compiler works.
5383 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5384 # <limits.h> exists even on freestanding compilers.
5385 # On the NeXT, cc -E runs the code through the compiler's parser,
5386 # not just through cpp. "Syntax error" is here to catch this case.
5387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
643d3bd2 5388/* end confdefs.h. */
5213506e
RW
5389#ifdef __STDC__
5390# include <limits.h>
5391#else
5392# include <assert.h>
5393#endif
5394 Syntax error
00020c16 5395_ACEOF
5213506e 5396if ac_fn_c_try_cpp "$LINENO"; then :
3bbd5a19 5397
643d3bd2 5398else
5213506e
RW
5399 # Broken: fails on valid input.
5400continue
5401fi
5402rm -f conftest.err conftest.$ac_ext
643d3bd2 5403
5213506e
RW
5404 # OK, works on sane cases. Now check whether nonexistent headers
5405 # can be detected and how.
5406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407/* end confdefs.h. */
5408#include <ac_nonexistent.h>
5409_ACEOF
5410if ac_fn_c_try_cpp "$LINENO"; then :
5411 # Broken: success on invalid input.
5412continue
5413else
5414 # Passes both tests.
5415ac_preproc_ok=:
5416break
643d3bd2 5417fi
5213506e
RW
5418rm -f conftest.err conftest.$ac_ext
5419
5420done
5421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5422rm -f conftest.err conftest.$ac_ext
5423if $ac_preproc_ok; then :
5424
09a9c095 5425else
5213506e
RW
5426 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5428as_fn_error "C preprocessor \"$CPP\" fails sanity check
5429See \`config.log' for more details." "$LINENO" 5; }
5430fi
373477bb 5431
5213506e
RW
5432ac_ext=c
5433ac_cpp='$CPP $CPPFLAGS'
5434ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5435ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5436ac_compiler_gnu=$ac_cv_c_compiler_gnu
5437
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5439$as_echo_n "checking for inline... " >&6; }
5440if test "${ac_cv_c_inline+set}" = set; then :
5441 $as_echo_n "(cached) " >&6
5442else
5443 ac_cv_c_inline=no
5444for ac_kw in inline __inline__ __inline; do
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 5446/* end confdefs.h. */
5213506e
RW
5447#ifndef __cplusplus
5448typedef int foo_t;
5449static $ac_kw foo_t static_foo () {return 0; }
5450$ac_kw foo_t foo () {return 0; }
5451#endif
373477bb 5452
00020c16 5453_ACEOF
5213506e
RW
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_c_inline=$ac_kw
5456fi
5457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5458 test "$ac_cv_c_inline" != no && break
5459done
5460
5461fi
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5463$as_echo "$ac_cv_c_inline" >&6; }
5464
5465case $ac_cv_c_inline in
5466 inline | yes) ;;
5467 *)
5468 case $ac_cv_c_inline in
5469 no) ac_val=;;
5470 *) ac_val=$ac_cv_c_inline;;
5471 esac
5472 cat >>confdefs.h <<_ACEOF
5473#ifndef __cplusplus
5474#define inline $ac_val
5475#endif
00020c16 5476_ACEOF
5213506e
RW
5477 ;;
5478esac
5479
5480
5481# sizeof(char) is 1 by definition.
5482# The cast to long int works around a bug in the HP C Compiler
5483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5485# This bug is HP SR number 8606223364.
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5487$as_echo_n "checking size of void *... " >&6; }
5488if test "${ac_cv_sizeof_void_p+set}" = set; then :
5489 $as_echo_n "(cached) " >&6
5490else
5491 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
5492
5493else
5494 if test "$ac_cv_type_void_p" = yes; then
5495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5497{ as_fn_set_status 77
5498as_fn_error "cannot compute sizeof (void *)
5499See \`config.log' for more details." "$LINENO" 5; }; }
5500 else
5501 ac_cv_sizeof_void_p=0
5502 fi
5503fi
5504
5505fi
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5507$as_echo "$ac_cv_sizeof_void_p" >&6; }
414d23ae 5508
5213506e
RW
5509
5510
5511cat >>confdefs.h <<_ACEOF
5512#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
00020c16 5513_ACEOF
5213506e
RW
5514
5515
5516# The cast to long int works around a bug in the HP C Compiler
5517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5519# This bug is HP SR number 8606223364.
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
5521$as_echo_n "checking size of short... " >&6; }
5522if test "${ac_cv_sizeof_short+set}" = set; then :
5523 $as_echo_n "(cached) " >&6
00020c16 5524else
5213506e
RW
5525 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
5526
5527else
5528 if test "$ac_cv_type_short" = yes; then
5529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5531{ as_fn_set_status 77
5532as_fn_error "cannot compute sizeof (short)
5533See \`config.log' for more details." "$LINENO" 5; }; }
5534 else
5535 ac_cv_sizeof_short=0
5536 fi
5537fi
414d23ae 5538
a1286ef5 5539fi
5213506e
RW
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
5541$as_echo "$ac_cv_sizeof_short" >&6; }
5542
5543
5544
5545cat >>confdefs.h <<_ACEOF
5546#define SIZEOF_SHORT $ac_cv_sizeof_short
5547_ACEOF
5548
5549
5550# The cast to long int works around a bug in the HP C Compiler
5551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5553# This bug is HP SR number 8606223364.
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
5555$as_echo_n "checking size of int... " >&6; }
5556if test "${ac_cv_sizeof_int+set}" = set; then :
5557 $as_echo_n "(cached) " >&6
e1bbfc5c 5558else
5213506e 5559 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
e1bbfc5c 5560
5213506e
RW
5561else
5562 if test "$ac_cv_type_int" = yes; then
5563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5565{ as_fn_set_status 77
5566as_fn_error "cannot compute sizeof (int)
5567See \`config.log' for more details." "$LINENO" 5; }; }
5568 else
5569 ac_cv_sizeof_int=0
5570 fi
e1bbfc5c 5571fi
5213506e 5572
ba479fd2 5573fi
5213506e
RW
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
5575$as_echo "$ac_cv_sizeof_int" >&6; }
00020c16 5576
5213506e
RW
5577
5578
5579cat >>confdefs.h <<_ACEOF
5580#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 5581_ACEOF
5213506e
RW
5582
5583
5584# The cast to long int works around a bug in the HP C Compiler
5585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5587# This bug is HP SR number 8606223364.
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5589$as_echo_n "checking size of long... " >&6; }
5590if test "${ac_cv_sizeof_long+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
ba479fd2 5592else
5213506e 5593 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
ba479fd2 5594
00020c16 5595else
5213506e
RW
5596 if test "$ac_cv_type_long" = yes; then
5597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5599{ as_fn_set_status 77
5600as_fn_error "cannot compute sizeof (long)
5601See \`config.log' for more details." "$LINENO" 5; }; }
5602 else
5603 ac_cv_sizeof_long=0
5604 fi
5605fi
5606
5607fi
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5609$as_echo "$ac_cv_sizeof_long" >&6; }
5610
5611
5612
5613cat >>confdefs.h <<_ACEOF
5614#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 5615_ACEOF
00020c16 5616
00020c16 5617
5213506e
RW
5618ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
5619if test "x$ac_cv_type_long_long" = x""yes; then :
5620
5621cat >>confdefs.h <<_ACEOF
5622#define HAVE_LONG_LONG 1
ba479fd2 5623_ACEOF
5213506e
RW
5624
5625# The cast to long int works around a bug in the HP C Compiler
5626# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5627# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5628# This bug is HP SR number 8606223364.
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
5630$as_echo_n "checking size of long long... " >&6; }
5631if test "${ac_cv_sizeof_long_long+set}" = set; then :
5632 $as_echo_n "(cached) " >&6
b61ff9c8 5633else
5213506e 5634 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
ba479fd2 5635
5213506e
RW
5636else
5637 if test "$ac_cv_type_long_long" = yes; then
5638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5640{ as_fn_set_status 77
5641as_fn_error "cannot compute sizeof (long long)
5642See \`config.log' for more details." "$LINENO" 5; }; }
5643 else
5644 ac_cv_sizeof_long_long=0
5645 fi
ba479fd2 5646fi
5213506e 5647
6938ec6c 5648fi
5213506e
RW
5649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
5650$as_echo "$ac_cv_sizeof_long_long" >&6; }
5651
5652
5653
5654cat >>confdefs.h <<_ACEOF
5655#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5656_ACEOF
5657
5658
6e3f3080 5659fi
5213506e
RW
5660
5661ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default"
5662if test "x$ac_cv_type___int64" = x""yes; then :
5663
5664cat >>confdefs.h <<_ACEOF
5665#define HAVE___INT64 1
5666_ACEOF
5667
5668# The cast to long int works around a bug in the HP C Compiler
5669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5671# This bug is HP SR number 8606223364.
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5
5673$as_echo_n "checking size of __int64... " >&6; }
5674if test "${ac_cv_sizeof___int64+set}" = set; then :
5675 $as_echo_n "(cached) " >&6
5676else
5677 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then :
5678
6938ec6c 5679else
5213506e
RW
5680 if test "$ac_cv_type___int64" = yes; then
5681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5683{ as_fn_set_status 77
5684as_fn_error "cannot compute sizeof (__int64)
5685See \`config.log' for more details." "$LINENO" 5; }; }
5686 else
5687 ac_cv_sizeof___int64=0
5688 fi
6938ec6c 5689fi
5213506e 5690
00020c16 5691fi
5213506e
RW
5692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
5693$as_echo "$ac_cv_sizeof___int64" >&6; }
5694
5695
5696
00020c16
ILT
5697cat >>confdefs.h <<_ACEOF
5698#define SIZEOF___INT64 $ac_cv_sizeof___int64
5699_ACEOF
6938ec6c
NN
5700
5701
00020c16 5702fi
ba479fd2 5703
fa802374
KT
5704ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
5705case $ac_cv_c_int8_t in #(
5706 no|yes) ;; #(
5707 *)
5708
5709cat >>confdefs.h <<_ACEOF
5710#define int8_t $ac_cv_c_int8_t
5711_ACEOF
5712;;
5713esac
5714
5715ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
5716case $ac_cv_c_int16_t in #(
5717 no|yes) ;; #(
5718 *)
5719
5720cat >>confdefs.h <<_ACEOF
5721#define int16_t $ac_cv_c_int16_t
5722_ACEOF
5723;;
5724esac
5725
5726ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
5727case $ac_cv_c_int32_t in #(
5728 no|yes) ;; #(
5729 *)
5730
5731cat >>confdefs.h <<_ACEOF
5732#define int32_t $ac_cv_c_int32_t
5733_ACEOF
5734;;
5735esac
5736
5737ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
5738case $ac_cv_c_int64_t in #(
5739 no|yes) ;; #(
5740 *)
5741
5742cat >>confdefs.h <<_ACEOF
5743#define int64_t $ac_cv_c_int64_t
5744_ACEOF
5745;;
5746esac
5747
5748
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5750$as_echo_n "checking for long long int... " >&6; }
5751if test "${ac_cv_type_long_long_int+set}" = set; then :
5752 $as_echo_n "(cached) " >&6
5753else
5754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5755/* end confdefs.h. */
5756
5757 /* For now, do not test the preprocessor; as of 2007 there are too many
5758 implementations with broken preprocessors. Perhaps this can
5759 be revisited in 2012. In the meantime, code should not expect
5760 #if to work with literals wider than 32 bits. */
5761 /* Test literals. */
5762 long long int ll = 9223372036854775807ll;
5763 long long int nll = -9223372036854775807LL;
5764 unsigned long long int ull = 18446744073709551615ULL;
5765 /* Test constant expressions. */
5766 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5767 ? 1 : -1)];
5768 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5769 ? 1 : -1)];
5770 int i = 63;
5771int
5772main ()
5773{
5774/* Test availability of runtime routines for shift and division. */
5775 long long int llmax = 9223372036854775807ll;
5776 unsigned long long int ullmax = 18446744073709551615ull;
5777 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5778 | (llmax / ll) | (llmax % ll)
5779 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5780 | (ullmax / ull) | (ullmax % ull));
5781 ;
5782 return 0;
5783}
5784
5785_ACEOF
5786if ac_fn_c_try_link "$LINENO"; then :
5787 if test "$cross_compiling" = yes; then :
5788 ac_cv_type_long_long_int=yes
5789else
5790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5791/* end confdefs.h. */
5792#include <limits.h>
5793 #ifndef LLONG_MAX
5794 # define HALF \
5795 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5796 # define LLONG_MAX (HALF - 1 + HALF)
5797 #endif
5798int
5799main ()
5800{
5801long long int n = 1;
5802 int i;
5803 for (i = 0; ; i++)
5804 {
5805 long long int m = n << i;
5806 if (m >> i != n)
5807 return 1;
5808 if (LLONG_MAX / 2 < m)
5809 break;
5810 }
5811 return 0;
5812 ;
5813 return 0;
5814}
5815_ACEOF
5816if ac_fn_c_try_run "$LINENO"; then :
5817 ac_cv_type_long_long_int=yes
5818else
5819 ac_cv_type_long_long_int=no
5820fi
5821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5822 conftest.$ac_objext conftest.beam conftest.$ac_ext
5823fi
5824
5825else
5826 ac_cv_type_long_long_int=no
5827fi
5828rm -f core conftest.err conftest.$ac_objext \
5829 conftest$ac_exeext conftest.$ac_ext
5830fi
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5832$as_echo "$ac_cv_type_long_long_int" >&6; }
5833 if test $ac_cv_type_long_long_int = yes; then
5834
5835$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
5836
5837 fi
5838
5839
5840
5841 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
5842if test "x$ac_cv_type_intmax_t" = x""yes; then :
5843
5844$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
5845
5846else
5847 test $ac_cv_type_long_long_int = yes \
5848 && ac_type='long long int' \
5849 || ac_type='long int'
5850
5851cat >>confdefs.h <<_ACEOF
5852#define intmax_t $ac_type
5853_ACEOF
5854
5855fi
5856
5857
5858
5859 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
5860if test "x$ac_cv_type_intptr_t" = x""yes; then :
5861
5862$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
5863
5864else
5865 for ac_type in 'int' 'long int' 'long long int'; do
5866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5867/* end confdefs.h. */
5868$ac_includes_default
5869int
5870main ()
5871{
5872static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
5873test_array [0] = 0
5874
5875 ;
5876 return 0;
5877}
5878_ACEOF
5879if ac_fn_c_try_compile "$LINENO"; then :
5880
5881cat >>confdefs.h <<_ACEOF
5882#define intptr_t $ac_type
5883_ACEOF
5884
5885 ac_type=
5886fi
5887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 test -z "$ac_type" && break
5889 done
5890fi
5891
5892
5893ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
5894case $ac_cv_c_uint8_t in #(
5895 no|yes) ;; #(
5896 *)
5897
5898$as_echo "#define _UINT8_T 1" >>confdefs.h
5899
5900
5901cat >>confdefs.h <<_ACEOF
5902#define uint8_t $ac_cv_c_uint8_t
5903_ACEOF
5904;;
5905 esac
5906
5907ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
5908case $ac_cv_c_uint16_t in #(
5909 no|yes) ;; #(
5910 *)
5911
5912
5913cat >>confdefs.h <<_ACEOF
5914#define uint16_t $ac_cv_c_uint16_t
5915_ACEOF
5916;;
5917 esac
5918
5919ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
5920case $ac_cv_c_uint32_t in #(
5921 no|yes) ;; #(
5922 *)
5923
5924$as_echo "#define _UINT32_T 1" >>confdefs.h
5925
5926
5927cat >>confdefs.h <<_ACEOF
5928#define uint32_t $ac_cv_c_uint32_t
5929_ACEOF
5930;;
5931 esac
5932
5933ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
5934case $ac_cv_c_uint64_t in #(
5935 no|yes) ;; #(
5936 *)
5937
5938$as_echo "#define _UINT64_T 1" >>confdefs.h
5939
5940
5941cat >>confdefs.h <<_ACEOF
5942#define uint64_t $ac_cv_c_uint64_t
5943_ACEOF
5944;;
5945 esac
5946
5947
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5949$as_echo_n "checking for unsigned long long int... " >&6; }
5950if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5951 $as_echo_n "(cached) " >&6
5952else
5953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5954/* end confdefs.h. */
5955
5956 /* For now, do not test the preprocessor; as of 2007 there are too many
5957 implementations with broken preprocessors. Perhaps this can
5958 be revisited in 2012. In the meantime, code should not expect
5959 #if to work with literals wider than 32 bits. */
5960 /* Test literals. */
5961 long long int ll = 9223372036854775807ll;
5962 long long int nll = -9223372036854775807LL;
5963 unsigned long long int ull = 18446744073709551615ULL;
5964 /* Test constant expressions. */
5965 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5966 ? 1 : -1)];
5967 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5968 ? 1 : -1)];
5969 int i = 63;
5970int
5971main ()
5972{
5973/* Test availability of runtime routines for shift and division. */
5974 long long int llmax = 9223372036854775807ll;
5975 unsigned long long int ullmax = 18446744073709551615ull;
5976 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5977 | (llmax / ll) | (llmax % ll)
5978 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5979 | (ullmax / ull) | (ullmax % ull));
5980 ;
5981 return 0;
5982}
5983
5984_ACEOF
5985if ac_fn_c_try_link "$LINENO"; then :
5986 ac_cv_type_unsigned_long_long_int=yes
5987else
5988 ac_cv_type_unsigned_long_long_int=no
5989fi
5990rm -f core conftest.err conftest.$ac_objext \
5991 conftest$ac_exeext conftest.$ac_ext
5992fi
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5994$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
5995 if test $ac_cv_type_unsigned_long_long_int = yes; then
5996
5997$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
5998
5999 fi
6000
6001
6002
6003 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
6004if test "x$ac_cv_type_uintmax_t" = x""yes; then :
6005
6006$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
6007
6008else
6009 test $ac_cv_type_unsigned_long_long_int = yes \
6010 && ac_type='unsigned long long int' \
6011 || ac_type='unsigned long int'
6012
6013cat >>confdefs.h <<_ACEOF
6014#define uintmax_t $ac_type
6015_ACEOF
6016
6017fi
6018
6019
6020
6021 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6022if test "x$ac_cv_type_uintptr_t" = x""yes; then :
6023
6024$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6025
6026else
6027 for ac_type in 'unsigned int' 'unsigned long int' \
6028 'unsigned long long int'; do
6029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6030/* end confdefs.h. */
6031$ac_includes_default
6032int
6033main ()
6034{
6035static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6036test_array [0] = 0
6037
6038 ;
6039 return 0;
6040}
6041_ACEOF
6042if ac_fn_c_try_compile "$LINENO"; then :
6043
6044cat >>confdefs.h <<_ACEOF
6045#define uintptr_t $ac_type
6046_ACEOF
6047
6048 ac_type=
6049fi
6050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6051 test -z "$ac_type" && break
6052 done
6053fi
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
00020c16
ILT
6068
6069# ---------------------
6070# Warnings and checking
6071# ---------------------
6072
6073# Check $CC warning features (if it's GCC).
6074# We want to use -pedantic, but we don't want warnings about
6075# * 'long long'
6076# * variadic macros
6077# * overlong strings
6078# So, we only use -pedantic if we can disable those warnings.
6079
6080loose_warn=
6081save_CFLAGS="$CFLAGS"
6082for option in -W -Wall -Wwrite-strings -Wcast-qual; do
5213506e 6083 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6084
5213506e
RW
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6086$as_echo_n "checking whether $CC supports $option... " >&6; }
6087if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6088 $as_echo_n "(cached) " >&6
00020c16
ILT
6089else
6090 CFLAGS="$option"
5213506e 6091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6092/* end confdefs.h. */
00020c16
ILT
6093
6094int
6095main ()
6096{
6097
6098 ;
6099 return 0;
6100}
ba479fd2 6101_ACEOF
5213506e 6102if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6103 eval "$as_acx_Woption=yes"
a207b594 6104else
5213506e 6105 eval "$as_acx_Woption=no"
a207b594 6106fi
5213506e 6107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6108
6109fi
5213506e
RW
6110eval ac_res=\$$as_acx_Woption
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6112$as_echo "$ac_res" >&6; }
6113 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6114 loose_warn="$loose_warn${loose_warn:+ }$option"
6115fi
00020c16
ILT
6116 done
6117CFLAGS="$save_CFLAGS"
6118
6119c_loose_warn=
6120save_CFLAGS="$CFLAGS"
6121for option in -Wstrict-prototypes -Wmissing-prototypes; do
5213506e 6122 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6123
5213506e
RW
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6125$as_echo_n "checking whether $CC supports $option... " >&6; }
6126if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6127 $as_echo_n "(cached) " >&6
00020c16
ILT
6128else
6129 CFLAGS="$option"
5213506e 6130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6131/* end confdefs.h. */
00020c16
ILT
6132
6133int
6134main ()
6135{
6136
6137 ;
6138 return 0;
6139}
ba479fd2 6140_ACEOF
5213506e 6141if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6142 eval "$as_acx_Woption=yes"
14011ca4 6143else
5213506e 6144 eval "$as_acx_Woption=no"
cafe096b 6145fi
5213506e 6146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 6147
56694dd9 6148fi
5213506e
RW
6149eval ac_res=\$$as_acx_Woption
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6151$as_echo "$ac_res" >&6; }
6152 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16 6153 c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
56694dd9 6154fi
00020c16
ILT
6155 done
6156CFLAGS="$save_CFLAGS"
6157
6158strict_warn=
6159save_CFLAGS="$CFLAGS"
6160for option in -Wmissing-format-attribute; do
5213506e 6161 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6162
5213506e
RW
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6164$as_echo_n "checking whether $CC supports $option... " >&6; }
6165if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6166 $as_echo_n "(cached) " >&6
414d23ae 6167else
00020c16 6168 CFLAGS="$option"
5213506e 6169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6170/* end confdefs.h. */
6171
6172int
6173main ()
6174{
6175
6176 ;
6177 return 0;
6178}
6179_ACEOF
5213506e 6180if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6181 eval "$as_acx_Woption=yes"
414d23ae 6182else
5213506e 6183 eval "$as_acx_Woption=no"
414d23ae 6184fi
5213506e 6185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6186
00020c16 6187fi
5213506e
RW
6188eval ac_res=\$$as_acx_Woption
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6190$as_echo "$ac_res" >&6; }
6191 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6192 strict_warn="$strict_warn${strict_warn:+ }$option"
6193fi
00020c16
ILT
6194 done
6195CFLAGS="$save_CFLAGS"
75e93faa 6196
00020c16
ILT
6197c_strict_warn=
6198save_CFLAGS="$CFLAGS"
6199for option in -Wold-style-definition -Wc++-compat; do
5213506e 6200 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
ba479fd2 6201
5213506e
RW
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6203$as_echo_n "checking whether $CC supports $option... " >&6; }
6204if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6205 $as_echo_n "(cached) " >&6
00020c16
ILT
6206else
6207 CFLAGS="$option"
5213506e 6208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6209/* end confdefs.h. */
a207b594 6210
00020c16
ILT
6211int
6212main ()
6213{
ba479fd2 6214
00020c16
ILT
6215 ;
6216 return 0;
6217}
ba479fd2 6218_ACEOF
5213506e 6219if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
6220 eval "$as_acx_Woption=yes"
6221else
5213506e 6222 eval "$as_acx_Woption=no"
414d23ae 6223fi
5213506e 6224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa 6225
00020c16 6226fi
5213506e
RW
6227eval ac_res=\$$as_acx_Woption
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6229$as_echo "$ac_res" >&6; }
6230 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6231 c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
6232fi
00020c16
ILT
6233 done
6234CFLAGS="$save_CFLAGS"
75e93faa 6235
5213506e
RW
6236if test "$GCC" = yes; then :
6237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
6238$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; }
6239if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then :
6240 $as_echo_n "(cached) " >&6
75e93faa 6241else
00020c16
ILT
6242 save_CFLAGS="$CFLAGS"
6243CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
5213506e 6244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6245/* end confdefs.h. */
2f41c1d6 6246
00020c16
ILT
6247int
6248main ()
6249{
b61ff9c8 6250
00020c16
ILT
6251 ;
6252 return 0;
6253}
6254_ACEOF
5213506e 6255if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6256 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
439a7e54 6257else
5213506e 6258 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
00020c16 6259fi
5213506e 6260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6261CFLAGS="$save_CFLAGS"
6262fi
5213506e
RW
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
6264$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; }
6265if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then :
00020c16
ILT
6266 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
6267fi
ba479fd2 6268
439a7e54
DN
6269fi
6270
5213506e
RW
6271# Check whether --enable-werror-always was given.
6272if test "${enable_werror_always+set}" = set; then :
6273 enableval=$enable_werror_always;
34a86c2b 6274else
00020c16 6275 enable_werror_always=no
00020c16 6276fi
cafe096b 6277
5213506e
RW
6278if test $enable_werror_always = yes; then :
6279 strict_warn="$strict_warn${strict_warn:+ }-Werror"
6280fi
b61ff9c8 6281
75e93faa 6282
34a86c2b 6283
00020c16
ILT
6284# The above macros do nothing if the compiler is not GCC. However, the
6285# Makefile has more goo to add other flags, so these variables are used
6286# to enable warnings only for GCC.
6287warn_cflags=
6288warn_cxxflags=
6289if test "x$GCC" = "xyes"; then
6290 warn_cflags='$(GCC_WARN_CFLAGS)'
6291 warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
6292fi
75e93faa
ZW
6293
6294
b61ff9c8 6295
00020c16
ILT
6296# Enable expensive internal checks
6297is_release=
6298if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6299 is_release=yes
6300fi
79b87c74 6301
5213506e
RW
6302# Check whether --enable-checking was given.
6303if test "${enable_checking+set}" = set; then :
6304 enableval=$enable_checking; ac_checking_flags="${enableval}"
79b87c74
MM
6305else
6306
00020c16
ILT
6307# Determine the default checks.
6308if test x$is_release = x ; then
6309 ac_checking_flags=yes
6310else
6311 ac_checking_flags=release
6312fi
5213506e
RW
6313fi
6314
00020c16
ILT
6315IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6316for check in release $ac_checking_flags
6317do
6318 case $check in
6319 # these set all the flags to specific states
6320 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
6321 ac_fold_checking= ; ac_gc_checking=1 ;
6322 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
6323 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6324 ac_tree_checking=1 ; ac_valgrind_checking= ;
6325 ac_types_checking=1 ;;
6326 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
6327 ac_fold_checking= ; ac_gc_checking= ;
6328 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6329 ac_rtlflag_checking= ; ac_runtime_checking= ;
6330 ac_tree_checking= ; ac_valgrind_checking= ;
6331 ac_types_checking= ;;
6332 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
6333 ac_fold_checking=1 ; ac_gc_checking=1 ;
6334 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
6335 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6336 ac_tree_checking=1 ; ac_valgrind_checking= ;
6337 ac_types_checking=1 ;;
6338 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
6339 ac_fold_checking= ; ac_gc_checking= ;
6340 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6341 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6342 ac_tree_checking= ; ac_valgrind_checking= ;
6343 ac_types_checking= ;;
6344 # these enable particular checks
6345 assert) ac_assert_checking=1 ;;
6346 df) ac_df_checking=1 ;;
6347 fold) ac_fold_checking=1 ;;
6348 gc) ac_gc_checking=1 ;;
6349 gcac) ac_gc_always_collect=1 ;;
6350 gimple) ac_gimple_checking=1 ;;
6351 misc) ac_checking=1 ;;
6352 rtl) ac_rtl_checking=1 ;;
6353 rtlflag) ac_rtlflag_checking=1 ;;
6354 runtime) ac_runtime_checking=1 ;;
6355 tree) ac_tree_checking=1 ;;
6356 types) ac_types_checking=1 ;;
6357 valgrind) ac_valgrind_checking=1 ;;
5213506e 6358 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
00020c16
ILT
6359 esac
6360done
6361IFS="$ac_save_IFS"
486aa804 6362
00020c16
ILT
6363nocommon_flag=""
6364if test x$ac_checking != x ; then
79b87c74 6365
5213506e 6366$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
79b87c74 6367
00020c16
ILT
6368 nocommon_flag=-fno-common
6369fi
79b87c74 6370
00020c16 6371if test x$ac_df_checking != x ; then
486aa804 6372
5213506e 6373$as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h
486aa804 6374
00020c16
ILT
6375fi
6376if test x$ac_assert_checking != x ; then
486aa804 6377
5213506e 6378$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
486aa804 6379
00020c16
ILT
6380fi
6381if test x$ac_gimple_checking != x ; then
486aa804 6382
5213506e 6383$as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h
b61ff9c8 6384
00020c16 6385fi
ab22c1fa 6386
00020c16 6387if test x$ac_runtime_checking != x ; then
ab22c1fa 6388
5213506e 6389$as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h
ab22c1fa 6390
00020c16
ILT
6391fi
6392if test x$ac_tree_checking != x ; then
ab22c1fa 6393
5213506e 6394$as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h
ab22c1fa 6395
00020c16
ILT
6396 TREEBROWSER=tree-browser.o
6397fi
6398if test x$ac_types_checking != x ; then
ab22c1fa 6399
5213506e 6400$as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h
ab22c1fa 6401
00020c16 6402fi
ab22c1fa 6403
00020c16 6404if test x$ac_rtl_checking != x ; then
2f41c1d6 6405
5213506e
RW
6406$as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h
6407
00020c16 6408fi
5213506e
RW
6409if test x$ac_rtlflag_checking != x ; then
6410
6411$as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h
4977bab6 6412
00020c16 6413fi
5213506e
RW
6414if test x$ac_gc_checking != x ; then
6415
6416$as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h
6417
6418fi
6419if test x$ac_gc_always_collect != x ; then
6420
6421$as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h
4977bab6 6422
00020c16 6423fi
5213506e
RW
6424if test x$ac_fold_checking != x ; then
6425
6426$as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h
2f41c1d6 6427
00020c16 6428fi
5213506e
RW
6429valgrind_path_defines=
6430valgrind_command=
6431
6432ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
6433if test "x$ac_cv_header_valgrind_h" = x""yes; then :
00020c16 6434 have_valgrind_h=yes
2f41c1d6 6435else
00020c16
ILT
6436 have_valgrind_h=no
6437fi
2f41c1d6 6438
1a4b763e 6439
2f41c1d6 6440
00020c16
ILT
6441if test x$ac_valgrind_checking != x ; then
6442 # It is certainly possible that there's valgrind but no valgrind.h.
6443 # GCC relies on making annotations so we must have both.
5213506e
RW
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6445$as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; }
6446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6447/* end confdefs.h. */
6448#include <valgrind/memcheck.h>
6449#ifndef VALGRIND_DISCARD
6450#error VALGRIND_DISCARD not defined
6451#endif
6452_ACEOF
5213506e 6453if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6454 gcc_cv_header_valgrind_memcheck_h=yes
aca600aa 6455else
00020c16
ILT
6456 gcc_cv_header_valgrind_memcheck_h=no
6457fi
6458rm -f conftest.err conftest.$ac_ext
5213506e
RW
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6460$as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; }
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6462$as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; }
6463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6464/* end confdefs.h. */
6465#include <memcheck.h>
6466#ifndef VALGRIND_DISCARD
6467#error VALGRIND_DISCARD not defined
6468#endif
6469_ACEOF
5213506e 6470if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6471 gcc_cv_header_memcheck_h=yes
e9a25f70 6472else
00020c16
ILT
6473 gcc_cv_header_memcheck_h=no
6474fi
6475rm -f conftest.err conftest.$ac_ext
5213506e
RW
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5
6477$as_echo "$gcc_cv_header_memcheck_h" >&6; }
00020c16
ILT
6478
6479# Prepare PATH_SEPARATOR.
6480# The user is always right.
6481if test "${PATH_SEPARATOR+set}" != set; then
6482 echo "#! /bin/sh" >conf$$.sh
6483 echo "exit 0" >>conf$$.sh
6484 chmod +x conf$$.sh
6485 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6486 PATH_SEPARATOR=';'
6487 else
6488 PATH_SEPARATOR=:
6489 fi
6490 rm -f conf$$.sh
e9a25f70
JL
6491fi
6492
00020c16
ILT
6493# Find out how to test for executable files. Don't use a zero-byte file,
6494# as systems may use methods other than mode bits to determine executability.
6495cat >conf$$.file <<_ASEOF
6496#! /bin/sh
6497exit 0
6498_ASEOF
6499chmod +x conf$$.file
6500if test -x conf$$.file >/dev/null 2>&1; then
6501 ac_executable_p="test -x"
6502else
6503 ac_executable_p="test -f"
6504fi
6505rm -f conf$$.file
e9a25f70 6506
00020c16
ILT
6507# Extract the first word of "valgrind", so it can be a program name with args.
6508set dummy valgrind; ac_word=$2
5213506e
RW
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if test "${ac_cv_path_valgrind_path+set}" = set; then :
6512 $as_echo_n "(cached) " >&6
861bb6c1 6513else
00020c16
ILT
6514 case "$valgrind_path" in
6515 [\\/]* | ?:[\\/]*)
6516 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6517 ;;
6518 *)
6519 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6520 for ac_dir in $PATH; do
6521 IFS="$ac_save_IFS"
6522 test -z "$ac_dir" && ac_dir=.
6523 for ac_exec_ext in '' $ac_executable_extensions; do
6524 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6525 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6526 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6527 break 2
6528 fi
6529 fi
6530 done
6531 done
6532 IFS="$ac_save_IFS"
6533 ;;
6534esac
861bb6c1 6535fi
00020c16
ILT
6536valgrind_path="$ac_cv_path_valgrind_path"
6537if test -n "$valgrind_path"; then
5213506e
RW
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5
6539$as_echo "$valgrind_path" >&6; }
861bb6c1 6540else
5213506e
RW
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; }
861bb6c1
JL
6543fi
6544
00020c16
ILT
6545 if test "x$valgrind_path" = "x" \
6546 || (test $have_valgrind_h = no \
6547 && test $gcc_cv_header_memcheck_h = no \
6548 && test $gcc_cv_header_valgrind_memcheck_h = no); then
5213506e 6549 as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
00020c16
ILT
6550 fi
6551 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6552 valgrind_command="$valgrind_path -q"
861bb6c1 6553
5213506e 6554$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
00020c16
ILT
6555
6556 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6557
5213506e 6558$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h
2c4902b9 6559
0a4b6309 6560 fi
00020c16
ILT
6561 if test $gcc_cv_header_memcheck_h = yes; then
6562
5213506e 6563$as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h
0a4b6309 6564
0a4b6309
RL
6565 fi
6566fi
6567
18fc9bd4 6568
18fc9bd4 6569
00020c16 6570# Enable code coverage collection
5213506e
RW
6571# Check whether --enable-coverage was given.
6572if test "${enable_coverage+set}" = set; then :
6573 enableval=$enable_coverage; case "${enableval}" in
00020c16
ILT
6574 yes|noopt)
6575 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6576 ;;
6577 opt)
6578 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6579 ;;
6580 no)
6581 # a.k.a. --disable-coverage
6582 coverage_flags=""
6583 ;;
6584 *)
5213506e 6585 as_fn_error "unknown coverage setting $enableval" "$LINENO" 5
00020c16
ILT
6586 ;;
6587esac
861bb6c1 6588else
00020c16 6589 coverage_flags=""
5213506e 6590fi
00020c16
ILT
6591
6592
ba479fd2 6593
5213506e
RW
6594# Check whether --enable-gather-detailed-mem-stats was given.
6595if test "${enable_gather_detailed_mem_stats+set}" = set; then :
6596 enableval=$enable_gather_detailed_mem_stats;
ba479fd2 6597else
00020c16 6598 enable_gather_detailed_mem_stats=no
5213506e
RW
6599fi
6600
00020c16
ILT
6601if test x$enable_gather_detailed_mem_stats = xyes ; then
6602
5213506e 6603$as_echo "#define GATHER_STATISTICS 1" >>confdefs.h
ba479fd2
NN
6604
6605fi
00020c16
ILT
6606
6607# -------------------------------
6608# Miscenalleous configure options
6609# -------------------------------
6610
6611# See if we are building gcc with C++.
5213506e
RW
6612# Check whether --enable-build-with-cxx was given.
6613if test "${enable_build_with_cxx+set}" = set; then :
6614 enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval
ba479fd2 6615else
00020c16 6616 ENABLE_BUILD_WITH_CXX=no
5213506e
RW
6617fi
6618
ba479fd2 6619
00020c16
ILT
6620
6621# With stabs
6622
5213506e
RW
6623# Check whether --with-stabs was given.
6624if test "${with_stabs+set}" = set; then :
6625 withval=$with_stabs; stabs="$with_stabs"
6e3f3080 6626else
00020c16 6627 stabs=no
5213506e 6628fi
00020c16 6629
ba479fd2 6630
5213506e
RW
6631# Determine whether or not multilibs are enabled.
6632# Check whether --enable-multilib was given.
6633if test "${enable_multilib+set}" = set; then :
6634 enableval=$enable_multilib;
ba479fd2 6635else
00020c16 6636 enable_multilib=yes
5213506e
RW
6637fi
6638
861bb6c1 6639
343a6100 6640
00020c16 6641# Enable __cxa_atexit for C++.
5213506e
RW
6642# Check whether --enable-__cxa_atexit was given.
6643if test "${enable___cxa_atexit+set}" = set; then :
6644 enableval=$enable___cxa_atexit;
6645fi
00020c16 6646
00020c16
ILT
6647
6648# Enable C extension for decimal float if target supports it.
f4dae9fc 6649
5213506e
RW
6650# Check whether --enable-decimal-float was given.
6651if test "${enable_decimal_float+set}" = set; then :
6652 enableval=$enable_decimal_float;
00020c16 6653 case $enable_decimal_float in
cc0ae0ca 6654 yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;;
5213506e
RW
6655 *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float.
6656Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;;
00020c16 6657 esac
343a6100 6658
0a4b6309 6659else
00020c16
ILT
6660
6661 case $target in
996b42ef
KT
6662 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
6663 i?86*-*-mingw* | x86_64*-*-mingw* | \
6664 i?86*-*-cygwin*)
00020c16 6665 enable_decimal_float=yes
0a4b6309 6666 ;;
00020c16 6667 *)
84f47d20
AS
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target, ignored" >&5
6669$as_echo "$as_me: WARNING: decimal float is not supported for this target, ignored" >&2;}
00020c16
ILT
6670 enable_decimal_float=no
6671 ;;
6672 esac
6673
5213506e
RW
6674fi
6675
00020c16 6676
00020c16
ILT
6677# x86's use BID format instead of DPD
6678case x$enable_decimal_float in
6679 xyes)
6680 case $target in
f4dae9fc 6681 i?86*-*-* | x86_64*-*-*)
00020c16
ILT
6682 enable_decimal_float=bid
6683 ;;
6684 *)
6685 enable_decimal_float=dpd
6686 ;;
0a4b6309 6687 esac
cc0ae0ca 6688 default_decimal_float=$enable_decimal_float
00020c16
ILT
6689 ;;
6690 xno)
6691 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
6692 # dependency on libdecnumber.
cc0ae0ca 6693 default_decimal_float=dpd
00020c16
ILT
6694 ;;
6695esac
0a4b6309 6696
0a4b6309 6697
f4dae9fc
AK
6698
6699
6700dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
6701
6702cat >>confdefs.h <<_ACEOF
6703#define ENABLE_DECIMAL_FLOAT $dfp
6704_ACEOF
6705
6706
cc0ae0ca
L
6707# Use default_decimal_float for dependency.
6708enable_decimal_float=$default_decimal_float
6709
00020c16 6710bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
0a4b6309 6711
00020c16
ILT
6712cat >>confdefs.h <<_ACEOF
6713#define ENABLE_DECIMAL_BID_FORMAT $bid
6714_ACEOF
6715
6716
6717# Enable C extension for fixed-point arithmetic.
5213506e
RW
6718# Check whether --enable-fixed-point was given.
6719if test "${enable_fixed_point+set}" = set; then :
6720 enableval=$enable_fixed_point;
861bb6c1 6721
3a000df0 6722else
3a000df0 6723
00020c16
ILT
6724 case $target in
6725 mips*-*-*)
6726 case $host in
6727 mips*-sgi-irix*)
84f47d20
AS
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX, ignored" >&5
6729$as_echo "$as_me: WARNING: fixed-point is not supported on IRIX, ignored" >&2;}
00020c16
ILT
6730 enable_fixed_point=no
6731 ;;
6732 *)
6733 enable_fixed_point=yes
6734 ;;
6735 esac
6736 ;;
6737 *)
84f47d20
AS
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target, ignored" >&5
6739$as_echo "$as_me: WARNING: fixed-point is not supported for this target, ignored" >&2;}
00020c16
ILT
6740 enable_fixed_point=no
6741 ;;
6742 esac
3a000df0 6743
5213506e
RW
6744fi
6745
3a000df0
KC
6746
6747
00020c16 6748fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
ba479fd2 6749
00020c16
ILT
6750cat >>confdefs.h <<_ACEOF
6751#define ENABLE_FIXED_POINT $fixedpoint
6752_ACEOF
73458fb7
NN
6753
6754
00020c16
ILT
6755# Enable threads
6756# Pass with no value to take the default
6757# Pass with a value to specify a thread package
5213506e
RW
6758# Check whether --enable-threads was given.
6759if test "${enable_threads+set}" = set; then :
6760 enableval=$enable_threads;
73458fb7 6761else
00020c16 6762 enable_threads=''
5213506e 6763fi
00020c16 6764
00020c16 6765
5213506e
RW
6766# Check whether --enable-tls was given.
6767if test "${enable_tls+set}" = set; then :
6768 enableval=$enable_tls;
00020c16
ILT
6769 case $enable_tls in
6770 yes | no) ;;
5213506e
RW
6771 *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls.
6772Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
00020c16
ILT
6773 esac
6774
73458fb7 6775else
00020c16 6776 enable_tls=''
5213506e 6777fi
ba479fd2 6778
5213506e
RW
6779
6780# Check whether --enable-objc-gc was given.
6781if test "${enable_objc_gc+set}" = set; then :
6782 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
00020c16 6783 objc_boehm_gc=''
73458fb7 6784else
00020c16 6785 objc_boehm_gc=1
73458fb7 6786fi
00020c16
ILT
6787else
6788 objc_boehm_gc=''
5213506e
RW
6789fi
6790
73458fb7 6791
00020c16 6792
5213506e
RW
6793# Check whether --with-dwarf2 was given.
6794if test "${with_dwarf2+set}" = set; then :
6795 withval=$with_dwarf2; dwarf2="$with_dwarf2"
73458fb7 6796else
00020c16 6797 dwarf2=no
5213506e 6798fi
3bbd5a19 6799
73458fb7 6800
5213506e
RW
6801# Check whether --enable-shared was given.
6802if test "${enable_shared+set}" = set; then :
6803 enableval=$enable_shared;
00020c16
ILT
6804 case $enable_shared in
6805 yes | no) ;;
6806 *)
6807 enable_shared=no
6808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6809 for pkg in $enableval; do
6810 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6811 enable_shared=yes
6812 fi
6813 done
6814 IFS="$ac_save_ifs"
6815 ;;
6816 esac
73458fb7 6817
73458fb7 6818else
00020c16 6819 enable_shared=yes
5213506e 6820fi
73458fb7 6821
7c27e184 6822
00020c16 6823
00020c16 6824
5213506e
RW
6825# Check whether --with-build-sysroot was given.
6826if test "${with_build_sysroot+set}" = set; then :
6827 withval=$with_build_sysroot;
6828fi
00020c16
ILT
6829
6830
00020c16 6831
5213506e
RW
6832# Check whether --with-sysroot was given.
6833if test "${with_sysroot+set}" = set; then :
6834 withval=$with_sysroot;
00020c16
ILT
6835 case ${with_sysroot} in
6836 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
6837 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6838 esac
6839
6840 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6841 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
6842
6843 if test "x$prefix" = xNONE; then
6844 test_prefix=/usr/local
6845 else
6846 test_prefix=$prefix
6847 fi
6848 if test "x$exec_prefix" = xNONE; then
6849 test_exec_prefix=$test_prefix
6850 else
6851 test_exec_prefix=$exec_prefix
6852 fi
6853 case ${TARGET_SYSTEM_ROOT} in
6854 "${test_prefix}"|"${test_prefix}/"*|\
6855 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
6856 '${prefix}'|'${prefix}/'*|\
6857 '${exec_prefix}'|'${exec_prefix}/'*)
6858 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6859 TARGET_SYSTEM_ROOT_DEFINE="$t"
6860 ;;
6861 esac
6862
6863else
6864
6865 TARGET_SYSTEM_ROOT=
6866 TARGET_SYSTEM_ROOT_DEFINE=
6867 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6868
5213506e
RW
6869fi
6870
00020c16
ILT
6871
6872
6873
6874
e11ddaf5
NS
6875
6876# Check whether --with-specs was given.
6877if test "${with_specs+set}" = set; then :
6878 withval=$with_specs; CONFIGURE_SPECS=$withval
6879else
6880 CONFIGURE_SPECS=
6881
6882fi
6883
6884
6885
00020c16
ILT
6886
6887
5213506e
RW
6888# Check whether --with-pkgversion was given.
6889if test "${with_pkgversion+set}" = set; then :
6890 withval=$with_pkgversion; case "$withval" in
6891 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
00020c16
ILT
6892 no) PKGVERSION= ;;
6893 *) PKGVERSION="($withval) " ;;
6894 esac
6895else
6896 PKGVERSION="(GCC) "
6897
5213506e 6898fi
00020c16
ILT
6899
6900
6901
6902
5213506e
RW
6903
6904# Check whether --with-bugurl was given.
6905if test "${with_bugurl+set}" = set; then :
6906 withval=$with_bugurl; case "$withval" in
6907 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
00020c16
ILT
6908 no) BUGURL=
6909 ;;
6910 *) BUGURL="$withval"
6911 ;;
6912 esac
6913else
6914 BUGURL="http://gcc.gnu.org/bugs.html"
6915
5213506e
RW
6916fi
6917
00020c16
ILT
6918 case ${BUGURL} in
6919 "")
6920 REPORT_BUGS_TO=
6921 REPORT_BUGS_TEXI=
6922 ;;
6923 *)
6924 REPORT_BUGS_TO="<$BUGURL>"
6925 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6926 ;;
6927 esac;
6928
6929
6930
6931
6932# Sanity check enable_languages in case someone does not run the toplevel
6933# configure # script.
5213506e
RW
6934# Check whether --enable-languages was given.
6935if test "${enable_languages+set}" = set; then :
6936 enableval=$enable_languages; case ,${enable_languages}, in
00020c16
ILT
6937 ,,|,yes,)
6938 # go safe -- we cannot be much sure without the toplevel
6939 # configure's
6940 # analysis of which target libs are present and usable
6941 enable_languages=c
6942 ;;
6943 *,all,*)
5213506e 6944 as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5
00020c16
ILT
6945 ;;
6946 *,c,*)
6947 ;;
6948 *)
6949 enable_languages=c,${enable_languages}
6950 ;;
6951esac
6952else
6953 enable_languages=c
5213506e
RW
6954fi
6955
00020c16 6956
00020c16 6957
5213506e
RW
6958# Check whether --with-multilib-list was given.
6959if test "${with_multilib_list+set}" = set; then :
6960 withval=$with_multilib_list; :
00020c16
ILT
6961else
6962 with_multilib_list=default
5213506e
RW
6963fi
6964
00020c16
ILT
6965
6966# -------------------------
6967# Checks for other programs
6968# -------------------------
6969
5213506e
RW
6970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6971$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6972set x ${MAKE-make}
6973ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6974if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
6975 $as_echo_n "(cached) " >&6
00020c16
ILT
6976else
6977 cat >conftest.make <<\_ACEOF
5213506e 6978SHELL = /bin/sh
00020c16 6979all:
5213506e 6980 @echo '@@@%%%=$(MAKE)=@@@%%%'
00020c16
ILT
6981_ACEOF
6982# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5213506e
RW
6983case `${MAKE-make} -f conftest.make 2>/dev/null` in
6984 *@@@%%%=?*=@@@%%%*)
6985 eval ac_cv_prog_make_${ac_make}_set=yes;;
6986 *)
6987 eval ac_cv_prog_make_${ac_make}_set=no;;
6988esac
00020c16
ILT
6989rm -f conftest.make
6990fi
5213506e
RW
6991if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6993$as_echo "yes" >&6; }
00020c16 6994 SET_MAKE=
73458fb7 6995else
5213506e
RW
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
00020c16 6998 SET_MAKE="MAKE=${MAKE-make}"
73458fb7
NN
6999fi
7000
7c27e184 7001
00020c16
ILT
7002# Find some useful tools
7003for ac_prog in gawk mawk nawk awk
7c27e184
PB
7004do
7005 # Extract the first word of "$ac_prog", so it can be a program name with args.
7006set dummy $ac_prog; ac_word=$2
5213506e
RW
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7008$as_echo_n "checking for $ac_word... " >&6; }
7009if test "${ac_cv_prog_AWK+set}" = set; then :
7010 $as_echo_n "(cached) " >&6
73458fb7 7011else
00020c16
ILT
7012 if test -n "$AWK"; then
7013 ac_cv_prog_AWK="$AWK" # Let the user override the test.
73458fb7 7014else
ba479fd2
NN
7015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7016for as_dir in $PATH
7017do
7018 IFS=$as_save_IFS
7019 test -z "$as_dir" && as_dir=.
5213506e
RW
7020 for ac_exec_ext in '' $ac_executable_extensions; do
7021 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7022 ac_cv_prog_AWK="$ac_prog"
5213506e 7023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7024 break 2
7025 fi
7026done
5213506e
RW
7027 done
7028IFS=$as_save_IFS
ba479fd2 7029
73458fb7
NN
7030fi
7031fi
00020c16
ILT
7032AWK=$ac_cv_prog_AWK
7033if test -n "$AWK"; then
5213506e
RW
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7035$as_echo "$AWK" >&6; }
73458fb7 7036else
5213506e
RW
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038$as_echo "no" >&6; }
73458fb7
NN
7039fi
7040
5213506e 7041
00020c16 7042 test -n "$AWK" && break
7c27e184 7043done
7c27e184 7044
00020c16
ILT
7045# We need awk to create options.c and options.h.
7046# Bail out if it's missing.
7047case ${AWK} in
5213506e 7048 "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;;
00020c16 7049esac
73458fb7 7050
5213506e
RW
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7052$as_echo_n "checking whether ln -s works... " >&6; }
7053if test "${gcc_cv_prog_LN_S+set}" = set; then :
7054 $as_echo_n "(cached) " >&6
00020c16
ILT
7055else
7056 rm -f conftestdata_t
7057echo >conftestdata_f
7058if ln -s conftestdata_f conftestdata_t 2>/dev/null
7059then
7060 gcc_cv_prog_LN_S="ln -s"
7061else
7062 if ln conftestdata_f conftestdata_t 2>/dev/null
7063 then
7064 gcc_cv_prog_LN_S=ln
7065 else
7066 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7067 then
7068 gcc_cv_prog_LN_S="cp -p"
7069 else
7070 gcc_cv_prog_LN_S=cp
7071 fi
7072 fi
7073fi
7074rm -f conftestdata_f conftestdata_t
7075
7076fi
7077LN_S="$gcc_cv_prog_LN_S"
7078if test "$gcc_cv_prog_LN_S" = "ln -s"; then
5213506e
RW
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7080$as_echo "yes" >&6; }
00020c16
ILT
7081else
7082 if test "$gcc_cv_prog_LN_S" = "ln"; then
5213506e
RW
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5
7084$as_echo "no, using ln" >&6; }
00020c16 7085 else
5213506e
RW
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7087$as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
00020c16
ILT
7088 fi
7089fi
7090
5213506e
RW
7091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
7092$as_echo_n "checking whether ln works... " >&6; }
7093if test "${acx_cv_prog_LN+set}" = set; then :
7094 $as_echo_n "(cached) " >&6
00020c16
ILT
7095else
7096 rm -f conftestdata_t
7097echo >conftestdata_f
7098if ln conftestdata_f conftestdata_t 2>/dev/null
7099then
7100 acx_cv_prog_LN=ln
7101else
7102 acx_cv_prog_LN=no
7103fi
7104rm -f conftestdata_f conftestdata_t
7105
7106fi
7107if test $acx_cv_prog_LN = no; then
7108 LN="$LN_S"
5213506e
RW
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5
7110$as_echo "no, using $LN" >&6; }
00020c16
ILT
7111else
7112 LN="$acx_cv_prog_LN"
5213506e
RW
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7114$as_echo "yes" >&6; }
00020c16
ILT
7115fi
7116
7117if test -n "$ac_tool_prefix"; then
7118 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7119set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
7120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7121$as_echo_n "checking for $ac_word... " >&6; }
7122if test "${ac_cv_prog_RANLIB+set}" = set; then :
7123 $as_echo_n "(cached) " >&6
73458fb7 7124else
00020c16
ILT
7125 if test -n "$RANLIB"; then
7126 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
73458fb7 7127else
ba479fd2
NN
7128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129for as_dir in $PATH
7130do
7131 IFS=$as_save_IFS
7132 test -z "$as_dir" && as_dir=.
5213506e
RW
7133 for ac_exec_ext in '' $ac_executable_extensions; do
7134 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7135 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 7136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7137 break 2
7138 fi
7139done
5213506e
RW
7140 done
7141IFS=$as_save_IFS
ba479fd2 7142
73458fb7
NN
7143fi
7144fi
00020c16
ILT
7145RANLIB=$ac_cv_prog_RANLIB
7146if test -n "$RANLIB"; then
5213506e
RW
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7148$as_echo "$RANLIB" >&6; }
73458fb7 7149else
5213506e
RW
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7151$as_echo "no" >&6; }
73458fb7
NN
7152fi
7153
5213506e 7154
00020c16
ILT
7155fi
7156if test -z "$ac_cv_prog_RANLIB"; then
7157 ac_ct_RANLIB=$RANLIB
7158 # Extract the first word of "ranlib", so it can be a program name with args.
7159set dummy ranlib; ac_word=$2
5213506e
RW
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161$as_echo_n "checking for $ac_word... " >&6; }
7162if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7163 $as_echo_n "(cached) " >&6
f6a874ac 7164else
00020c16
ILT
7165 if test -n "$ac_ct_RANLIB"; then
7166 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f6a874ac
JW
7167else
7168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169for as_dir in $PATH
7170do
7171 IFS=$as_save_IFS
7172 test -z "$as_dir" && as_dir=.
5213506e
RW
7173 for ac_exec_ext in '' $ac_executable_extensions; do
7174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7175 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 7176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7177 break 2
7178 fi
7179done
5213506e
RW
7180 done
7181IFS=$as_save_IFS
f6a874ac 7182
f6a874ac
JW
7183fi
7184fi
00020c16
ILT
7185ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7186if test -n "$ac_ct_RANLIB"; then
5213506e
RW
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7188$as_echo "$ac_ct_RANLIB" >&6; }
f6a874ac 7189else
5213506e
RW
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191$as_echo "no" >&6; }
f6a874ac
JW
7192fi
7193
5213506e
RW
7194 if test "x$ac_ct_RANLIB" = x; then
7195 RANLIB=":"
7196 else
7197 case $cross_compiling:$ac_tool_warned in
7198yes:)
7199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7201ac_tool_warned=yes ;;
7202esac
7203 RANLIB=$ac_ct_RANLIB
7204 fi
00020c16
ILT
7205else
7206 RANLIB="$ac_cv_prog_RANLIB"
f6a874ac
JW
7207fi
7208
00020c16
ILT
7209case "${host}" in
7210*-*-darwin*)
7211 # By default, the Darwin ranlib will not treat common symbols as
7212 # definitions when building the archive table of contents. Other
7213 # ranlibs do that; pass an option to the Darwin ranlib that makes
7214 # it behave similarly.
7215 ranlib_flags="-c"
7216 ;;
7217*)
7218 ranlib_flags=""
7219esac
7220
7221
7222# Find a good install program. We prefer a C program (faster),
7223# so one script is as good as another. But avoid the broken or
7224# incompatible versions:
7225# SysV /etc/install, /usr/sbin/install
7226# SunOS /usr/etc/install
7227# IRIX /sbin/install
7228# AIX /bin/install
7229# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7230# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7231# ./install, which can be erroneously created by make from ./install.sh.
5213506e
RW
7232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5
7233$as_echo_n "checking for a BSD compatible install... " >&6; }
00020c16 7234if test -z "$INSTALL"; then
5213506e
RW
7235if test "${ac_cv_path_install+set}" = set; then :
7236 $as_echo_n "(cached) " >&6
f6a874ac 7237else
00020c16
ILT
7238 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7239 for ac_dir in $PATH; do
7240 # Account for people who put trailing slashes in PATH elements.
7241 case "$ac_dir/" in
7242 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7243 *)
7244 # OSF1 and SCO ODT 3.0 have their own names for install.
7245 for ac_prog in ginstall scoinst install; do
7246 if test -f $ac_dir/$ac_prog; then
7247 if test $ac_prog = install &&
7248 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7249 # AIX install. It has an incompatible calling convention.
7250 # OSF/1 installbsd also uses dspmsg, but is usable.
7251 :
7252 else
7253 ac_cv_path_install="$ac_dir/$ac_prog -c"
7254 break 2
7255 fi
7256 fi
7257 done
7258 ;;
7259 esac
7260 done
7261 IFS="$ac_save_IFS"
7262
7263fi
7264 if test "${ac_cv_path_install+set}" = set; then
7265 INSTALL="$ac_cv_path_install"
7266 else
7267 # As a last resort, use the slow shell script. We don't cache a
7268 # path for INSTALL within a source directory, because that will
7269 # break other packages using the cache if that directory is
7270 # removed, or if the path is relative.
7271 INSTALL="$ac_install_sh"
7272 fi
7273fi
5213506e
RW
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7275$as_echo "$INSTALL" >&6; }
00020c16
ILT
7276
7277# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7278# It thinks the first close brace ends the variable substitution.
7279test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7280
7281test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7282
7283
7284# See if cmp has --ignore-initial.
5213506e
RW
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5
7286$as_echo_n "checking for cmp's capabilities... " >&6; }
7287if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
7288 $as_echo_n "(cached) " >&6
00020c16
ILT
7289else
7290 echo abfoo >t1
7291 echo cdfoo >t2
7292 gcc_cv_prog_cmp_skip=slowcompare
7293 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7294 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
7295 :
7296 else
7297 gcc_cv_prog_cmp_skip=gnucompare
7298 fi
7299 fi
7300 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7301 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7302 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7303 :
7304 else
7305 gcc_cv_prog_cmp_skip=fastcompare
7306 fi
7307 fi
7308 fi
7309 rm t1 t2
7310
7311fi
5213506e
RW
7312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
7313$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
00020c16
ILT
7314make_compare_target=$gcc_cv_prog_cmp_skip
7315
7316
7317
7318# See if we have the mktemp command.
7319# Extract the first word of "mktemp", so it can be a program name with args.
7320set dummy mktemp; ac_word=$2
5213506e
RW
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322$as_echo_n "checking for $ac_word... " >&6; }
7323if test "${ac_cv_prog_have_mktemp_command+set}" = set; then :
7324 $as_echo_n "(cached) " >&6
f6a874ac 7325else
00020c16
ILT
7326 if test -n "$have_mktemp_command"; then
7327 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
f6a874ac
JW
7328else
7329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330for as_dir in $PATH
7331do
7332 IFS=$as_save_IFS
7333 test -z "$as_dir" && as_dir=.
5213506e
RW
7334 for ac_exec_ext in '' $ac_executable_extensions; do
7335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7336 ac_cv_prog_have_mktemp_command="yes"
5213506e 7337 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7338 break 2
7339 fi
7340done
5213506e
RW
7341 done
7342IFS=$as_save_IFS
f6a874ac 7343
00020c16 7344 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
f6a874ac
JW
7345fi
7346fi
00020c16
ILT
7347have_mktemp_command=$ac_cv_prog_have_mktemp_command
7348if test -n "$have_mktemp_command"; then
5213506e
RW
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5
7350$as_echo "$have_mktemp_command" >&6; }
f6a874ac 7351else
5213506e
RW
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353$as_echo "no" >&6; }
f6a874ac
JW
7354fi
7355
f6a874ac 7356
5213506e 7357
00020c16
ILT
7358# See if makeinfo has been installed and is modern enough
7359# that we can use it.
ca9bc441 7360
00020c16
ILT
7361 # Extract the first word of "makeinfo", so it can be a program name with args.
7362set dummy makeinfo; ac_word=$2
5213506e
RW
7363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7364$as_echo_n "checking for $ac_word... " >&6; }
7365if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7366 $as_echo_n "(cached) " >&6
956d6950 7367else
00020c16
ILT
7368 if test -n "$MAKEINFO"; then
7369 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
956d6950 7370else
00020c16
ILT
7371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7372for as_dir in $PATH
7373do
7374 IFS=$as_save_IFS
7375 test -z "$as_dir" && as_dir=.
5213506e
RW
7376 for ac_exec_ext in '' $ac_executable_extensions; do
7377 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7378 ac_cv_prog_MAKEINFO="makeinfo"
5213506e 7379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7380 break 2
7381 fi
7382done
5213506e
RW
7383 done
7384IFS=$as_save_IFS
ba479fd2 7385
956d6950 7386fi
00020c16
ILT
7387fi
7388MAKEINFO=$ac_cv_prog_MAKEINFO
7389if test -n "$MAKEINFO"; then
5213506e
RW
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7391$as_echo "$MAKEINFO" >&6; }
956d6950 7392else
5213506e
RW
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
956d6950 7395fi
956d6950 7396
5213506e 7397
00020c16
ILT
7398 if test -n "$MAKEINFO"; then
7399 # Found it, now check the version.
5213506e
RW
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5
7401$as_echo_n "checking for modern makeinfo... " >&6; }
7402if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then :
7403 $as_echo_n "(cached) " >&6
00020c16
ILT
7404else
7405 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7406 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
956d6950 7407
00020c16
ILT
7408 case $ac_prog_version in
7409 '') gcc_cv_prog_makeinfo_modern=no;;
7410 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
7411 *) gcc_cv_prog_makeinfo_modern=no;;
7412 esac
ba479fd2 7413
956d6950 7414fi
5213506e
RW
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5
7416$as_echo "$gcc_cv_prog_makeinfo_modern" >&6; }
00020c16
ILT
7417 else
7418 gcc_cv_prog_makeinfo_modern=no
7419 fi
7420 if test $gcc_cv_prog_makeinfo_modern = no; then
7421 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7422 fi
956d6950 7423
00020c16 7424if test $gcc_cv_prog_makeinfo_modern = no; then
5213506e 7425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
00020c16
ILT
7426*** Makeinfo is missing or too old.
7427*** Info documentation will not be built." >&5
5213506e 7428$as_echo "$as_me: WARNING:
00020c16
ILT
7429*** Makeinfo is missing or too old.
7430*** Info documentation will not be built." >&2;}
7431 BUILD_INFO=
7432else
7433 BUILD_INFO=info
956d6950
JL
7434fi
7435
63cf211a 7436
00020c16 7437# Is pod2man recent enough to regenerate manpages?
5213506e
RW
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5
7439$as_echo_n "checking for recent Pod::Man... " >&6; }
00020c16 7440if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
5213506e
RW
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7442$as_echo "yes" >&6; }
00020c16 7443 GENERATED_MANPAGES=generated-manpages
956d6950 7444else
5213506e
RW
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
00020c16 7447 GENERATED_MANPAGES=
956d6950 7448fi
ba479fd2 7449
956d6950 7450
00020c16 7451MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
956d6950 7452
00020c16
ILT
7453# How about lex?
7454for ac_prog in flex
7455do
7456 # Extract the first word of "$ac_prog", so it can be a program name with args.
7457set dummy $ac_prog; ac_word=$2
5213506e
RW
7458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7459$as_echo_n "checking for $ac_word... " >&6; }
7460if test "${ac_cv_prog_FLEX+set}" = set; then :
7461 $as_echo_n "(cached) " >&6
956d6950 7462else
00020c16
ILT
7463 if test -n "$FLEX"; then
7464 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
956d6950 7465else
00020c16
ILT
7466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7467for as_dir in $PATH
7468do
7469 IFS=$as_save_IFS
7470 test -z "$as_dir" && as_dir=.
5213506e
RW
7471 for ac_exec_ext in '' $ac_executable_extensions; do
7472 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7473 ac_cv_prog_FLEX="$ac_prog"
5213506e 7474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7475 break 2
7476 fi
7477done
5213506e
RW
7478 done
7479IFS=$as_save_IFS
ba479fd2 7480
956d6950 7481fi
956d6950 7482fi
00020c16
ILT
7483FLEX=$ac_cv_prog_FLEX
7484if test -n "$FLEX"; then
5213506e
RW
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
7486$as_echo "$FLEX" >&6; }
00020c16 7487else
5213506e
RW
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
00020c16 7490fi
ba479fd2 7491
5213506e 7492
00020c16
ILT
7493 test -n "$FLEX" && break
7494done
7495test -n "$FLEX" || FLEX="$MISSING flex"
7496
7497
7498# Bison?
7499for ac_prog in bison
7500do
7501 # Extract the first word of "$ac_prog", so it can be a program name with args.
7502set dummy $ac_prog; ac_word=$2
5213506e
RW
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504$as_echo_n "checking for $ac_word... " >&6; }
7505if test "${ac_cv_prog_BISON+set}" = set; then :
7506 $as_echo_n "(cached) " >&6
00020c16
ILT
7507else
7508 if test -n "$BISON"; then
7509 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7510else
7511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514 IFS=$as_save_IFS
7515 test -z "$as_dir" && as_dir=.
5213506e
RW
7516 for ac_exec_ext in '' $ac_executable_extensions; do
7517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7518 ac_cv_prog_BISON="$ac_prog"
5213506e 7519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7520 break 2
7521 fi
7522done
5213506e
RW
7523 done
7524IFS=$as_save_IFS
956d6950 7525
00020c16
ILT
7526fi
7527fi
7528BISON=$ac_cv_prog_BISON
7529if test -n "$BISON"; then
5213506e
RW
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7531$as_echo "$BISON" >&6; }
00020c16 7532else
5213506e
RW
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
956d6950
JL
7535fi
7536
5213506e 7537
00020c16
ILT
7538 test -n "$BISON" && break
7539done
7540test -n "$BISON" || BISON="$MISSING bison"
7541
7542
7543# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7544# check for build == host before using them.
7545
7546# NM
7547if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7548 && test -d ../binutils ; then
bfa912a8 7549 NM='${objdir}/../binutils/nm-new'
00020c16
ILT
7550else
7551 # Extract the first word of "nm", so it can be a program name with args.
7552set dummy nm; ac_word=$2
5213506e
RW
7553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7554$as_echo_n "checking for $ac_word... " >&6; }
7555if test "${ac_cv_prog_NM+set}" = set; then :
7556 $as_echo_n "(cached) " >&6
00020c16
ILT
7557else
7558 if test -n "$NM"; then
7559 ac_cv_prog_NM="$NM" # Let the user override the test.
7560else
7561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7562for as_dir in $PATH
7563do
7564 IFS=$as_save_IFS
7565 test -z "$as_dir" && as_dir=.
5213506e
RW
7566 for ac_exec_ext in '' $ac_executable_extensions; do
7567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7568 ac_cv_prog_NM="nm"
5213506e 7569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7570 break 2
7571 fi
7572done
5213506e
RW
7573 done
7574IFS=$as_save_IFS
00020c16
ILT
7575
7576 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7577fi
7578fi
7579NM=$ac_cv_prog_NM
7580if test -n "$NM"; then
5213506e
RW
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
7582$as_echo "$NM" >&6; }
00020c16 7583else
5213506e
RW
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585$as_echo "no" >&6; }
00020c16
ILT
7586fi
7587
5213506e 7588
00020c16
ILT
7589fi
7590
7591# AR
7592if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7593 && test -d ../binutils ; then
bfa912a8 7594 AR='${objdir}/../binutils/ar'
00020c16
ILT
7595else
7596 # Extract the first word of "ar", so it can be a program name with args.
7597set dummy ar; ac_word=$2
5213506e
RW
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7599$as_echo_n "checking for $ac_word... " >&6; }
7600if test "${ac_cv_prog_AR+set}" = set; then :
7601 $as_echo_n "(cached) " >&6
00020c16
ILT
7602else
7603 if test -n "$AR"; then
7604 ac_cv_prog_AR="$AR" # Let the user override the test.
7605else
7606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609 IFS=$as_save_IFS
7610 test -z "$as_dir" && as_dir=.
5213506e
RW
7611 for ac_exec_ext in '' $ac_executable_extensions; do
7612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7613 ac_cv_prog_AR="ar"
5213506e 7614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7615 break 2
7616 fi
7617done
5213506e
RW
7618 done
7619IFS=$as_save_IFS
00020c16
ILT
7620
7621 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7622fi
7623fi
7624AR=$ac_cv_prog_AR
7625if test -n "$AR"; then
5213506e
RW
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7627$as_echo "$AR" >&6; }
00020c16 7628else
5213506e
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
00020c16
ILT
7631fi
7632
5213506e 7633
00020c16
ILT
7634fi
7635
7636
7637# --------------------
7638# Checks for C headers
7639# --------------------
7640
7641# Need to reject headers which give warnings, so that the -Werror bootstrap
7642# works later. *sigh* This needs to come before all header checks.
7643
7644ac_c_preproc_warn_flag=yes
7645
5213506e
RW
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7647$as_echo_n "checking for ANSI C header files... " >&6; }
7648if test "${ac_cv_header_stdc+set}" = set; then :
7649 $as_echo_n "(cached) " >&6
18fc9bd4 7650else
5213506e 7651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4 7652/* end confdefs.h. */
00020c16
ILT
7653#include <stdlib.h>
7654#include <stdarg.h>
18fc9bd4 7655#include <string.h>
00020c16
ILT
7656#include <float.h>
7657
18fc9bd4
RG
7658int
7659main ()
7660{
7661
7662 ;
7663 return 0;
7664}
7665_ACEOF
5213506e 7666if ac_fn_c_try_compile "$LINENO"; then :
00020c16 7667 ac_cv_header_stdc=yes
18fc9bd4 7668else
5213506e 7669 ac_cv_header_stdc=no
18fc9bd4 7670fi
5213506e 7671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 7672
00020c16
ILT
7673if test $ac_cv_header_stdc = yes; then
7674 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5213506e 7675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7676/* end confdefs.h. */
7677#include <string.h>
7678
18fc9bd4 7679_ACEOF
00020c16 7680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7681 $EGREP "memchr" >/dev/null 2>&1; then :
7682
00020c16
ILT
7683else
7684 ac_cv_header_stdc=no
7685fi
7686rm -f conftest*
18fc9bd4
RG
7687
7688fi
7689
00020c16
ILT
7690if test $ac_cv_header_stdc = yes; then
7691 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5213506e 7692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7693/* end confdefs.h. */
00020c16
ILT
7694#include <stdlib.h>
7695
7696_ACEOF
7697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7698 $EGREP "free" >/dev/null 2>&1; then :
7699
00020c16
ILT
7700else
7701 ac_cv_header_stdc=no
7702fi
7703rm -f conftest*
7704
7705fi
7706
7707if test $ac_cv_header_stdc = yes; then
7708 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213506e 7709 if test "$cross_compiling" = yes; then :
00020c16
ILT
7710 :
7711else
5213506e 7712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7713/* end confdefs.h. */
7714#include <ctype.h>
5213506e 7715#include <stdlib.h>
00020c16
ILT
7716#if ((' ' & 0x0FF) == 0x020)
7717# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7718# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7719#else
7720# define ISLOWER(c) \
7721 (('a' <= (c) && (c) <= 'i') \
7722 || ('j' <= (c) && (c) <= 'r') \
7723 || ('s' <= (c) && (c) <= 'z'))
7724# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7725#endif
7726
7727#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7728int
7729main ()
7730{
7731 int i;
7732 for (i = 0; i < 256; i++)
7733 if (XOR (islower (i), ISLOWER (i))
7734 || toupper (i) != TOUPPER (i))
5213506e
RW
7735 return 2;
7736 return 0;
00020c16
ILT
7737}
7738_ACEOF
5213506e 7739if ac_fn_c_try_run "$LINENO"; then :
00020c16 7740
5213506e
RW
7741else
7742 ac_cv_header_stdc=no
00020c16 7743fi
5213506e
RW
7744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7745 conftest.$ac_objext conftest.beam conftest.$ac_ext
00020c16 7746fi
5213506e 7747
00020c16
ILT
7748fi
7749fi
5213506e
RW
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7751$as_echo "$ac_cv_header_stdc" >&6; }
00020c16
ILT
7752if test $ac_cv_header_stdc = yes; then
7753
5213506e 7754$as_echo "#define STDC_HEADERS 1" >>confdefs.h
00020c16
ILT
7755
7756fi
7757
5213506e
RW
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7759$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7760if test "${ac_cv_header_time+set}" = set; then :
7761 $as_echo_n "(cached) " >&6
00020c16 7762else
5213506e 7763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7764/* end confdefs.h. */
7765#include <sys/types.h>
7766#include <sys/time.h>
7767#include <time.h>
7768
7769int
7770main ()
7771{
7772if ((struct tm *) 0)
7773return 0;
7774 ;
7775 return 0;
7776}
7777_ACEOF
5213506e 7778if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7779 ac_cv_header_time=yes
7780else
5213506e 7781 ac_cv_header_time=no
00020c16 7782fi
5213506e 7783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7784fi
5213506e
RW
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7786$as_echo "$ac_cv_header_time" >&6; }
00020c16
ILT
7787if test $ac_cv_header_time = yes; then
7788
5213506e 7789$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
00020c16
ILT
7790
7791fi
7792
5213506e
RW
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
7794$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
7795if test "${gcc_cv_header_string+set}" = set; then :
7796 $as_echo_n "(cached) " >&6
00020c16 7797else
5213506e 7798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7799/* end confdefs.h. */
7800#include <string.h>
7801#include <strings.h>
7802int
7803main ()
7804{
7805
7806 ;
7807 return 0;
7808}
7809_ACEOF
5213506e 7810if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7811 gcc_cv_header_string=yes
7812else
5213506e 7813 gcc_cv_header_string=no
00020c16 7814fi
5213506e 7815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7816fi
5213506e
RW
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
7818$as_echo "$gcc_cv_header_string" >&6; }
00020c16
ILT
7819if test $gcc_cv_header_string = yes; then
7820
5213506e 7821$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
00020c16
ILT
7822
7823fi
7824
5213506e
RW
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7826$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7827if test "${ac_cv_header_sys_wait_h+set}" = set; then :
7828 $as_echo_n "(cached) " >&6
00020c16 7829else
5213506e 7830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7831/* end confdefs.h. */
7832#include <sys/types.h>
7833#include <sys/wait.h>
7834#ifndef WEXITSTATUS
5213506e 7835# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
7836#endif
7837#ifndef WIFEXITED
ba479fd2 7838# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7839#endif
ba479fd2
NN
7840
7841int
7842main ()
7843{
7844 int s;
7845 wait (&s);
5213506e
RW
7846 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7847 ;
7848 return 0;
7849}
7850_ACEOF
7851if ac_fn_c_try_compile "$LINENO"; then :
7852 ac_cv_header_sys_wait_h=yes
7853else
7854 ac_cv_header_sys_wait_h=no
7855fi
7856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7857fi
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7859$as_echo "$ac_cv_header_sys_wait_h" >&6; }
7860if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2 7861
5213506e 7862$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba479fd2 7863
5213506e 7864fi
dfb77e37
KC
7865
7866for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 7867 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 7868 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 7869 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
5213506e
RW
7870do :
7871 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7872ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
7873eval as_val=\$$as_ac_Header
7874 if test "x$as_val" = x""yes; then :
ba479fd2 7875 cat >>confdefs.h <<_ACEOF
5213506e 7876#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2
NN
7877_ACEOF
7878
956d6950
JL
7879fi
7880done
7881
7882
f24af81b 7883# Check for thread headers.
5213506e
RW
7884ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
7885if test "x$ac_cv_header_thread_h" = x""yes; then :
f24af81b
TT
7886 have_thread_h=yes
7887else
ba479fd2 7888 have_thread_h=
f24af81b
TT
7889fi
7890
5213506e
RW
7891ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
7892if test "x$ac_cv_header_pthread_h" = x""yes; then :
f24af81b
TT
7893 have_pthread_h=yes
7894else
ba479fd2 7895 have_pthread_h=
f24af81b
TT
7896fi
7897
7898
84c041a1 7899# These tests can't be done till we know if we have limits.h.
5213506e
RW
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5
7901$as_echo_n "checking for CHAR_BIT... " >&6; }
7902if test "${gcc_cv_decl_char_bit+set}" = set; then :
7903 $as_echo_n "(cached) " >&6
ba479fd2 7904else
5213506e 7905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7906/* end confdefs.h. */
75e93faa
ZW
7907#ifdef HAVE_LIMITS_H
7908#include <limits.h>
7909#endif
7910#ifdef CHAR_BIT
7911found
7912#endif
ba479fd2 7913_ACEOF
75e93faa 7914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e 7915 $EGREP "found" >/dev/null 2>&1; then :
75e93faa
ZW
7916 gcc_cv_decl_char_bit=yes
7917else
75e93faa
ZW
7918 gcc_cv_decl_char_bit=no
7919fi
7920rm -f conftest*
7921
7922
7923fi
5213506e
RW
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5
7925$as_echo "$gcc_cv_decl_char_bit" >&6; }
75e93faa 7926if test $gcc_cv_decl_char_bit = no; then
5213506e
RW
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5
7928$as_echo_n "checking number of bits in a byte... " >&6; }
7929if test "${gcc_cv_c_nbby+set}" = set; then :
7930 $as_echo_n "(cached) " >&6
75e93faa
ZW
7931else
7932 i=8
7933 gcc_cv_c_nbby=
7934 while test $i -lt 65; do
5213506e 7935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
7936/* end confdefs.h. */
7937
7938int
7939main ()
7940{
4e70264f
ZW
7941switch(0) {
7942 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
7943 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
7944 ; }
ba479fd2
NN
7945 ;
7946 return 0;
7947}
7948_ACEOF
5213506e 7949if ac_fn_c_try_compile "$LINENO"; then :
4e70264f 7950 gcc_cv_c_nbby=$i; break
75e93faa 7951fi
5213506e 7952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
7953 i=`expr $i + 1`
7954 done
7955 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
7956
7957fi
5213506e
RW
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5
7959$as_echo "$gcc_cv_c_nbby" >&6; }
75e93faa 7960if test $gcc_cv_c_nbby = failed; then
5213506e 7961 as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5
75e93faa 7962else
ba479fd2
NN
7963
7964cat >>confdefs.h <<_ACEOF
75e93faa 7965#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 7966_ACEOF
75e93faa
ZW
7967
7968fi
7969fi
5213506e
RW
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7971$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7972if test "${ac_cv_c_bigendian+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
84c041a1 7974else
5213506e
RW
7975 ac_cv_c_bigendian=unknown
7976 # See if we're dealing with a universal compiler.
7977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978/* end confdefs.h. */
7979#ifndef __APPLE_CC__
7980 not a universal capable compiler
7981 #endif
7982 typedef int dummy;
7983
7984_ACEOF
7985if ac_fn_c_try_compile "$LINENO"; then :
7986
7987 # Check for potential -arch flags. It is not universal unless
7988 # there are at least two -arch flags with different values.
7989 ac_arch=
7990 ac_prev=
7991 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7992 if test -n "$ac_prev"; then
7993 case $ac_word in
7994 i?86 | x86_64 | ppc | ppc64)
7995 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7996 ac_arch=$ac_word
7997 else
7998 ac_cv_c_bigendian=universal
7999 break
8000 fi
8001 ;;
8002 esac
8003 ac_prev=
8004 elif test "x$ac_word" = "x-arch"; then
8005 ac_prev=arch
8006 fi
8007 done
8008fi
8009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8010 if test $ac_cv_c_bigendian = unknown; then
8011 # See if sys/param.h defines the BYTE_ORDER macro.
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8013/* end confdefs.h. */
4977bab6 8014#include <sys/types.h>
5213506e 8015 #include <sys/param.h>
9791c75c 8016
ba479fd2
NN
8017int
8018main ()
8019{
5213506e
RW
8020#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8021 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8022 && LITTLE_ENDIAN)
8023 bogus endian macros
8024 #endif
9791c75c 8025
ba479fd2
NN
8026 ;
8027 return 0;
8028}
8029_ACEOF
5213506e 8030if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6 8031 # It does; now see whether it defined to BIG_ENDIAN or not.
5213506e 8032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8033/* end confdefs.h. */
4977bab6 8034#include <sys/types.h>
5213506e 8035 #include <sys/param.h>
9791c75c 8036
ba479fd2
NN
8037int
8038main ()
8039{
4977bab6 8040#if BYTE_ORDER != BIG_ENDIAN
5213506e
RW
8041 not big endian
8042 #endif
9791c75c 8043
ba479fd2
NN
8044 ;
8045 return 0;
8046}
8047_ACEOF
5213506e 8048if ac_fn_c_try_compile "$LINENO"; then :
b61ff9c8
BS
8049 ac_cv_c_bigendian=yes
8050else
5213506e 8051 ac_cv_c_bigendian=no
4977bab6 8052fi
5213506e
RW
8053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8054fi
8055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8056 fi
8057 if test $ac_cv_c_bigendian = unknown; then
8058 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8060/* end confdefs.h. */
8061#include <limits.h>
ba479fd2 8062
5213506e
RW
8063int
8064main ()
8065{
8066#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8067 bogus endian macros
8068 #endif
8069
8070 ;
8071 return 0;
8072}
9791c75c 8073_ACEOF
5213506e
RW
8074if ac_fn_c_try_compile "$LINENO"; then :
8075 # It does; now see whether it defined to _BIG_ENDIAN or not.
8076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791c75c 8077/* end confdefs.h. */
5213506e
RW
8078#include <limits.h>
8079
9791c75c
KC
8080int
8081main ()
8082{
5213506e
RW
8083#ifndef _BIG_ENDIAN
8084 not big endian
8085 #endif
8086
9791c75c
KC
8087 ;
8088 return 0;
8089}
8090_ACEOF
5213506e 8091if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a 8092 ac_cv_c_bigendian=yes
5213506e
RW
8093else
8094 ac_cv_c_bigendian=no
8b1f719a 8095fi
5213506e 8096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9791c75c 8097fi
5213506e
RW
8098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8099 fi
8100 if test $ac_cv_c_bigendian = unknown; then
8101 # Compile a test program.
8102 if test "$cross_compiling" = yes; then :
8103 # Try to guess by grepping values from an object file.
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105/* end confdefs.h. */
8106short int ascii_mm[] =
8107 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8108 short int ascii_ii[] =
8109 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8110 int use_ascii (int i) {
8111 return ascii_mm[i] + ascii_ii[i];
8112 }
8113 short int ebcdic_ii[] =
8114 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8115 short int ebcdic_mm[] =
8116 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8117 int use_ebcdic (int i) {
8118 return ebcdic_mm[i] + ebcdic_ii[i];
8119 }
8120 extern int foo;
9791c75c 8121
5213506e
RW
8122int
8123main ()
8124{
8125return use_ascii (foo) == use_ebcdic (foo);
8126 ;
8127 return 0;
8128}
8129_ACEOF
8130if ac_fn_c_try_compile "$LINENO"; then :
8131 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8132 ac_cv_c_bigendian=yes
8133 fi
8134 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8135 if test "$ac_cv_c_bigendian" = unknown; then
8136 ac_cv_c_bigendian=no
8137 else
8138 # finding both strings is unlikely to happen, but who knows?
8139 ac_cv_c_bigendian=unknown
8140 fi
8141 fi
4977bab6 8142fi
5213506e 8143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 8144else
5213506e 8145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8146/* end confdefs.h. */
5213506e 8147$ac_includes_default
9791c75c
KC
8148int
8149main ()
8150{
5213506e
RW
8151
8152 /* Are we little or big endian? From Harbison&Steele. */
8153 union
8154 {
8155 long int l;
8156 char c[sizeof (long int)];
8157 } u;
8158 u.l = 1;
8159 return u.c[sizeof (long int) - 1] == 1;
8160
8161 ;
8162 return 0;
4977bab6 8163}
ba479fd2 8164_ACEOF
5213506e 8165if ac_fn_c_try_run "$LINENO"; then :
4977bab6
ZW
8166 ac_cv_c_bigendian=no
8167else
5213506e 8168 ac_cv_c_bigendian=yes
4977bab6 8169fi
5213506e
RW
8170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8171 conftest.$ac_objext conftest.beam conftest.$ac_ext
4977bab6 8172fi
ba479fd2 8173
5213506e
RW
8174 fi
8175fi
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8177$as_echo "$ac_cv_c_bigendian" >&6; }
8178 case $ac_cv_c_bigendian in #(
8179 yes)
8180 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8181;; #(
8182 no)
8183 ;; #(
8184 universal)
8185
8186$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8187
8188 ;; #(
8189 *)
8190 as_fn_error "unknown endianness
8191 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8192 esac
84c041a1 8193
75e93faa 8194
73458fb7
NN
8195# --------
8196# UNSORTED
8197# --------
1e608388 8198
1e608388 8199
4e70264f
ZW
8200# These libraries may be used by collect2.
8201# We may need a special search path to get them linked.
5213506e
RW
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5
8203$as_echo_n "checking for collect2 libraries... " >&6; }
8204if test "${gcc_cv_collect2_libs+set}" = set; then :
8205 $as_echo_n "(cached) " >&6
4e70264f
ZW
8206else
8207 save_LIBS="$LIBS"
7f2749d4 8208for libs in '' -lld -lmld \
4e70264f
ZW
8209 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8210 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8211do
8212 LIBS="$libs"
5213506e 8213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
8214/* end confdefs.h. */
8215
5213506e
RW
8216/* Override any GCC internal prototype to avoid an error.
8217 Use char because int might match the return type of a GCC
8218 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8219#ifdef __cplusplus
8220extern "C"
8221#endif
ba479fd2
NN
8222char ldopen ();
8223int
8224main ()
8225{
5213506e 8226return ldopen ();
ba479fd2
NN
8227 ;
8228 return 0;
8229}
8230_ACEOF
5213506e 8231if ac_fn_c_try_link "$LINENO"; then :
4e70264f 8232 gcc_cv_collect2_libs="$libs"; break
4e70264f 8233fi
5213506e
RW
8234rm -f core conftest.err conftest.$ac_objext \
8235 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8236done
8237LIBS="$save_LIBS"
8238test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8239fi
5213506e
RW
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5
8241$as_echo "$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
8242case $gcc_cv_collect2_libs in
8243 "none required") ;;
8244 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8245esac
8246
8247
7f2749d4
RK
8248# When building Ada code on Alpha, we need exc_resume which is usually in
8249# -lexc. So test for it.
8250save_LIBS="$LIBS"
8251LIBS=
5213506e
RW
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5
8253$as_echo_n "checking for library containing exc_resume... " >&6; }
8254if test "${ac_cv_search_exc_resume+set}" = set; then :
8255 $as_echo_n "(cached) " >&6
ba479fd2
NN
8256else
8257 ac_func_search_save_LIBS=$LIBS
5213506e 8258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8259/* end confdefs.h. */
7f2749d4 8260
5213506e
RW
8261/* Override any GCC internal prototype to avoid an error.
8262 Use char because int might match the return type of a GCC
b61ff9c8 8263 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8264#ifdef __cplusplus
8265extern "C"
8266#endif
b61ff9c8
BS
8267char exc_resume ();
8268int
8269main ()
8270{
5213506e 8271return exc_resume ();
b61ff9c8
BS
8272 ;
8273 return 0;
8274}
8275_ACEOF
5213506e
RW
8276for ac_lib in '' exc; do
8277 if test -z "$ac_lib"; then
8278 ac_res="none required"
8279 else
8280 ac_res=-l$ac_lib
8281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8282 fi
8283 if ac_fn_c_try_link "$LINENO"; then :
8284 ac_cv_search_exc_resume=$ac_res
b8ec3cc8 8285fi
5213506e
RW
8286rm -f core conftest.err conftest.$ac_objext \
8287 conftest$ac_exeext
8288 if test "${ac_cv_search_exc_resume+set}" = set; then :
8289 break
b8ec3cc8 8290fi
5213506e
RW
8291done
8292if test "${ac_cv_search_exc_resume+set}" = set; then :
8293
dd7f7a6e 8294else
5213506e
RW
8295 ac_cv_search_exc_resume=no
8296fi
8297rm conftest.$ac_ext
8298LIBS=$ac_func_search_save_LIBS
8299fi
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5
8301$as_echo "$ac_cv_search_exc_resume" >&6; }
8302ac_res=$ac_cv_search_exc_resume
8303if test "$ac_res" != no; then :
8304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e 8305
1a4b763e 8306fi
5213506e
RW
8307
8308GNAT_LIBEXC="$LIBS"
8309LIBS="$save_LIBS"
8310
8311
8312# Some systems put ldexp and frexp in libm instead of libc; assume
8313# they're both in the same place. jcf-dump needs them.
8314save_LIBS="$LIBS"
8315LIBS=
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5
8317$as_echo_n "checking for library containing ldexp... " >&6; }
8318if test "${ac_cv_search_ldexp+set}" = set; then :
8319 $as_echo_n "(cached) " >&6
8320else
8321 ac_func_search_save_LIBS=$LIBS
8322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b61ff9c8 8323/* end confdefs.h. */
2f41c1d6 8324
5213506e
RW
8325/* Override any GCC internal prototype to avoid an error.
8326 Use char because int might match the return type of a GCC
8327 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8328#ifdef __cplusplus
8329extern "C"
8330#endif
b61ff9c8
BS
8331char ldexp ();
8332int
8333main ()
8334{
5213506e 8335return ldexp ();
b61ff9c8
BS
8336 ;
8337 return 0;
8338}
8339_ACEOF
5213506e
RW
8340for ac_lib in '' m; do
8341 if test -z "$ac_lib"; then
8342 ac_res="none required"
8343 else
8344 ac_res=-l$ac_lib
8345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8346 fi
8347 if ac_fn_c_try_link "$LINENO"; then :
8348 ac_cv_search_ldexp=$ac_res
b61ff9c8 8349fi
5213506e
RW
8350rm -f core conftest.err conftest.$ac_objext \
8351 conftest$ac_exeext
8352 if test "${ac_cv_search_ldexp+set}" = set; then :
8353 break
8354fi
8355done
8356if test "${ac_cv_search_ldexp+set}" = set; then :
8357
8358else
8359 ac_cv_search_ldexp=no
dd7f7a6e 8360fi
5213506e 8361rm conftest.$ac_ext
dd7f7a6e
EC
8362LIBS=$ac_func_search_save_LIBS
8363fi
5213506e
RW
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5
8365$as_echo "$ac_cv_search_ldexp" >&6; }
8366ac_res=$ac_cv_search_ldexp
8367if test "$ac_res" != no; then :
8368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
8369
8370fi
8371
8372LDEXP_LIB="$LIBS"
8373LIBS="$save_LIBS"
8374
8375
8376# Use <inttypes.h> only if it exists,
8377# doesn't clash with <sys/types.h>, and declares intmax_t.
5213506e
RW
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8379$as_echo_n "checking for inttypes.h... " >&6; }
8380if test "${gcc_cv_header_inttypes_h+set}" = set; then :
8381 $as_echo_n "(cached) " >&6
dd7f7a6e 8382else
5213506e 8383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd7f7a6e
EC
8384/* end confdefs.h. */
8385#include <sys/types.h>
8386#include <inttypes.h>
8387int
8388main ()
8389{
8390intmax_t i = -1;
8391 ;
8392 return 0;
8393}
8394_ACEOF
5213506e 8395if ac_fn_c_try_compile "$LINENO"; then :
dd7f7a6e
EC
8396 gcc_cv_header_inttypes_h=yes
8397else
5213506e 8398 gcc_cv_header_inttypes_h=no
dd7f7a6e 8399fi
5213506e 8400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
8401fi
8402
5213506e
RW
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5
8404$as_echo "$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
8405if test $gcc_cv_header_inttypes_h = yes; then
8406
5213506e 8407$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
dd7f7a6e 8408
0056a9b5 8409fi
956d6950 8410
c149cc37 8411
ba479fd2 8412
52a6edcc 8413for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 8414 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
8415 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
8416 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
8417do :
8418 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8419ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8420eval as_val=\$$as_ac_var
8421 if test "x$as_val" = x""yes; then :
ba479fd2 8422 cat >>confdefs.h <<_ACEOF
5213506e 8423#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2 8424_ACEOF
956d6950 8425
956d6950
JL
8426fi
8427done
8428
6885fc87 8429
8ccb78f2
RO
8430save_CPPFLAGS="$CPPFLAGS"
8431save_LIBS="$LIBS"
8432LIBS="$LIBS $LIBELFLIBS"
8433for ac_func in elf_getshdrstrndx
8434do :
8435 ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx"
8436if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then :
8437 cat >>confdefs.h <<_ACEOF
8438#define HAVE_ELF_GETSHDRSTRNDX 1
8439_ACEOF
8440
8441else
8442 for ac_func in elf_getshstrndx
8443do :
8444 ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx"
8445if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then :
8446 cat >>confdefs.h <<_ACEOF
8447#define HAVE_ELF_GETSHSTRNDX 1
8448_ACEOF
8449 if test "$cross_compiling" = yes; then :
8450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8452as_fn_error "cannot run test program while cross compiling
8453See \`config.log' for more details." "$LINENO" 5; }
8454else
8455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8456/* end confdefs.h. */
8457#include <stdlib.h>
8458#include <libelf.h>
8459int main()
8460{
8461 return elf_getshstrndx (NULL, 0) == 0;
479881c3 8462}
8ccb78f2
RO
8463_ACEOF
8464if ac_fn_c_try_run "$LINENO"; then :
8465
479881c3
RG
8466$as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h
8467
8ccb78f2
RO
8468fi
8469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8470 conftest.$ac_objext conftest.beam conftest.$ac_ext
8471fi
8472
8473fi
8474done
8475
8476
8477fi
8478done
8479
8480LIBS="$save_LIBS"
8481CPPFLAGS="$save_CPPFLAGS"
8482
39f6c4c8 8483if test x$ac_cv_func_mbstowcs = xyes; then
5213506e
RW
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5
8485$as_echo_n "checking whether mbstowcs works... " >&6; }
8486if test "${gcc_cv_func_mbstowcs_works+set}" = set; then :
8487 $as_echo_n "(cached) " >&6
39f6c4c8 8488else
5213506e 8489 if test "$cross_compiling" = yes; then :
39f6c4c8
KW
8490 gcc_cv_func_mbstowcs_works=yes
8491else
5213506e 8492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8493/* end confdefs.h. */
39f6c4c8
KW
8494#include <stdlib.h>
8495int main()
8496{
8497 mbstowcs(0, "", 0);
8498 return 0;
8499}
ba479fd2 8500_ACEOF
5213506e 8501if ac_fn_c_try_run "$LINENO"; then :
39f6c4c8
KW
8502 gcc_cv_func_mbstowcs_works=yes
8503else
5213506e 8504 gcc_cv_func_mbstowcs_works=no
39f6c4c8 8505fi
5213506e
RW
8506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8507 conftest.$ac_objext conftest.beam conftest.$ac_ext
39f6c4c8 8508fi
5213506e 8509
39f6c4c8 8510fi
5213506e
RW
8511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5
8512$as_echo "$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 8513 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2 8514
5213506e 8515$as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h
39f6c4c8
KW
8516
8517 fi
8518fi
8519
5213506e
RW
8520ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
8521if test "x$ac_cv_type_ssize_t" = x""yes; then :
6e3f3080 8522
8b4fc07a 8523else
ba479fd2 8524
8b4fc07a 8525cat >>confdefs.h <<_ACEOF
f12bc141 8526#define ssize_t int
ba479fd2 8527_ACEOF
f12bc141
ZW
8528
8529fi
8530
5213506e
RW
8531ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
8532if test "x$ac_cv_type_caddr_t" = x""yes; then :
bba09b5a 8533
bba09b5a
AT
8534else
8535
8536cat >>confdefs.h <<_ACEOF
8537#define caddr_t char *
8538_ACEOF
8539
8540fi
8541
0b9d02c6 8542
3b0727a0 8543
5213506e
RW
8544ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
8545if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
3b0727a0
MR
8546 gcc_header_sys_mman_h=yes
8547else
8548 gcc_header_sys_mman_h=no
8549fi
5213506e
RW
8550
8551ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
8552if test "x$ac_cv_func_mmap" = x""yes; then :
3b0727a0
MR
8553 gcc_func_mmap=yes
8554else
8555 gcc_func_mmap=no
8556fi
8557
8558if test "$gcc_header_sys_mman_h" != yes \
8559 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
8560 gcc_cv_func_mmap_file=no
8561 gcc_cv_func_mmap_dev_zero=no
8562 gcc_cv_func_mmap_anon=no
8563else
5213506e
RW
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5
8565$as_echo_n "checking whether read-only mmap of a plain file works... " >&6; }
8566if test "${gcc_cv_func_mmap_file+set}" = set; then :
8567 $as_echo_n "(cached) " >&6
1072ec3f 8568else
ba479fd2 8569 # Add a system to this blacklist if
1072ec3f
ZW
8570 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
8571 # memory area containing the same data that you'd get if you applied
8572 # read() to the same fd. The only system known to have a problem here
8573 # is VMS, where text files have record structure.
8574 case "$host_os" in
ba479fd2 8575 vms* | ultrix*)
1072ec3f
ZW
8576 gcc_cv_func_mmap_file=no ;;
8577 *)
8578 gcc_cv_func_mmap_file=yes;;
8579 esac
8580fi
5213506e
RW
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5
8582$as_echo "$gcc_cv_func_mmap_file" >&6; }
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5
8584$as_echo_n "checking whether mmap from /dev/zero works... " >&6; }
8585if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then :
8586 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8587else
8588 # Add a system to this blacklist if it has mmap() but /dev/zero
8589 # does not exist, or if mmapping /dev/zero does not give anonymous
8590 # zeroed pages with both the following properties:
8591 # 1. If you map N consecutive pages in with one call, and then
8592 # unmap any subset of those pages, the pages that were not
8593 # explicitly unmapped remain accessible.
8594 # 2. If you map two adjacent blocks of memory and then unmap them
8595 # both at once, they must both go away.
8596 # Systems known to be in this category are Windows (all variants),
8597 # VMS, and Darwin.
8598 case "$host_os" in
2ce240d3 8599 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
8600 gcc_cv_func_mmap_dev_zero=no ;;
8601 *)
8602 gcc_cv_func_mmap_dev_zero=yes;;
8603 esac
8604fi
5213506e
RW
8605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5
8606$as_echo "$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
8607
8608 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
5213506e
RW
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
8610$as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
8611if test "${gcc_cv_decl_map_anon+set}" = set; then :
8612 $as_echo_n "(cached) " >&6
ba479fd2 8613else
5213506e 8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8615/* end confdefs.h. */
1072ec3f
ZW
8616#include <sys/types.h>
8617#include <sys/mman.h>
8618#include <unistd.h>
8619
8620#ifndef MAP_ANONYMOUS
8621#define MAP_ANONYMOUS MAP_ANON
8622#endif
8623
ba479fd2
NN
8624int
8625main ()
8626{
1072ec3f 8627int n = MAP_ANONYMOUS;
ba479fd2
NN
8628 ;
8629 return 0;
8630}
8631_ACEOF
5213506e 8632if ac_fn_c_try_compile "$LINENO"; then :
1072ec3f
ZW
8633 gcc_cv_decl_map_anon=yes
8634else
5213506e 8635 gcc_cv_decl_map_anon=no
1072ec3f 8636fi
5213506e 8637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 8638fi
5213506e
RW
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5
8640$as_echo "$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
8641
8642 if test $gcc_cv_decl_map_anon = no; then
8643 gcc_cv_func_mmap_anon=no
8644 else
5213506e
RW
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
8646$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
8647if test "${gcc_cv_func_mmap_anon+set}" = set; then :
8648 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8649else
8650 # Add a system to this blacklist if it has mmap() and MAP_ANON or
8651 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
8652 # doesn't give anonymous zeroed pages with the same properties listed
8653 # above for use of /dev/zero.
8654 # Systems known to be in this category are Windows, VMS, and SCO Unix.
8655 case "$host_os" in
8656 vms* | cygwin* | pe | mingw* | sco* | udk* )
8657 gcc_cv_func_mmap_anon=no ;;
8658 *)
8659 gcc_cv_func_mmap_anon=yes;;
8660 esac
8661fi
5213506e
RW
8662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5
8663$as_echo "$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
8664 fi
8665fi
8666
8667if test $gcc_cv_func_mmap_file = yes; then
ba479fd2 8668
5213506e 8669$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
1072ec3f
ZW
8670
8671fi
8672if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2 8673
5213506e 8674$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
1072ec3f
ZW
8675
8676fi
8677if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2 8678
5213506e 8679$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
1072ec3f
ZW
8680
8681fi
8682
b27d2bd5
MK
8683
8684case "${host}" in
ee262b6f 8685*-*-*vms*)
ba479fd2 8686 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
8687 # won't work, and it isn't easily adaptable. It makes more sense to
8688 # just force it.
8689 ac_cv_func_vfork_works=yes
8690 ;;
b27d2bd5 8691esac
5213506e
RW
8692ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8693if test "x$ac_cv_type_pid_t" = x""yes; then :
6e3f3080 8694
ba479fd2
NN
8695else
8696
8697cat >>confdefs.h <<_ACEOF
c375c43b 8698#define pid_t int
ba479fd2 8699_ACEOF
c375c43b
KG
8700
8701fi
8702
5213506e
RW
8703for ac_header in vfork.h
8704do :
8705 ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
8706if test "x$ac_cv_header_vfork_h" = x""yes; then :
ba479fd2 8707 cat >>confdefs.h <<_ACEOF
5213506e 8708#define HAVE_VFORK_H 1
ba479fd2 8709_ACEOF
6e3f3080
NN
8710
8711fi
ba479fd2
NN
8712done
8713
ba479fd2 8714for ac_func in fork vfork
5213506e
RW
8715do :
8716 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8717ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8718eval as_val=\$$as_ac_var
8719 if test "x$as_val" = x""yes; then :
ba479fd2 8720 cat >>confdefs.h <<_ACEOF
5213506e 8721#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2
NN
8722_ACEOF
8723
c375c43b 8724fi
ba479fd2 8725done
c375c43b 8726
ba479fd2 8727if test "x$ac_cv_func_fork" = xyes; then
5213506e
RW
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8729$as_echo_n "checking for working fork... " >&6; }
8730if test "${ac_cv_func_fork_works+set}" = set; then :
8731 $as_echo_n "(cached) " >&6
c375c43b 8732else
5213506e 8733 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8734 ac_cv_func_fork_works=cross
8735else
5213506e
RW
8736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8737/* end confdefs.h. */
8738$ac_includes_default
8739int
8740main ()
8741{
8742
8743 /* By Ruediger Kuhlmann. */
8744 return fork () < 0;
8745
8746 ;
8747 return 0;
8748}
1a4b763e 8749_ACEOF
5213506e 8750if ac_fn_c_try_run "$LINENO"; then :
ba479fd2
NN
8751 ac_cv_func_fork_works=yes
8752else
5213506e 8753 ac_cv_func_fork_works=no
ba479fd2 8754fi
5213506e
RW
8755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8756 conftest.$ac_objext conftest.beam conftest.$ac_ext
ba479fd2 8757fi
5213506e 8758
ba479fd2 8759fi
5213506e
RW
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8761$as_echo "$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
8762
8763else
8764 ac_cv_func_fork_works=$ac_cv_func_fork
8765fi
8766if test "x$ac_cv_func_fork_works" = xcross; then
8767 case $host in
8768 *-*-amigaos* | *-*-msdosdjgpp*)
8769 # Override, as these systems have only a dummy fork() stub
8770 ac_cv_func_fork_works=no
8771 ;;
8772 *)
8773 ac_cv_func_fork_works=yes
8774 ;;
8775 esac
5213506e
RW
8776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8777$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 8778fi
c375c43b 8779ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 8780if test "x$ac_cv_func_vfork" = xyes; then
5213506e
RW
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8782$as_echo_n "checking for working vfork... " >&6; }
8783if test "${ac_cv_func_vfork_works+set}" = set; then :
8784 $as_echo_n "(cached) " >&6
c375c43b 8785else
5213506e 8786 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8787 ac_cv_func_vfork_works=cross
8788else
5213506e 8789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8790/* end confdefs.h. */
c375c43b 8791/* Thanks to Paul Eggert for this test. */
5213506e 8792$ac_includes_default
ba479fd2 8793#include <sys/wait.h>
5213506e 8794#ifdef HAVE_VFORK_H
ba479fd2 8795# include <vfork.h>
c375c43b
KG
8796#endif
8797/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
8798 argument registers are propagated back to the parent. The compiler
8799 is told about this with #include <vfork.h>, but some compilers
8800 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8801 static variable whose address is put into a register that is
8802 clobbered by the vfork. */
8803static void
c375c43b
KG
8804#ifdef __cplusplus
8805sparc_address_test (int arg)
ba479fd2 8806# else
c375c43b
KG
8807sparc_address_test (arg) int arg;
8808#endif
8809{
8810 static pid_t child;
8811 if (!child) {
8812 child = vfork ();
8813 if (child < 0) {
8814 perror ("vfork");
8815 _exit(2);
8816 }
8817 if (!child) {
8818 arg = getpid();
8819 write(-1, "", 0);
8820 _exit (arg);
8821 }
8822 }
8823}
ba479fd2
NN
8824
8825int
8826main ()
8827{
c375c43b
KG
8828 pid_t parent = getpid ();
8829 pid_t child;
8830
ba479fd2 8831 sparc_address_test (0);
c375c43b
KG
8832
8833 child = vfork ();
8834
8835 if (child == 0) {
ba479fd2
NN
8836 /* Here is another test for sparc vfork register problems. This
8837 test uses lots of local variables, at least as many local
8838 variables as main has allocated so far including compiler
8839 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8840 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8841 reuse the register of parent for one of the local variables,
8842 since it will think that parent can't possibly be used any more
8843 in this routine. Assigning to the local variable will thus
8844 munge parent in the parent process. */
c375c43b
KG
8845 pid_t
8846 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8847 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8848 /* Convince the compiler that p..p7 are live; otherwise, it might
8849 use the same hardware register for all 8 local variables. */
8850 if (p != p1 || p != p2 || p != p3 || p != p4
8851 || p != p5 || p != p6 || p != p7)
8852 _exit(1);
8853
ba479fd2
NN
8854 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8855 from child file descriptors. If the child closes a descriptor
8856 before it execs or exits, this munges the parent's descriptor
8857 as well. Test for this by closing stdout in the child. */
c375c43b
KG
8858 _exit(close(fileno(stdout)) != 0);
8859 } else {
8860 int status;
8861 struct stat st;
8862
8863 while (wait(&status) != child)
8864 ;
5213506e 8865 return (
c375c43b
KG
8866 /* Was there some problem with vforking? */
8867 child < 0
8868
8869 /* Did the child fail? (This shouldn't happen.) */
8870 || status
8871
8872 /* Did the vfork/compiler bug occur? */
8873 || parent != getpid()
8874
8875 /* Did the file descriptor bug occur? */
8876 || fstat(fileno(stdout), &st) != 0
8877 );
8878 }
8879}
ba479fd2 8880_ACEOF
5213506e 8881if ac_fn_c_try_run "$LINENO"; then :
c375c43b
KG
8882 ac_cv_func_vfork_works=yes
8883else
5213506e 8884 ac_cv_func_vfork_works=no
cafe096b 8885fi
5213506e
RW
8886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8887 conftest.$ac_objext conftest.beam conftest.$ac_ext
6e3f3080 8888fi
5213506e 8889
ba479fd2 8890fi
5213506e
RW
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8892$as_echo "$ac_cv_func_vfork_works" >&6; }
c375c43b 8893
ba479fd2
NN
8894fi;
8895if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 8896 ac_cv_func_vfork_works=$ac_cv_func_vfork
5213506e
RW
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8898$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
8899fi
8900
ba479fd2
NN
8901if test "x$ac_cv_func_vfork_works" = xyes; then
8902
5213506e 8903$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
ba479fd2
NN
8904
8905else
8906
5213506e 8907$as_echo "#define vfork fork" >>confdefs.h
c375c43b
KG
8908
8909fi
ba479fd2
NN
8910if test "x$ac_cv_func_fork_works" = xyes; then
8911
5213506e 8912$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
ba479fd2
NN
8913
8914fi
8915
c375c43b 8916
81bf3d9e 8917
dfb77e37
KC
8918 if test "X$prefix" = "XNONE"; then
8919 acl_final_prefix="$ac_default_prefix"
8920 else
8921 acl_final_prefix="$prefix"
8922 fi
8923 if test "X$exec_prefix" = "XNONE"; then
8924 acl_final_exec_prefix='${prefix}'
8925 else
8926 acl_final_exec_prefix="$exec_prefix"
8927 fi
8928 acl_save_prefix="$prefix"
8929 prefix="$acl_final_prefix"
8930 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8931 prefix="$acl_save_prefix"
f91abfce
TT
8932
8933
5213506e
RW
8934# Check whether --with-gnu-ld was given.
8935if test "${with_gnu_ld+set}" = set; then :
8936 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 8937else
dfb77e37 8938 with_gnu_ld=no
5213506e
RW
8939fi
8940
dfb77e37
KC
8941# Prepare PATH_SEPARATOR.
8942# The user is always right.
8943if test "${PATH_SEPARATOR+set}" != set; then
8944 echo "#! /bin/sh" >conf$$.sh
8945 echo "exit 0" >>conf$$.sh
8946 chmod +x conf$$.sh
8947 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8948 PATH_SEPARATOR=';'
ba479fd2 8949 else
dfb77e37 8950 PATH_SEPARATOR=:
ba479fd2 8951 fi
dfb77e37
KC
8952 rm -f conf$$.sh
8953fi
8954ac_prog=ld
8955if test "$GCC" = yes; then
8956 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
8957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8958$as_echo_n "checking for ld used by GCC... " >&6; }
dfb77e37
KC
8959 case $host in
8960 *-*-mingw*)
8961 # gcc leaves a trailing carriage return which upsets mingw
8962 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8963 *)
8964 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8965 esac
8966 case $ac_prog in
8967 # Accept absolute paths.
8968 [\\/]* | [A-Za-z]:[\\/]*)
8969 re_direlt='/[^/][^/]*/\.\./'
8970 # Canonicalize the path of ld
8971 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8972 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8973 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8974 done
8975 test -z "$LD" && LD="$ac_prog"
8976 ;;
8977 "")
8978 # If it fails, then pretend we aren't using GCC.
8979 ac_prog=ld
8980 ;;
8981 *)
8982 # If it is relative, then search for the first ld in PATH.
8983 with_gnu_ld=unknown
8984 ;;
8985 esac
8986elif test "$with_gnu_ld" = yes; then
5213506e
RW
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8988$as_echo_n "checking for GNU ld... " >&6; }
ba479fd2 8989else
5213506e
RW
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8991$as_echo_n "checking for non-GNU ld... " >&6; }
ba479fd2 8992fi
5213506e
RW
8993if test "${acl_cv_path_LD+set}" = set; then :
8994 $as_echo_n "(cached) " >&6
ba479fd2 8995else
dfb77e37
KC
8996 if test -z "$LD"; then
8997 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8998 for ac_dir in $PATH; do
8999 test -z "$ac_dir" && ac_dir=.
9000 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9001 acl_cv_path_LD="$ac_dir/$ac_prog"
9002 # Check to see if the program is GNU ld. I'd rather use --version,
9003 # but apparently some GNU ld's only accept -v.
9004 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
9005 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9006 test "$with_gnu_ld" != no && break
9007 else
9008 test "$with_gnu_ld" != yes && break
9009 fi
dfb77e37
KC
9010 fi
9011 done
9012 IFS="$ac_save_ifs"
9013else
9014 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9015fi
9016fi
ba479fd2 9017
dfb77e37
KC
9018LD="$acl_cv_path_LD"
9019if test -n "$LD"; then
5213506e
RW
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9021$as_echo "$LD" >&6; }
dfb77e37 9022else
5213506e
RW
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9024$as_echo "no" >&6; }
ba479fd2 9025fi
5213506e
RW
9026test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9028$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9029if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9030 $as_echo_n "(cached) " >&6
dfb77e37
KC
9031else
9032 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
9033if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9034 acl_cv_prog_gnu_ld=yes
9035else
9036 acl_cv_prog_gnu_ld=no
9037fi
dfb77e37 9038fi
5213506e
RW
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9040$as_echo "$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
9041with_gnu_ld=$acl_cv_prog_gnu_ld
9042
9043
9044
5213506e
RW
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9046$as_echo_n "checking for shared library run path origin... " >&6; }
9047if test "${acl_cv_rpath+set}" = set; then :
9048 $as_echo_n "(cached) " >&6
dfb77e37
KC
9049else
9050
9051 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9052 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9053 . ./conftest.sh
9054 rm -f ./conftest.sh
9055 acl_cv_rpath=done
ba479fd2 9056
eb158727 9057fi
5213506e
RW
9058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9059$as_echo "$acl_cv_rpath" >&6; }
dfb77e37
KC
9060 wl="$acl_cv_wl"
9061 libext="$acl_cv_libext"
9062 shlibext="$acl_cv_shlibext"
9063 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9064 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9065 hardcode_direct="$acl_cv_hardcode_direct"
9066 hardcode_minus_L="$acl_cv_hardcode_minus_L"
5213506e
RW
9067 # Check whether --enable-rpath was given.
9068if test "${enable_rpath+set}" = set; then :
9069 enableval=$enable_rpath; :
dfb77e37
KC
9070else
9071 enable_rpath=yes
5213506e
RW
9072fi
9073
8b1f719a 9074
a6ccdbab 9075
dfb77e37
KC
9076
9077
9078
9079
9080
b639c3c2
JJ
9081 use_additional=yes
9082
9083 acl_save_prefix="$prefix"
9084 prefix="$acl_final_prefix"
9085 acl_save_exec_prefix="$exec_prefix"
9086 exec_prefix="$acl_final_exec_prefix"
9087
9088 eval additional_includedir=\"$includedir\"
9089 eval additional_libdir=\"$libdir\"
9090
9091 exec_prefix="$acl_save_exec_prefix"
9092 prefix="$acl_save_prefix"
dfb77e37
KC
9093
9094
5213506e
RW
9095# Check whether --with-libiconv-prefix was given.
9096if test "${with_libiconv_prefix+set}" = set; then :
9097 withval=$with_libiconv_prefix;
8b1f719a 9098 if test "X$withval" = "Xno"; then
b639c3c2 9099 use_additional=no
8b1f719a
PB
9100 else
9101 if test "X$withval" = "X"; then
dfb77e37
KC
9102
9103 acl_save_prefix="$prefix"
9104 prefix="$acl_final_prefix"
9105 acl_save_exec_prefix="$exec_prefix"
9106 exec_prefix="$acl_final_exec_prefix"
9107
b639c3c2
JJ
9108 eval additional_includedir=\"$includedir\"
9109 eval additional_libdir=\"$libdir\"
dfb77e37
KC
9110
9111 exec_prefix="$acl_save_exec_prefix"
9112 prefix="$acl_save_prefix"
9113
8b1f719a 9114 else
b639c3c2
JJ
9115 additional_includedir="$withval/include"
9116 additional_libdir="$withval/lib"
8b1f719a
PB
9117 fi
9118 fi
9119
5213506e
RW
9120fi
9121
dfb77e37
KC
9122 LIBICONV=
9123 LTLIBICONV=
9124 INCICONV=
9125 rpathdirs=
9126 ltrpathdirs=
9127 names_already_handled=
9128 names_next_round='iconv '
9129 while test -n "$names_next_round"; do
9130 names_this_round="$names_next_round"
9131 names_next_round=
9132 for name in $names_this_round; do
9133 already_handled=
9134 for n in $names_already_handled; do
9135 if test "$n" = "$name"; then
9136 already_handled=yes
9137 break
9138 fi
9139 done
9140 if test -z "$already_handled"; then
9141 names_already_handled="$names_already_handled $name"
9142 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9143 eval value=\"\$HAVE_LIB$uppername\"
9144 if test -n "$value"; then
9145 if test "$value" = yes; then
9146 eval value=\"\$LIB$uppername\"
9147 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
9148 eval value=\"\$LTLIB$uppername\"
9149 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
9150 else
9151 :
9152 fi
9153 else
9154 found_dir=
9155 found_la=
9156 found_so=
9157 found_a=
b639c3c2
JJ
9158 if test $use_additional = yes; then
9159 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9160 found_dir="$additional_libdir"
9161 found_so="$additional_libdir/lib$name.$shlibext"
9162 if test -f "$additional_libdir/lib$name.la"; then
9163 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9164 fi
9165 else
b639c3c2
JJ
9166 if test -f "$additional_libdir/lib$name.$libext"; then
9167 found_dir="$additional_libdir"
9168 found_a="$additional_libdir/lib$name.$libext"
9169 if test -f "$additional_libdir/lib$name.la"; then
9170 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9171 fi
9172 fi
9173 fi
9174 fi
9175 if test "X$found_dir" = "X"; then
9176 for x in $LDFLAGS $LTLIBICONV; do
9177
9178 acl_save_prefix="$prefix"
9179 prefix="$acl_final_prefix"
9180 acl_save_exec_prefix="$exec_prefix"
9181 exec_prefix="$acl_final_exec_prefix"
9182 eval x=\"$x\"
9183 exec_prefix="$acl_save_exec_prefix"
9184 prefix="$acl_save_prefix"
9185
9186 case "$x" in
9187 -L*)
9188 dir=`echo "X$x" | sed -e 's/^X-L//'`
9189 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9190 found_dir="$dir"
9191 found_so="$dir/lib$name.$shlibext"
9192 if test -f "$dir/lib$name.la"; then
9193 found_la="$dir/lib$name.la"
9194 fi
9195 else
9196 if test -f "$dir/lib$name.$libext"; then
9197 found_dir="$dir"
9198 found_a="$dir/lib$name.$libext"
9199 if test -f "$dir/lib$name.la"; then
9200 found_la="$dir/lib$name.la"
9201 fi
9202 fi
9203 fi
9204 ;;
9205 esac
9206 if test "X$found_dir" != "X"; then
9207 break
9208 fi
9209 done
9210 fi
9211 if test "X$found_dir" != "X"; then
9212 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
9213 if test "X$found_so" != "X"; then
9214 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9215 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9216 else
9217 haveit=
9218 for x in $ltrpathdirs; do
9219 if test "X$x" = "X$found_dir"; then
9220 haveit=yes
9221 break
9222 fi
9223 done
9224 if test -z "$haveit"; then
9225 ltrpathdirs="$ltrpathdirs $found_dir"
9226 fi
9227 if test "$hardcode_direct" = yes; then
9228 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9229 else
9230 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9231 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9232 haveit=
9233 for x in $rpathdirs; do
9234 if test "X$x" = "X$found_dir"; then
9235 haveit=yes
9236 break
9237 fi
9238 done
9239 if test -z "$haveit"; then
9240 rpathdirs="$rpathdirs $found_dir"
9241 fi
9242 else
9243 haveit=
9244 for x in $LDFLAGS $LIBICONV; do
9245
9246 acl_save_prefix="$prefix"
9247 prefix="$acl_final_prefix"
9248 acl_save_exec_prefix="$exec_prefix"
9249 exec_prefix="$acl_final_exec_prefix"
9250 eval x=\"$x\"
9251 exec_prefix="$acl_save_exec_prefix"
9252 prefix="$acl_save_prefix"
9253
9254 if test "X$x" = "X-L$found_dir"; then
9255 haveit=yes
9256 break
9257 fi
9258 done
9259 if test -z "$haveit"; then
9260 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
9261 fi
9262 if test "$hardcode_minus_L" != no; then
9263 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9264 else
9265 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9266 fi
9267 fi
9268 fi
9269 fi
9270 else
9271 if test "X$found_a" != "X"; then
9272 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
9273 else
9274 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
9275 fi
9276 fi
9277 additional_includedir=
9278 case "$found_dir" in
9279 */lib | */lib/)
9280 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9281 additional_includedir="$basedir/include"
9282 ;;
9283 esac
9284 if test "X$additional_includedir" != "X"; then
9285 if test "X$additional_includedir" != "X/usr/include"; then
9286 haveit=
9287 if test "X$additional_includedir" = "X/usr/local/include"; then
9288 if test -n "$GCC"; then
9289 case $host_os in
18fc9bd4 9290 linux*) haveit=yes;;
dfb77e37
KC
9291 esac
9292 fi
9293 fi
9294 if test -z "$haveit"; then
9295 for x in $CPPFLAGS $INCICONV; do
9296
9297 acl_save_prefix="$prefix"
9298 prefix="$acl_final_prefix"
9299 acl_save_exec_prefix="$exec_prefix"
9300 exec_prefix="$acl_final_exec_prefix"
9301 eval x=\"$x\"
9302 exec_prefix="$acl_save_exec_prefix"
9303 prefix="$acl_save_prefix"
9304
9305 if test "X$x" = "X-I$additional_includedir"; then
9306 haveit=yes
9307 break
9308 fi
9309 done
9310 if test -z "$haveit"; then
9311 if test -d "$additional_includedir"; then
9312 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
9313 fi
9314 fi
9315 fi
9316 fi
9317 fi
9318 if test -n "$found_la"; then
9319 save_libdir="$libdir"
9320 case "$found_la" in
9321 */* | *\\*) . "$found_la" ;;
9322 *) . "./$found_la" ;;
9323 esac
9324 libdir="$save_libdir"
9325 for dep in $dependency_libs; do
9326 case "$dep" in
9327 -L*)
9328 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9329 if test "X$additional_libdir" != "X/usr/lib"; then
9330 haveit=
9331 if test "X$additional_libdir" = "X/usr/local/lib"; then
9332 if test -n "$GCC"; then
9333 case $host_os in
18fc9bd4 9334 linux*) haveit=yes;;
dfb77e37
KC
9335 esac
9336 fi
9337 fi
9338 if test -z "$haveit"; then
9339 haveit=
9340 for x in $LDFLAGS $LIBICONV; do
9341
9342 acl_save_prefix="$prefix"
9343 prefix="$acl_final_prefix"
9344 acl_save_exec_prefix="$exec_prefix"
9345 exec_prefix="$acl_final_exec_prefix"
9346 eval x=\"$x\"
9347 exec_prefix="$acl_save_exec_prefix"
9348 prefix="$acl_save_prefix"
9349
9350 if test "X$x" = "X-L$additional_libdir"; then
9351 haveit=yes
9352 break
9353 fi
9354 done
9355 if test -z "$haveit"; then
9356 if test -d "$additional_libdir"; then
9357 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
9358 fi
9359 fi
9360 haveit=
9361 for x in $LDFLAGS $LTLIBICONV; do
9362
9363 acl_save_prefix="$prefix"
9364 prefix="$acl_final_prefix"
9365 acl_save_exec_prefix="$exec_prefix"
9366 exec_prefix="$acl_final_exec_prefix"
9367 eval x=\"$x\"
9368 exec_prefix="$acl_save_exec_prefix"
9369 prefix="$acl_save_prefix"
9370
9371 if test "X$x" = "X-L$additional_libdir"; then
9372 haveit=yes
9373 break
9374 fi
9375 done
9376 if test -z "$haveit"; then
9377 if test -d "$additional_libdir"; then
9378 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
9379 fi
9380 fi
9381 fi
9382 fi
9383 ;;
9384 -R*)
9385 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9386 if test "$enable_rpath" != no; then
9387 haveit=
9388 for x in $rpathdirs; do
9389 if test "X$x" = "X$dir"; then
9390 haveit=yes
9391 break
9392 fi
9393 done
9394 if test -z "$haveit"; then
9395 rpathdirs="$rpathdirs $dir"
9396 fi
9397 haveit=
9398 for x in $ltrpathdirs; do
9399 if test "X$x" = "X$dir"; then
9400 haveit=yes
9401 break
9402 fi
9403 done
9404 if test -z "$haveit"; then
9405 ltrpathdirs="$ltrpathdirs $dir"
9406 fi
9407 fi
9408 ;;
9409 -l*)
9410 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9411 ;;
9412 *.la)
9413 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9414 ;;
9415 *)
9416 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
9417 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
9418 ;;
9419 esac
9420 done
9421 fi
9422 else
9423 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9424 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
9425 fi
9426 fi
9427 fi
9428 done
9429 done
9430 if test "X$rpathdirs" != "X"; then
9431 if test -n "$hardcode_libdir_separator"; then
9432 alldirs=
9433 for found_dir in $rpathdirs; do
9434 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9435 done
9436 acl_save_libdir="$libdir"
9437 libdir="$alldirs"
9438 eval flag=\"$hardcode_libdir_flag_spec\"
9439 libdir="$acl_save_libdir"
9440 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9441 else
9442 for found_dir in $rpathdirs; do
9443 acl_save_libdir="$libdir"
9444 libdir="$found_dir"
9445 eval flag=\"$hardcode_libdir_flag_spec\"
9446 libdir="$acl_save_libdir"
9447 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9448 done
9449 fi
9450 fi
9451 if test "X$ltrpathdirs" != "X"; then
9452 for found_dir in $ltrpathdirs; do
9453 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
9454 done
9455 fi
9456
9457
9458
9459
9460
9461
9462
9463 am_save_CPPFLAGS="$CPPFLAGS"
9464
9465 for element in $INCICONV; do
9466 haveit=
9467 for x in $CPPFLAGS; do
9468
9469 acl_save_prefix="$prefix"
9470 prefix="$acl_final_prefix"
9471 acl_save_exec_prefix="$exec_prefix"
9472 exec_prefix="$acl_final_exec_prefix"
9473 eval x=\"$x\"
9474 exec_prefix="$acl_save_exec_prefix"
9475 prefix="$acl_save_prefix"
9476
9477 if test "X$x" = "X$element"; then
9478 haveit=yes
9479 break
9480 fi
9481 done
9482 if test -z "$haveit"; then
9483 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9484 fi
9485 done
eb158727
ZW
9486
9487
5213506e
RW
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9489$as_echo_n "checking for iconv... " >&6; }
9490if test "${am_cv_func_iconv+set}" = set; then :
9491 $as_echo_n "(cached) " >&6
f91abfce 9492else
ba479fd2 9493
f91abfce
TT
9494 am_cv_func_iconv="no, consider installing GNU libiconv"
9495 am_cv_lib_iconv=no
5213506e 9496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9497/* end confdefs.h. */
f91abfce
TT
9498#include <stdlib.h>
9499#include <iconv.h>
ba479fd2
NN
9500int
9501main ()
9502{
f91abfce
TT
9503iconv_t cd = iconv_open("","");
9504 iconv(cd,NULL,NULL,NULL,NULL);
9505 iconv_close(cd);
ba479fd2
NN
9506 ;
9507 return 0;
9508}
9509_ACEOF
5213506e 9510if ac_fn_c_try_link "$LINENO"; then :
f91abfce 9511 am_cv_func_iconv=yes
f91abfce 9512fi
5213506e
RW
9513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9515 if test "$am_cv_func_iconv" != yes; then
9516 am_save_LIBS="$LIBS"
dfb77e37 9517 LIBS="$LIBS $LIBICONV"
5213506e 9518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9519/* end confdefs.h. */
f91abfce
TT
9520#include <stdlib.h>
9521#include <iconv.h>
ba479fd2
NN
9522int
9523main ()
9524{
f91abfce
TT
9525iconv_t cd = iconv_open("","");
9526 iconv(cd,NULL,NULL,NULL,NULL);
9527 iconv_close(cd);
ba479fd2
NN
9528 ;
9529 return 0;
9530}
9531_ACEOF
5213506e 9532if ac_fn_c_try_link "$LINENO"; then :
f91abfce
TT
9533 am_cv_lib_iconv=yes
9534 am_cv_func_iconv=yes
f91abfce 9535fi
5213506e
RW
9536rm -f core conftest.err conftest.$ac_objext \
9537 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9538 LIBS="$am_save_LIBS"
9539 fi
6e3f3080 9540
ba479fd2 9541fi
5213506e
RW
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9543$as_echo "$am_cv_func_iconv" >&6; }
63cf211a 9544 if test "$am_cv_func_iconv" = yes; then
ba479fd2 9545
5213506e 9546$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f91abfce 9547
dfb77e37
KC
9548 fi
9549 if test "$am_cv_lib_iconv" = yes; then
5213506e
RW
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
9551$as_echo_n "checking how to link with libiconv... " >&6; }
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
9553$as_echo "$LIBICONV" >&6; }
dfb77e37
KC
9554 else
9555 CPPFLAGS="$am_save_CPPFLAGS"
9556 LIBICONV=
9557 LTLIBICONV=
9558 fi
9559
9560
9561
9562 if test "$am_cv_func_iconv" = yes; then
5213506e
RW
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9564$as_echo_n "checking for iconv declaration... " >&6; }
9565 if test "${am_cv_proto_iconv+set}" = set; then :
9566 $as_echo_n "(cached) " >&6
f91abfce 9567else
ba479fd2 9568
5213506e 9569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9570/* end confdefs.h. */
f91abfce
TT
9571
9572#include <stdlib.h>
9573#include <iconv.h>
9574extern
9575#ifdef __cplusplus
9576"C"
9577#endif
9578#if defined(__STDC__) || defined(__cplusplus)
9579size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9580#else
9581size_t iconv();
9582#endif
9583
ba479fd2
NN
9584int
9585main ()
9586{
f91abfce 9587
ba479fd2
NN
9588 ;
9589 return 0;
9590}
9591_ACEOF
5213506e 9592if ac_fn_c_try_compile "$LINENO"; then :
f91abfce
TT
9593 am_cv_proto_iconv_arg1=""
9594else
5213506e 9595 am_cv_proto_iconv_arg1="const"
f91abfce 9596fi
5213506e 9597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
9598 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);"
9599fi
9600
9601 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5213506e 9602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
ba479fd2 9603 }$am_cv_proto_iconv" >&5
5213506e
RW
9604$as_echo "${ac_t:-
9605 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
9606
9607cat >>confdefs.h <<_ACEOF
f91abfce 9608#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 9609_ACEOF
f91abfce
TT
9610
9611 fi
f91abfce 9612
56694dd9
ZW
9613# Until we have in-tree GNU iconv:
9614LIBICONV_DEP=
9615
9616
18fc9bd4 9617
5213506e
RW
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9619$as_echo_n "checking for LC_MESSAGES... " >&6; }
9620if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9621 $as_echo_n "(cached) " >&6
18fc9bd4 9622else
5213506e 9623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4
RG
9624/* end confdefs.h. */
9625#include <locale.h>
9626int
9627main ()
9628{
9629return LC_MESSAGES
9630 ;
9631 return 0;
9632}
9633_ACEOF
5213506e 9634if ac_fn_c_try_link "$LINENO"; then :
18fc9bd4
RG
9635 am_cv_val_LC_MESSAGES=yes
9636else
5213506e 9637 am_cv_val_LC_MESSAGES=no
18fc9bd4 9638fi
5213506e
RW
9639rm -f core conftest.err conftest.$ac_objext \
9640 conftest$ac_exeext conftest.$ac_ext
18fc9bd4 9641fi
5213506e
RW
9642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9643$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
9644 if test $am_cv_val_LC_MESSAGES = yes; then
9645
5213506e 9646$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
18fc9bd4
RG
9647
9648 fi
9649
f91abfce 9650
a03ea89b 9651
5213506e
RW
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9653$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9654if test "${am_cv_langinfo_codeset+set}" = set; then :
9655 $as_echo_n "(cached) " >&6
a03ea89b 9656else
5213506e 9657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a03ea89b
BM
9658/* end confdefs.h. */
9659#include <langinfo.h>
9660int
9661main ()
9662{
9663char* cs = nl_langinfo(CODESET);
9664 ;
9665 return 0;
9666}
9667_ACEOF
5213506e 9668if ac_fn_c_try_link "$LINENO"; then :
a03ea89b
BM
9669 am_cv_langinfo_codeset=yes
9670else
5213506e 9671 am_cv_langinfo_codeset=no
a03ea89b 9672fi
5213506e
RW
9673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext
a03ea89b
BM
9675
9676fi
5213506e
RW
9677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9678$as_echo "$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
9679 if test $am_cv_langinfo_codeset = yes; then
9680
5213506e 9681$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a03ea89b
BM
9682
9683 fi
9684
9685
86cf1cbd
KG
9686# We will need to find libiberty.h and ansidecl.h
9687saved_CFLAGS="$CFLAGS"
9688CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ed5b9f96
GK
9689for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
9690 strsignal strstr strverscmp \
9691 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 9692 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 9693do
5213506e
RW
9694 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9696$as_echo_n "checking whether $ac_func is declared... " >&6; }
9697if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9698 $as_echo_n "(cached) " >&6
9699else
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9701/* end confdefs.h. */
7afe8c41
KG
9702#undef $ac_tr_decl
9703#define $ac_tr_decl 1
ba479fd2 9704
d02af173 9705#include "ansidecl.h"
86cf1cbd 9706#include "system.h"
f31e826b 9707
ba479fd2
NN
9708int
9709main ()
9710{
86cf1cbd
KG
9711#ifndef $ac_func
9712char *(*pfn) = (char *(*)) $ac_func ;
9713#endif
ba479fd2 9714 ;
5213506e
RW
9715 return 0;
9716}
9717_ACEOF
9718if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9719 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9720else
5213506e 9721 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9722fi
5213506e 9723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9724fi
9725
f31e826b 9726if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9728$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9729#define $ac_tr_decl 1
ba479fd2
NN
9730_ACEOF
9731
81bf3d9e 9732else
5213506e
RW
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9735#define $ac_tr_decl 0
ba479fd2
NN
9736_ACEOF
9737
81bf3d9e
RH
9738fi
9739
9740done
ba479fd2 9741
ba479fd2 9742
81bf3d9e
RH
9743for ac_func in getrlimit setrlimit getrusage
9744do
5213506e
RW
9745 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9747$as_echo_n "checking whether $ac_func is declared... " >&6; }
9748if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9749 $as_echo_n "(cached) " >&6
9750else
9751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9752/* end confdefs.h. */
7afe8c41
KG
9753#undef $ac_tr_decl
9754#define $ac_tr_decl 1
ba479fd2 9755
d02af173 9756#include "ansidecl.h"
86cf1cbd 9757#include "system.h"
81bf3d9e
RH
9758#ifdef HAVE_SYS_RESOURCE_H
9759#include <sys/resource.h>
9760#endif
9761
f31e826b 9762
ba479fd2
NN
9763int
9764main ()
9765{
86cf1cbd
KG
9766#ifndef $ac_func
9767char *(*pfn) = (char *(*)) $ac_func ;
9768#endif
ba479fd2
NN
9769 ;
9770 return 0;
9771}
9772_ACEOF
5213506e 9773if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9774 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9775else
5213506e 9776 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9777fi
5213506e 9778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9779fi
9780
f31e826b 9781if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9783$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9784#define $ac_tr_decl 1
ba479fd2
NN
9785_ACEOF
9786
81bf3d9e 9787else
5213506e
RW
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9790#define $ac_tr_decl 0
ba479fd2
NN
9791_ACEOF
9792
81bf3d9e
RH
9793fi
9794
9795done
86cf1cbd 9796
81bf3d9e 9797
5213506e 9798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9799/* end confdefs.h. */
b2522d2b
HPN
9800
9801#include "ansidecl.h"
9802#include "system.h"
9803#ifdef HAVE_SYS_RESOURCE_H
9804#include <sys/resource.h>
9805#endif
9806
ba479fd2
NN
9807int
9808main ()
9809{
b2522d2b 9810rlim_t l = 0;
ba479fd2
NN
9811 ;
9812 return 0;
9813}
9814_ACEOF
5213506e 9815if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 9816
5213506e 9817else
ba479fd2 9818
5213506e 9819$as_echo "#define rlim_t long" >>confdefs.h
b2522d2b
HPN
9820
9821fi
5213506e 9822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 9823
2102b2fe
RS
9824# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
9825# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
9826# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
9827# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
351df804 9828for ac_func in ldgetname
c1800ec8 9829do
5213506e
RW
9830 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9832$as_echo_n "checking whether $ac_func is declared... " >&6; }
9833if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9834 $as_echo_n "(cached) " >&6
9835else
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9837/* end confdefs.h. */
c1800ec8
ZW
9838#undef $ac_tr_decl
9839#define $ac_tr_decl 1
ba479fd2 9840
351df804
KG
9841#include "ansidecl.h"
9842#include "system.h"
9843#ifdef HAVE_LDFCN_H
2102b2fe
RS
9844#undef FREAD
9845#undef FWRITE
351df804
KG
9846#include <ldfcn.h>
9847#endif
9848
9849
ba479fd2
NN
9850int
9851main ()
9852{
351df804
KG
9853#ifndef $ac_func
9854char *(*pfn) = (char *(*)) $ac_func ;
9855#endif
ba479fd2
NN
9856 ;
9857 return 0;
9858}
9859_ACEOF
5213506e 9860if ac_fn_c_try_compile "$LINENO"; then :
351df804
KG
9861 eval "gcc_cv_have_decl_$ac_func=yes"
9862else
5213506e 9863 eval "gcc_cv_have_decl_$ac_func=no"
351df804 9864fi
5213506e 9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
9866fi
9867
9868if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9870$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9871#define $ac_tr_decl 1
ba479fd2
NN
9872_ACEOF
9873
351df804 9874else
5213506e
RW
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9876$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9877#define $ac_tr_decl 0
ba479fd2
NN
9878_ACEOF
9879
351df804
KG
9880fi
9881
9882done
ba479fd2 9883
351df804 9884
351df804
KG
9885for ac_func in times
9886do
5213506e
RW
9887 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9889$as_echo_n "checking whether $ac_func is declared... " >&6; }
9890if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9891 $as_echo_n "(cached) " >&6
9892else
9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9894/* end confdefs.h. */
351df804
KG
9895#undef $ac_tr_decl
9896#define $ac_tr_decl 1
ba479fd2 9897
c1800ec8
ZW
9898#include "ansidecl.h"
9899#include "system.h"
9900#ifdef HAVE_SYS_TIMES_H
9901#include <sys/times.h>
9902#endif
9903
9904
ba479fd2
NN
9905int
9906main ()
9907{
c1800ec8
ZW
9908#ifndef $ac_func
9909char *(*pfn) = (char *(*)) $ac_func ;
9910#endif
ba479fd2
NN
9911 ;
9912 return 0;
9913}
9914_ACEOF
5213506e 9915if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6
PB
9916 eval "gcc_cv_have_decl_$ac_func=yes"
9917else
5213506e 9918 eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 9919fi
5213506e 9920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
9921fi
9922
9923if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9925$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9926#define $ac_tr_decl 1
ba479fd2
NN
9927_ACEOF
9928
c1800ec8 9929else
5213506e
RW
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9932#define $ac_tr_decl 0
ba479fd2
NN
9933_ACEOF
9934
c1800ec8
ZW
9935fi
9936
9937done
c1800ec8
ZW
9938
9939
4f6d8cc8
GK
9940for ac_func in sigaltstack
9941do
5213506e
RW
9942 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9944$as_echo_n "checking whether $ac_func is declared... " >&6; }
9945if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9946 $as_echo_n "(cached) " >&6
9947else
9948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4f6d8cc8
GK
9949/* end confdefs.h. */
9950#undef $ac_tr_decl
9951#define $ac_tr_decl 1
9952
9953#include "ansidecl.h"
9954#include "system.h"
9955#include <signal.h>
9956
9957
9958int
9959main ()
9960{
9961#ifndef $ac_func
9962char *(*pfn) = (char *(*)) $ac_func ;
9963#endif
9964 ;
9965 return 0;
9966}
9967_ACEOF
5213506e 9968if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a
PB
9969 eval "gcc_cv_have_decl_$ac_func=yes"
9970else
5213506e 9971 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 9972fi
5213506e 9973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
9974fi
9975
9976if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9978$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9979#define $ac_tr_decl 1
9980_ACEOF
9981
9982else
5213506e
RW
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9985#define $ac_tr_decl 0
9986_ACEOF
9987
9988fi
9989
9990done
9991
9992
c1800ec8 9993# More time-related stuff.
5213506e
RW
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5
9995$as_echo_n "checking for struct tms... " >&6; }
9996if test "${ac_cv_struct_tms+set}" = set; then :
9997 $as_echo_n "(cached) " >&6
ba479fd2
NN
9998else
9999
5213506e 10000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10001/* end confdefs.h. */
c1800ec8
ZW
10002
10003#include "ansidecl.h"
10004#include "system.h"
10005#ifdef HAVE_SYS_TIMES_H
10006#include <sys/times.h>
10007#endif
10008
ba479fd2
NN
10009int
10010main ()
10011{
c1800ec8 10012struct tms tms;
ba479fd2
NN
10013 ;
10014 return 0;
10015}
10016_ACEOF
5213506e 10017if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10018 ac_cv_struct_tms=yes
10019else
5213506e 10020 ac_cv_struct_tms=no
c1800ec8 10021fi
5213506e 10022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10023fi
5213506e
RW
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5
10025$as_echo "$ac_cv_struct_tms" >&6; }
63cf211a 10026if test $ac_cv_struct_tms = yes; then
ba479fd2 10027
5213506e 10028$as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h
c1800ec8
ZW
10029
10030fi
10031
10032# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
10033# revisit after autoconf 2.50.
5213506e
RW
10034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
10035$as_echo_n "checking for clock_t... " >&6; }
10036if test "${gcc_cv_type_clock_t+set}" = set; then :
10037 $as_echo_n "(cached) " >&6
ba479fd2
NN
10038else
10039
5213506e 10040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10041/* end confdefs.h. */
c1800ec8
ZW
10042
10043#include "ansidecl.h"
10044#include "system.h"
10045
ba479fd2
NN
10046int
10047main ()
10048{
c1800ec8 10049clock_t x;
ba479fd2
NN
10050 ;
10051 return 0;
10052}
10053_ACEOF
5213506e 10054if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10055 gcc_cv_type_clock_t=yes
10056else
5213506e 10057 gcc_cv_type_clock_t=no
c1800ec8 10058fi
5213506e 10059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10060fi
5213506e
RW
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5
10062$as_echo "$gcc_cv_type_clock_t" >&6; }
63cf211a 10063if test $gcc_cv_type_clock_t = yes; then
ba479fd2 10064
5213506e 10065$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
c1800ec8
ZW
10066
10067fi
10068
eb70d86d
AS
10069# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
10070CFLAGS="$saved_CFLAGS"
10071
5213506e
RW
10072# Check whether --enable-initfini-array was given.
10073if test "${enable_initfini_array+set}" = set; then :
10074 enableval=$enable_initfini_array;
07cf4226 10075else
ba479fd2 10076
5213506e
RW
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
10078$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
10079if test "${gcc_cv_initfini_array+set}" = set; then :
10080 $as_echo_n "(cached) " >&6
07cf4226 10081else
5213506e 10082 if test "$cross_compiling" = yes; then :
918c4fe4 10083 gcc_cv_initfini_array=no
eb70d86d 10084else
5213506e 10085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10086/* end confdefs.h. */
eb70d86d 10087
07cf4226
DM
10088static int x = -1;
10089int main (void) { return x; }
10090int foo (void) { x = 0; }
10091int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2 10092_ACEOF
5213506e 10093if ac_fn_c_try_run "$LINENO"; then :
918c4fe4 10094 gcc_cv_initfini_array=yes
eb70d86d 10095else
5213506e 10096 gcc_cv_initfini_array=no
eb70d86d 10097fi
5213506e
RW
10098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10099 conftest.$ac_objext conftest.beam conftest.$ac_ext
eb70d86d 10100fi
5213506e 10101
07cf4226 10102fi
5213506e
RW
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5
10104$as_echo "$gcc_cv_initfini_array" >&6; }
eb70d86d 10105 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 10106
5213506e
RW
10107fi
10108
63cf211a 10109if test $enable_initfini_array = yes; then
ba479fd2 10110
5213506e 10111$as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h
07cf4226 10112
eb70d86d 10113fi
81bf3d9e 10114
ba479fd2 10115# mkdir takes a single argument on some systems.
5213506e
RW
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5
10117$as_echo_n "checking if mkdir takes one argument... " >&6; }
10118if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then :
10119 $as_echo_n "(cached) " >&6
75923b2f 10120else
5213506e 10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10122/* end confdefs.h. */
75923b2f
MK
10123
10124#include <sys/types.h>
10125#ifdef HAVE_SYS_STAT_H
10126# include <sys/stat.h>
10127#endif
10128#ifdef HAVE_UNISTD_H
10129# include <unistd.h>
10130#endif
10131#ifdef HAVE_DIRECT_H
10132# include <direct.h>
10133#endif
ba479fd2
NN
10134int
10135main ()
10136{
75923b2f 10137mkdir ("foo", 0);
ba479fd2
NN
10138 ;
10139 return 0;
10140}
10141_ACEOF
5213506e 10142if ac_fn_c_try_compile "$LINENO"; then :
75923b2f
MK
10143 gcc_cv_mkdir_takes_one_arg=no
10144else
5213506e 10145 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 10146fi
5213506e 10147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 10148fi
5213506e
RW
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5
10150$as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 10151if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2 10152
5213506e 10153$as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h
75923b2f
MK
10154
10155fi
10156
10157
861bb6c1
JL
10158# File extensions
10159manext='.1'
10160objext='.o'
10161
10162
10163
4977bab6 10164# With Setjmp/Longjmp based exception handling.
5213506e
RW
10165# Check whether --enable-sjlj-exceptions was given.
10166if test "${enable_sjlj_exceptions+set}" = set; then :
10167 enableval=$enable_sjlj_exceptions; case $target in
399fe3e1
JDA
10168 *-*-hpux10*)
10169 if test $enableval != yes; then
5213506e
RW
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
10171$as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
399fe3e1
JDA
10172 enableval=yes
10173 fi
10174 ;;
10175esac
10176force_sjlj_exceptions=yes
10177else
10178 case $target in
10179 *-*-hpux10*)
10180 force_sjlj_exceptions=yes
10181 enableval=yes
10182 ;;
10183 *)
10184 force_sjlj_exceptions=no
10185 ;;
10186esac
5213506e
RW
10187fi
10188
399fe3e1 10189if test $force_sjlj_exceptions = yes; then
b61ff9c8 10190 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 10191
ba479fd2
NN
10192cat >>confdefs.h <<_ACEOF
10193#define CONFIG_SJLJ_EXCEPTIONS $sjlj
10194_ACEOF
4977bab6 10195
399fe3e1 10196fi
4977bab6 10197
443728bb
L
10198# For platforms with the unwind ABI which includes an unwind library,
10199# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
10200# config.gcc also contains tests of with_system_libunwind.
10201
4977bab6 10202
5213506e
RW
10203# Check whether --with-system-libunwind was given.
10204if test "${with_system_libunwind+set}" = set; then :
10205 withval=$with_system_libunwind;
10206fi
4977bab6 10207
e61c76c9
SE
10208 # If system-libunwind was not specifically set, pick a default setting.
10209 if test x$with_system_libunwind = x; then
10210 case ${target} in
10211 ia64-*-hpux*) with_system_libunwind=yes ;;
10212 *) with_system_libunwind=no ;;
10213 esac
10214 fi
10215 # Based on system-libunwind and target, do we have ipinfo?
10216 if test x$with_system_libunwind = xyes; then
10217 case ${target} in
10218 ia64-*-*) have_unwind_getipinfo=no ;;
10219 *) have_unwind_getipinfo=yes ;;
10220 esac
10221 else
a0e02041
AP
10222 # Darwin before version 9 does not have _Unwind_GetIPInfo.
10223
10224 case ${target} in
10225 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
10226 *) have_unwind_getipinfo=yes ;;
10227 esac
10228
e61c76c9 10229 fi
4977bab6 10230
e61c76c9 10231 if test x$have_unwind_getipinfo = xyes; then
e64f5acf 10232
5213506e 10233$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
e64f5acf 10234
e61c76c9
SE
10235 fi
10236
e64f5acf 10237
34a86c2b
NN
10238# --------------------------------------------------------
10239# Build, host, and target specific configuration fragments
10240# --------------------------------------------------------
10241
5b28c537
NN
10242# Collect build-machine-specific information.
10243. ${srcdir}/config.build
10244
a89ea0df
NN
10245# Collect host-machine-specific information.
10246. ${srcdir}/config.host
10247
ef69da62 10248target_gtfiles=
a89ea0df
NN
10249
10250# Collect target-machine-specific information.
8ad9fb33 10251. ${srcdir}/config.gcc
861bb6c1
JL
10252
10253extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 10254extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
10255
10256# Default the target-machine variables that were not explicitly set.
75bffa71 10257if test x"$tm_file" = x
861bb6c1
JL
10258then tm_file=$cpu_type/$cpu_type.h; fi
10259
6b2adea9 10260if test x"$extra_headers" = x
861bb6c1
JL
10261then extra_headers=; fi
10262
75bffa71 10263if test x$md_file = x
e98e406f 10264then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 10265
75bffa71 10266if test x$out_file = x
861bb6c1
JL
10267then out_file=$cpu_type/$cpu_type.c; fi
10268
75bffa71 10269if test x"$tmake_file" = x
861bb6c1
JL
10270then tmake_file=$cpu_type/t-$cpu_type
10271fi
10272
90e6a802 10273if test x"$dwarf2" = xyes
756ee602 10274then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
10275fi
10276
861bb6c1 10277# Say what files are being used for the output code and MD file.
11642c3a 10278echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
10279echo "Using \`$srcdir/config/$md_file' as machine description file."
10280
11642c3a 10281# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
10282# about them and drop them.
10283
11642c3a
ZW
10284bx=
10285for x in $build_xm_file; do
10286 if test -f $srcdir/config/$x
10287 then bx="$bx $x"
5213506e
RW
10288 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10289$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10290 fi
10291done
10292build_xm_file="$bx"
10293
10294hx=
10295for x in $host_xm_file; do
10296 if test -f $srcdir/config/$x
10297 then hx="$hx $x"
5213506e
RW
10298 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10299$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10300 fi
10301done
10302host_xm_file="$hx"
10303
10304tx=
10305for x in $xm_file; do
10306 if test -f $srcdir/config/$x
10307 then tx="$tx $x"
5213506e
RW
10308 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10309$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10310 fi
10311done
10312xm_file="$tx"
10313
861bb6c1
JL
10314count=a
10315for f in $tm_file; do
10316 count=${count}x
10317done
75bffa71 10318if test $count = ax; then
861bb6c1
JL
10319 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
10320else
10321 echo "Using the following target machine macro files:"
10322 for f in $tm_file; do
10323 echo " $srcdir/config/$f"
10324 done
10325fi
10326
4977bab6 10327if test x$need_64bit_hwint = xyes; then
ba479fd2 10328
5213506e 10329$as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h
4977bab6
ZW
10330
10331fi
10332
99fa8911
AP
10333if test x$use_long_long_for_widest_fast_int = xyes; then
10334
5213506e 10335$as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h
99fa8911
AP
10336
10337fi
10338
861bb6c1
JL
10339count=a
10340for f in $host_xm_file; do
10341 count=${count}x
10342done
11642c3a
ZW
10343if test $count = a; then
10344 :
10345elif test $count = ax; then
861bb6c1
JL
10346 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
10347else
10348 echo "Using the following host machine macro files:"
10349 for f in $host_xm_file; do
10350 echo " $srcdir/config/$f"
10351 done
10352fi
476d9098 10353echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 10354
75bffa71 10355if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
10356 count=a
10357 for f in $build_xm_file; do
10358 count=${count}x
10359 done
11642c3a
ZW
10360 if test $count = a; then
10361 :
10362 elif test $count = ax; then
861bb6c1
JL
10363 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
10364 else
10365 echo "Using the following build machine macro files:"
10366 for f in $build_xm_file; do
10367 echo " $srcdir/config/$f"
10368 done
10369 fi
10370fi
10371
4f6d8cc8 10372case ${host} in
b8ec3cc8 10373 powerpc*-*-darwin*)
5213506e
RW
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5
10375$as_echo_n "checking whether mcontext_t fields have underscores... " >&6; }
10376if test "${gcc_cv_mcontext_underscores+set}" = set; then :
10377 $as_echo_n "(cached) " >&6
4f6d8cc8 10378else
5213506e
RW
10379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10380/* end confdefs.h. */
4f6d8cc8 10381
ba7da42a 10382#include <sys/cdefs.h>
de4fb767 10383#include <sys/signal.h>
4f6d8cc8
GK
10384#include <ucontext.h>
10385int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
10386
10387_ACEOF
5213506e 10388if ac_fn_c_try_compile "$LINENO"; then :
4f6d8cc8
GK
10389 gcc_cv_mcontext_underscores=no
10390else
5213506e 10391 gcc_cv_mcontext_underscores=yes
4f6d8cc8 10392fi
5213506e 10393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 10394fi
5213506e
RW
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5
10396$as_echo "$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
10397 if test $gcc_cv_mcontext_underscores = yes; then
10398
5213506e 10399$as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h
4f6d8cc8
GK
10400
10401 fi
10402 ;;
10403esac
10404
8bb915b6
NN
10405# ---------
10406# Threading
10407# ---------
10408
c2e494a8 10409# Check if a valid thread package
615be2cf 10410case ${enable_threads} in
c2e494a8
NN
10411 "" | no)
10412 # No threads
10413 target_thread_file='single'
10414 ;;
10415 yes)
10416 # default
10417 target_thread_file='single'
10418 ;;
18167442 10419 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 10420 single | solaris | vxworks | win32 | mipssde)
615be2cf 10421 target_thread_file=${enable_threads}
c2e494a8
NN
10422 ;;
10423 *)
615be2cf 10424 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
10425 exit 1
10426 ;;
10427esac
10428
10429if test x${thread_file} = x; then
10430 # No thread file set by target-specific clauses in config.gcc,
10431 # so use file chosen by default logic above
10432 thread_file=${target_thread_file}
861bb6c1
JL
10433fi
10434
8bb915b6
NN
10435# Make gthr-default.h if we have a thread file.
10436gthread_flags=
10437if test $thread_file != single; then
b15a9f63
RW
10438 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
10439 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
10440 rm -f gthr-default.h-t
10441 else
10442 mv -f gthr-default.h-t gthr-default.h
10443 fi
8bb915b6
NN
10444 gthread_flags=-DHAVE_GTHR_DEFAULT
10445fi
10446
10447
10448# --------
10449# UNSORTED
10450# --------
10451
18fbf599 10452use_cxa_atexit=no
2121a768
JT
10453if test x$enable___cxa_atexit = xyes || \
10454 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 10455 if test x$host = x$target; then
97388150
DS
10456 case $host in
10457 # mingw32 doesn't have __cxa_atexit but uses atexit registration
10458 # keyed to flag_use_cxa_atexit
10459 *-*-mingw32*)
10460 use_cxa_atexit=yes
10461 ;;
10462 *)
5213506e
RW
10463 ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
10464if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
18fbf599
PB
10465 use_cxa_atexit=yes
10466else
10467 echo "__cxa_atexit can't be enabled on this target"
10468fi
10469
5f60e48f 10470 ;;
97388150 10471 esac
18fbf599
PB
10472 else
10473 # We can't check for __cxa_atexit when building a cross, so assume
10474 # it is available
10475 use_cxa_atexit=yes
10476 fi
10477 if test x$use_cxa_atexit = xyes; then
ba479fd2 10478
5213506e 10479$as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h
2121a768 10480
18fbf599 10481 fi
2121a768
JT
10482fi
10483
a5381466 10484# Look for a file containing extra machine modes.
1c0ca89d
ZW
10485if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
10486 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
10487
10488
10489cat >>confdefs.h <<_ACEOF
e22340b0 10490#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 10491_ACEOF
a5381466
ZW
10492
10493fi
10494
75685792
RS
10495# Convert extra_options into a form suitable for Makefile use.
10496extra_opt_files=
10497for f in $extra_options; do
10498 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
10499done
10500
10501
b7cb92ad 10502# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 10503# the first file included by config.h.
4977bab6 10504# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 10505# as well. If host!=build, we are in error and need to do more
db81d74a 10506# work to find out the build config parameters.
75bffa71 10507if test x$host = x$build
db81d74a 10508then
eaf4e618 10509 build_auto=auto-host.h
b7cb92ad
JL
10510else
10511 # We create a subdir, then run autoconf in the subdir.
10512 # To prevent recursion we set host and build for the new
10513 # invocation of configure to the build for this invocation
ba479fd2 10514 # of configure.
b7cb92ad
JL
10515 tempdir=build.$$
10516 rm -rf $tempdir
10517 mkdir $tempdir
10518 cd $tempdir
10519 case ${srcdir} in
255b8a49 10520 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
10521 *) realsrcdir=../${srcdir};;
10522 esac
d920e825
L
10523 saved_CFLAGS="${CFLAGS}"
10524 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 10525 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 10526 ${realsrcdir}/configure \
33e70558 10527 --enable-languages=${enable_languages-all} \
534d0cc0 10528 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 10529 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
10530
10531 # We just finished tests for the build machine, so rename
10532 # the file auto-build.h in the gcc directory.
10533 mv auto-host.h ../auto-build.h
10534 cd ..
10535 rm -rf $tempdir
eaf4e618 10536 build_auto=auto-build.h
db81d74a
RH
10537fi
10538
06f0b04c 10539
eaf4e618 10540tm_file="${tm_file} defaults.h"
4977bab6
ZW
10541tm_p_file="${tm_p_file} tm-preds.h"
10542host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
10543build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 10544# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 10545# put this back in temporarily.
232b67d9 10546xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 10547
34a86c2b
NN
10548# --------
10549# UNSORTED
10550# --------
10551
cc1e60ea 10552# Compile in configure arguments.
8105825d 10553if test -f configargs.h ; then
cc1e60ea 10554 # Being re-configured.
022dae81 10555 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
10556 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
10557else
10558 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
10559fi
eeae7b41
DJ
10560
10561# Double all backslashes and backslash all quotes to turn
10562# gcc_config_arguments into a C string.
10563sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
10564$gcc_config_arguments
10565EOF
10566gcc_config_arguments_str=`cat conftest.out`
10567rm -f conftest.out
10568
cc1e60ea
JM
10569cat > configargs.h <<EOF
10570/* Generated automatically. */
eeae7b41 10571static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 10572static const char thread_model[] = "$thread_file";
7816bea0
DJ
10573
10574static const struct {
10575 const char *name, *value;
10576} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
10577EOF
10578
40540e68
RAE
10579gcc_BASEVER=`cat $srcdir/BASE-VER`
10580gcc_DEVPHASE=`cat $srcdir/DEV-PHASE`
10581gcc_DATESTAMP=`cat $srcdir/DATESTAMP`
0c463e16 10582if test -f $srcdir/REVISION ; then
40540e68 10583 gcc_REVISION=`cat $srcdir/REVISION`
0c463e16
RAE
10584else
10585 gcc_REVISION=""
10586fi
10587cat > plugin-version.h <<EOF
10588#include "configargs.h"
10589
10590static char basever[] = "$gcc_BASEVER";
10591static char datestamp[] = "$gcc_DATESTAMP";
10592static char devphase[] = "$gcc_DEVPHASE";
10593static char revision[] = "$gcc_REVISION";
10594
10595/* FIXME plugins: We should make the version information more precise.
10596 One way to do is to add a checksum. */
10597
10598static struct plugin_gcc_version gcc_version = {basever, datestamp,
10599 devphase, revision,
10600 configuration_arguments};
10601EOF
10602
ab87f8c8 10603# Internationalization
18fc9bd4
RG
10604# If we haven't got the data from the intl directory,
10605# assume NLS is disabled.
10606USE_NLS=no
10607LIBINTL=
10608LIBINTL_DEP=
10609INCINTL=
10610XGETTEXT=
10611GMSGFMT=
10612POSUB=
10613
10614if test -f ../intl/config.intl; then
10615 . ../intl/config.intl
10616fi
5213506e
RW
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10618$as_echo_n "checking whether NLS is requested... " >&6; }
18fc9bd4 10619if test x"$USE_NLS" != xyes; then
5213506e
RW
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
18fc9bd4 10622else
5213506e
RW
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10624$as_echo "yes" >&6; }
18fc9bd4 10625
5213506e 10626$as_echo "#define ENABLE_NLS 1" >>confdefs.h
18fc9bd4
RG
10627
10628
5213506e
RW
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
10630$as_echo_n "checking for catalogs to be installed... " >&6; }
18fc9bd4
RG
10631 # Look for .po and .gmo files in the source directory.
10632 CATALOGS=
10633 XLINGUAS=
10634 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
10635 # If there aren't any .gmo files the shell will give us the
10636 # literal string "../path/to/srcdir/po/*.gmo" which has to be
10637 # weeded out.
10638 case "$cat" in *\**)
10639 continue;;
10640 esac
10641 # The quadruple backslash is collapsed to a double backslash
10642 # by the backticks, then collapsed again by the double quotes,
10643 # leaving us with one backslash in the sed expression (right
10644 # before the dot that mustn't act as a wildcard).
10645 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
10646 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
10647 # The user is allowed to set LINGUAS to a list of languages to
10648 # install catalogs for. If it's empty that means "all of them."
10649 if test "x$LINGUAS" = x; then
10650 CATALOGS="$CATALOGS $cat"
10651 XLINGUAS="$XLINGUAS $lang"
10652 else
10653 case "$LINGUAS" in *$lang*)
10654 CATALOGS="$CATALOGS $cat"
10655 XLINGUAS="$XLINGUAS $lang"
10656 ;;
10657 esac
10658 fi
10659 done
10660 LINGUAS="$XLINGUAS"
5213506e
RW
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
10662$as_echo "$LINGUAS" >&6; }
18fc9bd4
RG
10663
10664
10665 DATADIRNAME=share
10666
10667 INSTOBJEXT=.mo
10668
10669 GENCAT=gencat
10670
10671 CATOBJEXT=.gmo
10672
10673fi
861bb6c1 10674
56694dd9
ZW
10675# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
10676# -liconv on the link line twice.
10677case "$LIBINTL" in *$LIBICONV*)
10678 LIBICONV= ;;
10679esac
dc6746e7 10680
5213506e
RW
10681# Check whether --enable-secureplt was given.
10682if test "${enable_secureplt+set}" = set; then :
10683 enableval=$enable_secureplt;
10684fi
7f970b70 10685
922e3e33 10686
ad211091
KT
10687# Check whether --enable-leading-mingw64-underscores was given.
10688if test "${enable_leading_mingw64_underscores+set}" = set; then :
10689 enableval=$enable_leading_mingw64_underscores;
10690fi
10691
10692if test x"$enable_leading_mingw64_underscores" = xyes ; then :
10693
10694$as_echo "#define USE_MINGW64_LEADING_UNDERSCORES 1" >>confdefs.h
10695
10696fi
10697
5213506e
RW
10698# Check whether --enable-cld was given.
10699if test "${enable_cld+set}" = set; then :
10700 enableval=$enable_cld;
922e3e33
UB
10701else
10702 enable_cld=no
5213506e
RW
10703fi
10704
922e3e33 10705
d79389af
L
10706# Check whether --enable-frame-pointer was given.
10707if test "${enable_frame_pointer+set}" = set; then :
10708 enableval=$enable_frame_pointer;
10709else
10710
10711case $target_os in
1b2d4118
JH
10712linux* | darwin[8912]*)
10713 # Enable -fomit-frame-pointer by default for Linux and Darwin with
10714 # DWARF2.
d79389af
L
10715 enable_frame_pointer=no
10716 ;;
10717*)
10718 enable_frame_pointer=yes
10719 ;;
10720esac
10721
10722fi
10723
10724
56694dd9 10725# Windows32 Registry support for specifying GCC installation paths.
5213506e
RW
10726# Check whether --enable-win32-registry was given.
10727if test "${enable_win32_registry+set}" = set; then :
10728 enableval=$enable_win32_registry;
10729fi
dc6746e7 10730
ba479fd2 10731
a1286ef5
ZW
10732case $host_os in
10733 win32 | pe | cygwin* | mingw32* | uwin*)
10734 if test "x$enable_win32_registry" != xno; then
5213506e
RW
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5
10736$as_echo_n "checking for library containing RegOpenKeyExA... " >&6; }
10737if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10738 $as_echo_n "(cached) " >&6
ba479fd2
NN
10739else
10740 ac_func_search_save_LIBS=$LIBS
5213506e 10741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10742/* end confdefs.h. */
861bb6c1 10743
5213506e
RW
10744/* Override any GCC internal prototype to avoid an error.
10745 Use char because int might match the return type of a GCC
10746 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10747#ifdef __cplusplus
10748extern "C"
10749#endif
ba479fd2
NN
10750char RegOpenKeyExA ();
10751int
10752main ()
10753{
5213506e 10754return RegOpenKeyExA ();
ba479fd2
NN
10755 ;
10756 return 0;
10757}
10758_ACEOF
5213506e
RW
10759for ac_lib in '' advapi32; do
10760 if test -z "$ac_lib"; then
10761 ac_res="none required"
10762 else
10763 ac_res=-l$ac_lib
b61ff9c8 10764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5213506e
RW
10765 fi
10766 if ac_fn_c_try_link "$LINENO"; then :
10767 ac_cv_search_RegOpenKeyExA=$ac_res
10768fi
10769rm -f core conftest.err conftest.$ac_objext \
10770 conftest$ac_exeext
10771 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10772 break
10773fi
10774done
10775if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
2f41c1d6 10776
1a4b763e 10777else
5213506e 10778 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 10779fi
5213506e 10780rm conftest.$ac_ext
dd7f7a6e
EC
10781LIBS=$ac_func_search_save_LIBS
10782fi
5213506e
RW
10783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5
10784$as_echo "$ac_cv_search_RegOpenKeyExA" >&6; }
10785ac_res=$ac_cv_search_RegOpenKeyExA
10786if test "$ac_res" != no; then :
10787 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
10788
10789else
10790 enable_win32_registry=no
10791fi
10792
10793 fi
10794
10795 if test "x$enable_win32_registry" != xno; then
10796
5213506e 10797$as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h
dd7f7a6e
EC
10798
10799
10800 if test "x$enable_win32_registry" != xyes \
10801 && test "x$enable_win32_registry" != x; then
10802
10803cat >>confdefs.h <<_ACEOF
10804#define WIN32_REGISTRY_KEY "$enable_win32_registry"
10805_ACEOF
10806
10807 fi
10808 fi
10809 ;;
10810esac
ab87f8c8 10811
56694dd9
ZW
10812# Get an absolute path to the GCC top-level source directory
10813holddir=`${PWDCMD-pwd}`
10814cd $srcdir
10815topdir=`${PWDCMD-pwd}`
10816cd $holddir
ab87f8c8 10817
56694dd9 10818# Conditionalize the makefile for this host machine.
2ed26f6b 10819xmake_file=
c406e779 10820for f in ${host_xmake_file}
56694dd9
ZW
10821do
10822 if test -f ${srcdir}/config/$f
10823 then
2ed26f6b 10824 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
10825 fi
10826done
093e61a6 10827
56694dd9 10828# Conditionalize the makefile for this target machine.
2ed26f6b 10829tmake_file_=
c406e779 10830for f in ${tmake_file}
56694dd9
ZW
10831do
10832 if test -f ${srcdir}/config/$f
10833 then
2ed26f6b 10834 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
10835 fi
10836done
2ed26f6b 10837tmake_file="${tmake_file_}"
71a94577 10838
ab87f8c8
JL
10839out_object_file=`basename $out_file .c`.o
10840
75685792 10841tm_file_list="options.h"
c513ce77 10842tm_include_list="options.h insn-constants.h"
ab87f8c8 10843for f in $tm_file; do
64ccbc99 10844 case $f in
3ca43df7
RS
10845 ./* )
10846 f=`echo $f | sed 's/^..//'`
10847 tm_file_list="${tm_file_list} $f"
10848 tm_include_list="${tm_include_list} $f"
10849 ;;
d02af173 10850 defaults.h )
e22340b0
ZW
10851 tm_file_list="${tm_file_list} \$(srcdir)/$f"
10852 tm_include_list="${tm_include_list} $f"
10853 ;;
10854 * )
10855 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
10856 tm_include_list="${tm_include_list} config/$f"
10857 ;;
64ccbc99 10858 esac
ab87f8c8
JL
10859done
10860
11642c3a 10861tm_p_file_list=
e22340b0 10862tm_p_include_list=
11642c3a 10863for f in $tm_p_file; do
4977bab6
ZW
10864 case $f in
10865 tm-preds.h )
e22340b0
ZW
10866 tm_p_file_list="${tm_p_file_list} $f"
10867 tm_p_include_list="${tm_p_include_list} $f"
10868 ;;
10869 * )
10870 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
10871 tm_p_include_list="${tm_p_include_list} config/$f"
10872 esac
10873done
10874
10875xm_file_list=
10876xm_include_list=
10877for f in $xm_file; do
10878 case $f in
10879 ansidecl.h )
10880 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
10881 xm_include_list="${xm_include_list} $f"
10882 ;;
10883 auto-host.h )
10884 xm_file_list="${xm_file_list} $f"
10885 xm_include_list="${xm_include_list} $f"
10886 ;;
10887 * )
10888 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
10889 xm_include_list="${xm_include_list} config/$f"
10890 ;;
4977bab6 10891 esac
11642c3a
ZW
10892done
10893
ab87f8c8 10894host_xm_file_list=
e22340b0 10895host_xm_include_list=
ab87f8c8 10896for f in $host_xm_file; do
64ccbc99 10897 case $f in
d02af173 10898 ansidecl.h )
e22340b0
ZW
10899 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
10900 host_xm_include_list="${host_xm_include_list} $f"
10901 ;;
e2500fed 10902 auto-host.h )
e22340b0
ZW
10903 host_xm_file_list="${host_xm_file_list} $f"
10904 host_xm_include_list="${host_xm_include_list} $f"
10905 ;;
10906 * )
10907 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
10908 host_xm_include_list="${host_xm_include_list} config/$f"
10909 ;;
64ccbc99 10910 esac
ab87f8c8
JL
10911done
10912
10913build_xm_file_list=
10914for f in $build_xm_file; do
64ccbc99 10915 case $f in
d02af173 10916 ansidecl.h )
e22340b0
ZW
10917 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
10918 build_xm_include_list="${build_xm_include_list} $f"
10919 ;;
e2500fed 10920 auto-build.h | auto-host.h )
e22340b0
ZW
10921 build_xm_file_list="${build_xm_file_list} $f"
10922 build_xm_include_list="${build_xm_include_list} $f"
10923 ;;
10924 * )
10925 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
10926 build_xm_include_list="${build_xm_include_list} config/$f"
10927 ;;
64ccbc99 10928 esac
ab87f8c8
JL
10929done
10930
2989d30c
GK
10931# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
10932# cross-compiler which does not use the native headers and libraries.
a078a589 10933# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
10934CROSS=
10935ALL=all.internal
10936SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10937
10938if test "x$with_build_sysroot" != x; then
14da6073 10939 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10940else
10941 # This value is used, even on a native system, because
10942 # CROSS_SYSTEM_HEADER_DIR is just
10943 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
10944 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
10945fi
10946
ab87f8c8
JL
10947if test x$host != x$target
10948then
2989d30c 10949 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 10950 ALL=all.cross
160633c6 10951 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 10952 case "$host","$target" in
3a7e8b87
GK
10953 # Darwin crosses can use the host system's libraries and headers,
10954 # because of the fat library support. Of course, it must be the
10955 # same version of Darwin on both sides. Allow the user to
10956 # just say --target=foo-darwin without a version number to mean
10957 # "the version on this system".
10958 *-*-darwin*,*-*-darwin*)
10959 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
10960 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
10961 if test $hostos = $targetos -o $targetos = darwin ; then
10962 CROSS=
10963 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
10964 with_headers=yes
10965 fi
10966 ;;
10967
343f59d9
AM
10968 i?86-*-*,x86_64-*-* \
10969 | powerpc*-*-*,powerpc64*-*-*)
10970 CROSS="$CROSS -DNATIVE_CROSS" ;;
10971 esac
7a615b25 10972elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 10973 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
10974fi
10975
b39d221a
EC
10976# If this is a cross-compiler that does not
10977# have its own set of headers then define
10978# inhibit_libc
10979
dc06db20
R
10980# If this is using newlib, without having the headers available now,
10981# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
10982# This prevents libgcc2 from containing any code which requires libc
10983# support.
a929bc28 10984: ${inhibit_libc=false}
dc06db20
R
10985if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
10986 test x$with_newlib = xyes ; } &&
e50084fa 10987 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 10988 inhibit_libc=true
b39d221a
EC
10989fi
10990
10991
a078a589
ZW
10992# When building gcc with a cross-compiler, we need to adjust things so
10993# that the generator programs are still built with the native compiler.
52c0e446 10994# Also, we cannot run fixincludes.
a078a589
ZW
10995
10996# These are the normal (build=host) settings:
ba479fd2
NN
10997CC_FOR_BUILD='$(CC)'
10998BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 10999BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 11000STMP_FIXINC=stmp-fixinc
8ad9fb33 11001
83599948
NS
11002# And these apply if build != host, or we are generating coverage data
11003if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 11004then
b11e4747 11005 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 11006 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
11007fi
11008
11009# Expand extra_headers to include complete path.
11010# This substitutes for lots of t-* files.
11011extra_headers_list=
b1ef58c8
NN
11012# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
11013for file in ${extra_headers} ; do
11014 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
11015done
ab87f8c8 11016
1617e5ee
GK
11017# If use_gcc_tgmath is set, append ginclude/tgmath.h.
11018if test x"$use_gcc_tgmath" = xyes
11019then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
11020fi
11021
c38f02df
ILT
11022# Define collect2 in Makefile.
11023case $host_can_use_collect2 in
11024 no) collect2= ;;
11025 *) collect2='collect2$(exeext)' ;;
11026esac
11027
11028
ab87f8c8 11029# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
11030case $use_collect2 in
11031 no) use_collect2= ;;
11032 "") ;;
ba479fd2 11033 *)
34a86c2b
NN
11034 host_xm_defines="${host_xm_defines} USE_COLLECT2"
11035 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
11036 case $host_can_use_collect2 in
11037 no)
5213506e 11038 as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5
c38f02df
ILT
11039 ;;
11040 esac
34a86c2b
NN
11041 ;;
11042esac
ab87f8c8 11043
8bb915b6
NN
11044# ---------------------------
11045# Assembler & linker features
11046# ---------------------------
11047
da0f6381
PB
11048# During stage 2, ld is actually gcc/collect-ld, which is a small script to
11049# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
11050# However when ld-new is first executed from the build tree, libtool will
11051# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
11052# to the build tree. While doing this we need to use the previous-stage
11053# linker, or we have an infinite loop. The presence of a shell script as
11054# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
11055# the gcc/collect-ld script. So we need to know how libtool works, or
11056# exec-tool will fail.
e8b05380 11057
da0f6381 11058
5d47bb02
PG
11059case `pwd` in
11060 *\ * | *\ *)
5213506e
RW
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
11062$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5d47bb02 11063esac
da0f6381
PB
11064
11065
da0f6381 11066
43e02a8a
RW
11067macro_version='2.2.7a'
11068macro_revision='1.3134'
da0f6381
PB
11069
11070
11071
11072
11073
11074
da0f6381
PB
11075
11076
11077
11078
11079
11080
11081
5d47bb02 11082ltmain="$ac_aux_dir/ltmain.sh"
da0f6381 11083
43e02a8a
RW
11084# Backslashify metacharacters that are still active within
11085# double-quoted strings.
11086sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
11087
11088# Same as above, but do not quote variable references.
11089double_quote_subst='s/\(["`\\]\)/\\\1/g'
11090
11091# Sed substitution to delay expansion of an escaped shell variable in a
11092# double_quote_subst'ed string.
11093delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
11094
11095# Sed substitution to delay expansion of an escaped single quote.
11096delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
11097
11098# Sed substitution to avoid accidental globbing in evaled expressions
11099no_glob_subst='s/\*/\\\*/g'
11100
11101ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11102ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11103ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11104
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
11106$as_echo_n "checking how to print strings... " >&6; }
11107# Test print first, because it will be a builtin if present.
11108if test "X`print -r -- -n 2>/dev/null`" = X-n && \
11109 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11110 ECHO='print -r --'
11111elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
11112 ECHO='printf %s\n'
11113else
11114 # Use this function as a fallback that always works.
11115 func_fallback_echo ()
11116 {
11117 eval 'cat <<_LTECHO_EOF
11118$1
11119_LTECHO_EOF'
11120 }
11121 ECHO='func_fallback_echo'
11122fi
11123
11124# func_echo_all arg...
11125# Invoke $ECHO with all args, space-separated.
11126func_echo_all ()
11127{
11128 $ECHO ""
11129}
11130
11131case "$ECHO" in
11132 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
11133$as_echo "printf" >&6; } ;;
11134 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
11135$as_echo "print -r" >&6; } ;;
11136 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
11137$as_echo "cat" >&6; } ;;
11138esac
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
5213506e
RW
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
11154$as_echo_n "checking for a sed that does not truncate output... " >&6; }
11155if test "${ac_cv_path_SED+set}" = set; then :
11156 $as_echo_n "(cached) " >&6
11157else
11158 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
11159 for ac_i in 1 2 3 4 5 6 7; do
11160 ac_script="$ac_script$as_nl$ac_script"
11161 done
11162 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
11163 { ac_script=; unset ac_script;}
11164 if test -z "$SED"; then
11165 ac_path_SED_found=false
11166 # Loop through the user's path and test for each of PROGNAME-LIST
11167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
11168for as_dir in $PATH
11169do
11170 IFS=$as_save_IFS
11171 test -z "$as_dir" && as_dir=.
5213506e 11172 for ac_prog in sed gsed; do
da0f6381 11173 for ac_exec_ext in '' $ac_executable_extensions; do
5213506e
RW
11174 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
11175 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
11176# Check for GNU ac_path_SED and select it if it is found.
11177 # Check for GNU $ac_path_SED
11178case `"$ac_path_SED" --version 2>&1` in
11179*GNU*)
11180 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
11181*)
11182 ac_count=0
11183 $as_echo_n 0123456789 >"conftest.in"
11184 while :
11185 do
11186 cat "conftest.in" "conftest.in" >"conftest.tmp"
11187 mv "conftest.tmp" "conftest.in"
11188 cp "conftest.in" "conftest.nl"
11189 $as_echo '' >> "conftest.nl"
11190 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
11191 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11192 as_fn_arith $ac_count + 1 && ac_count=$as_val
11193 if test $ac_count -gt ${ac_path_SED_max-0}; then
11194 # Best one so far, save it but keep looking for a better one
11195 ac_cv_path_SED="$ac_path_SED"
11196 ac_path_SED_max=$ac_count
11197 fi
11198 # 10*(2^10) chars as input seems more than enough
11199 test $ac_count -gt 10 && break
11200 done
11201 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11202esac
11203
11204 $ac_path_SED_found && break 3
da0f6381
PB
11205 done
11206 done
5213506e 11207 done
da0f6381 11208IFS=$as_save_IFS
5213506e
RW
11209 if test -z "$ac_cv_path_SED"; then
11210 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
da0f6381 11211 fi
5213506e
RW
11212else
11213 ac_cv_path_SED=$SED
e8b05380 11214fi
b61ff9c8 11215
5213506e
RW
11216fi
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
11218$as_echo "$ac_cv_path_SED" >&6; }
11219 SED="$ac_cv_path_SED"
11220 rm -f conftest.sed
e8b05380 11221
da0f6381
PB
11222test -z "$SED" && SED=sed
11223Xsed="$SED -e 1s/^X//"
e8b05380 11224
e8b05380
PB
11225
11226
ad9c4d9f 11227
da0f6381
PB
11228
11229
11230
11231
11232
11233
11234
5213506e
RW
11235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11236$as_echo_n "checking for fgrep... " >&6; }
11237if test "${ac_cv_path_FGREP+set}" = set; then :
11238 $as_echo_n "(cached) " >&6
11239else
11240 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11241 then ac_cv_path_FGREP="$GREP -F"
11242 else
11243 if test -z "$FGREP"; then
11244 ac_path_FGREP_found=false
11245 # Loop through the user's path and test for each of PROGNAME-LIST
11246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11247for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11248do
11249 IFS=$as_save_IFS
11250 test -z "$as_dir" && as_dir=.
11251 for ac_prog in fgrep; do
11252 for ac_exec_ext in '' $ac_executable_extensions; do
11253 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11254 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
11255# Check for GNU ac_path_FGREP and select it if it is found.
11256 # Check for GNU $ac_path_FGREP
11257case `"$ac_path_FGREP" --version 2>&1` in
11258*GNU*)
11259 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11260*)
11261 ac_count=0
11262 $as_echo_n 0123456789 >"conftest.in"
11263 while :
11264 do
11265 cat "conftest.in" "conftest.in" >"conftest.tmp"
11266 mv "conftest.tmp" "conftest.in"
11267 cp "conftest.in" "conftest.nl"
11268 $as_echo 'FGREP' >> "conftest.nl"
11269 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11270 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11271 as_fn_arith $ac_count + 1 && ac_count=$as_val
11272 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11273 # Best one so far, save it but keep looking for a better one
11274 ac_cv_path_FGREP="$ac_path_FGREP"
11275 ac_path_FGREP_max=$ac_count
11276 fi
11277 # 10*(2^10) chars as input seems more than enough
11278 test $ac_count -gt 10 && break
11279 done
11280 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11281esac
11282
11283 $ac_path_FGREP_found && break 3
11284 done
11285 done
11286 done
11287IFS=$as_save_IFS
11288 if test -z "$ac_cv_path_FGREP"; then
11289 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11290 fi
e8b05380 11291else
5213506e
RW
11292 ac_cv_path_FGREP=$FGREP
11293fi
11294
11295 fi
981d4858 11296fi
5213506e
RW
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11298$as_echo "$ac_cv_path_FGREP" >&6; }
11299 FGREP="$ac_cv_path_FGREP"
9e423e6d 11300
9f18db39 11301
da0f6381 11302test -z "$GREP" && GREP=grep
9f18db39 11303
da0f6381
PB
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
5213506e
RW
11322# Check whether --with-gnu-ld was given.
11323if test "${with_gnu_ld+set}" = set; then :
11324 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
da0f6381
PB
11325else
11326 with_gnu_ld=no
5213506e
RW
11327fi
11328
da0f6381
PB
11329ac_prog=ld
11330if test "$GCC" = yes; then
11331 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
11333$as_echo_n "checking for ld used by $CC... " >&6; }
da0f6381
PB
11334 case $host in
11335 *-*-mingw*)
11336 # gcc leaves a trailing carriage return which upsets mingw
11337 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11338 *)
11339 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11340 esac
11341 case $ac_prog in
11342 # Accept absolute paths.
11343 [\\/]* | ?:[\\/]*)
11344 re_direlt='/[^/][^/]*/\.\./'
11345 # Canonicalize the pathname of ld
11346 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
11347 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
11348 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
11349 done
11350 test -z "$LD" && LD="$ac_prog"
11351 ;;
11352 "")
11353 # If it fails, then pretend we aren't using GCC.
11354 ac_prog=ld
11355 ;;
11356 *)
11357 # If it is relative, then search for the first ld in PATH.
11358 with_gnu_ld=unknown
11359 ;;
11360 esac
11361elif test "$with_gnu_ld" = yes; then
5213506e
RW
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11363$as_echo_n "checking for GNU ld... " >&6; }
da0f6381 11364else
5213506e
RW
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11366$as_echo_n "checking for non-GNU ld... " >&6; }
da0f6381 11367fi
5213506e
RW
11368if test "${lt_cv_path_LD+set}" = set; then :
11369 $as_echo_n "(cached) " >&6
da0f6381
PB
11370else
11371 if test -z "$LD"; then
11372 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11373 for ac_dir in $PATH; do
11374 IFS="$lt_save_ifs"
11375 test -z "$ac_dir" && ac_dir=.
11376 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11377 lt_cv_path_LD="$ac_dir/$ac_prog"
11378 # Check to see if the program is GNU ld. I'd rather use --version,
11379 # but apparently some variants of GNU ld only accept -v.
11380 # Break only if it was the GNU/non-GNU ld that we prefer.
11381 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
11382 *GNU* | *'with BFD'*)
11383 test "$with_gnu_ld" != no && break
11384 ;;
11385 *)
11386 test "$with_gnu_ld" != yes && break
11387 ;;
11388 esac
11389 fi
11390 done
11391 IFS="$lt_save_ifs"
11392else
11393 lt_cv_path_LD="$LD" # Let the user override the test with a path.
11394fi
11395fi
11396
11397LD="$lt_cv_path_LD"
11398if test -n "$LD"; then
5213506e
RW
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11400$as_echo "$LD" >&6; }
da0f6381 11401else
5213506e
RW
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
da0f6381 11404fi
5213506e
RW
11405test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11407$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11408if test "${lt_cv_prog_gnu_ld+set}" = set; then :
11409 $as_echo_n "(cached) " >&6
da0f6381
PB
11410else
11411 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11412case `$LD -v 2>&1 </dev/null` in
11413*GNU* | *'with BFD'*)
11414 lt_cv_prog_gnu_ld=yes
11415 ;;
11416*)
11417 lt_cv_prog_gnu_ld=no
11418 ;;
11419esac
11420fi
5213506e
RW
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
11422$as_echo "$lt_cv_prog_gnu_ld" >&6; }
da0f6381
PB
11423with_gnu_ld=$lt_cv_prog_gnu_ld
11424
11425
11426
11427
11428
11429
11430
11431
11432
5213506e
RW
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11434$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11435if test "${lt_cv_path_NM+set}" = set; then :
11436 $as_echo_n "(cached) " >&6
da0f6381
PB
11437else
11438 if test -n "$NM"; then
11439 # Let the user override the test.
11440 lt_cv_path_NM="$NM"
11441else
11442 lt_nm_to_check="${ac_tool_prefix}nm"
11443 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11444 lt_nm_to_check="$lt_nm_to_check nm"
11445 fi
11446 for lt_tmp_nm in $lt_nm_to_check; do
11447 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11448 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11449 IFS="$lt_save_ifs"
11450 test -z "$ac_dir" && ac_dir=.
11451 tmp_nm="$ac_dir/$lt_tmp_nm"
11452 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
11453 # Check to see if the nm accepts a BSD-compat flag.
11454 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
11455 # nm: unknown option "B" ignored
11456 # Tru64's nm complains that /dev/null is an invalid object file
11457 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
11458 */dev/null* | *'Invalid file or object type'*)
11459 lt_cv_path_NM="$tmp_nm -B"
11460 break
11461 ;;
11462 *)
11463 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11464 */dev/null*)
11465 lt_cv_path_NM="$tmp_nm -p"
11466 break
11467 ;;
11468 *)
11469 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11470 continue # so that we can try to find one that supports BSD flags
11471 ;;
11472 esac
11473 ;;
11474 esac
11475 fi
11476 done
11477 IFS="$lt_save_ifs"
11478 done
11479 : ${lt_cv_path_NM=no}
11480fi
11481fi
5213506e
RW
11482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11483$as_echo "$lt_cv_path_NM" >&6; }
da0f6381
PB
11484if test "$lt_cv_path_NM" != "no"; then
11485 NM="$lt_cv_path_NM"
11486else
11487 # Didn't find any BSD compatible name lister, look for dumpbin.
43e02a8a
RW
11488 if test -n "$DUMPBIN"; then :
11489 # Let the user override the test.
11490 else
11491 if test -n "$ac_tool_prefix"; then
11492 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11493 do
11494 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11495set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
11496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11497$as_echo_n "checking for $ac_word... " >&6; }
11498if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
11499 $as_echo_n "(cached) " >&6
da0f6381
PB
11500else
11501 if test -n "$DUMPBIN"; then
11502 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11503else
11504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505for as_dir in $PATH
11506do
11507 IFS=$as_save_IFS
11508 test -z "$as_dir" && as_dir=.
5213506e
RW
11509 for ac_exec_ext in '' $ac_executable_extensions; do
11510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11511 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5213506e 11512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11513 break 2
11514 fi
11515done
5213506e
RW
11516 done
11517IFS=$as_save_IFS
da0f6381
PB
11518
11519fi
11520fi
11521DUMPBIN=$ac_cv_prog_DUMPBIN
11522if test -n "$DUMPBIN"; then
5213506e
RW
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11524$as_echo "$DUMPBIN" >&6; }
da0f6381 11525else
5213506e
RW
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
da0f6381
PB
11528fi
11529
5213506e 11530
da0f6381
PB
11531 test -n "$DUMPBIN" && break
11532 done
11533fi
11534if test -z "$DUMPBIN"; then
11535 ac_ct_DUMPBIN=$DUMPBIN
43e02a8a 11536 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11537do
11538 # Extract the first word of "$ac_prog", so it can be a program name with args.
11539set dummy $ac_prog; ac_word=$2
5213506e
RW
11540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11541$as_echo_n "checking for $ac_word... " >&6; }
11542if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
11543 $as_echo_n "(cached) " >&6
da0f6381
PB
11544else
11545 if test -n "$ac_ct_DUMPBIN"; then
11546 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11547else
11548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11549for as_dir in $PATH
11550do
11551 IFS=$as_save_IFS
11552 test -z "$as_dir" && as_dir=.
5213506e
RW
11553 for ac_exec_ext in '' $ac_executable_extensions; do
11554 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11555 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5213506e 11556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11557 break 2
11558 fi
11559done
5213506e
RW
11560 done
11561IFS=$as_save_IFS
da0f6381
PB
11562
11563fi
11564fi
11565ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11566if test -n "$ac_ct_DUMPBIN"; then
5213506e
RW
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11568$as_echo "$ac_ct_DUMPBIN" >&6; }
da0f6381 11569else
5213506e
RW
11570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
da0f6381
PB
11572fi
11573
5213506e 11574
da0f6381
PB
11575 test -n "$ac_ct_DUMPBIN" && break
11576done
da0f6381 11577
5213506e
RW
11578 if test "x$ac_ct_DUMPBIN" = x; then
11579 DUMPBIN=":"
11580 else
11581 case $cross_compiling:$ac_tool_warned in
11582yes:)
11583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11585ac_tool_warned=yes ;;
11586esac
11587 DUMPBIN=$ac_ct_DUMPBIN
11588 fi
da0f6381
PB
11589fi
11590
43e02a8a
RW
11591 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
11592 *COFF*)
11593 DUMPBIN="$DUMPBIN -symbols"
11594 ;;
11595 *)
11596 DUMPBIN=:
11597 ;;
11598 esac
11599 fi
da0f6381
PB
11600
11601 if test "$DUMPBIN" != ":"; then
11602 NM="$DUMPBIN"
11603 fi
11604fi
11605test -z "$NM" && NM=nm
11606
11607
11608
11609
11610
11611
5213506e
RW
11612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11613$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11614if test "${lt_cv_nm_interface+set}" = set; then :
11615 $as_echo_n "(cached) " >&6
da0f6381
PB
11616else
11617 lt_cv_nm_interface="BSD nm"
11618 echo "int some_variable = 0;" > conftest.$ac_ext
43e02a8a 11619 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
da0f6381
PB
11620 (eval "$ac_compile" 2>conftest.err)
11621 cat conftest.err >&5
43e02a8a 11622 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
11623 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11624 cat conftest.err >&5
43e02a8a 11625 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
da0f6381
PB
11626 cat conftest.out >&5
11627 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11628 lt_cv_nm_interface="MS dumpbin"
11629 fi
11630 rm -f conftest*
11631fi
5213506e
RW
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11633$as_echo "$lt_cv_nm_interface" >&6; }
da0f6381 11634
5213506e
RW
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
11636$as_echo_n "checking whether ln -s works... " >&6; }
da0f6381
PB
11637LN_S=$as_ln_s
11638if test "$LN_S" = "ln -s"; then
5213506e
RW
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11640$as_echo "yes" >&6; }
da0f6381 11641else
5213506e
RW
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
11643$as_echo "no, using $LN_S" >&6; }
da0f6381
PB
11644fi
11645
11646# find the maximum length of command line arguments
5213506e
RW
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
11648$as_echo_n "checking the maximum length of command line arguments... " >&6; }
11649if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
11650 $as_echo_n "(cached) " >&6
da0f6381
PB
11651else
11652 i=0
11653 teststring="ABCD"
11654
11655 case $build_os in
11656 msdosdjgpp*)
11657 # On DJGPP, this test can blow up pretty badly due to problems in libc
11658 # (any single argument exceeding 2000 bytes causes a buffer overrun
11659 # during glob expansion). Even if it were fixed, the result of this
11660 # check would be larger than it should be.
11661 lt_cv_sys_max_cmd_len=12288; # 12K is about right
11662 ;;
11663
11664 gnu*)
11665 # Under GNU Hurd, this test is not required because there is
11666 # no limit to the length of command line arguments.
11667 # Libtool will interpret -1 as no limit whatsoever
11668 lt_cv_sys_max_cmd_len=-1;
11669 ;;
11670
5d47bb02 11671 cygwin* | mingw* | cegcc*)
da0f6381
PB
11672 # On Win9x/ME, this test blows up -- it succeeds, but takes
11673 # about 5 minutes as the teststring grows exponentially.
11674 # Worse, since 9x/ME are not pre-emptively multitasking,
11675 # you end up with a "frozen" computer, even though with patience
11676 # the test eventually succeeds (with a max line length of 256k).
11677 # Instead, let's just punt: use the minimum linelength reported by
11678 # all of the supported platforms: 8192 (on NT/2K/XP).
11679 lt_cv_sys_max_cmd_len=8192;
11680 ;;
11681
43e02a8a
RW
11682 mint*)
11683 # On MiNT this can take a long time and run out of memory.
11684 lt_cv_sys_max_cmd_len=8192;
11685 ;;
11686
da0f6381
PB
11687 amigaos*)
11688 # On AmigaOS with pdksh, this test takes hours, literally.
11689 # So we just punt and use a minimum line length of 8192.
11690 lt_cv_sys_max_cmd_len=8192;
11691 ;;
11692
11693 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
11694 # This has been around since 386BSD, at least. Likely further.
11695 if test -x /sbin/sysctl; then
11696 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
11697 elif test -x /usr/sbin/sysctl; then
11698 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
11699 else
11700 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
11701 fi
11702 # And add a safety zone
11703 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11704 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11705 ;;
11706
11707 interix*)
11708 # We know the value 262144 and hardcode it with a safety zone (like BSD)
11709 lt_cv_sys_max_cmd_len=196608
11710 ;;
11711
11712 osf*)
11713 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
11714 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
11715 # nice to cause kernel panics so lets avoid the loop below.
11716 # First set a reasonable default.
11717 lt_cv_sys_max_cmd_len=16384
11718 #
11719 if test -x /sbin/sysconfig; then
11720 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
11721 *1*) lt_cv_sys_max_cmd_len=-1 ;;
11722 esac
11723 fi
11724 ;;
11725 sco3.2v5*)
11726 lt_cv_sys_max_cmd_len=102400
11727 ;;
11728 sysv5* | sco5v6* | sysv4.2uw2*)
11729 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
11730 if test -n "$kargmax"; then
11731 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
11732 else
11733 lt_cv_sys_max_cmd_len=32768
11734 fi
11735 ;;
11736 *)
5d47bb02
PG
11737 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
11738 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
11739 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11740 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11741 else
11742 # Make teststring a little bigger before we do anything with it.
11743 # a 1K string should be a reasonable start.
11744 for i in 1 2 3 4 5 6 7 8 ; do
11745 teststring=$teststring$teststring
11746 done
11747 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
11748 # If test is not a shell built-in, we'll probably end up computing a
11749 # maximum length that is only half of the actual maximum length, but
11750 # we can't tell.
43e02a8a
RW
11751 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
11752 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
da0f6381
PB
11753 test $i != 17 # 1/2 MB should be enough
11754 do
11755 i=`expr $i + 1`
11756 teststring=$teststring$teststring
11757 done
11758 # Only check the string length outside the loop.
11759 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
11760 teststring=
11761 # Add a significant safety factor because C++ compilers can tack on
11762 # massive amounts of additional arguments before passing them to the
11763 # linker. It appears as though 1/2 is a usable value.
11764 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
11765 fi
11766 ;;
11767 esac
11768
11769fi
11770
11771if test -n $lt_cv_sys_max_cmd_len ; then
5213506e
RW
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
11773$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
da0f6381 11774else
5213506e
RW
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11776$as_echo "none" >&6; }
da0f6381
PB
11777fi
11778max_cmd_len=$lt_cv_sys_max_cmd_len
11779
11780
11781
11782
11783
11784
da0f6381
PB
11785: ${CP="cp -f"}
11786: ${MV="mv -f"}
11787: ${RM="rm -f"}
11788
5213506e
RW
11789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
11790$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
da0f6381
PB
11791# Try some XSI features
11792xsi_shell=no
11793( _lt_dummy="a/b/c"
11794 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
11795 = c,a/b,, \
11796 && eval 'test $(( 1 + 1 )) -eq 2 \
11797 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381 11798 && xsi_shell=yes
5213506e
RW
11799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
11800$as_echo "$xsi_shell" >&6; }
da0f6381
PB
11801
11802
5213506e
RW
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
11804$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
da0f6381
PB
11805lt_shell_append=no
11806( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
11807 >/dev/null 2>&1 \
11808 && lt_shell_append=yes
5213506e
RW
11809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
11810$as_echo "$lt_shell_append" >&6; }
da0f6381
PB
11811
11812
11813if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11814 lt_unset=unset
11815else
11816 lt_unset=false
11817fi
11818
11819
11820
11821
11822
11823# test EBCDIC or ASCII
11824case `echo X|tr X '\101'` in
11825 A) # ASCII based system
11826 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
11827 lt_SP2NL='tr \040 \012'
11828 lt_NL2SP='tr \015\012 \040\040'
11829 ;;
11830 *) # EBCDIC based system
11831 lt_SP2NL='tr \100 \n'
11832 lt_NL2SP='tr \r\n \100\100'
11833 ;;
11834esac
11835
11836
11837
11838
11839
11840
11841
11842
11843
5213506e
RW
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
11845$as_echo_n "checking for $LD option to reload object files... " >&6; }
11846if test "${lt_cv_ld_reload_flag+set}" = set; then :
11847 $as_echo_n "(cached) " >&6
da0f6381
PB
11848else
11849 lt_cv_ld_reload_flag='-r'
11850fi
5213506e
RW
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
11852$as_echo "$lt_cv_ld_reload_flag" >&6; }
da0f6381
PB
11853reload_flag=$lt_cv_ld_reload_flag
11854case $reload_flag in
11855"" | " "*) ;;
11856*) reload_flag=" $reload_flag" ;;
11857esac
11858reload_cmds='$LD$reload_flag -o $output$reload_objs'
11859case $host_os in
11860 darwin*)
11861 if test "$GCC" = yes; then
11862 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
11863 else
11864 reload_cmds='$LD$reload_flag -o $output$reload_objs'
11865 fi
11866 ;;
11867esac
11868
11869
11870
11871
11872
11873
11874
11875
11876
5d47bb02
PG
11877if test -n "$ac_tool_prefix"; then
11878 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11879set dummy ${ac_tool_prefix}objdump; ac_word=$2
5213506e
RW
11880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11881$as_echo_n "checking for $ac_word... " >&6; }
11882if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
11883 $as_echo_n "(cached) " >&6
5d47bb02
PG
11884else
11885 if test -n "$OBJDUMP"; then
11886 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11887else
11888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11889for as_dir in $PATH
11890do
11891 IFS=$as_save_IFS
11892 test -z "$as_dir" && as_dir=.
5213506e
RW
11893 for ac_exec_ext in '' $ac_executable_extensions; do
11894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11895 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5213506e 11896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11897 break 2
11898 fi
11899done
5213506e
RW
11900 done
11901IFS=$as_save_IFS
5d47bb02
PG
11902
11903fi
11904fi
11905OBJDUMP=$ac_cv_prog_OBJDUMP
11906if test -n "$OBJDUMP"; then
5213506e
RW
11907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
11908$as_echo "$OBJDUMP" >&6; }
5d47bb02 11909else
5213506e
RW
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
5d47bb02
PG
11912fi
11913
5213506e 11914
5d47bb02
PG
11915fi
11916if test -z "$ac_cv_prog_OBJDUMP"; then
11917 ac_ct_OBJDUMP=$OBJDUMP
11918 # Extract the first word of "objdump", so it can be a program name with args.
11919set dummy objdump; ac_word=$2
5213506e
RW
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11921$as_echo_n "checking for $ac_word... " >&6; }
11922if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
11923 $as_echo_n "(cached) " >&6
5d47bb02
PG
11924else
11925 if test -n "$ac_ct_OBJDUMP"; then
11926 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
11927else
11928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11929for as_dir in $PATH
11930do
11931 IFS=$as_save_IFS
11932 test -z "$as_dir" && as_dir=.
5213506e
RW
11933 for ac_exec_ext in '' $ac_executable_extensions; do
11934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11935 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5213506e 11936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11937 break 2
11938 fi
11939done
5213506e
RW
11940 done
11941IFS=$as_save_IFS
5d47bb02 11942
5d47bb02
PG
11943fi
11944fi
11945ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
11946if test -n "$ac_ct_OBJDUMP"; then
5213506e
RW
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
11948$as_echo "$ac_ct_OBJDUMP" >&6; }
5d47bb02 11949else
5213506e
RW
11950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11951$as_echo "no" >&6; }
5d47bb02
PG
11952fi
11953
5213506e
RW
11954 if test "x$ac_ct_OBJDUMP" = x; then
11955 OBJDUMP="false"
11956 else
11957 case $cross_compiling:$ac_tool_warned in
11958yes:)
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11961ac_tool_warned=yes ;;
11962esac
11963 OBJDUMP=$ac_ct_OBJDUMP
11964 fi
5d47bb02
PG
11965else
11966 OBJDUMP="$ac_cv_prog_OBJDUMP"
11967fi
11968
11969test -z "$OBJDUMP" && OBJDUMP=objdump
11970
11971
11972
11973
11974
11975
11976
11977
da0f6381 11978
5213506e
RW
11979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
11980$as_echo_n "checking how to recognize dependent libraries... " >&6; }
11981if test "${lt_cv_deplibs_check_method+set}" = set; then :
11982 $as_echo_n "(cached) " >&6
da0f6381
PB
11983else
11984 lt_cv_file_magic_cmd='$MAGIC_CMD'
11985lt_cv_file_magic_test_file=
11986lt_cv_deplibs_check_method='unknown'
11987# Need to set the preceding variable on all platforms that support
11988# interlibrary dependencies.
11989# 'none' -- dependencies not supported.
11990# `unknown' -- same as none, but documents that we really don't know.
11991# 'pass_all' -- all dependencies passed with no checks.
11992# 'test_compile' -- check by making test program.
11993# 'file_magic [[regex]]' -- check by looking for files in library path
11994# which responds to the $file_magic_cmd with a given extended regex.
11995# If you have `file' or equivalent on your system and you're not sure
11996# whether `pass_all' will *always* work, you probably want this one.
11997
11998case $host_os in
11999aix[4-9]*)
12000 lt_cv_deplibs_check_method=pass_all
12001 ;;
12002
12003beos*)
12004 lt_cv_deplibs_check_method=pass_all
12005 ;;
12006
12007bsdi[45]*)
12008 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
12009 lt_cv_file_magic_cmd='/usr/bin/file -L'
12010 lt_cv_file_magic_test_file=/shlib/libc.so
12011 ;;
12012
12013cygwin*)
12014 # func_win32_libid is a shell function defined in ltmain.sh
12015 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12016 lt_cv_file_magic_cmd='func_win32_libid'
12017 ;;
12018
12019mingw* | pw32*)
12020 # Base MSYS/MinGW do not provide the 'file' command needed by
12021 # func_win32_libid shell function, so use a weaker test based on 'objdump',
12022 # unless we find 'file', for example because we are cross-compiling.
43e02a8a
RW
12023 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
12024 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
da0f6381
PB
12025 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12026 lt_cv_file_magic_cmd='func_win32_libid'
12027 else
12028 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
12029 lt_cv_file_magic_cmd='$OBJDUMP -f'
12030 fi
12031 ;;
12032
43e02a8a 12033cegcc*)
5d47bb02
PG
12034 # use the weaker test based on 'objdump'. See mingw*.
12035 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
12036 lt_cv_file_magic_cmd='$OBJDUMP -f'
12037 ;;
12038
da0f6381
PB
12039darwin* | rhapsody*)
12040 lt_cv_deplibs_check_method=pass_all
12041 ;;
12042
12043freebsd* | dragonfly*)
12044 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12045 case $host_cpu in
12046 i*86 )
12047 # Not sure whether the presence of OpenBSD here was a mistake.
12048 # Let's accept both of them until this is cleared up.
12049 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
12050 lt_cv_file_magic_cmd=/usr/bin/file
12051 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
12052 ;;
12053 esac
12054 else
12055 lt_cv_deplibs_check_method=pass_all
12056 fi
12057 ;;
12058
12059gnu*)
12060 lt_cv_deplibs_check_method=pass_all
12061 ;;
12062
43e02a8a
RW
12063haiku*)
12064 lt_cv_deplibs_check_method=pass_all
12065 ;;
12066
da0f6381
PB
12067hpux10.20* | hpux11*)
12068 lt_cv_file_magic_cmd=/usr/bin/file
12069 case $host_cpu in
12070 ia64*)
12071 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
12072 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
12073 ;;
12074 hppa*64*)
43e02a8a 12075 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
12076 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
12077 ;;
12078 *)
43e02a8a 12079 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
da0f6381
PB
12080 lt_cv_file_magic_test_file=/usr/lib/libc.sl
12081 ;;
12082 esac
12083 ;;
12084
12085interix[3-9]*)
12086 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
12087 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
12088 ;;
12089
12090irix5* | irix6* | nonstopux*)
12091 case $LD in
12092 *-32|*"-32 ") libmagic=32-bit;;
12093 *-n32|*"-n32 ") libmagic=N32;;
12094 *-64|*"-64 ") libmagic=64-bit;;
12095 *) libmagic=never-match;;
12096 esac
12097 lt_cv_deplibs_check_method=pass_all
12098 ;;
12099
12100# This must be Linux ELF.
7a9d3fe8 12101linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
12102 lt_cv_deplibs_check_method=pass_all
12103 ;;
12104
12105netbsd*)
12106 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12107 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12108 else
12109 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
12110 fi
12111 ;;
12112
12113newos6*)
12114 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
12115 lt_cv_file_magic_cmd=/usr/bin/file
12116 lt_cv_file_magic_test_file=/usr/lib/libnls.so
12117 ;;
12118
12119*nto* | *qnx*)
12120 lt_cv_deplibs_check_method=pass_all
12121 ;;
12122
12123openbsd*)
12124 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12125 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
12126 else
12127 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12128 fi
12129 ;;
12130
12131osf3* | osf4* | osf5*)
12132 lt_cv_deplibs_check_method=pass_all
12133 ;;
12134
12135rdos*)
12136 lt_cv_deplibs_check_method=pass_all
12137 ;;
12138
12139solaris*)
12140 lt_cv_deplibs_check_method=pass_all
12141 ;;
12142
12143sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12144 lt_cv_deplibs_check_method=pass_all
12145 ;;
12146
12147sysv4 | sysv4.3*)
12148 case $host_vendor in
12149 motorola)
12150 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]'
12151 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
12152 ;;
12153 ncr)
12154 lt_cv_deplibs_check_method=pass_all
12155 ;;
12156 sequent)
12157 lt_cv_file_magic_cmd='/bin/file'
12158 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
12159 ;;
12160 sni)
12161 lt_cv_file_magic_cmd='/bin/file'
12162 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
12163 lt_cv_file_magic_test_file=/lib/libc.so
12164 ;;
12165 siemens)
12166 lt_cv_deplibs_check_method=pass_all
12167 ;;
12168 pc)
12169 lt_cv_deplibs_check_method=pass_all
12170 ;;
12171 esac
12172 ;;
12173
12174tpf*)
12175 lt_cv_deplibs_check_method=pass_all
12176 ;;
12177esac
12178
12179fi
5213506e
RW
12180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
12181$as_echo "$lt_cv_deplibs_check_method" >&6; }
da0f6381
PB
12182file_magic_cmd=$lt_cv_file_magic_cmd
12183deplibs_check_method=$lt_cv_deplibs_check_method
12184test -z "$deplibs_check_method" && deplibs_check_method=unknown
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197if test -n "$ac_tool_prefix"; then
12198 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12199set dummy ${ac_tool_prefix}ar; ac_word=$2
5213506e
RW
12200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12201$as_echo_n "checking for $ac_word... " >&6; }
12202if test "${ac_cv_prog_AR+set}" = set; then :
12203 $as_echo_n "(cached) " >&6
da0f6381
PB
12204else
12205 if test -n "$AR"; then
12206 ac_cv_prog_AR="$AR" # Let the user override the test.
12207else
12208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12209for as_dir in $PATH
12210do
12211 IFS=$as_save_IFS
12212 test -z "$as_dir" && as_dir=.
5213506e
RW
12213 for ac_exec_ext in '' $ac_executable_extensions; do
12214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12215 ac_cv_prog_AR="${ac_tool_prefix}ar"
5213506e 12216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12217 break 2
12218 fi
12219done
5213506e
RW
12220 done
12221IFS=$as_save_IFS
da0f6381
PB
12222
12223fi
12224fi
12225AR=$ac_cv_prog_AR
12226if test -n "$AR"; then
5213506e
RW
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12228$as_echo "$AR" >&6; }
da0f6381 12229else
5213506e
RW
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231$as_echo "no" >&6; }
da0f6381
PB
12232fi
12233
5213506e 12234
da0f6381
PB
12235fi
12236if test -z "$ac_cv_prog_AR"; then
12237 ac_ct_AR=$AR
12238 # Extract the first word of "ar", so it can be a program name with args.
12239set dummy ar; ac_word=$2
5213506e
RW
12240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12241$as_echo_n "checking for $ac_word... " >&6; }
12242if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
12243 $as_echo_n "(cached) " >&6
da0f6381
PB
12244else
12245 if test -n "$ac_ct_AR"; then
12246 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12247else
12248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12249for as_dir in $PATH
12250do
12251 IFS=$as_save_IFS
12252 test -z "$as_dir" && as_dir=.
5213506e
RW
12253 for ac_exec_ext in '' $ac_executable_extensions; do
12254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12255 ac_cv_prog_ac_ct_AR="ar"
5213506e 12256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12257 break 2
12258 fi
12259done
5213506e
RW
12260 done
12261IFS=$as_save_IFS
da0f6381 12262
da0f6381
PB
12263fi
12264fi
12265ac_ct_AR=$ac_cv_prog_ac_ct_AR
12266if test -n "$ac_ct_AR"; then
5213506e
RW
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12268$as_echo "$ac_ct_AR" >&6; }
da0f6381 12269else
5213506e
RW
12270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
da0f6381
PB
12272fi
12273
5213506e
RW
12274 if test "x$ac_ct_AR" = x; then
12275 AR="false"
12276 else
12277 case $cross_compiling:$ac_tool_warned in
12278yes:)
12279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12281ac_tool_warned=yes ;;
12282esac
12283 AR=$ac_ct_AR
12284 fi
da0f6381
PB
12285else
12286 AR="$ac_cv_prog_AR"
12287fi
12288
12289test -z "$AR" && AR=ar
12290test -z "$AR_FLAGS" && AR_FLAGS=cru
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302if test -n "$ac_tool_prefix"; then
12303 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
12304set dummy ${ac_tool_prefix}strip; ac_word=$2
5213506e
RW
12305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12306$as_echo_n "checking for $ac_word... " >&6; }
12307if test "${ac_cv_prog_STRIP+set}" = set; then :
12308 $as_echo_n "(cached) " >&6
da0f6381
PB
12309else
12310 if test -n "$STRIP"; then
12311 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
12312else
12313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12314for as_dir in $PATH
12315do
12316 IFS=$as_save_IFS
12317 test -z "$as_dir" && as_dir=.
5213506e
RW
12318 for ac_exec_ext in '' $ac_executable_extensions; do
12319 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12320 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5213506e 12321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12322 break 2
12323 fi
12324done
5213506e
RW
12325 done
12326IFS=$as_save_IFS
da0f6381
PB
12327
12328fi
12329fi
12330STRIP=$ac_cv_prog_STRIP
12331if test -n "$STRIP"; then
5213506e
RW
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
12333$as_echo "$STRIP" >&6; }
da0f6381 12334else
5213506e
RW
12335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
da0f6381
PB
12337fi
12338
5213506e 12339
da0f6381
PB
12340fi
12341if test -z "$ac_cv_prog_STRIP"; then
12342 ac_ct_STRIP=$STRIP
12343 # Extract the first word of "strip", so it can be a program name with args.
12344set dummy strip; ac_word=$2
5213506e
RW
12345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12346$as_echo_n "checking for $ac_word... " >&6; }
12347if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
12348 $as_echo_n "(cached) " >&6
da0f6381
PB
12349else
12350 if test -n "$ac_ct_STRIP"; then
12351 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
12352else
12353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356 IFS=$as_save_IFS
12357 test -z "$as_dir" && as_dir=.
5213506e
RW
12358 for ac_exec_ext in '' $ac_executable_extensions; do
12359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12360 ac_cv_prog_ac_ct_STRIP="strip"
5213506e 12361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12362 break 2
12363 fi
12364done
5213506e
RW
12365 done
12366IFS=$as_save_IFS
da0f6381 12367
da0f6381
PB
12368fi
12369fi
12370ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
12371if test -n "$ac_ct_STRIP"; then
5213506e
RW
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
12373$as_echo "$ac_ct_STRIP" >&6; }
da0f6381 12374else
5213506e
RW
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
da0f6381
PB
12377fi
12378
5213506e
RW
12379 if test "x$ac_ct_STRIP" = x; then
12380 STRIP=":"
12381 else
12382 case $cross_compiling:$ac_tool_warned in
12383yes:)
12384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12386ac_tool_warned=yes ;;
12387esac
12388 STRIP=$ac_ct_STRIP
12389 fi
da0f6381
PB
12390else
12391 STRIP="$ac_cv_prog_STRIP"
12392fi
12393
12394test -z "$STRIP" && STRIP=:
12395
12396
12397
12398
12399
12400
12401if test -n "$ac_tool_prefix"; then
12402 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
12403set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12405$as_echo_n "checking for $ac_word... " >&6; }
12406if test "${ac_cv_prog_RANLIB+set}" = set; then :
12407 $as_echo_n "(cached) " >&6
da0f6381
PB
12408else
12409 if test -n "$RANLIB"; then
12410 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12411else
12412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413for as_dir in $PATH
12414do
12415 IFS=$as_save_IFS
12416 test -z "$as_dir" && as_dir=.
5213506e
RW
12417 for ac_exec_ext in '' $ac_executable_extensions; do
12418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12419 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 12420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12421 break 2
12422 fi
12423done
5213506e
RW
12424 done
12425IFS=$as_save_IFS
da0f6381
PB
12426
12427fi
12428fi
12429RANLIB=$ac_cv_prog_RANLIB
12430if test -n "$RANLIB"; then
5213506e
RW
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
12432$as_echo "$RANLIB" >&6; }
da0f6381 12433else
5213506e
RW
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12435$as_echo "no" >&6; }
da0f6381
PB
12436fi
12437
5213506e 12438
da0f6381
PB
12439fi
12440if test -z "$ac_cv_prog_RANLIB"; then
12441 ac_ct_RANLIB=$RANLIB
12442 # Extract the first word of "ranlib", so it can be a program name with args.
12443set dummy ranlib; ac_word=$2
5213506e
RW
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12445$as_echo_n "checking for $ac_word... " >&6; }
12446if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
12447 $as_echo_n "(cached) " >&6
da0f6381
PB
12448else
12449 if test -n "$ac_ct_RANLIB"; then
12450 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
12451else
12452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12453for as_dir in $PATH
12454do
12455 IFS=$as_save_IFS
12456 test -z "$as_dir" && as_dir=.
5213506e
RW
12457 for ac_exec_ext in '' $ac_executable_extensions; do
12458 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12459 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 12460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12461 break 2
12462 fi
12463done
5213506e
RW
12464 done
12465IFS=$as_save_IFS
da0f6381 12466
da0f6381
PB
12467fi
12468fi
12469ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
12470if test -n "$ac_ct_RANLIB"; then
5213506e
RW
12471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
12472$as_echo "$ac_ct_RANLIB" >&6; }
da0f6381 12473else
5213506e
RW
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
da0f6381
PB
12476fi
12477
5213506e
RW
12478 if test "x$ac_ct_RANLIB" = x; then
12479 RANLIB=":"
12480 else
12481 case $cross_compiling:$ac_tool_warned in
12482yes:)
12483{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12484$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12485ac_tool_warned=yes ;;
12486esac
12487 RANLIB=$ac_ct_RANLIB
12488 fi
da0f6381
PB
12489else
12490 RANLIB="$ac_cv_prog_RANLIB"
12491fi
12492
12493test -z "$RANLIB" && RANLIB=:
12494
12495
12496
12497
12498
12499
12500# Determine commands to create old-style static archives.
5d47bb02 12501old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
12502old_postinstall_cmds='chmod 644 $oldlib'
12503old_postuninstall_cmds=
12504
12505if test -n "$RANLIB"; then
12506 case $host_os in
12507 openbsd*)
12508 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
12509 ;;
12510 *)
12511 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
12512 ;;
12513 esac
12514 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
12515fi
12516
43e02a8a
RW
12517case $host_os in
12518 darwin*)
12519 lock_old_archive_extraction=yes ;;
12520 *)
12521 lock_old_archive_extraction=no ;;
12522esac
12523
12524
12525
12526
12527
12528
da0f6381
PB
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562# If no C compiler was specified, use CC.
12563LTCC=${LTCC-"$CC"}
12564
12565# If no C compiler flags were specified, use CFLAGS.
12566LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12567
12568# Allow CC to be a program name with arguments.
12569compiler=$CC
12570
12571
12572# Check for command to grab the raw symbol name followed by C symbol from nm.
5213506e
RW
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
12574$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
12575if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
12576 $as_echo_n "(cached) " >&6
da0f6381
PB
12577else
12578
12579# These are sane defaults that work on at least a few old systems.
12580# [They come from Ultrix. What could be older than Ultrix?!! ;)]
12581
12582# Character class describing NM global symbol codes.
12583symcode='[BCDEGRST]'
12584
12585# Regexp to match symbols that can be accessed directly from C.
12586sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
12587
12588# Define system-specific variables.
12589case $host_os in
12590aix*)
12591 symcode='[BCDT]'
12592 ;;
5d47bb02 12593cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
12594 symcode='[ABCDGISTW]'
12595 ;;
12596hpux*)
12597 if test "$host_cpu" = ia64; then
12598 symcode='[ABCDEGRST]'
12599 fi
12600 ;;
12601irix* | nonstopux*)
12602 symcode='[BCDEGRST]'
12603 ;;
12604osf*)
12605 symcode='[BCDEGQRST]'
12606 ;;
12607solaris*)
12608 symcode='[BDRT]'
12609 ;;
12610sco3.2v5*)
12611 symcode='[DT]'
12612 ;;
12613sysv4.2uw2*)
12614 symcode='[DT]'
12615 ;;
12616sysv5* | sco5v6* | unixware* | OpenUNIX*)
12617 symcode='[ABDT]'
12618 ;;
12619sysv4)
12620 symcode='[DFNSTU]'
12621 ;;
12622esac
12623
12624# If we're using GNU nm, then use its standard symbol codes.
12625case `$NM -V 2>&1` in
12626*GNU* | *'with BFD'*)
12627 symcode='[ABCDGIRSTW]' ;;
12628esac
12629
12630# Transform an extracted symbol line into a proper C declaration.
12631# Some systems (esp. on ia64) link data and code symbols differently,
12632# so use this general approach.
12633lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
12634
12635# Transform an extracted symbol line into symbol name and symbol address
12636lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 12637lt_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
12638
12639# Handle CRLF in mingw tool chain
12640opt_cr=
12641case $build_os in
12642mingw*)
12643 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
12644 ;;
12645esac
12646
12647# Try without a prefix underscore, then with it.
12648for ac_symprfx in "" "_"; do
12649
12650 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
12651 symxfrm="\\1 $ac_symprfx\\2 \\2"
12652
12653 # Write the raw and C identifiers.
12654 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
12655 # Fake it for dumpbin and say T for any non-static function
12656 # and D for any global variable.
12657 # Also find C++ and __fastcall symbols from MSVC++,
12658 # which start with @ or ?.
12659 lt_cv_sys_global_symbol_pipe="$AWK '"\
12660" {last_section=section; section=\$ 3};"\
12661" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
12662" \$ 0!~/External *\|/{next};"\
12663" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
12664" {if(hide[section]) next};"\
12665" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
12666" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
12667" s[1]~/^[@?]/{print s[1], s[1]; next};"\
12668" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
12669" ' prfx=^$ac_symprfx"
12670 else
12671 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
12672 fi
12673
12674 # Check to see that the pipe works correctly.
12675 pipe_works=no
12676
12677 rm -f conftest*
12678 cat > conftest.$ac_ext <<_LT_EOF
12679#ifdef __cplusplus
12680extern "C" {
12681#endif
12682char nm_test_var;
12683void nm_test_func(void);
12684void nm_test_func(void){}
12685#ifdef __cplusplus
12686}
12687#endif
12688int main(){nm_test_var='a';nm_test_func();return(0);}
12689_LT_EOF
12690
5213506e 12691 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12692 (eval $ac_compile) 2>&5
12693 ac_status=$?
5213506e
RW
12694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12695 test $ac_status = 0; }; then
da0f6381
PB
12696 # Now try to grab the symbols.
12697 nlist=conftest.nm
43e02a8a
RW
12698 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
12699 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
da0f6381 12700 ac_status=$?
5213506e
RW
12701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12702 test $ac_status = 0; } && test -s "$nlist"; then
da0f6381
PB
12703 # Try sorting and uniquifying the output.
12704 if sort "$nlist" | uniq > "$nlist"T; then
12705 mv -f "$nlist"T "$nlist"
12706 else
12707 rm -f "$nlist"T
12708 fi
12709
12710 # Make sure that we snagged all the symbols we need.
12711 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
12712 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
12713 cat <<_LT_EOF > conftest.$ac_ext
12714#ifdef __cplusplus
12715extern "C" {
12716#endif
12717
12718_LT_EOF
12719 # Now generate the symbol file.
12720 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
12721
12722 cat <<_LT_EOF >> conftest.$ac_ext
12723
12724/* The mapping between symbol names and symbols. */
12725const struct {
12726 const char *name;
12727 void *address;
12728}
12729lt__PROGRAM__LTX_preloaded_symbols[] =
12730{
12731 { "@PROGRAM@", (void *) 0 },
12732_LT_EOF
12733 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
12734 cat <<\_LT_EOF >> conftest.$ac_ext
12735 {0, (void *) 0}
12736};
12737
12738/* This works around a problem in FreeBSD linker */
12739#ifdef FREEBSD_WORKAROUND
12740static const void *lt_preloaded_setup() {
12741 return lt__PROGRAM__LTX_preloaded_symbols;
12742}
12743#endif
12744
12745#ifdef __cplusplus
12746}
12747#endif
12748_LT_EOF
12749 # Now try linking the two files.
12750 mv conftest.$ac_objext conftstm.$ac_objext
12751 lt_save_LIBS="$LIBS"
12752 lt_save_CFLAGS="$CFLAGS"
12753 LIBS="conftstm.$ac_objext"
12754 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5213506e 12755 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
da0f6381
PB
12756 (eval $ac_link) 2>&5
12757 ac_status=$?
5213506e
RW
12758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12759 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
da0f6381
PB
12760 pipe_works=yes
12761 fi
12762 LIBS="$lt_save_LIBS"
12763 CFLAGS="$lt_save_CFLAGS"
12764 else
12765 echo "cannot find nm_test_func in $nlist" >&5
12766 fi
12767 else
12768 echo "cannot find nm_test_var in $nlist" >&5
12769 fi
12770 else
12771 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
12772 fi
12773 else
12774 echo "$progname: failed program was:" >&5
12775 cat conftest.$ac_ext >&5
12776 fi
5d47bb02 12777 rm -rf conftest* conftst*
da0f6381
PB
12778
12779 # Do not use the global_symbol_pipe unless it works.
12780 if test "$pipe_works" = yes; then
12781 break
12782 else
12783 lt_cv_sys_global_symbol_pipe=
12784 fi
12785done
12786
12787fi
12788
12789if test -z "$lt_cv_sys_global_symbol_pipe"; then
12790 lt_cv_sys_global_symbol_to_cdecl=
12791fi
12792if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5213506e
RW
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12794$as_echo "failed" >&6; }
da0f6381 12795else
5213506e
RW
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12797$as_echo "ok" >&6; }
da0f6381
PB
12798fi
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
5d47bb02
PG
12814
12815
12816
12817
12818
da0f6381
PB
12819
12820
5213506e
RW
12821# Check whether --enable-libtool-lock was given.
12822if test "${enable_libtool_lock+set}" = set; then :
12823 enableval=$enable_libtool_lock;
12824fi
da0f6381 12825
da0f6381
PB
12826test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12827
12828# Some flags need to be propagated to the compiler or linker for good
12829# libtool support.
12830case $host in
12831ia64-*-hpux*)
12832 # Find out which ABI we are using.
12833 echo 'int i;' > conftest.$ac_ext
5213506e 12834 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12835 (eval $ac_compile) 2>&5
12836 ac_status=$?
5213506e
RW
12837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12838 test $ac_status = 0; }; then
da0f6381
PB
12839 case `/usr/bin/file conftest.$ac_objext` in
12840 *ELF-32*)
12841 HPUX_IA64_MODE="32"
12842 ;;
12843 *ELF-64*)
12844 HPUX_IA64_MODE="64"
12845 ;;
12846 esac
12847 fi
12848 rm -rf conftest*
12849 ;;
12850*-*-irix6*)
12851 # Find out which ABI we are using.
43e02a8a 12852 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
5213506e 12853 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12854 (eval $ac_compile) 2>&5
12855 ac_status=$?
5213506e
RW
12856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12857 test $ac_status = 0; }; then
da0f6381
PB
12858 if test "$lt_cv_prog_gnu_ld" = yes; then
12859 case `/usr/bin/file conftest.$ac_objext` in
12860 *32-bit*)
12861 LD="${LD-ld} -melf32bsmip"
12862 ;;
12863 *N32*)
12864 LD="${LD-ld} -melf32bmipn32"
12865 ;;
12866 *64-bit*)
12867 LD="${LD-ld} -melf64bmip"
12868 ;;
12869 esac
12870 else
12871 case `/usr/bin/file conftest.$ac_objext` in
12872 *32-bit*)
12873 LD="${LD-ld} -32"
12874 ;;
12875 *N32*)
12876 LD="${LD-ld} -n32"
12877 ;;
12878 *64-bit*)
12879 LD="${LD-ld} -64"
12880 ;;
12881 esac
12882 fi
12883 fi
12884 rm -rf conftest*
12885 ;;
12886
12887x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12888s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12889 # Find out which ABI we are using.
12890 echo 'int i;' > conftest.$ac_ext
5213506e 12891 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12892 (eval $ac_compile) 2>&5
12893 ac_status=$?
5213506e
RW
12894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12895 test $ac_status = 0; }; then
da0f6381
PB
12896 case `/usr/bin/file conftest.o` in
12897 *32-bit*)
12898 case $host in
12899 x86_64-*kfreebsd*-gnu)
12900 LD="${LD-ld} -m elf_i386_fbsd"
12901 ;;
12902 x86_64-*linux*)
12903 LD="${LD-ld} -m elf_i386"
12904 ;;
12905 ppc64-*linux*|powerpc64-*linux*)
12906 LD="${LD-ld} -m elf32ppclinux"
12907 ;;
12908 s390x-*linux*)
12909 LD="${LD-ld} -m elf_s390"
12910 ;;
12911 sparc64-*linux*)
12912 LD="${LD-ld} -m elf32_sparc"
12913 ;;
12914 esac
12915 ;;
12916 *64-bit*)
12917 case $host in
12918 x86_64-*kfreebsd*-gnu)
12919 LD="${LD-ld} -m elf_x86_64_fbsd"
12920 ;;
12921 x86_64-*linux*)
12922 LD="${LD-ld} -m elf_x86_64"
12923 ;;
12924 ppc*-*linux*|powerpc*-*linux*)
12925 LD="${LD-ld} -m elf64ppc"
12926 ;;
12927 s390*-*linux*|s390*-*tpf*)
12928 LD="${LD-ld} -m elf64_s390"
12929 ;;
12930 sparc*-*linux*)
12931 LD="${LD-ld} -m elf64_sparc"
12932 ;;
12933 esac
12934 ;;
12935 esac
12936 fi
12937 rm -rf conftest*
12938 ;;
12939
12940*-*-sco3.2v5*)
12941 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
12942 SAVE_CFLAGS="$CFLAGS"
12943 CFLAGS="$CFLAGS -belf"
5213506e
RW
12944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
12945$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
12946if test "${lt_cv_cc_needs_belf+set}" = set; then :
12947 $as_echo_n "(cached) " >&6
da0f6381
PB
12948else
12949 ac_ext=c
12950ac_cpp='$CPP $CPPFLAGS'
12951ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12952ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12953ac_compiler_gnu=$ac_cv_c_compiler_gnu
12954
5213506e 12955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
12956/* end confdefs.h. */
12957
12958int
12959main ()
12960{
12961
12962 ;
12963 return 0;
12964}
12965_ACEOF
5213506e 12966if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
12967 lt_cv_cc_needs_belf=yes
12968else
5213506e 12969 lt_cv_cc_needs_belf=no
da0f6381 12970fi
5213506e
RW
12971rm -f core conftest.err conftest.$ac_objext \
12972 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
12973 ac_ext=c
12974ac_cpp='$CPP $CPPFLAGS'
12975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12977ac_compiler_gnu=$ac_cv_c_compiler_gnu
12978
12979fi
5213506e
RW
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
12981$as_echo "$lt_cv_cc_needs_belf" >&6; }
da0f6381
PB
12982 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
12983 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
12984 CFLAGS="$SAVE_CFLAGS"
12985 fi
12986 ;;
12987sparc*-*solaris*)
12988 # Find out which ABI we are using.
12989 echo 'int i;' > conftest.$ac_ext
5213506e 12990 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12991 (eval $ac_compile) 2>&5
12992 ac_status=$?
5213506e
RW
12993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12994 test $ac_status = 0; }; then
da0f6381
PB
12995 case `/usr/bin/file conftest.o` in
12996 *64-bit*)
12997 case $lt_cv_prog_gnu_ld in
12998 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
12999 *)
13000 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
13001 LD="${LD-ld} -64"
13002 fi
13003 ;;
da0f6381
PB
13004 esac
13005 ;;
13006 esac
13007 fi
13008 rm -rf conftest*
13009 ;;
13010esac
13011
5d47bb02
PG
13012need_locks="$enable_libtool_lock"
13013
13014
13015 case $host_os in
13016 rhapsody* | darwin*)
13017 if test -n "$ac_tool_prefix"; then
13018 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
13019set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
5213506e
RW
13020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13021$as_echo_n "checking for $ac_word... " >&6; }
13022if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
13023 $as_echo_n "(cached) " >&6
5d47bb02
PG
13024else
13025 if test -n "$DSYMUTIL"; then
13026 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
13027else
13028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029for as_dir in $PATH
13030do
13031 IFS=$as_save_IFS
13032 test -z "$as_dir" && as_dir=.
5213506e
RW
13033 for ac_exec_ext in '' $ac_executable_extensions; do
13034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13035 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
5213506e 13036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13037 break 2
13038 fi
13039done
5213506e
RW
13040 done
13041IFS=$as_save_IFS
5d47bb02
PG
13042
13043fi
13044fi
13045DSYMUTIL=$ac_cv_prog_DSYMUTIL
13046if test -n "$DSYMUTIL"; then
5213506e
RW
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
13048$as_echo "$DSYMUTIL" >&6; }
5d47bb02 13049else
5213506e
RW
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051$as_echo "no" >&6; }
5d47bb02
PG
13052fi
13053
5213506e 13054
5d47bb02
PG
13055fi
13056if test -z "$ac_cv_prog_DSYMUTIL"; then
13057 ac_ct_DSYMUTIL=$DSYMUTIL
13058 # Extract the first word of "dsymutil", so it can be a program name with args.
13059set dummy dsymutil; ac_word=$2
5213506e
RW
13060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13061$as_echo_n "checking for $ac_word... " >&6; }
13062if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
13063 $as_echo_n "(cached) " >&6
5d47bb02
PG
13064else
13065 if test -n "$ac_ct_DSYMUTIL"; then
13066 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
13067else
13068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13069for as_dir in $PATH
13070do
13071 IFS=$as_save_IFS
13072 test -z "$as_dir" && as_dir=.
5213506e
RW
13073 for ac_exec_ext in '' $ac_executable_extensions; do
13074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13075 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
5213506e 13076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13077 break 2
13078 fi
13079done
5213506e
RW
13080 done
13081IFS=$as_save_IFS
5d47bb02 13082
5d47bb02
PG
13083fi
13084fi
13085ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
13086if test -n "$ac_ct_DSYMUTIL"; then
5213506e
RW
13087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
13088$as_echo "$ac_ct_DSYMUTIL" >&6; }
5d47bb02 13089else
5213506e
RW
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13091$as_echo "no" >&6; }
5d47bb02
PG
13092fi
13093
5213506e
RW
13094 if test "x$ac_ct_DSYMUTIL" = x; then
13095 DSYMUTIL=":"
13096 else
13097 case $cross_compiling:$ac_tool_warned in
13098yes:)
13099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13101ac_tool_warned=yes ;;
13102esac
13103 DSYMUTIL=$ac_ct_DSYMUTIL
13104 fi
5d47bb02
PG
13105else
13106 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
13107fi
13108
13109 if test -n "$ac_tool_prefix"; then
13110 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
13111set dummy ${ac_tool_prefix}nmedit; ac_word=$2
5213506e
RW
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113$as_echo_n "checking for $ac_word... " >&6; }
13114if test "${ac_cv_prog_NMEDIT+set}" = set; then :
13115 $as_echo_n "(cached) " >&6
5d47bb02
PG
13116else
13117 if test -n "$NMEDIT"; then
13118 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
13119else
13120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13121for as_dir in $PATH
13122do
13123 IFS=$as_save_IFS
13124 test -z "$as_dir" && as_dir=.
5213506e
RW
13125 for ac_exec_ext in '' $ac_executable_extensions; do
13126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13127 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
5213506e 13128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13129 break 2
13130 fi
13131done
5213506e
RW
13132 done
13133IFS=$as_save_IFS
5d47bb02
PG
13134
13135fi
13136fi
13137NMEDIT=$ac_cv_prog_NMEDIT
13138if test -n "$NMEDIT"; then
5213506e
RW
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
13140$as_echo "$NMEDIT" >&6; }
5d47bb02 13141else
5213506e
RW
13142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13143$as_echo "no" >&6; }
5d47bb02
PG
13144fi
13145
5213506e 13146
5d47bb02
PG
13147fi
13148if test -z "$ac_cv_prog_NMEDIT"; then
13149 ac_ct_NMEDIT=$NMEDIT
13150 # Extract the first word of "nmedit", so it can be a program name with args.
13151set dummy nmedit; ac_word=$2
5213506e
RW
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13153$as_echo_n "checking for $ac_word... " >&6; }
13154if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
13155 $as_echo_n "(cached) " >&6
5d47bb02
PG
13156else
13157 if test -n "$ac_ct_NMEDIT"; then
13158 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
13159else
13160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13161for as_dir in $PATH
13162do
13163 IFS=$as_save_IFS
13164 test -z "$as_dir" && as_dir=.
5213506e
RW
13165 for ac_exec_ext in '' $ac_executable_extensions; do
13166 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13167 ac_cv_prog_ac_ct_NMEDIT="nmedit"
5213506e 13168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13169 break 2
13170 fi
13171done
5213506e
RW
13172 done
13173IFS=$as_save_IFS
5d47bb02 13174
5d47bb02
PG
13175fi
13176fi
13177ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
13178if test -n "$ac_ct_NMEDIT"; then
5213506e
RW
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
13180$as_echo "$ac_ct_NMEDIT" >&6; }
5d47bb02 13181else
5213506e
RW
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13183$as_echo "no" >&6; }
5d47bb02
PG
13184fi
13185
5213506e
RW
13186 if test "x$ac_ct_NMEDIT" = x; then
13187 NMEDIT=":"
13188 else
13189 case $cross_compiling:$ac_tool_warned in
13190yes:)
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13193ac_tool_warned=yes ;;
13194esac
13195 NMEDIT=$ac_ct_NMEDIT
13196 fi
5d47bb02
PG
13197else
13198 NMEDIT="$ac_cv_prog_NMEDIT"
13199fi
13200
13201 if test -n "$ac_tool_prefix"; then
13202 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
13203set dummy ${ac_tool_prefix}lipo; ac_word=$2
5213506e
RW
13204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13205$as_echo_n "checking for $ac_word... " >&6; }
13206if test "${ac_cv_prog_LIPO+set}" = set; then :
13207 $as_echo_n "(cached) " >&6
5d47bb02
PG
13208else
13209 if test -n "$LIPO"; then
13210 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
13211else
13212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13213for as_dir in $PATH
13214do
13215 IFS=$as_save_IFS
13216 test -z "$as_dir" && as_dir=.
5213506e
RW
13217 for ac_exec_ext in '' $ac_executable_extensions; do
13218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13219 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
5213506e 13220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13221 break 2
13222 fi
13223done
5213506e
RW
13224 done
13225IFS=$as_save_IFS
5d47bb02
PG
13226
13227fi
13228fi
13229LIPO=$ac_cv_prog_LIPO
13230if test -n "$LIPO"; then
5213506e
RW
13231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
13232$as_echo "$LIPO" >&6; }
5d47bb02 13233else
5213506e
RW
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13235$as_echo "no" >&6; }
5d47bb02
PG
13236fi
13237
5213506e 13238
5d47bb02
PG
13239fi
13240if test -z "$ac_cv_prog_LIPO"; then
13241 ac_ct_LIPO=$LIPO
13242 # Extract the first word of "lipo", so it can be a program name with args.
13243set dummy lipo; ac_word=$2
5213506e
RW
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13245$as_echo_n "checking for $ac_word... " >&6; }
13246if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
13247 $as_echo_n "(cached) " >&6
5d47bb02
PG
13248else
13249 if test -n "$ac_ct_LIPO"; then
13250 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
13251else
13252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255 IFS=$as_save_IFS
13256 test -z "$as_dir" && as_dir=.
5213506e
RW
13257 for ac_exec_ext in '' $ac_executable_extensions; do
13258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13259 ac_cv_prog_ac_ct_LIPO="lipo"
5213506e 13260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13261 break 2
13262 fi
13263done
5213506e
RW
13264 done
13265IFS=$as_save_IFS
5d47bb02 13266
5d47bb02
PG
13267fi
13268fi
13269ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
13270if test -n "$ac_ct_LIPO"; then
5213506e
RW
13271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
13272$as_echo "$ac_ct_LIPO" >&6; }
5d47bb02 13273else
5213506e
RW
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13275$as_echo "no" >&6; }
5d47bb02
PG
13276fi
13277
5213506e
RW
13278 if test "x$ac_ct_LIPO" = x; then
13279 LIPO=":"
13280 else
13281 case $cross_compiling:$ac_tool_warned in
13282yes:)
13283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13285ac_tool_warned=yes ;;
13286esac
13287 LIPO=$ac_ct_LIPO
13288 fi
5d47bb02
PG
13289else
13290 LIPO="$ac_cv_prog_LIPO"
13291fi
13292
13293 if test -n "$ac_tool_prefix"; then
13294 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
13295set dummy ${ac_tool_prefix}otool; ac_word=$2
5213506e
RW
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13297$as_echo_n "checking for $ac_word... " >&6; }
13298if test "${ac_cv_prog_OTOOL+set}" = set; then :
13299 $as_echo_n "(cached) " >&6
5d47bb02
PG
13300else
13301 if test -n "$OTOOL"; then
13302 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
13303else
13304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13305for as_dir in $PATH
13306do
13307 IFS=$as_save_IFS
13308 test -z "$as_dir" && as_dir=.
5213506e
RW
13309 for ac_exec_ext in '' $ac_executable_extensions; do
13310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13311 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
5213506e 13312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13313 break 2
13314 fi
13315done
5213506e
RW
13316 done
13317IFS=$as_save_IFS
5d47bb02
PG
13318
13319fi
13320fi
13321OTOOL=$ac_cv_prog_OTOOL
13322if test -n "$OTOOL"; then
5213506e
RW
13323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
13324$as_echo "$OTOOL" >&6; }
5d47bb02 13325else
5213506e
RW
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13327$as_echo "no" >&6; }
5d47bb02
PG
13328fi
13329
5213506e 13330
5d47bb02
PG
13331fi
13332if test -z "$ac_cv_prog_OTOOL"; then
13333 ac_ct_OTOOL=$OTOOL
13334 # Extract the first word of "otool", so it can be a program name with args.
13335set dummy otool; ac_word=$2
5213506e
RW
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13337$as_echo_n "checking for $ac_word... " >&6; }
13338if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
13339 $as_echo_n "(cached) " >&6
5d47bb02
PG
13340else
13341 if test -n "$ac_ct_OTOOL"; then
13342 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
13343else
13344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13345for as_dir in $PATH
13346do
13347 IFS=$as_save_IFS
13348 test -z "$as_dir" && as_dir=.
5213506e
RW
13349 for ac_exec_ext in '' $ac_executable_extensions; do
13350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13351 ac_cv_prog_ac_ct_OTOOL="otool"
5213506e 13352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13353 break 2
13354 fi
13355done
5213506e
RW
13356 done
13357IFS=$as_save_IFS
5d47bb02 13358
5d47bb02
PG
13359fi
13360fi
13361ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
13362if test -n "$ac_ct_OTOOL"; then
5213506e
RW
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
13364$as_echo "$ac_ct_OTOOL" >&6; }
5d47bb02 13365else
5213506e
RW
13366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13367$as_echo "no" >&6; }
5d47bb02
PG
13368fi
13369
5213506e
RW
13370 if test "x$ac_ct_OTOOL" = x; then
13371 OTOOL=":"
13372 else
13373 case $cross_compiling:$ac_tool_warned in
13374yes:)
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13377ac_tool_warned=yes ;;
13378esac
13379 OTOOL=$ac_ct_OTOOL
13380 fi
5d47bb02
PG
13381else
13382 OTOOL="$ac_cv_prog_OTOOL"
13383fi
13384
13385 if test -n "$ac_tool_prefix"; then
13386 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
13387set dummy ${ac_tool_prefix}otool64; ac_word=$2
5213506e
RW
13388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13389$as_echo_n "checking for $ac_word... " >&6; }
13390if test "${ac_cv_prog_OTOOL64+set}" = set; then :
13391 $as_echo_n "(cached) " >&6
5d47bb02
PG
13392else
13393 if test -n "$OTOOL64"; then
13394 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
13395else
13396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13397for as_dir in $PATH
13398do
13399 IFS=$as_save_IFS
13400 test -z "$as_dir" && as_dir=.
5213506e
RW
13401 for ac_exec_ext in '' $ac_executable_extensions; do
13402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13403 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
5213506e 13404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13405 break 2
13406 fi
13407done
5213506e
RW
13408 done
13409IFS=$as_save_IFS
5d47bb02
PG
13410
13411fi
13412fi
13413OTOOL64=$ac_cv_prog_OTOOL64
13414if test -n "$OTOOL64"; then
5213506e
RW
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
13416$as_echo "$OTOOL64" >&6; }
5d47bb02 13417else
5213506e
RW
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13419$as_echo "no" >&6; }
5d47bb02
PG
13420fi
13421
5213506e 13422
5d47bb02
PG
13423fi
13424if test -z "$ac_cv_prog_OTOOL64"; then
13425 ac_ct_OTOOL64=$OTOOL64
13426 # Extract the first word of "otool64", so it can be a program name with args.
13427set dummy otool64; ac_word=$2
5213506e
RW
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13429$as_echo_n "checking for $ac_word... " >&6; }
13430if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
13431 $as_echo_n "(cached) " >&6
5d47bb02
PG
13432else
13433 if test -n "$ac_ct_OTOOL64"; then
13434 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
13435else
13436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13437for as_dir in $PATH
13438do
13439 IFS=$as_save_IFS
13440 test -z "$as_dir" && as_dir=.
5213506e
RW
13441 for ac_exec_ext in '' $ac_executable_extensions; do
13442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13443 ac_cv_prog_ac_ct_OTOOL64="otool64"
5213506e 13444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13445 break 2
13446 fi
13447done
5213506e
RW
13448 done
13449IFS=$as_save_IFS
5d47bb02 13450
5d47bb02
PG
13451fi
13452fi
13453ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
13454if test -n "$ac_ct_OTOOL64"; then
5213506e
RW
13455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
13456$as_echo "$ac_ct_OTOOL64" >&6; }
5d47bb02 13457else
5213506e
RW
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13459$as_echo "no" >&6; }
5d47bb02
PG
13460fi
13461
5213506e
RW
13462 if test "x$ac_ct_OTOOL64" = x; then
13463 OTOOL64=":"
13464 else
13465 case $cross_compiling:$ac_tool_warned in
13466yes:)
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13469ac_tool_warned=yes ;;
13470esac
13471 OTOOL64=$ac_ct_OTOOL64
13472 fi
5d47bb02
PG
13473else
13474 OTOOL64="$ac_cv_prog_OTOOL64"
13475fi
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
5213506e
RW
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
13504$as_echo_n "checking for -single_module linker flag... " >&6; }
13505if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
13506 $as_echo_n "(cached) " >&6
5d47bb02
PG
13507else
13508 lt_cv_apple_cc_single_mod=no
13509 if test -z "${LT_MULTI_MODULE}"; then
13510 # By default we will add the -single_module flag. You can override
13511 # by either setting the environment variable LT_MULTI_MODULE
13512 # non-empty at configure time, or by adding -multi_module to the
13513 # link flags.
13514 rm -rf libconftest.dylib*
13515 echo "int foo(void){return 1;}" > conftest.c
13516 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13517-dynamiclib -Wl,-single_module conftest.c" >&5
13518 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13519 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
13520 _lt_result=$?
13521 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
13522 lt_cv_apple_cc_single_mod=yes
13523 else
13524 cat conftest.err >&5
13525 fi
13526 rm -rf libconftest.dylib*
13527 rm -f conftest.*
13528 fi
13529fi
5213506e
RW
13530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
13531$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
13533$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
13534if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
13535 $as_echo_n "(cached) " >&6
5d47bb02
PG
13536else
13537 lt_cv_ld_exported_symbols_list=no
13538 save_LDFLAGS=$LDFLAGS
13539 echo "_main" > conftest.sym
13540 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
5213506e 13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d47bb02
PG
13542/* end confdefs.h. */
13543
13544int
13545main ()
13546{
13547
13548 ;
13549 return 0;
13550}
13551_ACEOF
5213506e 13552if ac_fn_c_try_link "$LINENO"; then :
5d47bb02
PG
13553 lt_cv_ld_exported_symbols_list=yes
13554else
5213506e 13555 lt_cv_ld_exported_symbols_list=no
5d47bb02 13556fi
5213506e
RW
13557rm -f core conftest.err conftest.$ac_objext \
13558 conftest$ac_exeext conftest.$ac_ext
5d47bb02
PG
13559 LDFLAGS="$save_LDFLAGS"
13560
13561fi
5213506e
RW
13562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
13563$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
43e02a8a
RW
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
13565$as_echo_n "checking for -force_load linker flag... " >&6; }
13566if test "${lt_cv_ld_force_load+set}" = set; then :
13567 $as_echo_n "(cached) " >&6
13568else
13569 lt_cv_ld_force_load=no
13570 cat > conftest.c << _LT_EOF
13571int forced_loaded() { return 2;}
13572_LT_EOF
13573 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
13574 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
13575 echo "$AR cru libconftest.a conftest.o" >&5
13576 $AR cru libconftest.a conftest.o 2>&5
13577 cat > conftest.c << _LT_EOF
13578int main() { return 0;}
13579_LT_EOF
13580 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
13581 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
13582 _lt_result=$?
13583 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
13584 lt_cv_ld_force_load=yes
13585 else
13586 cat conftest.err >&5
13587 fi
13588 rm -f conftest.err libconftest.a conftest conftest.c
13589 rm -rf conftest.dSYM
13590
13591fi
13592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
13593$as_echo "$lt_cv_ld_force_load" >&6; }
5d47bb02
PG
13594 case $host_os in
13595 rhapsody* | darwin1.[012])
13596 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
13597 darwin1.*)
13598 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13599 darwin*) # darwin 5.x on
13600 # if running on 10.5 or later, the deployment target defaults
13601 # to the OS version, if on x86, and 10.4, the deployment
13602 # target defaults to 10.4. Don't you love it?
13603 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
13604 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
13605 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13606 10.[012]*)
13607 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13608 10.*)
13609 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13610 esac
13611 ;;
13612 esac
13613 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
13614 _lt_dar_single_mod='$single_module'
13615 fi
13616 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
13617 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
13618 else
13619 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
13620 fi
43e02a8a 13621 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
5d47bb02
PG
13622 _lt_dsymutil='~$DSYMUTIL $lib || :'
13623 else
13624 _lt_dsymutil=
13625 fi
13626 ;;
13627 esac
da0f6381 13628
da0f6381 13629for ac_header in dlfcn.h
5213506e
RW
13630do :
13631 ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h"
13632if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
da0f6381 13633 cat >>confdefs.h <<_ACEOF
5213506e 13634#define HAVE_DLFCN_H 1
da0f6381
PB
13635_ACEOF
13636
13637fi
13638done
13639
13640
13641
5d47bb02
PG
13642
13643
5213506e 13644
43e02a8a 13645# Set options
5d47bb02 13646
43e02a8a
RW
13647
13648
13649 enable_dlopen=no
13650
13651
13652 enable_win32_dll=no
13653
13654
13655 # Check whether --enable-shared was given.
13656if test "${enable_shared+set}" = set; then :
13657 enableval=$enable_shared; p=${PACKAGE-default}
13658 case $enableval in
13659 yes) enable_shared=yes ;;
13660 no) enable_shared=no ;;
13661 *)
13662 enable_shared=no
13663 # Look at the argument we got. We use all the common list separators.
13664 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13665 for pkg in $enableval; do
13666 IFS="$lt_save_ifs"
13667 if test "X$pkg" = "X$p"; then
13668 enable_shared=yes
13669 fi
13670 done
13671 IFS="$lt_save_ifs"
13672 ;;
13673 esac
5d47bb02 13674else
43e02a8a 13675 enable_shared=yes
5213506e
RW
13676fi
13677
da0f6381
PB
13678
13679
13680
13681
13682
da0f6381 13683
da0f6381 13684
da0f6381 13685
5213506e
RW
13686 # Check whether --enable-static was given.
13687if test "${enable_static+set}" = set; then :
13688 enableval=$enable_static; p=${PACKAGE-default}
00020c16
ILT
13689 case $enableval in
13690 yes) enable_static=yes ;;
13691 no) enable_static=no ;;
13692 *)
13693 enable_static=no
13694 # Look at the argument we got. We use all the common list separators.
13695 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13696 for pkg in $enableval; do
13697 IFS="$lt_save_ifs"
13698 if test "X$pkg" = "X$p"; then
13699 enable_static=yes
13700 fi
13701 done
13702 IFS="$lt_save_ifs"
13703 ;;
13704 esac
da0f6381 13705else
00020c16 13706 enable_static=yes
5213506e 13707fi
da0f6381
PB
13708
13709
da0f6381 13710
da0f6381 13711
da0f6381 13712
da0f6381
PB
13713
13714
da0f6381 13715
da0f6381 13716
5213506e
RW
13717
13718# Check whether --with-pic was given.
13719if test "${with_pic+set}" = set; then :
13720 withval=$with_pic; pic_mode="$withval"
00020c16
ILT
13721else
13722 pic_mode=default
5213506e
RW
13723fi
13724
da0f6381 13725
00020c16 13726test -z "$pic_mode" && pic_mode=default
da0f6381
PB
13727
13728
13729
13730
13731
13732
13733
5213506e
RW
13734 # Check whether --enable-fast-install was given.
13735if test "${enable_fast_install+set}" = set; then :
13736 enableval=$enable_fast_install; p=${PACKAGE-default}
00020c16
ILT
13737 case $enableval in
13738 yes) enable_fast_install=yes ;;
13739 no) enable_fast_install=no ;;
13740 *)
13741 enable_fast_install=no
13742 # Look at the argument we got. We use all the common list separators.
13743 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13744 for pkg in $enableval; do
13745 IFS="$lt_save_ifs"
13746 if test "X$pkg" = "X$p"; then
13747 enable_fast_install=yes
13748 fi
13749 done
13750 IFS="$lt_save_ifs"
13751 ;;
13752 esac
13753else
13754 enable_fast_install=yes
5213506e
RW
13755fi
13756
da0f6381 13757
da0f6381 13758
da0f6381 13759
da0f6381 13760
da0f6381 13761
da0f6381
PB
13762
13763
da0f6381 13764
da0f6381 13765
da0f6381 13766
00020c16
ILT
13767# This can be used to rebuild libtool when needed
13768LIBTOOL_DEPS="$ltmain"
da0f6381 13769
00020c16
ILT
13770# Always use our own libtool.
13771LIBTOOL='$(SHELL) $(top_builddir)/libtool'
da0f6381 13772
da0f6381 13773
da0f6381
PB
13774
13775
13776
13777
13778
13779
da0f6381 13780
da0f6381 13781
da0f6381 13782
da0f6381 13783
da0f6381 13784
da0f6381 13785
da0f6381 13786
da0f6381 13787
da0f6381 13788
da0f6381 13789
da0f6381 13790
da0f6381 13791
da0f6381 13792
da0f6381 13793
da0f6381 13794
43e02a8a 13795
da0f6381 13796
da0f6381 13797
00020c16 13798test -z "$LN_S" && LN_S="ln -s"
da0f6381 13799
da0f6381 13800
da0f6381 13801
da0f6381 13802
da0f6381 13803
da0f6381 13804
da0f6381 13805
da0f6381 13806
da0f6381 13807
da0f6381 13808
da0f6381 13809
da0f6381 13810
da0f6381 13811
da0f6381 13812
00020c16
ILT
13813if test -n "${ZSH_VERSION+set}" ; then
13814 setopt NO_GLOB_SUBST
13815fi
da0f6381 13816
5213506e
RW
13817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
13818$as_echo_n "checking for objdir... " >&6; }
13819if test "${lt_cv_objdir+set}" = set; then :
13820 $as_echo_n "(cached) " >&6
00020c16
ILT
13821else
13822 rm -f .libs 2>/dev/null
13823mkdir .libs 2>/dev/null
13824if test -d .libs; then
13825 lt_cv_objdir=.libs
13826else
13827 # MS-DOS does not allow filenames that begin with a dot.
13828 lt_cv_objdir=_libs
13829fi
13830rmdir .libs 2>/dev/null
13831fi
5213506e
RW
13832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
13833$as_echo "$lt_cv_objdir" >&6; }
00020c16 13834objdir=$lt_cv_objdir
da0f6381
PB
13835
13836
13837
13838
da0f6381 13839
00020c16
ILT
13840cat >>confdefs.h <<_ACEOF
13841#define LT_OBJDIR "$lt_cv_objdir/"
13842_ACEOF
da0f6381 13843
da0f6381 13844
da0f6381
PB
13845
13846
00020c16
ILT
13847case $host_os in
13848aix3*)
13849 # AIX sometimes has problems with the GCC collect2 program. For some
13850 # reason, if we set the COLLECT_NAMES environment variable, the problems
13851 # vanish in a puff of smoke.
13852 if test "X${COLLECT_NAMES+set}" != Xset; then
13853 COLLECT_NAMES=
13854 export COLLECT_NAMES
13855 fi
13856 ;;
13857esac
da0f6381 13858
00020c16
ILT
13859# Global variables:
13860ofile=libtool
13861can_build_shared=yes
da0f6381 13862
00020c16
ILT
13863# All known linkers require a `.a' archive for static linking (except MSVC,
13864# which needs '.lib').
13865libext=a
da0f6381 13866
00020c16 13867with_gnu_ld="$lt_cv_prog_gnu_ld"
da0f6381 13868
00020c16
ILT
13869old_CC="$CC"
13870old_CFLAGS="$CFLAGS"
da0f6381 13871
00020c16
ILT
13872# Set sane defaults for various variables
13873test -z "$CC" && CC=cc
13874test -z "$LTCC" && LTCC=$CC
13875test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13876test -z "$LD" && LD=ld
13877test -z "$ac_objext" && ac_objext=o
da0f6381 13878
00020c16
ILT
13879for cc_temp in $compiler""; do
13880 case $cc_temp in
13881 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13882 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13883 \-*) ;;
13884 *) break;;
13885 esac
13886done
43e02a8a 13887cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
da0f6381
PB
13888
13889
00020c16
ILT
13890# Only perform the check for file, if the check method requires it
13891test -z "$MAGIC_CMD" && MAGIC_CMD=file
13892case $deplibs_check_method in
13893file_magic*)
13894 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5213506e
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
13896$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
13897if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13898 $as_echo_n "(cached) " >&6
da0f6381 13899else
00020c16
ILT
13900 case $MAGIC_CMD in
13901[\\/*] | ?:[\\/]*)
13902 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13903 ;;
13904*)
13905 lt_save_MAGIC_CMD="$MAGIC_CMD"
13906 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13907 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13908 for ac_dir in $ac_dummy; do
13909 IFS="$lt_save_ifs"
13910 test -z "$ac_dir" && ac_dir=.
13911 if test -f $ac_dir/${ac_tool_prefix}file; then
13912 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
13913 if test -n "$file_magic_test_file"; then
13914 case $deplibs_check_method in
13915 "file_magic "*)
13916 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13917 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13918 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13919 $EGREP "$file_magic_regex" > /dev/null; then
13920 :
13921 else
13922 cat <<_LT_EOF 1>&2
da0f6381 13923
00020c16
ILT
13924*** Warning: the command libtool uses to detect shared libraries,
13925*** $file_magic_cmd, produces output that libtool cannot recognize.
13926*** The result is that libtool may fail to recognize shared libraries
13927*** as such. This will affect the creation of libtool libraries that
13928*** depend on shared libraries, but programs linked with such libtool
13929*** libraries will work regardless of this problem. Nevertheless, you
13930*** may want to report the problem to your system manager and/or to
13931*** bug-libtool@gnu.org
da0f6381 13932
00020c16
ILT
13933_LT_EOF
13934 fi ;;
13935 esac
13936 fi
13937 break
13938 fi
13939 done
13940 IFS="$lt_save_ifs"
13941 MAGIC_CMD="$lt_save_MAGIC_CMD"
13942 ;;
13943esac
13944fi
da0f6381 13945
00020c16
ILT
13946MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13947if test -n "$MAGIC_CMD"; then
5213506e
RW
13948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13949$as_echo "$MAGIC_CMD" >&6; }
00020c16 13950else
5213506e
RW
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13952$as_echo "no" >&6; }
00020c16 13953fi
da0f6381
PB
13954
13955
13956
da0f6381 13957
da0f6381 13958
00020c16
ILT
13959if test -z "$lt_cv_path_MAGIC_CMD"; then
13960 if test -n "$ac_tool_prefix"; then
5213506e
RW
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
13962$as_echo_n "checking for file... " >&6; }
13963if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13964 $as_echo_n "(cached) " >&6
00020c16
ILT
13965else
13966 case $MAGIC_CMD in
13967[\\/*] | ?:[\\/]*)
13968 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13969 ;;
13970*)
13971 lt_save_MAGIC_CMD="$MAGIC_CMD"
13972 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13973 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13974 for ac_dir in $ac_dummy; do
13975 IFS="$lt_save_ifs"
13976 test -z "$ac_dir" && ac_dir=.
13977 if test -f $ac_dir/file; then
13978 lt_cv_path_MAGIC_CMD="$ac_dir/file"
13979 if test -n "$file_magic_test_file"; then
13980 case $deplibs_check_method in
13981 "file_magic "*)
13982 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13983 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13984 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13985 $EGREP "$file_magic_regex" > /dev/null; then
13986 :
13987 else
13988 cat <<_LT_EOF 1>&2
da0f6381 13989
00020c16
ILT
13990*** Warning: the command libtool uses to detect shared libraries,
13991*** $file_magic_cmd, produces output that libtool cannot recognize.
13992*** The result is that libtool may fail to recognize shared libraries
13993*** as such. This will affect the creation of libtool libraries that
13994*** depend on shared libraries, but programs linked with such libtool
13995*** libraries will work regardless of this problem. Nevertheless, you
13996*** may want to report the problem to your system manager and/or to
13997*** bug-libtool@gnu.org
da0f6381 13998
00020c16
ILT
13999_LT_EOF
14000 fi ;;
14001 esac
14002 fi
14003 break
da0f6381 14004 fi
00020c16
ILT
14005 done
14006 IFS="$lt_save_ifs"
14007 MAGIC_CMD="$lt_save_MAGIC_CMD"
14008 ;;
14009esac
14010fi
da0f6381 14011
00020c16
ILT
14012MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14013if test -n "$MAGIC_CMD"; then
5213506e
RW
14014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
14015$as_echo "$MAGIC_CMD" >&6; }
00020c16 14016else
5213506e
RW
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14018$as_echo "no" >&6; }
00020c16 14019fi
da0f6381 14020
da0f6381 14021
00020c16
ILT
14022 else
14023 MAGIC_CMD=:
14024 fi
14025fi
da0f6381 14026
00020c16
ILT
14027 fi
14028 ;;
14029esac
da0f6381 14030
00020c16 14031# Use C for the default configuration in the libtool script
da0f6381 14032
00020c16
ILT
14033lt_save_CC="$CC"
14034ac_ext=c
14035ac_cpp='$CPP $CPPFLAGS'
14036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14038ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 14039
da0f6381 14040
00020c16
ILT
14041# Source file extension for C test sources.
14042ac_ext=c
da0f6381 14043
00020c16
ILT
14044# Object file extension for compiled C test sources.
14045objext=o
14046objext=$objext
da0f6381 14047
00020c16
ILT
14048# Code to be used in simple compile tests
14049lt_simple_compile_test_code="int some_variable = 0;"
5d47bb02 14050
00020c16
ILT
14051# Code to be used in simple link tests
14052lt_simple_link_test_code='int main(){return(0);}'
da0f6381 14053
da0f6381 14054
da0f6381 14055
da0f6381 14056
00020c16
ILT
14057
14058
14059
14060# If no C compiler was specified, use CC.
14061LTCC=${LTCC-"$CC"}
14062
14063# If no C compiler flags were specified, use CFLAGS.
14064LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14065
14066# Allow CC to be a program name with arguments.
14067compiler=$CC
14068
14069# Save the default compiler, since it gets overwritten when the other
14070# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
14071compiler_DEFAULT=$CC
14072
14073# save warnings/boilerplate of simple test code
14074ac_outfile=conftest.$ac_objext
14075echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14076eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14077_lt_compiler_boilerplate=`cat conftest.err`
14078$RM conftest*
14079
14080ac_outfile=conftest.$ac_objext
14081echo "$lt_simple_link_test_code" >conftest.$ac_ext
14082eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14083_lt_linker_boilerplate=`cat conftest.err`
14084$RM -r conftest*
14085
14086
14087## CAVEAT EMPTOR:
14088## There is no encapsulation within the following macros, do not change
14089## the running order or otherwise move them around unless you know exactly
14090## what you are doing...
14091if test -n "$compiler"; then
14092
14093lt_prog_compiler_no_builtin_flag=
14094
14095if test "$GCC" = yes; then
43e02a8a
RW
14096 case $cc_basename in
14097 nvcc*)
14098 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
14099 *)
14100 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
14101 esac
00020c16 14102
5213506e
RW
14103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
14104$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
14105if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
14106 $as_echo_n "(cached) " >&6
00020c16
ILT
14107else
14108 lt_cv_prog_compiler_rtti_exceptions=no
14109 ac_outfile=conftest.$ac_objext
14110 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14111 lt_compiler_flag="-fno-rtti -fno-exceptions"
14112 # Insert the option either (1) after the last *FLAGS variable, or
14113 # (2) before a word containing "conftest.", or (3) at the end.
14114 # Note that $ac_compile itself does not contain backslashes and begins
14115 # with a dollar sign (not a hyphen), so the echo should work correctly.
14116 # The option is referenced via a variable to avoid confusing sed.
14117 lt_compile=`echo "$ac_compile" | $SED \
14118 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14119 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14120 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14121 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14122 (eval "$lt_compile" 2>conftest.err)
14123 ac_status=$?
14124 cat conftest.err >&5
43e02a8a 14125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14126 if (exit $ac_status) && test -s "$ac_outfile"; then
14127 # The compiler can only warn and ignore the option if not recognized
14128 # So say no if there are warnings other than the usual output.
43e02a8a 14129 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14130 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14131 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14132 lt_cv_prog_compiler_rtti_exceptions=yes
14133 fi
14134 fi
14135 $RM conftest*
14136
14137fi
5213506e
RW
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
14139$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
00020c16
ILT
14140
14141if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
14142 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
14143else
14144 :
14145fi
14146
14147fi
14148
14149
14150
14151
14152
14153
14154 lt_prog_compiler_wl=
14155lt_prog_compiler_pic=
14156lt_prog_compiler_static=
14157
5213506e
RW
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14159$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
14160
14161 if test "$GCC" = yes; then
14162 lt_prog_compiler_wl='-Wl,'
14163 lt_prog_compiler_static='-static'
14164
14165 case $host_os in
14166 aix*)
14167 # All AIX code is PIC.
14168 if test "$host_cpu" = ia64; then
14169 # AIX 5 now supports IA64 processor
14170 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14171 fi
14172 ;;
14173
00020c16
ILT
14174 amigaos*)
14175 case $host_cpu in
14176 powerpc)
14177 # see comment about AmigaOS4 .so support
14178 lt_prog_compiler_pic='-fPIC'
14179 ;;
14180 m68k)
14181 # FIXME: we need at least 68020 code to build shared libraries, but
14182 # adding the `-m68020' flag to GCC prevents building anything better,
14183 # like `-m68040'.
14184 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
14185 ;;
14186 esac
14187 ;;
da0f6381 14188
00020c16
ILT
14189 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14190 # PIC is the default for these OSes.
14191 ;;
da0f6381 14192
00020c16
ILT
14193 mingw* | cygwin* | pw32* | os2* | cegcc*)
14194 # This hack is so that the source file can tell whether it is being
14195 # built for inclusion in a dll (and should export symbols for example).
14196 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14197 # (--disable-auto-import) libraries
14198 lt_prog_compiler_pic='-DDLL_EXPORT'
14199 ;;
14200
14201 darwin* | rhapsody*)
14202 # PIC is the default on this platform
14203 # Common symbols not allowed in MH_DYLIB files
14204 lt_prog_compiler_pic='-fno-common'
14205 ;;
14206
43e02a8a
RW
14207 haiku*)
14208 # PIC is the default for Haiku.
14209 # The "-static" flag exists, but is broken.
14210 lt_prog_compiler_static=
14211 ;;
14212
00020c16
ILT
14213 hpux*)
14214 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14215 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14216 # sets the default TLS model and affects inlining.
14217 case $host_cpu in
14218 hppa*64*)
14219 # +Z the default
da0f6381 14220 ;;
00020c16
ILT
14221 *)
14222 lt_prog_compiler_pic='-fPIC'
da0f6381
PB
14223 ;;
14224 esac
14225 ;;
14226
00020c16
ILT
14227 interix[3-9]*)
14228 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14229 # Instead, we relocate shared libraries at runtime.
da0f6381
PB
14230 ;;
14231
00020c16
ILT
14232 msdosdjgpp*)
14233 # Just because we use GCC doesn't mean we suddenly get shared libraries
14234 # on systems that don't support them.
14235 lt_prog_compiler_can_build_shared=no
14236 enable_shared=no
da0f6381 14237 ;;
da0f6381 14238
00020c16
ILT
14239 *nto* | *qnx*)
14240 # QNX uses GNU C++, but need to define -shared option too, otherwise
14241 # it will coredump.
14242 lt_prog_compiler_pic='-fPIC -shared'
14243 ;;
14244
14245 sysv4*MP*)
14246 if test -d /usr/nec; then
14247 lt_prog_compiler_pic=-Kconform_pic
da0f6381
PB
14248 fi
14249 ;;
14250
43e02a8a
RW
14251 *)
14252 lt_prog_compiler_pic='-fPIC'
14253 ;;
14254 esac
14255
14256 case $cc_basename in
14257 nvcc*) # Cuda Compiler Driver 2.2
14258 lt_prog_compiler_wl='-Xlinker '
14259 lt_prog_compiler_pic='-Xcompiler -fPIC'
00020c16
ILT
14260 ;;
14261 esac
14262 else
14263 # PORTME Check for flag to pass linker flags through the system compiler.
14264 case $host_os in
14265 aix*)
14266 lt_prog_compiler_wl='-Wl,'
da0f6381 14267 if test "$host_cpu" = ia64; then
00020c16
ILT
14268 # AIX 5 now supports IA64 processor
14269 lt_prog_compiler_static='-Bstatic'
da0f6381 14270 else
00020c16 14271 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
da0f6381 14272 fi
00020c16 14273 ;;
da0f6381 14274
00020c16
ILT
14275 mingw* | cygwin* | pw32* | os2* | cegcc*)
14276 # This hack is so that the source file can tell whether it is being
14277 # built for inclusion in a dll (and should export symbols for example).
14278 lt_prog_compiler_pic='-DDLL_EXPORT'
14279 ;;
da0f6381 14280
00020c16
ILT
14281 hpux9* | hpux10* | hpux11*)
14282 lt_prog_compiler_wl='-Wl,'
14283 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14284 # not for PA HP-UX.
14285 case $host_cpu in
14286 hppa*64*|ia64*)
14287 # +Z the default
14288 ;;
14289 *)
14290 lt_prog_compiler_pic='+Z'
14291 ;;
14292 esac
14293 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14294 lt_prog_compiler_static='${wl}-a ${wl}archive'
14295 ;;
da0f6381 14296
00020c16
ILT
14297 irix5* | irix6* | nonstopux*)
14298 lt_prog_compiler_wl='-Wl,'
14299 # PIC (with -KPIC) is the default.
14300 lt_prog_compiler_static='-non_shared'
14301 ;;
14302
14303 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14304 case $cc_basename in
14305 # old Intel for x86_64 which still supported -KPIC.
14306 ecc*)
14307 lt_prog_compiler_wl='-Wl,'
14308 lt_prog_compiler_pic='-KPIC'
14309 lt_prog_compiler_static='-static'
14310 ;;
14311 # icc used to be incompatible with GCC.
14312 # ICC 10 doesn't accept -KPIC any more.
14313 icc* | ifort*)
14314 lt_prog_compiler_wl='-Wl,'
14315 lt_prog_compiler_pic='-fPIC'
14316 lt_prog_compiler_static='-static'
14317 ;;
14318 # Lahey Fortran 8.1.
14319 lf95*)
14320 lt_prog_compiler_wl='-Wl,'
14321 lt_prog_compiler_pic='--shared'
14322 lt_prog_compiler_static='--static'
14323 ;;
43e02a8a 14324 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
00020c16
ILT
14325 # Portland Group compilers (*not* the Pentium gcc compiler,
14326 # which looks to be a dead project)
14327 lt_prog_compiler_wl='-Wl,'
14328 lt_prog_compiler_pic='-fpic'
14329 lt_prog_compiler_static='-Bstatic'
14330 ;;
14331 ccc*)
14332 lt_prog_compiler_wl='-Wl,'
14333 # All Alpha code is PIC.
14334 lt_prog_compiler_static='-non_shared'
14335 ;;
43e02a8a
RW
14336 xl* | bgxl* | bgf* | mpixl*)
14337 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
00020c16
ILT
14338 lt_prog_compiler_wl='-Wl,'
14339 lt_prog_compiler_pic='-qpic'
14340 lt_prog_compiler_static='-qstaticlink'
14341 ;;
14342 *)
14343 case `$CC -V 2>&1 | sed 5q` in
43e02a8a
RW
14344 *Sun\ F* | *Sun*Fortran*)
14345 # Sun Fortran 8.3 passes all unrecognized flags to the linker
00020c16
ILT
14346 lt_prog_compiler_pic='-KPIC'
14347 lt_prog_compiler_static='-Bstatic'
43e02a8a 14348 lt_prog_compiler_wl=''
00020c16 14349 ;;
43e02a8a
RW
14350 *Sun\ C*)
14351 # Sun C 5.9
00020c16
ILT
14352 lt_prog_compiler_pic='-KPIC'
14353 lt_prog_compiler_static='-Bstatic'
43e02a8a 14354 lt_prog_compiler_wl='-Wl,'
da0f6381
PB
14355 ;;
14356 esac
00020c16
ILT
14357 ;;
14358 esac
14359 ;;
da0f6381 14360
00020c16
ILT
14361 newsos6)
14362 lt_prog_compiler_pic='-KPIC'
14363 lt_prog_compiler_static='-Bstatic'
14364 ;;
da0f6381 14365
00020c16
ILT
14366 *nto* | *qnx*)
14367 # QNX uses GNU C++, but need to define -shared option too, otherwise
14368 # it will coredump.
14369 lt_prog_compiler_pic='-fPIC -shared'
14370 ;;
da0f6381 14371
00020c16
ILT
14372 osf3* | osf4* | osf5*)
14373 lt_prog_compiler_wl='-Wl,'
14374 # All OSF/1 code is PIC.
14375 lt_prog_compiler_static='-non_shared'
14376 ;;
da0f6381 14377
00020c16
ILT
14378 rdos*)
14379 lt_prog_compiler_static='-non_shared'
da0f6381
PB
14380 ;;
14381
00020c16
ILT
14382 solaris*)
14383 lt_prog_compiler_pic='-KPIC'
14384 lt_prog_compiler_static='-Bstatic'
14385 case $cc_basename in
14386 f77* | f90* | f95*)
14387 lt_prog_compiler_wl='-Qoption ld ';;
14388 *)
14389 lt_prog_compiler_wl='-Wl,';;
5d47bb02 14390 esac
da0f6381
PB
14391 ;;
14392
00020c16
ILT
14393 sunos4*)
14394 lt_prog_compiler_wl='-Qoption ld '
14395 lt_prog_compiler_pic='-PIC'
14396 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14397 ;;
14398
00020c16
ILT
14399 sysv4 | sysv4.2uw2* | sysv4.3*)
14400 lt_prog_compiler_wl='-Wl,'
14401 lt_prog_compiler_pic='-KPIC'
14402 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14403 ;;
14404
00020c16
ILT
14405 sysv4*MP*)
14406 if test -d /usr/nec ;then
14407 lt_prog_compiler_pic='-Kconform_pic'
14408 lt_prog_compiler_static='-Bstatic'
14409 fi
da0f6381
PB
14410 ;;
14411
00020c16
ILT
14412 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14413 lt_prog_compiler_wl='-Wl,'
14414 lt_prog_compiler_pic='-KPIC'
14415 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14416 ;;
14417
00020c16
ILT
14418 unicos*)
14419 lt_prog_compiler_wl='-Wl,'
14420 lt_prog_compiler_can_build_shared=no
da0f6381
PB
14421 ;;
14422
00020c16
ILT
14423 uts4*)
14424 lt_prog_compiler_pic='-pic'
14425 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14426 ;;
14427
00020c16
ILT
14428 *)
14429 lt_prog_compiler_can_build_shared=no
da0f6381 14430 ;;
00020c16
ILT
14431 esac
14432 fi
da0f6381 14433
00020c16
ILT
14434case $host_os in
14435 # For platforms which do not support PIC, -DPIC is meaningless:
14436 *djgpp*)
14437 lt_prog_compiler_pic=
14438 ;;
14439 *)
14440 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
14441 ;;
14442esac
5213506e
RW
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
14444$as_echo "$lt_prog_compiler_pic" >&6; }
da0f6381 14445
da0f6381 14446
da0f6381 14447
da0f6381 14448
da0f6381 14449
da0f6381 14450
00020c16
ILT
14451#
14452# Check to make sure the PIC flag actually works.
14453#
14454if test -n "$lt_prog_compiler_pic"; then
5213506e
RW
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
14456$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
14457if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
14458 $as_echo_n "(cached) " >&6
00020c16
ILT
14459else
14460 lt_cv_prog_compiler_pic_works=no
14461 ac_outfile=conftest.$ac_objext
14462 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14463 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
14464 # Insert the option either (1) after the last *FLAGS variable, or
14465 # (2) before a word containing "conftest.", or (3) at the end.
14466 # Note that $ac_compile itself does not contain backslashes and begins
14467 # with a dollar sign (not a hyphen), so the echo should work correctly.
14468 # The option is referenced via a variable to avoid confusing sed.
14469 lt_compile=`echo "$ac_compile" | $SED \
14470 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14471 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14472 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14473 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14474 (eval "$lt_compile" 2>conftest.err)
14475 ac_status=$?
14476 cat conftest.err >&5
43e02a8a 14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14478 if (exit $ac_status) && test -s "$ac_outfile"; then
14479 # The compiler can only warn and ignore the option if not recognized
14480 # So say no if there are warnings other than the usual output.
43e02a8a 14481 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14482 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14483 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14484 lt_cv_prog_compiler_pic_works=yes
14485 fi
14486 fi
14487 $RM conftest*
da0f6381 14488
00020c16 14489fi
5213506e
RW
14490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
14491$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
da0f6381 14492
00020c16
ILT
14493if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
14494 case $lt_prog_compiler_pic in
14495 "" | " "*) ;;
14496 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
14497 esac
da0f6381 14498else
00020c16
ILT
14499 lt_prog_compiler_pic=
14500 lt_prog_compiler_can_build_shared=no
da0f6381 14501fi
da0f6381 14502
00020c16 14503fi
da0f6381 14504
da0f6381 14505
da0f6381 14506
da0f6381 14507
da0f6381 14508
da0f6381 14509
00020c16
ILT
14510#
14511# Check to make sure the static flag actually works.
14512#
14513wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
5213506e
RW
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14515$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14516if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
14517 $as_echo_n "(cached) " >&6
00020c16
ILT
14518else
14519 lt_cv_prog_compiler_static_works=no
14520 save_LDFLAGS="$LDFLAGS"
14521 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14522 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14523 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14524 # The linker can only warn and ignore the option if not recognized
14525 # So say no if there are warnings
14526 if test -s conftest.err; then
14527 # Append any errors to the config.log.
14528 cat conftest.err 1>&5
43e02a8a 14529 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
14530 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14531 if diff conftest.exp conftest.er2 >/dev/null; then
14532 lt_cv_prog_compiler_static_works=yes
14533 fi
14534 else
14535 lt_cv_prog_compiler_static_works=yes
14536 fi
14537 fi
14538 $RM -r conftest*
14539 LDFLAGS="$save_LDFLAGS"
da0f6381 14540
00020c16 14541fi
5213506e
RW
14542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
14543$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
da0f6381 14544
00020c16
ILT
14545if test x"$lt_cv_prog_compiler_static_works" = xyes; then
14546 :
14547else
14548 lt_prog_compiler_static=
14549fi
da0f6381 14550
da0f6381 14551
da0f6381 14552
da0f6381 14553
da0f6381 14554
da0f6381 14555
da0f6381 14556
5213506e
RW
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14558$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14559if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14560 $as_echo_n "(cached) " >&6
00020c16
ILT
14561else
14562 lt_cv_prog_compiler_c_o=no
14563 $RM -r conftest 2>/dev/null
14564 mkdir conftest
14565 cd conftest
14566 mkdir out
14567 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14568
00020c16
ILT
14569 lt_compiler_flag="-o out/conftest2.$ac_objext"
14570 # Insert the option either (1) after the last *FLAGS variable, or
14571 # (2) before a word containing "conftest.", or (3) at the end.
14572 # Note that $ac_compile itself does not contain backslashes and begins
14573 # with a dollar sign (not a hyphen), so the echo should work correctly.
14574 lt_compile=`echo "$ac_compile" | $SED \
14575 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14576 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14577 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14578 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14579 (eval "$lt_compile" 2>out/conftest.err)
14580 ac_status=$?
14581 cat out/conftest.err >&5
43e02a8a 14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14583 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14584 then
14585 # The compiler can only warn and ignore the option if not recognized
14586 # So say no if there are warnings
43e02a8a 14587 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14588 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14589 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14590 lt_cv_prog_compiler_c_o=yes
14591 fi
14592 fi
14593 chmod u+w . 2>&5
14594 $RM conftest*
14595 # SGI C++ compiler will create directory out/ii_files/ for
14596 # template instantiation
14597 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14598 $RM out/* && rmdir out
14599 cd ..
14600 $RM -r conftest
14601 $RM conftest*
da0f6381 14602
00020c16 14603fi
5213506e
RW
14604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14605$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14606
14607
14608
14609
14610
14611
5213506e
RW
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14613$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14614if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14615 $as_echo_n "(cached) " >&6
00020c16
ILT
14616else
14617 lt_cv_prog_compiler_c_o=no
14618 $RM -r conftest 2>/dev/null
14619 mkdir conftest
14620 cd conftest
14621 mkdir out
14622 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14623
00020c16
ILT
14624 lt_compiler_flag="-o out/conftest2.$ac_objext"
14625 # Insert the option either (1) after the last *FLAGS variable, or
14626 # (2) before a word containing "conftest.", or (3) at the end.
14627 # Note that $ac_compile itself does not contain backslashes and begins
14628 # with a dollar sign (not a hyphen), so the echo should work correctly.
14629 lt_compile=`echo "$ac_compile" | $SED \
14630 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14631 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14632 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14633 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14634 (eval "$lt_compile" 2>out/conftest.err)
14635 ac_status=$?
14636 cat out/conftest.err >&5
43e02a8a 14637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14638 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14639 then
14640 # The compiler can only warn and ignore the option if not recognized
14641 # So say no if there are warnings
43e02a8a 14642 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14643 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14644 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14645 lt_cv_prog_compiler_c_o=yes
14646 fi
14647 fi
14648 chmod u+w . 2>&5
14649 $RM conftest*
14650 # SGI C++ compiler will create directory out/ii_files/ for
14651 # template instantiation
14652 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14653 $RM out/* && rmdir out
14654 cd ..
14655 $RM -r conftest
14656 $RM conftest*
da0f6381 14657
00020c16 14658fi
5213506e
RW
14659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14660$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14661
14662
14663
14664
00020c16
ILT
14665hard_links="nottested"
14666if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
14667 # do not overwrite the value of need_locks provided by the user
5213506e
RW
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14669$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16 14670 hard_links=yes
baafc534 14671 $RM conftest*
00020c16
ILT
14672 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14673 touch conftest.a
14674 ln conftest.a conftest.b 2>&5 || hard_links=no
14675 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14677$as_echo "$hard_links" >&6; }
00020c16 14678 if test "$hard_links" = no; then
5213506e
RW
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14680$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16 14681 need_locks=warn
da0f6381 14682 fi
00020c16
ILT
14683else
14684 need_locks=no
14685fi
da0f6381
PB
14686
14687
14688
14689
14690
14691
5213506e
RW
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14693$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
da0f6381 14694
00020c16
ILT
14695 runpath_var=
14696 allow_undefined_flag=
14697 always_export_symbols=no
14698 archive_cmds=
14699 archive_expsym_cmds=
14700 compiler_needs_object=no
14701 enable_shared_with_static_runtimes=no
14702 export_dynamic_flag_spec=
14703 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14704 hardcode_automatic=no
14705 hardcode_direct=no
14706 hardcode_direct_absolute=no
14707 hardcode_libdir_flag_spec=
14708 hardcode_libdir_flag_spec_ld=
14709 hardcode_libdir_separator=
14710 hardcode_minus_L=no
14711 hardcode_shlibpath_var=unsupported
14712 inherit_rpath=no
14713 link_all_deplibs=unknown
14714 module_cmds=
14715 module_expsym_cmds=
14716 old_archive_from_new_cmds=
14717 old_archive_from_expsyms_cmds=
14718 thread_safe_flag_spec=
14719 whole_archive_flag_spec=
14720 # include_expsyms should be a list of space-separated symbols to be *always*
14721 # included in the symbol list
14722 include_expsyms=
14723 # exclude_expsyms can be an extended regexp of symbols to exclude
14724 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14725 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14726 # as well as any symbol that contains `d'.
14727 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14728 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14729 # platforms (ab)use it in PIC code, but their linkers get confused if
14730 # the symbol is explicitly referenced. Since portable code cannot
14731 # rely on this symbol name, it's probably fine to never include it in
14732 # preloaded symbol tables.
14733 # Exclude shared library initialization/finalization symbols.
14734 extract_expsyms_cmds=
da0f6381 14735
00020c16
ILT
14736 case $host_os in
14737 cygwin* | mingw* | pw32* | cegcc*)
14738 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14739 # When not using gcc, we currently assume that we are using
14740 # Microsoft Visual C++.
14741 if test "$GCC" != yes; then
14742 with_gnu_ld=no
14743 fi
14744 ;;
14745 interix*)
14746 # we just hope/assume this is gcc and not c89 (= MSVC++)
14747 with_gnu_ld=yes
14748 ;;
14749 openbsd*)
14750 with_gnu_ld=no
14751 ;;
14752 esac
da0f6381 14753
00020c16 14754 ld_shlibs=yes
43e02a8a
RW
14755
14756 # On some targets, GNU ld is compatible enough with the native linker
14757 # that we're better off using the native interface for both.
14758 lt_use_gnu_ld_interface=no
00020c16 14759 if test "$with_gnu_ld" = yes; then
43e02a8a
RW
14760 case $host_os in
14761 aix*)
14762 # The AIX port of GNU ld has always aspired to compatibility
14763 # with the native linker. However, as the warning in the GNU ld
14764 # block says, versions before 2.19.5* couldn't really create working
14765 # shared libraries, regardless of the interface used.
14766 case `$LD -v 2>&1` in
14767 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
14768 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
14769 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
14770 *)
14771 lt_use_gnu_ld_interface=yes
14772 ;;
14773 esac
14774 ;;
14775 *)
14776 lt_use_gnu_ld_interface=yes
14777 ;;
14778 esac
14779 fi
14780
14781 if test "$lt_use_gnu_ld_interface" = yes; then
00020c16
ILT
14782 # If archive_cmds runs LD, not CC, wlarc should be empty
14783 wlarc='${wl}'
da0f6381 14784
00020c16
ILT
14785 # Set some defaults for GNU ld with shared library support. These
14786 # are reset later if shared libraries are not supported. Putting them
14787 # here allows them to be overridden if necessary.
14788 runpath_var=LD_RUN_PATH
14789 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
14790 export_dynamic_flag_spec='${wl}--export-dynamic'
14791 # ancient GNU ld didn't support --whole-archive et. al.
14792 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
14793 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14794 else
14795 whole_archive_flag_spec=
14796 fi
14797 supports_anon_versioning=no
14798 case `$LD -v 2>&1` in
43e02a8a 14799 *GNU\ gold*) supports_anon_versioning=yes ;;
00020c16
ILT
14800 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14801 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14802 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14803 *\ 2.11.*) ;; # other 2.11 versions
14804 *) supports_anon_versioning=yes ;;
14805 esac
da0f6381 14806
00020c16
ILT
14807 # See if GNU ld supports shared libraries.
14808 case $host_os in
14809 aix[3-9]*)
14810 # On AIX/PPC, the GNU linker is very broken
14811 if test "$host_cpu" != ia64; then
14812 ld_shlibs=no
14813 cat <<_LT_EOF 1>&2
da0f6381 14814
43e02a8a 14815*** Warning: the GNU linker, at least up to release 2.19, is reported
00020c16
ILT
14816*** to be unable to reliably create shared libraries on AIX.
14817*** Therefore, libtool is disabling shared libraries support. If you
43e02a8a
RW
14818*** really care for shared libraries, you may want to install binutils
14819*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
14820*** You will then need to restart the configuration process.
da0f6381 14821
00020c16
ILT
14822_LT_EOF
14823 fi
14824 ;;
da0f6381 14825
00020c16
ILT
14826 amigaos*)
14827 case $host_cpu in
14828 powerpc)
14829 # see comment about AmigaOS4 .so support
14830 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14831 archive_expsym_cmds=''
14832 ;;
14833 m68k)
14834 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)'
14835 hardcode_libdir_flag_spec='-L$libdir'
14836 hardcode_minus_L=yes
14837 ;;
14838 esac
14839 ;;
da0f6381 14840
00020c16
ILT
14841 beos*)
14842 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14843 allow_undefined_flag=unsupported
14844 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14845 # support --undefined. This deserves some investigation. FIXME
14846 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14847 else
14848 ld_shlibs=no
14849 fi
14850 ;;
da0f6381 14851
00020c16
ILT
14852 cygwin* | mingw* | pw32* | cegcc*)
14853 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
14854 # as there is no search path for DLLs.
14855 hardcode_libdir_flag_spec='-L$libdir'
43e02a8a 14856 export_dynamic_flag_spec='${wl}--export-all-symbols'
00020c16
ILT
14857 allow_undefined_flag=unsupported
14858 always_export_symbols=no
14859 enable_shared_with_static_runtimes=yes
14860 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
da0f6381 14861
00020c16
ILT
14862 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14863 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14864 # If the export-symbols file already is a .def file (1st line
14865 # is EXPORTS), use it as is; otherwise, prepend...
14866 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14867 cp $export_symbols $output_objdir/$soname.def;
14868 else
14869 echo EXPORTS > $output_objdir/$soname.def;
14870 cat $export_symbols >> $output_objdir/$soname.def;
14871 fi~
14872 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14873 else
14874 ld_shlibs=no
14875 fi
14876 ;;
da0f6381 14877
43e02a8a
RW
14878 haiku*)
14879 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14880 link_all_deplibs=yes
14881 ;;
14882
00020c16
ILT
14883 interix[3-9]*)
14884 hardcode_direct=no
14885 hardcode_shlibpath_var=no
14886 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
14887 export_dynamic_flag_spec='${wl}-E'
14888 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14889 # Instead, shared libraries are loaded at an image base (0x10000000 by
14890 # default) and relocated if they conflict, which is a slow very memory
14891 # consuming and fragmenting process. To avoid this, we pick a random,
14892 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14893 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14894 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14895 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'
14896 ;;
da0f6381 14897
00020c16
ILT
14898 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
14899 tmp_diet=no
14900 if test "$host_os" = linux-dietlibc; then
14901 case $cc_basename in
14902 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
14903 esac
14904 fi
14905 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
14906 && test "$tmp_diet" = no
14907 then
14908 tmp_addflag=
14909 tmp_sharedflag='-shared'
14910 case $cc_basename,$host_cpu in
14911 pgcc*) # Portland Group C compiler
43e02a8a 14912 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
14913 tmp_addflag=' $pic_flag'
14914 ;;
43e02a8a
RW
14915 pgf77* | pgf90* | pgf95* | pgfortran*)
14916 # Portland Group f77 and f90 compilers
14917 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
14918 tmp_addflag=' $pic_flag -Mnomain' ;;
14919 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14920 tmp_addflag=' -i_dynamic' ;;
14921 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14922 tmp_addflag=' -i_dynamic -nofor_main' ;;
14923 ifc* | ifort*) # Intel Fortran compiler
14924 tmp_addflag=' -nofor_main' ;;
14925 lf95*) # Lahey Fortran 8.1
14926 whole_archive_flag_spec=
14927 tmp_sharedflag='--shared' ;;
43e02a8a 14928 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
00020c16
ILT
14929 tmp_sharedflag='-qmkshrobj'
14930 tmp_addflag= ;;
43e02a8a
RW
14931 nvcc*) # Cuda Compiler Driver 2.2
14932 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'
14933 compiler_needs_object=yes
14934 ;;
00020c16
ILT
14935 esac
14936 case `$CC -V 2>&1 | sed 5q` in
14937 *Sun\ C*) # Sun C 5.9
43e02a8a 14938 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
14939 compiler_needs_object=yes
14940 tmp_sharedflag='-G' ;;
14941 *Sun\ F*) # Sun Fortran 8.3
14942 tmp_sharedflag='-G' ;;
14943 esac
14944 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
da0f6381 14945
00020c16
ILT
14946 if test "x$supports_anon_versioning" = xyes; then
14947 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14948 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14949 echo "local: *; };" >> $output_objdir/$libname.ver~
14950 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14951 fi
da0f6381 14952
00020c16 14953 case $cc_basename in
43e02a8a 14954 xlf* | bgf* | bgxlf* | mpixlf*)
00020c16
ILT
14955 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
14956 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
14957 hardcode_libdir_flag_spec=
14958 hardcode_libdir_flag_spec_ld='-rpath $libdir'
14959 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
14960 if test "x$supports_anon_versioning" = xyes; then
14961 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14962 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14963 echo "local: *; };" >> $output_objdir/$libname.ver~
14964 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
14965 fi
14966 ;;
14967 esac
14968 else
14969 ld_shlibs=no
14970 fi
14971 ;;
da0f6381 14972
00020c16
ILT
14973 netbsd*)
14974 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14975 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14976 wlarc=
14977 else
14978 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14979 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14980 fi
14981 ;;
da0f6381 14982
00020c16
ILT
14983 solaris*)
14984 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
14985 ld_shlibs=no
14986 cat <<_LT_EOF 1>&2
da0f6381 14987
00020c16
ILT
14988*** Warning: The releases 2.8.* of the GNU linker cannot reliably
14989*** create shared libraries on Solaris systems. Therefore, libtool
14990*** is disabling shared libraries support. We urge you to upgrade GNU
14991*** binutils to release 2.9.1 or newer. Another option is to modify
14992*** your PATH or compiler configuration so that the native linker is
14993*** used, and then restart.
da0f6381 14994
00020c16
ILT
14995_LT_EOF
14996 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14997 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14998 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14999 else
15000 ld_shlibs=no
15001 fi
15002 ;;
da0f6381 15003
00020c16
ILT
15004 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
15005 case `$LD -v 2>&1` in
15006 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
15007 ld_shlibs=no
15008 cat <<_LT_EOF 1>&2
da0f6381 15009
00020c16
ILT
15010*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
15011*** reliably create shared libraries on SCO systems. Therefore, libtool
15012*** is disabling shared libraries support. We urge you to upgrade GNU
15013*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
15014*** your PATH or compiler configuration so that the native linker is
15015*** used, and then restart.
da0f6381 15016
00020c16
ILT
15017_LT_EOF
15018 ;;
15019 *)
15020 # For security reasons, it is highly recommended that you always
15021 # use absolute paths for naming shared libraries, and exclude the
15022 # DT_RUNPATH tag from executables and libraries. But doing so
15023 # requires that you compile everything twice, which is a pain.
15024 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15025 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15026 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15027 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15028 else
15029 ld_shlibs=no
15030 fi
15031 ;;
15032 esac
15033 ;;
da0f6381 15034
00020c16
ILT
15035 sunos4*)
15036 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15037 wlarc=
15038 hardcode_direct=yes
15039 hardcode_shlibpath_var=no
15040 ;;
da0f6381 15041
00020c16
ILT
15042 *)
15043 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15044 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15045 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15046 else
15047 ld_shlibs=no
15048 fi
15049 ;;
15050 esac
da0f6381 15051
00020c16
ILT
15052 if test "$ld_shlibs" = no; then
15053 runpath_var=
15054 hardcode_libdir_flag_spec=
15055 export_dynamic_flag_spec=
15056 whole_archive_flag_spec=
15057 fi
15058 else
15059 # PORTME fill in a description of your system's linker (not GNU ld)
15060 case $host_os in
15061 aix3*)
15062 allow_undefined_flag=unsupported
15063 always_export_symbols=yes
15064 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'
15065 # Note: this linker hardcodes the directories in LIBPATH if there
15066 # are no directories specified by -L.
15067 hardcode_minus_L=yes
15068 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
15069 # Neither direct hardcoding nor static linking is supported with a
15070 # broken collect2.
15071 hardcode_direct=unsupported
15072 fi
15073 ;;
da0f6381 15074
00020c16
ILT
15075 aix[4-9]*)
15076 if test "$host_cpu" = ia64; then
15077 # On IA64, the linker does run time linking by default, so we don't
15078 # have to do anything special.
15079 aix_use_runtimelinking=no
15080 exp_sym_flag='-Bexport'
15081 no_entry_flag=""
15082 else
15083 # If we're using GNU nm, then we don't want the "-C" option.
15084 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
15085 # Also, AIX nm treats weak defined symbols like other global
15086 # defined symbols, whereas GNU nm marks them as "W".
00020c16 15087 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 15088 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
15089 else
15090 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'
15091 fi
15092 aix_use_runtimelinking=no
da0f6381 15093
00020c16
ILT
15094 # Test if we are trying to use run time linking or normal
15095 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
15096 # need to do runtime linking.
15097 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
15098 for ld_flag in $LDFLAGS; do
15099 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
15100 aix_use_runtimelinking=yes
15101 break
15102 fi
15103 done
15104 ;;
15105 esac
da0f6381 15106
00020c16
ILT
15107 exp_sym_flag='-bexport'
15108 no_entry_flag='-bnoentry'
15109 fi
da0f6381 15110
00020c16
ILT
15111 # When large executables or shared objects are built, AIX ld can
15112 # have problems creating the table of contents. If linking a library
15113 # or program results in "error TOC overflow" add -mminimal-toc to
15114 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
15115 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
da0f6381 15116
00020c16
ILT
15117 archive_cmds=''
15118 hardcode_direct=yes
15119 hardcode_direct_absolute=yes
15120 hardcode_libdir_separator=':'
15121 link_all_deplibs=yes
15122 file_list_spec='${wl}-f,'
da0f6381 15123
00020c16
ILT
15124 if test "$GCC" = yes; then
15125 case $host_os in aix4.[012]|aix4.[012].*)
15126 # We only want to do this on AIX 4.2 and lower, the check
15127 # below for broken collect2 doesn't work under 4.3+
15128 collect2name=`${CC} -print-prog-name=collect2`
15129 if test -f "$collect2name" &&
15130 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
15131 then
15132 # We have reworked collect2
15133 :
15134 else
15135 # We have old collect2
15136 hardcode_direct=unsupported
15137 # It fails to find uninstalled libraries when the uninstalled
15138 # path is not listed in the libpath. Setting hardcode_minus_L
15139 # to unsupported forces relinking
15140 hardcode_minus_L=yes
15141 hardcode_libdir_flag_spec='-L$libdir'
15142 hardcode_libdir_separator=
15143 fi
15144 ;;
15145 esac
15146 shared_flag='-shared'
15147 if test "$aix_use_runtimelinking" = yes; then
15148 shared_flag="$shared_flag "'${wl}-G'
15149 fi
15150 else
15151 # not using gcc
15152 if test "$host_cpu" = ia64; then
15153 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15154 # chokes on -Wl,-G. The following line is correct:
15155 shared_flag='-G'
15156 else
15157 if test "$aix_use_runtimelinking" = yes; then
15158 shared_flag='${wl}-G'
15159 else
15160 shared_flag='${wl}-bM:SRE'
15161 fi
15162 fi
15163 fi
da0f6381 15164
00020c16
ILT
15165 export_dynamic_flag_spec='${wl}-bexpall'
15166 # It seems that -bexpall does not export symbols beginning with
15167 # underscore (_), so it is better to generate a list of symbols to export.
15168 always_export_symbols=yes
15169 if test "$aix_use_runtimelinking" = yes; then
15170 # Warning - without using the other runtime loading flags (-brtl),
15171 # -berok will link without error, but may produce a broken library.
15172 allow_undefined_flag='-berok'
15173 # Determine the default libpath from the value encoded in an
15174 # empty executable.
5213506e 15175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15176/* end confdefs.h. */
da0f6381 15177
00020c16
ILT
15178int
15179main ()
15180{
da0f6381 15181
00020c16
ILT
15182 ;
15183 return 0;
15184}
15185_ACEOF
5213506e 15186if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15187
00020c16
ILT
15188lt_aix_libpath_sed='
15189 /Import File Strings/,/^$/ {
15190 /^0/ {
15191 s/^0 *\(.*\)$/\1/
15192 p
15193 }
15194 }'
15195aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15196# Check for a 64-bit object if we didn't find anything.
15197if test -z "$aix_libpath"; then
15198 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15199fi
00020c16 15200fi
5213506e
RW
15201rm -f core conftest.err conftest.$ac_objext \
15202 conftest$ac_exeext conftest.$ac_ext
00020c16 15203if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15204
00020c16 15205 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
43e02a8a 15206 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
15207 else
15208 if test "$host_cpu" = ia64; then
15209 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
15210 allow_undefined_flag="-z nodefs"
15211 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"
15212 else
15213 # Determine the default libpath from the value encoded in an
15214 # empty executable.
5213506e 15215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15216/* end confdefs.h. */
da0f6381 15217
00020c16
ILT
15218int
15219main ()
15220{
da0f6381 15221
00020c16
ILT
15222 ;
15223 return 0;
15224}
15225_ACEOF
5213506e 15226if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15227
00020c16
ILT
15228lt_aix_libpath_sed='
15229 /Import File Strings/,/^$/ {
15230 /^0/ {
15231 s/^0 *\(.*\)$/\1/
15232 p
15233 }
15234 }'
15235aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15236# Check for a 64-bit object if we didn't find anything.
15237if test -z "$aix_libpath"; then
15238 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15239fi
00020c16 15240fi
5213506e
RW
15241rm -f core conftest.err conftest.$ac_objext \
15242 conftest$ac_exeext conftest.$ac_ext
00020c16 15243if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15244
00020c16
ILT
15245 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15246 # Warning - without using the other run time loading flags,
15247 # -berok will link without error, but may produce a broken library.
15248 no_undefined_flag=' ${wl}-bernotok'
15249 allow_undefined_flag=' ${wl}-berok'
43e02a8a
RW
15250 if test "$with_gnu_ld" = yes; then
15251 # We only use this code for GNU lds that support --whole-archive.
15252 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
15253 else
15254 # Exported symbols can be pulled into shared objects from archives
15255 whole_archive_flag_spec='$convenience'
15256 fi
00020c16
ILT
15257 archive_cmds_need_lc=yes
15258 # This is similar to how AIX traditionally builds its shared libraries.
15259 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'
15260 fi
15261 fi
15262 ;;
da0f6381 15263
00020c16
ILT
15264 amigaos*)
15265 case $host_cpu in
15266 powerpc)
15267 # see comment about AmigaOS4 .so support
15268 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15269 archive_expsym_cmds=''
15270 ;;
15271 m68k)
15272 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)'
15273 hardcode_libdir_flag_spec='-L$libdir'
15274 hardcode_minus_L=yes
15275 ;;
15276 esac
15277 ;;
da0f6381 15278
00020c16
ILT
15279 bsdi[45]*)
15280 export_dynamic_flag_spec=-rdynamic
15281 ;;
da0f6381 15282
00020c16
ILT
15283 cygwin* | mingw* | pw32* | cegcc*)
15284 # When not using gcc, we currently assume that we are using
15285 # Microsoft Visual C++.
15286 # hardcode_libdir_flag_spec is actually meaningless, as there is
15287 # no search path for DLLs.
15288 hardcode_libdir_flag_spec=' '
15289 allow_undefined_flag=unsupported
15290 # Tell ltmain to make .lib files, not .a files.
15291 libext=lib
15292 # Tell ltmain to make .dll files, not .so files.
15293 shrext_cmds=".dll"
15294 # FIXME: Setting linknames here is a bad hack.
43e02a8a 15295 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
00020c16
ILT
15296 # The linker will automatically build a .lib file if we build a DLL.
15297 old_archive_from_new_cmds='true'
15298 # FIXME: Should let the user specify the lib program.
15299 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15300 fix_srcfile_path='`cygpath -w "$srcfile"`'
15301 enable_shared_with_static_runtimes=yes
15302 ;;
da0f6381 15303
00020c16 15304 darwin* | rhapsody*)
da0f6381
PB
15305
15306
00020c16
ILT
15307 archive_cmds_need_lc=no
15308 hardcode_direct=no
15309 hardcode_automatic=yes
15310 hardcode_shlibpath_var=unsupported
43e02a8a
RW
15311 if test "$lt_cv_ld_force_load" = "yes"; then
15312 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\"`'
15313 else
15314 whole_archive_flag_spec=''
15315 fi
00020c16
ILT
15316 link_all_deplibs=yes
15317 allow_undefined_flag="$_lt_dar_allow_undefined"
15318 case $cc_basename in
15319 ifort*) _lt_dar_can_shared=yes ;;
15320 *) _lt_dar_can_shared=$GCC ;;
15321 esac
15322 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 15323 output_verbose_link_cmd=func_echo_all
00020c16
ILT
15324 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
15325 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
15326 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}"
15327 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 15328
00020c16
ILT
15329 else
15330 ld_shlibs=no
15331 fi
da0f6381 15332
00020c16 15333 ;;
da0f6381 15334
00020c16
ILT
15335 dgux*)
15336 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15337 hardcode_libdir_flag_spec='-L$libdir'
15338 hardcode_shlibpath_var=no
15339 ;;
da0f6381 15340
00020c16
ILT
15341 freebsd1*)
15342 ld_shlibs=no
15343 ;;
da0f6381 15344
00020c16
ILT
15345 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15346 # support. Future versions do this automatically, but an explicit c++rt0.o
15347 # does not break anything, and helps significantly (at the cost of a little
15348 # extra space).
15349 freebsd2.2*)
15350 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15351 hardcode_libdir_flag_spec='-R$libdir'
15352 hardcode_direct=yes
15353 hardcode_shlibpath_var=no
15354 ;;
da0f6381 15355
00020c16
ILT
15356 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15357 freebsd2*)
15358 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15359 hardcode_direct=yes
15360 hardcode_minus_L=yes
15361 hardcode_shlibpath_var=no
15362 ;;
da0f6381 15363
00020c16
ILT
15364 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15365 freebsd* | dragonfly*)
15366 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15367 hardcode_libdir_flag_spec='-R$libdir'
15368 hardcode_direct=yes
15369 hardcode_shlibpath_var=no
15370 ;;
da0f6381 15371
00020c16
ILT
15372 hpux9*)
15373 if test "$GCC" = yes; then
15374 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'
15375 else
15376 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'
15377 fi
15378 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15379 hardcode_libdir_separator=:
15380 hardcode_direct=yes
da0f6381 15381
00020c16
ILT
15382 # hardcode_minus_L: Not really in the search PATH,
15383 # but as the default location of the library.
15384 hardcode_minus_L=yes
15385 export_dynamic_flag_spec='${wl}-E'
15386 ;;
da0f6381 15387
00020c16 15388 hpux10*)
43e02a8a 15389 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15390 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15391 else
15392 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15393 fi
15394 if test "$with_gnu_ld" = no; then
15395 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15396 hardcode_libdir_flag_spec_ld='+b $libdir'
15397 hardcode_libdir_separator=:
15398 hardcode_direct=yes
15399 hardcode_direct_absolute=yes
15400 export_dynamic_flag_spec='${wl}-E'
15401 # hardcode_minus_L: Not really in the search PATH,
15402 # but as the default location of the library.
15403 hardcode_minus_L=yes
15404 fi
15405 ;;
da0f6381 15406
00020c16 15407 hpux11*)
43e02a8a 15408 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15409 case $host_cpu in
15410 hppa*64*)
15411 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15412 ;;
15413 ia64*)
15414 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15415 ;;
15416 *)
15417 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15418 ;;
15419 esac
15420 else
15421 case $host_cpu in
15422 hppa*64*)
15423 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15424 ;;
15425 ia64*)
15426 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15427 ;;
15428 *)
43e02a8a
RW
15429
15430 # Older versions of the 11.00 compiler do not understand -b yet
15431 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
15433$as_echo_n "checking if $CC understands -b... " >&6; }
15434if test "${lt_cv_prog_compiler__b+set}" = set; then :
15435 $as_echo_n "(cached) " >&6
15436else
15437 lt_cv_prog_compiler__b=no
15438 save_LDFLAGS="$LDFLAGS"
15439 LDFLAGS="$LDFLAGS -b"
15440 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15441 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15442 # The linker can only warn and ignore the option if not recognized
15443 # So say no if there are warnings
15444 if test -s conftest.err; then
15445 # Append any errors to the config.log.
15446 cat conftest.err 1>&5
15447 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15448 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15449 if diff conftest.exp conftest.er2 >/dev/null; then
15450 lt_cv_prog_compiler__b=yes
15451 fi
15452 else
15453 lt_cv_prog_compiler__b=yes
15454 fi
15455 fi
15456 $RM -r conftest*
15457 LDFLAGS="$save_LDFLAGS"
15458
15459fi
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
15461$as_echo "$lt_cv_prog_compiler__b" >&6; }
15462
15463if test x"$lt_cv_prog_compiler__b" = xyes; then
15464 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15465else
15466 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15467fi
15468
00020c16
ILT
15469 ;;
15470 esac
15471 fi
15472 if test "$with_gnu_ld" = no; then
15473 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15474 hardcode_libdir_separator=:
da0f6381 15475
00020c16
ILT
15476 case $host_cpu in
15477 hppa*64*|ia64*)
15478 hardcode_direct=no
15479 hardcode_shlibpath_var=no
15480 ;;
15481 *)
15482 hardcode_direct=yes
15483 hardcode_direct_absolute=yes
15484 export_dynamic_flag_spec='${wl}-E'
da0f6381 15485
00020c16
ILT
15486 # hardcode_minus_L: Not really in the search PATH,
15487 # but as the default location of the library.
15488 hardcode_minus_L=yes
15489 ;;
15490 esac
15491 fi
15492 ;;
da0f6381 15493
00020c16
ILT
15494 irix5* | irix6* | nonstopux*)
15495 if test "$GCC" = yes; then
43e02a8a 15496 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
15497 # Try to use the -exported_symbol ld option, if it does not
15498 # work, assume that -exports_file does not work either and
15499 # implicitly export all symbols.
15500 save_LDFLAGS="$LDFLAGS"
15501 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5213506e
RW
15502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15503/* end confdefs.h. */
00020c16
ILT
15504int foo(void) {}
15505_ACEOF
5213506e 15506if ac_fn_c_try_link "$LINENO"; then :
43e02a8a 15507 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 15508
00020c16 15509fi
5213506e
RW
15510rm -f core conftest.err conftest.$ac_objext \
15511 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
15512 LDFLAGS="$save_LDFLAGS"
15513 else
43e02a8a
RW
15514 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'
15515 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
15516 fi
15517 archive_cmds_need_lc='no'
15518 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15519 hardcode_libdir_separator=:
15520 inherit_rpath=yes
15521 link_all_deplibs=yes
15522 ;;
da0f6381 15523
00020c16
ILT
15524 netbsd*)
15525 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15526 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15527 else
15528 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15529 fi
15530 hardcode_libdir_flag_spec='-R$libdir'
15531 hardcode_direct=yes
15532 hardcode_shlibpath_var=no
15533 ;;
da0f6381 15534
00020c16
ILT
15535 newsos6)
15536 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15537 hardcode_direct=yes
15538 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15539 hardcode_libdir_separator=:
15540 hardcode_shlibpath_var=no
15541 ;;
da0f6381 15542
00020c16
ILT
15543 *nto* | *qnx*)
15544 ;;
da0f6381 15545
00020c16
ILT
15546 openbsd*)
15547 if test -f /usr/libexec/ld.so; then
15548 hardcode_direct=yes
15549 hardcode_shlibpath_var=no
15550 hardcode_direct_absolute=yes
15551 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15552 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15553 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15554 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15555 export_dynamic_flag_spec='${wl}-E'
15556 else
15557 case $host_os in
15558 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15559 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15560 hardcode_libdir_flag_spec='-R$libdir'
15561 ;;
15562 *)
15563 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15564 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15565 ;;
15566 esac
15567 fi
15568 else
15569 ld_shlibs=no
15570 fi
15571 ;;
da0f6381 15572
00020c16
ILT
15573 os2*)
15574 hardcode_libdir_flag_spec='-L$libdir'
15575 hardcode_minus_L=yes
15576 allow_undefined_flag=unsupported
43e02a8a 15577 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
15578 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15579 ;;
da0f6381 15580
00020c16
ILT
15581 osf3*)
15582 if test "$GCC" = yes; then
15583 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15584 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
15585 else
15586 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15587 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
15588 fi
15589 archive_cmds_need_lc='no'
15590 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15591 hardcode_libdir_separator=:
15592 ;;
da0f6381 15593
00020c16
ILT
15594 osf4* | osf5*) # as osf3* with the addition of -msym flag
15595 if test "$GCC" = yes; then
15596 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15597 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
15598 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15599 else
15600 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15601 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 15602 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 15603 $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 15604
00020c16
ILT
15605 # Both c and cxx compiler support -rpath directly
15606 hardcode_libdir_flag_spec='-rpath $libdir'
15607 fi
15608 archive_cmds_need_lc='no'
15609 hardcode_libdir_separator=:
15610 ;;
da0f6381 15611
00020c16
ILT
15612 solaris*)
15613 no_undefined_flag=' -z defs'
15614 if test "$GCC" = yes; then
15615 wlarc='${wl}'
15616 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15617 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15618 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15619 else
15620 case `$CC -V 2>&1` in
15621 *"Compilers 5.0"*)
15622 wlarc=''
15623 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15624 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15625 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
15626 ;;
15627 *)
15628 wlarc='${wl}'
15629 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
15630 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15631 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15632 ;;
15633 esac
15634 fi
15635 hardcode_libdir_flag_spec='-R$libdir'
15636 hardcode_shlibpath_var=no
15637 case $host_os in
15638 solaris2.[0-5] | solaris2.[0-5].*) ;;
15639 *)
15640 # The compiler driver will combine and reorder linker options,
15641 # but understands `-z linker_flag'. GCC discards it without `$wl',
15642 # but is careful enough not to reorder.
15643 # Supported since Solaris 2.6 (maybe 2.5.1?)
15644 if test "$GCC" = yes; then
15645 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15646 else
15647 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
15648 fi
15649 ;;
15650 esac
15651 link_all_deplibs=yes
15652 ;;
da0f6381 15653
00020c16
ILT
15654 sunos4*)
15655 if test "x$host_vendor" = xsequent; then
15656 # Use $CC to link under sequent, because it throws in some extra .o
15657 # files that make .init and .fini sections work.
15658 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15659 else
15660 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15661 fi
15662 hardcode_libdir_flag_spec='-L$libdir'
15663 hardcode_direct=yes
15664 hardcode_minus_L=yes
15665 hardcode_shlibpath_var=no
15666 ;;
da0f6381 15667
00020c16
ILT
15668 sysv4)
15669 case $host_vendor in
15670 sni)
15671 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15672 hardcode_direct=yes # is this really true???
15673 ;;
15674 siemens)
15675 ## LD is ld it makes a PLAMLIB
15676 ## CC just makes a GrossModule.
15677 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15678 reload_cmds='$CC -r -o $output$reload_objs'
15679 hardcode_direct=no
15680 ;;
15681 motorola)
15682 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15683 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15684 ;;
15685 esac
15686 runpath_var='LD_RUN_PATH'
15687 hardcode_shlibpath_var=no
15688 ;;
da0f6381 15689
00020c16
ILT
15690 sysv4.3*)
15691 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15692 hardcode_shlibpath_var=no
15693 export_dynamic_flag_spec='-Bexport'
15694 ;;
da0f6381 15695
00020c16
ILT
15696 sysv4*MP*)
15697 if test -d /usr/nec; then
15698 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15699 hardcode_shlibpath_var=no
15700 runpath_var=LD_RUN_PATH
15701 hardcode_runpath_var=yes
15702 ld_shlibs=yes
15703 fi
15704 ;;
da0f6381 15705
00020c16
ILT
15706 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15707 no_undefined_flag='${wl}-z,text'
15708 archive_cmds_need_lc=no
15709 hardcode_shlibpath_var=no
15710 runpath_var='LD_RUN_PATH'
da0f6381 15711
00020c16
ILT
15712 if test "$GCC" = yes; then
15713 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15714 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15715 else
15716 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15717 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15718 fi
15719 ;;
da0f6381 15720
00020c16
ILT
15721 sysv5* | sco3.2v5* | sco5v6*)
15722 # Note: We can NOT use -z defs as we might desire, because we do not
15723 # link with -lc, and that would cause any symbols used from libc to
15724 # always be unresolved, which means just about no library would
15725 # ever link correctly. If we're not using GNU ld we use -z text
15726 # though, which does catch some bad symbols but isn't as heavy-handed
15727 # as -z defs.
15728 no_undefined_flag='${wl}-z,text'
15729 allow_undefined_flag='${wl}-z,nodefs'
15730 archive_cmds_need_lc=no
15731 hardcode_shlibpath_var=no
15732 hardcode_libdir_flag_spec='${wl}-R,$libdir'
15733 hardcode_libdir_separator=':'
15734 link_all_deplibs=yes
15735 export_dynamic_flag_spec='${wl}-Bexport'
15736 runpath_var='LD_RUN_PATH'
da0f6381 15737
00020c16
ILT
15738 if test "$GCC" = yes; then
15739 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15740 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15741 else
15742 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15743 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15744 fi
15745 ;;
da0f6381 15746
00020c16
ILT
15747 uts4*)
15748 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15749 hardcode_libdir_flag_spec='-L$libdir'
15750 hardcode_shlibpath_var=no
15751 ;;
da0f6381 15752
00020c16
ILT
15753 *)
15754 ld_shlibs=no
15755 ;;
15756 esac
da0f6381 15757
00020c16
ILT
15758 if test x$host_vendor = xsni; then
15759 case $host in
15760 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15761 export_dynamic_flag_spec='${wl}-Blargedynsym'
15762 ;;
15763 esac
15764 fi
15765 fi
da0f6381 15766
5213506e
RW
15767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
15768$as_echo "$ld_shlibs" >&6; }
00020c16 15769test "$ld_shlibs" = no && can_build_shared=no
da0f6381 15770
00020c16 15771with_gnu_ld=$with_gnu_ld
da0f6381
PB
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
00020c16
ILT
15787#
15788# Do we need to explicitly link libc?
15789#
15790case "x$archive_cmds_need_lc" in
15791x|xyes)
15792 # Assume -lc should be added
15793 archive_cmds_need_lc=yes
da0f6381 15794
00020c16
ILT
15795 if test "$enable_shared" = yes && test "$GCC" = yes; then
15796 case $archive_cmds in
15797 *'~'*)
15798 # FIXME: we may have to deal with multi-command sequences.
15799 ;;
15800 '$CC '*)
15801 # Test whether the compiler implicitly links with -lc since on some
15802 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15803 # to ld, don't add -lc before -lgcc.
5213506e
RW
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15805$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15806if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
15807 $as_echo_n "(cached) " >&6
00020c16
ILT
15808else
15809 $RM conftest*
15810 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 15811
5213506e 15812 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
15813 (eval $ac_compile) 2>&5
15814 ac_status=$?
5213506e
RW
15815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15816 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
15817 soname=conftest
15818 lib=conftest
15819 libobjs=conftest.$ac_objext
15820 deplibs=
15821 wl=$lt_prog_compiler_wl
15822 pic_flag=$lt_prog_compiler_pic
15823 compiler_flags=-v
15824 linker_flags=-v
15825 verstring=
15826 output_objdir=.
15827 libname=conftest
15828 lt_save_allow_undefined_flag=$allow_undefined_flag
15829 allow_undefined_flag=
5213506e 15830 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
15831 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15832 ac_status=$?
5213506e
RW
15833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15834 test $ac_status = 0; }
00020c16
ILT
15835 then
15836 lt_cv_archive_cmds_need_lc=no
15837 else
15838 lt_cv_archive_cmds_need_lc=yes
15839 fi
15840 allow_undefined_flag=$lt_save_allow_undefined_flag
15841 else
15842 cat conftest.err 1>&5
15843 fi
15844 $RM conftest*
da0f6381 15845
00020c16 15846fi
5213506e
RW
15847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
15848$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
00020c16
ILT
15849 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
15850 ;;
15851 esac
15852 fi
15853 ;;
15854esac
da0f6381
PB
15855
15856
15857
15858
5d47bb02 15859
da0f6381 15860
da0f6381 15861
da0f6381 15862
da0f6381 15863
00020c16
ILT
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
5213506e
RW
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
16013$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
16014
16015if test "$GCC" = yes; then
16016 case $host_os in
16017 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
16018 *) lt_awk_arg="/^libraries:/" ;;
16019 esac
43e02a8a
RW
16020 case $host_os in
16021 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
16022 *) lt_sed_strip_eq="s,=/,/,g" ;;
16023 esac
16024 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
16025 case $lt_search_path_spec in
16026 *\;*)
00020c16
ILT
16027 # if the path contains ";" then we assume it to be the separator
16028 # otherwise default to the standard path separator (i.e. ":") - it is
16029 # assumed that no part of a normal pathname contains ";" but that should
16030 # okay in the real world where ";" in dirpaths is itself problematic.
43e02a8a
RW
16031 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
16032 ;;
16033 *)
16034 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
16035 ;;
16036 esac
00020c16
ILT
16037 # Ok, now we have the path, separated by spaces, we can step through it
16038 # and add multilib dir if necessary.
16039 lt_tmp_lt_search_path_spec=
16040 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
16041 for lt_sys_path in $lt_search_path_spec; do
16042 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
16043 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
16044 else
16045 test -d "$lt_sys_path" && \
16046 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
16047 fi
16048 done
43e02a8a 16049 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
00020c16
ILT
16050BEGIN {RS=" "; FS="/|\n";} {
16051 lt_foo="";
16052 lt_count=0;
16053 for (lt_i = NF; lt_i > 0; lt_i--) {
16054 if ($lt_i != "" && $lt_i != ".") {
16055 if ($lt_i == "..") {
16056 lt_count++;
16057 } else {
16058 if (lt_count == 0) {
16059 lt_foo="/" $lt_i lt_foo;
16060 } else {
16061 lt_count--;
16062 }
16063 }
16064 }
16065 }
16066 if (lt_foo != "") { lt_freq[lt_foo]++; }
16067 if (lt_freq[lt_foo] == 1) { print lt_foo; }
16068}'`
43e02a8a
RW
16069 # AWK program above erroneously prepends '/' to C:/dos/paths
16070 # for these hosts.
16071 case $host_os in
16072 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
16073 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
16074 esac
16075 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
00020c16
ILT
16076else
16077 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16078fi
16079library_names_spec=
16080libname_spec='lib$name'
16081soname_spec=
16082shrext_cmds=".so"
16083postinstall_cmds=
16084postuninstall_cmds=
16085finish_cmds=
16086finish_eval=
16087shlibpath_var=
16088shlibpath_overrides_runpath=unknown
16089version_type=none
16090dynamic_linker="$host_os ld.so"
16091sys_lib_dlsearch_path_spec="/lib /usr/lib"
16092need_lib_prefix=unknown
16093hardcode_into_libs=no
16094
16095# when you set need_version to no, make sure it does not cause -set_version
16096# flags to be left without arguments
16097need_version=unknown
16098
16099case $host_os in
16100aix3*)
16101 version_type=linux
16102 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
16103 shlibpath_var=LIBPATH
16104
16105 # AIX 3 has no versioning support, so we append a major version to the name.
16106 soname_spec='${libname}${release}${shared_ext}$major'
16107 ;;
16108
16109aix[4-9]*)
16110 version_type=linux
16111 need_lib_prefix=no
16112 need_version=no
16113 hardcode_into_libs=yes
16114 if test "$host_cpu" = ia64; then
16115 # AIX 5 supports IA64
16116 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
16117 shlibpath_var=LD_LIBRARY_PATH
16118 else
16119 # With GCC up to 2.95.x, collect2 would create an import file
16120 # for dependence libraries. The import file would start with
16121 # the line `#! .'. This would cause the generated library to
16122 # depend on `.', always an invalid library. This was fixed in
16123 # development snapshots of GCC prior to 3.0.
16124 case $host_os in
16125 aix4 | aix4.[01] | aix4.[01].*)
16126 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16127 echo ' yes '
da0f6381
PB
16128 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
16129 :
16130 else
16131 can_build_shared=no
16132 fi
16133 ;;
16134 esac
16135 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
16136 # soname into executable. Probably we can add versioning support to
16137 # collect2, so additional links can be useful in future.
16138 if test "$aix_use_runtimelinking" = yes; then
16139 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16140 # instead of lib<name>.a to let people know that these are not
16141 # typical AIX shared libraries.
16142 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16143 else
16144 # We preserve .a as extension for shared libraries through AIX4.2
16145 # and later when we are not doing run time linking.
16146 library_names_spec='${libname}${release}.a $libname.a'
16147 soname_spec='${libname}${release}${shared_ext}$major'
16148 fi
16149 shlibpath_var=LIBPATH
16150 fi
16151 ;;
16152
16153amigaos*)
5d47bb02
PG
16154 case $host_cpu in
16155 powerpc)
16156 # Since July 2007 AmigaOS4 officially supports .so libraries.
16157 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16158 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16159 ;;
16160 m68k)
da0f6381
PB
16161 library_names_spec='$libname.ixlibrary $libname.a'
16162 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 16163 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
16164 ;;
16165 esac
da0f6381
PB
16166 ;;
16167
16168beos*)
16169 library_names_spec='${libname}${shared_ext}'
16170 dynamic_linker="$host_os ld.so"
16171 shlibpath_var=LIBRARY_PATH
16172 ;;
16173
16174bsdi[45]*)
16175 version_type=linux
16176 need_version=no
16177 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16178 soname_spec='${libname}${release}${shared_ext}$major'
16179 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16180 shlibpath_var=LD_LIBRARY_PATH
16181 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16182 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16183 # the default ld.so.conf also contains /usr/contrib/lib and
16184 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16185 # libtool to hard-code these into programs
16186 ;;
16187
5d47bb02 16188cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
16189 version_type=windows
16190 shrext_cmds=".dll"
16191 need_version=no
16192 need_lib_prefix=no
16193
5d47bb02
PG
16194 case $GCC,$host_os in
16195 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
16196 library_names_spec='$libname.dll.a'
16197 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16198 postinstall_cmds='base_file=`basename \${file}`~
16199 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
16200 dldir=$destdir/`dirname \$dlpath`~
16201 test -d \$dldir || mkdir -p \$dldir~
16202 $install_prog $dir/$dlname \$dldir/$dlname~
16203 chmod a+x \$dldir/$dlname~
16204 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16205 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16206 fi'
16207 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16208 dlpath=$dir/\$dldll~
16209 $RM \$dlpath'
16210 shlibpath_overrides_runpath=yes
16211
16212 case $host_os in
16213 cygwin*)
16214 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16215 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a
RW
16216
16217 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
da0f6381 16218 ;;
5d47bb02 16219 mingw* | cegcc*)
da0f6381
PB
16220 # MinGW DLLs use traditional 'lib' prefix
16221 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
da0f6381
PB
16222 ;;
16223 pw32*)
16224 # pw32 DLLs use 'pw' prefix rather than 'lib'
16225 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16226 ;;
16227 esac
16228 ;;
16229
16230 *)
16231 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
16232 ;;
16233 esac
16234 dynamic_linker='Win32 ld.exe'
16235 # FIXME: first we should search . and the directory the executable is in
16236 shlibpath_var=PATH
16237 ;;
16238
16239darwin* | rhapsody*)
16240 dynamic_linker="$host_os dyld"
16241 version_type=darwin
16242 need_lib_prefix=no
16243 need_version=no
16244 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
16245 soname_spec='${libname}${release}${major}$shared_ext'
16246 shlibpath_overrides_runpath=yes
16247 shlibpath_var=DYLD_LIBRARY_PATH
16248 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16249
16250 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
16251 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16252 ;;
16253
16254dgux*)
16255 version_type=linux
16256 need_lib_prefix=no
16257 need_version=no
16258 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
16259 soname_spec='${libname}${release}${shared_ext}$major'
16260 shlibpath_var=LD_LIBRARY_PATH
16261 ;;
16262
16263freebsd1*)
16264 dynamic_linker=no
16265 ;;
16266
16267freebsd* | dragonfly*)
16268 # DragonFly does not have aout. When/if they implement a new
16269 # versioning mechanism, adjust this.
16270 if test -x /usr/bin/objformat; then
16271 objformat=`/usr/bin/objformat`
16272 else
16273 case $host_os in
16274 freebsd[123]*) objformat=aout ;;
16275 *) objformat=elf ;;
16276 esac
16277 fi
16278 version_type=freebsd-$objformat
16279 case $version_type in
16280 freebsd-elf*)
16281 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16282 need_version=no
16283 need_lib_prefix=no
16284 ;;
16285 freebsd-*)
16286 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
16287 need_version=yes
16288 ;;
16289 esac
16290 shlibpath_var=LD_LIBRARY_PATH
16291 case $host_os in
16292 freebsd2*)
16293 shlibpath_overrides_runpath=yes
16294 ;;
16295 freebsd3.[01]* | freebsdelf3.[01]*)
16296 shlibpath_overrides_runpath=yes
16297 hardcode_into_libs=yes
16298 ;;
16299 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16300 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16301 shlibpath_overrides_runpath=no
16302 hardcode_into_libs=yes
16303 ;;
16304 *) # from 4.6 on, and DragonFly
16305 shlibpath_overrides_runpath=yes
16306 hardcode_into_libs=yes
16307 ;;
16308 esac
16309 ;;
16310
16311gnu*)
16312 version_type=linux
16313 need_lib_prefix=no
16314 need_version=no
16315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16316 soname_spec='${libname}${release}${shared_ext}$major'
16317 shlibpath_var=LD_LIBRARY_PATH
16318 hardcode_into_libs=yes
16319 ;;
16320
43e02a8a
RW
16321haiku*)
16322 version_type=linux
16323 need_lib_prefix=no
16324 need_version=no
16325 dynamic_linker="$host_os runtime_loader"
16326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16327 soname_spec='${libname}${release}${shared_ext}$major'
16328 shlibpath_var=LIBRARY_PATH
16329 shlibpath_overrides_runpath=yes
16330 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
16331 hardcode_into_libs=yes
16332 ;;
16333
da0f6381
PB
16334hpux9* | hpux10* | hpux11*)
16335 # Give a soname corresponding to the major version so that dld.sl refuses to
16336 # link against other versions.
16337 version_type=sunos
16338 need_lib_prefix=no
16339 need_version=no
16340 case $host_cpu in
16341 ia64*)
16342 shrext_cmds='.so'
16343 hardcode_into_libs=yes
16344 dynamic_linker="$host_os dld.so"
16345 shlibpath_var=LD_LIBRARY_PATH
16346 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16347 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16348 soname_spec='${libname}${release}${shared_ext}$major'
16349 if test "X$HPUX_IA64_MODE" = X32; then
16350 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16351 else
16352 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16353 fi
16354 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16355 ;;
16356 hppa*64*)
16357 shrext_cmds='.sl'
16358 hardcode_into_libs=yes
16359 dynamic_linker="$host_os dld.sl"
16360 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16361 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16362 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16363 soname_spec='${libname}${release}${shared_ext}$major'
16364 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16365 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16366 ;;
16367 *)
16368 shrext_cmds='.sl'
16369 dynamic_linker="$host_os dld.sl"
16370 shlibpath_var=SHLIB_PATH
16371 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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 ;;
16375 esac
43e02a8a 16376 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
da0f6381 16377 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
16378 # or fails outright, so override atomically:
16379 install_override_mode=555
da0f6381
PB
16380 ;;
16381
16382interix[3-9]*)
16383 version_type=linux
16384 need_lib_prefix=no
16385 need_version=no
16386 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16387 soname_spec='${libname}${release}${shared_ext}$major'
16388 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16389 shlibpath_var=LD_LIBRARY_PATH
16390 shlibpath_overrides_runpath=no
16391 hardcode_into_libs=yes
16392 ;;
16393
16394irix5* | irix6* | nonstopux*)
16395 case $host_os in
16396 nonstopux*) version_type=nonstopux ;;
16397 *)
16398 if test "$lt_cv_prog_gnu_ld" = yes; then
16399 version_type=linux
16400 else
16401 version_type=irix
16402 fi ;;
16403 esac
16404 need_lib_prefix=no
16405 need_version=no
16406 soname_spec='${libname}${release}${shared_ext}$major'
16407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
16408 case $host_os in
16409 irix5* | nonstopux*)
16410 libsuff= shlibsuff=
16411 ;;
16412 *)
16413 case $LD in # libtool.m4 will add one of these switches to LD
16414 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16415 libsuff= shlibsuff= libmagic=32-bit;;
16416 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16417 libsuff=32 shlibsuff=N32 libmagic=N32;;
16418 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16419 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16420 *) libsuff= shlibsuff= libmagic=never-match;;
16421 esac
16422 ;;
16423 esac
16424 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16425 shlibpath_overrides_runpath=no
16426 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16427 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16428 hardcode_into_libs=yes
16429 ;;
16430
16431# No shared lib support for Linux oldld, aout, or coff.
16432linux*oldld* | linux*aout* | linux*coff*)
16433 dynamic_linker=no
16434 ;;
16435
16436# This must be Linux ELF.
7a9d3fe8 16437linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
16438 version_type=linux
16439 need_lib_prefix=no
16440 need_version=no
16441 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16442 soname_spec='${libname}${release}${shared_ext}$major'
16443 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16444 shlibpath_var=LD_LIBRARY_PATH
16445 shlibpath_overrides_runpath=no
baafc534 16446
da0f6381 16447 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
16448 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
16449 $as_echo_n "(cached) " >&6
baafc534
RW
16450else
16451 lt_cv_shlibpath_overrides_runpath=no
16452 save_LDFLAGS=$LDFLAGS
16453 save_libdir=$libdir
16454 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
16455 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
5213506e 16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16457/* end confdefs.h. */
16458
16459int
16460main ()
16461{
16462
16463 ;
16464 return 0;
16465}
16466_ACEOF
5213506e
RW
16467if ac_fn_c_try_link "$LINENO"; then :
16468 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
baafc534 16469 lt_cv_shlibpath_overrides_runpath=yes
da0f6381 16470fi
da0f6381 16471fi
5213506e
RW
16472rm -f core conftest.err conftest.$ac_objext \
16473 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
16474 LDFLAGS=$save_LDFLAGS
16475 libdir=$save_libdir
16476
16477fi
16478
16479 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
16480
16481 # This implies no fast_install, which is unacceptable.
16482 # Some rework will be needed to allow for fast_install
16483 # before this can be enabled.
16484 hardcode_into_libs=yes
16485
16486 # Append ld.so.conf contents to the search path
16487 if test -f /etc/ld.so.conf; then
43e02a8a 16488 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
16489 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16490 fi
16491
16492 # We used to test for /lib/ld.so.1 and disable shared libraries on
16493 # powerpc, because MkLinux only supported shared libraries with the
16494 # GNU dynamic linker. Since this was broken with cross compilers,
16495 # most powerpc-linux boxes support dynamic linking these days and
16496 # people can always --disable-shared, the test was removed, and we
16497 # assume the GNU/Linux dynamic linker is in use.
16498 dynamic_linker='GNU/Linux ld.so'
16499 ;;
16500
16501netbsd*)
16502 version_type=sunos
16503 need_lib_prefix=no
16504 need_version=no
16505 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16507 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16508 dynamic_linker='NetBSD (a.out) ld.so'
16509 else
16510 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16511 soname_spec='${libname}${release}${shared_ext}$major'
16512 dynamic_linker='NetBSD ld.elf_so'
16513 fi
16514 shlibpath_var=LD_LIBRARY_PATH
16515 shlibpath_overrides_runpath=yes
16516 hardcode_into_libs=yes
16517 ;;
16518
16519newsos6)
16520 version_type=linux
16521 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16522 shlibpath_var=LD_LIBRARY_PATH
16523 shlibpath_overrides_runpath=yes
16524 ;;
16525
16526*nto* | *qnx*)
16527 version_type=qnx
16528 need_lib_prefix=no
16529 need_version=no
16530 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16531 soname_spec='${libname}${release}${shared_ext}$major'
16532 shlibpath_var=LD_LIBRARY_PATH
16533 shlibpath_overrides_runpath=no
16534 hardcode_into_libs=yes
16535 dynamic_linker='ldqnx.so'
16536 ;;
16537
16538openbsd*)
16539 version_type=sunos
16540 sys_lib_dlsearch_path_spec="/usr/lib"
16541 need_lib_prefix=no
16542 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16543 case $host_os in
16544 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16545 *) need_version=no ;;
16546 esac
16547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16548 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16549 shlibpath_var=LD_LIBRARY_PATH
16550 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16551 case $host_os in
16552 openbsd2.[89] | openbsd2.[89].*)
16553 shlibpath_overrides_runpath=no
16554 ;;
16555 *)
16556 shlibpath_overrides_runpath=yes
16557 ;;
16558 esac
16559 else
16560 shlibpath_overrides_runpath=yes
16561 fi
16562 ;;
16563
16564os2*)
16565 libname_spec='$name'
16566 shrext_cmds=".dll"
16567 need_lib_prefix=no
16568 library_names_spec='$libname${shared_ext} $libname.a'
16569 dynamic_linker='OS/2 ld.exe'
16570 shlibpath_var=LIBPATH
16571 ;;
16572
16573osf3* | osf4* | osf5*)
16574 version_type=osf
16575 need_lib_prefix=no
16576 need_version=no
16577 soname_spec='${libname}${release}${shared_ext}$major'
16578 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16579 shlibpath_var=LD_LIBRARY_PATH
16580 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16581 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16582 ;;
16583
16584rdos*)
16585 dynamic_linker=no
16586 ;;
16587
16588solaris*)
16589 version_type=linux
16590 need_lib_prefix=no
16591 need_version=no
16592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16593 soname_spec='${libname}${release}${shared_ext}$major'
16594 shlibpath_var=LD_LIBRARY_PATH
16595 shlibpath_overrides_runpath=yes
16596 hardcode_into_libs=yes
16597 # ldd complains unless libraries are executable
16598 postinstall_cmds='chmod +x $lib'
16599 ;;
16600
16601sunos4*)
16602 version_type=sunos
16603 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16604 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16605 shlibpath_var=LD_LIBRARY_PATH
16606 shlibpath_overrides_runpath=yes
16607 if test "$with_gnu_ld" = yes; then
16608 need_lib_prefix=no
16609 fi
16610 need_version=yes
16611 ;;
16612
16613sysv4 | sysv4.3*)
16614 version_type=linux
16615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16616 soname_spec='${libname}${release}${shared_ext}$major'
16617 shlibpath_var=LD_LIBRARY_PATH
16618 case $host_vendor in
16619 sni)
16620 shlibpath_overrides_runpath=no
16621 need_lib_prefix=no
16622 runpath_var=LD_RUN_PATH
16623 ;;
16624 siemens)
16625 need_lib_prefix=no
16626 ;;
16627 motorola)
16628 need_lib_prefix=no
16629 need_version=no
16630 shlibpath_overrides_runpath=no
16631 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16632 ;;
16633 esac
16634 ;;
16635
16636sysv4*MP*)
16637 if test -d /usr/nec ;then
16638 version_type=linux
16639 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
16640 soname_spec='$libname${shared_ext}.$major'
16641 shlibpath_var=LD_LIBRARY_PATH
16642 fi
16643 ;;
16644
16645sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16646 version_type=freebsd-elf
16647 need_lib_prefix=no
16648 need_version=no
16649 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16650 soname_spec='${libname}${release}${shared_ext}$major'
16651 shlibpath_var=LD_LIBRARY_PATH
16652 shlibpath_overrides_runpath=yes
16653 hardcode_into_libs=yes
16654 if test "$with_gnu_ld" = yes; then
16655 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16656 else
16657 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16658 case $host_os in
16659 sco3.2v5*)
16660 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16661 ;;
16662 esac
16663 fi
16664 sys_lib_dlsearch_path_spec='/usr/lib'
16665 ;;
16666
16667tpf*)
16668 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16669 version_type=linux
16670 need_lib_prefix=no
16671 need_version=no
5d47bb02 16672 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
16673 shlibpath_var=LD_LIBRARY_PATH
16674 shlibpath_overrides_runpath=no
16675 hardcode_into_libs=yes
16676 ;;
16677
16678uts4*)
16679 version_type=linux
16680 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16681 soname_spec='${libname}${release}${shared_ext}$major'
16682 shlibpath_var=LD_LIBRARY_PATH
16683 ;;
16684
16685*)
16686 dynamic_linker=no
16687 ;;
16688esac
5213506e
RW
16689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16690$as_echo "$dynamic_linker" >&6; }
da0f6381
PB
16691test "$dynamic_linker" = no && can_build_shared=no
16692
16693variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16694if test "$GCC" = yes; then
16695 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16696fi
16697
5d47bb02
PG
16698if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
16699 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
16700fi
16701if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
16702 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
16703fi
16704
da0f6381
PB
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
43e02a8a
RW
16785
16786
16787
16788
16789
da0f6381
PB
16790
16791
16792
16793
16794
16795
5213506e
RW
16796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16797$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
da0f6381
PB
16798hardcode_action=
16799if test -n "$hardcode_libdir_flag_spec" ||
16800 test -n "$runpath_var" ||
16801 test "X$hardcode_automatic" = "Xyes" ; then
16802
16803 # We can hardcode non-existent directories.
16804 if test "$hardcode_direct" != no &&
16805 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16806 # have to relink, otherwise we might link with an installed library
16807 # when we should be linking with a yet-to-be-installed one
16808 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
16809 test "$hardcode_minus_L" != no; then
16810 # Linking always hardcodes the temporary library directory.
16811 hardcode_action=relink
16812 else
16813 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16814 hardcode_action=immediate
16815 fi
16816else
16817 # We cannot hardcode anything, or else we can only hardcode existing
16818 # directories.
16819 hardcode_action=unsupported
16820fi
5213506e
RW
16821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
16822$as_echo "$hardcode_action" >&6; }
da0f6381
PB
16823
16824if test "$hardcode_action" = relink ||
16825 test "$inherit_rpath" = yes; then
16826 # Fast installation is not supported
16827 enable_fast_install=no
16828elif test "$shlibpath_overrides_runpath" = yes ||
16829 test "$enable_shared" = no; then
16830 # Fast installation is not necessary
16831 enable_fast_install=needless
16832fi
16833
16834
16835
16836
16837
16838
16839 if test "x$enable_dlopen" != xyes; then
16840 enable_dlopen=unknown
16841 enable_dlopen_self=unknown
16842 enable_dlopen_self_static=unknown
16843else
16844 lt_cv_dlopen=no
16845 lt_cv_dlopen_libs=
16846
16847 case $host_os in
16848 beos*)
16849 lt_cv_dlopen="load_add_on"
16850 lt_cv_dlopen_libs=
16851 lt_cv_dlopen_self=yes
16852 ;;
16853
5d47bb02 16854 mingw* | pw32* | cegcc*)
da0f6381 16855 lt_cv_dlopen="LoadLibrary"
5213506e
RW
16856 lt_cv_dlopen_libs=
16857 ;;
da0f6381 16858
5213506e
RW
16859 cygwin*)
16860 lt_cv_dlopen="dlopen"
16861 lt_cv_dlopen_libs=
16862 ;;
16863
16864 darwin*)
16865 # if libdl is installed we need to link against it
16866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16867$as_echo_n "checking for dlopen in -ldl... " >&6; }
16868if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16869 $as_echo_n "(cached) " >&6
da0f6381
PB
16870else
16871 ac_check_lib_save_LIBS=$LIBS
5213506e
RW
16872LIBS="-ldl $LIBS"
16873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16874/* end confdefs.h. */
16875
5213506e
RW
16876/* Override any GCC internal prototype to avoid an error.
16877 Use char because int might match the return type of a GCC
16878 builtin and then its argument prototype would still apply. */
da0f6381
PB
16879#ifdef __cplusplus
16880extern "C"
16881#endif
5213506e 16882char dlopen ();
da0f6381
PB
16883int
16884main ()
16885{
5213506e 16886return dlopen ();
da0f6381
PB
16887 ;
16888 return 0;
16889}
16890_ACEOF
5213506e
RW
16891if ac_fn_c_try_link "$LINENO"; then :
16892 ac_cv_lib_dl_dlopen=yes
da0f6381 16893else
5213506e 16894 ac_cv_lib_dl_dlopen=no
da0f6381 16895fi
5213506e
RW
16896rm -f core conftest.err conftest.$ac_objext \
16897 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
16898LIBS=$ac_check_lib_save_LIBS
16899fi
5213506e
RW
16900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16901$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16902if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
16903 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
da0f6381 16904else
da0f6381 16905
5213506e
RW
16906 lt_cv_dlopen="dyld"
16907 lt_cv_dlopen_libs=
16908 lt_cv_dlopen_self=yes
da0f6381 16909
5213506e 16910fi
da0f6381 16911
5213506e 16912 ;;
da0f6381 16913
5213506e
RW
16914 *)
16915 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
16916if test "x$ac_cv_func_shl_load" = x""yes; then :
16917 lt_cv_dlopen="shl_load"
16918else
16919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
16920$as_echo_n "checking for shl_load in -ldld... " >&6; }
16921if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
16922 $as_echo_n "(cached) " >&6
16923else
16924 ac_check_lib_save_LIBS=$LIBS
16925LIBS="-ldld $LIBS"
16926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16927/* end confdefs.h. */
16928
16929/* Override any GCC internal prototype to avoid an error.
16930 Use char because int might match the return type of a GCC
da0f6381 16931 builtin and then its argument prototype would still apply. */
da0f6381 16932#ifdef __cplusplus
5213506e 16933extern "C"
da0f6381 16934#endif
5213506e 16935char shl_load ();
da0f6381
PB
16936int
16937main ()
16938{
5213506e 16939return shl_load ();
da0f6381
PB
16940 ;
16941 return 0;
16942}
16943_ACEOF
5213506e
RW
16944if ac_fn_c_try_link "$LINENO"; then :
16945 ac_cv_lib_dld_shl_load=yes
da0f6381 16946else
5213506e 16947 ac_cv_lib_dld_shl_load=no
da0f6381 16948fi
5213506e
RW
16949rm -f core conftest.err conftest.$ac_objext \
16950 conftest$ac_exeext conftest.$ac_ext
16951LIBS=$ac_check_lib_save_LIBS
da0f6381 16952fi
5213506e
RW
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
16954$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
16955if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
16956 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
16957else
16958 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16959if test "x$ac_cv_func_dlopen" = x""yes; then :
da0f6381
PB
16960 lt_cv_dlopen="dlopen"
16961else
5213506e
RW
16962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16963$as_echo_n "checking for dlopen in -ldl... " >&6; }
16964if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16965 $as_echo_n "(cached) " >&6
da0f6381
PB
16966else
16967 ac_check_lib_save_LIBS=$LIBS
16968LIBS="-ldl $LIBS"
5213506e 16969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16970/* end confdefs.h. */
16971
5213506e
RW
16972/* Override any GCC internal prototype to avoid an error.
16973 Use char because int might match the return type of a GCC
16974 builtin and then its argument prototype would still apply. */
da0f6381
PB
16975#ifdef __cplusplus
16976extern "C"
16977#endif
da0f6381
PB
16978char dlopen ();
16979int
16980main ()
16981{
5213506e 16982return dlopen ();
da0f6381
PB
16983 ;
16984 return 0;
16985}
16986_ACEOF
5213506e 16987if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
16988 ac_cv_lib_dl_dlopen=yes
16989else
5213506e 16990 ac_cv_lib_dl_dlopen=no
da0f6381 16991fi
5213506e
RW
16992rm -f core conftest.err conftest.$ac_objext \
16993 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
16994LIBS=$ac_check_lib_save_LIBS
16995fi
5213506e
RW
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16997$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16998if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
da0f6381
PB
16999 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
17000else
5213506e
RW
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
17002$as_echo_n "checking for dlopen in -lsvld... " >&6; }
17003if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
17004 $as_echo_n "(cached) " >&6
da0f6381
PB
17005else
17006 ac_check_lib_save_LIBS=$LIBS
17007LIBS="-lsvld $LIBS"
5213506e 17008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17009/* end confdefs.h. */
17010
5213506e
RW
17011/* Override any GCC internal prototype to avoid an error.
17012 Use char because int might match the return type of a GCC
17013 builtin and then its argument prototype would still apply. */
da0f6381
PB
17014#ifdef __cplusplus
17015extern "C"
17016#endif
da0f6381
PB
17017char dlopen ();
17018int
17019main ()
17020{
5213506e 17021return dlopen ();
da0f6381
PB
17022 ;
17023 return 0;
17024}
17025_ACEOF
5213506e 17026if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
17027 ac_cv_lib_svld_dlopen=yes
17028else
5213506e 17029 ac_cv_lib_svld_dlopen=no
da0f6381 17030fi
5213506e
RW
17031rm -f core conftest.err conftest.$ac_objext \
17032 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17033LIBS=$ac_check_lib_save_LIBS
17034fi
5213506e
RW
17035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
17036$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
17037if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
da0f6381
PB
17038 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
17039else
5213506e
RW
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
17041$as_echo_n "checking for dld_link in -ldld... " >&6; }
17042if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
17043 $as_echo_n "(cached) " >&6
da0f6381
PB
17044else
17045 ac_check_lib_save_LIBS=$LIBS
17046LIBS="-ldld $LIBS"
5213506e 17047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17048/* end confdefs.h. */
17049
5213506e
RW
17050/* Override any GCC internal prototype to avoid an error.
17051 Use char because int might match the return type of a GCC
17052 builtin and then its argument prototype would still apply. */
da0f6381
PB
17053#ifdef __cplusplus
17054extern "C"
17055#endif
da0f6381
PB
17056char dld_link ();
17057int
17058main ()
17059{
5213506e 17060return dld_link ();
00020c16
ILT
17061 ;
17062 return 0;
17063}
17064_ACEOF
5213506e 17065if ac_fn_c_try_link "$LINENO"; then :
00020c16
ILT
17066 ac_cv_lib_dld_dld_link=yes
17067else
5213506e 17068 ac_cv_lib_dld_dld_link=no
00020c16 17069fi
5213506e
RW
17070rm -f core conftest.err conftest.$ac_objext \
17071 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17072LIBS=$ac_check_lib_save_LIBS
17073fi
5213506e
RW
17074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
17075$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
17076if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
00020c16
ILT
17077 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
17078fi
17079
17080
17081fi
17082
17083
17084fi
17085
17086
17087fi
17088
17089
17090fi
17091
17092
17093fi
17094
17095 ;;
17096 esac
17097
17098 if test "x$lt_cv_dlopen" != xno; then
17099 enable_dlopen=yes
17100 else
17101 enable_dlopen=no
17102 fi
17103
17104 case $lt_cv_dlopen in
17105 dlopen)
17106 save_CPPFLAGS="$CPPFLAGS"
17107 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
17108
17109 save_LDFLAGS="$LDFLAGS"
17110 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
17111
17112 save_LIBS="$LIBS"
17113 LIBS="$lt_cv_dlopen_libs $LIBS"
17114
5213506e
RW
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
17116$as_echo_n "checking whether a program can dlopen itself... " >&6; }
17117if test "${lt_cv_dlopen_self+set}" = set; then :
17118 $as_echo_n "(cached) " >&6
00020c16
ILT
17119else
17120 if test "$cross_compiling" = yes; then :
17121 lt_cv_dlopen_self=cross
17122else
17123 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17124 lt_status=$lt_dlunknown
17125 cat > conftest.$ac_ext <<_LT_EOF
de6ba7ae 17126#line 17126 "configure"
00020c16
ILT
17127#include "confdefs.h"
17128
17129#if HAVE_DLFCN_H
17130#include <dlfcn.h>
17131#endif
17132
17133#include <stdio.h>
17134
17135#ifdef RTLD_GLOBAL
17136# define LT_DLGLOBAL RTLD_GLOBAL
17137#else
17138# ifdef DL_GLOBAL
17139# define LT_DLGLOBAL DL_GLOBAL
17140# else
17141# define LT_DLGLOBAL 0
17142# endif
17143#endif
17144
17145/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17146 find out it does not work in some platform. */
17147#ifndef LT_DLLAZY_OR_NOW
17148# ifdef RTLD_LAZY
17149# define LT_DLLAZY_OR_NOW RTLD_LAZY
17150# else
17151# ifdef DL_LAZY
17152# define LT_DLLAZY_OR_NOW DL_LAZY
17153# else
17154# ifdef RTLD_NOW
17155# define LT_DLLAZY_OR_NOW RTLD_NOW
17156# else
17157# ifdef DL_NOW
17158# define LT_DLLAZY_OR_NOW DL_NOW
17159# else
17160# define LT_DLLAZY_OR_NOW 0
17161# endif
17162# endif
17163# endif
17164# endif
17165#endif
17166
43e02a8a
RW
17167/* When -fvisbility=hidden is used, assume the code has been annotated
17168 correspondingly for the symbols needed. */
17169#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17170void fnord () __attribute__((visibility("default")));
17171#endif
17172
17173void fnord () { int i=42; }
00020c16
ILT
17174int main ()
17175{
17176 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17177 int status = $lt_dlunknown;
17178
17179 if (self)
17180 {
17181 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17182 else
17183 {
17184 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17185 else puts (dlerror ());
17186 }
00020c16
ILT
17187 /* dlclose (self); */
17188 }
17189 else
17190 puts (dlerror ());
17191
17192 return status;
17193}
17194_LT_EOF
5213506e 17195 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17196 (eval $ac_link) 2>&5
17197 ac_status=$?
5213506e
RW
17198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17199 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17200 (./conftest; exit; ) >&5 2>/dev/null
17201 lt_status=$?
17202 case x$lt_status in
17203 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
17204 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
17205 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
17206 esac
17207 else :
17208 # compilation failed
17209 lt_cv_dlopen_self=no
17210 fi
17211fi
17212rm -fr conftest*
17213
17214
17215fi
5213506e
RW
17216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
17217$as_echo "$lt_cv_dlopen_self" >&6; }
00020c16
ILT
17218
17219 if test "x$lt_cv_dlopen_self" = xyes; then
17220 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5213506e
RW
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
17222$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
17223if test "${lt_cv_dlopen_self_static+set}" = set; then :
17224 $as_echo_n "(cached) " >&6
00020c16
ILT
17225else
17226 if test "$cross_compiling" = yes; then :
17227 lt_cv_dlopen_self_static=cross
17228else
17229 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17230 lt_status=$lt_dlunknown
17231 cat > conftest.$ac_ext <<_LT_EOF
de6ba7ae 17232#line 17232 "configure"
00020c16
ILT
17233#include "confdefs.h"
17234
17235#if HAVE_DLFCN_H
17236#include <dlfcn.h>
17237#endif
17238
17239#include <stdio.h>
17240
17241#ifdef RTLD_GLOBAL
17242# define LT_DLGLOBAL RTLD_GLOBAL
17243#else
17244# ifdef DL_GLOBAL
17245# define LT_DLGLOBAL DL_GLOBAL
17246# else
17247# define LT_DLGLOBAL 0
17248# endif
17249#endif
17250
17251/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17252 find out it does not work in some platform. */
17253#ifndef LT_DLLAZY_OR_NOW
17254# ifdef RTLD_LAZY
17255# define LT_DLLAZY_OR_NOW RTLD_LAZY
17256# else
17257# ifdef DL_LAZY
17258# define LT_DLLAZY_OR_NOW DL_LAZY
17259# else
17260# ifdef RTLD_NOW
17261# define LT_DLLAZY_OR_NOW RTLD_NOW
17262# else
17263# ifdef DL_NOW
17264# define LT_DLLAZY_OR_NOW DL_NOW
17265# else
17266# define LT_DLLAZY_OR_NOW 0
17267# endif
17268# endif
17269# endif
17270# endif
17271#endif
17272
43e02a8a
RW
17273/* When -fvisbility=hidden is used, assume the code has been annotated
17274 correspondingly for the symbols needed. */
17275#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17276void fnord () __attribute__((visibility("default")));
17277#endif
17278
17279void fnord () { int i=42; }
00020c16
ILT
17280int main ()
17281{
17282 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17283 int status = $lt_dlunknown;
17284
17285 if (self)
17286 {
17287 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17288 else
17289 {
17290 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17291 else puts (dlerror ());
17292 }
00020c16
ILT
17293 /* dlclose (self); */
17294 }
17295 else
17296 puts (dlerror ());
17297
17298 return status;
17299}
17300_LT_EOF
5213506e 17301 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17302 (eval $ac_link) 2>&5
17303 ac_status=$?
5213506e
RW
17304 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17305 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17306 (./conftest; exit; ) >&5 2>/dev/null
17307 lt_status=$?
17308 case x$lt_status in
17309 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
17310 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
17311 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
17312 esac
17313 else :
17314 # compilation failed
17315 lt_cv_dlopen_self_static=no
17316 fi
17317fi
17318rm -fr conftest*
17319
17320
17321fi
5213506e
RW
17322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
17323$as_echo "$lt_cv_dlopen_self_static" >&6; }
00020c16
ILT
17324 fi
17325
17326 CPPFLAGS="$save_CPPFLAGS"
17327 LDFLAGS="$save_LDFLAGS"
17328 LIBS="$save_LIBS"
17329 ;;
17330 esac
17331
17332 case $lt_cv_dlopen_self in
17333 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
17334 *) enable_dlopen_self=unknown ;;
17335 esac
17336
17337 case $lt_cv_dlopen_self_static in
17338 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
17339 *) enable_dlopen_self_static=unknown ;;
17340 esac
17341fi
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359striplib=
17360old_striplib=
5213506e
RW
17361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
17362$as_echo_n "checking whether stripping libraries is possible... " >&6; }
00020c16
ILT
17363if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
17364 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17365 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5213506e
RW
17366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17367$as_echo "yes" >&6; }
00020c16
ILT
17368else
17369# FIXME - insert some real tests, host_os isn't really good enough
17370 case $host_os in
17371 darwin*)
17372 if test -n "$STRIP" ; then
17373 striplib="$STRIP -x"
17374 old_striplib="$STRIP -S"
5213506e
RW
17375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17376$as_echo "yes" >&6; }
00020c16 17377 else
5213506e
RW
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17379$as_echo "no" >&6; }
00020c16
ILT
17380 fi
17381 ;;
17382 *)
5213506e
RW
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17384$as_echo "no" >&6; }
00020c16
ILT
17385 ;;
17386 esac
17387fi
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400 # Report which library types will actually be built
5213506e
RW
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
17402$as_echo_n "checking if libtool supports shared libraries... " >&6; }
17403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
17404$as_echo "$can_build_shared" >&6; }
00020c16 17405
5213506e
RW
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
17407$as_echo_n "checking whether to build shared libraries... " >&6; }
00020c16
ILT
17408 test "$can_build_shared" = "no" && enable_shared=no
17409
17410 # On AIX, shared libraries and static libraries use the same namespace, and
17411 # are all built from PIC.
17412 case $host_os in
17413 aix3*)
17414 test "$enable_shared" = yes && enable_static=no
17415 if test -n "$RANLIB"; then
17416 archive_cmds="$archive_cmds~\$RANLIB \$lib"
17417 postinstall_cmds='$RANLIB $lib'
17418 fi
17419 ;;
17420
17421 aix[4-9]*)
17422 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
17423 test "$enable_shared" = yes && enable_static=no
17424 fi
17425 ;;
17426 esac
5213506e
RW
17427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
17428$as_echo "$enable_shared" >&6; }
00020c16 17429
5213506e
RW
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
17431$as_echo_n "checking whether to build static libraries... " >&6; }
00020c16
ILT
17432 # Make sure either enable_shared or enable_static is yes.
17433 test "$enable_shared" = yes || enable_static=yes
5213506e
RW
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
17435$as_echo "$enable_static" >&6; }
00020c16
ILT
17436
17437
17438
17439
17440fi
17441ac_ext=c
17442ac_cpp='$CPP $CPPFLAGS'
17443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17445ac_compiler_gnu=$ac_cv_c_compiler_gnu
17446
17447CC="$lt_save_CC"
17448
43e02a8a
RW
17449 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
17450 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
17451 (test "X$CXX" != "Xg++"))) ; then
17452 ac_ext=cpp
17453ac_cpp='$CXXCPP $CPPFLAGS'
17454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
17458$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
17459if test -z "$CXXCPP"; then
17460 if test "${ac_cv_prog_CXXCPP+set}" = set; then :
17461 $as_echo_n "(cached) " >&6
17462else
17463 # Double quotes because CXXCPP needs to be expanded
17464 for CXXCPP in "$CXX -E" "/lib/cpp"
17465 do
17466 ac_preproc_ok=false
17467for ac_cxx_preproc_warn_flag in '' yes
17468do
17469 # Use a header file that comes with gcc, so configuring glibc
17470 # with a fresh cross-compiler works.
17471 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17472 # <limits.h> exists even on freestanding compilers.
17473 # On the NeXT, cc -E runs the code through the compiler's parser,
17474 # not just through cpp. "Syntax error" is here to catch this case.
17475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17476/* end confdefs.h. */
17477#ifdef __STDC__
17478# include <limits.h>
17479#else
17480# include <assert.h>
17481#endif
17482 Syntax error
17483_ACEOF
17484if ac_fn_cxx_try_cpp "$LINENO"; then :
17485
17486else
17487 # Broken: fails on valid input.
17488continue
17489fi
17490rm -f conftest.err conftest.$ac_ext
17491
17492 # OK, works on sane cases. Now check whether nonexistent headers
17493 # can be detected and how.
17494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17495/* end confdefs.h. */
17496#include <ac_nonexistent.h>
17497_ACEOF
17498if ac_fn_cxx_try_cpp "$LINENO"; then :
17499 # Broken: success on invalid input.
17500continue
17501else
17502 # Passes both tests.
17503ac_preproc_ok=:
17504break
17505fi
17506rm -f conftest.err conftest.$ac_ext
17507
17508done
17509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17510rm -f conftest.err conftest.$ac_ext
17511if $ac_preproc_ok; then :
17512 break
17513fi
17514
17515 done
17516 ac_cv_prog_CXXCPP=$CXXCPP
17517
17518fi
17519 CXXCPP=$ac_cv_prog_CXXCPP
17520else
17521 ac_cv_prog_CXXCPP=$CXXCPP
17522fi
17523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
17524$as_echo "$CXXCPP" >&6; }
17525ac_preproc_ok=false
17526for ac_cxx_preproc_warn_flag in '' yes
17527do
17528 # Use a header file that comes with gcc, so configuring glibc
17529 # with a fresh cross-compiler works.
17530 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17531 # <limits.h> exists even on freestanding compilers.
17532 # On the NeXT, cc -E runs the code through the compiler's parser,
17533 # not just through cpp. "Syntax error" is here to catch this case.
17534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17535/* end confdefs.h. */
17536#ifdef __STDC__
17537# include <limits.h>
17538#else
17539# include <assert.h>
17540#endif
17541 Syntax error
17542_ACEOF
17543if ac_fn_cxx_try_cpp "$LINENO"; then :
17544
17545else
17546 # Broken: fails on valid input.
17547continue
17548fi
17549rm -f conftest.err conftest.$ac_ext
17550
17551 # OK, works on sane cases. Now check whether nonexistent headers
17552 # can be detected and how.
17553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17554/* end confdefs.h. */
17555#include <ac_nonexistent.h>
17556_ACEOF
17557if ac_fn_cxx_try_cpp "$LINENO"; then :
17558 # Broken: success on invalid input.
17559continue
17560else
17561 # Passes both tests.
17562ac_preproc_ok=:
17563break
17564fi
17565rm -f conftest.err conftest.$ac_ext
17566
17567done
17568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17569rm -f conftest.err conftest.$ac_ext
17570if $ac_preproc_ok; then :
17571
17572else
17573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17575as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
17576See \`config.log' for more details." "$LINENO" 5; }
17577fi
17578
17579ac_ext=c
17580ac_cpp='$CPP $CPPFLAGS'
17581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17583ac_compiler_gnu=$ac_cv_c_compiler_gnu
17584
17585else
17586 _lt_caught_CXX_error=yes
17587fi
00020c16 17588
5213506e 17589ac_ext=cpp
00020c16
ILT
17590ac_cpp='$CXXCPP $CPPFLAGS'
17591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17594
17595archive_cmds_need_lc_CXX=no
17596allow_undefined_flag_CXX=
17597always_export_symbols_CXX=no
17598archive_expsym_cmds_CXX=
17599compiler_needs_object_CXX=no
17600export_dynamic_flag_spec_CXX=
17601hardcode_direct_CXX=no
17602hardcode_direct_absolute_CXX=no
17603hardcode_libdir_flag_spec_CXX=
17604hardcode_libdir_flag_spec_ld_CXX=
17605hardcode_libdir_separator_CXX=
17606hardcode_minus_L_CXX=no
17607hardcode_shlibpath_var_CXX=unsupported
17608hardcode_automatic_CXX=no
17609inherit_rpath_CXX=no
17610module_cmds_CXX=
17611module_expsym_cmds_CXX=
17612link_all_deplibs_CXX=unknown
17613old_archive_cmds_CXX=$old_archive_cmds
43e02a8a
RW
17614reload_flag_CXX=$reload_flag
17615reload_cmds_CXX=$reload_cmds
00020c16
ILT
17616no_undefined_flag_CXX=
17617whole_archive_flag_spec_CXX=
17618enable_shared_with_static_runtimes_CXX=no
17619
17620# Source file extension for C++ test sources.
17621ac_ext=cpp
17622
17623# Object file extension for compiled C++ test sources.
17624objext=o
17625objext_CXX=$objext
17626
17627# No sense in running all these tests if we already determined that
17628# the CXX compiler isn't working. Some variables (like enable_shared)
17629# are currently assumed to apply to all compilers on this platform,
17630# and will be corrupted by setting them based on a non-working compiler.
17631if test "$_lt_caught_CXX_error" != yes; then
17632 # Code to be used in simple compile tests
17633 lt_simple_compile_test_code="int some_variable = 0;"
17634
17635 # Code to be used in simple link tests
17636 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
17637
17638 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
17639
17640
17641
17642
17643
17644
17645# If no C compiler was specified, use CC.
17646LTCC=${LTCC-"$CC"}
17647
17648# If no C compiler flags were specified, use CFLAGS.
17649LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17650
17651# Allow CC to be a program name with arguments.
17652compiler=$CC
17653
17654
17655 # save warnings/boilerplate of simple test code
17656 ac_outfile=conftest.$ac_objext
17657echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17658eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17659_lt_compiler_boilerplate=`cat conftest.err`
17660$RM conftest*
17661
17662 ac_outfile=conftest.$ac_objext
17663echo "$lt_simple_link_test_code" >conftest.$ac_ext
17664eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17665_lt_linker_boilerplate=`cat conftest.err`
17666$RM -r conftest*
17667
17668
17669 # Allow CC to be a program name with arguments.
17670 lt_save_CC=$CC
17671 lt_save_LD=$LD
17672 lt_save_GCC=$GCC
17673 GCC=$GXX
17674 lt_save_with_gnu_ld=$with_gnu_ld
17675 lt_save_path_LD=$lt_cv_path_LD
17676 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
17677 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
17678 else
17679 $as_unset lt_cv_prog_gnu_ld
17680 fi
17681 if test -n "${lt_cv_path_LDCXX+set}"; then
17682 lt_cv_path_LD=$lt_cv_path_LDCXX
17683 else
17684 $as_unset lt_cv_path_LD
17685 fi
17686 test -z "${LDCXX+set}" || LD=$LDCXX
17687 CC=${CXX-"c++"}
17688 compiler=$CC
17689 compiler_CXX=$CC
17690 for cc_temp in $compiler""; do
17691 case $cc_temp in
17692 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17693 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17694 \-*) ;;
17695 *) break;;
17696 esac
17697done
43e02a8a 17698cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
00020c16
ILT
17699
17700
17701 if test -n "$compiler"; then
17702 # We don't want -fno-exception when compiling C++ code, so set the
17703 # no_builtin_flag separately
17704 if test "$GXX" = yes; then
17705 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
17706 else
17707 lt_prog_compiler_no_builtin_flag_CXX=
17708 fi
17709
17710 if test "$GXX" = yes; then
17711 # Set up default GNU C++ configuration
17712
17713
17714
5213506e
RW
17715# Check whether --with-gnu-ld was given.
17716if test "${with_gnu_ld+set}" = set; then :
17717 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
00020c16
ILT
17718else
17719 with_gnu_ld=no
5213506e
RW
17720fi
17721
00020c16
ILT
17722ac_prog=ld
17723if test "$GCC" = yes; then
17724 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17726$as_echo_n "checking for ld used by $CC... " >&6; }
00020c16
ILT
17727 case $host in
17728 *-*-mingw*)
17729 # gcc leaves a trailing carriage return which upsets mingw
17730 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17731 *)
17732 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17733 esac
17734 case $ac_prog in
17735 # Accept absolute paths.
17736 [\\/]* | ?:[\\/]*)
17737 re_direlt='/[^/][^/]*/\.\./'
17738 # Canonicalize the pathname of ld
17739 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17740 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17741 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17742 done
17743 test -z "$LD" && LD="$ac_prog"
17744 ;;
17745 "")
17746 # If it fails, then pretend we aren't using GCC.
17747 ac_prog=ld
17748 ;;
17749 *)
17750 # If it is relative, then search for the first ld in PATH.
17751 with_gnu_ld=unknown
17752 ;;
17753 esac
17754elif test "$with_gnu_ld" = yes; then
5213506e
RW
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17756$as_echo_n "checking for GNU ld... " >&6; }
00020c16 17757else
5213506e
RW
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17759$as_echo_n "checking for non-GNU ld... " >&6; }
00020c16 17760fi
5213506e
RW
17761if test "${lt_cv_path_LD+set}" = set; then :
17762 $as_echo_n "(cached) " >&6
00020c16
ILT
17763else
17764 if test -z "$LD"; then
17765 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17766 for ac_dir in $PATH; do
17767 IFS="$lt_save_ifs"
17768 test -z "$ac_dir" && ac_dir=.
17769 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17770 lt_cv_path_LD="$ac_dir/$ac_prog"
17771 # Check to see if the program is GNU ld. I'd rather use --version,
17772 # but apparently some variants of GNU ld only accept -v.
17773 # Break only if it was the GNU/non-GNU ld that we prefer.
17774 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17775 *GNU* | *'with BFD'*)
17776 test "$with_gnu_ld" != no && break
17777 ;;
17778 *)
17779 test "$with_gnu_ld" != yes && break
17780 ;;
17781 esac
17782 fi
17783 done
17784 IFS="$lt_save_ifs"
17785else
17786 lt_cv_path_LD="$LD" # Let the user override the test with a path.
17787fi
17788fi
17789
17790LD="$lt_cv_path_LD"
17791if test -n "$LD"; then
5213506e
RW
17792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17793$as_echo "$LD" >&6; }
00020c16 17794else
5213506e
RW
17795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796$as_echo "no" >&6; }
00020c16 17797fi
5213506e
RW
17798test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
17799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17800$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17801if test "${lt_cv_prog_gnu_ld+set}" = set; then :
17802 $as_echo_n "(cached) " >&6
00020c16
ILT
17803else
17804 # I'd rather use --version here, but apparently some GNU lds only accept -v.
17805case `$LD -v 2>&1 </dev/null` in
17806*GNU* | *'with BFD'*)
17807 lt_cv_prog_gnu_ld=yes
17808 ;;
17809*)
17810 lt_cv_prog_gnu_ld=no
17811 ;;
17812esac
17813fi
5213506e
RW
17814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17815$as_echo "$lt_cv_prog_gnu_ld" >&6; }
00020c16
ILT
17816with_gnu_ld=$lt_cv_prog_gnu_ld
17817
17818
17819
17820
17821
17822
17823
17824 # Check if GNU C++ uses GNU ld as the underlying linker, since the
17825 # archiving commands below assume that GNU ld is being used.
17826 if test "$with_gnu_ld" = yes; then
17827 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
17828 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'
17829
17830 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
17831 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
17832
17833 # If archive_cmds runs LD, not CC, wlarc should be empty
17834 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
17835 # investigate it a little bit more. (MM)
17836 wlarc='${wl}'
17837
17838 # ancient GNU ld didn't support --whole-archive et. al.
17839 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
17840 $GREP 'no-whole-archive' > /dev/null; then
17841 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17842 else
17843 whole_archive_flag_spec_CXX=
17844 fi
17845 else
17846 with_gnu_ld=no
17847 wlarc=
17848
17849 # A generic and very simple default shared library creation
17850 # command for GNU C++ for the case where it uses the native
17851 # linker, instead of GNU ld. If possible, this setting should
17852 # overridden to take advantage of the native linker features on
17853 # the platform it is being used on.
17854 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17855 fi
17856
17857 # Commands to make compiler produce verbose output that lists
17858 # what "hidden" libraries, object files and flags are used when
17859 # linking a shared library.
43e02a8a 17860 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
17861
17862 else
17863 GXX=no
17864 with_gnu_ld=no
17865 wlarc=
17866 fi
17867
17868 # PORTME: fill in a description of your system's C++ link characteristics
5213506e
RW
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17870$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
17871 ld_shlibs_CXX=yes
17872 case $host_os in
17873 aix3*)
17874 # FIXME: insert proper C++ library support
17875 ld_shlibs_CXX=no
17876 ;;
17877 aix[4-9]*)
17878 if test "$host_cpu" = ia64; then
17879 # On IA64, the linker does run time linking by default, so we don't
17880 # have to do anything special.
17881 aix_use_runtimelinking=no
17882 exp_sym_flag='-Bexport'
17883 no_entry_flag=""
17884 else
17885 aix_use_runtimelinking=no
17886
17887 # Test if we are trying to use run time linking or normal
17888 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17889 # need to do runtime linking.
17890 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17891 for ld_flag in $LDFLAGS; do
17892 case $ld_flag in
17893 *-brtl*)
17894 aix_use_runtimelinking=yes
17895 break
17896 ;;
17897 esac
17898 done
17899 ;;
17900 esac
17901
17902 exp_sym_flag='-bexport'
17903 no_entry_flag='-bnoentry'
17904 fi
17905
17906 # When large executables or shared objects are built, AIX ld can
17907 # have problems creating the table of contents. If linking a library
17908 # or program results in "error TOC overflow" add -mminimal-toc to
17909 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17910 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17911
17912 archive_cmds_CXX=''
17913 hardcode_direct_CXX=yes
17914 hardcode_direct_absolute_CXX=yes
17915 hardcode_libdir_separator_CXX=':'
17916 link_all_deplibs_CXX=yes
17917 file_list_spec_CXX='${wl}-f,'
17918
17919 if test "$GXX" = yes; then
17920 case $host_os in aix4.[012]|aix4.[012].*)
17921 # We only want to do this on AIX 4.2 and lower, the check
17922 # below for broken collect2 doesn't work under 4.3+
17923 collect2name=`${CC} -print-prog-name=collect2`
17924 if test -f "$collect2name" &&
17925 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17926 then
17927 # We have reworked collect2
17928 :
17929 else
17930 # We have old collect2
17931 hardcode_direct_CXX=unsupported
17932 # It fails to find uninstalled libraries when the uninstalled
17933 # path is not listed in the libpath. Setting hardcode_minus_L
17934 # to unsupported forces relinking
17935 hardcode_minus_L_CXX=yes
17936 hardcode_libdir_flag_spec_CXX='-L$libdir'
17937 hardcode_libdir_separator_CXX=
17938 fi
17939 esac
17940 shared_flag='-shared'
17941 if test "$aix_use_runtimelinking" = yes; then
17942 shared_flag="$shared_flag "'${wl}-G'
17943 fi
17944 else
17945 # not using gcc
17946 if test "$host_cpu" = ia64; then
17947 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17948 # chokes on -Wl,-G. The following line is correct:
17949 shared_flag='-G'
17950 else
17951 if test "$aix_use_runtimelinking" = yes; then
17952 shared_flag='${wl}-G'
17953 else
17954 shared_flag='${wl}-bM:SRE'
17955 fi
17956 fi
17957 fi
17958
17959 export_dynamic_flag_spec_CXX='${wl}-bexpall'
17960 # It seems that -bexpall does not export symbols beginning with
17961 # underscore (_), so it is better to generate a list of symbols to
17962 # export.
17963 always_export_symbols_CXX=yes
17964 if test "$aix_use_runtimelinking" = yes; then
17965 # Warning - without using the other runtime loading flags (-brtl),
17966 # -berok will link without error, but may produce a broken library.
17967 allow_undefined_flag_CXX='-berok'
17968 # Determine the default libpath from the value encoded in an empty
17969 # executable.
5213506e 17970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
17971/* end confdefs.h. */
17972
17973int
17974main ()
17975{
17976
17977 ;
17978 return 0;
17979}
17980_ACEOF
5213506e 17981if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
17982
17983lt_aix_libpath_sed='
17984 /Import File Strings/,/^$/ {
17985 /^0/ {
17986 s/^0 *\(.*\)$/\1/
17987 p
17988 }
17989 }'
17990aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17991# Check for a 64-bit object if we didn't find anything.
17992if test -z "$aix_libpath"; then
17993 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17994fi
00020c16 17995fi
5213506e
RW
17996rm -f core conftest.err conftest.$ac_objext \
17997 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17998if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17999
18000 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18001
43e02a8a 18002 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
18003 else
18004 if test "$host_cpu" = ia64; then
18005 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
18006 allow_undefined_flag_CXX="-z nodefs"
18007 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"
18008 else
18009 # Determine the default libpath from the value encoded in an
18010 # empty executable.
5213506e 18011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
18012/* end confdefs.h. */
18013
18014int
18015main ()
18016{
18017
18018 ;
18019 return 0;
18020}
18021_ACEOF
5213506e 18022if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
18023
18024lt_aix_libpath_sed='
18025 /Import File Strings/,/^$/ {
18026 /^0/ {
18027 s/^0 *\(.*\)$/\1/
18028 p
18029 }
18030 }'
18031aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18032# Check for a 64-bit object if we didn't find anything.
18033if test -z "$aix_libpath"; then
18034 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18035fi
00020c16 18036fi
5213506e
RW
18037rm -f core conftest.err conftest.$ac_objext \
18038 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18039if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18040
18041 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18042 # Warning - without using the other run time loading flags,
18043 # -berok will link without error, but may produce a broken library.
18044 no_undefined_flag_CXX=' ${wl}-bernotok'
18045 allow_undefined_flag_CXX=' ${wl}-berok'
43e02a8a
RW
18046 if test "$with_gnu_ld" = yes; then
18047 # We only use this code for GNU lds that support --whole-archive.
18048 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18049 else
18050 # Exported symbols can be pulled into shared objects from archives
18051 whole_archive_flag_spec_CXX='$convenience'
18052 fi
00020c16
ILT
18053 archive_cmds_need_lc_CXX=yes
18054 # This is similar to how AIX traditionally builds its shared
18055 # libraries.
18056 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'
18057 fi
18058 fi
18059 ;;
18060
18061 beos*)
18062 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18063 allow_undefined_flag_CXX=unsupported
18064 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
18065 # support --undefined. This deserves some investigation. FIXME
18066 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18067 else
18068 ld_shlibs_CXX=no
18069 fi
18070 ;;
18071
18072 chorus*)
18073 case $cc_basename in
18074 *)
18075 # FIXME: insert proper C++ library support
18076 ld_shlibs_CXX=no
18077 ;;
18078 esac
18079 ;;
18080
18081 cygwin* | mingw* | pw32* | cegcc*)
18082 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
18083 # as there is no search path for DLLs.
18084 hardcode_libdir_flag_spec_CXX='-L$libdir'
43e02a8a 18085 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
00020c16
ILT
18086 allow_undefined_flag_CXX=unsupported
18087 always_export_symbols_CXX=no
18088 enable_shared_with_static_runtimes_CXX=yes
18089
18090 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
18091 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'
18092 # If the export-symbols file already is a .def file (1st line
18093 # is EXPORTS), use it as is; otherwise, prepend...
18094 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
18095 cp $export_symbols $output_objdir/$soname.def;
18096 else
18097 echo EXPORTS > $output_objdir/$soname.def;
18098 cat $export_symbols >> $output_objdir/$soname.def;
18099 fi~
18100 $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'
18101 else
18102 ld_shlibs_CXX=no
18103 fi
18104 ;;
18105 darwin* | rhapsody*)
18106
18107
18108 archive_cmds_need_lc_CXX=no
18109 hardcode_direct_CXX=no
18110 hardcode_automatic_CXX=yes
18111 hardcode_shlibpath_var_CXX=unsupported
43e02a8a
RW
18112 if test "$lt_cv_ld_force_load" = "yes"; then
18113 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\"`'
18114 else
18115 whole_archive_flag_spec_CXX=''
18116 fi
00020c16
ILT
18117 link_all_deplibs_CXX=yes
18118 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
18119 case $cc_basename in
18120 ifort*) _lt_dar_can_shared=yes ;;
18121 *) _lt_dar_can_shared=$GCC ;;
18122 esac
18123 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 18124 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18125 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}"
18126 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
18127 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}"
18128 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}"
18129 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
18130 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}"
18131 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}"
18132 fi
18133
18134 else
18135 ld_shlibs_CXX=no
18136 fi
18137
18138 ;;
18139
18140 dgux*)
18141 case $cc_basename in
18142 ec++*)
18143 # FIXME: insert proper C++ library support
18144 ld_shlibs_CXX=no
18145 ;;
18146 ghcx*)
18147 # Green Hills C++ Compiler
18148 # FIXME: insert proper C++ library support
18149 ld_shlibs_CXX=no
18150 ;;
18151 *)
18152 # FIXME: insert proper C++ library support
18153 ld_shlibs_CXX=no
18154 ;;
18155 esac
18156 ;;
18157
18158 freebsd[12]*)
18159 # C++ shared libraries reported to be fairly broken before
18160 # switch to ELF
18161 ld_shlibs_CXX=no
18162 ;;
18163
18164 freebsd-elf*)
18165 archive_cmds_need_lc_CXX=no
18166 ;;
18167
18168 freebsd* | dragonfly*)
18169 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
18170 # conventions
18171 ld_shlibs_CXX=yes
18172 ;;
18173
18174 gnu*)
18175 ;;
18176
43e02a8a
RW
18177 haiku*)
18178 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18179 link_all_deplibs_CXX=yes
18180 ;;
18181
00020c16
ILT
18182 hpux9*)
18183 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18184 hardcode_libdir_separator_CXX=:
18185 export_dynamic_flag_spec_CXX='${wl}-E'
18186 hardcode_direct_CXX=yes
18187 hardcode_minus_L_CXX=yes # Not in the search PATH,
18188 # but as the default
18189 # location of the library.
18190
18191 case $cc_basename in
18192 CC*)
18193 # FIXME: insert proper C++ library support
18194 ld_shlibs_CXX=no
18195 ;;
18196 aCC*)
18197 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'
18198 # Commands to make compiler produce verbose output that lists
18199 # what "hidden" libraries, object files and flags are used when
18200 # linking a shared library.
18201 #
18202 # There doesn't appear to be a way to prevent this compiler from
18203 # explicitly linking system object files so we need to strip them
18204 # from the output so that they don't get included in the library
18205 # dependencies.
43e02a8a 18206 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
18207 ;;
18208 *)
18209 if test "$GXX" = yes; then
18210 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'
18211 else
18212 # FIXME: insert proper C++ library support
18213 ld_shlibs_CXX=no
18214 fi
18215 ;;
18216 esac
18217 ;;
18218
18219 hpux10*|hpux11*)
18220 if test $with_gnu_ld = no; then
18221 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18222 hardcode_libdir_separator_CXX=:
18223
18224 case $host_cpu in
18225 hppa*64*|ia64*)
18226 ;;
18227 *)
18228 export_dynamic_flag_spec_CXX='${wl}-E'
18229 ;;
18230 esac
18231 fi
18232 case $host_cpu in
18233 hppa*64*|ia64*)
18234 hardcode_direct_CXX=no
18235 hardcode_shlibpath_var_CXX=no
18236 ;;
18237 *)
18238 hardcode_direct_CXX=yes
18239 hardcode_direct_absolute_CXX=yes
18240 hardcode_minus_L_CXX=yes # Not in the search PATH,
18241 # but as the default
18242 # location of the library.
18243 ;;
18244 esac
18245
18246 case $cc_basename in
18247 CC*)
18248 # FIXME: insert proper C++ library support
18249 ld_shlibs_CXX=no
18250 ;;
18251 aCC*)
18252 case $host_cpu in
18253 hppa*64*)
18254 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18255 ;;
18256 ia64*)
18257 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18258 ;;
18259 *)
18260 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18261 ;;
18262 esac
18263 # Commands to make compiler produce verbose output that lists
18264 # what "hidden" libraries, object files and flags are used when
18265 # linking a shared library.
18266 #
18267 # There doesn't appear to be a way to prevent this compiler from
18268 # explicitly linking system object files so we need to strip them
18269 # from the output so that they don't get included in the library
18270 # dependencies.
43e02a8a 18271 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
18272 ;;
18273 *)
18274 if test "$GXX" = yes; then
18275 if test $with_gnu_ld = no; then
18276 case $host_cpu in
18277 hppa*64*)
18278 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18279 ;;
18280 ia64*)
18281 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18282 ;;
18283 *)
18284 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'
18285 ;;
18286 esac
18287 fi
18288 else
18289 # FIXME: insert proper C++ library support
18290 ld_shlibs_CXX=no
18291 fi
18292 ;;
18293 esac
18294 ;;
18295
18296 interix[3-9]*)
18297 hardcode_direct_CXX=no
18298 hardcode_shlibpath_var_CXX=no
18299 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18300 export_dynamic_flag_spec_CXX='${wl}-E'
18301 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
18302 # Instead, shared libraries are loaded at an image base (0x10000000 by
18303 # default) and relocated if they conflict, which is a slow very memory
18304 # consuming and fragmenting process. To avoid this, we pick a random,
18305 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
18306 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
18307 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'
18308 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'
18309 ;;
18310 irix5* | irix6*)
18311 case $cc_basename in
18312 CC*)
18313 # SGI C++
43e02a8a 18314 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
18315
18316 # Archives containing C++ object files must be created using
18317 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
18318 # necessary to make sure instantiated templates are included
18319 # in the archive.
18320 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
18321 ;;
18322 *)
18323 if test "$GXX" = yes; then
18324 if test "$with_gnu_ld" = no; then
43e02a8a 18325 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 18326 else
43e02a8a 18327 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
18328 fi
18329 fi
18330 link_all_deplibs_CXX=yes
18331 ;;
18332 esac
18333 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18334 hardcode_libdir_separator_CXX=:
18335 inherit_rpath_CXX=yes
18336 ;;
18337
18338 linux* | k*bsd*-gnu | kopensolaris*-gnu)
18339 case $cc_basename in
18340 KCC*)
18341 # Kuck and Associates, Inc. (KAI) C++ Compiler
18342
18343 # KCC will only create a shared library if the output file
18344 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18345 # to its proper name (with version) after linking.
18346 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'
18347 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'
18348 # Commands to make compiler produce verbose output that lists
18349 # what "hidden" libraries, object files and flags are used when
18350 # linking a shared library.
18351 #
18352 # There doesn't appear to be a way to prevent this compiler from
18353 # explicitly linking system object files so we need to strip them
18354 # from the output so that they don't get included in the library
18355 # dependencies.
43e02a8a 18356 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
18357
18358 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18359 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18360
18361 # Archives containing C++ object files must be created using
18362 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
18363 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
18364 ;;
18365 icpc* | ecpc* )
18366 # Intel C++
18367 with_gnu_ld=yes
18368 # version 8.0 and above of icpc choke on multiply defined symbols
18369 # if we add $predep_objects and $postdep_objects, however 7.1 and
18370 # earlier do not add the objects themselves.
18371 case `$CC -V 2>&1` in
18372 *"Version 7."*)
18373 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18374 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'
18375 ;;
18376 *) # Version 8.0 or newer
18377 tmp_idyn=
18378 case $host_cpu in
18379 ia64*) tmp_idyn=' -i_dynamic';;
18380 esac
18381 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18382 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'
18383 ;;
18384 esac
18385 archive_cmds_need_lc_CXX=no
18386 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18387 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18388 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18389 ;;
18390 pgCC* | pgcpp*)
18391 # Portland Group C++ compiler
18392 case `$CC -V` in
43e02a8a 18393 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
00020c16
ILT
18394 prelink_cmds_CXX='tpldir=Template.dir~
18395 rm -rf $tpldir~
18396 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
18397 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
18398 old_archive_cmds_CXX='tpldir=Template.dir~
18399 rm -rf $tpldir~
18400 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
18401 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
18402 $RANLIB $oldlib'
18403 archive_cmds_CXX='tpldir=Template.dir~
18404 rm -rf $tpldir~
18405 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18406 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18407 archive_expsym_cmds_CXX='tpldir=Template.dir~
18408 rm -rf $tpldir~
18409 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18410 $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'
18411 ;;
43e02a8a 18412 *) # Version 6 and above use weak symbols
00020c16
ILT
18413 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18414 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'
18415 ;;
18416 esac
18417
18418 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
18419 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
43e02a8a 18420 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
18421 ;;
18422 cxx*)
18423 # Compaq C++
18424 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18425 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'
18426
18427 runpath_var=LD_RUN_PATH
18428 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18429 hardcode_libdir_separator_CXX=:
18430
18431 # Commands to make compiler produce verbose output that lists
18432 # what "hidden" libraries, object files and flags are used when
18433 # linking a shared library.
18434 #
18435 # There doesn't appear to be a way to prevent this compiler from
18436 # explicitly linking system object files so we need to strip them
18437 # from the output so that they don't get included in the library
18438 # dependencies.
43e02a8a 18439 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 18440 ;;
43e02a8a 18441 xl* | mpixl* | bgxl*)
00020c16
ILT
18442 # IBM XL 8.0 on PPC, with GNU ld
18443 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18444 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18445 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18446 if test "x$supports_anon_versioning" = xyes; then
18447 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
18448 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18449 echo "local: *; };" >> $output_objdir/$libname.ver~
18450 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
18451 fi
18452 ;;
18453 *)
18454 case `$CC -V 2>&1 | sed 5q` in
18455 *Sun\ C*)
18456 # Sun C++ 5.9
18457 no_undefined_flag_CXX=' -zdefs'
18458 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18459 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'
18460 hardcode_libdir_flag_spec_CXX='-R$libdir'
43e02a8a 18461 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
18462 compiler_needs_object_CXX=yes
18463
18464 # Not sure whether something based on
18465 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
18466 # would be better.
43e02a8a 18467 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18468
18469 # Archives containing C++ object files must be created using
18470 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18471 # necessary to make sure instantiated templates are included
18472 # in the archive.
18473 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18474 ;;
18475 esac
18476 ;;
18477 esac
18478 ;;
18479
18480 lynxos*)
18481 # FIXME: insert proper C++ library support
18482 ld_shlibs_CXX=no
18483 ;;
18484
18485 m88k*)
18486 # FIXME: insert proper C++ library support
18487 ld_shlibs_CXX=no
18488 ;;
18489
18490 mvs*)
18491 case $cc_basename in
18492 cxx*)
18493 # FIXME: insert proper C++ library support
18494 ld_shlibs_CXX=no
18495 ;;
18496 *)
18497 # FIXME: insert proper C++ library support
18498 ld_shlibs_CXX=no
18499 ;;
18500 esac
18501 ;;
18502
18503 netbsd*)
18504 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18505 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
18506 wlarc=
18507 hardcode_libdir_flag_spec_CXX='-R$libdir'
18508 hardcode_direct_CXX=yes
18509 hardcode_shlibpath_var_CXX=no
18510 fi
18511 # Workaround some broken pre-1.5 toolchains
18512 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
18513 ;;
18514
18515 *nto* | *qnx*)
18516 ld_shlibs_CXX=yes
18517 ;;
18518
18519 openbsd2*)
18520 # C++ shared libraries are fairly broken
18521 ld_shlibs_CXX=no
18522 ;;
18523
18524 openbsd*)
18525 if test -f /usr/libexec/ld.so; then
18526 hardcode_direct_CXX=yes
18527 hardcode_shlibpath_var_CXX=no
18528 hardcode_direct_absolute_CXX=yes
18529 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
18530 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18531 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18532 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
18533 export_dynamic_flag_spec_CXX='${wl}-E'
18534 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
18535 fi
43e02a8a 18536 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18537 else
18538 ld_shlibs_CXX=no
18539 fi
18540 ;;
18541
18542 osf3* | osf4* | osf5*)
18543 case $cc_basename in
18544 KCC*)
18545 # Kuck and Associates, Inc. (KAI) C++ Compiler
18546
18547 # KCC will only create a shared library if the output file
18548 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18549 # to its proper name (with version) after linking.
18550 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'
18551
18552 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18553 hardcode_libdir_separator_CXX=:
18554
18555 # Archives containing C++ object files must be created using
18556 # the KAI C++ compiler.
18557 case $host in
18558 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
18559 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
18560 esac
18561 ;;
18562 RCC*)
18563 # Rational C++ 2.4.1
18564 # FIXME: insert proper C++ library support
18565 ld_shlibs_CXX=no
18566 ;;
18567 cxx*)
18568 case $host in
18569 osf3*)
18570 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 18571 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
18572 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18573 ;;
18574 *)
18575 allow_undefined_flag_CXX=' -expect_unresolved \*'
43e02a8a 18576 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
18577 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
18578 echo "-hidden">> $lib.exp~
43e02a8a 18579 $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
18580 $RM $lib.exp'
18581 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18582 ;;
18583 esac
18584
18585 hardcode_libdir_separator_CXX=:
18586
18587 # Commands to make compiler produce verbose output that lists
18588 # what "hidden" libraries, object files and flags are used when
18589 # linking a shared library.
18590 #
18591 # There doesn't appear to be a way to prevent this compiler from
18592 # explicitly linking system object files so we need to strip them
18593 # from the output so that they don't get included in the library
18594 # dependencies.
43e02a8a 18595 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
18596 ;;
18597 *)
18598 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18599 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
18600 case $host in
18601 osf3*)
43e02a8a 18602 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
18603 ;;
18604 *)
43e02a8a 18605 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
18606 ;;
18607 esac
18608
18609 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18610 hardcode_libdir_separator_CXX=:
18611
18612 # Commands to make compiler produce verbose output that lists
18613 # what "hidden" libraries, object files and flags are used when
18614 # linking a shared library.
43e02a8a 18615 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18616
18617 else
18618 # FIXME: insert proper C++ library support
18619 ld_shlibs_CXX=no
18620 fi
18621 ;;
18622 esac
18623 ;;
18624
18625 psos*)
18626 # FIXME: insert proper C++ library support
18627 ld_shlibs_CXX=no
18628 ;;
18629
18630 sunos4*)
18631 case $cc_basename in
18632 CC*)
18633 # Sun C++ 4.x
18634 # FIXME: insert proper C++ library support
18635 ld_shlibs_CXX=no
18636 ;;
18637 lcc*)
18638 # Lucid
18639 # FIXME: insert proper C++ library support
18640 ld_shlibs_CXX=no
18641 ;;
18642 *)
18643 # FIXME: insert proper C++ library support
18644 ld_shlibs_CXX=no
18645 ;;
18646 esac
18647 ;;
18648
18649 solaris*)
18650 case $cc_basename in
18651 CC*)
18652 # Sun C++ 4.2, 5.x and Centerline C++
18653 archive_cmds_need_lc_CXX=yes
18654 no_undefined_flag_CXX=' -zdefs'
18655 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18656 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18657 $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'
18658
18659 hardcode_libdir_flag_spec_CXX='-R$libdir'
18660 hardcode_shlibpath_var_CXX=no
18661 case $host_os in
18662 solaris2.[0-5] | solaris2.[0-5].*) ;;
18663 *)
18664 # The compiler driver will combine and reorder linker options,
18665 # but understands `-z linker_flag'.
18666 # Supported since Solaris 2.6 (maybe 2.5.1?)
18667 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
18668 ;;
18669 esac
18670 link_all_deplibs_CXX=yes
18671
43e02a8a 18672 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18673
18674 # Archives containing C++ object files must be created using
18675 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18676 # necessary to make sure instantiated templates are included
18677 # in the archive.
18678 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18679 ;;
18680 gcx*)
18681 # Green Hills C++ Compiler
18682 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18683
18684 # The C++ compiler must be used to create the archive.
18685 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
18686 ;;
18687 *)
18688 # GNU C++ compiler with Solaris linker
18689 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18690 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
18691 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
18692 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18693 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18694 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18695
18696 # Commands to make compiler produce verbose output that lists
18697 # what "hidden" libraries, object files and flags are used when
18698 # linking a shared library.
43e02a8a 18699 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18700 else
18701 # g++ 2.7 appears to require `-G' NOT `-shared' on this
18702 # platform.
18703 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18704 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18705 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18706
18707 # Commands to make compiler produce verbose output that lists
18708 # what "hidden" libraries, object files and flags are used when
18709 # linking a shared library.
43e02a8a 18710 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18711 fi
18712
18713 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
18714 case $host_os in
18715 solaris2.[0-5] | solaris2.[0-5].*) ;;
18716 *)
18717 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18718 ;;
18719 esac
18720 fi
18721 ;;
18722 esac
18723 ;;
18724
18725 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18726 no_undefined_flag_CXX='${wl}-z,text'
18727 archive_cmds_need_lc_CXX=no
18728 hardcode_shlibpath_var_CXX=no
18729 runpath_var='LD_RUN_PATH'
18730
18731 case $cc_basename in
18732 CC*)
18733 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18734 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18735 ;;
18736 *)
18737 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18738 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18739 ;;
18740 esac
18741 ;;
18742
18743 sysv5* | sco3.2v5* | sco5v6*)
18744 # Note: We can NOT use -z defs as we might desire, because we do not
18745 # link with -lc, and that would cause any symbols used from libc to
18746 # always be unresolved, which means just about no library would
18747 # ever link correctly. If we're not using GNU ld we use -z text
18748 # though, which does catch some bad symbols but isn't as heavy-handed
18749 # as -z defs.
18750 no_undefined_flag_CXX='${wl}-z,text'
18751 allow_undefined_flag_CXX='${wl}-z,nodefs'
18752 archive_cmds_need_lc_CXX=no
18753 hardcode_shlibpath_var_CXX=no
18754 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
18755 hardcode_libdir_separator_CXX=':'
18756 link_all_deplibs_CXX=yes
18757 export_dynamic_flag_spec_CXX='${wl}-Bexport'
18758 runpath_var='LD_RUN_PATH'
18759
18760 case $cc_basename in
18761 CC*)
18762 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18763 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
43e02a8a
RW
18764 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
18765 '"$old_archive_cmds_CXX"
18766 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
18767 '"$reload_cmds_CXX"
00020c16
ILT
18768 ;;
18769 *)
18770 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18771 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18772 ;;
18773 esac
18774 ;;
18775
18776 tandem*)
18777 case $cc_basename in
18778 NCC*)
18779 # NonStop-UX NCC 3.20
18780 # FIXME: insert proper C++ library support
18781 ld_shlibs_CXX=no
18782 ;;
18783 *)
18784 # FIXME: insert proper C++ library support
18785 ld_shlibs_CXX=no
18786 ;;
18787 esac
18788 ;;
18789
18790 vxworks*)
18791 # FIXME: insert proper C++ library support
18792 ld_shlibs_CXX=no
18793 ;;
18794
18795 *)
18796 # FIXME: insert proper C++ library support
18797 ld_shlibs_CXX=no
18798 ;;
18799 esac
18800
5213506e
RW
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18802$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
18803 test "$ld_shlibs_CXX" = no && can_build_shared=no
18804
18805 GCC_CXX="$GXX"
18806 LD_CXX="$LD"
18807
18808 ## CAVEAT EMPTOR:
18809 ## There is no encapsulation within the following macros, do not change
18810 ## the running order or otherwise move them around unless you know exactly
18811 ## what you are doing...
18812 # Dependencies to place before and after the object being linked:
18813predep_objects_CXX=
18814postdep_objects_CXX=
18815predeps_CXX=
18816postdeps_CXX=
18817compiler_lib_search_path_CXX=
18818
18819cat > conftest.$ac_ext <<_LT_EOF
18820class Foo
18821{
18822public:
18823 Foo (void) { a = 0; }
18824private:
18825 int a;
18826};
18827_LT_EOF
18828
5213506e 18829if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
18830 (eval $ac_compile) 2>&5
18831 ac_status=$?
5213506e
RW
18832 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18833 test $ac_status = 0; }; then
00020c16
ILT
18834 # Parse the compiler output and extract the necessary
18835 # objects, libraries and library flags.
18836
18837 # Sentinel used to keep track of whether or not we are before
18838 # the conftest object file.
18839 pre_test_object_deps_done=no
18840
18841 for p in `eval "$output_verbose_link_cmd"`; do
18842 case $p in
18843
18844 -L* | -R* | -l*)
18845 # Some compilers place space between "-{L,R}" and the path.
18846 # Remove the space.
18847 if test $p = "-L" ||
18848 test $p = "-R"; then
18849 prev=$p
18850 continue
18851 else
18852 prev=
18853 fi
18854
18855 if test "$pre_test_object_deps_done" = no; then
18856 case $p in
18857 -L* | -R*)
18858 # Internal compiler library paths should come after those
18859 # provided the user. The postdeps already come after the
18860 # user supplied libs so there is no need to process them.
18861 if test -z "$compiler_lib_search_path_CXX"; then
18862 compiler_lib_search_path_CXX="${prev}${p}"
18863 else
18864 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
18865 fi
18866 ;;
18867 # The "-l" case would never come before the object being
18868 # linked, so don't bother handling this case.
18869 esac
18870 else
18871 if test -z "$postdeps_CXX"; then
18872 postdeps_CXX="${prev}${p}"
18873 else
18874 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
18875 fi
18876 fi
18877 ;;
18878
18879 *.$objext)
18880 # This assumes that the test object file only shows up
18881 # once in the compiler output.
18882 if test "$p" = "conftest.$objext"; then
18883 pre_test_object_deps_done=yes
18884 continue
18885 fi
18886
18887 if test "$pre_test_object_deps_done" = no; then
18888 if test -z "$predep_objects_CXX"; then
18889 predep_objects_CXX="$p"
18890 else
18891 predep_objects_CXX="$predep_objects_CXX $p"
18892 fi
18893 else
18894 if test -z "$postdep_objects_CXX"; then
18895 postdep_objects_CXX="$p"
18896 else
18897 postdep_objects_CXX="$postdep_objects_CXX $p"
18898 fi
18899 fi
18900 ;;
18901
18902 *) ;; # Ignore the rest.
18903
18904 esac
18905 done
18906
18907 # Clean up.
18908 rm -f a.out a.exe
18909else
18910 echo "libtool.m4: error: problem compiling CXX test program"
18911fi
18912
18913$RM -f confest.$objext
18914
18915# PORTME: override above test on systems where it is broken
18916case $host_os in
18917interix[3-9]*)
18918 # Interix 3.5 installs completely hosed .la files for C++, so rather than
18919 # hack all around it, let's just trust "g++" to DTRT.
18920 predep_objects_CXX=
18921 postdep_objects_CXX=
18922 postdeps_CXX=
18923 ;;
18924
18925linux*)
18926 case `$CC -V 2>&1 | sed 5q` in
18927 *Sun\ C*)
18928 # Sun C++ 5.9
18929
18930 # The more standards-conforming stlport4 library is
18931 # incompatible with the Cstd library. Avoid specifying
18932 # it if it's in CXXFLAGS. Ignore libCrun as
18933 # -library=stlport4 depends on it.
18934 case " $CXX $CXXFLAGS " in
18935 *" -library=stlport4 "*)
18936 solaris_use_stlport4=yes
18937 ;;
18938 esac
18939
18940 if test "$solaris_use_stlport4" != yes; then
18941 postdeps_CXX='-library=Cstd -library=Crun'
18942 fi
18943 ;;
18944 esac
18945 ;;
18946
18947solaris*)
18948 case $cc_basename in
18949 CC*)
18950 # The more standards-conforming stlport4 library is
18951 # incompatible with the Cstd library. Avoid specifying
18952 # it if it's in CXXFLAGS. Ignore libCrun as
18953 # -library=stlport4 depends on it.
18954 case " $CXX $CXXFLAGS " in
18955 *" -library=stlport4 "*)
18956 solaris_use_stlport4=yes
18957 ;;
18958 esac
18959
18960 # Adding this requires a known-good setup of shared libraries for
18961 # Sun compiler versions before 5.6, else PIC objects from an old
18962 # archive will be linked into the output, leading to subtle bugs.
18963 if test "$solaris_use_stlport4" != yes; then
18964 postdeps_CXX='-library=Cstd -library=Crun'
18965 fi
18966 ;;
18967 esac
18968 ;;
18969esac
18970
18971
18972case " $postdeps_CXX " in
18973*" -lc "*) archive_cmds_need_lc_CXX=no ;;
18974esac
18975 compiler_lib_search_dirs_CXX=
18976if test -n "${compiler_lib_search_path_CXX}"; then
18977 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
18978fi
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010 lt_prog_compiler_wl_CXX=
19011lt_prog_compiler_pic_CXX=
19012lt_prog_compiler_static_CXX=
19013
5213506e
RW
19014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19015$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
19016
19017 # C++ specific cases for pic, static, wl, etc.
19018 if test "$GXX" = yes; then
19019 lt_prog_compiler_wl_CXX='-Wl,'
19020 lt_prog_compiler_static_CXX='-static'
19021
19022 case $host_os in
19023 aix*)
19024 # All AIX code is PIC.
19025 if test "$host_cpu" = ia64; then
19026 # AIX 5 now supports IA64 processor
19027 lt_prog_compiler_static_CXX='-Bstatic'
19028 fi
19029 ;;
19030
19031 amigaos*)
19032 case $host_cpu in
19033 powerpc)
19034 # see comment about AmigaOS4 .so support
19035 lt_prog_compiler_pic_CXX='-fPIC'
19036 ;;
19037 m68k)
19038 # FIXME: we need at least 68020 code to build shared libraries, but
19039 # adding the `-m68020' flag to GCC prevents building anything better,
19040 # like `-m68040'.
19041 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
19042 ;;
19043 esac
19044 ;;
19045
19046 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19047 # PIC is the default for these OSes.
19048 ;;
19049 mingw* | cygwin* | os2* | pw32* | cegcc*)
19050 # This hack is so that the source file can tell whether it is being
19051 # built for inclusion in a dll (and should export symbols for example).
19052 # Although the cygwin gcc ignores -fPIC, still need this for old-style
19053 # (--disable-auto-import) libraries
19054 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
19055 ;;
19056 darwin* | rhapsody*)
19057 # PIC is the default on this platform
19058 # Common symbols not allowed in MH_DYLIB files
19059 lt_prog_compiler_pic_CXX='-fno-common'
19060 ;;
19061 *djgpp*)
19062 # DJGPP does not support shared libraries at all
19063 lt_prog_compiler_pic_CXX=
19064 ;;
43e02a8a
RW
19065 haiku*)
19066 # PIC is the default for Haiku.
19067 # The "-static" flag exists, but is broken.
19068 lt_prog_compiler_static_CXX=
19069 ;;
00020c16
ILT
19070 interix[3-9]*)
19071 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19072 # Instead, we relocate shared libraries at runtime.
19073 ;;
19074 sysv4*MP*)
19075 if test -d /usr/nec; then
19076 lt_prog_compiler_pic_CXX=-Kconform_pic
19077 fi
19078 ;;
19079 hpux*)
19080 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19081 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
19082 # sets the default TLS model and affects inlining.
19083 case $host_cpu in
19084 hppa*64*)
19085 ;;
19086 *)
19087 lt_prog_compiler_pic_CXX='-fPIC'
19088 ;;
19089 esac
19090 ;;
19091 *qnx* | *nto*)
19092 # QNX uses GNU C++, but need to define -shared option too, otherwise
19093 # it will coredump.
19094 lt_prog_compiler_pic_CXX='-fPIC -shared'
19095 ;;
19096 *)
19097 lt_prog_compiler_pic_CXX='-fPIC'
19098 ;;
19099 esac
19100 else
19101 case $host_os in
19102 aix[4-9]*)
19103 # All AIX code is PIC.
19104 if test "$host_cpu" = ia64; then
19105 # AIX 5 now supports IA64 processor
19106 lt_prog_compiler_static_CXX='-Bstatic'
19107 else
19108 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
19109 fi
19110 ;;
19111 chorus*)
19112 case $cc_basename in
19113 cxch68*)
19114 # Green Hills C++ Compiler
19115 # _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"
19116 ;;
19117 esac
19118 ;;
19119 dgux*)
19120 case $cc_basename in
19121 ec++*)
19122 lt_prog_compiler_pic_CXX='-KPIC'
19123 ;;
19124 ghcx*)
19125 # Green Hills C++ Compiler
19126 lt_prog_compiler_pic_CXX='-pic'
19127 ;;
19128 *)
19129 ;;
19130 esac
19131 ;;
19132 freebsd* | dragonfly*)
19133 # FreeBSD uses GNU C++
19134 ;;
19135 hpux9* | hpux10* | hpux11*)
19136 case $cc_basename in
19137 CC*)
19138 lt_prog_compiler_wl_CXX='-Wl,'
19139 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19140 if test "$host_cpu" != ia64; then
19141 lt_prog_compiler_pic_CXX='+Z'
19142 fi
19143 ;;
19144 aCC*)
19145 lt_prog_compiler_wl_CXX='-Wl,'
19146 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19147 case $host_cpu in
19148 hppa*64*|ia64*)
19149 # +Z the default
19150 ;;
19151 *)
19152 lt_prog_compiler_pic_CXX='+Z'
19153 ;;
19154 esac
19155 ;;
19156 *)
19157 ;;
19158 esac
19159 ;;
19160 interix*)
19161 # This is c89, which is MS Visual C++ (no shared libs)
19162 # Anyone wants to do a port?
19163 ;;
19164 irix5* | irix6* | nonstopux*)
19165 case $cc_basename in
19166 CC*)
19167 lt_prog_compiler_wl_CXX='-Wl,'
19168 lt_prog_compiler_static_CXX='-non_shared'
19169 # CC pic flag -KPIC is the default.
19170 ;;
19171 *)
19172 ;;
19173 esac
19174 ;;
19175 linux* | k*bsd*-gnu | kopensolaris*-gnu)
19176 case $cc_basename in
19177 KCC*)
19178 # KAI C++ Compiler
19179 lt_prog_compiler_wl_CXX='--backend -Wl,'
19180 lt_prog_compiler_pic_CXX='-fPIC'
19181 ;;
19182 ecpc* )
19183 # old Intel C++ for x86_64 which still supported -KPIC.
19184 lt_prog_compiler_wl_CXX='-Wl,'
19185 lt_prog_compiler_pic_CXX='-KPIC'
19186 lt_prog_compiler_static_CXX='-static'
19187 ;;
19188 icpc* )
19189 # Intel C++, used to be incompatible with GCC.
19190 # ICC 10 doesn't accept -KPIC any more.
19191 lt_prog_compiler_wl_CXX='-Wl,'
19192 lt_prog_compiler_pic_CXX='-fPIC'
19193 lt_prog_compiler_static_CXX='-static'
19194 ;;
19195 pgCC* | pgcpp*)
19196 # Portland Group C++ compiler
19197 lt_prog_compiler_wl_CXX='-Wl,'
19198 lt_prog_compiler_pic_CXX='-fpic'
19199 lt_prog_compiler_static_CXX='-Bstatic'
19200 ;;
19201 cxx*)
19202 # Compaq C++
19203 # Make sure the PIC flag is empty. It appears that all Alpha
19204 # Linux and Compaq Tru64 Unix objects are PIC.
19205 lt_prog_compiler_pic_CXX=
19206 lt_prog_compiler_static_CXX='-non_shared'
19207 ;;
43e02a8a
RW
19208 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
19209 # IBM XL 8.0, 9.0 on PPC and BlueGene
00020c16
ILT
19210 lt_prog_compiler_wl_CXX='-Wl,'
19211 lt_prog_compiler_pic_CXX='-qpic'
19212 lt_prog_compiler_static_CXX='-qstaticlink'
19213 ;;
19214 *)
19215 case `$CC -V 2>&1 | sed 5q` in
19216 *Sun\ C*)
19217 # Sun C++ 5.9
19218 lt_prog_compiler_pic_CXX='-KPIC'
19219 lt_prog_compiler_static_CXX='-Bstatic'
19220 lt_prog_compiler_wl_CXX='-Qoption ld '
19221 ;;
19222 esac
19223 ;;
19224 esac
19225 ;;
19226 lynxos*)
19227 ;;
19228 m88k*)
19229 ;;
19230 mvs*)
19231 case $cc_basename in
19232 cxx*)
19233 lt_prog_compiler_pic_CXX='-W c,exportall'
19234 ;;
19235 *)
19236 ;;
19237 esac
19238 ;;
19239 netbsd*)
19240 ;;
19241 *qnx* | *nto*)
19242 # QNX uses GNU C++, but need to define -shared option too, otherwise
19243 # it will coredump.
19244 lt_prog_compiler_pic_CXX='-fPIC -shared'
19245 ;;
19246 osf3* | osf4* | osf5*)
19247 case $cc_basename in
19248 KCC*)
19249 lt_prog_compiler_wl_CXX='--backend -Wl,'
19250 ;;
19251 RCC*)
19252 # Rational C++ 2.4.1
19253 lt_prog_compiler_pic_CXX='-pic'
19254 ;;
19255 cxx*)
19256 # Digital/Compaq C++
19257 lt_prog_compiler_wl_CXX='-Wl,'
19258 # Make sure the PIC flag is empty. It appears that all Alpha
19259 # Linux and Compaq Tru64 Unix objects are PIC.
19260 lt_prog_compiler_pic_CXX=
19261 lt_prog_compiler_static_CXX='-non_shared'
19262 ;;
19263 *)
19264 ;;
19265 esac
19266 ;;
19267 psos*)
19268 ;;
19269 solaris*)
19270 case $cc_basename in
19271 CC*)
19272 # Sun C++ 4.2, 5.x and Centerline C++
19273 lt_prog_compiler_pic_CXX='-KPIC'
19274 lt_prog_compiler_static_CXX='-Bstatic'
19275 lt_prog_compiler_wl_CXX='-Qoption ld '
19276 ;;
19277 gcx*)
19278 # Green Hills C++ Compiler
19279 lt_prog_compiler_pic_CXX='-PIC'
19280 ;;
19281 *)
19282 ;;
19283 esac
19284 ;;
19285 sunos4*)
19286 case $cc_basename in
19287 CC*)
19288 # Sun C++ 4.x
19289 lt_prog_compiler_pic_CXX='-pic'
19290 lt_prog_compiler_static_CXX='-Bstatic'
19291 ;;
19292 lcc*)
19293 # Lucid
19294 lt_prog_compiler_pic_CXX='-pic'
19295 ;;
19296 *)
19297 ;;
19298 esac
19299 ;;
19300 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19301 case $cc_basename in
19302 CC*)
19303 lt_prog_compiler_wl_CXX='-Wl,'
19304 lt_prog_compiler_pic_CXX='-KPIC'
19305 lt_prog_compiler_static_CXX='-Bstatic'
19306 ;;
19307 esac
19308 ;;
19309 tandem*)
19310 case $cc_basename in
19311 NCC*)
19312 # NonStop-UX NCC 3.20
19313 lt_prog_compiler_pic_CXX='-KPIC'
19314 ;;
19315 *)
19316 ;;
19317 esac
19318 ;;
19319 vxworks*)
19320 ;;
19321 *)
19322 lt_prog_compiler_can_build_shared_CXX=no
19323 ;;
19324 esac
19325 fi
19326
19327case $host_os in
19328 # For platforms which do not support PIC, -DPIC is meaningless:
19329 *djgpp*)
19330 lt_prog_compiler_pic_CXX=
19331 ;;
19332 *)
19333 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
19334 ;;
19335esac
5213506e
RW
19336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
19337$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
00020c16
ILT
19338
19339
19340
19341#
19342# Check to make sure the PIC flag actually works.
19343#
19344if test -n "$lt_prog_compiler_pic_CXX"; then
5213506e
RW
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
19346$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
19347if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
19348 $as_echo_n "(cached) " >&6
00020c16
ILT
19349else
19350 lt_cv_prog_compiler_pic_works_CXX=no
19351 ac_outfile=conftest.$ac_objext
19352 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19353 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
19354 # Insert the option either (1) after the last *FLAGS variable, or
19355 # (2) before a word containing "conftest.", or (3) at the end.
19356 # Note that $ac_compile itself does not contain backslashes and begins
19357 # with a dollar sign (not a hyphen), so the echo should work correctly.
19358 # The option is referenced via a variable to avoid confusing sed.
19359 lt_compile=`echo "$ac_compile" | $SED \
19360 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19361 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19362 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19363 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19364 (eval "$lt_compile" 2>conftest.err)
19365 ac_status=$?
19366 cat conftest.err >&5
43e02a8a 19367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19368 if (exit $ac_status) && test -s "$ac_outfile"; then
19369 # The compiler can only warn and ignore the option if not recognized
19370 # So say no if there are warnings other than the usual output.
43e02a8a 19371 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
19372 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19373 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19374 lt_cv_prog_compiler_pic_works_CXX=yes
19375 fi
19376 fi
19377 $RM conftest*
19378
19379fi
5213506e
RW
19380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
19381$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
00020c16
ILT
19382
19383if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
19384 case $lt_prog_compiler_pic_CXX in
19385 "" | " "*) ;;
19386 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
19387 esac
19388else
19389 lt_prog_compiler_pic_CXX=
19390 lt_prog_compiler_can_build_shared_CXX=no
19391fi
19392
19393fi
19394
19395
19396
19397#
19398# Check to make sure the static flag actually works.
19399#
19400wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
5213506e
RW
19401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19402$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19403if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
19404 $as_echo_n "(cached) " >&6
00020c16
ILT
19405else
19406 lt_cv_prog_compiler_static_works_CXX=no
19407 save_LDFLAGS="$LDFLAGS"
19408 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19409 echo "$lt_simple_link_test_code" > conftest.$ac_ext
19410 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19411 # The linker can only warn and ignore the option if not recognized
19412 # So say no if there are warnings
19413 if test -s conftest.err; then
19414 # Append any errors to the config.log.
19415 cat conftest.err 1>&5
43e02a8a 19416 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
19417 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19418 if diff conftest.exp conftest.er2 >/dev/null; then
19419 lt_cv_prog_compiler_static_works_CXX=yes
19420 fi
19421 else
19422 lt_cv_prog_compiler_static_works_CXX=yes
19423 fi
19424 fi
19425 $RM -r conftest*
19426 LDFLAGS="$save_LDFLAGS"
19427
19428fi
5213506e
RW
19429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
19430$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
00020c16
ILT
19431
19432if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
19433 :
19434else
19435 lt_prog_compiler_static_CXX=
19436fi
19437
19438
19439
19440
5213506e
RW
19441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19442$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19443if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19444 $as_echo_n "(cached) " >&6
00020c16
ILT
19445else
19446 lt_cv_prog_compiler_c_o_CXX=no
19447 $RM -r conftest 2>/dev/null
19448 mkdir conftest
19449 cd conftest
19450 mkdir out
19451 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19452
19453 lt_compiler_flag="-o out/conftest2.$ac_objext"
19454 # Insert the option either (1) after the last *FLAGS variable, or
19455 # (2) before a word containing "conftest.", or (3) at the end.
19456 # Note that $ac_compile itself does not contain backslashes and begins
19457 # with a dollar sign (not a hyphen), so the echo should work correctly.
19458 lt_compile=`echo "$ac_compile" | $SED \
19459 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19460 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19461 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19462 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19463 (eval "$lt_compile" 2>out/conftest.err)
19464 ac_status=$?
19465 cat out/conftest.err >&5
43e02a8a 19466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19467 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19468 then
19469 # The compiler can only warn and ignore the option if not recognized
19470 # So say no if there are warnings
43e02a8a 19471 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19472 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19473 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19474 lt_cv_prog_compiler_c_o_CXX=yes
19475 fi
19476 fi
19477 chmod u+w . 2>&5
19478 $RM conftest*
19479 # SGI C++ compiler will create directory out/ii_files/ for
19480 # template instantiation
19481 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19482 $RM out/* && rmdir out
19483 cd ..
19484 $RM -r conftest
19485 $RM conftest*
19486
19487fi
5213506e
RW
19488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19489$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19490
19491
19492
5213506e
RW
19493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19494$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19495if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19496 $as_echo_n "(cached) " >&6
00020c16
ILT
19497else
19498 lt_cv_prog_compiler_c_o_CXX=no
19499 $RM -r conftest 2>/dev/null
19500 mkdir conftest
19501 cd conftest
19502 mkdir out
19503 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19504
19505 lt_compiler_flag="-o out/conftest2.$ac_objext"
19506 # Insert the option either (1) after the last *FLAGS variable, or
19507 # (2) before a word containing "conftest.", or (3) at the end.
19508 # Note that $ac_compile itself does not contain backslashes and begins
19509 # with a dollar sign (not a hyphen), so the echo should work correctly.
19510 lt_compile=`echo "$ac_compile" | $SED \
19511 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19512 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19513 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19514 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19515 (eval "$lt_compile" 2>out/conftest.err)
19516 ac_status=$?
19517 cat out/conftest.err >&5
43e02a8a 19518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19519 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19520 then
19521 # The compiler can only warn and ignore the option if not recognized
19522 # So say no if there are warnings
43e02a8a 19523 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19524 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19525 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19526 lt_cv_prog_compiler_c_o_CXX=yes
19527 fi
19528 fi
19529 chmod u+w . 2>&5
19530 $RM conftest*
19531 # SGI C++ compiler will create directory out/ii_files/ for
19532 # template instantiation
19533 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19534 $RM out/* && rmdir out
19535 cd ..
19536 $RM -r conftest
19537 $RM conftest*
19538
19539fi
5213506e
RW
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19541$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19542
19543
19544
19545
19546hard_links="nottested"
19547if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
19548 # do not overwrite the value of need_locks provided by the user
5213506e
RW
19549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19550$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16
ILT
19551 hard_links=yes
19552 $RM conftest*
19553 ln conftest.a conftest.b 2>/dev/null && hard_links=no
19554 touch conftest.a
19555 ln conftest.a conftest.b 2>&5 || hard_links=no
19556 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
19557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19558$as_echo "$hard_links" >&6; }
00020c16 19559 if test "$hard_links" = no; then
5213506e
RW
19560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
19561$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16
ILT
19562 need_locks=warn
19563 fi
19564else
19565 need_locks=no
19566fi
19567
19568
19569
5213506e
RW
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19571$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
19572
19573 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19574 case $host_os in
19575 aix[4-9]*)
19576 # If we're using GNU nm, then we don't want the "-C" option.
19577 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
19578 # Also, AIX nm treats weak defined symbols like other global defined
19579 # symbols, whereas GNU nm marks them as "W".
00020c16 19580 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 19581 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
19582 else
19583 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'
19584 fi
19585 ;;
19586 pw32*)
19587 export_symbols_cmds_CXX="$ltdll_cmds"
19588 ;;
19589 cygwin* | mingw* | cegcc*)
19590 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'
19591 ;;
19592 *)
19593 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19594 ;;
19595 esac
19596 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19597
5213506e
RW
19598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
19599$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
19600test "$ld_shlibs_CXX" = no && can_build_shared=no
19601
19602with_gnu_ld_CXX=$with_gnu_ld
19603
19604
19605
19606
19607
19608
19609#
19610# Do we need to explicitly link libc?
19611#
19612case "x$archive_cmds_need_lc_CXX" in
19613x|xyes)
19614 # Assume -lc should be added
19615 archive_cmds_need_lc_CXX=yes
19616
19617 if test "$enable_shared" = yes && test "$GCC" = yes; then
19618 case $archive_cmds_CXX in
19619 *'~'*)
19620 # FIXME: we may have to deal with multi-command sequences.
19621 ;;
19622 '$CC '*)
19623 # Test whether the compiler implicitly links with -lc since on some
19624 # systems, -lgcc has to come before -lc. If gcc already passes -lc
19625 # to ld, don't add -lc before -lgcc.
5213506e
RW
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
19627$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
19628if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then :
19629 $as_echo_n "(cached) " >&6
00020c16
ILT
19630else
19631 $RM conftest*
19632 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19633
5213506e 19634 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
19635 (eval $ac_compile) 2>&5
19636 ac_status=$?
5213506e
RW
19637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19638 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
19639 soname=conftest
19640 lib=conftest
19641 libobjs=conftest.$ac_objext
19642 deplibs=
19643 wl=$lt_prog_compiler_wl_CXX
19644 pic_flag=$lt_prog_compiler_pic_CXX
19645 compiler_flags=-v
19646 linker_flags=-v
19647 verstring=
19648 output_objdir=.
19649 libname=conftest
19650 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
19651 allow_undefined_flag_CXX=
5213506e 19652 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
19653 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19654 ac_status=$?
5213506e
RW
19655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19656 test $ac_status = 0; }
00020c16
ILT
19657 then
19658 lt_cv_archive_cmds_need_lc_CXX=no
19659 else
19660 lt_cv_archive_cmds_need_lc_CXX=yes
19661 fi
19662 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
19663 else
19664 cat conftest.err 1>&5
19665 fi
19666 $RM conftest*
19667
19668fi
5213506e
RW
19669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
19670$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
00020c16
ILT
19671 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
19672 ;;
19673 esac
19674 fi
19675 ;;
19676esac
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
5213506e
RW
19741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19742$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
19743
19744library_names_spec=
19745libname_spec='lib$name'
19746soname_spec=
19747shrext_cmds=".so"
19748postinstall_cmds=
19749postuninstall_cmds=
19750finish_cmds=
19751finish_eval=
19752shlibpath_var=
19753shlibpath_overrides_runpath=unknown
19754version_type=none
19755dynamic_linker="$host_os ld.so"
19756sys_lib_dlsearch_path_spec="/lib /usr/lib"
19757need_lib_prefix=unknown
19758hardcode_into_libs=no
19759
19760# when you set need_version to no, make sure it does not cause -set_version
19761# flags to be left without arguments
19762need_version=unknown
19763
19764case $host_os in
19765aix3*)
19766 version_type=linux
19767 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19768 shlibpath_var=LIBPATH
19769
19770 # AIX 3 has no versioning support, so we append a major version to the name.
19771 soname_spec='${libname}${release}${shared_ext}$major'
19772 ;;
19773
19774aix[4-9]*)
19775 version_type=linux
19776 need_lib_prefix=no
19777 need_version=no
19778 hardcode_into_libs=yes
19779 if test "$host_cpu" = ia64; then
19780 # AIX 5 supports IA64
19781 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19782 shlibpath_var=LD_LIBRARY_PATH
19783 else
19784 # With GCC up to 2.95.x, collect2 would create an import file
19785 # for dependence libraries. The import file would start with
19786 # the line `#! .'. This would cause the generated library to
19787 # depend on `.', always an invalid library. This was fixed in
19788 # development snapshots of GCC prior to 3.0.
19789 case $host_os in
19790 aix4 | aix4.[01] | aix4.[01].*)
19791 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19792 echo ' yes '
19793 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
19794 :
19795 else
19796 can_build_shared=no
19797 fi
19798 ;;
19799 esac
19800 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19801 # soname into executable. Probably we can add versioning support to
19802 # collect2, so additional links can be useful in future.
19803 if test "$aix_use_runtimelinking" = yes; then
19804 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19805 # instead of lib<name>.a to let people know that these are not
19806 # typical AIX shared libraries.
19807 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19808 else
19809 # We preserve .a as extension for shared libraries through AIX4.2
19810 # and later when we are not doing run time linking.
19811 library_names_spec='${libname}${release}.a $libname.a'
19812 soname_spec='${libname}${release}${shared_ext}$major'
19813 fi
19814 shlibpath_var=LIBPATH
19815 fi
19816 ;;
19817
19818amigaos*)
19819 case $host_cpu in
19820 powerpc)
19821 # Since July 2007 AmigaOS4 officially supports .so libraries.
19822 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19823 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19824 ;;
19825 m68k)
19826 library_names_spec='$libname.ixlibrary $libname.a'
19827 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 19828 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
19829 ;;
19830 esac
19831 ;;
19832
19833beos*)
19834 library_names_spec='${libname}${shared_ext}'
19835 dynamic_linker="$host_os ld.so"
19836 shlibpath_var=LIBRARY_PATH
19837 ;;
19838
19839bsdi[45]*)
19840 version_type=linux
19841 need_version=no
19842 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19843 soname_spec='${libname}${release}${shared_ext}$major'
19844 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19845 shlibpath_var=LD_LIBRARY_PATH
19846 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19847 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19848 # the default ld.so.conf also contains /usr/contrib/lib and
19849 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19850 # libtool to hard-code these into programs
19851 ;;
19852
19853cygwin* | mingw* | pw32* | cegcc*)
19854 version_type=windows
19855 shrext_cmds=".dll"
19856 need_version=no
19857 need_lib_prefix=no
19858
19859 case $GCC,$host_os in
19860 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
19861 library_names_spec='$libname.dll.a'
19862 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19863 postinstall_cmds='base_file=`basename \${file}`~
19864 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
19865 dldir=$destdir/`dirname \$dlpath`~
19866 test -d \$dldir || mkdir -p \$dldir~
19867 $install_prog $dir/$dlname \$dldir/$dlname~
19868 chmod a+x \$dldir/$dlname~
19869 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19870 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19871 fi'
19872 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19873 dlpath=$dir/\$dldll~
19874 $RM \$dlpath'
19875 shlibpath_overrides_runpath=yes
19876
19877 case $host_os in
19878 cygwin*)
19879 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19880 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a 19881
00020c16
ILT
19882 ;;
19883 mingw* | cegcc*)
19884 # MinGW DLLs use traditional 'lib' prefix
19885 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
00020c16
ILT
19886 ;;
19887 pw32*)
19888 # pw32 DLLs use 'pw' prefix rather than 'lib'
19889 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19890 ;;
19891 esac
19892 ;;
19893
19894 *)
19895 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
19896 ;;
19897 esac
19898 dynamic_linker='Win32 ld.exe'
19899 # FIXME: first we should search . and the directory the executable is in
19900 shlibpath_var=PATH
19901 ;;
19902
19903darwin* | rhapsody*)
19904 dynamic_linker="$host_os dyld"
19905 version_type=darwin
19906 need_lib_prefix=no
19907 need_version=no
19908 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
19909 soname_spec='${libname}${release}${major}$shared_ext'
19910 shlibpath_overrides_runpath=yes
19911 shlibpath_var=DYLD_LIBRARY_PATH
19912 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19913
19914 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19915 ;;
19916
19917dgux*)
19918 version_type=linux
19919 need_lib_prefix=no
19920 need_version=no
19921 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
19922 soname_spec='${libname}${release}${shared_ext}$major'
19923 shlibpath_var=LD_LIBRARY_PATH
19924 ;;
19925
19926freebsd1*)
19927 dynamic_linker=no
19928 ;;
19929
19930freebsd* | dragonfly*)
19931 # DragonFly does not have aout. When/if they implement a new
19932 # versioning mechanism, adjust this.
19933 if test -x /usr/bin/objformat; then
19934 objformat=`/usr/bin/objformat`
19935 else
19936 case $host_os in
19937 freebsd[123]*) objformat=aout ;;
19938 *) objformat=elf ;;
19939 esac
19940 fi
19941 version_type=freebsd-$objformat
19942 case $version_type in
19943 freebsd-elf*)
19944 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19945 need_version=no
19946 need_lib_prefix=no
19947 ;;
19948 freebsd-*)
19949 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
19950 need_version=yes
19951 ;;
19952 esac
19953 shlibpath_var=LD_LIBRARY_PATH
19954 case $host_os in
19955 freebsd2*)
19956 shlibpath_overrides_runpath=yes
19957 ;;
19958 freebsd3.[01]* | freebsdelf3.[01]*)
19959 shlibpath_overrides_runpath=yes
19960 hardcode_into_libs=yes
19961 ;;
19962 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19963 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19964 shlibpath_overrides_runpath=no
19965 hardcode_into_libs=yes
19966 ;;
19967 *) # from 4.6 on, and DragonFly
19968 shlibpath_overrides_runpath=yes
19969 hardcode_into_libs=yes
19970 ;;
19971 esac
19972 ;;
19973
19974gnu*)
19975 version_type=linux
19976 need_lib_prefix=no
19977 need_version=no
19978 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19979 soname_spec='${libname}${release}${shared_ext}$major'
19980 shlibpath_var=LD_LIBRARY_PATH
19981 hardcode_into_libs=yes
19982 ;;
19983
43e02a8a
RW
19984haiku*)
19985 version_type=linux
19986 need_lib_prefix=no
19987 need_version=no
19988 dynamic_linker="$host_os runtime_loader"
19989 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19990 soname_spec='${libname}${release}${shared_ext}$major'
19991 shlibpath_var=LIBRARY_PATH
19992 shlibpath_overrides_runpath=yes
19993 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
19994 hardcode_into_libs=yes
19995 ;;
19996
00020c16
ILT
19997hpux9* | hpux10* | hpux11*)
19998 # Give a soname corresponding to the major version so that dld.sl refuses to
19999 # link against other versions.
20000 version_type=sunos
20001 need_lib_prefix=no
20002 need_version=no
20003 case $host_cpu in
20004 ia64*)
20005 shrext_cmds='.so'
20006 hardcode_into_libs=yes
20007 dynamic_linker="$host_os dld.so"
20008 shlibpath_var=LD_LIBRARY_PATH
20009 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20010 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20011 soname_spec='${libname}${release}${shared_ext}$major'
20012 if test "X$HPUX_IA64_MODE" = X32; then
20013 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
20014 else
20015 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
20016 fi
20017 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20018 ;;
20019 hppa*64*)
20020 shrext_cmds='.sl'
20021 hardcode_into_libs=yes
20022 dynamic_linker="$host_os dld.sl"
20023 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
20024 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20025 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20026 soname_spec='${libname}${release}${shared_ext}$major'
20027 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
20028 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20029 ;;
20030 *)
20031 shrext_cmds='.sl'
20032 dynamic_linker="$host_os dld.sl"
20033 shlibpath_var=SHLIB_PATH
20034 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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 ;;
20038 esac
43e02a8a 20039 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
00020c16 20040 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
20041 # or fails outright, so override atomically:
20042 install_override_mode=555
00020c16
ILT
20043 ;;
20044
20045interix[3-9]*)
20046 version_type=linux
20047 need_lib_prefix=no
20048 need_version=no
20049 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20050 soname_spec='${libname}${release}${shared_ext}$major'
20051 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
20052 shlibpath_var=LD_LIBRARY_PATH
20053 shlibpath_overrides_runpath=no
20054 hardcode_into_libs=yes
20055 ;;
20056
20057irix5* | irix6* | nonstopux*)
20058 case $host_os in
20059 nonstopux*) version_type=nonstopux ;;
20060 *)
20061 if test "$lt_cv_prog_gnu_ld" = yes; then
20062 version_type=linux
20063 else
20064 version_type=irix
20065 fi ;;
20066 esac
20067 need_lib_prefix=no
20068 need_version=no
20069 soname_spec='${libname}${release}${shared_ext}$major'
20070 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
20071 case $host_os in
20072 irix5* | nonstopux*)
20073 libsuff= shlibsuff=
20074 ;;
20075 *)
20076 case $LD in # libtool.m4 will add one of these switches to LD
20077 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
20078 libsuff= shlibsuff= libmagic=32-bit;;
20079 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
20080 libsuff=32 shlibsuff=N32 libmagic=N32;;
20081 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
20082 libsuff=64 shlibsuff=64 libmagic=64-bit;;
20083 *) libsuff= shlibsuff= libmagic=never-match;;
20084 esac
20085 ;;
20086 esac
20087 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
20088 shlibpath_overrides_runpath=no
20089 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
20090 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
20091 hardcode_into_libs=yes
20092 ;;
20093
20094# No shared lib support for Linux oldld, aout, or coff.
20095linux*oldld* | linux*aout* | linux*coff*)
20096 dynamic_linker=no
20097 ;;
20098
20099# This must be Linux ELF.
20100linux* | k*bsd*-gnu | kopensolaris*-gnu)
20101 version_type=linux
20102 need_lib_prefix=no
20103 need_version=no
20104 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20105 soname_spec='${libname}${release}${shared_ext}$major'
20106 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
20107 shlibpath_var=LD_LIBRARY_PATH
20108 shlibpath_overrides_runpath=no
20109
20110 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
20111 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
20112 $as_echo_n "(cached) " >&6
00020c16
ILT
20113else
20114 lt_cv_shlibpath_overrides_runpath=no
20115 save_LDFLAGS=$LDFLAGS
20116 save_libdir=$libdir
20117 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
20118 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
5213506e 20119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
20120/* end confdefs.h. */
20121
20122int
20123main ()
20124{
20125
da0f6381
PB
20126 ;
20127 return 0;
20128}
20129_ACEOF
5213506e
RW
20130if ac_fn_cxx_try_link "$LINENO"; then :
20131 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
00020c16
ILT
20132 lt_cv_shlibpath_overrides_runpath=yes
20133fi
da0f6381 20134fi
5213506e
RW
20135rm -f core conftest.err conftest.$ac_objext \
20136 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
20137 LDFLAGS=$save_LDFLAGS
20138 libdir=$save_libdir
da0f6381
PB
20139
20140fi
20141
00020c16 20142 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381 20143
00020c16
ILT
20144 # This implies no fast_install, which is unacceptable.
20145 # Some rework will be needed to allow for fast_install
20146 # before this can be enabled.
20147 hardcode_into_libs=yes
da0f6381 20148
00020c16
ILT
20149 # Append ld.so.conf contents to the search path
20150 if test -f /etc/ld.so.conf; then
43e02a8a 20151 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
20152 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
20153 fi
da0f6381 20154
00020c16
ILT
20155 # We used to test for /lib/ld.so.1 and disable shared libraries on
20156 # powerpc, because MkLinux only supported shared libraries with the
20157 # GNU dynamic linker. Since this was broken with cross compilers,
20158 # most powerpc-linux boxes support dynamic linking these days and
20159 # people can always --disable-shared, the test was removed, and we
20160 # assume the GNU/Linux dynamic linker is in use.
20161 dynamic_linker='GNU/Linux ld.so'
20162 ;;
da0f6381 20163
00020c16
ILT
20164netbsd*)
20165 version_type=sunos
20166 need_lib_prefix=no
20167 need_version=no
20168 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20169 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20170 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20171 dynamic_linker='NetBSD (a.out) ld.so'
20172 else
20173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20174 soname_spec='${libname}${release}${shared_ext}$major'
20175 dynamic_linker='NetBSD ld.elf_so'
20176 fi
20177 shlibpath_var=LD_LIBRARY_PATH
20178 shlibpath_overrides_runpath=yes
20179 hardcode_into_libs=yes
20180 ;;
da0f6381 20181
00020c16
ILT
20182newsos6)
20183 version_type=linux
20184 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20185 shlibpath_var=LD_LIBRARY_PATH
20186 shlibpath_overrides_runpath=yes
20187 ;;
da0f6381 20188
00020c16
ILT
20189*nto* | *qnx*)
20190 version_type=qnx
20191 need_lib_prefix=no
20192 need_version=no
20193 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20194 soname_spec='${libname}${release}${shared_ext}$major'
20195 shlibpath_var=LD_LIBRARY_PATH
20196 shlibpath_overrides_runpath=no
20197 hardcode_into_libs=yes
20198 dynamic_linker='ldqnx.so'
20199 ;;
da0f6381 20200
00020c16
ILT
20201openbsd*)
20202 version_type=sunos
20203 sys_lib_dlsearch_path_spec="/usr/lib"
20204 need_lib_prefix=no
20205 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
20206 case $host_os in
20207 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
20208 *) need_version=no ;;
da0f6381 20209 esac
00020c16
ILT
20210 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20211 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20212 shlibpath_var=LD_LIBRARY_PATH
20213 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20214 case $host_os in
20215 openbsd2.[89] | openbsd2.[89].*)
20216 shlibpath_overrides_runpath=no
20217 ;;
20218 *)
20219 shlibpath_overrides_runpath=yes
20220 ;;
20221 esac
da0f6381 20222 else
00020c16 20223 shlibpath_overrides_runpath=yes
da0f6381 20224 fi
00020c16 20225 ;;
da0f6381 20226
00020c16
ILT
20227os2*)
20228 libname_spec='$name'
20229 shrext_cmds=".dll"
20230 need_lib_prefix=no
20231 library_names_spec='$libname${shared_ext} $libname.a'
20232 dynamic_linker='OS/2 ld.exe'
20233 shlibpath_var=LIBPATH
20234 ;;
da0f6381 20235
00020c16
ILT
20236osf3* | osf4* | osf5*)
20237 version_type=osf
20238 need_lib_prefix=no
20239 need_version=no
20240 soname_spec='${libname}${release}${shared_ext}$major'
20241 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20242 shlibpath_var=LD_LIBRARY_PATH
20243 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20244 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
20245 ;;
da0f6381 20246
00020c16
ILT
20247rdos*)
20248 dynamic_linker=no
20249 ;;
da0f6381 20250
00020c16
ILT
20251solaris*)
20252 version_type=linux
20253 need_lib_prefix=no
20254 need_version=no
20255 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20256 soname_spec='${libname}${release}${shared_ext}$major'
20257 shlibpath_var=LD_LIBRARY_PATH
20258 shlibpath_overrides_runpath=yes
20259 hardcode_into_libs=yes
20260 # ldd complains unless libraries are executable
20261 postinstall_cmds='chmod +x $lib'
20262 ;;
da0f6381 20263
00020c16
ILT
20264sunos4*)
20265 version_type=sunos
20266 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20267 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20268 shlibpath_var=LD_LIBRARY_PATH
20269 shlibpath_overrides_runpath=yes
20270 if test "$with_gnu_ld" = yes; then
20271 need_lib_prefix=no
20272 fi
20273 need_version=yes
20274 ;;
da0f6381 20275
00020c16
ILT
20276sysv4 | sysv4.3*)
20277 version_type=linux
20278 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20279 soname_spec='${libname}${release}${shared_ext}$major'
20280 shlibpath_var=LD_LIBRARY_PATH
20281 case $host_vendor in
20282 sni)
20283 shlibpath_overrides_runpath=no
20284 need_lib_prefix=no
20285 runpath_var=LD_RUN_PATH
20286 ;;
20287 siemens)
20288 need_lib_prefix=no
20289 ;;
20290 motorola)
20291 need_lib_prefix=no
20292 need_version=no
20293 shlibpath_overrides_runpath=no
20294 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20295 ;;
20296 esac
20297 ;;
da0f6381 20298
00020c16
ILT
20299sysv4*MP*)
20300 if test -d /usr/nec ;then
20301 version_type=linux
20302 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
20303 soname_spec='$libname${shared_ext}.$major'
20304 shlibpath_var=LD_LIBRARY_PATH
20305 fi
20306 ;;
da0f6381 20307
00020c16
ILT
20308sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20309 version_type=freebsd-elf
20310 need_lib_prefix=no
20311 need_version=no
20312 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20313 soname_spec='${libname}${release}${shared_ext}$major'
20314 shlibpath_var=LD_LIBRARY_PATH
20315 shlibpath_overrides_runpath=yes
20316 hardcode_into_libs=yes
20317 if test "$with_gnu_ld" = yes; then
20318 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
da0f6381 20319 else
00020c16
ILT
20320 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20321 case $host_os in
20322 sco3.2v5*)
20323 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20324 ;;
da0f6381 20325 esac
da0f6381 20326 fi
00020c16
ILT
20327 sys_lib_dlsearch_path_spec='/usr/lib'
20328 ;;
da0f6381 20329
00020c16
ILT
20330tpf*)
20331 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
20332 version_type=linux
20333 need_lib_prefix=no
20334 need_version=no
20335 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20336 shlibpath_var=LD_LIBRARY_PATH
20337 shlibpath_overrides_runpath=no
20338 hardcode_into_libs=yes
20339 ;;
da0f6381 20340
00020c16
ILT
20341uts4*)
20342 version_type=linux
20343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20344 soname_spec='${libname}${release}${shared_ext}$major'
20345 shlibpath_var=LD_LIBRARY_PATH
20346 ;;
da0f6381 20347
00020c16
ILT
20348*)
20349 dynamic_linker=no
20350 ;;
20351esac
5213506e
RW
20352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
20353$as_echo "$dynamic_linker" >&6; }
00020c16 20354test "$dynamic_linker" = no && can_build_shared=no
da0f6381 20355
00020c16
ILT
20356variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20357if test "$GCC" = yes; then
20358 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20359fi
da0f6381 20360
00020c16
ILT
20361if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
20362 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
20363fi
20364if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
20365 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
20366fi
da0f6381 20367
da0f6381 20368
da0f6381 20369
da0f6381 20370
da0f6381 20371
da0f6381
PB
20372
20373
da0f6381 20374
da0f6381 20375
da0f6381 20376
da0f6381
PB
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
da0f6381
PB
20394
20395
20396
20397
20398
20399
43e02a8a
RW
20400
20401
da0f6381
PB
20402
20403
20404
5213506e
RW
20405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
20406$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
00020c16
ILT
20407hardcode_action_CXX=
20408if test -n "$hardcode_libdir_flag_spec_CXX" ||
20409 test -n "$runpath_var_CXX" ||
20410 test "X$hardcode_automatic_CXX" = "Xyes" ; then
da0f6381 20411
00020c16
ILT
20412 # We can hardcode non-existent directories.
20413 if test "$hardcode_direct_CXX" != no &&
20414 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20415 # have to relink, otherwise we might link with an installed library
20416 # when we should be linking with a yet-to-be-installed one
20417 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
20418 test "$hardcode_minus_L_CXX" != no; then
20419 # Linking always hardcodes the temporary library directory.
20420 hardcode_action_CXX=relink
20421 else
20422 # We can link without hardcoding, and we can hardcode nonexisting dirs.
20423 hardcode_action_CXX=immediate
20424 fi
20425else
20426 # We cannot hardcode anything, or else we can only hardcode existing
20427 # directories.
20428 hardcode_action_CXX=unsupported
20429fi
5213506e
RW
20430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
20431$as_echo "$hardcode_action_CXX" >&6; }
da0f6381 20432
00020c16
ILT
20433if test "$hardcode_action_CXX" = relink ||
20434 test "$inherit_rpath_CXX" = yes; then
20435 # Fast installation is not supported
20436 enable_fast_install=no
20437elif test "$shlibpath_overrides_runpath" = yes ||
20438 test "$enable_shared" = no; then
20439 # Fast installation is not necessary
20440 enable_fast_install=needless
20441fi
da0f6381 20442
da0f6381 20443
da0f6381 20444
da0f6381 20445
da0f6381 20446
da0f6381
PB
20447
20448
00020c16 20449 fi # test -n "$compiler"
da0f6381 20450
00020c16
ILT
20451 CC=$lt_save_CC
20452 LDCXX=$LD
20453 LD=$lt_save_LD
20454 GCC=$lt_save_GCC
20455 with_gnu_ld=$lt_save_with_gnu_ld
20456 lt_cv_path_LDCXX=$lt_cv_path_LD
20457 lt_cv_path_LD=$lt_save_path_LD
20458 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
20459 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
20460fi # test "$_lt_caught_CXX_error" != yes
da0f6381 20461
da0f6381
PB
20462ac_ext=c
20463ac_cpp='$CPP $CPPFLAGS'
20464ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20465ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20466ac_compiler_gnu=$ac_cv_c_compiler_gnu
20467
da0f6381
PB
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483# Only expand once:
20484
20485
20486
20487
20488
20489# Identify the assembler which will work hand-in-glove with the newly
20490# built GCC, so that we can examine its features. This is the assembler
20491# which will be driven by the driver program.
20492#
20493# If build != host, and we aren't building gas in-tree, we identify a
20494# build->target assembler and hope that it will have the same features
20495# as the host->target assembler we'll be using.
20496gcc_cv_gas_major_version=
20497gcc_cv_gas_minor_version=
20498gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20499
5213506e
RW
20500if test "${gcc_cv_as+set}" = set; then :
20501
da0f6381
PB
20502else
20503
20504if test -x "$DEFAULT_ASSEMBLER"; then
20505 gcc_cv_as="$DEFAULT_ASSEMBLER"
20506elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20507 && test -f ../gas/Makefile \
20508 && test x$build = x$host; then
20509 gcc_cv_as=../gas/as-new$build_exeext
20510elif test -x as$build_exeext; then
20511 # Build using assembler in the current directory.
20512 gcc_cv_as=./as$build_exeext
20513elif test -x $AS_FOR_TARGET; then
20514 gcc_cv_as="$AS_FOR_TARGET"
20515else
20516 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20517set dummy $AS_FOR_TARGET; ac_word=$2
5213506e
RW
20518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20519$as_echo_n "checking for $ac_word... " >&6; }
20520if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
20521 $as_echo_n "(cached) " >&6
da0f6381
PB
20522else
20523 case $gcc_cv_as in
20524 [\\/]* | ?:[\\/]*)
20525 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20526 ;;
20527 *)
20528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20529for as_dir in $PATH
20530do
20531 IFS=$as_save_IFS
20532 test -z "$as_dir" && as_dir=.
5213506e
RW
20533 for ac_exec_ext in '' $ac_executable_extensions; do
20534 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 20535 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
5213506e 20536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
20537 break 2
20538 fi
20539done
5213506e
RW
20540 done
20541IFS=$as_save_IFS
da0f6381
PB
20542
20543 ;;
20544esac
20545fi
20546gcc_cv_as=$ac_cv_path_gcc_cv_as
da0f6381 20547if test -n "$gcc_cv_as"; then
5213506e
RW
20548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20549$as_echo "$gcc_cv_as" >&6; }
da0f6381 20550else
5213506e
RW
20551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20552$as_echo "no" >&6; }
da0f6381
PB
20553fi
20554
5213506e 20555
da0f6381
PB
20556fi
20557fi
20558
da0f6381
PB
20559ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20560
20561case "$ORIGINAL_AS_FOR_TARGET" in
20562 ./as | ./as$build_exeext) ;;
5213506e 20563 *) ac_config_files="$ac_config_files as:exec-tool.in"
da0f6381
PB
20564 ;;
20565esac
20566
5213506e
RW
20567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
20568$as_echo_n "checking what assembler to use... " >&6; }
da0f6381
PB
20569if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20570 # Single tree build which includes gas. We want to prefer it
20571 # over whatever linker top-level may have detected, since
20572 # we'll use what we're building after installation anyway.
5213506e
RW
20573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
20574$as_echo "newly built gas" >&6; }
da0f6381
PB
20575 in_tree_gas=yes
20576 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20577for f in $gcc_cv_as_bfd_srcdir/configure \
20578 $gcc_cv_as_gas_srcdir/configure \
20579 $gcc_cv_as_gas_srcdir/configure.in \
20580 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20581 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20582 if test x$gcc_cv_gas_version != x; then
20583 break
20584 fi
20585done
20586gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20587gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20588gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20589case $gcc_cv_gas_patch_version in
20590 "") gcc_cv_gas_patch_version="0" ;;
20591esac
20592gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20593 + $gcc_cv_gas_minor_version \) \* 1000 \
20594 + $gcc_cv_gas_patch_version`
20595
20596 in_tree_gas_is_elf=no
20597 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20598 || (grep 'obj_format = multi' ../gas/Makefile \
20599 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20600 then
20601 in_tree_gas_is_elf=yes
20602 fi
20603else
5213506e
RW
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20605$as_echo "$gcc_cv_as" >&6; }
da0f6381
PB
20606 in_tree_gas=no
20607fi
20608
20609# Identify the linker which will work hand-in-glove with the newly
20610# built GCC, so that we can examine its features. This is the linker
20611# which will be driven by the driver program.
20612#
20613# If build != host, and we aren't building gas in-tree, we identify a
20614# build->target linker and hope that it will have the same features
20615# as the host->target linker we'll be using.
20616gcc_cv_gld_major_version=
20617gcc_cv_gld_minor_version=
20618gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20619gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20620
5213506e
RW
20621if test "${gcc_cv_ld+set}" = set; then :
20622
da0f6381
PB
20623else
20624
20625if test -x "$DEFAULT_LINKER"; then
20626 gcc_cv_ld="$DEFAULT_LINKER"
20627elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20628 && test -f ../ld/Makefile \
20629 && test x$build = x$host; then
20630 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20631elif test -x collect-ld$build_exeext; then
20632 # Build using linker in the current directory.
20633 gcc_cv_ld=./collect-ld$build_exeext
20634elif test -x $LD_FOR_TARGET; then
20635 gcc_cv_ld="$LD_FOR_TARGET"
20636else
20637 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20638set dummy $LD_FOR_TARGET; ac_word=$2
5213506e
RW
20639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20640$as_echo_n "checking for $ac_word... " >&6; }
20641if test "${ac_cv_path_gcc_cv_ld+set}" = set; then :
20642 $as_echo_n "(cached) " >&6
d739199a 20643else
e8b05380 20644 case $gcc_cv_ld in
d739199a 20645 [\\/]* | ?:[\\/]*)
e8b05380 20646 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20647 ;;
20648 *)
20649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20650for as_dir in $PATH
20651do
20652 IFS=$as_save_IFS
20653 test -z "$as_dir" && as_dir=.
5213506e
RW
20654 for ac_exec_ext in '' $ac_executable_extensions; do
20655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20656 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
5213506e 20657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20658 break 2
20659 fi
20660done
5213506e
RW
20661 done
20662IFS=$as_save_IFS
d739199a
DJ
20663
20664 ;;
20665esac
20666fi
e8b05380 20667gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 20668if test -n "$gcc_cv_ld"; then
5213506e
RW
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20670$as_echo "$gcc_cv_ld" >&6; }
d739199a 20671else
5213506e
RW
20672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20673$as_echo "no" >&6; }
d739199a
DJ
20674fi
20675
5213506e 20676
d739199a 20677fi
e8b05380
PB
20678fi
20679
5938f74d
L
20680ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
20681PLUGIN_LD=`basename $gcc_cv_ld`
20682
20683# Check whether --with-plugin-ld was given.
20684if test "${with_plugin_ld+set}" = set; then :
20685 withval=$with_plugin_ld; if test x"$withval" != x; then
20686 ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
20687 PLUGIN_LD="$withval"
20688 fi
20689fi
20690
20691
20692
20693cat >>confdefs.h <<_ACEOF
20694#define PLUGIN_LD "$PLUGIN_LD"
20695_ACEOF
20696
20697
1dcc82c2
DK
20698# Check to see if we are using gold instead of ld
20699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5
20700$as_echo_n "checking whether we are using gold... " >&6; }
20701ld_is_gold=no
20702if test x$gcc_cv_ld != x; then
20703 if $gcc_cv_ld --version 2>/dev/null | sed 1q \
20704 | grep "GNU gold" > /dev/null; then
20705 ld_is_gold=yes
20706 fi
20707fi
20708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5
20709$as_echo "$ld_is_gold" >&6; }
20710
e8b05380
PB
20711ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20712
be0fe523
PB
20713case "$ORIGINAL_LD_FOR_TARGET" in
20714 ./collect-ld | ./collect-ld$build_exeext) ;;
5213506e 20715 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20716 ;;
20717esac
e8b05380 20718
5213506e
RW
20719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5
20720$as_echo_n "checking what linker to use... " >&6; }
e8b05380
PB
20721if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20722 # Single tree build which includes ld. We want to prefer it
20723 # over whatever linker top-level may have detected, since
20724 # we'll use what we're building after installation anyway.
5213506e
RW
20725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5
20726$as_echo "newly built ld" >&6; }
e8b05380
PB
20727 in_tree_ld=yes
20728 in_tree_ld_is_elf=no
20729 if (grep 'EMUL = .*elf' ../ld/Makefile \
20730 || grep 'EMUL = .*linux' ../ld/Makefile \
20731 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20732 in_tree_ld_is_elf=yes
20733 fi
20734 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
20735 do
20736 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20737 if test x$gcc_cv_gld_version != x; then
20738 break
20739 fi
20740 done
20741 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20742 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20743else
5213506e
RW
20744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20745$as_echo "$gcc_cv_ld" >&6; }
e8b05380
PB
20746 in_tree_ld=no
20747fi
20748
20749# Figure out what nm we will be using.
20750gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
5213506e
RW
20751if test "${gcc_cv_nm+set}" = set; then :
20752
e8b05380
PB
20753else
20754
20755if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20756 && test -f ../binutils/Makefile \
20757 && test x$build = x$host; then
e8b05380
PB
20758 gcc_cv_nm=../binutils/nm-new$build_exeext
20759elif test -x nm$build_exeext; then
20760 gcc_cv_nm=./nm$build_exeext
20761elif test -x $NM_FOR_TARGET; then
20762 gcc_cv_nm="$NM_FOR_TARGET"
20763else
20764 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20765set dummy $NM_FOR_TARGET; ac_word=$2
5213506e
RW
20766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20767$as_echo_n "checking for $ac_word... " >&6; }
20768if test "${ac_cv_path_gcc_cv_nm+set}" = set; then :
20769 $as_echo_n "(cached) " >&6
d739199a 20770else
e8b05380 20771 case $gcc_cv_nm in
d739199a 20772 [\\/]* | ?:[\\/]*)
e8b05380 20773 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20774 ;;
20775 *)
20776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20777for as_dir in $PATH
20778do
20779 IFS=$as_save_IFS
20780 test -z "$as_dir" && as_dir=.
5213506e
RW
20781 for ac_exec_ext in '' $ac_executable_extensions; do
20782 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20783 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
5213506e 20784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20785 break 2
20786 fi
20787done
5213506e
RW
20788 done
20789IFS=$as_save_IFS
d739199a
DJ
20790
20791 ;;
20792esac
20793fi
e8b05380 20794gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 20795if test -n "$gcc_cv_nm"; then
5213506e
RW
20796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20797$as_echo "$gcc_cv_nm" >&6; }
d739199a 20798else
5213506e
RW
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20800$as_echo "no" >&6; }
d739199a
DJ
20801fi
20802
5213506e 20803
d739199a 20804fi
e8b05380 20805fi
d739199a 20806
5213506e
RW
20807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5
20808$as_echo_n "checking what nm to use... " >&6; }
e8b05380
PB
20809if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20810 # Single tree build which includes binutils.
5213506e
RW
20811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5
20812$as_echo "newly built nm" >&6; }
e8b05380
PB
20813 in_tree_nm=yes
20814else
5213506e
RW
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20816$as_echo "$gcc_cv_nm" >&6; }
e8b05380
PB
20817 in_tree_nm=no
20818fi
20819
20820ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20821
be0fe523
PB
20822case "$ORIGINAL_NM_FOR_TARGET" in
20823 ./nm | ./nm$build_exeext) ;;
5213506e 20824 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20825 ;;
20826esac
20827
e8b05380
PB
20828
20829# Figure out what objdump we will be using.
5213506e
RW
20830if test "${gcc_cv_objdump+set}" = set; then :
20831
e8b05380
PB
20832else
20833
20834if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20835 && test -f ../binutils/Makefile \
20836 && test x$build = x$host; then
e8b05380
PB
20837 # Single tree build which includes binutils.
20838 gcc_cv_objdump=../binutils/objdump$build_exeext
20839elif test -x objdump$build_exeext; then
20840 gcc_cv_objdump=./objdump$build_exeext
20841elif test -x $OBJDUMP_FOR_TARGET; then
20842 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20843else
20844 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20845set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
5213506e
RW
20846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20847$as_echo_n "checking for $ac_word... " >&6; }
20848if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then :
20849 $as_echo_n "(cached) " >&6
9f18db39 20850else
e8b05380 20851 case $gcc_cv_objdump in
9f18db39 20852 [\\/]* | ?:[\\/]*)
e8b05380 20853 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20854 ;;
20855 *)
20856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20857for as_dir in $PATH
9f18db39
PB
20858do
20859 IFS=$as_save_IFS
20860 test -z "$as_dir" && as_dir=.
5213506e
RW
20861 for ac_exec_ext in '' $ac_executable_extensions; do
20862 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20863 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
5213506e 20864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9f18db39
PB
20865 break 2
20866 fi
20867done
5213506e
RW
20868 done
20869IFS=$as_save_IFS
779243f7 20870
9f18db39
PB
20871 ;;
20872esac
20873fi
e8b05380 20874gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 20875if test -n "$gcc_cv_objdump"; then
5213506e
RW
20876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20877$as_echo "$gcc_cv_objdump" >&6; }
9f18db39 20878else
5213506e
RW
20879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20880$as_echo "no" >&6; }
9f18db39
PB
20881fi
20882
5213506e 20883
e8b05380
PB
20884fi
20885fi
9f18db39 20886
5213506e
RW
20887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5
20888$as_echo_n "checking what objdump to use... " >&6; }
e8b05380
PB
20889if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20890 # Single tree build which includes binutils.
5213506e
RW
20891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5
20892$as_echo "newly built objdump" >&6; }
e8b05380 20893elif test x$gcc_cv_objdump = x; then
5213506e
RW
20894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20895$as_echo "not found" >&6; }
e8b05380 20896else
5213506e
RW
20897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20898$as_echo "$gcc_cv_objdump" >&6; }
a2eafc76 20899fi
3cae5780 20900
6e97481b 20901# Figure out what readelf we will be using.
5213506e
RW
20902if test "${gcc_cv_readelf+set}" = set; then :
20903
6e97481b
JJ
20904else
20905
20906if test -f $gcc_cv_binutils_srcdir/configure.in \
20907 && test -f ../binutils/Makefile \
20908 && test x$build = x$host; then
20909 # Single tree build which includes binutils.
20910 gcc_cv_readelf=../binutils/readelf$build_exeext
20911elif test -x readelf$build_exeext; then
20912 gcc_cv_readelf=./readelf$build_exeext
20913else
20914 # Extract the first word of "readelf", so it can be a program name with args.
20915set dummy readelf; ac_word=$2
5213506e
RW
20916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20917$as_echo_n "checking for $ac_word... " >&6; }
20918if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then :
20919 $as_echo_n "(cached) " >&6
6e97481b
JJ
20920else
20921 case $gcc_cv_readelf in
20922 [\\/]* | ?:[\\/]*)
20923 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
20924 ;;
20925 *)
20926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20927for as_dir in $PATH
20928do
20929 IFS=$as_save_IFS
20930 test -z "$as_dir" && as_dir=.
5213506e
RW
20931 for ac_exec_ext in '' $ac_executable_extensions; do
20932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6e97481b 20933 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
5213506e 20934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6e97481b
JJ
20935 break 2
20936 fi
20937done
5213506e
RW
20938 done
20939IFS=$as_save_IFS
6e97481b
JJ
20940
20941 ;;
20942esac
20943fi
20944gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
6e97481b 20945if test -n "$gcc_cv_readelf"; then
5213506e
RW
20946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20947$as_echo "$gcc_cv_readelf" >&6; }
6e97481b 20948else
5213506e
RW
20949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20950$as_echo "no" >&6; }
6e97481b
JJ
20951fi
20952
5213506e 20953
6e97481b
JJ
20954fi
20955fi
20956
5213506e
RW
20957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
20958$as_echo_n "checking what readelf to use... " >&6; }
6e97481b
JJ
20959if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
20960 # Single tree build which includes binutils.
5213506e
RW
20961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5
20962$as_echo "newly built readelf" >&6; }
6e97481b 20963elif test x$gcc_cv_readelf = x; then
5213506e
RW
20964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20965$as_echo "not found" >&6; }
6e97481b 20966else
5213506e
RW
20967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20968$as_echo "$gcc_cv_readelf" >&6; }
6e97481b
JJ
20969fi
20970
981d4858 20971# Figure out what assembler alignment features are present.
e0b0fd74
L
20972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5
20973$as_echo_n "checking assembler flags... " >&6; }
20974if test "${gcc_cv_as_flags+set}" = set; then :
20975 $as_echo_n "(cached) " >&6
20976else
20977 case "$target" in
20978 i[34567]86-*-linux*)
20979 gcc_cv_as_flags="--32"
20980 ;;
20981 *)
20982 gcc_cv_as_flags=" "
20983 ;;
20984 esac
20985fi
20986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_flags" >&5
20987$as_echo "$gcc_cv_as_flags" >&6; }
20988
5213506e
RW
20989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5
20990$as_echo_n "checking assembler for .balign and .p2align... " >&6; }
20991if test "${gcc_cv_as_balign_and_p2align+set}" = set; then :
20992 $as_echo_n "(cached) " >&6
8ada417f
ZW
20993else
20994 gcc_cv_as_balign_and_p2align=no
20995 if test $in_tree_gas = yes; then
20996 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20997 then gcc_cv_as_balign_and_p2align=yes
20998fi
20999 elif test x$gcc_cv_as != x; then
6e3f3080 21000 echo '.balign 4
8ada417f 21001.p2align 2' > conftest.s
e0b0fd74 21002 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21003 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21004 (eval $ac_try) 2>&5
21005 ac_status=$?
5213506e
RW
21006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21007 test $ac_status = 0; }; }
8ada417f
ZW
21008 then
21009 gcc_cv_as_balign_and_p2align=yes
21010 else
21011 echo "configure: failed program was" >&5
21012 cat conftest.s >&5
21013 fi
21014 rm -f conftest.o conftest.s
21015 fi
21016fi
5213506e
RW
21017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5
21018$as_echo "$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 21019if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2 21020
5213506e 21021$as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
981d4858 21022
ad9c4d9f
NN
21023fi
21024
5213506e
RW
21025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
21026$as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
21027if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
21028 $as_echo_n "(cached) " >&6
8ada417f
ZW
21029else
21030 gcc_cv_as_max_skip_p2align=no
21031 if test $in_tree_gas = yes; then
21032 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21033 then gcc_cv_as_max_skip_p2align=yes
21034fi
21035 elif test x$gcc_cv_as != x; then
6e3f3080 21036 echo '.p2align 4,,7' > conftest.s
e0b0fd74 21037 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21038 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21039 (eval $ac_try) 2>&5
21040 ac_status=$?
5213506e
RW
21041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21042 test $ac_status = 0; }; }
8ada417f
ZW
21043 then
21044 gcc_cv_as_max_skip_p2align=yes
21045 else
21046 echo "configure: failed program was" >&5
21047 cat conftest.s >&5
21048 fi
21049 rm -f conftest.o conftest.s
21050 fi
ad9c4d9f 21051fi
5213506e
RW
21052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5
21053$as_echo "$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 21054if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2 21055
5213506e 21056$as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
9e423e6d 21057
9e423e6d 21058fi
ad9c4d9f 21059
5213506e
RW
21060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
21061$as_echo_n "checking assembler for .literal16... " >&6; }
21062if test "${gcc_cv_as_literal16+set}" = set; then :
21063 $as_echo_n "(cached) " >&6
5708d18d
MS
21064else
21065 gcc_cv_as_literal16=no
21066 if test $in_tree_gas = yes; then
21067 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21068 then gcc_cv_as_literal16=yes
21069fi
21070 elif test x$gcc_cv_as != x; then
21071 echo '.literal16' > conftest.s
e0b0fd74 21072 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21073 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
5708d18d
MS
21074 (eval $ac_try) 2>&5
21075 ac_status=$?
5213506e
RW
21076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21077 test $ac_status = 0; }; }
5708d18d
MS
21078 then
21079 gcc_cv_as_literal16=yes
21080 else
21081 echo "configure: failed program was" >&5
21082 cat conftest.s >&5
21083 fi
21084 rm -f conftest.o conftest.s
21085 fi
21086fi
5213506e
RW
21087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5
21088$as_echo "$gcc_cv_as_literal16" >&6; }
5708d18d
MS
21089if test $gcc_cv_as_literal16 = yes; then
21090
5213506e 21091$as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
5708d18d
MS
21092
21093fi
21094
5213506e
RW
21095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
21096$as_echo_n "checking assembler for working .subsection -1... " >&6; }
21097if test "${gcc_cv_as_subsection_m1+set}" = set; then :
21098 $as_echo_n "(cached) " >&6
8ada417f
ZW
21099else
21100 gcc_cv_as_subsection_m1=no
21101 if test $in_tree_gas = yes; then
21102 if test $in_tree_gas_is_elf = yes \
21103 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21104 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 21105fi
8ada417f 21106 elif test x$gcc_cv_as != x; then
6e3f3080 21107 echo 'conftest_label1: .word 0
d1accaa3
JJ
21108.subsection -1
21109conftest_label2: .word 0
8ada417f 21110.previous' > conftest.s
e0b0fd74 21111 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21112 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21113 (eval $ac_try) 2>&5
21114 ac_status=$?
5213506e
RW
21115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21116 test $ac_status = 0; }; }
8ada417f
ZW
21117 then
21118 if test x$gcc_cv_nm != x; then
21119 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
21120 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
21121 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
21122 then :
21123 else gcc_cv_as_subsection_m1=yes
21124 fi
21125 rm -f conftest.nm1 conftest.nm2
21126 fi
21127 else
21128 echo "configure: failed program was" >&5
21129 cat conftest.s >&5
21130 fi
21131 rm -f conftest.o conftest.s
21132 fi
981d4858 21133fi
5213506e
RW
21134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5
21135$as_echo "$gcc_cv_as_subsection_m1" >&6; }
63cf211a 21136if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2 21137
5213506e 21138$as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
981d4858 21139
d1accaa3 21140fi
ad9c4d9f 21141
5213506e
RW
21142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
21143$as_echo_n "checking assembler for .weak... " >&6; }
21144if test "${gcc_cv_as_weak+set}" = set; then :
21145 $as_echo_n "(cached) " >&6
8ada417f
ZW
21146else
21147 gcc_cv_as_weak=no
21148 if test $in_tree_gas = yes; then
21149 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
21150 then gcc_cv_as_weak=yes
ad9c4d9f 21151fi
8ada417f 21152 elif test x$gcc_cv_as != x; then
6e3f3080 21153 echo ' .weak foobar' > conftest.s
e0b0fd74 21154 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21155 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21156 (eval $ac_try) 2>&5
21157 ac_status=$?
5213506e
RW
21158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21159 test $ac_status = 0; }; }
8ada417f
ZW
21160 then
21161 gcc_cv_as_weak=yes
21162 else
21163 echo "configure: failed program was" >&5
21164 cat conftest.s >&5
21165 fi
21166 rm -f conftest.o conftest.s
21167 fi
981d4858 21168fi
5213506e
RW
21169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5
21170$as_echo "$gcc_cv_as_weak" >&6; }
63cf211a 21171if test $gcc_cv_as_weak = yes; then
ba479fd2 21172
5213506e 21173$as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
981d4858 21174
12822146 21175fi
ad9c4d9f 21176
5213506e
RW
21177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
21178$as_echo_n "checking assembler for .weakref... " >&6; }
21179if test "${gcc_cv_as_weakref+set}" = set; then :
21180 $as_echo_n "(cached) " >&6
a0203ca7
AO
21181else
21182 gcc_cv_as_weakref=no
21183 if test $in_tree_gas = yes; then
21184 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
21185 then gcc_cv_as_weakref=yes
21186fi
21187 elif test x$gcc_cv_as != x; then
21188 echo ' .weakref foobar, barfnot' > conftest.s
e0b0fd74 21189 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21190 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a0203ca7
AO
21191 (eval $ac_try) 2>&5
21192 ac_status=$?
5213506e
RW
21193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21194 test $ac_status = 0; }; }
a0203ca7
AO
21195 then
21196 gcc_cv_as_weakref=yes
21197 else
21198 echo "configure: failed program was" >&5
21199 cat conftest.s >&5
21200 fi
21201 rm -f conftest.o conftest.s
21202 fi
21203fi
5213506e
RW
21204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5
21205$as_echo "$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
21206if test $gcc_cv_as_weakref = yes; then
21207
5213506e 21208$as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
a0203ca7
AO
21209
21210fi
21211
5213506e
RW
21212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
21213$as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
21214if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
21215 $as_echo_n "(cached) " >&6
e41f3691
JDA
21216else
21217 gcc_cv_as_nsubspa_comdat=no
21218 if test $in_tree_gas = yes; then
21219 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21220 then gcc_cv_as_nsubspa_comdat=yes
21221fi
21222 elif test x$gcc_cv_as != x; then
21223 echo ' .SPACE $TEXT$
21224 .NSUBSPA $CODE$,COMDAT' > conftest.s
e0b0fd74 21225 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21226 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e41f3691
JDA
21227 (eval $ac_try) 2>&5
21228 ac_status=$?
5213506e
RW
21229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21230 test $ac_status = 0; }; }
e41f3691
JDA
21231 then
21232 gcc_cv_as_nsubspa_comdat=yes
21233 else
21234 echo "configure: failed program was" >&5
21235 cat conftest.s >&5
21236 fi
21237 rm -f conftest.o conftest.s
21238 fi
21239fi
5213506e
RW
21240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5
21241$as_echo "$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
21242if test $gcc_cv_as_nsubspa_comdat = yes; then
21243
5213506e 21244$as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
e41f3691
JDA
21245
21246fi
21247
8ada417f
ZW
21248# .hidden needs to be supported in both the assembler and the linker,
21249# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
21250# This is irritatingly difficult to feature test for; we have to check the
21251# date string after the version number. If we've got an in-tree
21252# ld, we don't know its patchlevel version, so we set the baseline at 2.13
21253# to be safe.
21254# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
5213506e
RW
21255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5
21256$as_echo_n "checking assembler for .hidden... " >&6; }
21257if test "${gcc_cv_as_hidden+set}" = set; then :
21258 $as_echo_n "(cached) " >&6
8ada417f
ZW
21259else
21260 gcc_cv_as_hidden=no
21261 if test $in_tree_gas = yes; then
21262 if test $in_tree_gas_is_elf = yes \
21263 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
21264 then gcc_cv_as_hidden=yes
21265fi
21266 elif test x$gcc_cv_as != x; then
6e3f3080 21267 echo ' .hidden foobar
8ada417f 21268foobar:' > conftest.s
e0b0fd74 21269 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21270 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21271 (eval $ac_try) 2>&5
21272 ac_status=$?
5213506e
RW
21273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21274 test $ac_status = 0; }; }
8ada417f 21275 then
ed104137
RO
21276
21277# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with
21278# STV_HIDDEN, so disable .hidden support if so.
21279case "${target}" in
21280 i?86-*-solaris2*)
21281 if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then
21282 cat > conftest.s <<EOF
21283.globl hidden
21284 .hidden hidden
21285hidden:
21286.globl default
21287 .set default,hidden
21288EOF
21289 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
21290 && $gcc_cv_objdump -t conftest.o 2>/dev/null | \
21291 grep '\.hidden default' > /dev/null; then
21292 gcc_cv_as_hidden=no
21293 else
21294 gcc_cv_as_hidden=yes
21295 fi
21296 else
21297 # Assume bug is present if objdump is missing.
21298 gcc_cv_as_hidden=no
21299 fi
21300 ;;
21301 *)
21302 gcc_cv_as_hidden=yes
21303 ;;
21304esac
8ada417f
ZW
21305 else
21306 echo "configure: failed program was" >&5
21307 cat conftest.s >&5
21308 fi
21309 rm -f conftest.o conftest.s
21310 fi
21311fi
5213506e
RW
21312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
21313$as_echo "$gcc_cv_as_hidden" >&6; }
63cf211a 21314
ad9c4d9f 21315
ba885ec5
NS
21316# gnu_indirect_function type is an extension proposed at
21317# http://groups.google/com/group/generic-abi/files. It allows dynamic runtime
21318# selection of function implementation
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_indirect_function" >&5
21320$as_echo_n "checking assembler for gnu_indirect_function... " >&6; }
21321if test "${gcc_cv_as_indirect_function+set}" = set; then :
21322 $as_echo_n "(cached) " >&6
21323else
21324 gcc_cv_as_indirect_function=no
21325 if test $in_tree_gas = yes; then
21326 if test $in_tree_gas_is_elf = yes \
21327 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1`
21328 then gcc_cv_as_indirect_function=yes
21329fi
21330 elif test x$gcc_cv_as != x; then
21331 echo ' .type Foo, @gnu_indirect_function
21332Foo:' > conftest.s
21333 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
21334 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
21335 (eval $ac_try) 2>&5
21336 ac_status=$?
21337 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21338 test $ac_status = 0; }; }
21339 then
21340 gcc_cv_as_indirect_function=yes
21341 else
21342 echo "configure: failed program was" >&5
21343 cat conftest.s >&5
21344 fi
21345 rm -f conftest.o conftest.s
21346 fi
21347fi
21348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_indirect_function" >&5
21349$as_echo "$gcc_cv_as_indirect_function" >&6; }
21350
21351
21352if test $gcc_cv_as_indirect_function = yes ; then
21353
21354$as_echo "#define HAVE_GAS_INDIRECT_FUNCTION 1" >>confdefs.h
21355
21356fi
21357
10ca6198
JJ
21358if test $in_tree_ld != yes ; then
21359 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
1dcc82c2
DK
21360 if test x"$ld_is_gold" = xyes; then
21361 gcc_cv_ld_hidden=yes
21362 elif echo "$ld_ver" | grep GNU > /dev/null; then
10ca6198
JJ
21363 ld_vers=`echo $ld_ver | sed -n \
21364 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
21365 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'`
21366 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21367 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21368 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
55c4f715
RO
21369 else
21370 case "${target}" in
21371 *-*-solaris2*)
21372 #
21373 # Solaris 2 ld -V output looks like this for a regular version:
21374 #
21375 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
21376 #
21377 # but test versions add stuff at the end:
21378 #
21379 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
21380 #
21381 ld_ver=`$gcc_cv_ld -V 2>&1`
21382 if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
21383 ld_vers=`echo $ld_ver | sed -n \
21384 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
21385 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21386 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21387 fi
21388 ;;
21389 esac
10ca6198
JJ
21390 fi
21391fi
21392
5213506e
RW
21393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5
21394$as_echo_n "checking linker for .hidden support... " >&6; }
21395if test "${gcc_cv_ld_hidden+set}" = set; then :
21396 $as_echo_n "(cached) " >&6
8ada417f
ZW
21397else
21398 if test $in_tree_ld = yes ; then
21399 gcc_cv_ld_hidden=no
21400 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 \
21401 && test $in_tree_ld_is_elf = yes; then
21402 gcc_cv_ld_hidden=yes
21403 fi
21404else
21405 gcc_cv_ld_hidden=yes
8ada417f 21406 if echo "$ld_ver" | grep GNU > /dev/null; then
8ada417f
ZW
21407 if test 0"$ld_date" -lt 20020404; then
21408 if test -n "$ld_date"; then
21409 # If there was date string, but was earlier than 2002-04-04, fail
21410 gcc_cv_ld_hidden=no
21411 elif test -z "$ld_vers"; then
21412 # If there was no date string nor ld version number, something is wrong
21413 gcc_cv_ld_hidden=no
21414 else
8ada417f
ZW
21415 test -z "$ld_vers_patch" && ld_vers_patch=0
21416 if test "$ld_vers_major" -lt 2; then
21417 gcc_cv_ld_hidden=no
21418 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
21419 gcc_cv_ld_hidden="no"
21420 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
21421 gcc_cv_ld_hidden=no
c72931a6 21422 fi
8ada417f 21423 fi
789b7de5 21424 fi
8ada417f 21425 else
28690784 21426 case "${target}" in
b0fd7d27 21427 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
21428 gcc_cv_ld_hidden=yes
21429 ;;
5e87dc23 21430 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
a93e1899
RO
21431 # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but
21432 # .symbolic was only added in Solaris 9 12/02.
5e87dc23
RO
21433 gcc_cv_ld_hidden=yes
21434 ;;
28690784
JDA
21435 *)
21436 gcc_cv_ld_hidden=no
21437 ;;
21438 esac
8ada417f
ZW
21439 fi
21440fi
6d07784a 21441fi
5213506e
RW
21442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5
21443$as_echo "$gcc_cv_ld_hidden" >&6; }
8ada417f 21444libgcc_visibility=no
ad9c4d9f 21445
232b67d9 21446
8e3940b2 21447if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 21448 libgcc_visibility=yes
ba479fd2 21449
5213506e 21450$as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h
ad9c4d9f
NN
21451
21452fi
21453
5213506e
RW
21454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5
21455$as_echo_n "checking linker read-only and read-write section mixing... " >&6; }
e73da78e
RO
21456gcc_cv_ld_ro_rw_mix=unknown
21457if test $in_tree_ld = yes ; then
21458 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 \
21459 && test $in_tree_ld_is_elf = yes; then
21460 gcc_cv_ld_ro_rw_mix=read-write
21461 fi
21462elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
21463 echo '.section myfoosect, "a"' > conftest1.s
21464 echo '.section myfoosect, "aw"' > conftest2.s
21465 echo '.byte 1' >> conftest2.s
21466 echo '.section myfoosect, "a"' > conftest3.s
21467 echo '.byte 0' >> conftest3.s
21468 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
21469 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
21470 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
21471 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
21472 conftest2.o conftest3.o > /dev/null 2>&1; then
21473 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
21474 | sed -e '/myfoosect/!d' -e N`
21475 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
21476 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
21477 gcc_cv_ld_ro_rw_mix=read-only
21478 else
21479 gcc_cv_ld_ro_rw_mix=read-write
21480 fi
21481 fi
21482 fi
21483 rm -f conftest.* conftest[123].*
21484fi
21485if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
21486
5213506e 21487$as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h
e73da78e
RO
21488
21489fi
5213506e
RW
21490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5
21491$as_echo "$gcc_cv_ld_ro_rw_mix" >&6; }
e73da78e 21492
8ada417f 21493# Check if we have .[us]leb128, and support symbol arithmetic with it.
5213506e
RW
21494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5
21495$as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; }
21496if test "${gcc_cv_as_leb128+set}" = set; then :
21497 $as_echo_n "(cached) " >&6
8ada417f
ZW
21498else
21499 gcc_cv_as_leb128=no
21500 if test $in_tree_gas = yes; then
21501 if test $in_tree_gas_is_elf = yes \
21502 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
21503 then gcc_cv_as_leb128=yes
21504fi
21505 elif test x$gcc_cv_as != x; then
6e3f3080 21506 echo ' .data
b7460f24
RH
21507 .uleb128 L2 - L1
21508L1:
21509 .uleb128 1280
21510 .sleb128 -1010
8ada417f 21511L2:' > conftest.s
e0b0fd74 21512 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21513 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21514 (eval $ac_try) 2>&5
21515 ac_status=$?
5213506e
RW
21516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21517 test $ac_status = 0; }; }
8ada417f
ZW
21518 then
21519 # GAS versions before 2.11 do not support uleb128,
21520 # despite appearing to.
21521 # ??? There exists an elf-specific test that will crash
21522 # the assembler. Perhaps it's better to figure out whether
21523 # arbitrary sections are supported and try the test.
bace148a 21524 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 21525 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 21526 as_vers=`echo $as_ver | sed -n \
115e6e55 21527 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
21528 as_major=`expr "$as_vers" : '\([0-9]*\)'`
21529 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21530 if test $as_major -eq 2 && test $as_minor -lt 11
21531 then :
21532 else gcc_cv_as_leb128=yes
21533 fi
21534 fi
21535 else
21536 echo "configure: failed program was" >&5
21537 cat conftest.s >&5
21538 fi
21539 rm -f conftest.o conftest.s
21540 fi
b7460f24 21541fi
5213506e
RW
21542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5
21543$as_echo "$gcc_cv_as_leb128" >&6; }
63cf211a 21544if test $gcc_cv_as_leb128 = yes; then
ba479fd2 21545
5213506e 21546$as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
b7460f24
RH
21547
21548fi
ad9c4d9f 21549
d4ea4622 21550# Check if we have assembler support for unwind directives.
5213506e
RW
21551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
21552$as_echo_n "checking assembler for cfi directives... " >&6; }
21553if test "${gcc_cv_as_cfi_directive+set}" = set; then :
21554 $as_echo_n "(cached) " >&6
d4ea4622
RH
21555else
21556 gcc_cv_as_cfi_directive=no
6e60703f 21557 if test x$gcc_cv_as != x; then
d4ea4622
RH
21558 echo ' .text
21559 .cfi_startproc
21560 .cfi_offset 0, 0
21561 .cfi_same_value 1
21562 .cfi_def_cfa 1, 2
21563 .cfi_escape 1, 2, 3, 4, 5
21564 .cfi_endproc' > conftest.s
e0b0fd74 21565 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21566 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d4ea4622
RH
21567 (eval $ac_try) 2>&5
21568 ac_status=$?
5213506e
RW
21569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21570 test $ac_status = 0; }; }
d4ea4622 21571 then
e73da78e
RO
21572 case "$target" in
21573 *-*-solaris*)
21574 # If the linker used on Solaris (like Sun ld) isn't capable of merging
21575 # read-only and read-write sections, we need to make sure that the
21576 # assembler used emits read-write .eh_frame sections.
21577 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
21578 if test "x$gcc_cv_objdump" != x; then
21579 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21580 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
21581 gcc_cv_as_cfi_directive=no
21582 else
eb2573ee
RO
21583 case "$target" in
21584 i?86-*-solaris2.1[0-9]*)
21585 # On Solaris/x86, make sure that GCC and gas agree on using
21586 # read-only .eh_frame sections for 64-bit.
21587 if $gcc_cv_as --64 -o conftest.o conftest.s > /dev/null 2>&1 && \
21588 $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21589 sed -e /.eh_frame/!d -e N | \
21590 grep READONLY > /dev/null; then
21591 gcc_cv_as_cfi_directive=yes
21592 else
21593 gcc_cv_as_cfi_directive=no
21594 fi
21595 ;;
21596 *)
21597 gcc_cv_as_cfi_directive=yes
21598 ;;
21599 esac
e73da78e
RO
21600 fi
21601 else
21602 # no objdump, err on the side of caution
21603 gcc_cv_as_cfi_directive=no
21604 fi
21605 else
21606 gcc_cv_as_cfi_directive=yes
21607 fi
21608 ;;
21609 *-*-*)
21610 gcc_cv_as_cfi_directive=yes
21611 ;;
21612esac
d4ea4622
RH
21613 else
21614 echo "configure: failed program was" >&5
21615 cat conftest.s >&5
21616 fi
21617 rm -f conftest.o conftest.s
21618 fi
21619fi
5213506e
RW
21620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
21621$as_echo "$gcc_cv_as_cfi_directive" >&6; }
d4ea4622 21622
92053f38 21623if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then
5213506e
RW
21624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
21625$as_echo_n "checking assembler for working cfi advance... " >&6; }
21626if test "${gcc_cv_as_cfi_advance_working+set}" = set; then :
21627 $as_echo_n "(cached) " >&6
6e97481b
JJ
21628else
21629 gcc_cv_as_cfi_advance_working=no
21630 if test x$gcc_cv_as != x; then
21631 echo ' .text
21632 .cfi_startproc
21633 .cfi_adjust_cfa_offset 64
7ac22e17 21634 .skip 75040, 0
6e97481b
JJ
21635 .cfi_adjust_cfa_offset 128
21636 .cfi_endproc' > conftest.s
e0b0fd74 21637 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21638 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6e97481b
JJ
21639 (eval $ac_try) 2>&5
21640 ac_status=$?
5213506e
RW
21641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21642 test $ac_status = 0; }; }
6e97481b
JJ
21643 then
21644
92053f38 21645if $gcc_cv_objdump -Wf conftest.o 2>/dev/null \
7ac22e17 21646 | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then
6e97481b
JJ
21647 gcc_cv_as_cfi_advance_working=yes
21648fi
21649
21650 else
21651 echo "configure: failed program was" >&5
21652 cat conftest.s >&5
21653 fi
21654 rm -f conftest.o conftest.s
21655 fi
21656fi
5213506e
RW
21657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
21658$as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
6e97481b
JJ
21659
21660else
92053f38 21661 # no objdump, err on the side of caution
66f91112 21662 gcc_cv_as_cfi_advance_working=no
6e97481b 21663fi
d4ea4622 21664
174425ad 21665
d4ea4622 21666cat >>confdefs.h <<_ACEOF
6e97481b
JJ
21667#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
21668 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
21669_ACEOF
21670
21671
174425ad 21672
5213506e
RW
21673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5
21674$as_echo_n "checking assembler for cfi personality directive... " >&6; }
21675if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then :
21676 $as_echo_n "(cached) " >&6
058514b3
RH
21677else
21678 gcc_cv_as_cfi_personality_directive=no
6e60703f 21679 if test x$gcc_cv_as != x; then
058514b3 21680 echo ' .text
042628f9 21681 .cfi_startproc
058514b3
RH
21682 .cfi_personality 0, symbol
21683 .cfi_endproc' > conftest.s
e0b0fd74 21684 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21685 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
058514b3
RH
21686 (eval $ac_try) 2>&5
21687 ac_status=$?
5213506e
RW
21688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21689 test $ac_status = 0; }; }
058514b3
RH
21690 then
21691 gcc_cv_as_cfi_personality_directive=yes
21692 else
21693 echo "configure: failed program was" >&5
21694 cat conftest.s >&5
21695 fi
21696 rm -f conftest.o conftest.s
21697 fi
21698fi
5213506e
RW
21699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5
21700$as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
058514b3
RH
21701
21702
21703cat >>confdefs.h <<_ACEOF
21704#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
21705 then echo 1; else echo 0; fi`
21706_ACEOF
21707
21708
7d45fb94
JJ
21709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5
21710$as_echo_n "checking assembler for cfi sections directive... " >&6; }
21711if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then :
21712 $as_echo_n "(cached) " >&6
21713else
21714 gcc_cv_as_cfi_sections_directive=no
21715 if test x$gcc_cv_as != x; then
21716 echo ' .text
21717 .cfi_sections .debug_frame, .eh_frame
21718 .cfi_startproc
21719 .cfi_endproc' > conftest.s
e0b0fd74 21720 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
7d45fb94
JJ
21721 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
21722 (eval $ac_try) 2>&5
21723 ac_status=$?
21724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21725 test $ac_status = 0; }; }
21726 then
92053f38
RH
21727 case $target_os in
21728 win32 | pe | cygwin* | mingw32* | uwin*)
21729 # Need to check that we generated the correct relocation for the
21730 # .debug_frame section. This was fixed for binutils 2.21.
21731 gcc_cv_as_cfi_sections_directive=no
21732 if test "x$gcc_cv_objdump" != x; then
21733 if $gcc_cv_objdump -j .debug_frame -r conftest.o 2>/dev/null | \
21734 grep secrel > /dev/null; then
21735 gcc_cv_as_cfi_sections_directive=yes
21736 fi
21737 fi
21738 ;;
21739 *)
21740 gcc_cv_as_cfi_sections_directive=yes
21741 ;;
21742esac
7d45fb94
JJ
21743 else
21744 echo "configure: failed program was" >&5
21745 cat conftest.s >&5
21746 fi
21747 rm -f conftest.o conftest.s
21748 fi
21749fi
21750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5
21751$as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
21752
21753
174425ad 21754
7d45fb94
JJ
21755cat >>confdefs.h <<_ACEOF
21756#define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
21757 then echo 1; else echo 0; fi`
21758_ACEOF
21759
21760
8ada417f
ZW
21761# GAS versions up to and including 2.11.0 may mis-optimize
21762# .eh_frame data.
5213506e
RW
21763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5
21764$as_echo_n "checking assembler for eh_frame optimization... " >&6; }
21765if test "${gcc_cv_as_eh_frame+set}" = set; then :
21766 $as_echo_n "(cached) " >&6
8ada417f
ZW
21767else
21768 gcc_cv_as_eh_frame=no
21769 if test $in_tree_gas = yes; then
21770 if test $in_tree_gas_is_elf = yes \
21771 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21772 then gcc_cv_as_eh_frame=yes
ad9c4d9f 21773fi
8ada417f 21774 elif test x$gcc_cv_as != x; then
6e3f3080 21775 echo ' .text
c64688ae
RH
21776.LFB1:
21777 .4byte 0
21778.L1:
21779 .4byte 0
21780.LFE1:
21781 .section .eh_frame,"aw",@progbits
21782__FRAME_BEGIN__:
21783 .4byte .LECIE1-.LSCIE1
21784.LSCIE1:
21785 .4byte 0x0
21786 .byte 0x1
21787 .ascii "z\0"
21788 .byte 0x1
21789 .byte 0x78
21790 .byte 0x1a
21791 .byte 0x0
21792 .byte 0x4
21793 .4byte 1
21794 .p2align 1
21795.LECIE1:
21796.LSFDE1:
21797 .4byte .LEFDE1-.LASFDE1
21798.LASFDE1:
21799 .4byte .LASFDE1-__FRAME_BEGIN__
21800 .4byte .LFB1
21801 .4byte .LFE1-.LFB1
21802 .byte 0x4
21803 .4byte .LFE1-.LFB1
21804 .byte 0x4
21805 .4byte .L1-.LFB1
8ada417f 21806.LEFDE1:' > conftest.s
e0b0fd74 21807 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21808 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21809 (eval $ac_try) 2>&5
21810 ac_status=$?
5213506e
RW
21811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21812 test $ac_status = 0; }; }
8ada417f
ZW
21813 then
21814 cat > conftest.lit <<EOF
c64688ae
RH
21815 0000 10000000 00000000 017a0001 781a0004 .........z..x...
21816 0010 01000000 12000000 18000000 00000000 ................
093e61a6 21817 0020 08000000 04080000 0044 .........D
01efb963 21818EOF
ba479fd2 21819cat > conftest.big <<EOF
01efb963
AS
21820 0000 00000010 00000000 017a0001 781a0004 .........z..x...
21821 0010 00000001 00000012 00000018 00000000 ................
093e61a6 21822 0020 00000008 04000000 0844 .........D
c64688ae 21823EOF
8ada417f
ZW
21824 # If the assembler didn't choke, and we can objdump,
21825 # and we got the correct data, then succeed.
dbc02e7f
AS
21826 # The text in the here-document typically retains its unix-style line
21827 # endings, while the output of objdump will use host line endings.
21828 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
21829 if test x$gcc_cv_objdump != x \
21830 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21831 | tail -3 > conftest.got \
dbc02e7f
AS
21832 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21833 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21834 then
21835 gcc_cv_as_eh_frame=yes
ba479fd2 21836 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
5213506e 21837 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21838 (eval $ac_try) 2>&5
21839 ac_status=$?
5213506e
RW
21840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21841 test $ac_status = 0; }; }; then
8ada417f
ZW
21842 gcc_cv_as_eh_frame=buggy
21843 else
21844 # Uh oh, what do we do now?
21845 gcc_cv_as_eh_frame=no
21846 fi
21847 else
21848 echo "configure: failed program was" >&5
21849 cat conftest.s >&5
21850 fi
21851 rm -f conftest.o conftest.s
21852 fi
c64688ae 21853fi
5213506e
RW
21854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5
21855$as_echo "$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 21856
6e3f3080 21857
63cf211a 21858if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2 21859
5213506e 21860$as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
ad9c4d9f
NN
21861
21862fi
21863
5213506e
RW
21864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21865$as_echo_n "checking assembler for section merging support... " >&6; }
21866if test "${gcc_cv_as_shf_merge+set}" = set; then :
21867 $as_echo_n "(cached) " >&6
8ada417f
ZW
21868else
21869 gcc_cv_as_shf_merge=no
21870 if test $in_tree_gas = yes; then
21871 if test $in_tree_gas_is_elf = yes \
21872 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21873 then gcc_cv_as_shf_merge=yes
21874fi
21875 elif test x$gcc_cv_as != x; then
6e3f3080 21876 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
e0b0fd74 21877 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21878 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21879 (eval $ac_try) 2>&5
21880 ac_status=$?
5213506e
RW
21881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21882 test $ac_status = 0; }; }
8ada417f
ZW
21883 then
21884 gcc_cv_as_shf_merge=yes
21885 else
21886 echo "configure: failed program was" >&5
21887 cat conftest.s >&5
21888 fi
21889 rm -f conftest.o conftest.s
21890 fi
201556f0 21891fi
5213506e
RW
21892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21893$as_echo "$gcc_cv_as_shf_merge" >&6; }
8ada417f 21894
c18a5b6c 21895if test $gcc_cv_as_shf_merge = no; then
5213506e
RW
21896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21897$as_echo_n "checking assembler for section merging support... " >&6; }
21898if test "${gcc_cv_as_shf_merge+set}" = set; then :
21899 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21900else
21901 gcc_cv_as_shf_merge=no
21902 if test $in_tree_gas = yes; then
21903 if test $in_tree_gas_is_elf = yes \
21904 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21905 then gcc_cv_as_shf_merge=yes
21906fi
21907 elif test x$gcc_cv_as != x; then
21908 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
e0b0fd74 21909 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21910 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21911 (eval $ac_try) 2>&5
21912 ac_status=$?
5213506e
RW
21913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21914 test $ac_status = 0; }; }
c18a5b6c
MM
21915 then
21916 gcc_cv_as_shf_merge=yes
21917 else
21918 echo "configure: failed program was" >&5
21919 cat conftest.s >&5
21920 fi
21921 rm -f conftest.o conftest.s
21922 fi
21923fi
5213506e
RW
21924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21925$as_echo "$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
21926
21927fi
8ad9fb33 21928
ba479fd2 21929cat >>confdefs.h <<_ACEOF
8ad9fb33 21930#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21931_ACEOF
201556f0 21932
201556f0 21933
5213506e
RW
21934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21935$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21936if test "${gcc_cv_as_comdat_group+set}" = set; then :
21937 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21938else
21939 gcc_cv_as_comdat_group=no
21940 if test $in_tree_gas = yes; then
21941 if test $in_tree_gas_is_elf = yes \
11176d2a 21942 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21943 then gcc_cv_as_comdat_group=yes
21944fi
21945 elif test x$gcc_cv_as != x; then
21946 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
e0b0fd74 21947 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21948 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21949 (eval $ac_try) 2>&5
21950 ac_status=$?
5213506e
RW
21951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21952 test $ac_status = 0; }; }
c18a5b6c
MM
21953 then
21954 gcc_cv_as_comdat_group=yes
21955 else
21956 echo "configure: failed program was" >&5
21957 cat conftest.s >&5
21958 fi
21959 rm -f conftest.o conftest.s
21960 fi
21961fi
5213506e
RW
21962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
21963$as_echo "$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
21964
21965if test $gcc_cv_as_comdat_group = yes; then
21966 gcc_cv_as_comdat_group_percent=no
21967else
5213506e
RW
21968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21969$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21970if test "${gcc_cv_as_comdat_group_percent+set}" = set; then :
21971 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21972else
21973 gcc_cv_as_comdat_group_percent=no
21974 if test $in_tree_gas = yes; then
21975 if test $in_tree_gas_is_elf = yes \
11176d2a 21976 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21977 then gcc_cv_as_comdat_group_percent=yes
21978fi
21979 elif test x$gcc_cv_as != x; then
21980 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
e0b0fd74 21981 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21982 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21983 (eval $ac_try) 2>&5
21984 ac_status=$?
5213506e
RW
21985 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21986 test $ac_status = 0; }; }
c18a5b6c
MM
21987 then
21988 gcc_cv_as_comdat_group_percent=yes
21989 else
21990 echo "configure: failed program was" >&5
21991 cat conftest.s >&5
21992 fi
21993 rm -f conftest.o conftest.s
21994 fi
21995fi
5213506e
RW
21996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
21997$as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
21998
21999fi
1dcc82c2
DK
22000if test x"$ld_is_gold" = xyes; then
22001 comdat_group=yes
22002elif test $in_tree_ld = yes ; then
39ba7b7d
JB
22003 comdat_group=no
22004 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 \
22005 && test $in_tree_ld_is_elf = yes; then
22006 comdat_group=yes
22007 fi
55c4f715 22008elif echo "$ld_ver" | grep GNU > /dev/null; then
11176d2a
JB
22009 comdat_group=yes
22010 if test 0"$ld_date" -lt 20050308; then
22011 if test -n "$ld_date"; then
22012 # If there was date string, but was earlier than 2005-03-08, fail
22013 comdat_group=no
22014 elif test "$ld_vers_major" -lt 2; then
22015 comdat_group=no
22016 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
22017 comdat_group=no
22018 fi
22019 fi
1cf0118d 22020else
55c4f715
RO
22021 case "${target}" in
22022 *-*-solaris2.1[1-9]*)
22023 # Sun ld has COMDAT group support since Solaris 9, but it doesn't
22024 # interoperate with GNU as until Solaris 11 build 130, i.e. ld
22025 # version 1.688.
22026 #
22027 # FIXME: Maybe need to refine later when COMDAT group support with
22028 # Sun as is implemented.
22029 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 1688; then
22030 comdat_group=yes
22031 else
22032 comdat_group=no
22033 fi
22034 ;;
22035 *)
22036 # Assume linkers other than GNU ld don't support COMDAT group.
22037 comdat_group=no
22038 ;;
22039 esac
22040fi
22041# Allow overriding the automatic COMDAT group tests above.
22042# Check whether --enable-comdat was given.
22043if test "${enable_comdat+set}" = set; then :
22044 enableval=$enable_comdat; comdat_group="$enable_comdat"
1cf0118d 22045fi
55c4f715 22046
1cf0118d
RO
22047if test $comdat_group = no; then
22048 gcc_cv_as_comdat_group=no
22049 gcc_cv_as_comdat_group_percent=no
11176d2a 22050fi
c18a5b6c
MM
22051
22052cat >>confdefs.h <<_ACEOF
11176d2a 22053#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
22054_ACEOF
22055
22056
5213506e
RW
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5
22058$as_echo_n "checking assembler for line table discriminator support... " >&6; }
22059if test "${gcc_cv_as_discriminator+set}" = set; then :
22060 $as_echo_n "(cached) " >&6
6c52e687
CC
22061else
22062 gcc_cv_as_discriminator=no
22063 if test $in_tree_gas = yes; then
22064 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51`
22065 then gcc_cv_as_discriminator=yes
22066fi
22067 elif test x$gcc_cv_as != x; then
22068 echo ' .text
22069 .file 1 "conf.c"
22070 .loc 1 1 0 discriminator 1' > conftest.s
e0b0fd74 22071 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22072 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6c52e687
CC
22073 (eval $ac_try) 2>&5
22074 ac_status=$?
5213506e
RW
22075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22076 test $ac_status = 0; }; }
6c52e687
CC
22077 then
22078 gcc_cv_as_discriminator=yes
22079 else
22080 echo "configure: failed program was" >&5
22081 cat conftest.s >&5
22082 fi
22083 rm -f conftest.o conftest.s
22084 fi
22085fi
5213506e
RW
22086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5
22087$as_echo "$gcc_cv_as_discriminator" >&6; }
6c52e687
CC
22088if test $gcc_cv_as_discriminator = yes; then
22089
5213506e 22090$as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
6c52e687
CC
22091
22092fi
22093
6a7a462c 22094# Thread-local storage - the check is heavily parameterized.
f996902d
RH
22095conftest_s=
22096tls_first_major=
22097tls_first_minor=
9739c90c 22098tls_as_opt=
f996902d 22099case "$target" in
6f9b006d
RH
22100 alpha*-*-*)
22101 conftest_s='
22102 .section ".tdata","awT",@progbits
22103foo: .long 25
22104 .text
22105 ldq $27,__tls_get_addr($29) !literal!1
22106 lda $16,foo($29) !tlsgd!1
22107 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
22108 ldq $27,__tls_get_addr($29) !literal!2
22109 lda $16,foo($29) !tlsldm!2
22110 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
22111 ldq $1,foo($29) !gotdtprel
22112 ldah $2,foo($29) !dtprelhi
22113 lda $3,foo($2) !dtprello
22114 lda $4,foo($29) !dtprel
22115 ldq $1,foo($29) !gottprel
22116 ldah $2,foo($29) !tprelhi
22117 lda $3,foo($2) !tprello
22118 lda $4,foo($29) !tprel'
22119 tls_first_major=2
22120 tls_first_minor=13
2f3321ca 22121 tls_as_opt=--fatal-warnings
6f9b006d 22122 ;;
ad9646c7
HPN
22123 cris-*-*|crisv32-*-*)
22124 conftest_s='
22125 .section ".tdata","awT",@progbits
22126x: .long 25
22127 .text
22128 move.d x:IE,$r10
22129 nop'
22130 tls_first_major=2
22131 tls_first_minor=20
22132 tls_as_opt=--fatal-warnings
22133 ;;
e4dd71de
AH
22134 frv*-*-*)
22135 conftest_s='
22136 .section ".tdata","awT",@progbits
22137x: .long 25
22138 .text
22139 call #gettlsoff(x)'
22140 tls_first_major=2
22141 tls_first_minor=14
22142 ;;
51076f96
RC
22143 hppa*-*-linux*)
22144 conftest_s='
22145t1: .reg %r20
22146t2: .reg %r21
22147gp: .reg %r19
22148 .section ".tdata","awT",@progbits
22149foo: .long 25
22150 .text
22151 .align 4
22152 addil LT%foo-$tls_gdidx$,gp
22153 ldo RT%foo-$tls_gdidx$(%r1),%arg0
22154 b __tls_get_addr
22155 nop
22156 addil LT%foo-$tls_ldidx$,gp
22157 b __tls_get_addr
22158 ldo RT%foo-$tls_ldidx$(%r1),%arg0
22159 addil LR%foo-$tls_dtpoff$,%ret0
22160 ldo RR%foo-$tls_dtpoff$(%r1),%t1
22161 mfctl %cr27,%t1
22162 addil LT%foo-$tls_ieoff$,gp
22163 ldw RT%foo-$tls_ieoff$(%r1),%t2
22164 add %t1,%t2,%t3
22165 mfctl %cr27,%t1
22166 addil LR%foo-$tls_leoff$,%t1
22167 ldo RR%foo-$tls_leoff$(%r1),%t2'
22168 tls_first_major=2
22169 tls_first_minor=15
22170 tls_as_opt=--fatal-warnings
22171 ;;
d3585b76
DJ
22172 arm*-*-*)
22173 conftest_s='
22174 .section ".tdata","awT",%progbits
22175foo: .long 25
22176 .text
22177.word foo(gottpoff)
22178.word foo(tpoff)
22179.word foo(tlsgd)
22180.word foo(tlsldm)
22181.word foo(tlsldo)'
22182 tls_first_major=2
22183 tls_first_minor=17
22184 ;;
f996902d 22185 i[34567]86-*-*)
f1c26cad 22186 case "$target" in
f1c26cad
RO
22187 i[34567]86-*-solaris2.*)
22188 on_solaris=yes
16c9d3b1 22189 tga_func=___tls_get_addr
f1c26cad
RO
22190 ;;
22191 *)
22192 on_solaris=no
22193 ;;
22194 esac
22195 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22196 conftest_s='
22197 .section .tdata,"awt",@progbits'
22198 tls_first_major=0
22199 tls_first_minor=0
22200
22201$as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h
22202
22203 else
22204 conftest_s='
22205 .section ".tdata","awT",@progbits'
22206 tls_first_major=2
22207 tls_first_minor=14
22208 tls_as_opt="--fatal-warnings"
22209 fi
22210 conftest_s="$conftest_s
f996902d
RH
22211foo: .long 25
22212 .text
22213 movl %gs:0, %eax
f1c26cad
RO
22214 leal foo@tlsgd(,%ebx,1), %eax
22215 leal foo@tlsldm(%ebx), %eax
22216 leal foo@dtpoff(%eax), %edx
22217 movl foo@gottpoff(%ebx), %eax
22218 subl foo@gottpoff(%ebx), %eax
22219 addl foo@gotntpoff(%ebx), %eax
22220 movl foo@indntpoff, %eax
22221 movl \$foo@tpoff, %eax
22222 subl \$foo@tpoff, %eax
22223 leal foo@ntpoff(%ecx), %eax"
22224 ;;
75d38379
JJ
22225 x86_64-*-*)
22226 conftest_s='
22227 .section ".tdata","awT",@progbits
22228foo: .long 25
22229 .text
22230 movq %fs:0, %rax
22231 leaq foo@TLSGD(%rip), %rdi
22232 leaq foo@TLSLD(%rip), %rdi
22233 leaq foo@DTPOFF(%rax), %rdx
22234 movq foo@GOTTPOFF(%rip), %rax
22235 movq $foo@TPOFF, %rax'
22236 tls_first_major=2
22237 tls_first_minor=14
2f3321ca 22238 tls_as_opt=--fatal-warnings
f996902d 22239 ;;
7b6e506e
RH
22240 ia64-*-*)
22241 conftest_s='
22242 .section ".tdata","awT",@progbits
22243foo: data8 25
22244 .text
22245 addl r16 = @ltoff(@dtpmod(foo#)), gp
22246 addl r17 = @ltoff(@dtprel(foo#)), gp
22247 addl r18 = @ltoff(@tprel(foo#)), gp
22248 addl r19 = @dtprel(foo#), gp
22249 adds r21 = @dtprel(foo#), r13
22250 movl r23 = @dtprel(foo#)
22251 addl r20 = @tprel(foo#), gp
22252 adds r22 = @tprel(foo#), r13
22253 movl r24 = @tprel(foo#)'
22254 tls_first_major=2
22255 tls_first_minor=13
2f3321ca 22256 tls_as_opt=--fatal-warnings
7b6e506e 22257 ;;
69229b81
DJ
22258 mips*-*-*)
22259 conftest_s='
22260 .section .tdata,"awT",@progbits
22261x:
22262 .word 2
22263 .text
22264 addiu $4, $28, %tlsgd(x)
22265 addiu $4, $28, %tlsldm(x)
22266 lui $4, %dtprel_hi(x)
22267 addiu $4, $4, %dtprel_lo(x)
22268 lw $4, %gottprel(x)($28)
22269 lui $4, %tprel_hi(x)
22270 addiu $4, $4, %tprel_lo(x)'
22271 tls_first_major=2
22272 tls_first_minor=16
22273 tls_as_opt='-32 --fatal-warnings'
22274 ;;
75df395f
MK
22275 m68k-*-*)
22276 conftest_s='
22277 .section .tdata,"awT",@progbits
22278x:
22279 .word 2
22280 .text
22281foo:
22282 move.l x@TLSGD(%a5),%a0
22283 move.l x@TLSLDM(%a5),%a0
22284 move.l x@TLSLDO(%a5),%a0
22285 move.l x@TLSIE(%a5),%a0
22286 move.l x@TLSLE(%a5),%a0'
22287 tls_first_major=2
22288 tls_first_minor=19
22289 tls_as_opt='--fatal-warnings'
22290 ;;
c4501e62
JJ
22291 powerpc-*-*)
22292 conftest_s='
22293 .section ".tdata","awT",@progbits
22294 .align 2
22295ld0: .space 4
22296ld1: .space 4
22297x1: .space 4
22298x2: .space 4
22299x3: .space 4
22300 .text
22301 addi 3,31,ld0@got@tlsgd
22302 bl __tls_get_addr
22303 addi 3,31,x1@got@tlsld
22304 bl __tls_get_addr
22305 addi 9,3,x1@dtprel
22306 addis 9,3,x2@dtprel@ha
22307 addi 9,9,x2@dtprel@l
22308 lwz 9,x3@got@tprel(31)
22309 add 9,9,x@tls
22310 addi 9,2,x1@tprel
22311 addis 9,2,x2@tprel@ha
22312 addi 9,9,x2@tprel@l'
22313 tls_first_major=2
22314 tls_first_minor=14
2f3321ca 22315 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
22316 ;;
22317 powerpc64-*-*)
22318 conftest_s='
22319 .section ".tdata","awT",@progbits
22320 .align 3
22321ld0: .space 8
22322ld1: .space 8
22323x1: .space 8
22324x2: .space 8
22325x3: .space 8
22326 .text
22327 addi 3,2,ld0@got@tlsgd
22328 bl .__tls_get_addr
22329 nop
22330 addi 3,2,ld1@toc
22331 bl .__tls_get_addr
22332 nop
22333 addi 3,2,x1@got@tlsld
22334 bl .__tls_get_addr
22335 nop
22336 addi 9,3,x1@dtprel
22337 bl .__tls_get_addr
22338 nop
22339 addis 9,3,x2@dtprel@ha
22340 addi 9,9,x2@dtprel@l
22341 bl .__tls_get_addr
22342 nop
22343 ld 9,x3@got@dtprel(2)
22344 add 9,9,3
22345 bl .__tls_get_addr
22346 nop'
22347 tls_first_major=2
22348 tls_first_minor=14
2f3321ca 22349 tls_as_opt="-a64 --fatal-warnings"
c4501e62 22350 ;;
fd3cd001
UW
22351 s390-*-*)
22352 conftest_s='
22353 .section ".tdata","awT",@progbits
22354foo: .long 25
22355 .text
22356 .long foo@TLSGD
22357 .long foo@TLSLDM
22358 .long foo@DTPOFF
22359 .long foo@NTPOFF
22360 .long foo@GOTNTPOFF
22361 .long foo@INDNTPOFF
22362 l %r1,foo@GOTNTPOFF(%r12)
22363 l %r1,0(%r1):tls_load:foo
22364 bas %r14,0(%r1,%r13):tls_gdcall:foo
22365 bas %r14,0(%r1,%r13):tls_ldcall:foo'
22366 tls_first_major=2
22367 tls_first_minor=14
2f3321ca 22368 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
22369 ;;
22370 s390x-*-*)
22371 conftest_s='
22372 .section ".tdata","awT",@progbits
22373foo: .long 25
22374 .text
22375 .quad foo@TLSGD
22376 .quad foo@TLSLDM
22377 .quad foo@DTPOFF
22378 .quad foo@NTPOFF
22379 .quad foo@GOTNTPOFF
22380 lg %r1,foo@GOTNTPOFF(%r12)
22381 larl %r1,foo@INDNTPOFF
22382 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
22383 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
22384 tls_first_major=2
22385 tls_first_minor=14
2f3321ca 22386 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 22387 ;;
9ff13962
KK
22388 sh-*-* | sh[34]-*-*)
22389 conftest_s='
22390 .section ".tdata","awT",@progbits
22391foo: .long 25
22392 .text
22393 .long foo@TLSGD
22394 .long foo@TLSLDM
22395 .long foo@DTPOFF
22396 .long foo@GOTTPOFF
22397 .long foo@TPOFF'
22398 tls_first_major=2
22399 tls_first_minor=13
2f3321ca 22400 tls_as_opt=--fatal-warnings
9ff13962 22401 ;;
5751a10b 22402 sparc*-*-*)
2f3321ca
EB
22403 case "$target" in
22404 sparc*-sun-solaris2.*)
22405 on_solaris=yes
16c9d3b1 22406 tga_func=__tls_get_addr
2f3321ca
EB
22407 ;;
22408 *)
22409 on_solaris=no
22410 ;;
22411 esac
22412 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22413 conftest_s='
16c9d3b1 22414 .section ".tdata",#alloc,#write,#tls'
2f3321ca
EB
22415 tls_first_major=0
22416 tls_first_minor=0
22417 else
22418 conftest_s='
16c9d3b1
RO
22419 .section ".tdata","awT",@progbits'
22420 tls_first_major=2
22421 tls_first_minor=14
22422 tls_as_opt="-32 --fatal-warnings"
22423 fi
22424 conftest_s="$conftest_s
5751a10b
JJ
22425foo: .long 25
22426 .text
22427 sethi %tgd_hi22(foo), %o0
22428 add %o0, %tgd_lo10(foo), %o1
22429 add %l7, %o1, %o0, %tgd_add(foo)
22430 call __tls_get_addr, %tgd_call(foo)
22431 sethi %tldm_hi22(foo), %l1
22432 add %l1, %tldm_lo10(foo), %l2
22433 add %l7, %l2, %o0, %tldm_add(foo)
22434 call __tls_get_addr, %tldm_call(foo)
22435 sethi %tldo_hix22(foo), %l3
22436 xor %l3, %tldo_lox10(foo), %l4
22437 add %o0, %l4, %l5, %tldo_add(foo)
22438 sethi %tie_hi22(foo), %o3
22439 add %o3, %tie_lo10(foo), %o3
22440 ld [%l7 + %o3], %o2, %tie_ld(foo)
22441 add %g7, %o2, %o4, %tie_add(foo)
22442 sethi %tle_hix22(foo), %l1
22443 xor %l1, %tle_lox10(foo), %o5
16c9d3b1 22444 ld [%g7 + %o5], %o1"
5751a10b 22445 ;;
6a7a462c
BW
22446 xtensa*-*-*)
22447 conftest_s='
22448 .section ".tdata","awT",@progbits
22449foo: .long 25
22450 .text
22451 movi a8, foo@TLSFUNC
22452 movi a10, foo@TLSARG
22453 callx8.tls a8, foo@TLSCALL'
22454 tls_first_major=2
22455 tls_first_minor=19
22456 ;;
f996902d 22457esac
8dea1cca
DD
22458set_have_as_tls=no
22459if test "x$enable_tls" = xno ; then
22460 : # TLS explicitly disabled.
22461elif test "x$enable_tls" = xyes ; then
22462 set_have_as_tls=yes # TLS explicitly enabled.
22463elif test -z "$tls_first_major"; then
8ada417f
ZW
22464 : # If we don't have a check, assume no support.
22465else
5213506e
RW
22466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5
22467$as_echo_n "checking assembler for thread-local storage support... " >&6; }
22468if test "${gcc_cv_as_tls+set}" = set; then :
22469 $as_echo_n "(cached) " >&6
8ada417f
ZW
22470else
22471 gcc_cv_as_tls=no
22472 if test $in_tree_gas = yes; then
22473 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
22474 then gcc_cv_as_tls=yes
ad9c4d9f 22475fi
8ada417f 22476 elif test x$gcc_cv_as != x; then
6e3f3080 22477 echo "$conftest_s" > conftest.s
e0b0fd74 22478 if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5'
5213506e 22479 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22480 (eval $ac_try) 2>&5
22481 ac_status=$?
5213506e
RW
22482 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22483 test $ac_status = 0; }; }
8ada417f
ZW
22484 then
22485 gcc_cv_as_tls=yes
22486 else
22487 echo "configure: failed program was" >&5
22488 cat conftest.s >&5
22489 fi
22490 rm -f conftest.o conftest.s
f996902d 22491 fi
f996902d 22492fi
5213506e
RW
22493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5
22494$as_echo "$gcc_cv_as_tls" >&6; }
63cf211a 22495if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
22496 set_have_as_tls=yes
22497fi
22498fi
16c9d3b1
RO
22499case "$target" in
22500 # TLS was introduced in the Solaris 9 FCS release and backported to
22501 # Solaris 8 patches. Support for GNU-style TLS on x86 was only
22502 # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun
22503 # ld and GCC don't support any longer.
22504 *-*-solaris2.*)
22505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker and ld.so.1 TLS support" >&5
22506$as_echo_n "checking linker and ld.so.1 TLS support... " >&6; }
22507 ld_tls_support=no
22508 # Check ld and ld.so.1 TLS support.
22509 if echo "$ld_ver" | grep GNU > /dev/null; then
22510 # Assume all interesting versions of GNU ld have TLS support.
22511 # FIXME: still need ld.so.1 support, i.e. ld version checks below.
22512 ld_tls_support=yes
22513 else
22514 case "$target" in
22515 # Solaris 8/x86 ld has GNU style TLS support since version 1.280.
22516 i?86-*-solaris2.8)
22517 min_tls_ld_vers_minor=280
22518 ;;
22519 # Solaris 8/SPARC ld has TLS support since version 1.272.
22520 sparc*-*-solaris2.8)
22521 min_tls_ld_vers_minor=272
22522 ;;
22523 # Solaris 9/x86 ld has GNU style TLS support since version 1.374.
22524 i?86-*-solaris2.9)
22525 min_tls_ld_vers_minor=374
22526 ;;
22527 # Solaris 9/SPARC and Solaris 10+ ld have TLS support since FCS.
22528 sparc*-*-solaris2.9 | *-*-solaris2.1[0-9]*)
22529 min_tls_ld_vers_minor=343
22530 ;;
22531 esac
22532 if test "$ls_vers_major" -gt 1 || \
22533 test "$ld_vers_minor" -ge "$min_tls_ld_vers_minor"; then
22534 ld_tls_support=yes
22535 else
22536 set_have_as_tls=no
22537 fi
22538 fi
22539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_tls_support" >&5
22540$as_echo "$ld_tls_support" >&6; }
22541
22542 save_LIBS="$LIBS"
22543 save_LDFLAGS="$LDFLAGS"
22544 LIBS=
22545 LDFLAGS=
22546
22547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alternate thread library" >&5
22548$as_echo_n "checking alternate thread library... " >&6; }
22549 case "$target" in
22550 # TLS support was backported to Solaris 8 patches, but only lives in
22551 # the alternate thread library which became the default in Solaris 9.
22552 # We want to always use that, irrespective of TLS support.
22553 *-*-solaris2.8)
22554 # Take multilib subdir into account. There's no spec to handle
22555 # this. The 64 symlink exists since Solaris 8.
22556 lwp_dir=/usr/lib/lwp
22557 lwp_spec="-L$lwp_dir%{m64:/64} -R$lwp_dir%{m64:/64}"
22558 LDFLAGS="-L$lwp_dir -R$lwp_dir"
22559 ;;
22560 *-*-solaris2*)
22561 lwp_dir="none"
22562 lwp_spec=""
22563 ;;
22564 esac
22565 # Always define LIB_THREAD_LDFLAGS_SPEC, even without TLS support.
22566
22567cat >>confdefs.h <<_ACEOF
22568#define LIB_THREAD_LDFLAGS_SPEC "$lwp_spec"
22569_ACEOF
22570
22571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lwp_dir" >&5
22572$as_echo "$lwp_dir" >&6; }
22573
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking library containing $tga_func" >&5
22575$as_echo_n "checking library containing $tga_func... " >&6; }
22576 # Before Solaris 10, __tls_get_addr (SPARC/x64) resp. ___tls_get_addr
22577 # (32-bit x86) only lived in libthread, so check for that. Keep
22578 # set_have_as_tls if found, disable if not.
22579 as_ac_Search=`$as_echo "ac_cv_search_$tga_func" | $as_tr_sh`
22580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tga_func" >&5
22581$as_echo_n "checking for library containing $tga_func... " >&6; }
22582if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22583 $as_echo_n "(cached) " >&6
22584else
22585 ac_func_search_save_LIBS=$LIBS
22586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22587/* end confdefs.h. */
22588
22589/* Override any GCC internal prototype to avoid an error.
22590 Use char because int might match the return type of a GCC
22591 builtin and then its argument prototype would still apply. */
22592#ifdef __cplusplus
22593extern "C"
22594#endif
22595char $tga_func ();
22596int
22597main ()
22598{
22599return $tga_func ();
22600 ;
22601 return 0;
22602}
22603_ACEOF
22604for ac_lib in '' thread; do
22605 if test -z "$ac_lib"; then
22606 ac_res="none required"
22607 else
22608 ac_res=-l$ac_lib
22609 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22610 fi
22611 if ac_fn_c_try_link "$LINENO"; then :
22612 eval "$as_ac_Search=\$ac_res"
22613fi
22614rm -f core conftest.err conftest.$ac_objext \
22615 conftest$ac_exeext
22616 if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22617 break
22618fi
22619done
22620if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22621
22622else
22623 eval "$as_ac_Search=no"
22624fi
22625rm conftest.$ac_ext
22626LIBS=$ac_func_search_save_LIBS
22627fi
22628eval ac_res=\$$as_ac_Search
22629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22630$as_echo "$ac_res" >&6; }
22631eval ac_res=\$$as_ac_Search
22632if test "$ac_res" != no; then :
22633 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22634
22635else
22636 set_have_as_tls=no
22637fi
22638
22639 # Clear LIBS if we cannot support TLS.
22640 if test $set_have_as_tls = no; then
22641 LIBS=
22642 fi
22643 # Always define LIB_TLS_SPEC, even without TLS support.
22644
22645cat >>confdefs.h <<_ACEOF
22646#define LIB_TLS_SPEC "$LIBS"
22647_ACEOF
22648
22649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBS" >&5
22650$as_echo "$LIBS" >&6; }
22651
22652 LIBS="$save_LIBS"
22653 LDFLAGS="$save_LDFLAGS"
22654 ;;
22655esac
8dea1cca 22656if test $set_have_as_tls = yes ; then
ba479fd2 22657
5213506e 22658$as_echo "#define HAVE_AS_TLS 1" >>confdefs.h
f996902d 22659
8ada417f
ZW
22660fi
22661
22662# Target-specific assembler checks.
f996902d 22663
5213506e
RW
22664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5
22665$as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; }
7e9d8517
L
22666gcc_cv_ld_static_dynamic=no
22667if test $in_tree_ld = yes ; then
83f0ccb8 22668 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
22669 gcc_cv_ld_static_dynamic=yes
22670 fi
22671elif test x$gcc_cv_ld != x; then
22672 # Check if linker supports -Bstatic/-Bdynamic option
22673 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
22674 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
22675 gcc_cv_ld_static_dynamic=yes
22676 fi
22677fi
22678if test x"$gcc_cv_ld_static_dynamic" = xyes; then
22679
5213506e 22680$as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h
7e9d8517
L
22681
22682fi
5213506e
RW
22683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5
22684$as_echo "$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 22685
d594623a 22686if test x"$demangler_in_ld" = xyes; then
5213506e
RW
22687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5
22688$as_echo_n "checking linker --demangle support... " >&6; }
d594623a
L
22689 gcc_cv_ld_demangle=no
22690 if test $in_tree_ld = yes; then
22691 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 \
22692 gcc_cv_ld_demangle=yes
22693 fi
22694 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
22695 # Check if the GNU linker supports --demangle option
22696 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
22697 gcc_cv_ld_demangle=yes
22698 fi
22699 fi
22700 if test x"$gcc_cv_ld_demangle" = xyes; then
22701
5213506e 22702$as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h
d594623a
L
22703
22704 fi
5213506e
RW
22705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5
22706$as_echo "$gcc_cv_ld_demangle" >&6; }
d594623a
L
22707fi
22708
3a37b08e
RH
22709case "$target" in
22710 # All TARGET_ABI_OSF targets.
22711 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
5213506e
RW
22712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
22713$as_echo_n "checking assembler for explicit relocation support... " >&6; }
22714if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then :
22715 $as_echo_n "(cached) " >&6
3a37b08e 22716else
8ada417f
ZW
22717 gcc_cv_as_alpha_explicit_relocs=no
22718 if test $in_tree_gas = yes; then
22719 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
22720 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 22721fi
8ada417f 22722 elif test x$gcc_cv_as != x; then
6e3f3080 22723 echo ' .set nomacro
3a37b08e
RH
22724 .text
22725 extbl $3, $2, $3 !lituse_bytoff!1
22726 ldq $2, a($29) !literal!1
22727 ldq $4, b($29) !literal!2
22728 ldq_u $3, 0($2) !lituse_base!1
22729 ldq $27, f($29) !literal!5
22730 jsr $26, ($27), f !lituse_jsr!5
22731 ldah $29, 0($26) !gpdisp!3
22732 lda $0, c($29) !gprel
22733 ldah $1, d($29) !gprelhigh
22734 lda $1, d($1) !gprellow
8ada417f 22735 lda $29, 0($29) !gpdisp!3' > conftest.s
e0b0fd74 22736 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22737 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22738 (eval $ac_try) 2>&5
22739 ac_status=$?
5213506e
RW
22740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22741 test $ac_status = 0; }; }
8ada417f
ZW
22742 then
22743 gcc_cv_as_alpha_explicit_relocs=yes
22744 else
22745 echo "configure: failed program was" >&5
22746 cat conftest.s >&5
22747 fi
22748 rm -f conftest.o conftest.s
22749 fi
cafe096b 22750fi
5213506e
RW
22751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5
22752$as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 22753if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2 22754
5213506e 22755$as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
3a37b08e 22756
d006f5eb 22757fi
5213506e
RW
22758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
22759$as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
22760if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
22761 $as_echo_n "(cached) " >&6
d006f5eb
RH
22762else
22763 gcc_cv_as_alpha_jsrdirect_relocs=no
22764 if test $in_tree_gas = yes; then
22765 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
22766 then gcc_cv_as_alpha_jsrdirect_relocs=yes
22767fi
22768 elif test x$gcc_cv_as != x; then
22769 echo ' .set nomacro
22770 .text
22771 ldq $27, a($29) !literal!1
22772 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
e0b0fd74 22773 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22774 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d006f5eb
RH
22775 (eval $ac_try) 2>&5
22776 ac_status=$?
5213506e
RW
22777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22778 test $ac_status = 0; }; }
d006f5eb
RH
22779 then
22780 gcc_cv_as_alpha_jsrdirect_relocs=yes
22781 else
22782 echo "configure: failed program was" >&5
22783 cat conftest.s >&5
22784 fi
22785 rm -f conftest.o conftest.s
22786 fi
22787fi
5213506e
RW
22788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
22789$as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
22790if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
22791
5213506e 22792$as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
d006f5eb 22793
86da66b5
HPN
22794fi
22795 ;;
22796
22797 cris-*-*)
5213506e
RW
22798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5
22799$as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; }
22800if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then :
22801 $as_echo_n "(cached) " >&6
86da66b5
HPN
22802else
22803 gcc_cv_as_cris_no_mul_bug=no
22804 if test $in_tree_gas = yes; then
22805 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22806 then gcc_cv_as_cris_no_mul_bug=yes
22807fi
22808 elif test x$gcc_cv_as != x; then
22809 echo '.text' > conftest.s
e0b0fd74 22810 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5'
5213506e 22811 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
86da66b5
HPN
22812 (eval $ac_try) 2>&5
22813 ac_status=$?
5213506e
RW
22814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22815 test $ac_status = 0; }; }
86da66b5
HPN
22816 then
22817 gcc_cv_as_cris_no_mul_bug=yes
22818 else
22819 echo "configure: failed program was" >&5
22820 cat conftest.s >&5
22821 fi
22822 rm -f conftest.o conftest.s
22823 fi
22824fi
5213506e
RW
22825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5
22826$as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
22827if test $gcc_cv_as_cris_no_mul_bug = yes; then
22828
5213506e 22829$as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
86da66b5 22830
8ada417f 22831fi
3a37b08e 22832 ;;
8ada417f 22833
1cb36a98 22834 sparc*-*-*)
5213506e
RW
22835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5
22836$as_echo_n "checking assembler for .register... " >&6; }
22837if test "${gcc_cv_as_sparc_register_op+set}" = set; then :
22838 $as_echo_n "(cached) " >&6
5b68c389 22839else
8ada417f
ZW
22840 gcc_cv_as_sparc_register_op=no
22841 if test x$gcc_cv_as != x; then
6e3f3080 22842 echo '.register %g2, #scratch' > conftest.s
e0b0fd74 22843 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22844 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22845 (eval $ac_try) 2>&5
22846 ac_status=$?
5213506e
RW
22847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22848 test $ac_status = 0; }; }
8ada417f
ZW
22849 then
22850 gcc_cv_as_sparc_register_op=yes
22851 else
22852 echo "configure: failed program was" >&5
22853 cat conftest.s >&5
22854 fi
22855 rm -f conftest.o conftest.s
22856 fi
cafe096b 22857fi
5213506e
RW
22858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5
22859$as_echo "$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 22860if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2 22861
5213506e 22862$as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
1cb36a98 22863
8ada417f 22864fi
1cb36a98 22865
5213506e
RW
22866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
22867$as_echo_n "checking assembler for -relax option... " >&6; }
22868if test "${gcc_cv_as_sparc_relax+set}" = set; then :
22869 $as_echo_n "(cached) " >&6
e95b1e6a 22870else
8ada417f
ZW
22871 gcc_cv_as_sparc_relax=no
22872 if test x$gcc_cv_as != x; then
6e3f3080 22873 echo '.text' > conftest.s
e0b0fd74 22874 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5'
5213506e 22875 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22876 (eval $ac_try) 2>&5
22877 ac_status=$?
5213506e
RW
22878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22879 test $ac_status = 0; }; }
8ada417f
ZW
22880 then
22881 gcc_cv_as_sparc_relax=yes
22882 else
22883 echo "configure: failed program was" >&5
22884 cat conftest.s >&5
22885 fi
22886 rm -f conftest.o conftest.s
22887 fi
cafe096b 22888fi
5213506e
RW
22889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5
22890$as_echo "$gcc_cv_as_sparc_relax" >&6; }
63cf211a 22891if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2 22892
5213506e 22893$as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
e95b1e6a 22894
878ee0ab
DM
22895fi
22896
22897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5
22898$as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; }
22899if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then :
22900 $as_echo_n "(cached) " >&6
22901else
22902 gcc_cv_as_sparc_gotdata_op=no
22903 if test x$gcc_cv_as != x; then
22904 echo '.text
22905foo:
22906 nop
22907bar:
22908 sethi %gdop_hix22(foo), %g1
22909 xor %g1, %gdop_lox10(foo), %g1
22910 ld [%l7 + %g1], %g2, %gdop(foo)' > conftest.s
22911 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
22912 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
22913 (eval $ac_try) 2>&5
22914 ac_status=$?
22915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22916 test $ac_status = 0; }; }
22917 then
22918 if test x$gcc_cv_ld != x \
46bc665f
DM
22919 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22920 if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then
22921 if test x$gcc_cv_objdump != x; then
22922 if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
22923 | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
22924 gcc_cv_as_sparc_gotdata_op=no
22925 else
22926 gcc_cv_as_sparc_gotdata_op=yes
22927 fi
22928 fi
22929 else
22930 gcc_cv_as_sparc_gotdata_op=yes
22931 fi
878ee0ab
DM
22932 fi
22933 rm -f conftest
22934 else
22935 echo "configure: failed program was" >&5
22936 cat conftest.s >&5
22937 fi
22938 rm -f conftest.o conftest.s
22939 fi
22940fi
22941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5
22942$as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; }
22943if test $gcc_cv_as_sparc_gotdata_op = yes; then
22944
22945$as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h
22946
8ada417f 22947fi
e95b1e6a 22948
5213506e
RW
22949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
22950$as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
22951if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
22952 $as_echo_n "(cached) " >&6
17e9e88c 22953else
8ada417f
ZW
22954 gcc_cv_as_sparc_ua_pcrel=no
22955 if test x$gcc_cv_as != x; then
6e3f3080 22956 echo '.text
8ada417f
ZW
22957foo:
22958 nop
22959.data
22960.align 4
22961.byte 0
22962.uaword %r_disp32(foo)' > conftest.s
e0b0fd74 22963 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 22964 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22965 (eval $ac_try) 2>&5
22966 ac_status=$?
5213506e
RW
22967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22968 test $ac_status = 0; }; }
8ada417f
ZW
22969 then
22970 if test x$gcc_cv_ld != x \
22971 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22972 gcc_cv_as_sparc_ua_pcrel=yes
22973 fi
22974 rm -f conftest
22975 else
22976 echo "configure: failed program was" >&5
22977 cat conftest.s >&5
22978 fi
22979 rm -f conftest.o conftest.s
22980 fi
cafe096b 22981fi
5213506e
RW
22982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5
22983$as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 22984if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2 22985
5213506e 22986$as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h
17e9e88c 22987
17e9e88c 22988
5213506e
RW
22989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
22990$as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; }
22991if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then :
22992 $as_echo_n "(cached) " >&6
cf7b8b0d 22993else
8ada417f
ZW
22994 gcc_cv_as_sparc_ua_pcrel_hidden=no
22995 if test x$gcc_cv_as != x; then
6e3f3080 22996 echo '.data
8ada417f
ZW
22997.align 4
22998.byte 0x31
22999.uaword %r_disp32(foo)
23000.byte 0x32, 0x33, 0x34
23001.global foo
23002.hidden foo
23003foo:
23004.skip 4' > conftest.s
e0b0fd74 23005 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 23006 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23007 (eval $ac_try) 2>&5
23008 ac_status=$?
5213506e
RW
23009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23010 test $ac_status = 0; }; }
8ada417f
ZW
23011 then
23012 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
23013 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
23014 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
23015 | grep ' 31000000 07323334' > /dev/null 2>&1; then
23016 if $gcc_cv_objdump -R conftest 2> /dev/null \
23017 | grep 'DISP32' > /dev/null 2>&1; then
23018 :
23019 else
23020 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 23021 fi
8ada417f
ZW
23022 fi
23023 rm -f conftest
23024 else
23025 echo "configure: failed program was" >&5
23026 cat conftest.s >&5
23027 fi
23028 rm -f conftest.o conftest.s
23029 fi
cafe096b 23030fi
5213506e
RW
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
23032$as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 23033if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2 23034
5213506e 23035$as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
cf7b8b0d 23036
8ada417f 23037fi
ba479fd2 23038
8ada417f 23039fi # unaligned pcrel relocs
cf7b8b0d 23040
5213506e
RW
23041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
23042$as_echo_n "checking assembler for offsetable %lo()... " >&6; }
23043if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then :
23044 $as_echo_n "(cached) " >&6
5b68c389 23045else
8ada417f
ZW
23046 gcc_cv_as_sparc_offsetable_lo10=no
23047 if test x$gcc_cv_as != x; then
6e3f3080 23048 echo '.text
8ada417f
ZW
23049 or %g1, %lo(ab) + 12, %g1
23050 or %g1, %lo(ab + 12), %g1' > conftest.s
e0b0fd74 23051 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=v9 -o conftest.o conftest.s >&5'
5213506e 23052 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23053 (eval $ac_try) 2>&5
23054 ac_status=$?
5213506e
RW
23055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23056 test $ac_status = 0; }; }
8ada417f
ZW
23057 then
23058 if test x$gcc_cv_objdump != x \
ecb0ccbc 23059 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 23060 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 23061 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
23062 fi
23063 else
23064 echo "configure: failed program was" >&5
23065 cat conftest.s >&5
23066 fi
23067 rm -f conftest.o conftest.s
23068 fi
cafe096b 23069fi
5213506e
RW
23070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
23071$as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 23072if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2 23073
5213506e 23074$as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
1cb36a98 23075
8ada417f 23076fi
1cb36a98
RH
23077 ;;
23078
c307e6dd 23079 i[34567]86-*-* | x86_64-*-*)
f7e413e2
DK
23080 case $target_os in
23081 cygwin*)
23082 # Full C++ conformance when using a shared libstdc++-v3 requires some
23083 # support from the Cygwin DLL, which in more recent versions exports
23084 # wrappers to aid in interposing and redirecting operators new, delete,
23085 # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
23086 # are configuring for a version of Cygwin that exports the wrappers.
23087 if test x$host = x$target; then
23088 ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
23089if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
23090 gcc_ac_cygwin_dll_wrappers=yes
23091else
23092 gcc_ac_cygwin_dll_wrappers=no
23093fi
23094
23095 else
23096 # Can't check presence of libc functions during cross-compile, so
23097 # we just have to assume we're building for an up-to-date target.
23098 gcc_ac_cygwin_dll_wrappers=yes
23099 fi
23100
23101cat >>confdefs.h <<_ACEOF
23102#define USE_CYGWIN_LIBSTDCXX_WRAPPERS `if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi`
23103_ACEOF
23104
23105 esac
d38bc601
BF
23106 case $target_os in
23107 cygwin* | pe | mingw32*)
233215fe
DK
23108 # Recent binutils allows the three-operand form of ".comm" on PE. This
23109 # definition is used unconditionally to initialise the default state of
23110 # the target option variable that governs usage of the feature.
5213506e
RW
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5
23112$as_echo_n "checking assembler for .comm with alignment... " >&6; }
23113if test "${gcc_cv_as_comm_has_align+set}" = set; then :
23114 $as_echo_n "(cached) " >&6
233215fe
DK
23115else
23116 gcc_cv_as_comm_has_align=no
23117 if test $in_tree_gas = yes; then
23118 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
23119 then gcc_cv_as_comm_has_align=yes
23120fi
23121 elif test x$gcc_cv_as != x; then
23122 echo '.comm foo,1,32' > conftest.s
e0b0fd74 23123 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23124 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
233215fe
DK
23125 (eval $ac_try) 2>&5
23126 ac_status=$?
5213506e
RW
23127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23128 test $ac_status = 0; }; }
233215fe
DK
23129 then
23130 gcc_cv_as_comm_has_align=yes
23131 else
23132 echo "configure: failed program was" >&5
23133 cat conftest.s >&5
23134 fi
23135 rm -f conftest.o conftest.s
23136 fi
23137fi
5213506e
RW
23138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5
23139$as_echo "$gcc_cv_as_comm_has_align" >&6; }
233215fe
DK
23140
23141
23142cat >>confdefs.h <<_ACEOF
23143#define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
23144_ACEOF
23145
d38bc601 23146 # Used for DWARF 2 in PE
5213506e
RW
23147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5
23148$as_echo_n "checking assembler for .secrel32 relocs... " >&6; }
23149if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then :
23150 $as_echo_n "(cached) " >&6
d38bc601
BF
23151else
23152 gcc_cv_as_ix86_pe_secrel32=no
23153 if test $in_tree_gas = yes; then
23154 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
23155 then gcc_cv_as_ix86_pe_secrel32=yes
23156fi
23157 elif test x$gcc_cv_as != x; then
23158 echo '.text
23159foo: nop
23160.data
23161 .secrel32 foo' > conftest.s
e0b0fd74 23162 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23163 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d38bc601
BF
23164 (eval $ac_try) 2>&5
23165 ac_status=$?
5213506e
RW
23166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23167 test $ac_status = 0; }; }
d38bc601
BF
23168 then
23169 if test x$gcc_cv_ld != x \
23170 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
23171 gcc_cv_as_ix86_pe_secrel32=yes
23172 fi
23173 rm -f conftest
23174 else
23175 echo "configure: failed program was" >&5
23176 cat conftest.s >&5
23177 fi
23178 rm -f conftest.o conftest.s
23179 fi
23180fi
5213506e
RW
23181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5
23182$as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
23183if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
23184
5213506e 23185$as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
d38bc601
BF
23186
23187fi
3bec79c5
DK
23188 # Test if the assembler supports the extended form of the .section
23189 # directive that specifies section alignment. LTO support uses this,
23190 # but normally only after installation, so we warn but don't fail the
23191 # configure if LTO is enabled but the assembler does not support it.
23192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with alignment" >&5
23193$as_echo_n "checking assembler for .section with alignment... " >&6; }
23194if test "${gcc_cv_as_section_has_align+set}" = set; then :
23195 $as_echo_n "(cached) " >&6
23196else
23197 gcc_cv_as_section_has_align=no
23198 if test $in_tree_gas = yes; then
23199 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1`
23200 then gcc_cv_as_section_has_align=yes
23201fi
23202 elif test x$gcc_cv_as != x; then
23203 echo '.section lto_test,"dr0"' > conftest.s
23204 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5'
23205 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23206 (eval $ac_try) 2>&5
23207 ac_status=$?
23208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23209 test $ac_status = 0; }; }
23210 then
23211 gcc_cv_as_section_has_align=yes
23212 else
23213 echo "configure: failed program was" >&5
23214 cat conftest.s >&5
23215 fi
23216 rm -f conftest.o conftest.s
23217 fi
23218fi
23219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5
23220$as_echo "$gcc_cv_as_section_has_align" >&6; }
23221
23222 if test x$gcc_cv_as_section_has_align != xyes; then
23223 case ",$enable_languages," in
23224 *,lto,*)
23225 { $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
23226$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;}
23227 ;;
23228 esac
23229 fi
d38bc601
BF
23230 ;;
23231 esac
23232
5213506e
RW
23233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5
23234$as_echo_n "checking assembler for filds and fists mnemonics... " >&6; }
23235if test "${gcc_cv_as_ix86_filds+set}" = set; then :
23236 $as_echo_n "(cached) " >&6
8ada417f 23237else
a3a5e3d1
UB
23238 gcc_cv_as_ix86_filds=no
23239 if test x$gcc_cv_as != x; then
6e3f3080 23240 echo 'filds mem; fists mem' > conftest.s
e0b0fd74 23241 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23242 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23243 (eval $ac_try) 2>&5
23244 ac_status=$?
5213506e
RW
23245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23246 test $ac_status = 0; }; }
8ada417f 23247 then
a3a5e3d1
UB
23248 gcc_cv_as_ix86_filds=yes
23249 else
23250 echo "configure: failed program was" >&5
23251 cat conftest.s >&5
23252 fi
23253 rm -f conftest.o conftest.s
23254 fi
23255fi
5213506e
RW
23256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5
23257$as_echo "$gcc_cv_as_ix86_filds" >&6; }
a3a5e3d1
UB
23258if test $gcc_cv_as_ix86_filds = yes; then
23259
5213506e 23260$as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
a3a5e3d1
UB
23261
23262fi
23263
5213506e
RW
23264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
23265$as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
23266if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
23267 $as_echo_n "(cached) " >&6
a3a5e3d1
UB
23268else
23269 gcc_cv_as_ix86_fildq=no
23270 if test x$gcc_cv_as != x; then
23271 echo 'fildq mem; fistpq mem' > conftest.s
e0b0fd74 23272 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23273 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a3a5e3d1
UB
23274 (eval $ac_try) 2>&5
23275 ac_status=$?
5213506e
RW
23276 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23277 test $ac_status = 0; }; }
a3a5e3d1
UB
23278 then
23279 gcc_cv_as_ix86_fildq=yes
8ada417f
ZW
23280 else
23281 echo "configure: failed program was" >&5
23282 cat conftest.s >&5
981d4858 23283 fi
8ada417f
ZW
23284 rm -f conftest.o conftest.s
23285 fi
23286fi
5213506e
RW
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5
23288$as_echo "$gcc_cv_as_ix86_fildq" >&6; }
a3a5e3d1 23289if test $gcc_cv_as_ix86_fildq = yes; then
ba479fd2 23290
5213506e 23291$as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
ad9c4d9f 23292
f6f5dff2
RO
23293fi
23294
5213506e
RW
23295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
23296$as_echo_n "checking assembler for cmov syntax... " >&6; }
23297if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
23298 $as_echo_n "(cached) " >&6
f6f5dff2
RO
23299else
23300 gcc_cv_as_ix86_cmov_sun_syntax=no
23301 if test x$gcc_cv_as != x; then
6e3f3080 23302 echo 'cmovl.l %edx, %eax' > conftest.s
e0b0fd74 23303 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23304 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23305 (eval $ac_try) 2>&5
23306 ac_status=$?
5213506e
RW
23307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23308 test $ac_status = 0; }; }
f6f5dff2
RO
23309 then
23310 gcc_cv_as_ix86_cmov_sun_syntax=yes
23311 else
23312 echo "configure: failed program was" >&5
23313 cat conftest.s >&5
23314 fi
23315 rm -f conftest.o conftest.s
23316 fi
23317fi
5213506e
RW
23318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
23319$as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 23320if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2 23321
5213506e 23322$as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
f6f5dff2 23323
b6c03bcd
RS
23324fi
23325
5213506e
RW
23326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
23327$as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
23328if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
23329 $as_echo_n "(cached) " >&6
b6c03bcd
RS
23330else
23331 gcc_cv_as_ix86_ffreep=no
23332 if test x$gcc_cv_as != x; then
23333 echo 'ffreep %st(1)' > conftest.s
e0b0fd74 23334 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23335 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b6c03bcd
RS
23336 (eval $ac_try) 2>&5
23337 ac_status=$?
5213506e
RW
23338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23339 test $ac_status = 0; }; }
b6c03bcd
RS
23340 then
23341 gcc_cv_as_ix86_ffreep=yes
23342 else
23343 echo "configure: failed program was" >&5
23344 cat conftest.s >&5
23345 fi
23346 rm -f conftest.o conftest.s
23347 fi
23348fi
5213506e
RW
23349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5
23350$as_echo "$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
23351if test $gcc_cv_as_ix86_ffreep = yes; then
23352
5213506e 23353$as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
b6c03bcd 23354
ed104137
RO
23355fi
23356
23357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
23358$as_echo_n "checking assembler for .quad directive... " >&6; }
23359if test "${gcc_cv_as_ix86_quad+set}" = set; then :
23360 $as_echo_n "(cached) " >&6
23361else
23362 gcc_cv_as_ix86_quad=no
23363 if test x$gcc_cv_as != x; then
23364 echo '.quad 0' > conftest.s
23365 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23366 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23367 (eval $ac_try) 2>&5
23368 ac_status=$?
23369 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23370 test $ac_status = 0; }; }
23371 then
23372 gcc_cv_as_ix86_quad=yes
23373 else
23374 echo "configure: failed program was" >&5
23375 cat conftest.s >&5
23376 fi
23377 rm -f conftest.o conftest.s
23378 fi
23379fi
23380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_quad" >&5
23381$as_echo "$gcc_cv_as_ix86_quad" >&6; }
23382if test $gcc_cv_as_ix86_quad = yes; then
23383
23384$as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
23385
38ca3765
UB
23386fi
23387
5213506e
RW
23388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
23389$as_echo_n "checking assembler for sahf mnemonic... " >&6; }
23390if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
23391 $as_echo_n "(cached) " >&6
38ca3765
UB
23392else
23393 gcc_cv_as_ix86_sahf=no
23394 if test x$gcc_cv_as != x; then
953c29f7
UB
23395 echo '.code64
23396 sahf' > conftest.s
e0b0fd74 23397 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23398 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
38ca3765
UB
23399 (eval $ac_try) 2>&5
23400 ac_status=$?
5213506e
RW
23401 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23402 test $ac_status = 0; }; }
38ca3765
UB
23403 then
23404 gcc_cv_as_ix86_sahf=yes
23405 else
23406 echo "configure: failed program was" >&5
23407 cat conftest.s >&5
23408 fi
23409 rm -f conftest.o conftest.s
23410 fi
23411fi
5213506e
RW
23412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_sahf" >&5
23413$as_echo "$gcc_cv_as_ix86_sahf" >&6; }
38ca3765
UB
23414if test $gcc_cv_as_ix86_sahf = yes; then
23415
5213506e 23416$as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
38ca3765 23417
bad72d7a
RH
23418fi
23419
23420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5
23421$as_echo_n "checking assembler for swap suffix... " >&6; }
23422if test "${gcc_cv_as_ix86_swap+set}" = set; then :
23423 $as_echo_n "(cached) " >&6
23424else
23425 gcc_cv_as_ix86_swap=no
23426 if test x$gcc_cv_as != x; then
23427 echo 'movl.s %esp, %ebp' > conftest.s
e0b0fd74 23428 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
bad72d7a
RH
23429 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23430 (eval $ac_try) 2>&5
23431 ac_status=$?
23432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23433 test $ac_status = 0; }; }
23434 then
23435 gcc_cv_as_ix86_swap=yes
23436 else
23437 echo "configure: failed program was" >&5
23438 cat conftest.s >&5
23439 fi
23440 rm -f conftest.o conftest.s
23441 fi
23442fi
23443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_swap" >&5
23444$as_echo "$gcc_cv_as_ix86_swap" >&6; }
23445if test $gcc_cv_as_ix86_swap = yes; then
23446
23447$as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h
23448
68b92f78
RS
23449fi
23450
5213506e
RW
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
23452$as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
23453if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
23454 $as_echo_n "(cached) " >&6
68b92f78
RS
23455else
23456 gcc_cv_as_ix86_diff_sect_delta=no
23457 if test x$gcc_cv_as != x; then
23458 echo '.section .rodata
23459.L1:
23460 .long .L2-.L1
23461 .long .L3-.L1
23462 .text
23463.L3: nop
23464.L2: nop' > conftest.s
e0b0fd74 23465 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23466 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
68b92f78
RS
23467 (eval $ac_try) 2>&5
23468 ac_status=$?
5213506e
RW
23469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23470 test $ac_status = 0; }; }
68b92f78
RS
23471 then
23472 gcc_cv_as_ix86_diff_sect_delta=yes
23473 else
23474 echo "configure: failed program was" >&5
23475 cat conftest.s >&5
23476 fi
23477 rm -f conftest.o conftest.s
23478 fi
23479fi
5213506e
RW
23480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
23481$as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
23482if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
23483
5213506e 23484$as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
68b92f78 23485
ad9c4d9f
NN
23486fi
23487
2433310d 23488 # These two are used unconditionally by i386.[ch]; it is to be defined
6f3ca281 23489 # to 1 if the feature is present, 0 otherwise.
5213506e
RW
23490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
23491$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
23492if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
23493 $as_echo_n "(cached) " >&6
8ada417f
ZW
23494else
23495 gcc_cv_as_ix86_gotoff_in_data=no
23496 if test $in_tree_gas = yes; then
23497 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23498 then gcc_cv_as_ix86_gotoff_in_data=yes
23499fi
23500 elif test x$gcc_cv_as != x; then
6e3f3080 23501 echo ' .text
f88c65f7
RH
23502.L0:
23503 nop
23504 .data
8ada417f 23505 .long .L0@GOTOFF' > conftest.s
e0b0fd74 23506 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23507 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23508 (eval $ac_try) 2>&5
23509 ac_status=$?
5213506e
RW
23510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23511 test $ac_status = 0; }; }
8ada417f
ZW
23512 then
23513 gcc_cv_as_ix86_gotoff_in_data=yes
23514 else
23515 echo "configure: failed program was" >&5
23516 cat conftest.s >&5
f88c65f7 23517 fi
8ada417f
ZW
23518 rm -f conftest.o conftest.s
23519 fi
23520fi
5213506e
RW
23521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
23522$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 23523
6f3ca281 23524
ba479fd2 23525cat >>confdefs.h <<_ACEOF
6f3ca281 23526#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 23527_ACEOF
f88c65f7 23528
2433310d
RO
23529
23530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5
23531$as_echo_n "checking assembler for rep and lock prefix... " >&6; }
23532if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then :
23533 $as_echo_n "(cached) " >&6
23534else
23535 gcc_cv_as_ix86_rep_lock_prefix=no
23536 if test x$gcc_cv_as != x; then
23537 echo 'rep movsl
4bade865 23538 lock addl %edi, (%eax,%esi)
2433310d
RO
23539 lock orl $0, (%esp)' > conftest.s
23540 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23541 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23542 (eval $ac_try) 2>&5
23543 ac_status=$?
23544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23545 test $ac_status = 0; }; }
23546 then
23547 gcc_cv_as_ix86_rep_lock_prefix=yes
23548 else
23549 echo "configure: failed program was" >&5
23550 cat conftest.s >&5
23551 fi
23552 rm -f conftest.o conftest.s
23553 fi
23554fi
23555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_rep_lock_prefix" >&5
23556$as_echo "$gcc_cv_as_ix86_rep_lock_prefix" >&6; }
7085bfb6 23557if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then
2433310d 23558
7085bfb6 23559$as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
2433310d 23560
7085bfb6 23561fi
2433310d 23562
1cb36a98 23563 ;;
ef1ecf87
RH
23564
23565 ia64*-*-*)
5213506e
RW
23566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5
23567$as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; }
23568if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then :
23569 $as_echo_n "(cached) " >&6
ef1ecf87 23570else
8ada417f
ZW
23571 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
23572 if test $in_tree_gas = yes; then
23573 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23574 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 23575fi
8ada417f 23576 elif test x$gcc_cv_as != x; then
6e3f3080 23577 echo ' .text
ef1ecf87
RH
23578 addl r15 = @ltoffx(x#), gp
23579 ;;
cfa9ee99 23580 ld8.mov r16 = [r15], x#' > conftest.s
e0b0fd74 23581 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23582 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23583 (eval $ac_try) 2>&5
23584 ac_status=$?
5213506e
RW
23585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23586 test $ac_status = 0; }; }
8ada417f 23587 then
cfa9ee99 23588 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
23589 else
23590 echo "configure: failed program was" >&5
23591 cat conftest.s >&5
2c4a9cff 23592 fi
8ada417f
ZW
23593 rm -f conftest.o conftest.s
23594 fi
23595fi
5213506e
RW
23596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
23597$as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 23598if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2 23599
5213506e 23600$as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
8ada417f 23601
cfa9ee99 23602fi
8ada417f 23603
2c4a9cff 23604 ;;
8ada417f 23605
2c4a9cff 23606 powerpc*-*-*)
8ada417f 23607 case $target in
432218ba
DE
23608 *-*-aix*) conftest_s=' .machine "pwr5"
23609 .csect .text[PR]
6b37db3c 23610 mfcr 3,128';;
8af4d362 23611 *-*-darwin*)
5213506e
RW
23612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5
23613$as_echo_n "checking assembler for .machine directive support... " >&6; }
23614if test "${gcc_cv_as_machine_directive+set}" = set; then :
23615 $as_echo_n "(cached) " >&6
8af4d362
PB
23616else
23617 gcc_cv_as_machine_directive=no
23618 if test x$gcc_cv_as != x; then
23619 echo ' .machine ppc7400' > conftest.s
e0b0fd74 23620 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23621 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8af4d362
PB
23622 (eval $ac_try) 2>&5
23623 ac_status=$?
5213506e
RW
23624 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23625 test $ac_status = 0; }; }
8af4d362
PB
23626 then
23627 gcc_cv_as_machine_directive=yes
23628 else
23629 echo "configure: failed program was" >&5
23630 cat conftest.s >&5
23631 fi
23632 rm -f conftest.o conftest.s
23633 fi
23634fi
5213506e
RW
23635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
23636$as_echo "$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
23637
23638 if test x$gcc_cv_as_machine_directive != xyes; then
23639 echo "*** This target requires an assembler supporting \".machine\"" >&2
23640 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
23641 test x$build = x$target && exit 1
23642 fi
23643 conftest_s=' .text
6b37db3c 23644 mfcr r3,128';;
4c67db14 23645 *) conftest_s=' .machine power4
d2ab3e37 23646 .text
6b37db3c 23647 mfcr 3,128';;
8ada417f 23648 esac
8ada417f 23649
5213506e
RW
23650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5
23651$as_echo_n "checking assembler for mfcr field support... " >&6; }
23652if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then :
23653 $as_echo_n "(cached) " >&6
2c4a9cff 23654else
8ada417f
ZW
23655 gcc_cv_as_powerpc_mfcrf=no
23656 if test $in_tree_gas = yes; then
23657 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23658 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 23659fi
8ada417f 23660 elif test x$gcc_cv_as != x; then
6e3f3080 23661 echo "$conftest_s" > conftest.s
e0b0fd74 23662 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23663 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23664 (eval $ac_try) 2>&5
23665 ac_status=$?
5213506e
RW
23666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23667 test $ac_status = 0; }; }
8ada417f
ZW
23668 then
23669 gcc_cv_as_powerpc_mfcrf=yes
23670 else
23671 echo "configure: failed program was" >&5
23672 cat conftest.s >&5
23673 fi
23674 rm -f conftest.o conftest.s
23675 fi
2c4a9cff 23676fi
5213506e
RW
23677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5
23678$as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 23679if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2 23680
5213506e 23681$as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
ef1ecf87 23682
8ada417f 23683fi
432218ba
DE
23684
23685 case $target in
23686 *-*-aix*) conftest_s=' .machine "pwr5"
23687 .csect .text[PR]
23688 popcntb 3,3';;
23689 *) conftest_s=' .machine power5
23690 .text
23691 popcntb 3,3';;
23692 esac
23693
5213506e
RW
23694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5
23695$as_echo_n "checking assembler for popcntb support... " >&6; }
23696if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then :
23697 $as_echo_n "(cached) " >&6
432218ba
DE
23698else
23699 gcc_cv_as_powerpc_popcntb=no
23700 if test $in_tree_gas = yes; then
23701 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23702 then gcc_cv_as_powerpc_popcntb=yes
23703fi
23704 elif test x$gcc_cv_as != x; then
23705 echo "$conftest_s" > conftest.s
e0b0fd74 23706 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23707 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
432218ba
DE
23708 (eval $ac_try) 2>&5
23709 ac_status=$?
5213506e
RW
23710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23711 test $ac_status = 0; }; }
432218ba
DE
23712 then
23713 gcc_cv_as_powerpc_popcntb=yes
23714 else
23715 echo "configure: failed program was" >&5
23716 cat conftest.s >&5
23717 fi
23718 rm -f conftest.o conftest.s
23719 fi
23720fi
5213506e
RW
23721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5
23722$as_echo "$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
23723if test $gcc_cv_as_powerpc_popcntb = yes; then
23724
5213506e 23725$as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
432218ba 23726
9719f3b7
DE
23727fi
23728
23729 case $target in
23730 *-*-aix*) conftest_s=' .machine "pwr5x"
23731 .csect .text[PR]
23732 frin 1,1';;
1e04bfdc 23733 *) conftest_s=' .machine power5
9719f3b7
DE
23734 .text
23735 frin 1,1';;
23736 esac
23737
5213506e
RW
23738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5
23739$as_echo_n "checking assembler for fp round support... " >&6; }
23740if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then :
23741 $as_echo_n "(cached) " >&6
9719f3b7
DE
23742else
23743 gcc_cv_as_powerpc_fprnd=no
23744 if test $in_tree_gas = yes; then
23745 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23746 then gcc_cv_as_powerpc_fprnd=yes
23747fi
23748 elif test x$gcc_cv_as != x; then
23749 echo "$conftest_s" > conftest.s
e0b0fd74 23750 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23751 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9719f3b7
DE
23752 (eval $ac_try) 2>&5
23753 ac_status=$?
5213506e
RW
23754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23755 test $ac_status = 0; }; }
9719f3b7
DE
23756 then
23757 gcc_cv_as_powerpc_fprnd=yes
23758 else
23759 echo "configure: failed program was" >&5
23760 cat conftest.s >&5
23761 fi
23762 rm -f conftest.o conftest.s
23763 fi
23764fi
5213506e
RW
23765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5
23766$as_echo "$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
23767if test $gcc_cv_as_powerpc_fprnd = yes; then
23768
5213506e 23769$as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
9719f3b7 23770
44cd321e
PS
23771fi
23772
23773 case $target in
23774 *-*-aix*) conftest_s=' .machine "pwr6"
23775 .csect .text[PR]
23776 mffgpr 1,3';;
23777 *) conftest_s=' .machine power6
23778 .text
23779 mffgpr 1,3';;
23780 esac
23781
5213506e
RW
23782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5
23783$as_echo_n "checking assembler for move fp gpr support... " >&6; }
23784if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then :
23785 $as_echo_n "(cached) " >&6
44cd321e
PS
23786else
23787 gcc_cv_as_powerpc_mfpgpr=no
23788 if test $in_tree_gas = yes; then
cacf1ca8 23789 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
44cd321e
PS
23790 then gcc_cv_as_powerpc_mfpgpr=yes
23791fi
23792 elif test x$gcc_cv_as != x; then
23793 echo "$conftest_s" > conftest.s
e0b0fd74 23794 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23795 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
44cd321e
PS
23796 (eval $ac_try) 2>&5
23797 ac_status=$?
5213506e
RW
23798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23799 test $ac_status = 0; }; }
44cd321e
PS
23800 then
23801 gcc_cv_as_powerpc_mfpgpr=yes
23802 else
23803 echo "configure: failed program was" >&5
23804 cat conftest.s >&5
23805 fi
23806 rm -f conftest.o conftest.s
23807 fi
23808fi
5213506e
RW
23809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5
23810$as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
23811if test $gcc_cv_as_powerpc_mfpgpr = yes; then
23812
5213506e 23813$as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
44cd321e 23814
432218ba
DE
23815fi
23816
7f970b70
AM
23817 case $target in
23818 *-*-aix*) conftest_s=' .csect .text[PR]
23819LCF..0:
23820 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
23821 *-*-darwin*)
23822 conftest_s=' .text
23823LCF0:
23824 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
23825 *) conftest_s=' .text
23826.LCF0:
23827 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
23828 esac
23829
5213506e
RW
23830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5
23831$as_echo_n "checking assembler for rel16 relocs... " >&6; }
23832if test "${gcc_cv_as_powerpc_rel16+set}" = set; then :
23833 $as_echo_n "(cached) " >&6
695d8830
AS
23834else
23835 gcc_cv_as_powerpc_rel16=no
23836 if test $in_tree_gas = yes; then
23837 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23838 then gcc_cv_as_powerpc_rel16=yes
23839fi
23840 elif test x$gcc_cv_as != x; then
23841 echo "$conftest_s" > conftest.s
e0b0fd74 23842 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23843 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
695d8830
AS
23844 (eval $ac_try) 2>&5
23845 ac_status=$?
5213506e
RW
23846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23847 test $ac_status = 0; }; }
695d8830
AS
23848 then
23849 gcc_cv_as_powerpc_rel16=yes
23850 else
23851 echo "configure: failed program was" >&5
23852 cat conftest.s >&5
23853 fi
23854 rm -f conftest.o conftest.s
23855 fi
23856fi
5213506e
RW
23857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5
23858$as_echo "$gcc_cv_as_powerpc_rel16" >&6; }
695d8830
AS
23859if test $gcc_cv_as_powerpc_rel16 = yes; then
23860
5213506e 23861$as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
695d8830
AS
23862
23863fi
23864
b639c3c2
JJ
23865 case $target in
23866 *-*-aix*) conftest_s=' .machine "pwr6"
23867 .csect .text[PR]
23868 cmpb 3,4,5';;
23869 *) conftest_s=' .machine power6
23870 .text
23871 cmpb 3,4,5';;
23872 esac
23873
5213506e
RW
23874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5
23875$as_echo_n "checking assembler for compare bytes support... " >&6; }
23876if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then :
23877 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23878else
23879 gcc_cv_as_powerpc_cmpb=no
23880 if test $in_tree_gas = yes; then
cacf1ca8 23881 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23882 then gcc_cv_as_powerpc_cmpb=yes
23883fi
23884 elif test x$gcc_cv_as != x; then
23885 echo "$conftest_s" > conftest.s
e0b0fd74 23886 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23887 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23888 (eval $ac_try) 2>&5
23889 ac_status=$?
5213506e
RW
23890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23891 test $ac_status = 0; }; }
b639c3c2
JJ
23892 then
23893 gcc_cv_as_powerpc_cmpb=yes
23894 else
23895 echo "configure: failed program was" >&5
23896 cat conftest.s >&5
23897 fi
23898 rm -f conftest.o conftest.s
23899 fi
23900fi
5213506e
RW
23901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5
23902$as_echo "$gcc_cv_as_powerpc_cmpb" >&6; }
b639c3c2
JJ
23903if test $gcc_cv_as_powerpc_cmpb = yes; then
23904
5213506e 23905$as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
b639c3c2
JJ
23906
23907fi
23908
23909 case $target in
23910 *-*-aix*) conftest_s=' .machine "pwr6"
23911 .csect .text[PR]
0d74c0ee 23912 dadd 1,2,3';;
b639c3c2
JJ
23913 *) conftest_s=' .machine power6
23914 .text
0d74c0ee 23915 dadd 1,2,3';;
b639c3c2
JJ
23916 esac
23917
5213506e
RW
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5
23919$as_echo_n "checking assembler for decimal float support... " >&6; }
23920if test "${gcc_cv_as_powerpc_dfp+set}" = set; then :
23921 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23922else
23923 gcc_cv_as_powerpc_dfp=no
23924 if test $in_tree_gas = yes; then
cacf1ca8 23925 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23926 then gcc_cv_as_powerpc_dfp=yes
23927fi
23928 elif test x$gcc_cv_as != x; then
23929 echo "$conftest_s" > conftest.s
e0b0fd74 23930 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23931 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23932 (eval $ac_try) 2>&5
23933 ac_status=$?
5213506e
RW
23934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23935 test $ac_status = 0; }; }
b639c3c2
JJ
23936 then
23937 gcc_cv_as_powerpc_dfp=yes
23938 else
23939 echo "configure: failed program was" >&5
23940 cat conftest.s >&5
23941 fi
23942 rm -f conftest.o conftest.s
23943 fi
23944fi
5213506e
RW
23945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5
23946$as_echo "$gcc_cv_as_powerpc_dfp" >&6; }
b639c3c2
JJ
23947if test $gcc_cv_as_powerpc_dfp = yes; then
23948
5213506e 23949$as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
b639c3c2 23950
d40c9e33
PB
23951fi
23952
23953 case $target in
23954 *-*-aix*) conftest_s=' .machine "pwr7"
23955 .csect .text[PR]
23956 lxvd2x 1,2,3';;
23957 *) conftest_s=' .machine power7
23958 .text
23959 lxvd2x 1,2,3';;
23960 esac
23961
5213506e
RW
23962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5
23963$as_echo_n "checking assembler for vector-scalar support... " >&6; }
23964if test "${gcc_cv_as_powerpc_vsx+set}" = set; then :
23965 $as_echo_n "(cached) " >&6
d40c9e33
PB
23966else
23967 gcc_cv_as_powerpc_vsx=no
23968 if test $in_tree_gas = yes; then
cacf1ca8 23969 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
d40c9e33
PB
23970 then gcc_cv_as_powerpc_vsx=yes
23971fi
23972 elif test x$gcc_cv_as != x; then
23973 echo "$conftest_s" > conftest.s
e0b0fd74 23974 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23975 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d40c9e33
PB
23976 (eval $ac_try) 2>&5
23977 ac_status=$?
5213506e
RW
23978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23979 test $ac_status = 0; }; }
d40c9e33
PB
23980 then
23981 gcc_cv_as_powerpc_vsx=yes
23982 else
23983 echo "configure: failed program was" >&5
23984 cat conftest.s >&5
23985 fi
23986 rm -f conftest.o conftest.s
23987 fi
23988fi
5213506e
RW
23989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5
23990$as_echo "$gcc_cv_as_powerpc_vsx" >&6; }
d40c9e33
PB
23991if test $gcc_cv_as_powerpc_vsx = yes; then
23992
5213506e 23993$as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
d40c9e33 23994
cacf1ca8
MM
23995fi
23996
23997 case $target in
23998 *-*-aix*) conftest_s=' .machine "pwr7"
23999 .csect .text[PR]
24000 popcntd 3,3';;
24001 *) conftest_s=' .machine power7
24002 .text
24003 popcntd 3,3';;
24004 esac
24005
5213506e
RW
24006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5
24007$as_echo_n "checking assembler for popcntd support... " >&6; }
24008if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then :
24009 $as_echo_n "(cached) " >&6
cacf1ca8
MM
24010else
24011 gcc_cv_as_powerpc_popcntd=no
24012 if test $in_tree_gas = yes; then
24013 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
24014 then gcc_cv_as_powerpc_popcntd=yes
24015fi
24016 elif test x$gcc_cv_as != x; then
24017 echo "$conftest_s" > conftest.s
e0b0fd74 24018 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 24019 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
24020 (eval $ac_try) 2>&5
24021 ac_status=$?
5213506e
RW
24022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24023 test $ac_status = 0; }; }
cacf1ca8
MM
24024 then
24025 gcc_cv_as_powerpc_popcntd=yes
24026 else
24027 echo "configure: failed program was" >&5
24028 cat conftest.s >&5
24029 fi
24030 rm -f conftest.o conftest.s
24031 fi
24032fi
5213506e
RW
24033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5
24034$as_echo "$gcc_cv_as_powerpc_popcntd" >&6; }
cacf1ca8
MM
24035if test $gcc_cv_as_powerpc_popcntd = yes; then
24036
5213506e 24037$as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
cacf1ca8
MM
24038
24039fi
24040
24041 case $target in
24042 *-*-aix*) conftest_s=' .csect .text[PR]
24043 lwsync';;
24044 *) conftest_s=' .text
24045 lwsync';;
24046 esac
24047
5213506e
RW
24048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5
24049$as_echo_n "checking assembler for lwsync support... " >&6; }
24050if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then :
24051 $as_echo_n "(cached) " >&6
cacf1ca8
MM
24052else
24053 gcc_cv_as_powerpc_lwsync=no
24054 if test $in_tree_gas = yes; then
24055 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
24056 then gcc_cv_as_powerpc_lwsync=yes
24057fi
24058 elif test x$gcc_cv_as != x; then
24059 echo "$conftest_s" > conftest.s
e0b0fd74 24060 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 24061 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
24062 (eval $ac_try) 2>&5
24063 ac_status=$?
5213506e
RW
24064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24065 test $ac_status = 0; }; }
cacf1ca8
MM
24066 then
24067 gcc_cv_as_powerpc_lwsync=yes
24068 else
24069 echo "configure: failed program was" >&5
24070 cat conftest.s >&5
24071 fi
24072 rm -f conftest.o conftest.s
24073 fi
24074fi
5213506e
RW
24075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5
24076$as_echo "$gcc_cv_as_powerpc_lwsync" >&6; }
cacf1ca8
MM
24077if test $gcc_cv_as_powerpc_lwsync = yes; then
24078
5213506e 24079$as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
cacf1ca8 24080
47f67e51
PB
24081fi
24082
24083 case $target in
24084 *-*-aix*) conftest_s=' .machine "476"
24085 .csect .text[PR]
24086 dci 0';;
24087 *) conftest_s=' .machine "476"
24088 .text
24089 dci 0';;
24090 esac
24091
24092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5
24093$as_echo_n "checking assembler for data cache invalidate support... " >&6; }
24094if test "${gcc_cv_as_powerpc_dci+set}" = set; then :
24095 $as_echo_n "(cached) " >&6
24096else
24097 gcc_cv_as_powerpc_dci=no
24098 if test $in_tree_gas = yes; then
24099 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
24100 then gcc_cv_as_powerpc_dci=yes
24101fi
24102 elif test x$gcc_cv_as != x; then
24103 echo "$conftest_s" > conftest.s
e0b0fd74 24104 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
47f67e51
PB
24105 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24106 (eval $ac_try) 2>&5
24107 ac_status=$?
24108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24109 test $ac_status = 0; }; }
24110 then
24111 gcc_cv_as_powerpc_dci=yes
24112 else
24113 echo "configure: failed program was" >&5
24114 cat conftest.s >&5
24115 fi
24116 rm -f conftest.o conftest.s
24117 fi
24118fi
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5
24120$as_echo "$gcc_cv_as_powerpc_dci" >&6; }
24121if test $gcc_cv_as_powerpc_dci = yes; then
24122
24123$as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
24124
e51917ae
JM
24125fi
24126
5213506e
RW
24127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24128$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24129if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
24130 $as_echo_n "(cached) " >&6
e51917ae
JM
24131else
24132 gcc_cv_as_powerpc_gnu_attribute=no
24133 if test $in_tree_gas = yes; then
24134 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24135 then gcc_cv_as_powerpc_gnu_attribute=yes
24136fi
24137 elif test x$gcc_cv_as != x; then
24138 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24139 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24140 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e51917ae
JM
24141 (eval $ac_try) 2>&5
24142 ac_status=$?
5213506e
RW
24143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24144 test $ac_status = 0; }; }
e51917ae
JM
24145 then
24146 gcc_cv_as_powerpc_gnu_attribute=yes
24147 else
24148 echo "configure: failed program was" >&5
24149 cat conftest.s >&5
24150 fi
24151 rm -f conftest.o conftest.s
24152 fi
24153fi
5213506e
RW
24154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
24155$as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; }
e51917ae
JM
24156if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
24157
5213506e 24158$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
e51917ae 24159
9752c4ad
AM
24160fi
24161
5213506e
RW
24162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
24163$as_echo_n "checking assembler for tls marker support... " >&6; }
24164if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
24165 $as_echo_n "(cached) " >&6
9752c4ad
AM
24166else
24167 gcc_cv_as_powerpc_tls_markers=no
24168 if test $in_tree_gas = yes; then
207bf79d 24169 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
24170 then gcc_cv_as_powerpc_tls_markers=yes
24171fi
24172 elif test x$gcc_cv_as != x; then
24173 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
e0b0fd74 24174 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24175 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9752c4ad
AM
24176 (eval $ac_try) 2>&5
24177 ac_status=$?
5213506e
RW
24178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24179 test $ac_status = 0; }; }
9752c4ad
AM
24180 then
24181 gcc_cv_as_powerpc_tls_markers=yes
24182 else
24183 echo "configure: failed program was" >&5
24184 cat conftest.s >&5
24185 fi
24186 rm -f conftest.o conftest.s
24187 fi
24188fi
5213506e
RW
24189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5
24190$as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; }
9752c4ad
AM
24191if test $gcc_cv_as_powerpc_tls_markers = yes; then
24192
5213506e 24193$as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
9752c4ad 24194
7f970b70 24195fi
636cf8b1
RS
24196
24197 case $target in
24198 *-*-aix*)
24199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
24200$as_echo_n "checking assembler for .ref support... " >&6; }
24201if test "${gcc_cv_as_aix_ref+set}" = set; then :
24202 $as_echo_n "(cached) " >&6
24203else
24204 gcc_cv_as_aix_ref=no
24205 if test $in_tree_gas = yes; then
24206 if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + `
24207 then :
24208fi
24209 elif test x$gcc_cv_as != x; then
24210 echo ' .csect stuff[rw]
24211 stuff:
24212 .long 1
24213 .extern sym
24214 .ref sym
24215 ' > conftest.s
24216 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
24217 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24218 (eval $ac_try) 2>&5
24219 ac_status=$?
24220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24221 test $ac_status = 0; }; }
24222 then
24223 gcc_cv_as_aix_ref=yes
24224 else
24225 echo "configure: failed program was" >&5
24226 cat conftest.s >&5
24227 fi
24228 rm -f conftest.o conftest.s
24229 fi
24230fi
24231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5
24232$as_echo "$gcc_cv_as_aix_ref" >&6; }
24233if test $gcc_cv_as_aix_ref = yes; then
24234
24235$as_echo "#define HAVE_AS_REF 1" >>confdefs.h
24236
24237fi
24238 ;;
24239 esac
8ada417f
ZW
24240 ;;
24241
24242 mips*-*-*)
5213506e
RW
24243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
24244$as_echo_n "checking assembler for explicit relocation support... " >&6; }
24245if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then :
24246 $as_echo_n "(cached) " >&6
8ada417f
ZW
24247else
24248 gcc_cv_as_mips_explicit_relocs=no
24249 if test $in_tree_gas = yes; then
24250 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
24251 then gcc_cv_as_mips_explicit_relocs=yes
24252fi
24253 elif test x$gcc_cv_as != x; then
6e3f3080 24254 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
e0b0fd74 24255 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24256 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24257 (eval $ac_try) 2>&5
24258 ac_status=$?
5213506e
RW
24259 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24260 test $ac_status = 0; }; }
8ada417f
ZW
24261 then
24262 gcc_cv_as_mips_explicit_relocs=yes
24263 else
24264 echo "configure: failed program was" >&5
24265 cat conftest.s >&5
ef1ecf87 24266 fi
8ada417f
ZW
24267 rm -f conftest.o conftest.s
24268 fi
24269fi
5213506e
RW
24270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5
24271$as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
24272if test $gcc_cv_as_mips_explicit_relocs = yes; then
24273 if test x$target_cpu_default = x
24274 then target_cpu_default=MASK_EXPLICIT_RELOCS
24275 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
24276 fi
4551169f 24277fi
5213506e
RW
24278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
24279$as_echo_n "checking assembler for -mno-shared support... " >&6; }
24280if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
24281 $as_echo_n "(cached) " >&6
4551169f
RS
24282else
24283 gcc_cv_as_mips_no_shared=no
24284 if test $in_tree_gas = yes; then
24285 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
24286 then gcc_cv_as_mips_no_shared=yes
24287fi
24288 elif test x$gcc_cv_as != x; then
24289 echo 'nop' > conftest.s
e0b0fd74 24290 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5'
5213506e 24291 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4551169f
RS
24292 (eval $ac_try) 2>&5
24293 ac_status=$?
5213506e
RW
24294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24295 test $ac_status = 0; }; }
4551169f
RS
24296 then
24297 gcc_cv_as_mips_no_shared=yes
24298 else
24299 echo "configure: failed program was" >&5
24300 cat conftest.s >&5
24301 fi
24302 rm -f conftest.o conftest.s
24303 fi
24304fi
5213506e
RW
24305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5
24306$as_echo "$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
24307if test $gcc_cv_as_mips_no_shared = yes; then
24308
5213506e 24309$as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
4551169f 24310
dcb957d9
JM
24311fi
24312
5213506e
RW
24313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24314$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24315if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
24316 $as_echo_n "(cached) " >&6
dcb957d9
JM
24317else
24318 gcc_cv_as_mips_gnu_attribute=no
24319 if test $in_tree_gas = yes; then
24320 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24321 then gcc_cv_as_mips_gnu_attribute=yes
24322fi
24323 elif test x$gcc_cv_as != x; then
24324 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24325 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24326 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
dcb957d9
JM
24327 (eval $ac_try) 2>&5
24328 ac_status=$?
5213506e
RW
24329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24330 test $ac_status = 0; }; }
dcb957d9
JM
24331 then
24332 gcc_cv_as_mips_gnu_attribute=yes
24333 else
24334 echo "configure: failed program was" >&5
24335 cat conftest.s >&5
24336 fi
24337 rm -f conftest.o conftest.s
24338 fi
24339fi
5213506e
RW
24340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5
24341$as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; }
dcb957d9
JM
24342if test $gcc_cv_as_mips_gnu_attribute = yes; then
24343
5213506e 24344$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
dcb957d9 24345
a44380d2
JM
24346fi
24347
5213506e
RW
24348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
24349$as_echo_n "checking assembler for .dtprelword support... " >&6; }
24350if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
24351 $as_echo_n "(cached) " >&6
a44380d2
JM
24352else
24353 gcc_cv_as_mips_dtprelword=no
24354 if test $in_tree_gas = yes; then
24355 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24356 then gcc_cv_as_mips_dtprelword=yes
24357fi
24358 elif test x$gcc_cv_as != x; then
24359 echo '.section .tdata,"awT",@progbits
24360x:
24361 .word 2
24362 .text
24363 .dtprelword x+0x8000' > conftest.s
e0b0fd74 24364 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24365 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a44380d2
JM
24366 (eval $ac_try) 2>&5
24367 ac_status=$?
5213506e
RW
24368 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24369 test $ac_status = 0; }; }
a44380d2
JM
24370 then
24371 gcc_cv_as_mips_dtprelword=yes
24372 else
24373 echo "configure: failed program was" >&5
24374 cat conftest.s >&5
24375 fi
24376 rm -f conftest.o conftest.s
24377 fi
24378fi
5213506e
RW
24379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5
24380$as_echo "$gcc_cv_as_mips_dtprelword" >&6; }
a44380d2
JM
24381if test $gcc_cv_as_mips_dtprelword = yes; then
24382
5213506e 24383$as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
a44380d2 24384
8ada417f 24385fi
b53da244
AN
24386
24387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
24388$as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
24389 gcc_cv_as_ld_jalr_reloc=no
24390 if test $gcc_cv_as_mips_explicit_relocs = yes; then
24391 if test $in_tree_ld = yes ; then
24392 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 \
24393 && test $in_tree_ld_is_elf = yes; then
24394 gcc_cv_as_ld_jalr_reloc=yes
24395 fi
24396 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then
24397 echo ' .ent x' > conftest.s
24398 echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s
24399 echo ' ld $25,%call16(y)($28)' >> conftest.s
24400 echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s
24401 echo '1: jalr $25' >> conftest.s
24402 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s
24403 echo '1: jalr $25' >> conftest.s
24404 echo ' .end x' >> conftest.s
24405 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \
24406 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then
bc492e47
RO
24407 if $gcc_cv_objdump -d conftest.so | grep jalr >/dev/null 2>&1 \
24408 && $gcc_cv_objdump -d conftest.so | grep "bal.*<x>" >/dev/null 2>&1; then
b53da244
AN
24409 gcc_cv_as_ld_jalr_reloc=yes
24410 fi
24411 fi
24412 rm -f conftest.*
24413 fi
24414 fi
24415 if test $gcc_cv_as_ld_jalr_reloc = yes; then
24416 if test x$target_cpu_default = x; then
24417 target_cpu_default=MASK_RELAX_PIC_CALLS
24418 else
24419 target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
24420 fi
24421 fi
24422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
24423$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
49576e25
RS
24424
24425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5
24426$as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; }
24427if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then :
24428 $as_echo_n "(cached) " >&6
24429else
24430 gcc_cv_ld_mips_personality_relaxation=no
24431 if test $in_tree_ld = yes ; then
24432 if test "$gcc_cv_gld_major_version" -eq 2 \
24433 -a "$gcc_cv_gld_minor_version" -ge 21 \
24434 -o "$gcc_cv_gld_major_version" -gt 2; then
24435 gcc_cv_ld_mips_personality_relaxation=yes
24436 fi
24437 elif test x$gcc_cv_as != x \
24438 -a x$gcc_cv_ld != x \
24439 -a x$gcc_cv_readelf != x ; then
24440 cat > conftest.s <<EOF
24441 .cfi_startproc
24442 .cfi_personality 0x80,indirect_ptr
24443 .ent test
24444test:
24445 nop
24446 .end test
24447 .cfi_endproc
24448
24449 .section .data,"aw",@progbits
24450indirect_ptr:
24451 .dc.a personality
24452EOF
24453 if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
24454 && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
24455 if $gcc_cv_readelf -d conftest 2>&1 \
24456 | grep TEXTREL > /dev/null 2>&1; then
24457 :
24458 elif $gcc_cv_readelf --relocs conftest 2>&1 \
24459 | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
24460 :
24461 else
24462 gcc_cv_ld_mips_personality_relaxation=yes
24463 fi
24464 fi
24465 fi
24466 rm -f conftest.s conftest.o conftest
24467fi
24468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5
24469$as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; }
24470 if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
24471
24472$as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h
24473
24474 fi
dbad5e72
SE
24475 ;;
24476esac
8ada417f 24477
dbad5e72
SE
24478# Mips and HP-UX need the GNU assembler.
24479# Linux on IA64 might be able to use the Intel assembler.
24480
24481case "$target" in
24482 mips*-*-* | *-*-hpux* )
82563d35
RS
24483 if test x$gas_flag = xyes \
24484 || test x"$host" != x"$build" \
24485 || test ! -x "$gcc_cv_as" \
24486 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
24487 :
24488 else
24489 echo "*** This configuration requires the GNU assembler" >&2
24490 exit 1
24491 fi
ef1ecf87 24492 ;;
1cb36a98 24493esac
dbad5e72 24494
9d147085
RH
24495# ??? Not all targets support dwarf2 debug_line, even within a version
24496# of gas. Moreover, we need to emit a valid instruction to trigger any
24497# info to the output file. So, as supported targets are added to gas 2.11,
24498# add some instruction here to (also) show we expect this might work.
24499# ??? Once 2.11 is released, probably need to add first known working
24500# version to the per-target configury.
24501case "$target" in
80486e06 24502 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 24503 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
ad9646c7 24504 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
15a43677 24505 | spu-*-* | fido*-*-* | m32c-*-*)
9d147085
RH
24506 insn="nop"
24507 ;;
57116d8d 24508 ia64*-*-* | s390*-*-*)
9d147085
RH
24509 insn="nop 0"
24510 ;;
2853bc5a
HPN
24511 mmix-*-*)
24512 insn="swym 0"
24513 ;;
8ada417f
ZW
24514esac
24515if test x"$insn" != x; then
24516 conftest_s="\
24517 .file 1 \"conftest.s\"
24518 .loc 1 3 0
24519 $insn"
5213506e
RW
24520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5
24521$as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; }
24522if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then :
24523 $as_echo_n "(cached) " >&6
8ada417f
ZW
24524else
24525 gcc_cv_as_dwarf2_debug_line=no
24526 if test $in_tree_gas = yes; then
24527 if test $in_tree_gas_is_elf = yes \
24528 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24529 then gcc_cv_as_dwarf2_debug_line=yes
24530fi
24531 elif test x$gcc_cv_as != x; then
6e3f3080 24532 echo "$conftest_s" > conftest.s
e0b0fd74 24533 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24534 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24535 (eval $ac_try) 2>&5
24536 ac_status=$?
5213506e
RW
24537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24538 test $ac_status = 0; }; }
8ada417f 24539 then
080a5bb0
EB
24540 if test x$gcc_cv_objdump != x \
24541 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
24542 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
24543 gcc_cv_as_dwarf2_debug_line=yes
24544 fi
24545 else
24546 echo "configure: failed program was" >&5
24547 cat conftest.s >&5
24548 fi
24549 rm -f conftest.o conftest.s
24550 fi
24551fi
5213506e
RW
24552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5
24553$as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 24554
ad9c4d9f 24555
8ada417f
ZW
24556# The .debug_line file table must be in the exact order that
24557# we specified the files, since these indices are also used
24558# by DW_AT_decl_file. Approximate this test by testing if
24559# the assembler bitches if the same index is assigned twice.
5213506e
RW
24560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5
24561$as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; }
24562if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then :
24563 $as_echo_n "(cached) " >&6
8ada417f
ZW
24564else
24565 gcc_cv_as_dwarf2_file_buggy=no
24566 if test x$gcc_cv_as != x; then
6e3f3080 24567 echo ' .file 1 "foo.s"
8ada417f 24568 .file 1 "bar.s"' > conftest.s
e0b0fd74 24569 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24570 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24571 (eval $ac_try) 2>&5
24572 ac_status=$?
5213506e
RW
24573 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24574 test $ac_status = 0; }; }
8ada417f
ZW
24575 then
24576 gcc_cv_as_dwarf2_file_buggy=yes
24577 else
24578 echo "configure: failed program was" >&5
24579 cat conftest.s >&5
24580 fi
24581 rm -f conftest.o conftest.s
24582 fi
ad9c4d9f 24583fi
5213506e
RW
24584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5
24585$as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
24586
24587
24588 if test $gcc_cv_as_dwarf2_debug_line = yes \
24589 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2 24590
5213506e 24591$as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h
9d147085 24592
8ada417f 24593 fi
ad9c4d9f 24594
5213506e
RW
24595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5
24596$as_echo_n "checking assembler for --gdwarf2 option... " >&6; }
24597if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then :
24598 $as_echo_n "(cached) " >&6
8ada417f
ZW
24599else
24600 gcc_cv_as_gdwarf2_flag=no
24601 if test $in_tree_gas = yes; then
24602 if test $in_tree_gas_is_elf = yes \
24603 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24604 then gcc_cv_as_gdwarf2_flag=yes
24605fi
24606 elif test x$gcc_cv_as != x; then
6e3f3080 24607 echo "$insn" > conftest.s
e0b0fd74 24608 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5'
5213506e 24609 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24610 (eval $ac_try) 2>&5
24611 ac_status=$?
5213506e
RW
24612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24613 test $ac_status = 0; }; }
8ada417f
ZW
24614 then
24615 gcc_cv_as_gdwarf2_flag=yes
24616 else
24617 echo "configure: failed program was" >&5
24618 cat conftest.s >&5
24619 fi
24620 rm -f conftest.o conftest.s
24621 fi
ad9c4d9f 24622fi
5213506e
RW
24623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5
24624$as_echo "$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 24625if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2 24626
5213506e 24627$as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2
GK
24628
24629fi
ad9c4d9f 24630
5213506e
RW
24631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
24632$as_echo_n "checking assembler for --gstabs option... " >&6; }
24633if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
24634 $as_echo_n "(cached) " >&6
8ada417f
ZW
24635else
24636 gcc_cv_as_gstabs_flag=no
24637 if test $in_tree_gas = yes; then
24638 if test $in_tree_gas_is_elf = yes \
24639 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24640 then gcc_cv_as_gstabs_flag=yes
24641fi
24642 elif test x$gcc_cv_as != x; then
6e3f3080 24643 echo "$insn" > conftest.s
e0b0fd74 24644 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5'
5213506e 24645 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24646 (eval $ac_try) 2>&5
24647 ac_status=$?
5213506e
RW
24648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24649 test $ac_status = 0; }; }
8ada417f
ZW
24650 then
24651 # The native Solaris 9/Intel assembler doesn't understand --gstabs
24652 # and warns about it, but still exits successfully. So check for
24653 # this.
ba479fd2 24654 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
5213506e 24655 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24656 (eval $ac_try) 2>&5
24657 ac_status=$?
5213506e
RW
24658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24659 test $ac_status = 0; }; }
8ada417f
ZW
24660 then :
24661 else gcc_cv_as_gstabs_flag=yes
24662 fi
24663 else
24664 echo "configure: failed program was" >&5
24665 cat conftest.s >&5
24666 fi
24667 rm -f conftest.o conftest.s
24668 fi
ad9c4d9f 24669fi
5213506e
RW
24670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5
24671$as_echo "$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 24672if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2 24673
5213506e 24674$as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2 24675
c8aea42c
PB
24676fi
24677
5213506e
RW
24678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
24679$as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
24680if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
24681 $as_echo_n "(cached) " >&6
c8aea42c
PB
24682else
24683 gcc_cv_as_debug_prefix_map_flag=no
24684 if test $in_tree_gas = yes; then
303a4698 24685 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
24686 then gcc_cv_as_debug_prefix_map_flag=yes
24687fi
24688 elif test x$gcc_cv_as != x; then
24689 echo "$insn" > conftest.s
e0b0fd74 24690 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
5213506e 24691 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c8aea42c
PB
24692 (eval $ac_try) 2>&5
24693 ac_status=$?
5213506e
RW
24694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24695 test $ac_status = 0; }; }
c8aea42c
PB
24696 then
24697 gcc_cv_as_debug_prefix_map_flag=yes
24698 else
24699 echo "configure: failed program was" >&5
24700 cat conftest.s >&5
24701 fi
24702 rm -f conftest.o conftest.s
24703 fi
24704fi
5213506e
RW
24705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5
24706$as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; }
c8aea42c
PB
24707if test $gcc_cv_as_debug_prefix_map_flag = yes; then
24708
5213506e 24709$as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
c8aea42c 24710
5f0e9ea2 24711fi
8ada417f 24712fi
5f0e9ea2 24713
5213506e
RW
24714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5
24715$as_echo_n "checking assembler for .lcomm with alignment... " >&6; }
24716if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then :
24717 $as_echo_n "(cached) " >&6
28e6bb13
NC
24718else
24719 gcc_cv_as_lcomm_with_alignment=no
24720 if test x$gcc_cv_as != x; then
24721 echo '.lcomm bar,4,16' > conftest.s
e0b0fd74 24722 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24723 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
28e6bb13
NC
24724 (eval $ac_try) 2>&5
24725 ac_status=$?
5213506e
RW
24726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24727 test $ac_status = 0; }; }
28e6bb13
NC
24728 then
24729 gcc_cv_as_lcomm_with_alignment=yes
24730 else
24731 echo "configure: failed program was" >&5
24732 cat conftest.s >&5
24733 fi
24734 rm -f conftest.o conftest.s
24735 fi
24736fi
5213506e
RW
24737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5
24738$as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; }
28e6bb13
NC
24739if test $gcc_cv_as_lcomm_with_alignment = yes; then
24740
5213506e 24741$as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
28e6bb13
NC
24742
24743fi
24744
5213506e
RW
24745# Check whether --enable-gnu-unique-object was given.
24746if test "${enable_gnu_unique_object+set}" = set; then :
24747 enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in
e31bcd1b 24748 yes | no) ;;
5213506e
RW
24749 *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
24750Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
e31bcd1b
JM
24751 esac
24752else
5213506e
RW
24753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5
24754$as_echo_n "checking assembler for gnu_unique_object... " >&6; }
24755if test "${gcc_cv_as_gnu_unique_object+set}" = set; then :
24756 $as_echo_n "(cached) " >&6
e31bcd1b
JM
24757else
24758 gcc_cv_as_gnu_unique_object=no
24759 if test $in_tree_gas = yes; then
24760 if test $in_tree_gas_is_elf = yes \
24761 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
24762 then gcc_cv_as_gnu_unique_object=yes
24763fi
24764 elif test x$gcc_cv_as != x; then
24765 echo '.type foo, @gnu_unique_object' > conftest.s
e0b0fd74 24766 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24767 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e31bcd1b
JM
24768 (eval $ac_try) 2>&5
24769 ac_status=$?
5213506e
RW
24770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24771 test $ac_status = 0; }; }
e31bcd1b 24772 then
e00ded68 24773 gcc_cv_as_gnu_unique_object=yes
e31bcd1b
JM
24774 else
24775 echo "configure: failed program was" >&5
24776 cat conftest.s >&5
24777 fi
24778 rm -f conftest.o conftest.s
24779 fi
24780fi
5213506e
RW
24781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
24782$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
e31bcd1b 24783if test $gcc_cv_as_gnu_unique_object = yes; then
e00ded68
JM
24784 # Also check for ld.so support, i.e. glibc 2.11 or higher.
24785 if test x$host = x$build -a x$host = x$target &&
cdf6bfb7 24786 glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
1a242e3c
UB
24787 glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
24788 glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
e00ded68
JM
24789 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
24790 if test "$glibcnum" -ge 2011 ; then
24791 enable_gnu_unique_object=yes
24792 fi
24793 fi
e31bcd1b 24794fi
5213506e
RW
24795fi
24796
e31bcd1b
JM
24797if test x$enable_gnu_unique_object = xyes; then
24798
5213506e 24799$as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h
e31bcd1b
JM
24800
24801fi
24802
5213506e
RW
24803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5
24804$as_echo_n "checking assembler for tolerance to line number 0... " >&6; }
24805if test "${gcc_cv_as_line_zero+set}" = set; then :
24806 $as_echo_n "(cached) " >&6
03943c05
AO
24807else
24808 gcc_cv_as_line_zero=no
24809 if test $in_tree_gas = yes; then
cf0eb7a1
AO
24810 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
24811 then gcc_cv_as_line_zero=yes
03943c05
AO
24812fi
24813 elif test "x$gcc_cv_as" != x; then
24814 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
24815 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
5213506e 24816 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
03943c05
AO
24817 (eval $ac_try) 2>&5
24818 ac_status=$?
5213506e
RW
24819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24820 test $ac_status = 0; }; } &&
03943c05
AO
24821 test "x`cat conftest.out`" = x
24822 then
24823 gcc_cv_as_line_zero=yes
24824 else
24825 echo "configure: failed program was" >&5
24826 cat conftest.s >&5
24827 echo "configure: error output was" >&5
24828 cat conftest.out >&5
24829 fi
24830 rm -f conftest.o conftest.s conftest.out
24831 fi
24832fi
5213506e
RW
24833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5
24834$as_echo "$gcc_cv_as_line_zero" >&6; }
03943c05
AO
24835if test "x$gcc_cv_as_line_zero" = xyes; then
24836
5213506e 24837$as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h
03943c05
AO
24838
24839fi
24840
5213506e
RW
24841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5
24842$as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; }
275b60d6 24843gcc_cv_ld_eh_frame_hdr=no
34a86c2b 24844if test $in_tree_ld = yes ; then
5408ac6c
HPN
24845 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 \
24846 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
24847 gcc_cv_ld_eh_frame_hdr=yes
24848 fi
24849elif test x$gcc_cv_ld != x; then
24850 # Check if linker supports --eh-frame-hdr option
24851 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
24852 gcc_cv_ld_eh_frame_hdr=yes
24853 fi
24854fi
232b67d9 24855
275b60d6 24856if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2 24857
5213506e 24858$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
275b60d6
JJ
24859
24860fi
5213506e
RW
24861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
24862$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 24863
5213506e
RW
24864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5
24865$as_echo_n "checking linker position independent executable support... " >&6; }
24a4dd31
JJ
24866gcc_cv_ld_pie=no
24867if test $in_tree_ld = yes ; then
5408ac6c
HPN
24868 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 \
24869 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
24870 gcc_cv_ld_pie=yes
24871 fi
24872elif test x$gcc_cv_ld != x; then
24873 # Check if linker supports -pie option
24874 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
24875 gcc_cv_ld_pie=yes
24876 fi
24877fi
24878if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2 24879
5213506e 24880$as_echo "#define HAVE_LD_PIE 1" >>confdefs.h
24a4dd31
JJ
24881
24882fi
5213506e
RW
24883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5
24884$as_echo "$gcc_cv_ld_pie" >&6; }
24a4dd31 24885
5213506e
RW
24886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5
24887$as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; }
22ba88ef 24888gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
24889if test $in_tree_ld = yes ; then
24890 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 \
24891 && test $in_tree_ld_is_elf = yes; then
24892 gcc_cv_ld_eh_gc_sections=yes
24893 fi
24894elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
24895 cat > conftest.s <<EOF
24896 .section .text
24897.globl _start
24898 .type _start, @function
24899_start:
24900 .long foo
24901 .size _start, .-_start
24902 .section .text.foo,"ax",@progbits
24903 .type foo, @function
24904foo:
24905 .long 0
24906 .size foo, .-foo
24907 .section .gcc_except_table.foo,"a",@progbits
24908.L0:
24909 .long 0
24910 .section .eh_frame,"a",@progbits
24911 .long .L0
24912EOF
24913 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24914 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24915 | grep "gc-sections option ignored" > /dev/null; then
24916 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24917 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24918 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24919 gcc_cv_ld_eh_gc_sections=yes
24920 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
24921 if test x$gcc_cv_as_comdat_group != xyes; then
24922 gcc_cv_ld_eh_gc_sections=no
24923 cat > conftest.s <<EOF
24924 .section .text
24925.globl _start
24926 .type _start, @function
24927_start:
24928 .long foo
24929 .size _start, .-_start
24930 .section .gnu.linkonce.t.foo,"ax",@progbits
24931 .type foo, @function
24932foo:
24933 .long 0
24934 .size foo, .-foo
24935 .section .gcc_except_table.foo,"a",@progbits
24936.L0:
24937 .long 0
24938 .section .eh_frame,"a",@progbits
24939 .long .L0
24940EOF
24941 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24942 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24943 | grep "gc-sections option ignored" > /dev/null; then
24944 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24945 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24946 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24947 gcc_cv_ld_eh_gc_sections=yes
24948 fi
24949 fi
24950 fi
24951 fi
24952 fi
24953 rm -f conftest.s conftest.o conftest
24954fi
e9d207d9
EB
24955case "$target" in
24956 hppa*-*-linux*)
24957 # ??? This apparently exposes a binutils bug with PC-relative relocations.
24958 gcc_cv_ld_eh_gc_sections=no
24959 ;;
24960esac
22ba88ef
EB
24961if test x$gcc_cv_ld_eh_gc_sections = xyes; then
24962
5213506e 24963$as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h
22ba88ef
EB
24964
24965fi
5213506e
RW
24966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5
24967$as_echo "$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 24968
8bb915b6
NN
24969# --------
24970# UNSORTED
24971# --------
24972
5213506e
RW
24973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
24974$as_echo_n "checking linker --as-needed support... " >&6; }
24975if test "${gcc_cv_ld_as_needed+set}" = set; then :
24976 $as_echo_n "(cached) " >&6
82e923f6
RS
24977else
24978 gcc_cv_ld_as_needed=no
765f1bf9
AM
24979if test $in_tree_ld = yes ; then
24980 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 \
24981 && test $in_tree_ld_is_elf = yes; then
24982 gcc_cv_ld_as_needed=yes
24983 fi
24984elif test x$gcc_cv_ld != x; then
24985 # Check if linker supports --as-needed and --no-as-needed options
24986 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
24987 gcc_cv_ld_as_needed=yes
24988 fi
24989fi
82e923f6
RS
24990
24991fi
5213506e
RW
24992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5
24993$as_echo "$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
24994if test x"$gcc_cv_ld_as_needed" = xyes; then
24995
5213506e 24996$as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
765f1bf9
AM
24997
24998fi
765f1bf9 24999
d82bf747
AM
25000case "$target:$tm_file" in
25001 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
5213506e
RW
25002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5
25003$as_echo_n "checking linker support for omitting dot symbols... " >&6; }
25004if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
25005 $as_echo_n "(cached) " >&6
85b776df
AM
25006else
25007 gcc_cv_ld_no_dot_syms=no
25008 if test $in_tree_ld = yes ; then
25009 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
25010 gcc_cv_ld_no_dot_syms=yes
25011 fi
25012 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
25013 cat > conftest1.s <<EOF
25014 .text
25015 bl .foo
25016EOF
25017 cat > conftest2.s <<EOF
25018 .section ".opd","aw"
25019 .align 3
25020 .globl foo
25021 .type foo,@function
25022foo:
25023 .quad .LEfoo,.TOC.@tocbase,0
25024 .text
25025.LEfoo:
25026 blr
25027 .size foo,.-.LEfoo
25028EOF
25029 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
25030 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
25031 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
25032 gcc_cv_ld_no_dot_syms=yes
25033 fi
25034 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
25035 fi
25036
25037fi
5213506e
RW
25038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5
25039$as_echo "$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
25040 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
25041
5213506e 25042$as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h
85b776df 25043
070b27da
AM
25044 fi
25045
25046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5
25047$as_echo_n "checking linker large toc support... " >&6; }
25048if test "${gcc_cv_ld_large_toc+set}" = set; then :
25049 $as_echo_n "(cached) " >&6
25050else
25051 gcc_cv_ld_large_toc=no
25052 if test $in_tree_ld = yes ; then
25053 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
25054 gcc_cv_ld_large_toc=yes
25055 fi
25056 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
25057 cat > conftest.s <<EOF
25058 .section ".tbss","awT",@nobits
25059 .align 3
25060ie0: .space 8
25061 .global _start
25062 .text
25063_start:
25064 addis 9,13,ie0@got@tprel@ha
25065 ld 9,ie0@got@tprel@l(9)
25066EOF
25067 if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \
25068 && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
25069 gcc_cv_ld_large_toc=yes
25070 fi
25071 rm -f conftest conftest.o conftest.s
25072 fi
25073
25074fi
25075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5
25076$as_echo "$gcc_cv_ld_large_toc" >&6; }
25077 if test x"$gcc_cv_ld_large_toc" = xyes; then
25078
25079$as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
25080
85b776df
AM
25081 fi
25082 ;;
25083esac
25084
5213506e
RW
25085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
25086$as_echo_n "checking linker --build-id support... " >&6; }
25087if test "${gcc_cv_ld_buildid+set}" = set; then :
25088 $as_echo_n "(cached) " >&6
cd533689
PP
25089else
25090 gcc_cv_ld_buildid=no
25091 if test $in_tree_ld = yes ; then
25092 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25093 "$gcc_cv_gld_minor_version" -ge 18 -o \
25094 "$gcc_cv_gld_major_version" -gt 2 \
25095 && test $in_tree_ld_is_elf = yes; then
25096 gcc_cv_ld_buildid=yes
25097 fi
25098 elif test x$gcc_cv_ld != x; then
25099 if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then
25100 gcc_cv_ld_buildid=yes
25101 fi
25102 fi
25103fi
5213506e
RW
25104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5
25105$as_echo "$gcc_cv_ld_buildid" >&6; }
cd533689
PP
25106if test x"$gcc_cv_ld_buildid" = xyes; then
25107
5213506e 25108$as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25109
25110fi
25111
5213506e
RW
25112# Check whether --enable-linker-build-id was given.
25113if test "${enable_linker_build_id+set}" = set; then :
25114 enableval=$enable_linker_build_id;
cd533689
PP
25115else
25116 enable_linker_build_id=no
5213506e
RW
25117fi
25118
cd533689
PP
25119
25120if test x"$enable_linker_build_id" = xyes; then
25121 if test x"$gcc_cv_ld_buildid" = xyes; then
25122
5213506e 25123$as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25124
25125 else
5213506e
RW
25126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5
25127$as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;}
cd533689
PP
25128 fi
25129fi
25130
a6198222
RO
25131# In binutils 2.21, GNU ld gained support for new emulations fully
25132# supporting the Solaris 2 ABI. Detect their presence in the linker used.
25133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker *_sol2 emulation support" >&5
25134$as_echo_n "checking linker *_sol2 emulation support... " >&6; }
25135if test "${gcc_cv_ld_sol2_emulation+set}" = set; then :
25136 $as_echo_n "(cached) " >&6
25137else
25138 gcc_cv_ld_sol2_emulation=no
25139 if test $in_tree_ld = yes ; then
25140 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25141 "$gcc_cv_gld_minor_version" -ge 21 -o \
25142 "$gcc_cv_gld_major_version" -gt 2 \
25143 && test $in_tree_ld_is_elf = yes; then
25144 gcc_cv_ld_sol2_emulation=yes
25145 fi
25146 elif test x$gcc_cv_ld != x; then
25147 if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \
25148 grep _sol2 > /dev/null; then
25149 gcc_cv_ld_sol2_emulation=yes
25150 fi
25151 fi
25152fi
25153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sol2_emulation" >&5
25154$as_echo "$gcc_cv_ld_sol2_emulation" >&6; }
25155if test x"$gcc_cv_ld_sol2_emulation" = xyes; then
25156
25157$as_echo "#define HAVE_LD_SOL2_EMULATION 1" >>confdefs.h
25158
25159fi
25160
5213506e
RW
25161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5
25162$as_echo_n "checking linker --sysroot support... " >&6; }
25163if test "${gcc_cv_ld_sysroot+set}" = set; then :
25164 $as_echo_n "(cached) " >&6
380e5ca4
MM
25165else
25166 gcc_cv_ld_sysroot=no
25167 if test $in_tree_ld = yes ; then
25168 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 25169 gcc_cv_ld_sysroot=yes
380e5ca4
MM
25170 fi
25171 elif test x$gcc_cv_ld != x; then
25172 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
25173 gcc_cv_ld_sysroot=yes
25174 fi
25175 fi
25176fi
5213506e
RW
25177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5
25178$as_echo "$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
25179if test x"$gcc_cv_ld_sysroot" = xyes; then
25180
5213506e 25181$as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h
380e5ca4
MM
25182
25183fi
25184
9fb28a67 25185if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
25186 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
25187 && test "$prefix" != "NONE"; then
ba479fd2
NN
25188
25189cat >>confdefs.h <<_ACEOF
793e9558 25190#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 25191_ACEOF
793e9558
PB
25192
25193fi
25194
77008252 25195# Test for stack protector support in target C library.
5213506e
RW
25196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5
25197$as_echo_n "checking __stack_chk_fail in target C library... " >&6; }
25198if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
25199 $as_echo_n "(cached) " >&6
77008252
JJ
25200else
25201 gcc_cv_libc_provides_ssp=no
a6ccdbab 25202 case "$target" in
22f96a0f 25203 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252 25204 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
b0a69d20
MK
25205 if test "x$with_headers" != x; then
25206 glibc_header_dir=$with_headers
25207 elif test "x$with_sysroot" = x; then
77008252 25208 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25209 elif test "x$with_build_sysroot" != "x"; then
25210 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
25211 elif test "x$with_sysroot" = xyes; then
25212 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25213 else
25214 glibc_header_dir="${with_sysroot}/usr/include"
25215 fi
25216 else
25217 glibc_header_dir=/usr/include
25218 fi
25219 # glibc 2.4 and later provides __stack_chk_fail and
25220 # either __stack_chk_guard, or TLS access to stack guard canary.
25221 if test -f $glibc_header_dir/features.h \
25222 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
25223 $glibc_header_dir/features.h > /dev/null; then
25224 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
25225 $glibc_header_dir/features.h > /dev/null; then
25226 gcc_cv_libc_provides_ssp=yes
25227 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
25228 $glibc_header_dir/features.h > /dev/null \
25229 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
25230 $glibc_header_dir/features.h > /dev/null; then
25231 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
25232 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
25233 $glibc_header_dir/features.h > /dev/null && \
25234 test -f $glibc_header_dir/bits/uClibc_config.h && \
25235 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
25236 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
25237 gcc_cv_libc_provides_ssp=yes
77008252 25238 fi
fed6d628 25239 fi
a6ccdbab 25240 ;;
4cc115a2
TS
25241 *-*-gnu*)
25242 # Avoid complicated tests (see
25243 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
25244 # simply assert that glibc does provide this, which is true for all
25245 # realistically usable GNU/Hurd configurations.
25246 gcc_cv_libc_provides_ssp=yes;;
61e1d511 25247 *-*-darwin* | *-*-freebsd*)
5213506e
RW
25248 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
25249if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
a6ccdbab
EC
25250 gcc_cv_libc_provides_ssp=yes
25251else
25252 echo "no __stack_chk_fail on this target"
77008252 25253fi
a6ccdbab
EC
25254
25255 ;;
77008252 25256 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
25257 esac
25258fi
5213506e
RW
25259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5
25260$as_echo "$gcc_cv_libc_provides_ssp" >&6; }
a6ccdbab 25261
77008252
JJ
25262if test x$gcc_cv_libc_provides_ssp = xyes; then
25263
5213506e 25264$as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h
77008252
JJ
25265
25266fi
25267
ed965309
JJ
25268# Check if TFmode long double should be used by default or not.
25269# Some glibc targets used DFmode long double, but with glibc 2.4
25270# and later they can use TFmode.
25271case "$target" in
f7cc5390
JM
25272 powerpc*-*-linux* | \
25273 powerpc*-*-gnu* | \
ed965309
JJ
25274 sparc*-*-linux* | \
25275 s390*-*-linux* | \
25276 alpha*-*-linux*)
25277
5213506e
RW
25278# Check whether --with-long-double-128 was given.
25279if test "${with_long_double_128+set}" = set; then :
25280 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
25281else
25282 gcc_cv_target_ldbl128=no
25283 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
25284 if test "x$with_sysroot" = x; then
25285 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25286 elif test "x$with_build_sysroot" != "x"; then
25287 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
25288 elif test "x$with_sysroot" = xyes; then
25289 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25290 else
25291 glibc_header_dir="${with_sysroot}/usr/include"
25292 fi
25293 else
25294 glibc_header_dir=/usr/include
25295 fi
65280f6c 25296 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
25297 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
25298 && gcc_cv_target_ldbl128=yes
65280f6c 25299
5213506e
RW
25300fi
25301
ed965309
JJ
25302 ;;
25303esac
25304if test x$gcc_cv_target_ldbl128 = xyes; then
25305
5213506e 25306$as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h
ed965309
JJ
25307
25308fi
25309
81bf3d9e 25310# Find out what GC implementation we want, or may, use.
ba479fd2 25311
5213506e
RW
25312# Check whether --with-gc was given.
25313if test "${with_gc+set}" = set; then :
25314 withval=$with_gc; case "$withval" in
08cee789 25315 page)
81bf3d9e 25316 GGC=ggc-$withval
08cee789
DJ
25317 ;;
25318 zone)
25319 GGC=ggc-$withval
25320
5213506e 25321$as_echo "#define GGC_ZONE 1" >>confdefs.h
08cee789 25322
81bf3d9e
RH
25323 ;;
25324 *)
5213506e 25325 as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5
81bf3d9e
RH
25326 ;;
25327esac
25328else
005537df 25329 GGC=ggc-page
5213506e
RW
25330fi
25331
81bf3d9e
RH
25332
25333echo "Using $GGC for garbage collection."
25334
00020c16
ILT
25335# Libraries to use on the host. This will normally be set by the top
25336# level Makefile. Here we simply capture the value for our Makefile.
25337if test -z "${HOST_LIBS+set}"; then
25338 HOST_LIBS=
25339fi
25340
25341
3c809ba4 25342# Use the system's zlib library.
b8dad04b
ZW
25343zlibdir=-L../zlib
25344zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 25345
5213506e
RW
25346# Check whether --with-system-zlib was given.
25347if test "${with_system_zlib+set}" = set; then :
25348 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
25349zlibinc=
25350
5213506e
RW
25351fi
25352
b8ec3cc8 25353
703d89ab 25354
ab22c1fa 25355
1a4b763e 25356
5213506e
RW
25357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
25358$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
25359 # Check whether --enable-maintainer-mode was given.
25360if test "${enable_maintainer_mode+set}" = set; then :
25361 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
25362else
25363 maintainer_mode=no
5213506e 25364fi
a6ccdbab 25365
5213506e
RW
25366
25367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5
25368$as_echo "$maintainer_mode" >&6; }
dc6746e7
PT
25369
25370if test "$maintainer_mode" = "yes"; then
25371 MAINT=''
25372else
25373 MAINT='#'
25374fi
25375
8bb915b6
NN
25376# --------------
25377# Language hooks
25378# --------------
25379
861bb6c1
JL
25380# Make empty files to contain the specs and options for each language.
25381# Then add #include lines to for a compiler that has specs and/or options.
25382
cc11cc9b 25383subdirs=
d7b42618 25384lang_opt_files=
861bb6c1 25385lang_specs_files=
3103b7db 25386lang_tree_files=
861bb6c1
JL
25387# These (without "all_") are set in each config-lang.in.
25388# `language' must be a single word so is spelled singularly.
25389all_languages=
861bb6c1 25390all_compilers=
47ad7893 25391all_outputs='Makefile gccbug'
861bb6c1 25392# List of language makefile fragments.
2ed26f6b 25393all_lang_makefrags=
703d89ab 25394# Additional files for gengtype
ef69da62 25395all_gtfiles="$target_gtfiles"
861bb6c1 25396
cc11cc9b
PB
25397# These are the languages that are set in --enable-languages,
25398# and are available in the GCC tree.
25399all_selected_languages=
25400
861bb6c1
JL
25401# Add the language fragments.
25402# Languages are added via two mechanisms. Some information must be
25403# recorded in makefile variables, these are defined in config-lang.in.
25404# We accumulate them and plug them into the main Makefile.
25405# The other mechanism is a set of hooks for each of the main targets
25406# like `clean', `install', etc.
25407
861bb6c1 25408language_hooks="Make-hooks"
861bb6c1 25409
cc11cc9b 25410for lang in ${srcdir}/*/config-lang.in
861bb6c1 25411do
1546bb64
PB
25412 test "$lang" = "${srcdir}/*/config-lang.in" && continue
25413
cc11cc9b
PB
25414 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
25415 if test "x$lang_alias" = x
25416 then
25417 echo "$lang doesn't set \$language." 1>&2
25418 exit 1
25419 fi
25420 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
25421 subdirs="$subdirs $subdir"
349c3166
OH
25422
25423 # $gcc_subdir is where the gcc integration files are to be found
25424 # for a language, both for internal compiler purposes (compiler
25425 # sources implementing front-end to GCC tree converters), and for
25426 # build infrastructure purposes (Make-lang.in, etc.)
25427 #
25428 # This will be <subdir> (relative to $srcdir) if a line like
25429 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
25430 # is found in <langdir>/config-lang.in, and will remain <langdir>
25431 # otherwise.
25432 #
25433 # Except for the language alias (fetched above), the regular
25434 # "config-lang.in" contents are always retrieved from $gcc_subdir,
25435 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
25436 # only this and the language alias.
25437
25438 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
25439 if [ "$gcc_subdir" = "" ]; then
25440 gcc_subdir="$subdir"
25441 fi
25442
cc11cc9b
PB
25443 case ",$enable_languages," in
25444 *,$lang_alias,*)
25445 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
25446 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
25447 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
25448 fi
25449 ;;
25450 esac
25451
cc11cc9b
PB
25452 language=
25453 boot_language=
25454 compilers=
cc11cc9b
PB
25455 outputs=
25456 gtfiles=
1546bb64 25457 subdir_requires=
349c3166 25458 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
25459 if test "x$language" = x
25460 then
349c3166 25461 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
25462 exit 1
25463 fi
1546bb64
PB
25464
25465 ok=:
25466 case ",$enable_languages," in
25467 *,$lang_alias,*) ;;
25468 *)
25469 for i in $subdir_requires; do
b6348cb3 25470 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
25471 ok=false
25472 break
25473 done
25474 ;;
25475 esac
25476 $ok || continue
25477
349c3166
OH
25478 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
25479 if test -f $srcdir/$gcc_subdir/lang.opt; then
25480 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 25481 fi
349c3166
OH
25482 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
25483 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 25484 fi
cc11cc9b 25485 all_languages="$all_languages $language"
cc11cc9b 25486 all_compilers="$all_compilers $compilers"
cc11cc9b 25487 all_outputs="$all_outputs $outputs"
703d89ab 25488 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
d7f09764
DN
25489 case ",$enable_languages," in
25490 *,lto,*)
25491
25492$as_echo "#define ENABLE_LTO 1" >>confdefs.h
25493
25494 enable_lto=yes
25495
3bec79c5
DK
25496 # LTO needs to speak the platform's object file format, and has a
25497 # number of implementations of the required binary file access APIs.
25498 # ELF is the most common, and default. We only link libelf if ELF
25499 # is indeed the selected format.
25500 LTO_BINARY_READER=${lto_binary_reader}
25501 LTO_USE_LIBELF=-lelf
25502 if test "x$lto_binary_reader" != "xlto-elf" ; then
25503 LTO_USE_LIBELF=
25504 fi
25505
25506
d7f09764
DN
25507 ;;
25508 *) ;;
25509 esac
861bb6c1
JL
25510done
25511
8ac9d31f
TJ
25512# Pick up gtfiles for c
25513gtfiles=
8ac9d31f 25514. ${srcdir}/c-config-lang.in
703d89ab 25515all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 25516
cbc59f01 25517check_languages=
cc11cc9b 25518for language in $all_selected_languages
cbc59f01 25519do
cc11cc9b 25520 check_languages="$check_languages check-$language"
cbc59f01
DD
25521done
25522
62b81e45 25523# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 25524# lang.${target}. Only do so for selected languages.
861bb6c1
JL
25525
25526rm -f Make-hooks
25527touch Make-hooks
bd97af06 25528target_list="all.cross start.encap rest.encap tags \
55bcd32b
AJ
25529 install-common install-man install-info install-pdf install-html dvi \
25530 pdf html uninstall info man srcextra srcman srcinfo \
2a4c0366 25531 mostlyclean clean distclean maintainer-clean install-plugin"
cc11cc9b 25532
861bb6c1
JL
25533for t in $target_list
25534do
25535 x=
cc11cc9b 25536 for lang in $all_selected_languages
861bb6c1 25537 do
cc11cc9b 25538 x="$x $lang.$t"
861bb6c1
JL
25539 done
25540 echo "lang.$t: $x" >> Make-hooks
25541done
25542
8bb915b6
NN
25543# --------
25544# UNSORTED
25545# --------
25546
cc06d68c 25547# Create .gdbinit.
861bb6c1 25548
cc06d68c
GP
25549echo "dir ." > .gdbinit
25550echo "dir ${srcdir}" >> .gdbinit
25551if test x$gdb_needs_out_file_path = xyes
25552then
25553 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
25554fi
25555if test "x$subdirs" != x; then
25556 for s in $subdirs
25557 do
25558 echo "dir ${srcdir}/$s" >> .gdbinit
25559 done
861bb6c1 25560fi
cc06d68c 25561echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 25562
15c723f3 25563gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
25564
25565
2ce3c6c6 25566
2bbea3a6
RH
25567# Find a directory in which to install a shared libgcc.
25568
5213506e
RW
25569# Check whether --enable-version-specific-runtime-libs was given.
25570if test "${enable_version_specific_runtime_libs+set}" = set; then :
25571 enableval=$enable_version_specific_runtime_libs;
25572fi
ba479fd2 25573
2bbea3a6
RH
25574
25575
5213506e
RW
25576# Check whether --with-slibdir was given.
25577if test "${with_slibdir+set}" = set; then :
25578 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
25579else
25580 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 25581 slibdir='$(libsubdir)'
5b15f277 25582elif test "$host" != "$target"; then
2bbea3a6
RH
25583 slibdir='$(build_tooldir)/lib'
25584else
5b15f277 25585 slibdir='$(libdir)'
2bbea3a6 25586fi
5213506e
RW
25587fi
25588
2bbea3a6
RH
25589
25590
703d89ab 25591# Substitute configuration variables
861bb6c1
JL
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
25633
25634
25635
9b16d2c4 25636
e9a25f70 25637
6e26218f 25638
c8724862 25639
11642c3a
ZW
25640
25641
25642
3d9d2476 25643
e2500fed 25644
a0e527e3 25645
aca600aa
AS
25646
25647
25648
9b91e436
KT
25649
25650
c776a6d0 25651
51b9ff45 25652
861bb6c1 25653
6e3f3080
NN
25654# Echo link setup.
25655if test x${build} = x${host} ; then
25656 if test x${host} = x${target} ; then
25657 echo "Links are now set up to build a native compiler for ${target}." 1>&2
25658 else
25659 echo "Links are now set up to build a cross-compiler" 1>&2
25660 echo " from ${host} to ${target}." 1>&2
25661 fi
25662else
25663 if test x${host} = x${target} ; then
25664 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
25665 echo " for ${target}." 1>&2
25666 else
25667 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
25668 echo " from ${host} to ${target}." 1>&2
25669 fi
25670fi
25671
6de9cd9a
DN
25672
25673
25674
f8bf9252
SP
25675
25676
25677
25678
25679
25680if test "x${CLOOGLIBS}" != "x" ; then
25681
5213506e 25682$as_echo "#define HAVE_cloog 1" >>confdefs.h
f8bf9252 25683
f8bf9252
SP
25684fi
25685
d7f09764
DN
25686
25687
25688if test "x${LIBELFLIBS}" != "x" ; then
25689
25690$as_echo "#define HAVE_libelf 1" >>confdefs.h
25691
25692fi
25693
68a607d8 25694# Check for plugin support
5213506e
RW
25695# Check whether --enable-plugin was given.
25696if test "${enable_plugin+set}" = set; then :
25697 enableval=$enable_plugin; enable_plugin=$enableval
68a607d8
DN
25698else
25699 enable_plugin=yes; default_plugin=yes
5213506e
RW
25700fi
25701
68a607d8
DN
25702
25703pluginlibs=
68a607d8 25704
709e26f0
MK
25705case "${host}" in
25706 *-*-darwin*)
25707 if test x$build = x$host; then
25708 export_sym_check="nm${exeext} -g"
515871c7 25709 elif test x$host = x$target; then
9ec69d2e 25710 export_sym_check="$gcc_cv_nm -g"
709e26f0
MK
25711 else
25712 export_sym_check=
25713 fi
25714 ;;
25715 *)
25716 if test x$build = x$host; then
25717 export_sym_check="objdump${exeext} -T"
515871c7 25718 elif test x$host = x$target; then
9ec69d2e 25719 export_sym_check="$gcc_cv_objdump -T"
709e26f0
MK
25720 else
25721 export_sym_check=
25722 fi
25723 ;;
25724esac
25725
25726if test x"$enable_plugin" = x"yes"; then
25727
601fc26e
SE
25728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5
25729$as_echo_n "checking for exported symbols... " >&6; }
709e26f0
MK
25730 if test "x$export_sym_check" != x; then
25731 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
25732 ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
9ec69d2e 25733 if $export_sym_check conftest | grep foobar > /dev/null; then
709e26f0
MK
25734 : # No need to use a flag
25735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25736$as_echo "yes" >&6; }
601fc26e 25737 else
709e26f0
MK
25738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25739$as_echo "yes" >&6; }
25740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
25741$as_echo_n "checking for -rdynamic... " >&6; }
25742 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
25743 if $export_sym_check conftest | grep foobar > /dev/null; then
25744 plugin_rdynamic=yes
25745 pluginlibs="-rdynamic"
25746 else
25747 plugin_rdynamic=no
25748 enable_plugin=no
25749 fi
25750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5
fcf52686 25751$as_echo "$plugin_rdynamic" >&6; }
709e26f0
MK
25752 fi
25753 else
25754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to check" >&5
25755$as_echo "unable to check" >&6; }
68a607d8
DN
25756 fi
25757
25758 # Check -ldl
30ce157e 25759 saved_LIBS="$LIBS"
0c2edd9f
ILT
25760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
25761$as_echo_n "checking for library containing dlopen... " >&6; }
25762if test "${ac_cv_search_dlopen+set}" = set; then :
25763 $as_echo_n "(cached) " >&6
25764else
25765 ac_func_search_save_LIBS=$LIBS
25766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8 25767/* end confdefs.h. */
0c2edd9f
ILT
25768
25769/* Override any GCC internal prototype to avoid an error.
25770 Use char because int might match the return type of a GCC
25771 builtin and then its argument prototype would still apply. */
25772#ifdef __cplusplus
25773extern "C"
25774#endif
25775char dlopen ();
68a607d8
DN
25776int
25777main ()
25778{
0c2edd9f 25779return dlopen ();
68a607d8
DN
25780 ;
25781 return 0;
25782}
25783_ACEOF
0c2edd9f
ILT
25784for ac_lib in '' dl; do
25785 if test -z "$ac_lib"; then
25786 ac_res="none required"
25787 else
25788 ac_res=-l$ac_lib
25789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25790 fi
25791 if ac_fn_c_try_link "$LINENO"; then :
25792 ac_cv_search_dlopen=$ac_res
68a607d8 25793fi
5213506e 25794rm -f core conftest.err conftest.$ac_objext \
0c2edd9f
ILT
25795 conftest$ac_exeext
25796 if test "${ac_cv_search_dlopen+set}" = set; then :
25797 break
25798fi
25799done
25800if test "${ac_cv_search_dlopen+set}" = set; then :
25801
25802else
25803 ac_cv_search_dlopen=no
25804fi
25805rm conftest.$ac_ext
25806LIBS=$ac_func_search_save_LIBS
25807fi
25808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
25809$as_echo "$ac_cv_search_dlopen" >&6; }
25810ac_res=$ac_cv_search_dlopen
25811if test "$ac_res" != no; then :
25812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25813
25814fi
25815
25816 if test x"$ac_cv_search_dlopen" = x"-ldl"; then
68a607d8
DN
25817 pluginlibs="$pluginlibs -ldl"
25818 fi
30ce157e 25819 LIBS="$saved_LIBS"
68a607d8
DN
25820
25821 # Check that we can build shared objects with -fPIC -shared
30ce157e 25822 saved_LDFLAGS="$LDFLAGS"
9ec69d2e
JH
25823 case "${host}" in
25824 *-*-darwin*)
25825 LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
25826 ;;
25827 *)
25828 LDFLAGS="$LDFLAGS -fPIC -shared"
25829 ;;
25830 esac
5213506e
RW
25831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
25832$as_echo_n "checking for -fPIC -shared... " >&6; }
25833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8
DN
25834/* end confdefs.h. */
25835extern int X;
25836int
25837main ()
25838{
25839return X == 0;
25840 ;
25841 return 0;
25842}
25843_ACEOF
5213506e
RW
25844if ac_fn_c_try_link "$LINENO"; then :
25845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25846$as_echo "yes" >&6; }; have_pic_shared=yes
68a607d8 25847else
5213506e
RW
25848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25849$as_echo "no" >&6; }; have_pic_shared=no
68a607d8 25850fi
5213506e
RW
25851rm -f core conftest.err conftest.$ac_objext \
25852 conftest$ac_exeext conftest.$ac_ext
0c2edd9f 25853 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
68a607d8
DN
25854 pluginlibs=
25855 enable_plugin=no
25856 fi
30ce157e 25857 LDFLAGS="$saved_LDFLAGS"
68a607d8
DN
25858
25859 # If plugin support had been requested but not available, fail.
25860 if test x"$enable_plugin" = x"no" ; then
25861 if test x"$default_plugin" != x"yes"; then
5213506e 25862 as_fn_error "
68a607d8 25863Building GCC with plugin support requires a host that supports
5213506e 25864-fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5
68a607d8
DN
25865 fi
25866 fi
68a607d8
DN
25867fi
25868
25869
25870
25871if test x"$enable_plugin" = x"yes"; then
25872
5213506e 25873$as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h
68a607d8
DN
25874
25875fi
25876
6e3f3080
NN
25877# Configure the subdirectories
25878# AC_CONFIG_SUBDIRS($subdirs)
25879
25880# Create the Makefile
25881# and configure language subdirectories
5213506e 25882ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
25883
25884
5213506e 25885ac_config_commands="$ac_config_commands default"
914c5af7 25886
ba479fd2 25887cat >confcache <<\_ACEOF
6e3f3080
NN
25888# This file is a shell script that caches the results of configure
25889# tests run on this system so they can be shared between configure
ba479fd2
NN
25890# scripts and configure runs, see configure's option --config-cache.
25891# It is not useful on other systems. If it contains results you don't
25892# want to keep, you may remove or edit it.
6e3f3080 25893#
ba479fd2
NN
25894# config.status only pays attention to the cache file if you give it
25895# the --recheck option to rerun configure.
6e3f3080 25896#
ba479fd2
NN
25897# `ac_cv_env_foo' variables (set or unset) will be overridden when
25898# loading this file, other *unset* `ac_cv_foo' will be assigned the
25899# following values.
25900
25901_ACEOF
25902
6e3f3080
NN
25903# The following way of writing the cache mishandles newlines in values,
25904# but we know of no workaround that is simple, portable, and efficient.
5213506e 25905# So, we kill variables containing newlines.
6e3f3080
NN
25906# Ultrix sh set writes to stderr and can't be redirected directly,
25907# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
25908(
25909 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25910 eval ac_val=\$$ac_var
25911 case $ac_val in #(
25912 *${as_nl}*)
25913 case $ac_var in #(
25914 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25915$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25916 esac
25917 case $ac_var in #(
25918 _ | IFS | as_nl) ;; #(
25919 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25920 *) { eval $ac_var=; unset $ac_var;} ;;
25921 esac ;;
25922 esac
25923 done
25924
ba479fd2 25925 (set) 2>&1 |
5213506e
RW
25926 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25927 *${as_nl}ac_space=\ *)
25928 # `set' does not quote correctly, so add quotes: double-quote
25929 # substitution turns \\\\ into \\, and sed turns \\ into \.
ba479fd2 25930 sed -n \
86da66b5
HPN
25931 "s/'/'\\\\''/g;
25932 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 25933 ;; #(
ba479fd2
NN
25934 *)
25935 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 25936 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 25937 ;;
5213506e
RW
25938 esac |
25939 sort
25940) |
ba479fd2 25941 sed '
5213506e 25942 /^ac_cv_env_/b end
ba479fd2 25943 t clear
5213506e 25944 :clear
ba479fd2
NN
25945 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25946 t end
5213506e
RW
25947 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25948 :end' >>confcache
25949if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25950 if test -w "$cache_file"; then
25951 test "x$cache_file" != "x/dev/null" &&
25952 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25953$as_echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 25954 cat confcache >$cache_file
6e3f3080 25955 else
5213506e
RW
25956 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25957$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
25958 fi
25959fi
25960rm -f confcache
25961
25962test "x$prefix" = xNONE && prefix=$ac_default_prefix
25963# Let make expand exec_prefix.
25964test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25965
63cf211a 25966DEFS=-DHAVE_CONFIG_H
6e3f3080 25967
ba479fd2
NN
25968ac_libobjs=
25969ac_ltlibobjs=
25970for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25971 # 1. Remove the extension, and $U if already installed.
5213506e
RW
25972 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25973 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25974 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25975 # will be set to the directory where LIBOBJS objects are built.
25976 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25977 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
25978done
25979LIBOBJS=$ac_libobjs
63cf211a 25980
ba479fd2
NN
25981LTLIBOBJS=$ac_ltlibobjs
25982
25983
25984
5213506e 25985
ba479fd2 25986: ${CONFIG_STATUS=./config.status}
5213506e 25987ac_write_fail=0
ba479fd2
NN
25988ac_clean_files_save=$ac_clean_files
25989ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
25990{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25991$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25992as_write_fail=0
25993cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
ba479fd2
NN
25994#! $SHELL
25995# Generated by $as_me.
6e3f3080
NN
25996# Run this file to recreate the current configuration.
25997# Compiler output produced by configure, useful for debugging
ba479fd2 25998# configure, is in config.log if it exists.
6e3f3080 25999
ba479fd2
NN
26000debug=false
26001ac_cs_recheck=false
26002ac_cs_silent=false
ba479fd2 26003
5213506e
RW
26004SHELL=\${CONFIG_SHELL-$SHELL}
26005export SHELL
26006_ASEOF
26007cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26008## -------------------- ##
26009## M4sh Initialization. ##
26010## -------------------- ##
ba479fd2 26011
5213506e
RW
26012# Be more Bourne compatible
26013DUALCASE=1; export DUALCASE # for MKS sh
26014if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
ba479fd2
NN
26015 emulate sh
26016 NULLCMD=:
5213506e 26017 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
ba479fd2
NN
26018 # is contrary to our usage. Disable this feature.
26019 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
26020 setopt NO_GLOB_SUBST
26021else
26022 case `(set -o) 2>/dev/null` in #(
26023 *posix*) :
26024 set -o posix ;; #(
26025 *) :
26026 ;;
26027esac
2f41c1d6 26028fi
ab22c1fa 26029
5213506e
RW
26030
26031as_nl='
26032'
26033export as_nl
26034# Printing a long string crashes Solaris 7 /usr/bin/printf.
26035as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26036as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26037as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26038# Prefer a ksh shell builtin over an external printf program on Solaris,
26039# but without wasting forks for bash or zsh.
26040if test -z "$BASH_VERSION$ZSH_VERSION" \
26041 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26042 as_echo='print -r --'
26043 as_echo_n='print -rn --'
26044elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26045 as_echo='printf %s\n'
26046 as_echo_n='printf %s'
26047else
26048 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26049 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26050 as_echo_n='/usr/ucb/echo -n'
26051 else
26052 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26053 as_echo_n_body='eval
26054 arg=$1;
26055 case $arg in #(
26056 *"$as_nl"*)
26057 expr "X$arg" : "X\\(.*\\)$as_nl";
26058 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26059 esac;
26060 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26061 '
26062 export as_echo_n_body
26063 as_echo_n='sh -c $as_echo_n_body as_echo'
26064 fi
26065 export as_echo_body
26066 as_echo='sh -c $as_echo_body as_echo'
26067fi
26068
26069# The user is always right.
26070if test "${PATH_SEPARATOR+set}" != set; then
26071 PATH_SEPARATOR=:
26072 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26073 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26074 PATH_SEPARATOR=';'
26075 }
1a4b763e
BS
26076fi
26077
ab22c1fa 26078
5213506e
RW
26079# IFS
26080# We need space, tab and new line, in precisely that order. Quoting is
26081# there to prevent editors from complaining about space-tab.
26082# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26083# splitting by setting IFS to empty value.)
26084IFS=" "" $as_nl"
26085
26086# Find who we are. Look in the path if we contain no directory separator.
26087case $0 in #((
26088 *[\\/]* ) as_myself=$0 ;;
26089 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26090for as_dir in $PATH
26091do
26092 IFS=$as_save_IFS
26093 test -z "$as_dir" && as_dir=.
26094 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26095 done
26096IFS=$as_save_IFS
26097
26098 ;;
26099esac
26100# We did not find ourselves, most probably we were run as `sh COMMAND'
26101# in which case we are not to be found in the path.
26102if test "x$as_myself" = x; then
26103 as_myself=$0
26104fi
26105if test ! -f "$as_myself"; then
26106 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26107 exit 1
26108fi
26109
26110# Unset variables that we do not need and which cause bugs (e.g. in
26111# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26112# suppresses any "Segmentation fault" message there. '((' could
26113# trigger a bug in pdksh 5.2.14.
26114for as_var in BASH_ENV ENV MAIL MAILPATH
26115do eval test x\${$as_var+set} = xset \
26116 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26117done
1a4b763e
BS
26118PS1='$ '
26119PS2='> '
26120PS4='+ '
26121
26122# NLS nuisances.
5213506e
RW
26123LC_ALL=C
26124export LC_ALL
26125LANGUAGE=C
26126export LANGUAGE
26127
26128# CDPATH.
26129(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26130
26131
26132# as_fn_error ERROR [LINENO LOG_FD]
26133# ---------------------------------
26134# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26135# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26136# script with status $?, using 1 if that was 0.
26137as_fn_error ()
26138{
26139 as_status=$?; test $as_status -eq 0 && as_status=1
26140 if test "$3"; then
26141 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26142 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
1a4b763e 26143 fi
5213506e
RW
26144 $as_echo "$as_me: error: $1" >&2
26145 as_fn_exit $as_status
26146} # as_fn_error
26147
26148
26149# as_fn_set_status STATUS
26150# -----------------------
26151# Set $? to STATUS, without forking.
26152as_fn_set_status ()
26153{
26154 return $1
26155} # as_fn_set_status
26156
26157# as_fn_exit STATUS
26158# -----------------
26159# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26160as_fn_exit ()
26161{
26162 set +e
26163 as_fn_set_status $1
26164 exit $1
26165} # as_fn_exit
26166
26167# as_fn_unset VAR
26168# ---------------
26169# Portably unset VAR.
26170as_fn_unset ()
26171{
26172 { eval $1=; unset $1;}
26173}
26174as_unset=as_fn_unset
26175# as_fn_append VAR VALUE
26176# ----------------------
26177# Append the text in VALUE to the end of the definition contained in VAR. Take
26178# advantage of any shell optimizations that allow amortized linear growth over
26179# repeated appends, instead of the typical quadratic growth present in naive
26180# implementations.
26181if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26182 eval 'as_fn_append ()
26183 {
26184 eval $1+=\$2
26185 }'
26186else
26187 as_fn_append ()
26188 {
26189 eval $1=\$$1\$2
26190 }
26191fi # as_fn_append
26192
26193# as_fn_arith ARG...
26194# ------------------
26195# Perform arithmetic evaluation on the ARGs, and store the result in the
26196# global $as_val. Take advantage of shells that can avoid forks. The arguments
26197# must be portable across $(()) and expr.
26198if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26199 eval 'as_fn_arith ()
26200 {
26201 as_val=$(( $* ))
26202 }'
26203else
26204 as_fn_arith ()
26205 {
26206 as_val=`expr "$@" || test $? -eq 1`
26207 }
26208fi # as_fn_arith
1a4b763e 26209
5213506e
RW
26210
26211if expr a : '\(a\)' >/dev/null 2>&1 &&
26212 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1a4b763e
BS
26213 as_expr=expr
26214else
26215 as_expr=false
26216fi
26217
5213506e 26218if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1a4b763e
BS
26219 as_basename=basename
26220else
26221 as_basename=false
26222fi
26223
5213506e
RW
26224if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26225 as_dirname=dirname
26226else
26227 as_dirname=false
26228fi
1a4b763e 26229
5213506e 26230as_me=`$as_basename -- "$0" ||
1a4b763e
BS
26231$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26232 X"$0" : 'X\(//\)$' \| \
5213506e
RW
26233 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26234$as_echo X/"$0" |
26235 sed '/^.*\/\([^/][^/]*\)\/*$/{
26236 s//\1/
26237 q
26238 }
26239 /^X\/\(\/\/\)$/{
26240 s//\1/
26241 q
26242 }
26243 /^X\/\(\/\).*/{
26244 s//\1/
26245 q
26246 }
26247 s/.*/./; q'`
b61ff9c8 26248
b61ff9c8
BS
26249# Avoid depending upon Character Ranges.
26250as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26251as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26252as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26253as_cr_digits='0123456789'
26254as_cr_alnum=$as_cr_Letters$as_cr_digits
26255
5213506e
RW
26256ECHO_C= ECHO_N= ECHO_T=
26257case `echo -n x` in #(((((
26258-n*)
26259 case `echo 'xy\c'` in
26260 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26261 xy) ECHO_C='\c';;
26262 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26263 ECHO_T=' ';;
26264 esac;;
26265*)
26266 ECHO_N='-n';;
ba479fd2
NN
26267esac
26268
ba479fd2 26269rm -f conf$$ conf$$.exe conf$$.file
5213506e
RW
26270if test -d conf$$.dir; then
26271 rm -f conf$$.dir/conf$$.file
26272else
26273 rm -f conf$$.dir
26274 mkdir conf$$.dir 2>/dev/null
26275fi
26276if (echo >conf$$.file) 2>/dev/null; then
26277 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 26278 as_ln_s='ln -s'
5213506e
RW
26279 # ... but there are two gotchas:
26280 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26281 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26282 # In both cases, we have to default to `cp -p'.
26283 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26284 as_ln_s='cp -p'
26285 elif ln conf$$.file conf$$ 2>/dev/null; then
26286 as_ln_s=ln
26287 else
26288 as_ln_s='cp -p'
b61ff9c8 26289 fi
ba479fd2
NN
26290else
26291 as_ln_s='cp -p'
26292fi
5213506e
RW
26293rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26294rmdir conf$$.dir 2>/dev/null
26295
26296
26297# as_fn_mkdir_p
26298# -------------
26299# Create "$as_dir" as a directory, including parents if necessary.
26300as_fn_mkdir_p ()
26301{
26302
26303 case $as_dir in #(
26304 -*) as_dir=./$as_dir;;
26305 esac
26306 test -d "$as_dir" || eval $as_mkdir_p || {
26307 as_dirs=
26308 while :; do
26309 case $as_dir in #(
26310 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26311 *) as_qdir=$as_dir;;
26312 esac
26313 as_dirs="'$as_qdir' $as_dirs"
26314 as_dir=`$as_dirname -- "$as_dir" ||
26315$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26316 X"$as_dir" : 'X\(//\)[^/]' \| \
26317 X"$as_dir" : 'X\(//\)$' \| \
26318 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26319$as_echo X"$as_dir" |
26320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26321 s//\1/
26322 q
26323 }
26324 /^X\(\/\/\)[^/].*/{
26325 s//\1/
26326 q
26327 }
26328 /^X\(\/\/\)$/{
26329 s//\1/
26330 q
26331 }
26332 /^X\(\/\).*/{
26333 s//\1/
26334 q
26335 }
26336 s/.*/./; q'`
26337 test -d "$as_dir" && break
26338 done
26339 test -z "$as_dirs" || eval "mkdir $as_dirs"
26340 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
26341
ba479fd2 26342
5213506e 26343} # as_fn_mkdir_p
ba479fd2 26344if mkdir -p . 2>/dev/null; then
5213506e 26345 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 26346else
86da66b5 26347 test -d ./-p && rmdir ./-p
ba479fd2
NN
26348 as_mkdir_p=false
26349fi
26350
5213506e
RW
26351if test -x / >/dev/null 2>&1; then
26352 as_test_x='test -x'
26353else
26354 if ls -dL / >/dev/null 2>&1; then
26355 as_ls_L_option=L
26356 else
26357 as_ls_L_option=
26358 fi
26359 as_test_x='
26360 eval sh -c '\''
26361 if test -d "$1"; then
26362 test -d "$1/.";
26363 else
26364 case $1 in #(
26365 -*)set "./$1";;
26366 esac;
26367 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
26368 ???[sx]*):;;*)false;;esac;fi
26369 '\'' sh
26370 '
26371fi
26372as_executable_p=$as_test_x
ba479fd2
NN
26373
26374# Sed expression to map a string onto a valid CPP name.
86da66b5 26375as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26376
26377# Sed expression to map a string onto a valid variable name.
86da66b5 26378as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26379
26380
ba479fd2 26381exec 6>&1
5213506e
RW
26382## ----------------------------------- ##
26383## Main body of $CONFIG_STATUS script. ##
26384## ----------------------------------- ##
26385_ASEOF
26386test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
ba479fd2 26387
5213506e
RW
26388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26389# Save the log message, to keep $0 and so on meaningful, and to
ba479fd2 26390# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
26391# values after options handling.
26392ac_log="
ba479fd2 26393This file was extended by $as_me, which was
5213506e 26394generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2
NN
26395
26396 CONFIG_FILES = $CONFIG_FILES
26397 CONFIG_HEADERS = $CONFIG_HEADERS
26398 CONFIG_LINKS = $CONFIG_LINKS
26399 CONFIG_COMMANDS = $CONFIG_COMMANDS
26400 $ $0 $@
26401
5213506e
RW
26402on `(hostname || uname -n) 2>/dev/null | sed 1q`
26403"
26404
ba479fd2
NN
26405_ACEOF
26406
5213506e
RW
26407case $ac_config_files in *"
26408"*) set x $ac_config_files; shift; ac_config_files=$*;;
26409esac
2f41c1d6 26410
5213506e
RW
26411case $ac_config_headers in *"
26412"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26413esac
b61ff9c8 26414
b61ff9c8 26415
5213506e
RW
26416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26417# Files that config.status was made for.
26418config_files="$ac_config_files"
26419config_headers="$ac_config_headers"
26420config_commands="$ac_config_commands"
ba479fd2 26421
5213506e 26422_ACEOF
b61ff9c8 26423
5213506e 26424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2 26425ac_cs_usage="\
5213506e
RW
26426\`$as_me' instantiates files and other configuration actions
26427from templates according to the current configuration. Unless the files
26428and actions are specified as TAGs, all are instantiated by default.
ba479fd2 26429
5213506e 26430Usage: $0 [OPTION]... [TAG]...
ba479fd2
NN
26431
26432 -h, --help print this help, then exit
5213506e
RW
26433 -V, --version print version number and configuration settings, then exit
26434 -q, --quiet, --silent
26435 do not print progress messages
ba479fd2
NN
26436 -d, --debug don't remove temporary files
26437 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
26438 --file=FILE[:TEMPLATE]
26439 instantiate the configuration file FILE
26440 --header=FILE[:TEMPLATE]
26441 instantiate the configuration header FILE
ba479fd2
NN
26442
26443Configuration files:
26444$config_files
26445
26446Configuration headers:
26447$config_headers
26448
26449Configuration commands:
26450$config_commands
26451
5213506e 26452Report bugs to the package provider."
b61ff9c8 26453
5213506e
RW
26454_ACEOF
26455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2
NN
26456ac_cs_version="\\
26457config.status
5213506e
RW
26458configured by $0, generated by GNU Autoconf 2.64,
26459 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 26460
5213506e 26461Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
26462This config.status script is free software; the Free Software Foundation
26463gives unlimited permission to copy, distribute and modify it."
5213506e
RW
26464
26465ac_pwd='$ac_pwd'
26466srcdir='$srcdir'
26467AWK='$AWK'
26468test -n "\$AWK" || AWK=awk
ba479fd2
NN
26469_ACEOF
26470
5213506e
RW
26471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26472# The default lists apply if the user does not specify any file.
ba479fd2
NN
26473ac_need_defaults=:
26474while test $# != 0
26475do
26476 case $1 in
26477 --*=*)
5213506e
RW
26478 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26479 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
26480 ac_shift=:
26481 ;;
5213506e 26482 *)
ba479fd2
NN
26483 ac_option=$1
26484 ac_optarg=$2
26485 ac_shift=shift
26486 ;;
ba479fd2
NN
26487 esac
26488
26489 case $ac_option in
26490 # Handling of the options.
ba479fd2
NN
26491 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26492 ac_cs_recheck=: ;;
5213506e
RW
26493 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26494 $as_echo "$ac_cs_version"; exit ;;
26495 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
26496 debug=: ;;
26497 --file | --fil | --fi | --f )
26498 $ac_shift
5213506e
RW
26499 case $ac_optarg in
26500 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26501 esac
26502 as_fn_append CONFIG_FILES " '$ac_optarg'"
ba479fd2
NN
26503 ac_need_defaults=false;;
26504 --header | --heade | --head | --hea )
26505 $ac_shift
5213506e
RW
26506 case $ac_optarg in
26507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26508 esac
26509 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ba479fd2 26510 ac_need_defaults=false;;
5213506e
RW
26511 --he | --h)
26512 # Conflict between --help and --header
26513 as_fn_error "ambiguous option: \`$1'
26514Try \`$0 --help' for more information.";;
26515 --help | --hel | -h )
26516 $as_echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
26517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26518 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26519 ac_cs_silent=: ;;
26520
26521 # This is an error.
5213506e
RW
26522 -*) as_fn_error "unrecognized option: \`$1'
26523Try \`$0 --help' for more information." ;;
ba479fd2 26524
5213506e
RW
26525 *) as_fn_append ac_config_targets " $1"
26526 ac_need_defaults=false ;;
ba479fd2
NN
26527
26528 esac
26529 shift
6e3f3080 26530done
ba479fd2
NN
26531
26532ac_configure_extra_args=
26533
26534if $ac_cs_silent; then
26535 exec 6>/dev/null
26536 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
26537fi
26538
ba479fd2 26539_ACEOF
5213506e 26540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26541if \$ac_cs_recheck; then
5213506e
RW
26542 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26543 shift
26544 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26545 CONFIG_SHELL='$SHELL'
26546 export CONFIG_SHELL
26547 exec "\$@"
ba479fd2 26548fi
861bb6c1 26549
ba479fd2 26550_ACEOF
5213506e
RW
26551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26552exec 5>>config.log
26553{
26554 echo
26555 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26556## Running $as_me. ##
26557_ASBOX
26558 $as_echo "$ac_log"
26559} >&5
ba479fd2 26560
5213506e
RW
26561_ACEOF
26562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26563#
5213506e 26564# INIT-COMMANDS
ba479fd2 26565#
ba479fd2 26566subdirs='$subdirs'
ba479fd2
NN
26567
26568_ACEOF
26569
5213506e 26570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1a4b763e 26571
5213506e 26572# Handling of arguments.
ba479fd2
NN
26573for ac_config_target in $ac_config_targets
26574do
5213506e
RW
26575 case $ac_config_target in
26576 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
26577 "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
26578 "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
26579 "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
26580 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
26581 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26582
26583 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
861bb6c1 26584 esac
ba479fd2
NN
26585done
26586
5213506e 26587
ba479fd2
NN
26588# If the user did not use the arguments to specify the items to instantiate,
26589# then the envvar interface is used. Set only those that are not.
26590# We use the long form for the default assignment because of an extremely
26591# bizarre bug on SunOS 4.1.3.
26592if $ac_need_defaults; then
26593 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26594 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26595 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26596fi
26597
26598# Have a temporary directory for convenience. Make it in the build tree
5213506e 26599# simply because there is no reason against having it here, and in addition,
ba479fd2 26600# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
26601# Hook for its removal unless debugging.
26602# Note that there is a small window in which the directory will not be cleaned:
26603# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
26604$debug ||
26605{
5213506e
RW
26606 tmp=
26607 trap 'exit_status=$?
26608 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26609' 0
26610 trap 'as_fn_exit 1' 1 2 13 15
ba479fd2 26611}
ba479fd2 26612# Create a (secure) tmp directory for tmp files.
6e3f3080 26613
ba479fd2 26614{
5213506e 26615 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
26616 test -n "$tmp" && test -d "$tmp"
26617} ||
26618{
5213506e
RW
26619 tmp=./conf$$-$RANDOM
26620 (umask 077 && mkdir "$tmp")
26621} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
26622
26623# Set up the scripts for CONFIG_FILES section.
26624# No need to generate them if there are no CONFIG_FILES.
26625# This happens for instance with `./config.status config.h'.
26626if test -n "$CONFIG_FILES"; then
26627
26628if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
26629 ac_cs_awk_getline=:
26630 ac_cs_awk_pipe_init=
26631 ac_cs_awk_read_file='
26632 while ((getline aline < (F[key])) > 0)
26633 print(aline)
26634 close(F[key])'
26635 ac_cs_awk_pipe_fini=
26636else
26637 ac_cs_awk_getline=false
26638 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
26639 ac_cs_awk_read_file='
26640 print "|#_!!_#|"
26641 print "cat " F[key] " &&"
26642 '$ac_cs_awk_pipe_init
26643 # The final `:' finishes the AND list.
26644 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
26645fi
26646ac_cr=`echo X | tr X '\015'`
26647# On cygwin, bash can eat \r inside `` if the user requested igncr.
26648# But we know of no other shell where ac_cr would be empty at this
26649# point, so we can use a bashism as a fallback.
26650if test "x$ac_cr" = x; then
26651 eval ac_cr=\$\'\\r\'
26652fi
26653ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26654if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26655 ac_cs_awk_cr='\r'
26656else
26657 ac_cs_awk_cr=$ac_cr
26658fi
26659
26660echo 'BEGIN {' >"$tmp/subs1.awk" &&
26661_ACEOF
26662
26663# Create commands to substitute file output variables.
ba479fd2 26664{
5213506e
RW
26665 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
26666 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
26667 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
26668 echo "_ACAWK" &&
26669 echo "_ACEOF"
26670} >conf$$files.sh &&
26671. ./conf$$files.sh ||
26672 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26673rm -f conf$$files.sh
ba479fd2 26674
5213506e
RW
26675{
26676 echo "cat >conf$$subs.awk <<_ACEOF" &&
26677 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26678 echo "_ACEOF"
26679} >conf$$subs.sh ||
26680 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26681ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
26682ac_delim='%!_!# '
26683for ac_last_try in false false false false false :; do
26684 . ./conf$$subs.sh ||
26685 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26686
26687 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26688 if test $ac_delim_n = $ac_delim_num; then
26689 break
26690 elif $ac_last_try; then
26691 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26692 else
26693 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26694 fi
26695done
26696rm -f conf$$subs.sh
26697
26698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26699cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
26700_ACEOF
26701sed -n '
26702h
26703s/^/S["/; s/!.*/"]=/
26704p
26705g
26706s/^[^!]*!//
26707:repl
26708t repl
26709s/'"$ac_delim"'$//
26710t delim
26711:nl
26712h
26713s/\(.\{148\}\).*/\1/
26714t more1
26715s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26716p
26717n
26718b repl
26719:more1
26720s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26721p
26722g
26723s/.\{148\}//
26724t nl
26725:delim
26726h
26727s/\(.\{148\}\).*/\1/
26728t more2
26729s/["\\]/\\&/g; s/^/"/; s/$/"/
26730p
26731b
26732:more2
26733s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26734p
26735g
26736s/.\{148\}//
26737t delim
26738' <conf$$subs.awk | sed '
26739/^[^""]/{
26740 N
26741 s/\n//
26742}
26743' >>$CONFIG_STATUS || ac_write_fail=1
26744rm -f conf$$subs.awk
26745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26746_ACAWK
26747cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26748 for (key in S) S_is_set[key] = 1
26749 FS = "\a"
26750 \$ac_cs_awk_pipe_init
26751}
26752{
26753 line = $ 0
26754 nfields = split(line, field, "@")
26755 substed = 0
26756 len = length(field[1])
26757 for (i = 2; i < nfields; i++) {
26758 key = field[i]
26759 keylen = length(key)
26760 if (S_is_set[key]) {
26761 value = S[key]
26762 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26763 len += length(value) + length(field[++i])
26764 substed = 1
26765 } else
26766 len += 1 + keylen
26767 }
26768 if (nfields == 3 && !substed) {
26769 key = field[2]
26770 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
26771 \$ac_cs_awk_read_file
26772 next
26773 }
26774 }
26775 print line
26776}
26777\$ac_cs_awk_pipe_fini
26778_ACAWK
26779_ACEOF
26780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26781if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26782 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26783else
26784 cat
26785fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26786 || as_fn_error "could not setup config files machinery" "$LINENO" 5
b61ff9c8
BS
26787_ACEOF
26788
5213506e
RW
26789# VPATH may cause trouble with some makes, so we remove $(srcdir),
26790# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26791# trailing colons and then remove the whole line if VPATH becomes empty
26792# (actually we leave an empty line to preserve line numbers).
26793if test "x$srcdir" = x.; then
26794 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26795s/:*\$(srcdir):*/:/
26796s/:*\${srcdir}:*/:/
26797s/:*@srcdir@:*/:/
26798s/^\([^=]*=[ ]*\):*/\1/
26799s/:*$//
26800s/^[^=]*=[ ]*$//
26801}'
26802fi
ba479fd2 26803
5213506e
RW
26804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26805fi # test -n "$CONFIG_FILES"
b61ff9c8 26806
5213506e
RW
26807# Set up the scripts for CONFIG_HEADERS section.
26808# No need to generate them if there are no CONFIG_HEADERS.
26809# This happens for instance with `./config.status Makefile'.
26810if test -n "$CONFIG_HEADERS"; then
26811cat >"$tmp/defines.awk" <<\_ACAWK ||
26812BEGIN {
b61ff9c8
BS
26813_ACEOF
26814
5213506e
RW
26815# Transform confdefs.h into an awk script `defines.awk', embedded as
26816# here-document in config.status, that substitutes the proper values into
26817# config.h.in to produce config.h.
26818
26819# Create a delimiter string that does not exist in confdefs.h, to ease
26820# handling of long lines.
26821ac_delim='%!_!# '
26822for ac_last_try in false false :; do
26823 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26824 if test -z "$ac_t"; then
26825 break
26826 elif $ac_last_try; then
26827 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26828 else
26829 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1a4b763e 26830 fi
5213506e 26831done
1a4b763e 26832
5213506e
RW
26833# For the awk script, D is an array of macro values keyed by name,
26834# likewise P contains macro parameters if any. Preserve backslash
26835# newline sequences.
26836
26837ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26838sed -n '
26839s/.\{148\}/&'"$ac_delim"'/g
26840t rset
26841:rset
26842s/^[ ]*#[ ]*define[ ][ ]*/ /
26843t def
26844d
26845:def
26846s/\\$//
26847t bsnl
26848s/["\\]/\\&/g
26849s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26850D["\1"]=" \3"/p
26851s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26852d
26853:bsnl
26854s/["\\]/\\&/g
26855s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26856D["\1"]=" \3\\\\\\n"\\/p
26857t cont
26858s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26859t cont
26860d
26861:cont
26862n
26863s/.\{148\}/&'"$ac_delim"'/g
26864t clear
26865:clear
26866s/\\$//
26867t bsnlc
26868s/["\\]/\\&/g; s/^/"/; s/$/"/p
26869d
26870:bsnlc
26871s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26872b cont
26873' <confdefs.h | sed '
26874s/'"$ac_delim"'/"\\\
26875"/g' >>$CONFIG_STATUS || ac_write_fail=1
26876
26877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26878 for (key in D) D_is_set[key] = 1
26879 FS = "\a"
26880}
26881/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26882 line = \$ 0
26883 split(line, arg, " ")
26884 if (arg[1] == "#") {
26885 defundef = arg[2]
26886 mac1 = arg[3]
26887 } else {
26888 defundef = substr(arg[1], 2)
26889 mac1 = arg[2]
26890 }
26891 split(mac1, mac2, "(") #)
26892 macro = mac2[1]
26893 prefix = substr(line, 1, index(line, defundef) - 1)
26894 if (D_is_set[macro]) {
26895 # Preserve the white space surrounding the "#".
26896 print prefix "define", macro P[macro] D[macro]
26897 next
26898 } else {
26899 # Replace #undef with comments. This is necessary, for example,
26900 # in the case of _POSIX_SOURCE, which is predefined and required
26901 # on some systems where configure will not decide to define it.
26902 if (defundef == "undef") {
26903 print "/*", prefix defundef, macro, "*/"
26904 next
26905 }
26906 }
26907}
26908{ print }
26909_ACAWK
1a4b763e 26910_ACEOF
5213506e
RW
26911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26912 as_fn_error "could not setup config headers machinery" "$LINENO" 5
26913fi # test -n "$CONFIG_HEADERS"
26914
26915
26916eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26917shift
26918for ac_tag
26919do
26920 case $ac_tag in
26921 :[FHLC]) ac_mode=$ac_tag; continue;;
26922 esac
26923 case $ac_mode$ac_tag in
26924 :[FHL]*:*);;
26925 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26926 :[FH]-) ac_tag=-:-;;
26927 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26928 esac
26929 ac_save_IFS=$IFS
26930 IFS=:
26931 set x $ac_tag
26932 IFS=$ac_save_IFS
26933 shift
26934 ac_file=$1
26935 shift
26936
26937 case $ac_mode in
26938 :L) ac_source=$1;;
26939 :[FH])
26940 ac_file_inputs=
26941 for ac_f
26942 do
26943 case $ac_f in
26944 -) ac_f="$tmp/stdin";;
26945 *) # Look for the file first in the build tree, then in the source tree
26946 # (if the path is not absolute). The absolute path cannot be DOS-style,
26947 # because $ac_f cannot contain `:'.
26948 test -f "$ac_f" ||
26949 case $ac_f in
26950 [\\/$]*) false;;
26951 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26952 esac ||
26953 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26954 esac
26955 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26956 as_fn_append ac_file_inputs " '$ac_f'"
26957 done
26958
26959 # Let's still pretend it is `configure' which instantiates (i.e., don't
26960 # use $as_me), people would be surprised to read:
26961 # /* config.h. Generated by config.status. */
26962 configure_input='Generated from '`
26963 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26964 `' by configure.'
26965 if test x"$ac_file" != x-; then
26966 configure_input="$ac_file. $configure_input"
26967 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26968$as_echo "$as_me: creating $ac_file" >&6;}
26969 fi
26970 # Neutralize special characters interpreted by sed in replacement strings.
26971 case $configure_input in #(
26972 *\&* | *\|* | *\\* )
26973 ac_sed_conf_input=`$as_echo "$configure_input" |
26974 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26975 *) ac_sed_conf_input=$configure_input;;
26976 esac
26977
26978 case $ac_tag in
26979 *:-:* | *:-) cat >"$tmp/stdin" \
26980 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26981 esac
26982 ;;
703d89ab
ZW
26983 esac
26984
5213506e 26985 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 26986$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
26987 X"$ac_file" : 'X\(//\)[^/]' \| \
26988 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
26989 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26990$as_echo X"$ac_file" |
26991 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26992 s//\1/
26993 q
26994 }
26995 /^X\(\/\/\)[^/].*/{
26996 s//\1/
26997 q
26998 }
26999 /^X\(\/\/\)$/{
27000 s//\1/
27001 q
27002 }
27003 /^X\(\/\).*/{
27004 s//\1/
27005 q
27006 }
27007 s/.*/./; q'`
27008 as_dir="$ac_dir"; as_fn_mkdir_p
ba479fd2
NN
27009 ac_builddir=.
27010
5213506e
RW
27011case "$ac_dir" in
27012.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27013*)
27014 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27015 # A ".." for each directory in $ac_dir_suffix.
27016 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27017 case $ac_top_builddir_sub in
27018 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27019 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27020 esac ;;
27021esac
27022ac_abs_top_builddir=$ac_pwd
27023ac_abs_builddir=$ac_pwd$ac_dir_suffix
27024# for backward compatibility:
27025ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
27026
27027case $srcdir in
5213506e 27028 .) # We are building in place.
ba479fd2 27029 ac_srcdir=.
5213506e
RW
27030 ac_top_srcdir=$ac_top_builddir_sub
27031 ac_abs_top_srcdir=$ac_pwd ;;
27032 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 27033 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
27034 ac_top_srcdir=$srcdir
27035 ac_abs_top_srcdir=$srcdir ;;
27036 *) # Relative name.
27037 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27038 ac_top_srcdir=$ac_top_build_prefix$srcdir
27039 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 27040esac
5213506e 27041ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2 27042
703d89ab 27043
5213506e
RW
27044 case $ac_mode in
27045 :F)
27046 #
27047 # CONFIG_FILE
27048 #
ab22c1fa 27049
5213506e 27050_ACEOF
1a4b763e 27051
5213506e
RW
27052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27053# If the template does not know about datarootdir, expand it.
27054# FIXME: This hack should be removed a few years after 2.60.
27055ac_datarootdir_hack=; ac_datarootdir_seen=
27056ac_sed_dataroot='
27057/datarootdir/ {
27058 p
27059 q
27060}
27061/@datadir@/p
27062/@docdir@/p
27063/@infodir@/p
27064/@localedir@/p
27065/@mandir@/p'
27066case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27067*datarootdir*) ac_datarootdir_seen=yes;;
27068*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27070$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27071_ACEOF
27072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27073 ac_datarootdir_hack='
27074 s&@datadir@&$datadir&g
27075 s&@docdir@&$docdir&g
27076 s&@infodir@&$infodir&g
27077 s&@localedir@&$localedir&g
27078 s&@mandir@&$mandir&g
27079 s&\\\${datarootdir}&$datarootdir&g' ;;
27080esac
a6ccdbab 27081_ACEOF
5213506e
RW
27082
27083# Neutralize VPATH when `$srcdir' = `.'.
27084# Shell code in configure.ac might set extrasub.
27085# FIXME: do we really want to maintain this feature?
27086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27087ac_sed_extra="$ac_vpsub
ba479fd2
NN
27088$extrasub
27089_ACEOF
5213506e 27090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2
NN
27091:t
27092/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
27093s|@configure_input@|$ac_sed_conf_input|;t t
27094s&@top_builddir@&$ac_top_builddir_sub&;t t
27095s&@top_build_prefix@&$ac_top_build_prefix&;t t
27096s&@srcdir@&$ac_srcdir&;t t
27097s&@abs_srcdir@&$ac_abs_srcdir&;t t
27098s&@top_srcdir@&$ac_top_srcdir&;t t
27099s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27100s&@builddir@&$ac_builddir&;t t
27101s&@abs_builddir@&$ac_abs_builddir&;t t
27102s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27103$ac_datarootdir_hack
27104"
27105eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
27106if $ac_cs_awk_getline; then
27107 $AWK -f "$tmp/subs.awk"
27108else
27109 $AWK -f "$tmp/subs.awk" | $SHELL
27110fi >$tmp/out \
27111 || as_fn_error "could not create $ac_file" "$LINENO" 5
27112
27113test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27114 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27115 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27117which seems to be undefined. Please make sure it is defined." >&5
27118$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27119which seems to be undefined. Please make sure it is defined." >&2;}
27120
27121 rm -f "$tmp/stdin"
b61ff9c8 27122 case $ac_file in
5213506e
RW
27123 -) cat "$tmp/out" && rm -f "$tmp/out";;
27124 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27125 esac \
27126 || as_fn_error "could not create $ac_file" "$LINENO" 5
27127 ;;
27128 :H)
27129 #
27130 # CONFIG_HEADER
27131 #
ba479fd2 27132 if test x"$ac_file" != x-; then
5213506e
RW
27133 {
27134 $as_echo "/* $configure_input */" \
27135 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27136 } >"$tmp/config.h" \
27137 || as_fn_error "could not create $ac_file" "$LINENO" 5
27138 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27139 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27140$as_echo "$as_me: $ac_file is unchanged" >&6;}
ba479fd2 27141 else
5213506e
RW
27142 rm -f "$ac_file"
27143 mv "$tmp/config.h" "$ac_file" \
27144 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba479fd2
NN
27145 fi
27146 else
5213506e
RW
27147 $as_echo "/* $configure_input */" \
27148 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27149 || as_fn_error "could not create -" "$LINENO" 5
ba479fd2 27150 fi
5213506e 27151 ;;
b61ff9c8 27152
5213506e
RW
27153 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27154$as_echo "$as_me: executing $ac_file commands" >&6;}
27155 ;;
27156 esac
b61ff9c8
BS
27157
27158
5213506e
RW
27159 case $ac_file$ac_mode in
27160 "as":F) chmod +x as ;;
27161 "collect-ld":F) chmod +x collect-ld ;;
27162 "nm":F) chmod +x nm ;;
27163 "default":C)
f1faaabd
NN
27164case ${CONFIG_HEADERS} in
27165 *auto-host.h:config.in*)
27166 echo > cstamp-h ;;
861bb6c1 27167esac
2ed26f6b 27168# Make sure all the subdirs exist.
39dabefd 27169for d in $subdirs doc build c-family
2ed26f6b 27170do
2ed26f6b 27171 test -d $d || mkdir $d
2ed26f6b 27172done
ba479fd2 27173 ;;
5213506e 27174
ba479fd2 27175 esac
5213506e 27176done # for ac_tag
cafe096b 27177
ba479fd2 27178
5213506e 27179as_fn_exit 0
ba479fd2 27180_ACEOF
ba479fd2
NN
27181ac_clean_files=$ac_clean_files_save
27182
5213506e
RW
27183test $ac_write_fail = 0 ||
27184 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
27185
ba479fd2
NN
27186
27187# configure is writing to config.log, and then calls config.status.
27188# config.status does its own redirection, appending to config.log.
27189# Unfortunately, on DOS this fails, as config.log is still kept open
27190# by configure, so config.status won't be able to write to it; its
27191# output is simply discarded. So we exec the FD to /dev/null,
27192# effectively closing config.log, so it can be properly (re)opened and
27193# appended to by config.status. When coming back to configure, we
27194# need to make the FD available again.
27195if test "$no_create" != yes; then
27196 ac_cs_success=:
27197 ac_config_status_args=
27198 test "$silent" = yes &&
27199 ac_config_status_args="$ac_config_status_args --quiet"
27200 exec 5>/dev/null
27201 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27202 exec 5>>config.log
27203 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27204 # would make configure fail if this is the last instruction.
5213506e
RW
27205 $ac_cs_success || as_fn_exit $?
27206fi
27207if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27209$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
ba479fd2 27210fi
861bb6c1 27211