]> git.ipfire.org Git - thirdparty/gcc.git/blame - configure
ipa/105676 - pure attribute suggestion for const function
[thirdparty/gcc.git] / configure
CommitLineData
671aa708 1#! /bin/sh
671aa708 2# Guess values for system-dependent variables and create Makefiles.
22e05272
JM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
5213506e 7#
671aa708
NN
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## -------------------- ##
1c710c3c 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 :
1c710c3c
DJ
18 emulate sh
19 NULLCMD=:
5213506e 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
1c710c3c
DJ
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
1c710c3c 31fi
1c710c3c 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 }
1c710c3c
DJ
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.
22e05272 90as_myself=
5213506e
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
1c710c3c
DJ
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
5213506e
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
22e05272
JM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
5213506e
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
22e05272
JM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
5213506e
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
87264276
PB
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
5213506e
RW
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
1c710c3c 211do
5213506e
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
22e05272
JM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
5213506e
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
1c710c3c 266 else
5213506e
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
1c710c3c 271 fi
5213506e
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
1c710c3c 301
5213506e
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
22e05272 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
5213506e
RW
356
357
358} # as_fn_mkdir_p
22e05272
JM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
5213506e
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
22e05272
JM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
5213506e
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22e05272 407# script with STATUS, using 1 if that was 0.
5213506e
RW
408as_fn_error ()
409{
22e05272
JM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
5213506e 414 fi
22e05272 415 $as_echo "$as_me: error: $2" >&2
5213506e
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1c710c3c
DJ
421 as_expr=expr
422else
423 as_expr=false
424fi
425
5213506e 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1c710c3c
DJ
427 as_basename=basename
428else
429 as_basename=false
430fi
431
5213506e
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
1c710c3c 437
5213506e 438as_me=`$as_basename -- "$0" ||
1c710c3c
DJ
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
5213506e
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
1c710c3c 456
2aeb72e9
DD
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
11a67599 463
1c710c3c 464
5213506e
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
1c710c3c 474 sed '
5213506e
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
1c710c3c 479 N
5213506e
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
1c710c3c 482 t loop
5213506e 483 s/-\n.*//
1c710c3c 484 ' >$as_me.lineno &&
5213506e
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
1c710c3c 487
22e05272
JM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
1c710c3c
DJ
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
5213506e
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
1c710c3c
DJ
496 # Exit status is that of the last command.
497 exit
498}
499
5213506e
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
1c710c3c
DJ
511esac
512
5213506e
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
1c710c3c 516else
5213506e
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
1c710c3c 519fi
5213506e
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
2aeb72e9 522 as_ln_s='ln -s'
5213506e
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22e05272 526 # In both cases, we have to default to `cp -pR'.
5213506e 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22e05272 528 as_ln_s='cp -pR'
5213506e
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
22e05272 532 as_ln_s='cp -pR'
2aeb72e9 533 fi
1c710c3c 534else
22e05272 535 as_ln_s='cp -pR'
1c710c3c 536fi
5213506e
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
1c710c3c
DJ
539
540if mkdir -p . 2>/dev/null; then
5213506e 541 as_mkdir_p='mkdir -p "$as_dir"'
1c710c3c
DJ
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
22e05272
JM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
0b0dc272 549
1c710c3c
DJ
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
22e05272
JM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
1c710c3c
DJ
559
560# Name of the host.
22e05272 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
1c710c3c
DJ
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
1c710c3c
DJ
565#
566# Initializations.
567#
671aa708 568ac_default_prefix=/usr/local
5213506e 569ac_clean_files=
1c710c3c 570ac_config_libobj_dir=.
5213506e 571LIBOBJS=
1c710c3c
DJ
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
2aeb72e9 576
1c710c3c
DJ
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
5213506e 583PACKAGE_URL=
1c710c3c
DJ
584
585ac_unique_file="move-if-change"
5213506e
RW
586enable_option_checking=no
587ac_subst_vars='LTLIBOBJS
588LIBOBJS
589compare_exclusions
590stage2_werror_flag
591stage1_checking
592stage1_cflags
593MAINT
594MAINTAINER_MODE_FALSE
595MAINTAINER_MODE_TRUE
596COMPILER_NM_FOR_TARGET
597COMPILER_LD_FOR_TARGET
598COMPILER_AS_FOR_TARGET
599FLAGS_FOR_TARGET
600RAW_CXX_FOR_TARGET
601WINDMC_FOR_TARGET
602WINDRES_FOR_TARGET
603STRIP_FOR_TARGET
e7a82751 604READELF_FOR_TARGET
5213506e 605RANLIB_FOR_TARGET
e4a9a572 606OTOOL_FOR_TARGET
5213506e 607OBJDUMP_FOR_TARGET
9bccfdf5 608OBJCOPY_FOR_TARGET
5213506e
RW
609NM_FOR_TARGET
610LIPO_FOR_TARGET
611LD_FOR_TARGET
3b5e8ee4 612DSYMUTIL_FOR_TARGET
5213506e
RW
613DLLTOOL_FOR_TARGET
614AS_FOR_TARGET
615AR_FOR_TARGET
b4c522fa 616GDC_FOR_TARGET
632e2a07 617GOC_FOR_TARGET
5213506e 618GFORTRAN_FOR_TARGET
5213506e
RW
619GCC_FOR_TARGET
620CXX_FOR_TARGET
621CC_FOR_TARGET
5fee5ec3 622GDCFLAGS
e7a82751 623READELF
e4a9a572 624OTOOL
5213506e
RW
625OBJDUMP
626OBJCOPY
627WINDMC
628WINDRES
629STRIP
630RANLIB
631NM
632LIPO
633LD
3b5e8ee4 634DSYMUTIL
5213506e
RW
635DLLTOOL
636AS
637AR
638RUNTEST
639EXPECT
640MAKEINFO
641FLEX
642LEX
643M4
644BISON
645YACC
5213506e
RW
646WINDRES_FOR_BUILD
647WINDMC_FOR_BUILD
648RANLIB_FOR_BUILD
649NM_FOR_BUILD
650LD_FOR_BUILD
651LDFLAGS_FOR_BUILD
b4c522fa 652GDC_FOR_BUILD
632e2a07 653GOC_FOR_BUILD
5213506e 654GFORTRAN_FOR_BUILD
3b5e8ee4 655DSYMUTIL_FOR_BUILD
5213506e
RW
656DLLTOOL_FOR_BUILD
657CXX_FOR_BUILD
658CXXFLAGS_FOR_BUILD
84401ce5
RP
659CPPFLAGS_FOR_BUILD
660CPP_FOR_BUILD
5213506e
RW
661CFLAGS_FOR_BUILD
662CC_FOR_BUILD
663AS_FOR_BUILD
664AR_FOR_BUILD
aae29963 665target_configdirs
5213506e 666configdirs
5213506e 667build_configdirs
5213506e
RW
668INSTALL_GDB_TK
669GDB_TK
670CONFIGURE_GDB_TK
671build_tooldir
672tooldir
673GCC_SHLIB_SUBDIR
674RPATH_ENVVAR
ffedf511
RW
675target_configargs
676host_configargs
677build_configargs
e12c4094 678BUILD_CONFIG
6f57bdf6 679LDFLAGS_FOR_TARGET
5213506e
RW
680CXXFLAGS_FOR_TARGET
681CFLAGS_FOR_TARGET
682DEBUG_PREFIX_CFLAGS_FOR_TARGET
683SYSROOT_CFLAGS_FOR_TARGET
3c36aa6b 684get_gcc_base_ver
1c01ebf6 685extra_host_zlib_configure_flags
d7f09764 686extra_host_libiberty_configure_flags
fca38047 687stage1_languages
cdfee50a 688host_shared
45b3824d
TS
689extra_linker_plugin_flags
690extra_linker_plugin_configure_flags
33ad93b9 691islinc
eae1a5d4 692isllibs
5213506e 693poststage1_ldflags
ed2eaa9f 694poststage1_libs
5213506e 695stage1_ldflags
0b21f5d3 696stage1_libs
0ff2d841 697extra_isl_gmp_configure_flags
5213506e
RW
698extra_mpc_mpfr_configure_flags
699extra_mpc_gmp_configure_flags
700extra_mpfr_configure_flags
701gmpinc
702gmplibs
4a5e71f2
L
703PGO_BUILD_LTO_CFLAGS
704PGO_BUILD_USE_CFLAGS
705PGO_BUILD_GEN_CFLAGS
7ffcf5d6 706HAVE_CXX11_FOR_BUILD
ffac9597 707HAVE_CXX11
5213506e 708do_compare
5fee5ec3 709GDC
5213506e
RW
710GNATMAKE
711GNATBIND
712ac_ct_CXX
713CXXFLAGS
714CXX
715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722target_subdir
723host_subdir
724build_subdir
725build_libsubdir
87264276
PB
726AWK
727SED
5213506e
RW
728LN_S
729LN
730INSTALL_DATA
731INSTALL_SCRIPT
732INSTALL_PROGRAM
733target_os
734target_vendor
735target_cpu
736target
737host_os
738host_vendor
739host_cpu
740host
741target_noncanonical
742host_noncanonical
743build_noncanonical
744build_os
745build_vendor
746build_cpu
747build
748TOPLEVEL_CONFIGURE_ARGUMENTS
749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
787ac_subst_files='serialization_dependencies
788host_makefile_frag
789target_makefile_frag
790alphaieee_frag
791ospace_frag'
792ac_user_opts='
793enable_option_checking
794with_build_libsubdir
a05c2c75 795with_system_zlib
85c64bbe
BS
796enable_as_accelerator_for
797enable_offload_targets
fe5bfa67 798enable_offload_defaulted
5213506e 799enable_gold
21539e2e 800enable_ld
78edb32f 801enable_compressed_debug_sections
87e6d9dc
TB
802enable_libquadmath
803enable_libquadmath_support
5213506e
RW
804enable_libada
805enable_libssp
1873ec0c 806enable_libstdcxx
ff3ac0f4 807enable_bootstrap
4a5e71f2 808enable_pgo_build
5213506e
RW
809with_mpc
810with_mpc_include
811with_mpc_lib
5213506e
RW
812with_mpfr
813with_mpfr_include
814with_mpfr_lib
5213506e
RW
815with_gmp
816with_gmp_include
817with_gmp_lib
5213506e 818with_stage1_libs
aac9103b 819with_static_standard_libraries
0b21f5d3 820with_stage1_ldflags
5213506e 821with_boot_libs
ed2eaa9f 822with_boot_ldflags
33ad93b9
RG
823with_isl
824with_isl_include
825with_isl_lib
826enable_isl_version_check
d7f09764 827enable_lto
45b3824d
TS
828enable_linker_plugin_configure_flags
829enable_linker_plugin_flags
cdfee50a 830enable_host_shared
5213506e 831enable_stage1_languages
43c40f3e 832enable_objc_gc
114bf3f1
MK
833with_target_bdw_gc
834with_target_bdw_gc_include
835with_target_bdw_gc_lib
3c36aa6b 836with_gcc_major_version_only
5213506e
RW
837with_build_sysroot
838with_debug_prefix_map
5646b7b9 839with_build_config
beeda1d9 840enable_vtable_verify
5213506e
RW
841enable_serial_configure
842with_build_time_tools
843enable_maintainer_mode
844enable_stage1_checking
845enable_werror
5213506e
RW
846'
847 ac_precious_vars='build_alias
848host_alias
849target_alias
850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
855CXX
856CXXFLAGS
857CCC
ffedf511
RW
858build_configargs
859host_configargs
860target_configargs
5213506e
RW
861AR
862AS
863DLLTOOL
3b5e8ee4 864DSYMUTIL
5213506e
RW
865LD
866LIPO
867NM
868RANLIB
869STRIP
870WINDRES
871WINDMC
872OBJCOPY
873OBJDUMP
e4a9a572 874OTOOL
e7a82751 875READELF
5213506e
RW
876CC_FOR_TARGET
877CXX_FOR_TARGET
878GCC_FOR_TARGET
5213506e 879GFORTRAN_FOR_TARGET
632e2a07 880GOC_FOR_TARGET
b4c522fa 881GDC_FOR_TARGET
5213506e
RW
882AR_FOR_TARGET
883AS_FOR_TARGET
884DLLTOOL_FOR_TARGET
3b5e8ee4 885DSYMUTIL_FOR_TARGET
5213506e
RW
886LD_FOR_TARGET
887LIPO_FOR_TARGET
888NM_FOR_TARGET
9bccfdf5 889OBJCOPY_FOR_TARGET
5213506e 890OBJDUMP_FOR_TARGET
e4a9a572 891OTOOL_FOR_TARGET
5213506e 892RANLIB_FOR_TARGET
e7a82751 893READELF_FOR_TARGET
5213506e
RW
894STRIP_FOR_TARGET
895WINDRES_FOR_TARGET
896WINDMC_FOR_TARGET'
897
671aa708
NN
898
899# Initialize some variables set by options.
1c710c3c
DJ
900ac_init_help=
901ac_init_version=false
5213506e
RW
902ac_unrecognized_opts=
903ac_unrecognized_sep=
671aa708
NN
904# The variables have the same names as the options, with
905# dashes changed to underlines.
1c710c3c 906cache_file=/dev/null
671aa708 907exec_prefix=NONE
671aa708 908no_create=
671aa708
NN
909no_recursion=
910prefix=NONE
911program_prefix=NONE
912program_suffix=NONE
913program_transform_name=s,x,x,
914silent=
915site=
916srcdir=
671aa708
NN
917verbose=
918x_includes=NONE
919x_libraries=NONE
1c710c3c
DJ
920
921# Installation directory options.
922# These are left unexpanded so users can "make install exec_prefix=/foo"
923# and all the variables that are supposed to be based on exec_prefix
924# by default will actually change.
925# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 926# (The list follows the same order as the GNU Coding Standards.)
671aa708
NN
927bindir='${exec_prefix}/bin'
928sbindir='${exec_prefix}/sbin'
929libexecdir='${exec_prefix}/libexec'
5213506e
RW
930datarootdir='${prefix}/share'
931datadir='${datarootdir}'
671aa708
NN
932sysconfdir='${prefix}/etc'
933sharedstatedir='${prefix}/com'
934localstatedir='${prefix}/var'
671aa708
NN
935includedir='${prefix}/include'
936oldincludedir='/usr/include'
5213506e
RW
937docdir='${datarootdir}/doc/${PACKAGE}'
938infodir='${datarootdir}/info'
939htmldir='${docdir}'
940dvidir='${docdir}'
941pdfdir='${docdir}'
942psdir='${docdir}'
943libdir='${exec_prefix}/lib'
944localedir='${datarootdir}/locale'
945mandir='${datarootdir}/man'
79c06341 946
671aa708 947ac_prev=
5213506e 948ac_dashdash=
671aa708
NN
949for ac_option
950do
671aa708
NN
951 # If the previous option needs an argument, assign it.
952 if test -n "$ac_prev"; then
5213506e 953 eval $ac_prev=\$ac_option
671aa708
NN
954 ac_prev=
955 continue
956 fi
79c06341 957
5213506e 958 case $ac_option in
22e05272
JM
959 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
960 *=) ac_optarg= ;;
961 *) ac_optarg=yes ;;
5213506e 962 esac
671aa708
NN
963
964 # Accept the important Cygnus configure options, so we can diagnose typos.
965
5213506e
RW
966 case $ac_dashdash$ac_option in
967 --)
968 ac_dashdash=yes ;;
671aa708
NN
969
970 -bindir | --bindir | --bindi | --bind | --bin | --bi)
971 ac_prev=bindir ;;
972 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1c710c3c 973 bindir=$ac_optarg ;;
671aa708
NN
974
975 -build | --build | --buil | --bui | --bu)
1c710c3c 976 ac_prev=build_alias ;;
671aa708 977 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1c710c3c 978 build_alias=$ac_optarg ;;
671aa708
NN
979
980 -cache-file | --cache-file | --cache-fil | --cache-fi \
981 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
982 ac_prev=cache_file ;;
983 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
984 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1c710c3c
DJ
985 cache_file=$ac_optarg ;;
986
987 --config-cache | -C)
988 cache_file=config.cache ;;
671aa708 989
5213506e 990 -datadir | --datadir | --datadi | --datad)
671aa708 991 ac_prev=datadir ;;
5213506e 992 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1c710c3c 993 datadir=$ac_optarg ;;
671aa708 994
5213506e
RW
995 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
996 | --dataroo | --dataro | --datar)
997 ac_prev=datarootdir ;;
998 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
999 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1000 datarootdir=$ac_optarg ;;
1001
671aa708 1002 -disable-* | --disable-*)
5213506e 1003 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
671aa708 1004 # Reject names that are not valid shell variable names.
5213506e 1005 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
22e05272 1006 as_fn_error $? "invalid feature name: $ac_useropt"
5213506e
RW
1007 ac_useropt_orig=$ac_useropt
1008 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009 case $ac_user_opts in
1010 *"
1011"enable_$ac_useropt"
1012"*) ;;
1013 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1014 ac_unrecognized_sep=', ';;
1015 esac
1016 eval enable_$ac_useropt=no ;;
1017
1018 -docdir | --docdir | --docdi | --doc | --do)
1019 ac_prev=docdir ;;
1020 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1021 docdir=$ac_optarg ;;
1022
1023 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1024 ac_prev=dvidir ;;
1025 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1026 dvidir=$ac_optarg ;;
671aa708
NN
1027
1028 -enable-* | --enable-*)
5213506e 1029 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
671aa708 1030 # Reject names that are not valid shell variable names.
5213506e 1031 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
22e05272 1032 as_fn_error $? "invalid feature name: $ac_useropt"
5213506e
RW
1033 ac_useropt_orig=$ac_useropt
1034 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035 case $ac_user_opts in
1036 *"
1037"enable_$ac_useropt"
1038"*) ;;
1039 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1040 ac_unrecognized_sep=', ';;
2aeb72e9 1041 esac
5213506e 1042 eval enable_$ac_useropt=\$ac_optarg ;;
671aa708
NN
1043
1044 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1045 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1046 | --exec | --exe | --ex)
1047 ac_prev=exec_prefix ;;
1048 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1049 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1050 | --exec=* | --exe=* | --ex=*)
1c710c3c 1051 exec_prefix=$ac_optarg ;;
671aa708
NN
1052
1053 -gas | --gas | --ga | --g)
1054 # Obsolete; use --with-gas.
1055 with_gas=yes ;;
1056
1c710c3c
DJ
1057 -help | --help | --hel | --he | -h)
1058 ac_init_help=long ;;
1059 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1060 ac_init_help=recursive ;;
1061 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1062 ac_init_help=short ;;
671aa708
NN
1063
1064 -host | --host | --hos | --ho)
1c710c3c 1065 ac_prev=host_alias ;;
671aa708 1066 -host=* | --host=* | --hos=* | --ho=*)
1c710c3c 1067 host_alias=$ac_optarg ;;
671aa708 1068
5213506e
RW
1069 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1070 ac_prev=htmldir ;;
1071 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1072 | --ht=*)
1073 htmldir=$ac_optarg ;;
1074
671aa708
NN
1075 -includedir | --includedir | --includedi | --included | --include \
1076 | --includ | --inclu | --incl | --inc)
1077 ac_prev=includedir ;;
1078 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1079 | --includ=* | --inclu=* | --incl=* | --inc=*)
1c710c3c 1080 includedir=$ac_optarg ;;
671aa708
NN
1081
1082 -infodir | --infodir | --infodi | --infod | --info | --inf)
1083 ac_prev=infodir ;;
1084 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1c710c3c 1085 infodir=$ac_optarg ;;
671aa708
NN
1086
1087 -libdir | --libdir | --libdi | --libd)
1088 ac_prev=libdir ;;
1089 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1c710c3c 1090 libdir=$ac_optarg ;;
671aa708
NN
1091
1092 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1093 | --libexe | --libex | --libe)
1094 ac_prev=libexecdir ;;
1095 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1096 | --libexe=* | --libex=* | --libe=*)
1c710c3c 1097 libexecdir=$ac_optarg ;;
671aa708 1098
5213506e
RW
1099 -localedir | --localedir | --localedi | --localed | --locale)
1100 ac_prev=localedir ;;
1101 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1102 localedir=$ac_optarg ;;
1103
671aa708 1104 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 1105 | --localstate | --localstat | --localsta | --localst | --locals)
671aa708
NN
1106 ac_prev=localstatedir ;;
1107 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 1108 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1c710c3c 1109 localstatedir=$ac_optarg ;;
671aa708
NN
1110
1111 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1112 ac_prev=mandir ;;
1113 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1c710c3c 1114 mandir=$ac_optarg ;;
671aa708
NN
1115
1116 -nfp | --nfp | --nf)
1117 # Obsolete; use --without-fp.
1118 with_fp=no ;;
1119
1120 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1c710c3c 1121 | --no-cr | --no-c | -n)
671aa708
NN
1122 no_create=yes ;;
1123
1124 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1125 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1126 no_recursion=yes ;;
1127
1128 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1129 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1130 | --oldin | --oldi | --old | --ol | --o)
1131 ac_prev=oldincludedir ;;
1132 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1133 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1134 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1c710c3c 1135 oldincludedir=$ac_optarg ;;
671aa708
NN
1136
1137 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1138 ac_prev=prefix ;;
1139 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1c710c3c 1140 prefix=$ac_optarg ;;
671aa708
NN
1141
1142 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1143 | --program-pre | --program-pr | --program-p)
1144 ac_prev=program_prefix ;;
1145 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1146 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1c710c3c 1147 program_prefix=$ac_optarg ;;
671aa708
NN
1148
1149 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1150 | --program-suf | --program-su | --program-s)
1151 ac_prev=program_suffix ;;
1152 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1153 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1c710c3c 1154 program_suffix=$ac_optarg ;;
671aa708
NN
1155
1156 -program-transform-name | --program-transform-name \
1157 | --program-transform-nam | --program-transform-na \
1158 | --program-transform-n | --program-transform- \
1159 | --program-transform | --program-transfor \
1160 | --program-transfo | --program-transf \
1161 | --program-trans | --program-tran \
1162 | --progr-tra | --program-tr | --program-t)
1163 ac_prev=program_transform_name ;;
1164 -program-transform-name=* | --program-transform-name=* \
1165 | --program-transform-nam=* | --program-transform-na=* \
1166 | --program-transform-n=* | --program-transform-=* \
1167 | --program-transform=* | --program-transfor=* \
1168 | --program-transfo=* | --program-transf=* \
1169 | --program-trans=* | --program-tran=* \
1170 | --progr-tra=* | --program-tr=* | --program-t=*)
1c710c3c 1171 program_transform_name=$ac_optarg ;;
671aa708 1172
5213506e
RW
1173 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1174 ac_prev=pdfdir ;;
1175 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1176 pdfdir=$ac_optarg ;;
1177
1178 -psdir | --psdir | --psdi | --psd | --ps)
1179 ac_prev=psdir ;;
1180 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1181 psdir=$ac_optarg ;;
1182
671aa708
NN
1183 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1184 | -silent | --silent | --silen | --sile | --sil)
1185 silent=yes ;;
1186
1187 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1188 ac_prev=sbindir ;;
1189 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1190 | --sbi=* | --sb=*)
1c710c3c 1191 sbindir=$ac_optarg ;;
671aa708
NN
1192
1193 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1194 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1195 | --sharedst | --shareds | --shared | --share | --shar \
1196 | --sha | --sh)
1197 ac_prev=sharedstatedir ;;
1198 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1199 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1200 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1201 | --sha=* | --sh=*)
1c710c3c 1202 sharedstatedir=$ac_optarg ;;
671aa708
NN
1203
1204 -site | --site | --sit)
1205 ac_prev=site ;;
1206 -site=* | --site=* | --sit=*)
1c710c3c 1207 site=$ac_optarg ;;
671aa708
NN
1208
1209 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1210 ac_prev=srcdir ;;
1211 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1c710c3c 1212 srcdir=$ac_optarg ;;
671aa708
NN
1213
1214 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1215 | --syscon | --sysco | --sysc | --sys | --sy)
1216 ac_prev=sysconfdir ;;
1217 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1218 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1c710c3c 1219 sysconfdir=$ac_optarg ;;
671aa708
NN
1220
1221 -target | --target | --targe | --targ | --tar | --ta | --t)
1c710c3c 1222 ac_prev=target_alias ;;
671aa708 1223 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1c710c3c 1224 target_alias=$ac_optarg ;;
671aa708
NN
1225
1226 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1227 verbose=yes ;;
1228
1c710c3c
DJ
1229 -version | --version | --versio | --versi | --vers | -V)
1230 ac_init_version=: ;;
671aa708
NN
1231
1232 -with-* | --with-*)
5213506e 1233 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
671aa708 1234 # Reject names that are not valid shell variable names.
5213506e 1235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
22e05272 1236 as_fn_error $? "invalid package name: $ac_useropt"
5213506e
RW
1237 ac_useropt_orig=$ac_useropt
1238 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239 case $ac_user_opts in
1240 *"
1241"with_$ac_useropt"
1242"*) ;;
1243 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1244 ac_unrecognized_sep=', ';;
2aeb72e9 1245 esac
5213506e 1246 eval with_$ac_useropt=\$ac_optarg ;;
671aa708
NN
1247
1248 -without-* | --without-*)
5213506e 1249 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
671aa708 1250 # Reject names that are not valid shell variable names.
5213506e 1251 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
22e05272 1252 as_fn_error $? "invalid package name: $ac_useropt"
5213506e
RW
1253 ac_useropt_orig=$ac_useropt
1254 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255 case $ac_user_opts in
1256 *"
1257"with_$ac_useropt"
1258"*) ;;
1259 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1260 ac_unrecognized_sep=', ';;
1261 esac
1262 eval with_$ac_useropt=no ;;
671aa708
NN
1263
1264 --x)
1265 # Obsolete; use --with-x.
1266 with_x=yes ;;
1267
1268 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1269 | --x-incl | --x-inc | --x-in | --x-i)
1270 ac_prev=x_includes ;;
1271 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1272 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1c710c3c 1273 x_includes=$ac_optarg ;;
671aa708
NN
1274
1275 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1276 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1277 ac_prev=x_libraries ;;
1278 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1279 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1c710c3c 1280 x_libraries=$ac_optarg ;;
671aa708 1281
22e05272
JM
1282 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1283Try \`$0 --help' for more information"
671aa708
NN
1284 ;;
1285
1c710c3c
DJ
1286 *=*)
1287 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1288 # Reject names that are not valid shell variable names.
5213506e
RW
1289 case $ac_envvar in #(
1290 '' | [0-9]* | *[!_$as_cr_alnum]* )
22e05272 1291 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
5213506e
RW
1292 esac
1293 eval $ac_envvar=\$ac_optarg
1c710c3c
DJ
1294 export $ac_envvar ;;
1295
671aa708 1296 *)
1c710c3c 1297 # FIXME: should be removed in autoconf 3.0.
5213506e 1298 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1c710c3c 1299 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1300 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
22e05272 1301 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
671aa708
NN
1302 ;;
1303
1304 esac
1305done
1306
1307if test -n "$ac_prev"; then
1c710c3c 1308 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
22e05272 1309 as_fn_error $? "missing argument to $ac_option"
af71363e 1310fi
af71363e 1311
5213506e
RW
1312if test -n "$ac_unrecognized_opts"; then
1313 case $enable_option_checking in
1314 no) ;;
22e05272 1315 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
5213506e 1316 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2aeb72e9 1317 esac
5213506e 1318fi
2aeb72e9 1319
5213506e
RW
1320# Check all directory arguments for consistency.
1321for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1322 datadir sysconfdir sharedstatedir localstatedir includedir \
1323 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1324 libdir localedir mandir
2aeb72e9 1325do
5213506e
RW
1326 eval ac_val=\$$ac_var
1327 # Remove trailing slashes.
1328 case $ac_val in
1329 */ )
1330 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1331 eval $ac_var=\$ac_val;;
1332 esac
1333 # Be sure to have absolute directory names.
2aeb72e9 1334 case $ac_val in
5213506e
RW
1335 [\\/$]* | ?:[\\/]* ) continue;;
1336 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
671aa708 1337 esac
22e05272 1338 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
671aa708
NN
1339done
1340
1c710c3c
DJ
1341# There might be people who depend on the old broken behavior: `$host'
1342# used to hold the argument of --host etc.
1343# FIXME: To remove some day.
1344build=$build_alias
1345host=$host_alias
1346target=$target_alias
0b0dc272 1347
1c710c3c
DJ
1348# FIXME: To remove some day.
1349if test "x$host_alias" != x; then
1350 if test "x$build_alias" = x; then
1351 cross_compiling=maybe
1c710c3c
DJ
1352 elif test "x$build_alias" != "x$host_alias"; then
1353 cross_compiling=yes
1354 fi
1355fi
1356
1357ac_tool_prefix=
1358test -n "$host_alias" && ac_tool_prefix=$host_alias-
1359
1360test "$silent" = yes && exec 6>/dev/null
671aa708 1361
671aa708 1362
5213506e
RW
1363ac_pwd=`pwd` && test -n "$ac_pwd" &&
1364ac_ls_di=`ls -di .` &&
1365ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
22e05272 1366 as_fn_error $? "working directory cannot be determined"
5213506e 1367test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
22e05272 1368 as_fn_error $? "pwd does not report name of working directory"
5213506e
RW
1369
1370
671aa708
NN
1371# Find the source files, if location was not specified.
1372if test -z "$srcdir"; then
1373 ac_srcdir_defaulted=yes
5213506e
RW
1374 # Try the directory containing this script, then the parent directory.
1375 ac_confdir=`$as_dirname -- "$as_myself" ||
1376$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1377 X"$as_myself" : 'X\(//\)[^/]' \| \
1378 X"$as_myself" : 'X\(//\)$' \| \
1379 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1380$as_echo X"$as_myself" |
1381 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1382 s//\1/
1383 q
1384 }
1385 /^X\(\/\/\)[^/].*/{
1386 s//\1/
1387 q
1388 }
1389 /^X\(\/\/\)$/{
1390 s//\1/
1391 q
1392 }
1393 /^X\(\/\).*/{
1394 s//\1/
1395 q
1396 }
1397 s/.*/./; q'`
671aa708 1398 srcdir=$ac_confdir
5213506e 1399 if test ! -r "$srcdir/$ac_unique_file"; then
671aa708
NN
1400 srcdir=..
1401 fi
1402else
1403 ac_srcdir_defaulted=no
1404fi
5213506e
RW
1405if test ! -r "$srcdir/$ac_unique_file"; then
1406 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
22e05272 1407 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
5213506e
RW
1408fi
1409ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1410ac_abs_confdir=`(
22e05272 1411 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
5213506e
RW
1412 pwd)`
1413# When building in place, set srcdir=.
1414if test "$ac_abs_confdir" = "$ac_pwd"; then
1415 srcdir=.
1416fi
1417# Remove unnecessary trailing slashes from srcdir.
1418# Double slashes in file names in object file debugging info
1419# mess up M-x gdb in Emacs.
1420case $srcdir in
1421*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1422esac
87841584
AM
1423case $srcdir in
1424 *" "*)
22e05272 1425 as_fn_error $? "path to source, $srcdir, contains spaces"
87841584
AM
1426 ;;
1427esac
ac9e6043
RW
1428ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'`
1429
5213506e
RW
1430for ac_var in $ac_precious_vars; do
1431 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1432 eval ac_env_${ac_var}_value=\$${ac_var}
1433 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1434 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1435done
1c710c3c
DJ
1436
1437#
1438# Report the --help message.
1439#
1440if test "$ac_init_help" = "long"; then
1441 # Omit some internal or obsolete options to make the list less imposing.
1442 # This message is too long to be a string in the A/UX 3.1 sh.
1443 cat <<_ACEOF
1444\`configure' configures this package to adapt to many kinds of systems.
1445
1446Usage: $0 [OPTION]... [VAR=VALUE]...
1447
1448To assign environment variables (e.g., CC, CFLAGS...), specify them as
1449VAR=VALUE. See below for descriptions of some of the useful variables.
1450
1451Defaults for the options are specified in brackets.
1452
1453Configuration:
1454 -h, --help display this help and exit
1455 --help=short display options specific to this package
1456 --help=recursive display the short help of all the included packages
1457 -V, --version display version information and exit
22e05272 1458 -q, --quiet, --silent do not print \`checking ...' messages
1c710c3c
DJ
1459 --cache-file=FILE cache test results in FILE [disabled]
1460 -C, --config-cache alias for \`--cache-file=config.cache'
1461 -n, --no-create do not create output files
1462 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1463
1c710c3c
DJ
1464Installation directories:
1465 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1466 [$ac_default_prefix]
1c710c3c 1467 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1468 [PREFIX]
1c710c3c
DJ
1469
1470By default, \`make install' will install all the files in
1471\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1472an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1473for instance \`--prefix=\$HOME'.
1474
1475For better control, use the options below.
1476
1477Fine tuning of the installation directories:
5213506e
RW
1478 --bindir=DIR user executables [EPREFIX/bin]
1479 --sbindir=DIR system admin executables [EPREFIX/sbin]
1480 --libexecdir=DIR program executables [EPREFIX/libexec]
1481 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1482 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1483 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1484 --libdir=DIR object code libraries [EPREFIX/lib]
1485 --includedir=DIR C header files [PREFIX/include]
1486 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1487 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1488 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1489 --infodir=DIR info documentation [DATAROOTDIR/info]
1490 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1491 --mandir=DIR man documentation [DATAROOTDIR/man]
1492 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1493 --htmldir=DIR html documentation [DOCDIR]
1494 --dvidir=DIR dvi documentation [DOCDIR]
1495 --pdfdir=DIR pdf documentation [DOCDIR]
1496 --psdir=DIR ps documentation [DOCDIR]
1c710c3c
DJ
1497_ACEOF
1498
1499 cat <<\_ACEOF
1500
1501Program names:
1502 --program-prefix=PREFIX prepend PREFIX to installed program names
1503 --program-suffix=SUFFIX append SUFFIX to installed program names
1504 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1505
1506System types:
1507 --build=BUILD configure for building on BUILD [guessed]
1508 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1509 --target=TARGET configure for building compilers for TARGET [HOST]
1510_ACEOF
1511fi
1512
1513if test -n "$ac_init_help"; then
1514
1515 cat <<\_ACEOF
1516
1517Optional Features:
5213506e 1518 --disable-option-checking ignore unrecognized --enable/--with options
1c710c3c
DJ
1519 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1520 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85c64bbe
BS
1521 --enable-as-accelerator-for=ARG
1522 build as offload target compiler. Specify offload
1523 host triple by ARG
1524 --enable-offload-targets=LIST
1525 enable offloading to devices from comma-separated
1526 LIST of TARGET[=DIR]. Use optional path to find
1527 offload target compiler during the build
fe5bfa67
TB
1528 --enable-offload-defaulted
1529 If enabled, configured but not installed offload compilers and
1530 libgomp plugins are silently ignored. Useful for distribution
1531 compilers where those are in separate optional packages.
1532
21539e2e 1533 --enable-gold[=ARG] build gold [ARG={default,yes,no}]
33e39b66 1534 --enable-ld[=ARG] build ld [ARG={default,yes,no}]
324402a0 1535 --enable-compressed-debug-sections={all,gas,gold,ld,none}
78edb32f
L
1536 Enable compressed debug sections for gas, gold or ld
1537 by default
87e6d9dc
TB
1538 --disable-libquadmath do not build libquadmath directory
1539 --disable-libquadmath-support
1540 disable libquadmath support for Fortran
30b74385
RW
1541 --enable-libada build libada directory
1542 --enable-libssp build libssp directory
1873ec0c 1543 --disable-libstdcxx do not build libstdc++-v3 directory
ff3ac0f4 1544 --enable-bootstrap enable bootstrapping [yes if native build]
4a5e71f2
L
1545 --enable-pgo-build[=lto]
1546 enable the PGO build
33ad93b9 1547 --disable-isl-version-check
560d18d3 1548 disable check for isl version
d7f09764 1549 --enable-lto enable link time optimization support
45b3824d
TS
1550 --enable-linker-plugin-configure-flags=FLAGS
1551 additional flags for configuring linker plugins
1552 [none]
1553 --enable-linker-plugin-flags=FLAGS
1554 additional flags for configuring and building linker
1555 plugins [none]
cdfee50a 1556 --enable-host-shared build host code as shared libraries
33e39b66
AS
1557 --enable-stage1-languages[=all]
1558 choose additional languages to build during stage1.
1559 Mostly useful for compiler development
43c40f3e
RO
1560 --enable-objc-gc enable use of Boehm's garbage collector with the GNU
1561 Objective-C runtime
318a4e6d 1562 --enable-vtable-verify Enable vtable verification feature
30b74385 1563 --enable-serial-[{host,target,build}-]configure
33e39b66
AS
1564 force sequential configuration of sub-packages for
1565 the host, target or build machine, or all
1566 sub-packages
1567 --enable-maintainer-mode
1568 enable make rules and dependencies not useful (and
1569 sometimes confusing) to the casual installer
1570 --enable-stage1-checking[=all]
1571 choose additional checking for stage1 of the
1572 compiler
1c710c3c
DJ
1573 --enable-werror enable -Werror in bootstrap stage2 and later
1574
1575Optional Packages:
1576 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1577 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1578 --with-build-libsubdir=DIR Directory where to find libraries for build system
a05c2c75 1579 --with-system-zlib use installed libz
33e39b66
AS
1580 --with-mpc=PATH specify prefix directory for installed MPC package.
1581 Equivalent to --with-mpc-include=PATH/include plus
1582 --with-mpc-lib=PATH/lib
1583 --with-mpc-include=PATH specify directory for installed MPC include files
1584 --with-mpc-lib=PATH specify directory for the installed MPC library
30b74385 1585 --with-mpfr=PATH specify prefix directory for installed MPFR package.
33e39b66
AS
1586 Equivalent to --with-mpfr-include=PATH/include plus
1587 --with-mpfr-lib=PATH/lib
1c710c3c 1588 --with-mpfr-include=PATH
30b74385
RW
1589 specify directory for installed MPFR include files
1590 --with-mpfr-lib=PATH specify directory for the installed MPFR library
33e39b66
AS
1591 --with-gmp=PATH specify prefix directory for the installed GMP
1592 package. Equivalent to
1593 --with-gmp-include=PATH/include plus
1594 --with-gmp-lib=PATH/lib
30b74385
RW
1595 --with-gmp-include=PATH specify directory for installed GMP include files
1596 --with-gmp-lib=PATH specify directory for the installed GMP library
0b21f5d3 1597 --with-stage1-libs=LIBS libraries for stage1
aac9103b
TT
1598 --with-static-standard-libraries
1599 use -static-libstdc++ and -static-libgcc
1600 (default=auto)
33e39b66
AS
1601 --with-stage1-ldflags=FLAGS
1602 linker flags for stage1
33e39b66
AS
1603 --with-boot-libs=LIBS libraries for stage2 and later
1604 --with-boot-ldflags=FLAGS
1605 linker flags for stage2 and later
e357a5e0 1606 --with-isl=PATH Specify prefix directory for the installed isl
33e39b66 1607 package. Equivalent to
33ad93b9
RG
1608 --with-isl-include=PATH/include plus
1609 --with-isl-lib=PATH/lib
560d18d3
AK
1610 --with-isl-include=PATH Specify directory for installed isl include files
1611 --with-isl-lib=PATH Specify the directory for the installed isl library
114bf3f1
MK
1612 --with-target-bdw-gc=PATHLIST
1613 specify prefix directory for installed bdw-gc
1614 package. Equivalent to
1615 --with-target-bdw-gc-include=PATH/include plus
1616 --with-target-bdw-gc-lib=PATH/lib
1617 --with-target-bdw-gc-include=PATHLIST
1618 specify directories for installed bdw-gc include
1619 files
1620 --with-target-bdw-gc-lib=PATHLIST
1621 specify directories for installed bdw-gc library
3c36aa6b
JJ
1622 --with-gcc-major-version-only
1623 use only GCC major number in filesystem paths
30b74385 1624 --with-build-sysroot=SYSROOT
1c710c3c 1625 use sysroot as the system root during the build
c8aea42c 1626 --with-debug-prefix-map='A=B C=D ...'
33e39b66
AS
1627 map A to B, C to D ... in debug information
1628 --with-build-config='NAME NAME2...'
1629 use config/NAME.mk build configuration
30b74385 1630 --with-build-time-tools=PATH
1c710c3c 1631 use given path to find target tools during the build
1c710c3c
DJ
1632
1633Some influential environment variables:
1634 CC C compiler command
1635 CFLAGS C compiler flags
1636 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1637 nonstandard directory <lib dir>
5213506e 1638 LIBS libraries to pass to the linker, e.g. -l<library>
22e05272 1639 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
5213506e 1640 you have headers in a nonstandard directory <include dir>
c3a86da9
DJ
1641 CXX C++ compiler command
1642 CXXFLAGS C++ compiler flags
ffedf511
RW
1643 build_configargs
1644 additional configure arguments for build directories
1645 host_configargs
1646 additional configure arguments for host directories
1647 target_configargs
1648 additional configure arguments for target directories
278a7a38
AO
1649 AR AR for the host
1650 AS AS for the host
1651 DLLTOOL DLLTOOL for the host
3b5e8ee4 1652 DSYMUTIL DSYMUTIL for the host
278a7a38
AO
1653 LD LD for the host
1654 LIPO LIPO for the host
1655 NM NM for the host
1656 RANLIB RANLIB for the host
1657 STRIP STRIP for the host
1658 WINDRES WINDRES for the host
901119ae 1659 WINDMC WINDMC for the host
278a7a38
AO
1660 OBJCOPY OBJCOPY for the host
1661 OBJDUMP OBJDUMP for the host
e4a9a572 1662 OTOOL OTOOL for the host
e7a82751 1663 READELF READELF for the host
278a7a38
AO
1664 CC_FOR_TARGET
1665 CC for the target
1666 CXX_FOR_TARGET
1667 CXX for the target
1668 GCC_FOR_TARGET
1669 GCC for the target
278a7a38
AO
1670 GFORTRAN_FOR_TARGET
1671 GFORTRAN for the target
632e2a07
ILT
1672 GOC_FOR_TARGET
1673 GOC for the target
b4c522fa
IB
1674 GDC_FOR_TARGET
1675 GDC for the target
278a7a38
AO
1676 AR_FOR_TARGET
1677 AR for the target
1678 AS_FOR_TARGET
1679 AS for the target
1680 DLLTOOL_FOR_TARGET
1681 DLLTOOL for the target
3b5e8ee4
IS
1682 DSYMUTIL_FOR_TARGET
1683 DSYMUTIL for the target
278a7a38
AO
1684 LD_FOR_TARGET
1685 LD for the target
1686 LIPO_FOR_TARGET
1687 LIPO for the target
1688 NM_FOR_TARGET
1689 NM for the target
9bccfdf5
AP
1690 OBJCOPY_FOR_TARGET
1691 OBJCOPY for the target
278a7a38
AO
1692 OBJDUMP_FOR_TARGET
1693 OBJDUMP for the target
e4a9a572
IS
1694 OTOOL_FOR_TARGET
1695 OTOOL for the target
278a7a38
AO
1696 RANLIB_FOR_TARGET
1697 RANLIB for the target
e7a82751
RM
1698 READELF_FOR_TARGET
1699 READELF for the target
278a7a38
AO
1700 STRIP_FOR_TARGET
1701 STRIP for the target
1702 WINDRES_FOR_TARGET
1703 WINDRES for the target
901119ae
KT
1704 WINDMC_FOR_TARGET
1705 WINDMC for the target
1c710c3c
DJ
1706
1707Use these variables to override the choices made by `configure' or to help
1708it to find libraries and programs with nonstandard names/locations.
1709
5213506e 1710Report bugs to the package provider.
1c710c3c 1711_ACEOF
5213506e 1712ac_status=$?
1c710c3c
DJ
1713fi
1714
1715if test "$ac_init_help" = "recursive"; then
1716 # If there are subdirs, report their specific --help.
1c710c3c 1717 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1718 test -d "$ac_dir" ||
1719 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1720 continue
1c710c3c
DJ
1721 ac_builddir=.
1722
5213506e
RW
1723case "$ac_dir" in
1724.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1725*)
1726 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1727 # A ".." for each directory in $ac_dir_suffix.
1728 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1729 case $ac_top_builddir_sub in
1730 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1731 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1732 esac ;;
1733esac
1734ac_abs_top_builddir=$ac_pwd
1735ac_abs_builddir=$ac_pwd$ac_dir_suffix
1736# for backward compatibility:
1737ac_top_builddir=$ac_top_build_prefix
1c710c3c
DJ
1738
1739case $srcdir in
5213506e 1740 .) # We are building in place.
1c710c3c 1741 ac_srcdir=.
5213506e
RW
1742 ac_top_srcdir=$ac_top_builddir_sub
1743 ac_abs_top_srcdir=$ac_pwd ;;
1744 [\\/]* | ?:[\\/]* ) # Absolute name.
1c710c3c 1745 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1746 ac_top_srcdir=$srcdir
1747 ac_abs_top_srcdir=$srcdir ;;
1748 *) # Relative name.
1749 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1750 ac_top_srcdir=$ac_top_build_prefix$srcdir
1751 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2aeb72e9 1752esac
5213506e
RW
1753ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1754
1755 cd "$ac_dir" || { ac_status=$?; continue; }
1756 # Check for guested configure.
1757 if test -f "$ac_srcdir/configure.gnu"; then
1758 echo &&
1759 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1760 elif test -f "$ac_srcdir/configure"; then
1761 echo &&
1762 $SHELL "$ac_srcdir/configure" --help=recursive
1c710c3c 1763 else
5213506e
RW
1764 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1765 fi || ac_status=$?
1766 cd "$ac_pwd" || { ac_status=$?; break; }
1c710c3c
DJ
1767 done
1768fi
1769
5213506e 1770test -n "$ac_init_help" && exit $ac_status
1c710c3c
DJ
1771if $ac_init_version; then
1772 cat <<\_ACEOF
5213506e 1773configure
22e05272 1774generated by GNU Autoconf 2.69
1c710c3c 1775
22e05272 1776Copyright (C) 2012 Free Software Foundation, Inc.
1c710c3c
DJ
1777This configure script is free software; the Free Software Foundation
1778gives unlimited permission to copy, distribute and modify it.
1779_ACEOF
5213506e 1780 exit
0b0dc272 1781fi
5213506e
RW
1782
1783## ------------------------ ##
1784## Autoconf initialization. ##
1785## ------------------------ ##
1786
1787# ac_fn_c_try_compile LINENO
1788# --------------------------
1789# Try to compile conftest.$ac_ext, and return whether this succeeded.
1790ac_fn_c_try_compile ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1793 rm -f conftest.$ac_objext
1794 if { { ac_try="$ac_compile"
1795case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_compile") 2>conftest.err
1802 ac_status=$?
1803 if test -s conftest.err; then
1804 grep -v '^ *+' conftest.err >conftest.er1
1805 cat conftest.er1 >&5
1806 mv -f conftest.er1 conftest.err
1807 fi
1808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1809 test $ac_status = 0; } && {
1810 test -z "$ac_c_werror_flag" ||
1811 test ! -s conftest.err
1812 } && test -s conftest.$ac_objext; then :
1813 ac_retval=0
1814else
1815 $as_echo "$as_me: failed program was:" >&5
1816sed 's/^/| /' conftest.$ac_ext >&5
1817
1818 ac_retval=1
1819fi
22e05272
JM
1820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1821 as_fn_set_status $ac_retval
5213506e
RW
1822
1823} # ac_fn_c_try_compile
1824
1825# ac_fn_cxx_try_compile LINENO
1826# ----------------------------
1827# Try to compile conftest.$ac_ext, and return whether this succeeded.
1828ac_fn_cxx_try_compile ()
1829{
1830 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1831 rm -f conftest.$ac_objext
1832 if { { ac_try="$ac_compile"
1833case "(($ac_try" in
1834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1835 *) ac_try_echo=$ac_try;;
1836esac
1837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1838$as_echo "$ac_try_echo"; } >&5
1839 (eval "$ac_compile") 2>conftest.err
1840 ac_status=$?
1841 if test -s conftest.err; then
1842 grep -v '^ *+' conftest.err >conftest.er1
1843 cat conftest.er1 >&5
1844 mv -f conftest.er1 conftest.err
1845 fi
1846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847 test $ac_status = 0; } && {
1848 test -z "$ac_cxx_werror_flag" ||
1849 test ! -s conftest.err
1850 } && test -s conftest.$ac_objext; then :
1851 ac_retval=0
1852else
1853 $as_echo "$as_me: failed program was:" >&5
1854sed 's/^/| /' conftest.$ac_ext >&5
1855
1856 ac_retval=1
1857fi
22e05272
JM
1858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1859 as_fn_set_status $ac_retval
5213506e
RW
1860
1861} # ac_fn_cxx_try_compile
1862
0b21f5d3
EB
1863# ac_fn_cxx_try_link LINENO
1864# -------------------------
1865# Try to link conftest.$ac_ext, and return whether this succeeded.
1866ac_fn_cxx_try_link ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 rm -f conftest.$ac_objext conftest$ac_exeext
1870 if { { ac_try="$ac_link"
1871case "(($ac_try" in
1872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873 *) ac_try_echo=$ac_try;;
1874esac
1875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876$as_echo "$ac_try_echo"; } >&5
1877 (eval "$ac_link") 2>conftest.err
1878 ac_status=$?
1879 if test -s conftest.err; then
1880 grep -v '^ *+' conftest.err >conftest.er1
1881 cat conftest.er1 >&5
1882 mv -f conftest.er1 conftest.err
1883 fi
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; } && {
1886 test -z "$ac_cxx_werror_flag" ||
1887 test ! -s conftest.err
1888 } && test -s conftest$ac_exeext && {
1889 test "$cross_compiling" = yes ||
22e05272 1890 test -x conftest$ac_exeext
0b21f5d3
EB
1891 }; then :
1892 ac_retval=0
1893else
1894 $as_echo "$as_me: failed program was:" >&5
1895sed 's/^/| /' conftest.$ac_ext >&5
1896
1897 ac_retval=1
1898fi
1899 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1900 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1901 # interfere with the next link command; also delete a directory that is
1902 # left behind by Apple's compiler. We do this before executing the actions.
1903 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
22e05272
JM
1904 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1905 as_fn_set_status $ac_retval
0b21f5d3
EB
1906
1907} # ac_fn_cxx_try_link
1908
5213506e
RW
1909# ac_fn_c_try_link LINENO
1910# -----------------------
1911# Try to link conftest.$ac_ext, and return whether this succeeded.
1912ac_fn_c_try_link ()
1913{
1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915 rm -f conftest.$ac_objext conftest$ac_exeext
1916 if { { ac_try="$ac_link"
1917case "(($ac_try" in
1918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1919 *) ac_try_echo=$ac_try;;
1920esac
1921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1922$as_echo "$ac_try_echo"; } >&5
1923 (eval "$ac_link") 2>conftest.err
1924 ac_status=$?
1925 if test -s conftest.err; then
1926 grep -v '^ *+' conftest.err >conftest.er1
1927 cat conftest.er1 >&5
1928 mv -f conftest.er1 conftest.err
1929 fi
1930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1931 test $ac_status = 0; } && {
1932 test -z "$ac_c_werror_flag" ||
1933 test ! -s conftest.err
1934 } && test -s conftest$ac_exeext && {
1935 test "$cross_compiling" = yes ||
22e05272 1936 test -x conftest$ac_exeext
5213506e
RW
1937 }; then :
1938 ac_retval=0
1939else
1940 $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943 ac_retval=1
1944fi
1945 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1946 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1947 # interfere with the next link command; also delete a directory that is
1948 # left behind by Apple's compiler. We do this before executing the actions.
1949 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
22e05272
JM
1950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1951 as_fn_set_status $ac_retval
5213506e
RW
1952
1953} # ac_fn_c_try_link
1954cat >config.log <<_ACEOF
1c710c3c
DJ
1955This file contains any messages produced by compilers while
1956running configure, to aid debugging if configure makes a mistake.
1957
1958It was created by $as_me, which was
22e05272 1959generated by GNU Autoconf 2.69. Invocation command line was
1c710c3c
DJ
1960
1961 $ $0 $@
1962
1963_ACEOF
5213506e 1964exec 5>>config.log
1c710c3c
DJ
1965{
1966cat <<_ASUNAME
1967## --------- ##
1968## Platform. ##
1969## --------- ##
1970
1971hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1972uname -m = `(uname -m) 2>/dev/null || echo unknown`
1973uname -r = `(uname -r) 2>/dev/null || echo unknown`
1974uname -s = `(uname -s) 2>/dev/null || echo unknown`
1975uname -v = `(uname -v) 2>/dev/null || echo unknown`
1976
1977/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1978/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1979
1980/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1981/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1982/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
5213506e 1983/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1c710c3c
DJ
1984/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1985/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1986/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1987
1988_ASUNAME
1989
1990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1991for as_dir in $PATH
1992do
1993 IFS=$as_save_IFS
1994 test -z "$as_dir" && as_dir=.
5213506e
RW
1995 $as_echo "PATH: $as_dir"
1996 done
1997IFS=$as_save_IFS
1c710c3c
DJ
1998
1999} >&5
2000
2001cat >&5 <<_ACEOF
2002
2003
2004## ----------- ##
2005## Core tests. ##
2006## ----------- ##
2007
2008_ACEOF
2009
2010
2011# Keep a trace of the command line.
2012# Strip out --no-create and --no-recursion so they do not pile up.
2013# Strip out --silent because we don't want to record it for future runs.
2014# Also quote any args containing shell meta-characters.
2015# Make two passes to allow for proper duplicate-argument suppression.
2016ac_configure_args=
2017ac_configure_args0=
2018ac_configure_args1=
1c710c3c
DJ
2019ac_must_keep_next=false
2020for ac_pass in 1 2
2021do
2022 for ac_arg
2023 do
2024 case $ac_arg in
2025 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2026 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2027 | -silent | --silent | --silen | --sile | --sil)
2028 continue ;;
5213506e
RW
2029 *\'*)
2030 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1c710c3c
DJ
2031 esac
2032 case $ac_pass in
5213506e 2033 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1c710c3c 2034 2)
5213506e 2035 as_fn_append ac_configure_args1 " '$ac_arg'"
1c710c3c
DJ
2036 if test $ac_must_keep_next = true; then
2037 ac_must_keep_next=false # Got value, back to normal.
2038 else
2039 case $ac_arg in
2040 *=* | --config-cache | -C | -disable-* | --disable-* \
2041 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2042 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2043 | -with-* | --with-* | -without-* | --without-* | --x)
2044 case "$ac_configure_args0 " in
2045 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2046 esac
2047 ;;
2048 -* ) ac_must_keep_next=true ;;
2049 esac
2050 fi
5213506e 2051 as_fn_append ac_configure_args " '$ac_arg'"
1c710c3c
DJ
2052 ;;
2053 esac
2054 done
2055done
5213506e
RW
2056{ ac_configure_args0=; unset ac_configure_args0;}
2057{ ac_configure_args1=; unset ac_configure_args1;}
1c710c3c
DJ
2058
2059# When interrupted or exit'd, cleanup temporary files, and complete
2060# config.log. We remove comments because anyway the quotes in there
2061# would cause problems or look ugly.
5213506e
RW
2062# WARNING: Use '\'' to represent an apostrophe within the trap.
2063# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1c710c3c
DJ
2064trap 'exit_status=$?
2065 # Save into config.log some information that might help in debugging.
2066 {
2067 echo
2068
22e05272 2069 $as_echo "## ---------------- ##
1c710c3c 2070## Cache variables. ##
22e05272 2071## ---------------- ##"
1c710c3c
DJ
2072 echo
2073 # The following way of writing the cache mishandles newlines in values,
5213506e
RW
2074(
2075 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2076 eval ac_val=\$$ac_var
2077 case $ac_val in #(
2078 *${as_nl}*)
2079 case $ac_var in #(
2080 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2081$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2082 esac
2083 case $ac_var in #(
2084 _ | IFS | as_nl) ;; #(
2085 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2086 *) { eval $ac_var=; unset $ac_var;} ;;
2087 esac ;;
2088 esac
2089 done
1c710c3c 2090 (set) 2>&1 |
5213506e
RW
2091 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2092 *${as_nl}ac_space=\ *)
1c710c3c 2093 sed -n \
5213506e
RW
2094 "s/'\''/'\''\\\\'\'''\''/g;
2095 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2096 ;; #(
1c710c3c 2097 *)
5213506e 2098 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1c710c3c 2099 ;;
5213506e
RW
2100 esac |
2101 sort
2102)
1c710c3c
DJ
2103 echo
2104
22e05272 2105 $as_echo "## ----------------- ##
1c710c3c 2106## Output variables. ##
22e05272 2107## ----------------- ##"
1c710c3c
DJ
2108 echo
2109 for ac_var in $ac_subst_vars
2110 do
5213506e
RW
2111 eval ac_val=\$$ac_var
2112 case $ac_val in
2113 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2114 esac
2115 $as_echo "$ac_var='\''$ac_val'\''"
1c710c3c
DJ
2116 done | sort
2117 echo
2118
2119 if test -n "$ac_subst_files"; then
22e05272 2120 $as_echo "## ------------------- ##
5213506e 2121## File substitutions. ##
22e05272 2122## ------------------- ##"
1c710c3c
DJ
2123 echo
2124 for ac_var in $ac_subst_files
2125 do
5213506e
RW
2126 eval ac_val=\$$ac_var
2127 case $ac_val in
2128 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2129 esac
2130 $as_echo "$ac_var='\''$ac_val'\''"
1c710c3c
DJ
2131 done | sort
2132 echo
2133 fi
2134
2135 if test -s confdefs.h; then
22e05272 2136 $as_echo "## ----------- ##
1c710c3c 2137## confdefs.h. ##
22e05272 2138## ----------- ##"
1c710c3c 2139 echo
5213506e 2140 cat confdefs.h
1c710c3c
DJ
2141 echo
2142 fi
2143 test "$ac_signal" != 0 &&
5213506e
RW
2144 $as_echo "$as_me: caught signal $ac_signal"
2145 $as_echo "$as_me: exit $exit_status"
1c710c3c 2146 } >&5
5213506e
RW
2147 rm -f core *.core core.conftest.* &&
2148 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1c710c3c 2149 exit $exit_status
5213506e 2150' 0
1c710c3c 2151for ac_signal in 1 2 13 15; do
5213506e 2152 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1c710c3c
DJ
2153done
2154ac_signal=0
2155
2156# confdefs.h avoids OS command line length limits that DEFS can exceed.
5213506e
RW
2157rm -f -r conftest* confdefs.h
2158
2159$as_echo "/* confdefs.h */" > confdefs.h
1c710c3c
DJ
2160
2161# Predefined preprocessor variables.
2162
2163cat >>confdefs.h <<_ACEOF
2164#define PACKAGE_NAME "$PACKAGE_NAME"
2165_ACEOF
2166
1c710c3c
DJ
2167cat >>confdefs.h <<_ACEOF
2168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2169_ACEOF
2170
1c710c3c
DJ
2171cat >>confdefs.h <<_ACEOF
2172#define PACKAGE_VERSION "$PACKAGE_VERSION"
2173_ACEOF
0b0dc272 2174
1c710c3c
DJ
2175cat >>confdefs.h <<_ACEOF
2176#define PACKAGE_STRING "$PACKAGE_STRING"
2177_ACEOF
2178
1c710c3c
DJ
2179cat >>confdefs.h <<_ACEOF
2180#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2181_ACEOF
2182
5213506e
RW
2183cat >>confdefs.h <<_ACEOF
2184#define PACKAGE_URL "$PACKAGE_URL"
2185_ACEOF
2186
1c710c3c
DJ
2187
2188# Let the site file select an alternate cache file if it wants to.
5213506e
RW
2189# Prefer an explicitly selected file to automatically selected ones.
2190ac_site_file1=NONE
2191ac_site_file2=NONE
2192if test -n "$CONFIG_SITE"; then
22e05272
JM
2193 # We do not want a PATH search for config.site.
2194 case $CONFIG_SITE in #((
2195 -*) ac_site_file1=./$CONFIG_SITE;;
2196 */*) ac_site_file1=$CONFIG_SITE;;
2197 *) ac_site_file1=./$CONFIG_SITE;;
2198 esac
5213506e
RW
2199elif test "x$prefix" != xNONE; then
2200 ac_site_file1=$prefix/share/config.site
2201 ac_site_file2=$prefix/etc/config.site
2202else
2203 ac_site_file1=$ac_default_prefix/share/config.site
2204 ac_site_file2=$ac_default_prefix/etc/config.site
671aa708 2205fi
5213506e
RW
2206for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2207do
2208 test "x$ac_site_file" = xNONE && continue
22e05272 2209 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
5213506e
RW
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2211$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1c710c3c 2212 sed 's/^/| /' "$ac_site_file" >&5
22e05272
JM
2213 . "$ac_site_file" \
2214 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2216as_fn_error $? "failed to load site script $ac_site_file
2217See \`config.log' for more details" "$LINENO" 5; }
671aa708
NN
2218 fi
2219done
2220
2221if test -r "$cache_file"; then
22e05272
JM
2222 # Some versions of bash will fail to source /dev/null (special files
2223 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2224 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
5213506e
RW
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2226$as_echo "$as_me: loading cache $cache_file" >&6;}
1c710c3c 2227 case $cache_file in
5213506e
RW
2228 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2229 *) . "./$cache_file";;
1c710c3c
DJ
2230 esac
2231 fi
671aa708 2232else
5213506e
RW
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2234$as_echo "$as_me: creating cache $cache_file" >&6;}
1c710c3c
DJ
2235 >$cache_file
2236fi
2237
2238# Check that the precious variables saved in the cache have kept the same
2239# value.
2240ac_cache_corrupted=false
5213506e 2241for ac_var in $ac_precious_vars; do
1c710c3c
DJ
2242 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2243 eval ac_new_set=\$ac_env_${ac_var}_set
5213506e
RW
2244 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2245 eval ac_new_val=\$ac_env_${ac_var}_value
1c710c3c
DJ
2246 case $ac_old_set,$ac_new_set in
2247 set,)
5213506e
RW
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2249$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1c710c3c
DJ
2250 ac_cache_corrupted=: ;;
2251 ,set)
5213506e
RW
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2253$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1c710c3c
DJ
2254 ac_cache_corrupted=: ;;
2255 ,);;
2256 *)
2257 if test "x$ac_old_val" != "x$ac_new_val"; then
5213506e
RW
2258 # differences in whitespace do not lead to failure.
2259 ac_old_val_w=`echo x $ac_old_val`
2260 ac_new_val_w=`echo x $ac_new_val`
2261 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2263$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2264 ac_cache_corrupted=:
2265 else
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2267$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2268 eval $ac_var=\$ac_old_val
2269 fi
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2271$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2273$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1c710c3c
DJ
2274 fi;;
2275 esac
2276 # Pass precious variables to config.status.
2277 if test "$ac_new_set" = set; then
2278 case $ac_new_val in
5213506e 2279 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1c710c3c
DJ
2280 *) ac_arg=$ac_var=$ac_new_val ;;
2281 esac
2282 case " $ac_configure_args " in
2283 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
5213506e 2284 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1c710c3c
DJ
2285 esac
2286 fi
2287done
2288if $ac_cache_corrupted; then
5213506e
RW
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2292$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
22e05272 2293 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
671aa708 2294fi
5213506e
RW
2295## -------------------- ##
2296## Main body of script. ##
2297## -------------------- ##
671aa708 2298
2aeb72e9
DD
2299ac_ext=c
2300ac_cpp='$CPP $CPPFLAGS'
2301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2303ac_compiler_gnu=$ac_cv_c_compiler_gnu
2304
1c710c3c
DJ
2305
2306
2307
1c710c3c
DJ
2308
2309
0115d4a3 2310
1c710c3c 2311
ad33ff57
RW
2312progname=$0
2313# if PWD already has a value, it is probably wrong.
2314if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
2315
2316# Export original configure arguments for use by sub-configures.
2317# Quote arguments with shell meta charatcers.
2318TOPLEVEL_CONFIGURE_ARGUMENTS=
2319set -- "$progname" "$@"
2320for ac_arg
2321do
2322 case "$ac_arg" in
2323 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']*)
2324 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
2325 # if the argument is of the form -foo=baz, quote the baz part only
2326 ac_arg=`echo "'$ac_arg'" | sed "s/^'\([-a-zA-Z0-9]*=\)/\\1'/"` ;;
2327 *) ;;
2328 esac
2329 # Add the quoted argument to the list.
2330 TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
2331done
2332if test "$silent" = yes; then
2333 TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
2334fi
2335# Remove the initial space we just introduced and, as these will be
2336# expanded by make, quote '$'.
2337TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
2338
1c710c3c
DJ
2339
2340# Find the build, host, and target systems.
671aa708 2341ac_aux_dir=
5213506e 2342for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
22e05272
JM
2343 if test -f "$ac_dir/install-sh"; then
2344 ac_aux_dir=$ac_dir
2345 ac_install_sh="$ac_aux_dir/install-sh -c"
2346 break
2347 elif test -f "$ac_dir/install.sh"; then
2348 ac_aux_dir=$ac_dir
2349 ac_install_sh="$ac_aux_dir/install.sh -c"
2350 break
2351 elif test -f "$ac_dir/shtool"; then
2352 ac_aux_dir=$ac_dir
2353 ac_install_sh="$ac_aux_dir/shtool install -c"
2354 break
2355 fi
671aa708
NN
2356done
2357if test -z "$ac_aux_dir"; then
22e05272 2358 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
671aa708 2359fi
5213506e
RW
2360
2361# These three variables are undocumented and unsupported,
2362# and are intended to be withdrawn in a future Autoconf release.
2363# They can cause serious problems if a builder's source tree is in a directory
2364# whose full name contains unusual characters.
2365ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2366ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2367ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2368
671aa708 2369
1c710c3c 2370# Make sure we can run config.sub.
5213506e 2371$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
22e05272 2372 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5213506e
RW
2373
2374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2375$as_echo_n "checking build system type... " >&6; }
22e05272 2376if ${ac_cv_build+:} false; then :
5213506e
RW
2377 $as_echo_n "(cached) " >&6
2378else
2379 ac_build_alias=$build_alias
2380test "x$ac_build_alias" = x &&
2381 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2382test "x$ac_build_alias" = x &&
22e05272 2383 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5213506e 2384ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
22e05272 2385 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5213506e
RW
2386
2387fi
2388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2389$as_echo "$ac_cv_build" >&6; }
2390case $ac_cv_build in
2391*-*-*) ;;
22e05272 2392*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5213506e 2393esac
1c710c3c 2394build=$ac_cv_build
5213506e
RW
2395ac_save_IFS=$IFS; IFS='-'
2396set x $ac_cv_build
2397shift
2398build_cpu=$1
2399build_vendor=$2
2400shift; shift
2401# Remember, the first character of IFS is used to create $*,
2402# except with old shells:
2403build_os=$*
2404IFS=$ac_save_IFS
2405case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
671aa708 2406
671aa708 2407
1c710c3c
DJ
2408 case ${build_alias} in
2409 "") build_noncanonical=${build} ;;
2410 *) build_noncanonical=${build_alias} ;;
af71363e
AS
2411esac
2412
2413
af71363e 2414
1c710c3c
DJ
2415 case ${host_alias} in
2416 "") host_noncanonical=${build_noncanonical} ;;
2417 *) host_noncanonical=${host_alias} ;;
af71363e
AS
2418esac
2419
af71363e 2420
1c710c3c
DJ
2421
2422 case ${target_alias} in
2423 "") target_noncanonical=${host_noncanonical} ;;
2424 *) target_noncanonical=${target_alias} ;;
af71363e
AS
2425esac
2426
af71363e 2427
1c710c3c
DJ
2428
2429
2430test "$host_noncanonical" = "$target_noncanonical" &&
671aa708
NN
2431 test "$program_prefix$program_suffix$program_transform_name" = \
2432 NONENONEs,x,x, &&
1c710c3c 2433 program_transform_name=s,y,y,
af71363e 2434
5213506e
RW
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2436$as_echo_n "checking host system type... " >&6; }
22e05272 2437if ${ac_cv_host+:} false; then :
5213506e 2438 $as_echo_n "(cached) " >&6
af71363e 2439else
5213506e
RW
2440 if test "x$host_alias" = x; then
2441 ac_cv_host=$ac_cv_build
2442else
2443 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
22e05272 2444 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5213506e 2445fi
1c710c3c 2446
af71363e 2447fi
5213506e
RW
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2449$as_echo "$ac_cv_host" >&6; }
2450case $ac_cv_host in
2451*-*-*) ;;
22e05272 2452*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5213506e 2453esac
1c710c3c 2454host=$ac_cv_host
5213506e
RW
2455ac_save_IFS=$IFS; IFS='-'
2456set x $ac_cv_host
2457shift
2458host_cpu=$1
2459host_vendor=$2
2460shift; shift
2461# Remember, the first character of IFS is used to create $*,
2462# except with old shells:
2463host_os=$*
2464IFS=$ac_save_IFS
2465case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2aeb72e9
DD
2466
2467
5213506e
RW
2468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2469$as_echo_n "checking target system type... " >&6; }
22e05272 2470if ${ac_cv_target+:} false; then :
5213506e 2471 $as_echo_n "(cached) " >&6
1c710c3c 2472else
5213506e
RW
2473 if test "x$target_alias" = x; then
2474 ac_cv_target=$ac_cv_host
2475else
2476 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
22e05272 2477 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5213506e 2478fi
1c710c3c
DJ
2479
2480fi
5213506e
RW
2481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2482$as_echo "$ac_cv_target" >&6; }
2483case $ac_cv_target in
2484*-*-*) ;;
22e05272 2485*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5213506e 2486esac
1c710c3c 2487target=$ac_cv_target
5213506e
RW
2488ac_save_IFS=$IFS; IFS='-'
2489set x $ac_cv_target
2490shift
2491target_cpu=$1
2492target_vendor=$2
2493shift; shift
2494# Remember, the first character of IFS is used to create $*,
2495# except with old shells:
2496target_os=$*
2497IFS=$ac_save_IFS
2498case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
1c710c3c
DJ
2499
2500
2501# The aliases save the names the user supplied, while $host etc.
2502# will get canonicalized.
2503test -n "$target_alias" &&
2504 test "$program_prefix$program_suffix$program_transform_name" = \
2505 NONENONEs,x,x, &&
2506 program_prefix=${target_alias}-
5213506e 2507
671aa708 2508test "$program_prefix" != NONE &&
5213506e 2509 program_transform_name="s&^&$program_prefix&;$program_transform_name"
671aa708
NN
2510# Use a double $ so make ignores it.
2511test "$program_suffix" != NONE &&
5213506e
RW
2512 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2513# Double any \ or $.
1c710c3c 2514# By default was `s,x,x', remove it if useless.
5213506e
RW
2515ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2516program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
af71363e 2517
671aa708
NN
2518
2519
775956d0
NN
2520# Get 'install' or 'install-sh' and its variants.
2521# Find a good install program. We prefer a C program (faster),
2522# so one script is as good as another. But avoid the broken or
2523# incompatible versions:
2524# SysV /etc/install, /usr/sbin/install
2525# SunOS /usr/etc/install
2526# IRIX /sbin/install
2527# AIX /bin/install
1c710c3c 2528# AmigaOS /C/install, which installs bootblocks on floppy discs
775956d0
NN
2529# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2530# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2531# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1c710c3c 2532# OS/2's system install, which has a completely different semantic
775956d0 2533# ./install, which can be erroneously created by make from ./install.sh.
38d24731 2534# Reject install programs that cannot install multiple files.
5213506e
RW
2535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2536$as_echo_n "checking for a BSD-compatible install... " >&6; }
775956d0 2537if test -z "$INSTALL"; then
22e05272 2538if ${ac_cv_path_install+:} false; then :
5213506e 2539 $as_echo_n "(cached) " >&6
1c710c3c
DJ
2540else
2541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
5213506e
RW
2546 # Account for people who put trailing slashes in PATH elements.
2547case $as_dir/ in #((
2548 ./ | .// | /[cC]/* | \
1c710c3c 2549 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5213506e 2550 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
1c710c3c
DJ
2551 /usr/ucb/* ) ;;
2552 *)
2553 # OSF1 and SCO ODT 3.0 have their own names for install.
2554 # Don't use installbsd from OSF since it installs stuff as root
2555 # by default.
2556 for ac_prog in ginstall scoinst install; do
2557 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 2558 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
775956d0 2559 if test $ac_prog = install &&
1c710c3c 2560 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
775956d0
NN
2561 # AIX install. It has an incompatible calling convention.
2562 :
1c710c3c
DJ
2563 elif test $ac_prog = install &&
2564 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2565 # program-specific install script used by HP pwplus--don't use.
2566 :
775956d0 2567 else
38d24731
RW
2568 rm -rf conftest.one conftest.two conftest.dir
2569 echo one > conftest.one
2570 echo two > conftest.two
2571 mkdir conftest.dir
2572 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2573 test -s conftest.one && test -s conftest.two &&
2574 test -s conftest.dir/conftest.one &&
2575 test -s conftest.dir/conftest.two
2576 then
2577 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2578 break 3
2579 fi
775956d0
NN
2580 fi
2581 fi
2582 done
1c710c3c
DJ
2583 done
2584 ;;
2585esac
5213506e
RW
2586
2587 done
2588IFS=$as_save_IFS
1c710c3c 2589
38d24731 2590rm -rf conftest.one conftest.two conftest.dir
775956d0
NN
2591
2592fi
2593 if test "${ac_cv_path_install+set}" = set; then
1c710c3c 2594 INSTALL=$ac_cv_path_install
775956d0 2595 else
38d24731
RW
2596 # As a last resort, use the slow shell script. Don't cache a
2597 # value for INSTALL within a source directory, because that will
775956d0 2598 # break other packages using the cache if that directory is
38d24731 2599 # removed, or if the value is a relative name.
1c710c3c 2600 INSTALL=$ac_install_sh
775956d0
NN
2601 fi
2602fi
5213506e
RW
2603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2604$as_echo "$INSTALL" >&6; }
775956d0
NN
2605
2606# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2607# It thinks the first close brace ends the variable substitution.
2608test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2609
1c710c3c 2610test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
775956d0
NN
2611
2612test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2613
5213506e
RW
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
2615$as_echo_n "checking whether ln works... " >&6; }
22e05272 2616if ${acx_cv_prog_LN+:} false; then :
5213506e 2617 $as_echo_n "(cached) " >&6
ad6717df
PB
2618else
2619 rm -f conftestdata_t
2620echo >conftestdata_f
2621if ln conftestdata_f conftestdata_t 2>/dev/null
2622then
2623 acx_cv_prog_LN=ln
2624else
2625 acx_cv_prog_LN=no
2626fi
2627rm -f conftestdata_f conftestdata_t
2628
2629fi
2630if test $acx_cv_prog_LN = no; then
2631 LN="cp"
5213506e
RW
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5
2633$as_echo "no, using $LN" >&6; }
ad6717df
PB
2634else
2635 LN="$acx_cv_prog_LN"
5213506e
RW
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2637$as_echo "yes" >&6; }
ad6717df
PB
2638fi
2639
5213506e
RW
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
2641$as_echo_n "checking whether ln -s works... " >&6; }
1c710c3c
DJ
2642LN_S=$as_ln_s
2643if test "$LN_S" = "ln -s"; then
5213506e
RW
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2645$as_echo "yes" >&6; }
fb0103e5 2646else
5213506e
RW
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
2648$as_echo "no, using $LN_S" >&6; }
148907ea
PB
2649fi
2650
87264276
PB
2651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
2652$as_echo_n "checking for a sed that does not truncate output... " >&6; }
22e05272 2653if ${ac_cv_path_SED+:} false; then :
87264276
PB
2654 $as_echo_n "(cached) " >&6
2655else
2656 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
2657 for ac_i in 1 2 3 4 5 6 7; do
2658 ac_script="$ac_script$as_nl$ac_script"
2659 done
2660 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
2661 { ac_script=; unset ac_script;}
2662 if test -z "$SED"; then
2663 ac_path_SED_found=false
2664 # Loop through the user's path and test for each of PROGNAME-LIST
2665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2666for as_dir in $PATH
2667do
2668 IFS=$as_save_IFS
2669 test -z "$as_dir" && as_dir=.
2670 for ac_prog in sed gsed; do
2671 for ac_exec_ext in '' $ac_executable_extensions; do
2672 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
22e05272 2673 as_fn_executable_p "$ac_path_SED" || continue
87264276
PB
2674# Check for GNU ac_path_SED and select it if it is found.
2675 # Check for GNU $ac_path_SED
2676case `"$ac_path_SED" --version 2>&1` in
2677*GNU*)
2678 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
2679*)
2680 ac_count=0
2681 $as_echo_n 0123456789 >"conftest.in"
2682 while :
2683 do
2684 cat "conftest.in" "conftest.in" >"conftest.tmp"
2685 mv "conftest.tmp" "conftest.in"
2686 cp "conftest.in" "conftest.nl"
2687 $as_echo '' >> "conftest.nl"
2688 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
2689 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
2690 as_fn_arith $ac_count + 1 && ac_count=$as_val
2691 if test $ac_count -gt ${ac_path_SED_max-0}; then
2692 # Best one so far, save it but keep looking for a better one
2693 ac_cv_path_SED="$ac_path_SED"
2694 ac_path_SED_max=$ac_count
2695 fi
2696 # 10*(2^10) chars as input seems more than enough
2697 test $ac_count -gt 10 && break
2698 done
2699 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
2700esac
2701
2702 $ac_path_SED_found && break 3
2703 done
2704 done
2705 done
2706IFS=$as_save_IFS
2707 if test -z "$ac_cv_path_SED"; then
22e05272 2708 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
87264276
PB
2709 fi
2710else
2711 ac_cv_path_SED=$SED
2712fi
2713
2714fi
2715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
2716$as_echo "$ac_cv_path_SED" >&6; }
2717 SED="$ac_cv_path_SED"
2718 rm -f conftest.sed
2719
2720for ac_prog in gawk mawk nawk awk
2721do
2722 # Extract the first word of "$ac_prog", so it can be a program name with args.
2723set dummy $ac_prog; ac_word=$2
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2725$as_echo_n "checking for $ac_word... " >&6; }
22e05272 2726if ${ac_cv_prog_AWK+:} false; then :
87264276
PB
2727 $as_echo_n "(cached) " >&6
2728else
2729 if test -n "$AWK"; then
2730 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2731else
2732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2733for as_dir in $PATH
2734do
2735 IFS=$as_save_IFS
2736 test -z "$as_dir" && as_dir=.
2737 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 2738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
87264276
PB
2739 ac_cv_prog_AWK="$ac_prog"
2740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2741 break 2
2742 fi
2743done
2744 done
2745IFS=$as_save_IFS
2746
2747fi
2748fi
2749AWK=$ac_cv_prog_AWK
2750if test -n "$AWK"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2752$as_echo "$AWK" >&6; }
2753else
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2755$as_echo "no" >&6; }
2756fi
2757
2758
2759 test -n "$AWK" && break
2760done
2761
775956d0 2762
ee6a22df
L
2763srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
2764
2765# We pass INSTALL explicitly to sub-makes. Make sure that it is not
2766# a relative path.
2767if test "$INSTALL" = "${srcdir}/install-sh -c"; then
2768 INSTALL="${srcpwd}/install-sh -c"
2769fi
2770
671aa708
NN
2771# Set srcdir to "." if that's what it is.
2772# This is important for multilib support.
2773pwd=`${PWDCMD-pwd}`
671aa708
NN
2774if test "${pwd}" = "${srcpwd}" ; then
2775 srcdir=.
79c06341
JL
2776fi
2777
671aa708 2778topsrcdir=$srcpwd
5d4a5ee6 2779
671aa708 2780extra_host_args=
afabd8e6 2781
671aa708
NN
2782### To add a new directory to the tree, first choose whether it is a target
2783### or a host dependent tool. Then put it into the appropriate list
2784### (library or tools, host or target), doing a dependency sort.
79c06341 2785
1c710c3c 2786# Subdirs will be configured in the order listed in build_configdirs,
671aa708 2787# configdirs, or target_configdirs; see the serialization section below.
79c06341 2788
1c710c3c
DJ
2789# Dependency sorting is only needed when *configuration* must be done in
2790# a particular order. In all cases a dependency should be specified in
671aa708 2791# the Makefile, whether or not it's implicitly specified here.
79c06341 2792
671aa708
NN
2793# Double entries in build_configdirs, configdirs, or target_configdirs may
2794# cause circular dependencies and break everything horribly.
79c06341 2795
23f6b2f9
PB
2796# these library is used by various programs built for the build
2797# environment
2798#
929315a9 2799build_libs="build-libiberty build-libcpp"
23f6b2f9
PB
2800
2801# these tools are built for the build environment
85bfb75e 2802build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
23f6b2f9 2803
671aa708 2804# these libraries are used by various programs built for the host environment
eae1a5d4 2805#f
3de627ff 2806host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe"
671aa708 2807
671aa708
NN
2808# these tools are built for the host environment
2809# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
2810# know that we are building the simulator.
2811# binutils, gas and ld appear in that order because it makes sense to run
2812# "make check" in that particular order.
38e3d868 2813# If --enable-gold is used, "gold" may replace "ld".
2efd8b1f 2814host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
671aa708 2815
671aa708
NN
2816# these libraries are built for the target environment, and are built after
2817# the host libraries and the host tools (which may be a cross compiler)
8499116a 2818# Note that libiberty is not a target library.
291f172e 2819target_libraries="target-libgcc \
eff02e4f 2820 target-libbacktrace \
671aa708
NN
2821 target-libgloss \
2822 target-newlib \
6d3b5aea 2823 target-libgomp \
48310492 2824 target-libatomic \
0a35513e 2825 target-libitm \
cb543528 2826 target-libstdc++-v3 \
f35db108 2827 target-libsanitizer \
2077db1b 2828 target-libvtv \
77008252 2829 target-libssp \
1ec601bf 2830 target-libquadmath \
6de9cd9a 2831 target-libgfortran \
012447ea 2832 target-libffi \
d9cdb878 2833 target-libobjc \
632e2a07 2834 target-libada \
b4c522fa 2835 target-libgo \
bb50312e
IB
2836 target-libphobos \
2837 target-zlib"
671aa708 2838
4dbda6f0
NN
2839# these tools are built using the target libraries, and are intended to
2840# run only in the target environment
671aa708 2841#
4dbda6f0 2842# note: any program that *uses* libraries that are in the "target_libraries"
1bcce263 2843# list belongs in this list.
671aa708 2844#
85bfb75e 2845target_tools="target-rda"
79c06341 2846
671aa708 2847################################################################################
79c06341 2848
671aa708
NN
2849## All tools belong in one of the four categories, and are assigned above
2850## We assign ${configdirs} this way to remove all embedded newlines. This
2851## is important because configure will choke if they ever get through.
2852## ${configdirs} is directories we build using the host tools.
2853## ${target_configdirs} is directories we build using the target tools.
671aa708 2854configdirs=`echo ${host_libs} ${host_tools}`
4dbda6f0 2855target_configdirs=`echo ${target_libraries} ${target_tools}`
71b5d516 2856build_configdirs=`echo ${build_libs} ${build_tools}`
8b87bb96 2857
ac9e6043
RW
2858
2859
671aa708 2860################################################################################
79c06341 2861
671aa708 2862srcname="gnu development package"
79c06341 2863
671aa708
NN
2864# This gets set non-empty for some net releases of packages.
2865appdirs=""
79c06341 2866
671aa708
NN
2867# Define is_cross_compiler to save on calls to 'test'.
2868is_cross_compiler=
2869if test x"${host}" = x"${target}" ; then
2870 is_cross_compiler=no
79c06341 2871else
671aa708 2872 is_cross_compiler=yes
1c710c3c 2873fi
79c06341 2874
b4acb5ef 2875# Find the build and target subdir names.
8b87bb96 2876
2e9e6f68
DJ
2877# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
2878# have matching libraries, they should use host libraries: Makefile.tpl
2879# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
2880# However, they still use the build modules, because the corresponding
2881# host modules (e.g. bison) are only built for the host when bootstrap
2882# finishes. So:
2883# - build_subdir is where we find build modules, and never changes.
2884# - build_libsubdir is where we find build libraries, and can be overridden.
2885
2886# Prefix 'build-' so this never conflicts with target_subdir.
8b87bb96 2887build_subdir="build-${build_noncanonical}"
1c710c3c 2888
5213506e
RW
2889# Check whether --with-build-libsubdir was given.
2890if test "${with_build_libsubdir+set}" = set; then :
2891 withval=$with_build_libsubdir; build_libsubdir="$withval"
2e9e6f68
DJ
2892else
2893 build_libsubdir="$build_subdir"
5213506e
RW
2894fi
2895
215c351a
PB
2896# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
2897if ( test $srcdir = . && test -d gcc ) \
2898 || test -d $srcdir/../host-${host_noncanonical}; then
2899 host_subdir="host-${host_noncanonical}"
2900else
2901 host_subdir=.
2902fi
8b87bb96
NN
2903# No prefix.
2904target_subdir=${target_noncanonical}
1c710c3c 2905
0db770bd
RW
2906# Be sure to cover against remnants of an in-tree build.
2907if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then
22e05272 2908 as_fn_error $? "building out of tree but $srcdir contains host-${host_noncanonical}.
0db770bd
RW
2909Use a pristine source tree when building in a separate tree" "$LINENO" 5
2910fi
79c06341 2911
671aa708
NN
2912# Skipdirs are removed silently.
2913skipdirs=
2914# Noconfigdirs are removed loudly.
2915noconfigdirs=""
79c06341 2916
671aa708
NN
2917use_gnu_ld=
2918# Make sure we don't let GNU ld be added if we didn't want it.
2919if test x$with_gnu_ld = xno ; then
2920 use_gnu_ld=no
5afab7ad 2921 noconfigdirs="$noconfigdirs ld gold"
79c06341
JL
2922fi
2923
671aa708
NN
2924use_gnu_as=
2925# Make sure we don't let GNU as be added if we didn't want it.
2926if test x$with_gnu_as = xno ; then
2927 use_gnu_as=no
2928 noconfigdirs="$noconfigdirs gas"
79c06341
JL
2929fi
2930
d7f09764 2931use_included_zlib=
a05c2c75
L
2932
2933# Check whether --with-system-zlib was given.
2934if test "${with_system_zlib+set}" = set; then :
2935 withval=$with_system_zlib;
2936fi
2937
d7f09764
DN
2938# Make sure we don't let ZLIB be added if we didn't want it.
2939if test x$with_system_zlib = xyes ; then
2940 use_included_zlib=no
2941 noconfigdirs="$noconfigdirs zlib"
2942fi
2943
36ba9851
ДП
2944# Don't compile the bundled readline/libreadline.a if --with-system-readline
2945# is provided.
2946if test x$with_system_readline = xyes ; then
2947 noconfigdirs="$noconfigdirs readline"
2948fi
2949
1c710c3c 2950# some tools are so dependent upon X11 that if we're not building with X,
671aa708 2951# it's not even worth trying to configure, much less build, that tool.
79c06341 2952
671aa708
NN
2953case ${with_x} in
2954 yes | "") ;; # the default value for this tree is that X11 is available
2955 no)
b4f96efe 2956 skipdirs="${skipdirs} tk itcl libgui"
671aa708 2957 # We won't be able to build gdbtk without X.
1c710c3c 2958 enable_gdbtk=no
671aa708
NN
2959 ;;
2960 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
2961esac
79c06341 2962
1bcce263 2963# Some are only suitable for cross toolchains.
671aa708
NN
2964# Remove these if host=target.
2965cross_only="target-libgloss target-newlib target-opcodes"
2966
2967case $is_cross_compiler in
2968 no) skipdirs="${skipdirs} ${cross_only}" ;;
671aa708 2969esac
79c06341 2970
671aa708
NN
2971# If both --with-headers and --with-libs are specified, default to
2972# --without-newlib.
ee6a22df
L
2973if test x"${with_headers}" != x && test x"${with_headers}" != xno \
2974 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
671aa708
NN
2975 if test x"${with_newlib}" = x ; then
2976 with_newlib=no
2977 fi
79c06341
JL
2978fi
2979
671aa708
NN
2980# Recognize --with-newlib/--without-newlib.
2981case ${with_newlib} in
2982 no) skipdirs="${skipdirs} target-newlib" ;;
2983 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
2984esac
79c06341 2985
85c64bbe
BS
2986# Check whether --enable-as-accelerator-for was given.
2987if test "${enable_as_accelerator_for+set}" = set; then :
4b4f2e35 2988 enableval=$enable_as_accelerator_for;
85c64bbe
BS
2989fi
2990
2991
2992# Check whether --enable-offload-targets was given.
2993if test "${enable_offload_targets+set}" = set; then :
2994 enableval=$enable_offload_targets;
2995 if test x"$enable_offload_targets" = x; then
22e05272 2996 as_fn_error $? "no offload targets specified" "$LINENO" 5
85c64bbe
BS
2997 fi
2998
2999else
3000 enable_offload_targets=
3001fi
3002
3003
fe5bfa67
TB
3004# Check whether --enable-offload-defaulted was given.
3005if test "${enable_offload_defaulted+set}" = set; then :
3006 enableval=$enable_offload_defaulted; enable_offload_defaulted=$enableval
3007else
3008 enable_offload_defaulted=
3009fi
3010
3011
21539e2e
MK
3012# Handle --enable-gold, --enable-ld.
3013# --disable-gold [--enable-ld]
3014# Build only ld. Default option.
9580395f
L
3015# --enable-gold [--enable-ld]
3016# Build both gold and ld. Install gold as "ld.gold", install ld
3017# as "ld.bfd" and "ld".
3018# --enable-gold=default [--enable-ld]
21539e2e
MK
3019# Build both gold and ld. Install gold as "ld.gold" and "ld",
3020# install ld as "ld.bfd".
3021# --enable-gold[=default] --disable-ld
3022# Build only gold, which is then installed as both "ld.gold" and "ld".
3023# --enable-gold --enable-ld=default
9580395f
L
3024# Build both gold (installed as "ld.gold") and ld (installed as "ld"
3025# and ld.bfd).
21539e2e
MK
3026# In other words, ld is default
3027# --enable-gold=default --enable-ld=default
3028# Error.
3029
3030default_ld=
5213506e
RW
3031# Check whether --enable-gold was given.
3032if test "${enable_gold+set}" = set; then :
3033 enableval=$enable_gold; ENABLE_GOLD=$enableval
5afab7ad
ILT
3034else
3035 ENABLE_GOLD=no
5213506e
RW
3036fi
3037
21539e2e
MK
3038case "${ENABLE_GOLD}" in
3039 yes|default)
38e3d868
RM
3040 # Check for ELF target.
3041 is_elf=no
3042 case "${target}" in
3043 *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
0e76460f 3044 | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
8c6d158a 3045 | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
ff4b7a7e 3046 | *-*-solaris2* | *-*-nto* | *-*-nacl*)
38e3d868
RM
3047 case "${target}" in
3048 *-*-linux*aout* | *-*-linux*oldld*)
3049 ;;
3050 *)
3051 is_elf=yes
3052 ;;
3053 esac
3054 esac
3055
3056 if test "$is_elf" = "yes"; then
3057 # Check for target supported by gold.
5afab7ad 3058 case "${target}" in
7705dfd1 3059 i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
fc259b52 3060 | aarch64*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
21539e2e
MK
3061 configdirs="$configdirs gold"
3062 if test x${ENABLE_GOLD} = xdefault; then
3063 default_ld=gold
3064 fi
38e3d868 3065 ENABLE_GOLD=yes
5afab7ad
ILT
3066 ;;
3067 esac
38e3d868
RM
3068 fi
3069 ;;
3070 no)
3071 ;;
3072 *)
22e05272 3073 as_fn_error $? "invalid --enable-gold argument" "$LINENO" 5
38e3d868 3074 ;;
21539e2e
MK
3075esac
3076
3077# Check whether --enable-ld was given.
3078if test "${enable_ld+set}" = set; then :
3079 enableval=$enable_ld; ENABLE_LD=$enableval
3080else
3081 ENABLE_LD=yes
3082fi
3083
3084
3085case "${ENABLE_LD}" in
3086 default)
9580395f 3087 if test x${default_ld} != x; then
22e05272 3088 as_fn_error $? "either gold or ld can be the default ld" "$LINENO" 5
21539e2e
MK
3089 fi
3090 ;;
3091 yes)
3092 ;;
3093 no)
3094 if test x${ENABLE_GOLD} != xyes; then
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither ld nor gold are enabled" >&5
3096$as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;}
3097 fi
3098 configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
3099 ;;
3100 *)
22e05272 3101 as_fn_error $? "invalid --enable-ld argument" "$LINENO" 5
21539e2e
MK
3102 ;;
3103esac
5afab7ad 3104
78edb32f
L
3105# PR gas/19109
3106# Decide the default method for compressing debug sections.
3107# Provide a configure time option to override our default.
3108# Check whether --enable-compressed_debug_sections was given.
3109if test "${enable_compressed_debug_sections+set}" = set; then :
3110 enableval=$enable_compressed_debug_sections;
3111 if test x"$enable_compressed_debug_sections" = xyes; then
22e05272 3112 as_fn_error $? "no program with compressed debug sections specified" "$LINENO" 5
78edb32f
L
3113 fi
3114
3115else
3116 enable_compressed_debug_sections=
3117fi
3118
3119
671aa708 3120# Configure extra directories which are host specific
79c06341 3121
671aa708
NN
3122case "${host}" in
3123 *-cygwin*)
3124 configdirs="$configdirs libtermcap" ;;
3125esac
79c06341 3126
4fab7234
HPN
3127# A target can indicate whether a language isn't supported for some reason.
3128# Only spaces may be used in this macro; not newlines or tabs.
3129unsupported_languages=
3130
1c710c3c 3131# Remove more programs from consideration, based on the host or
671aa708
NN
3132# target this usually means that a port of the program doesn't
3133# exist yet.
ec8d6ddc 3134
671aa708 3135case "${host}" in
111eeb6e 3136 i[3456789]86-*-msdosdjgpp*)
c9bdb152 3137 noconfigdirs="$noconfigdirs tcl tk itcl"
671aa708 3138 ;;
671aa708 3139esac
ec8d6ddc 3140
6de9cd9a 3141
87e6d9dc
TB
3142# Check whether --enable-libquadmath was given.
3143if test "${enable_libquadmath+set}" = set; then :
3144 enableval=$enable_libquadmath; ENABLE_LIBQUADMATH=$enableval
3145else
3146 ENABLE_LIBQUADMATH=yes
3147fi
3148
3149if test "${ENABLE_LIBQUADMATH}" = "no" ; then
3150 noconfigdirs="$noconfigdirs target-libquadmath"
3151fi
3152
3153
3154# Check whether --enable-libquadmath-support was given.
3155if test "${enable_libquadmath_support+set}" = set; then :
3156 enableval=$enable_libquadmath_support; ENABLE_LIBQUADMATH_SUPPORT=$enableval
3157else
3158 ENABLE_LIBQUADMATH_SUPPORT=yes
3159fi
3160
3161enable_libquadmath_support=
3162if test "${ENABLE_LIBQUADMATH_SUPPORT}" = "no" ; then
3163 enable_libquadmath_support=no
3164fi
3165
3166
5213506e
RW
3167# Check whether --enable-libada was given.
3168if test "${enable_libada+set}" = set; then :
3169 enableval=$enable_libada; ENABLE_LIBADA=$enableval
d9cdb878
AC
3170else
3171 ENABLE_LIBADA=yes
5213506e
RW
3172fi
3173
d9cdb878 3174if test "${ENABLE_LIBADA}" != "yes" ; then
5395b47b 3175 noconfigdirs="$noconfigdirs gnattools"
d9cdb878
AC
3176fi
3177
5213506e
RW
3178# Check whether --enable-libssp was given.
3179if test "${enable_libssp+set}" = set; then :
3180 enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
ef0087a7
KH
3181else
3182 ENABLE_LIBSSP=yes
5213506e
RW
3183fi
3184
ef0087a7 3185
1873ec0c
L
3186# Check whether --enable-libstdcxx was given.
3187if test "${enable_libstdcxx+set}" = set; then :
3188 enableval=$enable_libstdcxx; ENABLE_LIBSTDCXX=$enableval
3189else
3190 ENABLE_LIBSTDCXX=default
3191fi
3192
3193if test "${ENABLE_LIBSTDCXX}" = "no" ; then
1007a55c 3194 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1873ec0c
L
3195fi
3196
44a7d18d 3197# Enable libgomp by default on hosted POSIX systems, and a few others.
27079765 3198if test x$enable_libgomp = x ; then
953ff289 3199 case "${target}" in
416ac4d4 3200 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
953ff289 3201 ;;
8c6d158a 3202 *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
953ff289 3203 ;;
b24513a1 3204 *-*-solaris2* | *-*-hpux11*)
953ff289 3205 ;;
cac90078 3206 *-*-darwin* | *-*-aix*)
953ff289 3207 ;;
29b1533a 3208 nvptx*-*-* | amdgcn*-*-*)
44a7d18d 3209 ;;
953ff289
DN
3210 *)
3211 noconfigdirs="$noconfigdirs target-libgomp"
3212 ;;
3213 esac
27079765 3214fi
953ff289 3215
48310492
RH
3216# Disable libatomic on unsupported systems.
3217if test -d ${srcdir}/libatomic; then
3218 if test x$enable_libatomic = x; then
3219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libatomic support" >&5
3220$as_echo_n "checking for libatomic support... " >&6; }
3221 if (srcdir=${srcdir}/libatomic; \
3222 . ${srcdir}/configure.tgt; \
3223 test -n "$UNSUPPORTED")
3224 then
3225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3226$as_echo "no" >&6; }
3227 noconfigdirs="$noconfigdirs target-libatomic"
3228 else
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3230$as_echo "yes" >&6; }
3231 fi
3232 fi
3233fi
3234
e948157d
RH
3235# Disable libitm on unsupported systems.
3236if test -d ${srcdir}/libitm; then
3237 if test x$enable_libitm = x; then
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libitm support" >&5
01f3428c 3239$as_echo_n "checking for libitm support... " >&6; }
e948157d
RH
3240 if (srcdir=${srcdir}/libitm; \
3241 . ${srcdir}/configure.tgt; \
3242 test -n "$UNSUPPORTED")
3243 then
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
01f3428c 3245$as_echo "no" >&6; }
e948157d
RH
3246 noconfigdirs="$noconfigdirs target-libitm"
3247 else
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
01f3428c 3249$as_echo "yes" >&6; }
e948157d
RH
3250 fi
3251 fi
0a35513e
AH
3252fi
3253
93bf5390
RH
3254# Disable libsanitizer on unsupported systems.
3255if test -d ${srcdir}/libsanitizer; then
3256 if test x$enable_libsanitizer = x; then
3257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsanitizer support" >&5
3258$as_echo_n "checking for libsanitizer support... " >&6; }
3259 if (srcdir=${srcdir}/libsanitizer; \
3260 . ${srcdir}/configure.tgt; \
3261 test -n "$UNSUPPORTED")
3262 then
3263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3264$as_echo "no" >&6; }
3265 noconfigdirs="$noconfigdirs target-libsanitizer"
3266 else
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3268$as_echo "yes" >&6; }
3269 fi
3270 fi
3271fi
3272
2077db1b
CT
3273# Disable libvtv on unsupported systems.
3274if test -d ${srcdir}/libvtv; then
3275 if test x$enable_libvtv = x; then
3276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libvtv support" >&5
3277$as_echo_n "checking for libvtv support... " >&6; }
3278 if (srcdir=${srcdir}/libvtv; \
3279 . ${srcdir}/configure.tgt; \
1e74b850 3280 test "$VTV_SUPPORTED" != "yes")
2077db1b
CT
3281 then
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3283$as_echo "no" >&6; }
3284 noconfigdirs="$noconfigdirs target-libvtv"
3285 else
3286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3287$as_echo "yes" >&6; }
3288 fi
3289 fi
3290fi
3291
d91491e5
SE
3292# Disable libquadmath for some systems.
3293case "${target}" in
e7fae550
DE
3294 avr-*-*)
3295 noconfigdirs="$noconfigdirs target-libquadmath"
3296 ;;
d91491e5
SE
3297 # libquadmath is unused on AIX and libquadmath build process use of
3298 # LD_LIBRARY_PATH can break AIX bootstrap.
3299 powerpc-*-aix* | rs6000-*-aix*)
3300 noconfigdirs="$noconfigdirs target-libquadmath"
3301 ;;
3302esac
3303
1e9e0e23
JM
3304# Disable libssp for some systems.
3305case "${target}" in
3306 avr-*-*)
b318fb4b 3307 # No hosted I/O support.
1e9e0e23
JM
3308 noconfigdirs="$noconfigdirs target-libssp"
3309 ;;
91dfef96
JM
3310 bpf-*-*)
3311 noconfigdirs="$noconfigdirs target-libssp"
3312 ;;
1e9e0e23
JM
3313 powerpc-*-aix* | rs6000-*-aix*)
3314 noconfigdirs="$noconfigdirs target-libssp"
85b8555e 3315 ;;
8d2af3a2
DD
3316 pru-*-*)
3317 # No hosted I/O support.
3318 noconfigdirs="$noconfigdirs target-libssp"
3319 ;;
85b8555e 3320 rl78-*-*)
7cb62ef1
EB
3321 # libssp uses a misaligned load to trigger a fault, but the RL78
3322 # doesn't fault for those - instead, it gives a build-time error
3323 # for explicit misaligned loads.
85b8555e 3324 noconfigdirs="$noconfigdirs target-libssp"
1e9e0e23 3325 ;;
0969ec7d
EB
3326 visium-*-*)
3327 # No hosted I/O support.
3328 noconfigdirs="$noconfigdirs target-libssp"
3329 ;;
1e9e0e23
JM
3330esac
3331
1e9e0e23 3332# Disable libstdc++-v3 for some systems.
67a1cb2a 3333# Allow user to override this if they pass --enable-libstdcxx
1873ec0c
L
3334if test "${ENABLE_LIBSTDCXX}" = "default" ; then
3335 case "${target}" in
3336 *-*-vxworks*)
3337 # VxWorks uses the Dinkumware C++ library.
3338 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3339 ;;
afa3d80e
TS
3340 amdgcn*-*-*)
3341 # Not ported/fails to build when using newlib.
3342 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3343 ;;
1873ec0c
L
3344 arm*-wince-pe*)
3345 # the C++ libraries don't build on top of CE's C libraries
3346 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3347 ;;
3348 avr-*-*)
3349 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3350 ;;
91dfef96
JM
3351 bpf-*-*)
3352 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3353 ;;
fef939d6
JB
3354 ft32-*-*)
3355 noconfigdirs="$noconfigdirs target-libstdc++-v3"
3356 ;;
1873ec0c
L
3357 esac
3358fi
1e9e0e23 3359
91dfef96
JM
3360# Disable C++ on systems where it is known to not work.
3361# For testing, you can override this with --enable-languages=c++.
3362case ,${enable_languages}, in
3363 *,c++,*)
3364 ;;
3365 *)
3366 case "${target}" in
3367 bpf-*-*)
3368 unsupported_languages="$unsupported_languages c++"
3369 ;;
3370 esac
3371 ;;
3372esac
3373
3374# Disable Objc on systems where it is known to not work.
3375# For testing, you can override this with --enable-languages=objc.
3376case ,${enable_languages}, in
3377 *,objc,*)
3378 ;;
3379 *)
3380 case "${target}" in
3381 bpf-*-*)
3382 unsupported_languages="$unsupported_languages objc"
3383 ;;
3384 esac
3385 ;;
3386esac
3387
260eedb9
IB
3388# Disable D on systems where it is known to not work.
3389# For testing, you can override this with --enable-languages=d.
3390case ,${enable_languages}, in
3391 *,d,*)
3392 ;;
3393 *)
3394 case "${target}" in
91dfef96 3395 bpf-*-*)
260eedb9
IB
3396 unsupported_languages="$unsupported_languages d"
3397 ;;
3398 esac
3399 ;;
3400esac
3401
3402# Disable libphobos on unsupported systems.
3403# For testing, you can override this with --enable-libphobos.
3404if test -d ${srcdir}/libphobos; then
3405 if test x$enable_libphobos = x; then
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libphobos support" >&5
3407$as_echo_n "checking for libphobos support... " >&6; }
3408 if (srcdir=${srcdir}/libphobos; \
3409 . ${srcdir}/configure.tgt; \
7d31d331 3410 test "$LIBPHOBOS_SUPPORTED" != "yes")
260eedb9
IB
3411 then
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
3414 noconfigdirs="$noconfigdirs target-libphobos"
3415 else
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3417$as_echo "yes" >&6; }
3418 fi
3419 fi
3420fi
3421
1e9e0e23
JM
3422# Disable Fortran for some systems.
3423case "${target}" in
3424 mmix-*-*)
3425 # See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>.
3426 unsupported_languages="$unsupported_languages fortran"
3427 ;;
91dfef96
JM
3428 bpf-*-*)
3429 unsupported_languages="$unsupported_languages fortran"
3430 ;;
1e9e0e23
JM
3431esac
3432
012447ea
JJ
3433# Disable libffi for some systems.
3434case "${target}" in
3435 powerpc-*-darwin*)
3436 ;;
3437 i[3456789]86-*-darwin*)
3438 ;;
3439 x86_64-*-darwin[912]*)
3440 ;;
3441 *-*-darwin*)
3442 noconfigdirs="$noconfigdirs target-libffi"
3443 ;;
3444 *-*-netware*)
3445 noconfigdirs="$noconfigdirs target-libffi"
3446 ;;
3447 *-*-phoenix*)
3448 noconfigdirs="$noconfigdirs target-libffi"
3449 ;;
3450 *-*-rtems*)
3451 noconfigdirs="$noconfigdirs target-libffi"
3452 ;;
3453 *-*-tpf*)
3454 noconfigdirs="$noconfigdirs target-libffi"
3455 ;;
3456 *-*-uclinux*)
3457 noconfigdirs="$noconfigdirs target-libffi"
3458 ;;
3459 *-*-vxworks*)
3460 noconfigdirs="$noconfigdirs target-libffi"
3461 ;;
b20e7532
AT
3462 aarch64*-*-freebsd*)
3463 noconfigdirs="$noconfigdirs target-libffi"
3464 ;;
012447ea
JJ
3465 alpha*-*-*vms*)
3466 noconfigdirs="$noconfigdirs target-libffi"
3467 ;;
3468 arm*-*-freebsd*)
3469 noconfigdirs="$noconfigdirs target-libffi"
3470 ;;
3471 arm-wince-pe)
3472 noconfigdirs="$noconfigdirs target-libffi"
3473 ;;
3474 arm*-*-symbianelf*)
3475 noconfigdirs="$noconfigdirs target-libffi"
3476 ;;
91dfef96
JM
3477 bpf-*-*)
3478 noconfigdirs="$noconfigdirs target-libffi"
3479 ;;
012447ea
JJ
3480 cris-*-* | crisv32-*-*)
3481 case "${target}" in
3482 *-*-linux*)
3483 ;;
3484 *) # See PR46792 regarding target-libffi.
3485 noconfigdirs="$noconfigdirs target-libffi";;
3486 esac
3487 ;;
3488 hppa*64*-*-hpux*)
3489 noconfigdirs="$noconfigdirs target-libffi"
3490 ;;
012447ea
JJ
3491 ia64*-*-*vms*)
3492 noconfigdirs="$noconfigdirs target-libffi"
3493 ;;
3494 i[3456789]86-w64-mingw*)
3495 noconfigdirs="$noconfigdirs target-libffi"
3496 ;;
3497 i[3456789]86-*-mingw*)
3498 noconfigdirs="$noconfigdirs target-libffi"
3499 ;;
3500 x86_64-*-mingw*)
3501 noconfigdirs="$noconfigdirs target-libffi"
3502 ;;
3503 mmix-*-*)
3504 noconfigdirs="$noconfigdirs target-libffi"
3505 ;;
3506 powerpc-*-aix*)
012447ea
JJ
3507 ;;
3508 rs6000-*-aix*)
012447ea
JJ
3509 ;;
3510 ft32-*-*)
3511 noconfigdirs="$noconfigdirs target-libffi"
3512 ;;
3513 *-*-lynxos*)
3514 noconfigdirs="$noconfigdirs target-libffi"
3515 ;;
3516esac
3517
3518# Disable the go frontend on systems where it is known to not work. Please keep
3519# this in sync with contrib/config-list.mk.
3520case "${target}" in
91dfef96 3521*-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* )
012447ea
JJ
3522 unsupported_languages="$unsupported_languages go"
3523 ;;
3524esac
3525
f9d09df0
TT
3526# Only allow gdbserver on some systems.
3527if test -d ${srcdir}/gdbserver; then
3528 if test x$enable_gdbserver = x; then
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbserver support" >&5
3530$as_echo_n "checking for gdbserver support... " >&6; }
3531 if (srcdir=${srcdir}/gdbserver; \
3532 . ${srcdir}/configure.srv; \
3533 test -n "$UNSUPPORTED")
3534 then
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3536$as_echo "no" >&6; }
3537 noconfigdirs="$noconfigdirs gdbserver"
3538 else
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3540$as_echo "yes" >&6; }
3541 fi
3542 fi
3543fi
3544
cdbc9e92
ILT
3545# Disable libgo for some systems where it is known to not work.
3546# For testing, you can easily override this with --enable-libgo.
3547if test x$enable_libgo = x; then
3548 case "${target}" in
3549 *-*-darwin*)
3550 # PR 46986
3551 noconfigdirs="$noconfigdirs target-libgo"
3552 ;;
3553 *-*-cygwin* | *-*-mingw*)
3554 noconfigdirs="$noconfigdirs target-libgo"
3555 ;;
91dfef96
JM
3556 bpf-*-*)
3557 noconfigdirs="$noconfigdirs target-libgo"
3558 ;;
cdbc9e92
ILT
3559 esac
3560fi
3561
c03353e2
RIL
3562# Default libgloss CPU subdirectory.
3563libgloss_dir="$target_cpu"
6de9cd9a 3564
fbcf0dca
JM
3565case "${target}" in
3566 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
3567 libgloss_dir=wince
3568 ;;
4dddfc74
YZ
3569 aarch64*-*-* )
3570 libgloss_dir=aarch64
3571 ;;
fbcf0dca
JM
3572 arm*-*-*)
3573 libgloss_dir=arm
3574 ;;
3575 cris-*-* | crisv32-*-*)
3576 libgloss_dir=cris
3577 ;;
3578 hppa*-*-*)
3579 libgloss_dir=pa
3580 ;;
3581 i[3456789]86-*-*)
3582 libgloss_dir=i386
3583 ;;
c6c0594e 3584 loongarch*-*-*)
3585 libgloss_dir=loongarch
3586 ;;
fbcf0dca
JM
3587 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
3588 libgloss_dir=m68hc11
3589 ;;
3590 m68*-*-* | fido-*-*)
3591 libgloss_dir=m68k
3592 ;;
3593 mips*-*-*)
3594 libgloss_dir=mips
3595 ;;
3596 powerpc*-*-*)
3597 libgloss_dir=rs6000
3598 ;;
8d2af3a2
DD
3599 pru-*-*)
3600 libgloss_dir=pru
3601 ;;
fbcf0dca
JM
3602 sparc*-*-*)
3603 libgloss_dir=sparc
3604 ;;
3605esac
3606
6a789d5e 3607# Disable newlib and libgloss for various target OSes.
671aa708 3608case "${target}" in
6a789d5e
JM
3609 alpha*-dec-osf*)
3610 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3611 ;;
3612 i[3456789]86-*-linux*)
3613 # This section makes it possible to build newlib natively on linux.
3614 # If we are using a cross compiler then don't configure newlib.
3615 if test x${is_cross_compiler} != xno ; then
3616 noconfigdirs="$noconfigdirs target-newlib"
3617 fi
3618 noconfigdirs="$noconfigdirs target-libgloss"
3619 # If we are not using a cross compiler, do configure newlib.
3620 # Note however, that newlib will only be configured in this situation
3621 # if the --with-newlib option has been given, because otherwise
3622 # 'target-newlib' will appear in skipdirs.
3623 ;;
3624 i[3456789]86-*-rdos*)
3625 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3626 ;;
3627 sh*-*-pe|mips*-*-pe|arm-wince-pe)
3628 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3629 ;;
3630 sparc-*-sunos4*)
3631 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3632 ;;
91dfef96
JM
3633 bpf-*-*)
3634 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3635 ;;
6a789d5e
JM
3636 *-*-aix*)
3637 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3638 ;;
3639 *-*-beos*)
3640 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3641 ;;
671aa708 3642 *-*-chorusos)
0036370f 3643 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
671aa708 3644 ;;
6a789d5e
JM
3645 *-*-dragonfly*)
3646 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3647 ;;
3648 *-*-freebsd*)
3649 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3650 ;;
3651 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
3652 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3653 ;;
3654 *-*-lynxos*)
3655 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3656 ;;
3657 *-*-mingw*)
3658 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3659 ;;
3660 *-*-netbsd*)
3661 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3662 ;;
3663 *-*-netware*)
3664 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3665 ;;
3666 *-*-tpf*)
3667 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3668 ;;
3669 *-*-uclinux*)
3670 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3671 ;;
3672 *-*-vxworks*)
3673 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3674 ;;
3675esac
3676
3677case "${target}" in
3678 *-*-chorusos)
3679 ;;
3be96231
TG
3680 aarch64-*-darwin*)
3681 noconfigdirs="$noconfigdirs ld gas gdb gprof"
3682 noconfigdirs="$noconfigdirs sim target-rda"
3683 ;;
7431c1a1
AS
3684 amdgcn*-*-*)
3685 ;;
3be96231
TG
3686 arm-*-darwin*)
3687 noconfigdirs="$noconfigdirs ld gas gdb gprof"
3688 noconfigdirs="$noconfigdirs sim target-rda"
3689 ;;
75eeae1a 3690 powerpc-*-darwin*)
e1514c3f 3691 noconfigdirs="$noconfigdirs ld gas gdb gprof"
9c8f9ec2 3692 noconfigdirs="$noconfigdirs sim target-rda"
940cde4d 3693 ;;
354ebf88
RW
3694 i[3456789]86-*-darwin*)
3695 noconfigdirs="$noconfigdirs ld gprof"
3696 noconfigdirs="$noconfigdirs sim target-rda"
3697 ;;
3698 x86_64-*-darwin[912]*)
0db3a858
TG
3699 noconfigdirs="$noconfigdirs ld gas gprof"
3700 noconfigdirs="$noconfigdirs sim target-rda"
3701 ;;
42c1cd8a
AT
3702 *-*-darwin*)
3703 noconfigdirs="$noconfigdirs ld gas gdb gprof"
3704 noconfigdirs="$noconfigdirs sim target-rda"
42c1cd8a 3705 ;;
8c6d158a 3706 *-*-dragonfly*)
8c6d158a 3707 ;;
c3f84f61 3708 *-*-freebsd*)
88252529 3709 if test "x$with_gmp" = x \
c0d0a722 3710 && ! test -d ${srcdir}/gmp \
6de9cd9a
DN
3711 && test -f /usr/local/include/gmp.h; then
3712 with_gmp=/usr/local
3713 fi
6de9cd9a 3714 ;;
ef4e7569
US
3715 *-*-kaos*)
3716 # Remove unsupported stuff on all kaOS configurations.
ef4e7569
US
3717 noconfigdirs="$noconfigdirs target-libgloss"
3718 ;;
671aa708 3719 *-*-netbsd*)
671aa708 3720 ;;
61fec9ff 3721 *-*-netware*)
671aa708 3722 ;;
fd6487af
JS
3723 *-*-phoenix*)
3724 noconfigdirs="$noconfigdirs target-libgloss"
3725 ;;
671aa708 3726 *-*-rtems*)
2909494b 3727 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3728 ;;
a8ba31f2
EC
3729 # The tpf target doesn't support gdb yet.
3730 *-*-tpf*)
6a789d5e 3731 noconfigdirs="$noconfigdirs gdb tcl tk libgui itcl"
a8ba31f2 3732 ;;
5785c0ed 3733 *-*-uclinux*)
6a789d5e 3734 noconfigdirs="$noconfigdirs target-rda"
5785c0ed 3735 ;;
671aa708 3736 *-*-vxworks*)
671aa708
NN
3737 ;;
3738 alpha*-dec-osf*)
3739 # ld works, but does not support shared libraries.
671aa708 3740 # gas doesn't generate exception information.
6a789d5e 3741 noconfigdirs="$noconfigdirs gas ld"
671aa708
NN
3742 ;;
3743 alpha*-*-*vms*)
2909494b 3744 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
671aa708 3745 ;;
671aa708
NN
3746 alpha*-*-*)
3747 # newlib is not 64 bit ready
2909494b 3748 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
671aa708 3749 ;;
91dfef96
JM
3750 bpf-*-*)
3751 noconfigdirs="$noconfigdirs target-libobjc target-libbacktrace"
3752 ;;
671aa708 3753 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
b4f96efe 3754 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
671aa708 3755 ;;
2fd88f4f
AK
3756 arc*-*-*)
3757 noconfigdirs="$noconfigdirs sim"
3758 ;;
671aa708 3759 arm-*-pe*)
2909494b 3760 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3761 ;;
671aa708 3762 arm-*-riscix*)
0036370f 3763 noconfigdirs="$noconfigdirs ld target-libgloss"
671aa708 3764 ;;
b588ae30
GJL
3765 avr-*-*)
3766 if test x${with_avrlibc} != xno; then
3767 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
3768 fi
3769 ;;
671aa708 3770 c4x-*-* | tic4x-*-*)
0036370f 3771 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3772 ;;
0036370f
JM
3773 tic54x-*-*)
3774 noconfigdirs="$noconfigdirs target-libgloss gdb"
671aa708 3775 ;;
671aa708 3776 d10v-*-*)
0036370f 3777 noconfigdirs="$noconfigdirs target-libgloss"
671aa708
NN
3778 ;;
3779 d30v-*-*)
0036370f 3780 noconfigdirs="$noconfigdirs gdb"
671aa708
NN
3781 ;;
3782 fr30-*-elf*)
2909494b 3783 noconfigdirs="$noconfigdirs gdb"
671aa708 3784 ;;
a05c2c75
L
3785 ft32-*-*)
3786 noconfigdirs="$noconfigdirs target-rda gprof"
3787 ;;
55f2d967 3788 moxie-*-*)
a05c2c75 3789 noconfigdirs="$noconfigdirs"
55f2d967 3790 ;;
671aa708 3791 h8300*-*-*)
2909494b 3792 noconfigdirs="$noconfigdirs target-libgloss"
671aa708
NN
3793 ;;
3794 h8500-*-*)
0036370f 3795 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3796 ;;
a05c2c75
L
3797 hppa*64*-*-hpux*)
3798 noconfigdirs="$noconfigdirs gdb"
3799 ;;
4569f85e 3800 hppa*64*-*-linux*)
671aa708 3801 ;;
56f8587a 3802 hppa*-*-linux*)
3e732ba0 3803 ;;
671aa708 3804 hppa*-*-*elf* | \
671aa708
NN
3805 hppa*-*-lites* | \
3806 hppa*-*-openbsd* | \
3807 hppa*64*-*-*)
671aa708 3808 ;;
c03353e2 3809 hppa*-*-pro*)
c03353e2 3810 ;;
671aa708 3811 hppa*-*-*)
2909494b 3812 noconfigdirs="$noconfigdirs ld"
671aa708 3813 ;;
fb87ad5d 3814 i960-*-*)
0036370f 3815 noconfigdirs="$noconfigdirs gdb"
fb87ad5d 3816 ;;
671aa708
NN
3817 ia64*-*-elf*)
3818 # No gdb support yet.
1bcce263 3819 noconfigdirs="$noconfigdirs readline libgui itcl gdb"
671aa708
NN
3820 ;;
3821 ia64*-**-hpux*)
5a2931d1 3822 # No ld support yet.
a05c2c75 3823 noconfigdirs="$noconfigdirs gdb libgui itcl ld"
671aa708 3824 ;;
52535a64 3825 ia64*-*-*vms*)
091fe9ca
TG
3826 # No ld support yet.
3827 noconfigdirs="$noconfigdirs libgui itcl ld"
52535a64 3828 ;;
ef4c4300 3829 i[3456789]86-w64-mingw*)
ef4c4300
KT
3830 ;;
3831 i[3456789]86-*-mingw*)
b91f0a41 3832 target_configdirs="$target_configdirs target-winsup"
1c710c3c 3833 ;;
671aa708
NN
3834 *-*-cygwin*)
3835 target_configdirs="$target_configdirs target-libtermcap target-winsup"
1bcce263 3836 noconfigdirs="$noconfigdirs target-libgloss"
801e2270 3837 # always build newlib if winsup directory is present.
b91f0a41 3838 if test -d "$srcdir/winsup/cygwin"; then
801e2270 3839 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ee6a22df 3840 elif test -d "$srcdir/newlib"; then
b91f0a41 3841 echo "Warning: winsup/cygwin is missing so newlib can't be built."
801e2270 3842 fi
1c710c3c 3843 ;;
f2a0e225 3844 i[3456789]86-*-pe)
ebb9f8b0 3845 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3846 ;;
f2a0e225 3847 i[3456789]86-*-sco3.2v5*)
671aa708
NN
3848 # The linker does not yet know about weak symbols in COFF,
3849 # and is not configured to handle mixed ELF and COFF.
0036370f 3850 noconfigdirs="$noconfigdirs ld target-libgloss"
671aa708 3851 ;;
f2a0e225 3852 i[3456789]86-*-sco*)
0036370f 3853 noconfigdirs="$noconfigdirs gprof target-libgloss"
671aa708 3854 ;;
fbdd5d87 3855 i[3456789]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
671aa708
NN
3856 noconfigdirs="$noconfigdirs target-libgloss"
3857 ;;
f2a0e225 3858 i[3456789]86-*-sysv4*)
0036370f 3859 noconfigdirs="$noconfigdirs target-libgloss"
671aa708 3860 ;;
f2a0e225 3861 i[3456789]86-*-beos*)
6a789d5e 3862 noconfigdirs="$noconfigdirs gdb"
3aa83176 3863 ;;
d1f8db0c 3864 i[3456789]86-*-rdos*)
6a789d5e 3865 noconfigdirs="$noconfigdirs gdb"
c03353e2 3866 ;;
671aa708 3867 mmix-*-*)
2909494b 3868 noconfigdirs="$noconfigdirs gdb"
671aa708 3869 ;;
ab34901f 3870 mt-*-*)
79dd769c
AH
3871 noconfigdirs="$noconfigdirs sim"
3872 ;;
58b40a67
FT
3873 nfp-*-*)
3874 noconfigdirs="$noconfigdirs ld gas gdb gprof sim"
3875 noconfigdirs="$noconfigdirs $target_libraries"
3876 ;;
e6cbe965
SC
3877 pdp11-*-*)
3878 noconfigdirs="$noconfigdirs gdb gprof"
3879 ;;
671aa708
NN
3880 powerpc-*-aix*)
3881 # copied from rs6000-*-* entry
6a789d5e 3882 noconfigdirs="$noconfigdirs gprof"
671aa708 3883 ;;
4569f85e 3884 powerpc*-*-winnt* | powerpc*-*-pe*)
671aa708 3885 target_configdirs="$target_configdirs target-winsup"
0036370f 3886 noconfigdirs="$noconfigdirs gdb tcl tk target-libgloss itcl"
671aa708
NN
3887 # always build newlib.
3888 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
3889 ;;
3890 # This is temporary until we can link against shared libraries
3891 powerpcle-*-solaris*)
0036370f 3892 noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
671aa708
NN
3893 ;;
3894 powerpc-*-beos*)
6a789d5e 3895 noconfigdirs="$noconfigdirs gdb"
671aa708 3896 ;;
671aa708 3897 rs6000-*-lynxos*)
6a789d5e 3898 noconfigdirs="$noconfigdirs gprof"
671aa708
NN
3899 ;;
3900 rs6000-*-aix*)
6a789d5e 3901 noconfigdirs="$noconfigdirs gprof"
671aa708
NN
3902 ;;
3903 rs6000-*-*)
2909494b 3904 noconfigdirs="$noconfigdirs gprof"
671aa708
NN
3905 ;;
3906 m68k-apollo-*)
0036370f 3907 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss"
671aa708 3908 ;;
ca9fe997 3909 microblaze*)
2909494b 3910 noconfigdirs="$noconfigdirs gprof"
ca9fe997 3911 ;;
d896cc4d 3912 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
d9dced13
RS
3913 if test x$with_newlib = xyes; then
3914 noconfigdirs="$noconfigdirs gprof"
3915 fi
d9dced13 3916 ;;
671aa708 3917 mips*-*-irix5*)
0036370f 3918 noconfigdirs="$noconfigdirs gprof target-libgloss"
671aa708
NN
3919 ;;
3920 mips*-*-irix6*)
2909494b 3921 noconfigdirs="$noconfigdirs gprof target-libgloss"
671aa708 3922 ;;
671aa708 3923 mips*-*-bsd*)
bc98bcc4 3924 noconfigdirs="$noconfigdirs ld gas gprof target-libgloss"
671aa708 3925 ;;
671aa708 3926 mips*-*-linux*)
671aa708 3927 ;;
bc98bcc4
JBG
3928 mips*-*-ultrix* | mips*-*-osf* | mips*-*-ecoff* | mips*-*-pe* \
3929 | mips*-*-irix* | mips*-*-lnews* | mips*-*-riscos*)
3930 noconfigdirs="$noconfigdirs ld gas gprof"
3931 ;;
671aa708 3932 mips*-*-*)
2909494b 3933 noconfigdirs="$noconfigdirs gprof"
671aa708 3934 ;;
738f2522 3935 nvptx*-*-*)
738f2522
BS
3936 noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
3937 ;;
bc6d9014 3938 sh-*-*)
ea2002ba
CB
3939 case "${target}" in
3940 sh*-*-elf)
2909494b 3941 ;;
ea2002ba 3942 *)
2909494b 3943 noconfigdirs="$noconfigdirs target-libgloss" ;;
ea2002ba 3944 esac
671aa708 3945 ;;
671aa708 3946 sparc-*-sunos4*)
6a789d5e 3947 if test x${is_cross_compiler} = xno ; then
671aa708
NN
3948 use_gnu_ld=no
3949 fi
3950 ;;
b42f0d7e 3951 tic6x-*-*)
0d557ff8 3952 noconfigdirs="$noconfigdirs sim"
b42f0d7e 3953 ;;
671aa708 3954 v810-*-*)
0036370f 3955 noconfigdirs="$noconfigdirs bfd binutils gas gdb ld opcodes target-libgloss"
671aa708
NN
3956 ;;
3957 vax-*-*)
2909494b 3958 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
671aa708 3959 ;;
1fc1d82e
MR
3960 wasm32-*-*)
3961 noconfigdirs="$noconfigdirs ld"
3962 ;;
c6c0594e 3963 loongarch*-*-linux*)
3964 ;;
3965 loongarch*-*-*)
3966 noconfigdirs="$noconfigdirs gprof"
3967 ;;
671aa708 3968esac
79c06341 3969
671aa708
NN
3970# If we aren't building newlib, then don't build libgloss, since libgloss
3971# depends upon some newlib header files.
3972case "${noconfigdirs}" in
3973 *target-libgloss*) ;;
3974 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
3975esac
3976
671aa708 3977# Work in distributions that contain no compiler tools, like Autoconf.
671aa708
NN
3978host_makefile_frag=/dev/null
3979if test -d ${srcdir}/config ; then
3980case "${host}" in
f2a0e225 3981 i[3456789]86-*-msdosdjgpp*)
671aa708
NN
3982 host_makefile_frag="config/mh-djgpp"
3983 ;;
3984 *-cygwin*)
2a79c47f 3985
5213506e
RW
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5
3987$as_echo_n "checking to see if cat works as expected... " >&6; }
2a79c47f 3988echo a >cygwin-cat-check
e25a8c82 3989if test `cat cygwin-cat-check` = a ; then
2a79c47f 3990 rm cygwin-cat-check
5213506e
RW
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992$as_echo "yes" >&6; }
2a79c47f
NC
3993else
3994 rm cygwin-cat-check
5213506e
RW
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3996$as_echo "no" >&6; }
22e05272 3997 as_fn_error $? "The cat command does not ignore carriage return characters.
2a79c47f
NC
3998 Please either mount the build directory in binary mode or run the following
3999 commands before running any configure script:
4000set -o igncr
4001export SHELLOPTS
5213506e 4002 " "$LINENO" 5
2a79c47f
NC
4003fi
4004
671aa708
NN
4005 host_makefile_frag="config/mh-cygwin"
4006 ;;
c53a18d3 4007 *-mingw*)
1f5a6b84 4008 host_makefile_frag="config/mh-mingw"
95af8923 4009 ;;
cabb9d59 4010 alpha*-linux*)
13be44ed
UB
4011 host_makefile_frag="config/mh-alpha-linux"
4012 ;;
111eeb6e 4013 hppa*-hp-hpux*)
efd41714
PB
4014 host_makefile_frag="config/mh-pa"
4015 ;;
4016 hppa*-*)
4017 host_makefile_frag="config/mh-pa"
4018 ;;
54258e22 4019 i?86-*-darwin[89]* | i?86-*-darwin1[0-7]* | powerpc*-*-darwin*)
d8ed14ce 4020 host_makefile_frag="config/mh-darwin"
be8fff81 4021 ;;
d19bca38
PB
4022 powerpc-*-aix*)
4023 host_makefile_frag="config/mh-ppc-aix"
4024 ;;
4025 rs6000-*-aix*)
4026 host_makefile_frag="config/mh-ppc-aix"
4027 ;;
671aa708
NN
4028esac
4029fi
4030
55ffb5ed 4031if test "${build}" != "${host}" ; then
0999159b
PB
4032 AR_FOR_BUILD=${AR_FOR_BUILD-ar}
4033 AS_FOR_BUILD=${AS_FOR_BUILD-as}
55ffb5ed 4034 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
c841dc0a 4035 CPP_FOR_BUILD="${CPP_FOR_BUILD-\$(CC_FOR_BUILD) -E}"
0999159b 4036 CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
3b5e8ee4 4037 DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil}
0999159b 4038 GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
632e2a07 4039 GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
b4c522fa 4040 GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc}
0999159b
PB
4041 DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
4042 LD_FOR_BUILD=${LD_FOR_BUILD-ld}
4043 NM_FOR_BUILD=${NM_FOR_BUILD-nm}
4044 RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
4045 WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
4046 WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
4047else
4048 AR_FOR_BUILD="\$(AR)"
4049 AS_FOR_BUILD="\$(AS)"
fb0103e5 4050 CC_FOR_BUILD="\$(CC)"
0999159b 4051 CXX_FOR_BUILD="\$(CXX)"
3b5e8ee4 4052 DSYMUTIL_FOR_BUILD="\$(DSYMUTIL)"
0999159b 4053 GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
632e2a07 4054 GOC_FOR_BUILD="\$(GOC)"
b4c522fa 4055 GDC_FOR_BUILD="\$(GDC)"
0999159b
PB
4056 DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
4057 LD_FOR_BUILD="\$(LD)"
4058 NM_FOR_BUILD="\$(NM)"
4059 RANLIB_FOR_BUILD="\$(RANLIB)"
4060 WINDRES_FOR_BUILD="\$(WINDRES)"
4061 WINDMC_FOR_BUILD="\$(WINDMC)"
c3a86da9
DJ
4062fi
4063
4064ac_ext=c
1c710c3c
DJ
4065ac_cpp='$CPP $CPPFLAGS'
4066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4068ac_compiler_gnu=$ac_cv_c_compiler_gnu
4069if test -n "$ac_tool_prefix"; then
4070 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4071set dummy ${ac_tool_prefix}gcc; ac_word=$2
5213506e
RW
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4073$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4074if ${ac_cv_prog_CC+:} false; then :
5213506e 4075 $as_echo_n "(cached) " >&6
1c710c3c
DJ
4076else
4077 if test -n "$CC"; then
4078 ac_cv_prog_CC="$CC" # Let the user override the test.
4079else
4080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081for as_dir in $PATH
4082do
4083 IFS=$as_save_IFS
4084 test -z "$as_dir" && as_dir=.
5213506e 4085 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 4087 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5213506e 4088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4089 break 2
4090 fi
4091done
5213506e
RW
4092 done
4093IFS=$as_save_IFS
1c710c3c
DJ
4094
4095fi
4096fi
4097CC=$ac_cv_prog_CC
4098if test -n "$CC"; then
5213506e
RW
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4100$as_echo "$CC" >&6; }
1c710c3c 4101else
5213506e
RW
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
1c710c3c
DJ
4104fi
4105
5213506e 4106
1c710c3c
DJ
4107fi
4108if test -z "$ac_cv_prog_CC"; then
4109 ac_ct_CC=$CC
fb0103e5
RG
4110 # Extract the first word of "gcc", so it can be a program name with args.
4111set dummy gcc; ac_word=$2
5213506e
RW
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4113$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4114if ${ac_cv_prog_ac_ct_CC+:} false; then :
5213506e 4115 $as_echo_n "(cached) " >&6
1c710c3c
DJ
4116else
4117 if test -n "$ac_ct_CC"; then
4118 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4119else
4120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in $PATH
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
5213506e 4125 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 4127 ac_cv_prog_ac_ct_CC="gcc"
5213506e 4128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4129 break 2
4130 fi
4131done
5213506e
RW
4132 done
4133IFS=$as_save_IFS
1c710c3c
DJ
4134
4135fi
4136fi
4137ac_ct_CC=$ac_cv_prog_ac_ct_CC
4138if test -n "$ac_ct_CC"; then
5213506e
RW
4139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4140$as_echo "$ac_ct_CC" >&6; }
1c710c3c 4141else
5213506e
RW
4142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143$as_echo "no" >&6; }
1c710c3c
DJ
4144fi
4145
5213506e
RW
4146 if test "x$ac_ct_CC" = x; then
4147 CC=""
4148 else
4149 case $cross_compiling:$ac_tool_warned in
4150yes:)
4151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4153ac_tool_warned=yes ;;
4154esac
4155 CC=$ac_ct_CC
4156 fi
1c710c3c
DJ
4157else
4158 CC="$ac_cv_prog_CC"
4159fi
4160
4161if test -z "$CC"; then
5213506e
RW
4162 if test -n "$ac_tool_prefix"; then
4163 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1c710c3c 4164set dummy ${ac_tool_prefix}cc; ac_word=$2
5213506e
RW
4165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4166$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4167if ${ac_cv_prog_CC+:} false; then :
5213506e 4168 $as_echo_n "(cached) " >&6
55ffb5ed
NN
4169else
4170 if test -n "$CC"; then
4171 ac_cv_prog_CC="$CC" # Let the user override the test.
4172else
1c710c3c
DJ
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
5213506e 4178 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 4180 ac_cv_prog_CC="${ac_tool_prefix}cc"
5213506e 4181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4182 break 2
4183 fi
4184done
5213506e
RW
4185 done
4186IFS=$as_save_IFS
1c710c3c 4187
0b0dc272 4188fi
0b0dc272 4189fi
1c710c3c 4190CC=$ac_cv_prog_CC
af71363e 4191if test -n "$CC"; then
5213506e
RW
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4193$as_echo "$CC" >&6; }
2aeb72e9 4194else
5213506e
RW
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4196$as_echo "no" >&6; }
2aeb72e9
DD
4197fi
4198
2aeb72e9 4199
5213506e 4200 fi
1c710c3c 4201fi
55ffb5ed
NN
4202if test -z "$CC"; then
4203 # Extract the first word of "cc", so it can be a program name with args.
4204set dummy cc; ac_word=$2
5213506e
RW
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4206$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4207if ${ac_cv_prog_CC+:} false; then :
5213506e 4208 $as_echo_n "(cached) " >&6
55ffb5ed
NN
4209else
4210 if test -n "$CC"; then
4211 ac_cv_prog_CC="$CC" # Let the user override the test.
4212else
0b0dc272 4213 ac_prog_rejected=no
1c710c3c
DJ
4214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217 IFS=$as_save_IFS
4218 test -z "$as_dir" && as_dir=.
5213506e 4219 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4220 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c
DJ
4221 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4222 ac_prog_rejected=yes
4223 continue
4224 fi
4225 ac_cv_prog_CC="cc"
5213506e 4226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4227 break 2
4228 fi
4229done
5213506e
RW
4230 done
4231IFS=$as_save_IFS
1c710c3c 4232
55ffb5ed
NN
4233if test $ac_prog_rejected = yes; then
4234 # We found a bogon in the path, so make sure we never use it.
4235 set dummy $ac_cv_prog_CC
4236 shift
1c710c3c 4237 if test $# != 0; then
55ffb5ed
NN
4238 # We chose a different compiler from the bogus one.
4239 # However, it has the same basename, so the bogon will be chosen
4240 # first if we set CC to just the basename; use the full file name.
4241 shift
1c710c3c 4242 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
55ffb5ed
NN
4243 fi
4244fi
4245fi
4246fi
1c710c3c 4247CC=$ac_cv_prog_CC
55ffb5ed 4248if test -n "$CC"; then
5213506e
RW
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4250$as_echo "$CC" >&6; }
55ffb5ed 4251else
5213506e
RW
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
55ffb5ed
NN
4254fi
4255
5213506e 4256
1c710c3c
DJ
4257fi
4258if test -z "$CC"; then
4259 if test -n "$ac_tool_prefix"; then
5213506e 4260 for ac_prog in cl.exe
1c710c3c
DJ
4261 do
4262 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4263set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4265$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4266if ${ac_cv_prog_CC+:} false; then :
5213506e 4267 $as_echo_n "(cached) " >&6
55ffb5ed
NN
4268else
4269 if test -n "$CC"; then
4270 ac_cv_prog_CC="$CC" # Let the user override the test.
4271else
1c710c3c
DJ
4272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273for as_dir in $PATH
4274do
4275 IFS=$as_save_IFS
4276 test -z "$as_dir" && as_dir=.
5213506e 4277 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 4279 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5213506e 4280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4281 break 2
4282 fi
4283done
5213506e
RW
4284 done
4285IFS=$as_save_IFS
1c710c3c 4286
55ffb5ed
NN
4287fi
4288fi
1c710c3c 4289CC=$ac_cv_prog_CC
55ffb5ed 4290if test -n "$CC"; then
5213506e
RW
4291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4292$as_echo "$CC" >&6; }
a4b9e93e 4293else
5213506e
RW
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4295$as_echo "no" >&6; }
fb0103e5 4296fi
af71363e 4297
5213506e 4298
1c710c3c
DJ
4299 test -n "$CC" && break
4300 done
af71363e 4301fi
1c710c3c
DJ
4302if test -z "$CC"; then
4303 ac_ct_CC=$CC
5213506e 4304 for ac_prog in cl.exe
1c710c3c
DJ
4305do
4306 # Extract the first word of "$ac_prog", so it can be a program name with args.
4307set dummy $ac_prog; ac_word=$2
5213506e
RW
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4309$as_echo_n "checking for $ac_word... " >&6; }
22e05272 4310if ${ac_cv_prog_ac_ct_CC+:} false; then :
5213506e 4311 $as_echo_n "(cached) " >&6
0b0dc272 4312else
1c710c3c
DJ
4313 if test -n "$ac_ct_CC"; then
4314 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
0b0dc272 4315else
1c710c3c
DJ
4316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319 IFS=$as_save_IFS
4320 test -z "$as_dir" && as_dir=.
5213506e 4321 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 4322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 4323 ac_cv_prog_ac_ct_CC="$ac_prog"
5213506e 4324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
4325 break 2
4326 fi
4327done
5213506e
RW
4328 done
4329IFS=$as_save_IFS
1c710c3c 4330
af71363e
AS
4331fi
4332fi
1c710c3c
DJ
4333ac_ct_CC=$ac_cv_prog_ac_ct_CC
4334if test -n "$ac_ct_CC"; then
5213506e
RW
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4336$as_echo "$ac_ct_CC" >&6; }
fb0103e5 4337else
5213506e
RW
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339$as_echo "no" >&6; }
af71363e 4340fi
0b0dc272 4341
5213506e 4342
1c710c3c
DJ
4343 test -n "$ac_ct_CC" && break
4344done
4345
5213506e
RW
4346 if test "x$ac_ct_CC" = x; then
4347 CC=""
4348 else
4349 case $cross_compiling:$ac_tool_warned in
4350yes:)
4351{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4352$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4353ac_tool_warned=yes ;;
4354esac
4355 CC=$ac_ct_CC
4356 fi
1c710c3c
DJ
4357fi
4358
4359fi
4360
4361
5213506e
RW
4362test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4363$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22e05272
JM
4364as_fn_error $? "no acceptable C compiler found in \$PATH
4365See \`config.log' for more details" "$LINENO" 5; }
1c710c3c
DJ
4366
4367# Provide some information about the compiler.
5213506e
RW
4368$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4369set X $ac_compile
4370ac_compiler=$2
4371for ac_option in --version -v -V -qversion; do
4372 { { ac_try="$ac_compiler $ac_option >&5"
4373case "(($ac_try" in
4374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4375 *) ac_try_echo=$ac_try;;
4376esac
4377eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4378$as_echo "$ac_try_echo"; } >&5
4379 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
1c710c3c 4380 ac_status=$?
5213506e
RW
4381 if test -s conftest.err; then
4382 sed '10a\
4383... rest of stderr output deleted ...
4384 10q' conftest.err >conftest.er1
4385 cat conftest.er1 >&5
5213506e 4386 fi
22e05272 4387 rm -f conftest.er1 conftest.err
5213506e
RW
4388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4389 test $ac_status = 0; }
4390done
1c710c3c 4391
5213506e 4392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c
DJ
4393/* end confdefs.h. */
4394
4395int
4396main ()
4397{
4398
4399 ;
4400 return 0;
4401}
4402_ACEOF
4403ac_clean_files_save=$ac_clean_files
22e05272 4404ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
1c710c3c
DJ
4405# Try to create an executable without -o first, disregard a.out.
4406# It will help us diagnose broken compilers, and finding out an intuition
4407# of exeext.
22e05272
JM
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4409$as_echo_n "checking whether the C compiler works... " >&6; }
5213506e
RW
4410ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4411
4412# The possible output files:
4413ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4414
4415ac_rmfiles=
4416for ac_file in $ac_files
4417do
4418 case $ac_file in
4419 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4420 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4421 esac
4422done
4423rm -f $ac_rmfiles
4424
4425if { { ac_try="$ac_link_default"
4426case "(($ac_try" in
4427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4428 *) ac_try_echo=$ac_try;;
4429esac
4430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4431$as_echo "$ac_try_echo"; } >&5
4432 (eval "$ac_link_default") 2>&5
1c710c3c 4433 ac_status=$?
5213506e
RW
4434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4435 test $ac_status = 0; }; then :
4436 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4437# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4438# in a Makefile. We should not override ac_cv_exeext if it was cached,
4439# so that the user can short-circuit this test for compilers unknown to
4440# Autoconf.
4441for ac_file in $ac_files ''
1c710c3c
DJ
4442do
4443 test -f "$ac_file" || continue
4444 case $ac_file in
5213506e 4445 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
1c710c3c
DJ
4446 ;;
4447 [ab].out )
4448 # We found the default executable, but exeext='' is most
4449 # certainly right.
4450 break;;
4451 *.* )
5213506e
RW
4452 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4453 then :; else
4454 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4455 fi
4456 # We set ac_cv_exeext here because the later test for it is not
4457 # safe: cross compilers may not add the suffix if given an `-o'
4458 # argument, so we may need to know it at that point already.
4459 # Even if this section looks crufty: it has the advantage of
4460 # actually working.
1c710c3c
DJ
4461 break;;
4462 * )
4463 break;;
4464 esac
4465done
5213506e
RW
4466test "$ac_cv_exeext" = no && ac_cv_exeext=
4467
1c710c3c 4468else
5213506e
RW
4469 ac_file=''
4470fi
5213506e 4471if test -z "$ac_file"; then :
22e05272
JM
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473$as_echo "no" >&6; }
4474$as_echo "$as_me: failed program was:" >&5
1c710c3c
DJ
4475sed 's/^/| /' conftest.$ac_ext >&5
4476
5213506e
RW
4477{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22e05272
JM
4479as_fn_error 77 "C compiler cannot create executables
4480See \`config.log' for more details" "$LINENO" 5; }
4481else
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4483$as_echo "yes" >&6; }
1c710c3c 4484fi
22e05272
JM
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4486$as_echo_n "checking for C compiler default output file name... " >&6; }
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4488$as_echo "$ac_file" >&6; }
1c710c3c 4489ac_exeext=$ac_cv_exeext
1c710c3c 4490
22e05272 4491rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
1c710c3c 4492ac_clean_files=$ac_clean_files_save
5213506e
RW
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4494$as_echo_n "checking for suffix of executables... " >&6; }
4495if { { ac_try="$ac_link"
4496case "(($ac_try" in
4497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4498 *) ac_try_echo=$ac_try;;
4499esac
4500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4501$as_echo "$ac_try_echo"; } >&5
4502 (eval "$ac_link") 2>&5
1c710c3c 4503 ac_status=$?
5213506e
RW
4504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4505 test $ac_status = 0; }; then :
1c710c3c
DJ
4506 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4507# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4508# work properly (i.e., refer to `conftest.exe'), while it won't with
4509# `rm'.
4510for ac_file in conftest.exe conftest conftest.*; do
4511 test -f "$ac_file" || continue
4512 case $ac_file in
5213506e 4513 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
1c710c3c 4514 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1c710c3c
DJ
4515 break;;
4516 * ) break;;
4517 esac
4518done
af71363e 4519else
5213506e
RW
4520 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4521$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22e05272
JM
4522as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4523See \`config.log' for more details" "$LINENO" 5; }
1c710c3c 4524fi
22e05272 4525rm -f conftest conftest$ac_cv_exeext
5213506e
RW
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4527$as_echo "$ac_cv_exeext" >&6; }
1c710c3c
DJ
4528
4529rm -f conftest.$ac_ext
4530EXEEXT=$ac_cv_exeext
4531ac_exeext=$EXEEXT
22e05272
JM
4532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533/* end confdefs.h. */
4534#include <stdio.h>
4535int
4536main ()
4537{
4538FILE *f = fopen ("conftest.out", "w");
4539 return ferror (f) || fclose (f) != 0;
4540
4541 ;
4542 return 0;
4543}
4544_ACEOF
4545ac_clean_files="$ac_clean_files conftest.out"
4546# Check that the compiler produces executables we can run. If not, either
4547# the compiler is broken, or we cross compile.
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4549$as_echo_n "checking whether we are cross compiling... " >&6; }
4550if test "$cross_compiling" != yes; then
4551 { { ac_try="$ac_link"
4552case "(($ac_try" in
4553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4554 *) ac_try_echo=$ac_try;;
4555esac
4556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4557$as_echo "$ac_try_echo"; } >&5
4558 (eval "$ac_link") 2>&5
4559 ac_status=$?
4560 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4561 test $ac_status = 0; }
4562 if { ac_try='./conftest$ac_cv_exeext'
4563 { { case "(($ac_try" in
4564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4565 *) ac_try_echo=$ac_try;;
4566esac
4567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4568$as_echo "$ac_try_echo"; } >&5
4569 (eval "$ac_try") 2>&5
4570 ac_status=$?
4571 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4572 test $ac_status = 0; }; }; then
4573 cross_compiling=no
4574 else
4575 if test "$cross_compiling" = maybe; then
4576 cross_compiling=yes
4577 else
4578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4580as_fn_error $? "cannot run C compiled programs.
4581If you meant to cross compile, use \`--host'.
4582See \`config.log' for more details" "$LINENO" 5; }
4583 fi
4584 fi
4585fi
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4587$as_echo "$cross_compiling" >&6; }
4588
4589rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4590ac_clean_files=$ac_clean_files_save
5213506e
RW
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4592$as_echo_n "checking for suffix of object files... " >&6; }
22e05272 4593if ${ac_cv_objext+:} false; then :
5213506e 4594 $as_echo_n "(cached) " >&6
1c710c3c 4595else
5213506e 4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c
DJ
4597/* end confdefs.h. */
4598
4599int
4600main ()
4601{
4602
4603 ;
4604 return 0;
4605}
4606_ACEOF
4607rm -f conftest.o conftest.obj
5213506e
RW
4608if { { ac_try="$ac_compile"
4609case "(($ac_try" in
4610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4611 *) ac_try_echo=$ac_try;;
4612esac
4613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4614$as_echo "$ac_try_echo"; } >&5
4615 (eval "$ac_compile") 2>&5
1c710c3c 4616 ac_status=$?
5213506e
RW
4617 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4618 test $ac_status = 0; }; then :
4619 for ac_file in conftest.o conftest.obj conftest.*; do
4620 test -f "$ac_file" || continue;
1c710c3c 4621 case $ac_file in
5213506e 4622 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
1c710c3c
DJ
4623 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4624 break;;
4625 esac
4626done
4627else
5213506e 4628 $as_echo "$as_me: failed program was:" >&5
1c710c3c
DJ
4629sed 's/^/| /' conftest.$ac_ext >&5
4630
5213506e
RW
4631{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22e05272
JM
4633as_fn_error $? "cannot compute suffix of object files: cannot compile
4634See \`config.log' for more details" "$LINENO" 5; }
1c710c3c 4635fi
1c710c3c
DJ
4636rm -f conftest.$ac_cv_objext conftest.$ac_ext
4637fi
5213506e
RW
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4639$as_echo "$ac_cv_objext" >&6; }
1c710c3c
DJ
4640OBJEXT=$ac_cv_objext
4641ac_objext=$OBJEXT
5213506e
RW
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4643$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
22e05272 4644if ${ac_cv_c_compiler_gnu+:} false; then :
5213506e 4645 $as_echo_n "(cached) " >&6
1c710c3c 4646else
5213506e 4647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c
DJ
4648/* end confdefs.h. */
4649
4650int
4651main ()
4652{
4653#ifndef __GNUC__
4654 choke me
4655#endif
4656
4657 ;
4658 return 0;
4659}
4660_ACEOF
5213506e 4661if ac_fn_c_try_compile "$LINENO"; then :
1c710c3c
DJ
4662 ac_compiler_gnu=yes
4663else
5213506e 4664 ac_compiler_gnu=no
1c710c3c 4665fi
5213506e 4666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1c710c3c
DJ
4667ac_cv_c_compiler_gnu=$ac_compiler_gnu
4668
4669fi
5213506e
RW
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4671$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4672if test $ac_compiler_gnu = yes; then
4673 GCC=yes
4674else
4675 GCC=
4676fi
1c710c3c
DJ
4677ac_test_CFLAGS=${CFLAGS+set}
4678ac_save_CFLAGS=$CFLAGS
5213506e
RW
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4680$as_echo_n "checking whether $CC accepts -g... " >&6; }
22e05272 4681if ${ac_cv_prog_cc_g+:} false; then :
5213506e
RW
4682 $as_echo_n "(cached) " >&6
4683else
4684 ac_save_c_werror_flag=$ac_c_werror_flag
4685 ac_c_werror_flag=yes
4686 ac_cv_prog_cc_g=no
4687 CFLAGS="-g"
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c
DJ
4689/* end confdefs.h. */
4690
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
5213506e 4699if ac_fn_c_try_compile "$LINENO"; then :
55ffb5ed
NN
4700 ac_cv_prog_cc_g=yes
4701else
5213506e
RW
4702 CFLAGS=""
4703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4704/* end confdefs.h. */
4705
4706int
4707main ()
4708{
4709
4710 ;
4711 return 0;
4712}
4713_ACEOF
4714if ac_fn_c_try_compile "$LINENO"; then :
4715
4716else
4717 ac_c_werror_flag=$ac_save_c_werror_flag
4718 CFLAGS="-g"
4719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4720/* end confdefs.h. */
af71363e 4721
5213506e
RW
4722int
4723main ()
4724{
4725
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730if ac_fn_c_try_compile "$LINENO"; then :
4731 ac_cv_prog_cc_g=yes
4732fi
4733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0b0dc272 4734fi
5213506e 4735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1c710c3c 4736fi
5213506e
RW
4737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4738 ac_c_werror_flag=$ac_save_c_werror_flag
4739fi
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4741$as_echo "$ac_cv_prog_cc_g" >&6; }
55ffb5ed 4742if test "$ac_test_CFLAGS" = set; then
1c710c3c 4743 CFLAGS=$ac_save_CFLAGS
55ffb5ed
NN
4744elif test $ac_cv_prog_cc_g = yes; then
4745 if test "$GCC" = yes; then
4746 CFLAGS="-g -O2"
4747 else
4748 CFLAGS="-g"
4749 fi
4750else
4751 if test "$GCC" = yes; then
4752 CFLAGS="-O2"
4753 else
4754 CFLAGS=
4755 fi
4756fi
5213506e
RW
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4758$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
22e05272 4759if ${ac_cv_prog_cc_c89+:} false; then :
5213506e 4760 $as_echo_n "(cached) " >&6
1c710c3c 4761else
5213506e 4762 ac_cv_prog_cc_c89=no
1c710c3c 4763ac_save_CC=$CC
5213506e 4764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c
DJ
4765/* end confdefs.h. */
4766#include <stdarg.h>
4767#include <stdio.h>
22e05272 4768struct stat;
1c710c3c
DJ
4769/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4770struct buf { int x; };
4771FILE * (*rcsopen) (struct buf *, struct stat *, int);
4772static char *e (p, i)
4773 char **p;
4774 int i;
4775{
4776 return p[i];
4777}
4778static char *f (char * (*g) (char **, int), char **p, ...)
4779{
4780 char *s;
4781 va_list v;
4782 va_start (v,p);
4783 s = g (p, va_arg (v,int));
4784 va_end (v);
4785 return s;
4786}
4787
4788/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4789 function prototypes and stuff, but not '\xHH' hex character constants.
4790 These don't provoke an error unfortunately, instead are silently treated
5213506e 4791 as 'x'. The following induces an error, until -std is added to get
1c710c3c
DJ
4792 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4793 array size at least. It's necessary to write '\x00'==0 to get something
5213506e 4794 that's true only with -std. */
1c710c3c
DJ
4795int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4796
5213506e
RW
4797/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4798 inside strings and character constants. */
4799#define FOO(x) 'x'
4800int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4801
1c710c3c
DJ
4802int test (int i, double x);
4803struct s1 {int (*f) (int a);};
4804struct s2 {int (*f) (double a);};
4805int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4806int argc;
4807char **argv;
4808int
4809main ()
4810{
4811return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4812 ;
4813 return 0;
4814}
4815_ACEOF
5213506e
RW
4816for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4817 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1c710c3c
DJ
4818do
4819 CC="$ac_save_CC $ac_arg"
5213506e
RW
4820 if ac_fn_c_try_compile "$LINENO"; then :
4821 ac_cv_prog_cc_c89=$ac_arg
1c710c3c 4822fi
5213506e
RW
4823rm -f core conftest.err conftest.$ac_objext
4824 test "x$ac_cv_prog_cc_c89" != "xno" && break
1c710c3c 4825done
5213506e 4826rm -f conftest.$ac_ext
1c710c3c
DJ
4827CC=$ac_save_CC
4828
4829fi
5213506e
RW
4830# AC_CACHE_VAL
4831case "x$ac_cv_prog_cc_c89" in
4832 x)
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4834$as_echo "none needed" >&6; } ;;
4835 xno)
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4837$as_echo "unsupported" >&6; } ;;
1c710c3c 4838 *)
5213506e
RW
4839 CC="$CC $ac_cv_prog_cc_c89"
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4841$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
1c710c3c 4842esac
5213506e 4843if test "x$ac_cv_prog_cc_c89" != xno; then :
1c710c3c 4844
2aeb72e9
DD
4845fi
4846
2aeb72e9
DD
4847ac_ext=c
4848ac_cpp='$CPP $CPPFLAGS'
4849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4851ac_compiler_gnu=$ac_cv_c_compiler_gnu
4852
91743432
NC
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4854$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4855if ${ac_cv_prog_cc_c99+:} false; then :
4856 $as_echo_n "(cached) " >&6
4857else
4858 ac_cv_prog_cc_c99=no
4859ac_save_CC=$CC
4860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861/* end confdefs.h. */
4862#include <stdarg.h>
4863#include <stdbool.h>
4864#include <stdlib.h>
4865#include <wchar.h>
4866#include <stdio.h>
4867
4868// Check varargs macros. These examples are taken from C99 6.10.3.5.
4869#define debug(...) fprintf (stderr, __VA_ARGS__)
4870#define showlist(...) puts (#__VA_ARGS__)
4871#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4872static void
4873test_varargs_macros (void)
4874{
4875 int x = 1234;
4876 int y = 5678;
4877 debug ("Flag");
4878 debug ("X = %d\n", x);
4879 showlist (The first, second, and third items.);
4880 report (x>y, "x is %d but y is %d", x, y);
4881}
4882
4883// Check long long types.
4884#define BIG64 18446744073709551615ull
4885#define BIG32 4294967295ul
4886#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4887#if !BIG_OK
4888 your preprocessor is broken;
4889#endif
4890#if BIG_OK
4891#else
4892 your preprocessor is broken;
4893#endif
4894static long long int bignum = -9223372036854775807LL;
4895static unsigned long long int ubignum = BIG64;
4896
4897struct incomplete_array
4898{
4899 int datasize;
4900 double data[];
4901};
4902
4903struct named_init {
4904 int number;
4905 const wchar_t *name;
4906 double average;
4907};
4908
4909typedef const char *ccp;
4910
4911static inline int
4912test_restrict (ccp restrict text)
4913{
4914 // See if C++-style comments work.
4915 // Iterate through items via the restricted pointer.
4916 // Also check for declarations in for loops.
4917 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4918 continue;
4919 return 0;
4920}
4921
4922// Check varargs and va_copy.
4923static void
4924test_varargs (const char *format, ...)
4925{
4926 va_list args;
4927 va_start (args, format);
4928 va_list args_copy;
4929 va_copy (args_copy, args);
4930
4931 const char *str;
4932 int number;
4933 float fnumber;
4934
4935 while (*format)
4936 {
4937 switch (*format++)
4938 {
4939 case 's': // string
4940 str = va_arg (args_copy, const char *);
4941 break;
4942 case 'd': // int
4943 number = va_arg (args_copy, int);
4944 break;
4945 case 'f': // float
4946 fnumber = va_arg (args_copy, double);
4947 break;
4948 default:
4949 break;
4950 }
4951 }
4952 va_end (args_copy);
4953 va_end (args);
4954}
4955
4956int
4957main ()
4958{
4959
4960 // Check bool.
4961 _Bool success = false;
4962
4963 // Check restrict.
4964 if (test_restrict ("String literal") == 0)
4965 success = true;
4966 char *restrict newvar = "Another string";
4967
4968 // Check varargs.
4969 test_varargs ("s, d' f .", "string", 65, 34.234);
4970 test_varargs_macros ();
4971
4972 // Check flexible array members.
4973 struct incomplete_array *ia =
4974 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4975 ia->datasize = 10;
4976 for (int i = 0; i < ia->datasize; ++i)
4977 ia->data[i] = i * 1.234;
4978
4979 // Check named initializers.
4980 struct named_init ni = {
4981 .number = 34,
4982 .name = L"Test wide string",
4983 .average = 543.34343,
4984 };
4985
4986 ni.number = 58;
4987
4988 int dynamic_array[ni.number];
4989 dynamic_array[ni.number - 1] = 543;
4990
4991 // work around unused variable warnings
4992 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4993 || dynamic_array[ni.number - 1] != 543);
4994
4995 ;
4996 return 0;
4997}
4998_ACEOF
4999for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5000do
5001 CC="$ac_save_CC $ac_arg"
5002 if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_prog_cc_c99=$ac_arg
5004fi
5005rm -f core conftest.err conftest.$ac_objext
5006 test "x$ac_cv_prog_cc_c99" != "xno" && break
5007done
5008rm -f conftest.$ac_ext
5009CC=$ac_save_CC
5010
5011fi
5012# AC_CACHE_VAL
5013case "x$ac_cv_prog_cc_c99" in
5014 x)
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5016$as_echo "none needed" >&6; } ;;
5017 xno)
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5019$as_echo "unsupported" >&6; } ;;
5020 *)
5021 CC="$CC $ac_cv_prog_cc_c99"
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5023$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5024esac
5025if test "x$ac_cv_prog_cc_c99" != xno; then :
5026
5027fi
5028
5029
5213506e 5030ac_ext=cpp
2aeb72e9
DD
5031ac_cpp='$CXXCPP $CPPFLAGS'
5032ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5033ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5034ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5213506e
RW
5035if test -z "$CXX"; then
5036 if test -n "$CCC"; then
5037 CXX=$CCC
5038 else
5039 if test -n "$ac_tool_prefix"; then
5040 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2aeb72e9
DD
5041 do
5042 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5046if ${ac_cv_prog_CXX+:} false; then :
5213506e 5047 $as_echo_n "(cached) " >&6
2aeb72e9
DD
5048else
5049 if test -n "$CXX"; then
5050 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5051else
5052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in $PATH
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5213506e 5057 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2aeb72e9 5059 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5213506e 5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2aeb72e9
DD
5061 break 2
5062 fi
5063done
5213506e
RW
5064 done
5065IFS=$as_save_IFS
55ffb5ed 5066
c3a86da9
DJ
5067fi
5068fi
5069CXX=$ac_cv_prog_CXX
5070if test -n "$CXX"; then
5213506e
RW
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5072$as_echo "$CXX" >&6; }
c3a86da9 5073else
5213506e
RW
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075$as_echo "no" >&6; }
c3a86da9
DJ
5076fi
5077
5213506e 5078
c3a86da9
DJ
5079 test -n "$CXX" && break
5080 done
5081fi
5082if test -z "$CXX"; then
5083 ac_ct_CXX=$CXX
5213506e 5084 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
c3a86da9
DJ
5085do
5086 # Extract the first word of "$ac_prog", so it can be a program name with args.
5087set dummy $ac_prog; ac_word=$2
5213506e
RW
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5090if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5213506e 5091 $as_echo_n "(cached) " >&6
c3a86da9
DJ
5092else
5093 if test -n "$ac_ct_CXX"; then
5094 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5095else
5096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099 IFS=$as_save_IFS
5100 test -z "$as_dir" && as_dir=.
5213506e 5101 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c3a86da9 5103 ac_cv_prog_ac_ct_CXX="$ac_prog"
5213506e 5104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c3a86da9
DJ
5105 break 2
5106 fi
5107done
5213506e
RW
5108 done
5109IFS=$as_save_IFS
c3a86da9
DJ
5110
5111fi
5112fi
5113ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5114if test -n "$ac_ct_CXX"; then
5213506e
RW
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5116$as_echo "$ac_ct_CXX" >&6; }
c3a86da9 5117else
5213506e
RW
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
c3a86da9
DJ
5120fi
5121
5213506e 5122
c3a86da9
DJ
5123 test -n "$ac_ct_CXX" && break
5124done
c3a86da9 5125
5213506e
RW
5126 if test "x$ac_ct_CXX" = x; then
5127 CXX="g++"
5128 else
5129 case $cross_compiling:$ac_tool_warned in
5130yes:)
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5133ac_tool_warned=yes ;;
5134esac
5135 CXX=$ac_ct_CXX
5136 fi
c3a86da9
DJ
5137fi
5138
5213506e
RW
5139 fi
5140fi
c3a86da9 5141# Provide some information about the compiler.
5213506e
RW
5142$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
5143set X $ac_compile
5144ac_compiler=$2
5145for ac_option in --version -v -V -qversion; do
5146 { { ac_try="$ac_compiler $ac_option >&5"
5147case "(($ac_try" in
5148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5149 *) ac_try_echo=$ac_try;;
5150esac
5151eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5152$as_echo "$ac_try_echo"; } >&5
5153 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
c3a86da9 5154 ac_status=$?
5213506e
RW
5155 if test -s conftest.err; then
5156 sed '10a\
5157... rest of stderr output deleted ...
5158 10q' conftest.err >conftest.er1
5159 cat conftest.er1 >&5
5213506e 5160 fi
22e05272 5161 rm -f conftest.er1 conftest.err
5213506e
RW
5162 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5163 test $ac_status = 0; }
5164done
c3a86da9 5165
5213506e
RW
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
5167$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22e05272 5168if ${ac_cv_cxx_compiler_gnu+:} false; then :
5213506e 5169 $as_echo_n "(cached) " >&6
c3a86da9 5170else
5213506e 5171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c3a86da9
DJ
5172/* end confdefs.h. */
5173
5174int
5175main ()
5176{
5177#ifndef __GNUC__
5178 choke me
5179#endif
5180
5181 ;
5182 return 0;
5183}
5184_ACEOF
5213506e 5185if ac_fn_cxx_try_compile "$LINENO"; then :
c3a86da9
DJ
5186 ac_compiler_gnu=yes
5187else
5213506e 5188 ac_compiler_gnu=no
c3a86da9 5189fi
5213506e 5190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c3a86da9
DJ
5191ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5192
5193fi
5213506e
RW
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
5195$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
5196if test $ac_compiler_gnu = yes; then
5197 GXX=yes
5198else
5199 GXX=
5200fi
c3a86da9
DJ
5201ac_test_CXXFLAGS=${CXXFLAGS+set}
5202ac_save_CXXFLAGS=$CXXFLAGS
5213506e
RW
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
5204$as_echo_n "checking whether $CXX accepts -g... " >&6; }
22e05272 5205if ${ac_cv_prog_cxx_g+:} false; then :
5213506e
RW
5206 $as_echo_n "(cached) " >&6
5207else
5208 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5209 ac_cxx_werror_flag=yes
5210 ac_cv_prog_cxx_g=no
5211 CXXFLAGS="-g"
5212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c3a86da9
DJ
5213/* end confdefs.h. */
5214
5215int
5216main ()
5217{
5218
5219 ;
5220 return 0;
5221}
5222_ACEOF
5213506e 5223if ac_fn_cxx_try_compile "$LINENO"; then :
c3a86da9
DJ
5224 ac_cv_prog_cxx_g=yes
5225else
5213506e
RW
5226 CXXFLAGS=""
5227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c3a86da9 5228/* end confdefs.h. */
5213506e 5229
c3a86da9
DJ
5230int
5231main ()
5232{
5213506e 5233
c3a86da9
DJ
5234 ;
5235 return 0;
5236}
5237_ACEOF
5213506e 5238if ac_fn_cxx_try_compile "$LINENO"; then :
23f6b2f9 5239
5213506e
RW
5240else
5241 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5242 CXXFLAGS="-g"
5243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c3a86da9 5244/* end confdefs.h. */
5213506e 5245
c3a86da9
DJ
5246int
5247main ()
5248{
5213506e 5249
c3a86da9
DJ
5250 ;
5251 return 0;
5252}
5253_ACEOF
5213506e
RW
5254if ac_fn_cxx_try_compile "$LINENO"; then :
5255 ac_cv_prog_cxx_g=yes
11a67599 5256fi
5213506e
RW
5257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5258fi
5259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5260fi
5261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5262 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5263fi
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
5265$as_echo "$ac_cv_prog_cxx_g" >&6; }
5266if test "$ac_test_CXXFLAGS" = set; then
5267 CXXFLAGS=$ac_save_CXXFLAGS
5268elif test $ac_cv_prog_cxx_g = yes; then
5269 if test "$GXX" = yes; then
5270 CXXFLAGS="-g -O2"
5271 else
5272 CXXFLAGS="-g"
5273 fi
5274else
5275 if test "$GXX" = yes; then
5276 CXXFLAGS="-O2"
5277 else
5278 CXXFLAGS=
5279 fi
c3a86da9 5280fi
c3a86da9
DJ
5281ac_ext=c
5282ac_cpp='$CPP $CPPFLAGS'
5283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5285ac_compiler_gnu=$ac_cv_c_compiler_gnu
5286
5287
5288# We must set the default linker to the linker used by gcc for the correct
5289# operation of libtool. If LD is not defined and we are using gcc, try to
5290# set the LD default to the ld used by gcc.
5291if test -z "$LD"; then
5292 if test "$GCC" = yes; then
5293 case $build in
5294 *-*-mingw*)
5295 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
5296 *)
5297 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
5298 esac
5299 case $gcc_prog_ld in
5300 # Accept absolute paths.
5301 [\\/]* | [A-Za-z]:[\\/]*)
5302 LD="$gcc_prog_ld" ;;
5303 esac
5304 fi
23f6b2f9
PB
5305fi
5306
0b21f5d3
EB
5307# Check whether -static-libstdc++ -static-libgcc is supported.
5308have_static_libs=no
5309if test "$GCC" = yes; then
5310 saved_LDFLAGS="$LDFLAGS"
5311
5312 LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
5314$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
5315 ac_ext=cpp
5316ac_cpp='$CXXCPP $CPPFLAGS'
5317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5320
5321
5322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323/* end confdefs.h. */
0d6414b2
EB
5324
5325#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5326#error -static-libstdc++ not implemented
5327#endif
0b21f5d3
EB
5328int main() {}
5329_ACEOF
5330if ac_fn_cxx_try_link "$LINENO"; then :
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5332$as_echo "yes" >&6; }; have_static_libs=yes
5333else
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337rm -f core conftest.err conftest.$ac_objext \
5338 conftest$ac_exeext conftest.$ac_ext
5339 ac_ext=c
5340ac_cpp='$CPP $CPPFLAGS'
5341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5343ac_compiler_gnu=$ac_cv_c_compiler_gnu
5344
5345
5346 LDFLAGS="$saved_LDFLAGS"
5347fi
5348
23f6b2f9
PB
5349
5350
55ffb5ed 5351
1c710c3c
DJ
5352if test -n "$ac_tool_prefix"; then
5353 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
55ffb5ed 5354set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
5213506e
RW
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5357if ${ac_cv_prog_GNATBIND+:} false; then :
5213506e 5358 $as_echo_n "(cached) " >&6
55ffb5ed
NN
5359else
5360 if test -n "$GNATBIND"; then
5361 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
5362else
1c710c3c
DJ
5363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366 IFS=$as_save_IFS
5367 test -z "$as_dir" && as_dir=.
5213506e 5368 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 5370 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
5213506e 5371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
5372 break 2
5373 fi
5374done
5213506e
RW
5375 done
5376IFS=$as_save_IFS
1c710c3c 5377
55ffb5ed
NN
5378fi
5379fi
1c710c3c 5380GNATBIND=$ac_cv_prog_GNATBIND
55ffb5ed 5381if test -n "$GNATBIND"; then
5213506e
RW
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5
5383$as_echo "$GNATBIND" >&6; }
55ffb5ed 5384else
5213506e
RW
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
55ffb5ed
NN
5387fi
5388
5213506e 5389
1c710c3c 5390fi
55ffb5ed 5391if test -z "$ac_cv_prog_GNATBIND"; then
1c710c3c 5392 ac_ct_GNATBIND=$GNATBIND
55ffb5ed
NN
5393 # Extract the first word of "gnatbind", so it can be a program name with args.
5394set dummy gnatbind; ac_word=$2
5213506e
RW
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5397if ${ac_cv_prog_ac_ct_GNATBIND+:} false; then :
5213506e 5398 $as_echo_n "(cached) " >&6
55ffb5ed 5399else
1c710c3c
DJ
5400 if test -n "$ac_ct_GNATBIND"; then
5401 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
55ffb5ed 5402else
1c710c3c
DJ
5403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406 IFS=$as_save_IFS
5407 test -z "$as_dir" && as_dir=.
5213506e 5408 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 5410 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
5213506e 5411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
5412 break 2
5413 fi
5414done
5213506e
RW
5415 done
5416IFS=$as_save_IFS
1c710c3c 5417
55ffb5ed
NN
5418fi
5419fi
1c710c3c
DJ
5420ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
5421if test -n "$ac_ct_GNATBIND"; then
5213506e
RW
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5
5423$as_echo "$ac_ct_GNATBIND" >&6; }
55ffb5ed 5424else
5213506e
RW
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
55ffb5ed
NN
5427fi
5428
5213506e
RW
5429 if test "x$ac_ct_GNATBIND" = x; then
5430 GNATBIND="no"
5431 else
5432 case $cross_compiling:$ac_tool_warned in
5433yes:)
5434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5436ac_tool_warned=yes ;;
5437esac
5438 GNATBIND=$ac_ct_GNATBIND
5439 fi
55ffb5ed 5440else
1c710c3c 5441 GNATBIND="$ac_cv_prog_GNATBIND"
55ffb5ed
NN
5442fi
5443
1c710c3c
DJ
5444if test -n "$ac_tool_prefix"; then
5445 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
5305be7e 5446set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
5213506e
RW
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5449if ${ac_cv_prog_GNATMAKE+:} false; then :
5213506e 5450 $as_echo_n "(cached) " >&6
5305be7e
RG
5451else
5452 if test -n "$GNATMAKE"; then
5453 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
5454else
1c710c3c
DJ
5455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5456for as_dir in $PATH
5457do
5458 IFS=$as_save_IFS
5459 test -z "$as_dir" && as_dir=.
5213506e 5460 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 5462 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
5213506e 5463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
5464 break 2
5465 fi
5466done
5213506e
RW
5467 done
5468IFS=$as_save_IFS
1c710c3c 5469
5305be7e
RG
5470fi
5471fi
1c710c3c 5472GNATMAKE=$ac_cv_prog_GNATMAKE
5305be7e 5473if test -n "$GNATMAKE"; then
5213506e
RW
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5
5475$as_echo "$GNATMAKE" >&6; }
5305be7e 5476else
5213506e
RW
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478$as_echo "no" >&6; }
5305be7e
RG
5479fi
5480
5213506e 5481
1c710c3c 5482fi
5305be7e 5483if test -z "$ac_cv_prog_GNATMAKE"; then
1c710c3c 5484 ac_ct_GNATMAKE=$GNATMAKE
5305be7e
RG
5485 # Extract the first word of "gnatmake", so it can be a program name with args.
5486set dummy gnatmake; ac_word=$2
5213506e
RW
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5488$as_echo_n "checking for $ac_word... " >&6; }
22e05272 5489if ${ac_cv_prog_ac_ct_GNATMAKE+:} false; then :
5213506e 5490 $as_echo_n "(cached) " >&6
5305be7e 5491else
1c710c3c
DJ
5492 if test -n "$ac_ct_GNATMAKE"; then
5493 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
5305be7e 5494else
1c710c3c
DJ
5495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH
5497do
5498 IFS=$as_save_IFS
5499 test -z "$as_dir" && as_dir=.
5213506e 5500 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 5501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 5502 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
5213506e 5503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
5504 break 2
5505 fi
5506done
5213506e
RW
5507 done
5508IFS=$as_save_IFS
1c710c3c 5509
5305be7e
RG
5510fi
5511fi
1c710c3c
DJ
5512ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
5513if test -n "$ac_ct_GNATMAKE"; then
5213506e
RW
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5
5515$as_echo "$ac_ct_GNATMAKE" >&6; }
5305be7e 5516else
5213506e
RW
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5518$as_echo "no" >&6; }
5305be7e
RG
5519fi
5520
5213506e
RW
5521 if test "x$ac_ct_GNATMAKE" = x; then
5522 GNATMAKE="no"
5523 else
5524 case $cross_compiling:$ac_tool_warned in
5525yes:)
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5528ac_tool_warned=yes ;;
5529esac
5530 GNATMAKE=$ac_ct_GNATMAKE
5531 fi
5305be7e 5532else
1c710c3c 5533 GNATMAKE="$ac_cv_prog_GNATMAKE"
5305be7e
RG
5534fi
5535
71f068a9
RS
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada and is recent enough" >&5
5537$as_echo_n "checking whether compiler driver understands Ada and is recent enough... " >&6; }
22e05272 5538if ${acx_cv_cc_gcc_supports_ada+:} false; then :
5213506e 5539 $as_echo_n "(cached) " >&6
55ffb5ed
NN
5540else
5541 cat >conftest.adb <<EOF
71f068a9
RS
5542pragma Warnings (Off);
5543with System.CRTL;
5544pragma Warnings (On);
5545use type System.CRTL.int64;
55ffb5ed
NN
5546procedure conftest is begin null; end conftest;
5547EOF
5548acx_cv_cc_gcc_supports_ada=no
5549# There is a bug in old released versions of GCC which causes the
5550# driver to exit successfully when the appropriate language module
5551# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
5552# Therefore we must check for the error message as well as an
5553# unsuccessful exit.
1db673ca
RO
5554# Other compilers, like HP Tru64 UNIX cc, exit successfully when
5555# given a .adb file, but produce no object file. So we must check
5556# if an object file was really produced to guard against this.
55ffb5ed 5557errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
1db673ca 5558if test x"$errors" = x && test -f conftest.$ac_objext; then
55ffb5ed 5559 acx_cv_cc_gcc_supports_ada=yes
55ffb5ed
NN
5560fi
5561rm -f conftest.*
5562fi
5213506e
RW
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
5564$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
55ffb5ed 5565
7cb62ef1 5566if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
55ffb5ed
NN
5567 have_gnat=yes
5568else
5569 have_gnat=no
5570fi
5571
5fee5ec3
IB
5572
5573
5574if test -n "$ac_tool_prefix"; then
5575 # Extract the first word of "${ac_tool_prefix}gdc", so it can be a program name with args.
5576set dummy ${ac_tool_prefix}gdc; ac_word=$2
5577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5578$as_echo_n "checking for $ac_word... " >&6; }
5579if ${ac_cv_prog_GDC+:} false; then :
5580 $as_echo_n "(cached) " >&6
5581else
5582 if test -n "$GDC"; then
5583 ac_cv_prog_GDC="$GDC" # Let the user override the test.
5584else
5585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586for as_dir in $PATH
5587do
5588 IFS=$as_save_IFS
5589 test -z "$as_dir" && as_dir=.
5590 for ac_exec_ext in '' $ac_executable_extensions; do
5591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592 ac_cv_prog_GDC="${ac_tool_prefix}gdc"
5593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594 break 2
5595 fi
5596done
5597 done
5598IFS=$as_save_IFS
5599
5600fi
5601fi
5602GDC=$ac_cv_prog_GDC
5603if test -n "$GDC"; then
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDC" >&5
5605$as_echo "$GDC" >&6; }
5606else
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609fi
5610
5611
5612fi
5613if test -z "$ac_cv_prog_GDC"; then
5614 ac_ct_GDC=$GDC
5615 # Extract the first word of "gdc", so it can be a program name with args.
5616set dummy gdc; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if ${ac_cv_prog_ac_ct_GDC+:} false; then :
5620 $as_echo_n "(cached) " >&6
5621else
5622 if test -n "$ac_ct_GDC"; then
5623 ac_cv_prog_ac_ct_GDC="$ac_ct_GDC" # Let the user override the test.
5624else
5625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628 IFS=$as_save_IFS
5629 test -z "$as_dir" && as_dir=.
5630 for ac_exec_ext in '' $ac_executable_extensions; do
5631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632 ac_cv_prog_ac_ct_GDC="gdc"
5633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634 break 2
5635 fi
5636done
5637 done
5638IFS=$as_save_IFS
5639
5640fi
5641fi
5642ac_ct_GDC=$ac_cv_prog_ac_ct_GDC
5643if test -n "$ac_ct_GDC"; then
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GDC" >&5
5645$as_echo "$ac_ct_GDC" >&6; }
5646else
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5648$as_echo "no" >&6; }
5649fi
5650
5651 if test "x$ac_ct_GDC" = x; then
5652 GDC="no"
5653 else
5654 case $cross_compiling:$ac_tool_warned in
5655yes:)
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5658ac_tool_warned=yes ;;
5659esac
5660 GDC=$ac_ct_GDC
5661 fi
5662else
5663 GDC="$ac_cv_prog_GDC"
5664fi
5665
7c6ae994
IB
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
5667$as_echo_n "checking whether the D compiler works... " >&6; }
5668if ${acx_cv_d_compiler_works+:} false; then :
5669 $as_echo_n "(cached) " >&6
5670else
5671 cat >conftest.d <<EOF
5672module conftest; int main() { return 0; }
5673EOF
5674acx_cv_d_compiler_works=no
5fee5ec3 5675if test "x$GDC" != xno; then
7c6ae994
IB
5676 errors=`(${GDC} -c conftest.d) 2>&1 || echo failure`
5677 if test x"$errors" = x && test -f conftest.$ac_objext; then
5678 acx_cv_d_compiler_works=yes
5679 fi
5680 rm -f conftest.*
5681fi
5682fi
5683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
5684$as_echo "$acx_cv_d_compiler_works" >&6; }
5685if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
5fee5ec3
IB
5686 have_gdc=yes
5687else
5688 have_gdc=no
5689fi
5690
5213506e
RW
5691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compare bootstrapped objects" >&5
5692$as_echo_n "checking how to compare bootstrapped objects... " >&6; }
22e05272 5693if ${gcc_cv_prog_cmp_skip+:} false; then :
5213506e 5694 $as_echo_n "(cached) " >&6
a76494aa
PB
5695else
5696 echo abfoo >t1
5697 echo cdfoo >t2
b55e6680 5698 gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
6cf1ac42
PB
5699 if cmp t1 t2 2 2 > /dev/null 2>&1; then
5700 if cmp t1 t2 1 1 > /dev/null 2>&1; then
5701 :
5702 else
5703 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
5704 fi
5705 fi
a76494aa
PB
5706 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
5707 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
6cf1ac42 5708 :
a76494aa
PB
5709 else
5710 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
5711 fi
5712 fi
5713 rm t1 t2
5714
5715fi
5213506e
RW
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
5717$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
a76494aa
PB
5718do_compare="$gcc_cv_prog_cmp_skip"
5719
5720
55ffb5ed 5721
ff3ac0f4
ILT
5722# Check whether --enable-bootstrap was given.
5723if test "${enable_bootstrap+set}" = set; then :
5724 enableval=$enable_bootstrap;
5725else
5726 enable_bootstrap=default
5727fi
5728
5729
5730# Issue errors and warnings for invalid/strange bootstrap combinations.
bf03b9ff
ILT
5731if test -r $srcdir/gcc/configure; then
5732 have_compiler=yes
5733else
5734 have_compiler=no
5735fi
ff3ac0f4
ILT
5736
5737case "$have_compiler:$host:$target:$enable_bootstrap" in
5738 *:*:*:no) ;;
5739
5740 # Default behavior. Enable bootstrap if we have a compiler
5741 # and we are in a native configuration.
5742 yes:$build:$build:default)
5743 enable_bootstrap=yes ;;
5744
5745 *:*:*:default)
5746 enable_bootstrap=no ;;
5747
5748 # We have a compiler and we are in a native configuration, bootstrap is ok
5749 yes:$build:$build:yes)
5750 ;;
5751
5752 # Other configurations, but we have a compiler. Assume the user knows
5753 # what he's doing.
5754 yes:*:*:yes)
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: trying to bootstrap a cross compiler" >&5
5756$as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
5757 ;;
5758
5759 # No compiler: if they passed --enable-bootstrap explicitly, fail
5760 no:*:*:yes)
22e05272 5761 as_fn_error $? "cannot bootstrap without a compiler" "$LINENO" 5 ;;
ff3ac0f4
ILT
5762
5763 # Fail if wrong command line
5764 *)
22e05272 5765 as_fn_error $? "invalid option for --enable-bootstrap" "$LINENO" 5
ff3ac0f4
ILT
5766 ;;
5767esac
5768
5329b59a 5769# When bootstrapping with GCC, build stage 1 in C++11 mode to ensure that a
ffac9597
JM
5770# C++11 compiler can still start the bootstrap. Otherwise, if building GCC,
5771# require C++11 (or higher).
46070488 5772if test "$enable_bootstrap:$GXX" = "yes:yes"; then
5329b59a 5773 CXX="$CXX -std=c++11"
ffac9597
JM
5774elif test "$have_compiler" = yes; then
5775 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5776 ac_ext=cpp
5777ac_cpp='$CXXCPP $CPPFLAGS'
5778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5781 ac_success=no
5782
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5784$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5785if ${ax_cv_cxx_compile_cxx11+:} false; then :
5786 $as_echo_n "(cached) " >&6
5787else
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790
5791
5792// If the compiler admits that it is not ready for C++11, why torture it?
5793// Hopefully, this will speed up the test.
5794
5795#ifndef __cplusplus
5796
5797#error "This is not a C++ compiler"
5798
5799#elif __cplusplus < 201103L
5800
5801#error "This is not a C++11 compiler"
5802
5803#else
5804
5805namespace cxx11
5806{
5807
5808 namespace test_static_assert
5809 {
5810
5811 template <typename T>
5812 struct check
5813 {
5814 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5815 };
5816
5817 }
5818
5819 namespace test_final_override
5820 {
5821
5822 struct Base
5823 {
5824 virtual ~Base() {}
5825 virtual void f() {}
5826 };
5827
5828 struct Derived : public Base
5829 {
5830 virtual ~Derived() override {}
5831 virtual void f() override {}
5832 };
5833
5834 }
5835
5836 namespace test_double_right_angle_brackets
5837 {
5838
5839 template < typename T >
5840 struct check {};
5841
5842 typedef check<void> single_type;
5843 typedef check<check<void>> double_type;
5844 typedef check<check<check<void>>> triple_type;
5845 typedef check<check<check<check<void>>>> quadruple_type;
5846
5847 }
5848
5849 namespace test_decltype
5850 {
5851
5852 int
5853 f()
5854 {
5855 int a = 1;
5856 decltype(a) b = 2;
5857 return a + b;
5858 }
5859
5860 }
5861
5862 namespace test_type_deduction
5863 {
5864
5865 template < typename T1, typename T2 >
5866 struct is_same
5867 {
5868 static const bool value = false;
5869 };
5870
5871 template < typename T >
5872 struct is_same<T, T>
5873 {
5874 static const bool value = true;
5875 };
5876
5877 template < typename T1, typename T2 >
5878 auto
5879 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5880 {
5881 return a1 + a2;
5882 }
5883
5884 int
5885 test(const int c, volatile int v)
5886 {
5887 static_assert(is_same<int, decltype(0)>::value == true, "");
5888 static_assert(is_same<int, decltype(c)>::value == false, "");
5889 static_assert(is_same<int, decltype(v)>::value == false, "");
5890 auto ac = c;
5891 auto av = v;
5892 auto sumi = ac + av + 'x';
5893 auto sumf = ac + av + 1.0;
5894 static_assert(is_same<int, decltype(ac)>::value == true, "");
5895 static_assert(is_same<int, decltype(av)>::value == true, "");
5896 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5897 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5898 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5899 return (sumf > 0.0) ? sumi : add(c, v);
5900 }
5901
5902 }
5903
5904 namespace test_noexcept
5905 {
5906
5907 int f() { return 0; }
5908 int g() noexcept { return 0; }
5909
5910 static_assert(noexcept(f()) == false, "");
5911 static_assert(noexcept(g()) == true, "");
5912
5913 }
5914
5915 namespace test_constexpr
5916 {
5917
5918 template < typename CharT >
5919 unsigned long constexpr
5920 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5921 {
5922 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5923 }
5924
5925 template < typename CharT >
5926 unsigned long constexpr
5927 strlen_c(const CharT *const s) noexcept
5928 {
5929 return strlen_c_r(s, 0UL);
5930 }
5931
5932 static_assert(strlen_c("") == 0UL, "");
5933 static_assert(strlen_c("1") == 1UL, "");
5934 static_assert(strlen_c("example") == 7UL, "");
5935 static_assert(strlen_c("another\0example") == 7UL, "");
5936
5937 }
5938
5939 namespace test_rvalue_references
5940 {
5941
5942 template < int N >
5943 struct answer
5944 {
5945 static constexpr int value = N;
5946 };
5947
5948 answer<1> f(int&) { return answer<1>(); }
5949 answer<2> f(const int&) { return answer<2>(); }
5950 answer<3> f(int&&) { return answer<3>(); }
5951
5952 void
5953 test()
5954 {
5955 int i = 0;
5956 const int c = 0;
5957 static_assert(decltype(f(i))::value == 1, "");
5958 static_assert(decltype(f(c))::value == 2, "");
5959 static_assert(decltype(f(0))::value == 3, "");
5960 }
5961
5962 }
5963
5964 namespace test_uniform_initialization
5965 {
5966
5967 struct test
5968 {
5969 static const int zero {};
5970 static const int one {1};
5971 };
5972
5973 static_assert(test::zero == 0, "");
5974 static_assert(test::one == 1, "");
5975
5976 }
5977
5978 namespace test_lambdas
5979 {
5980
5981 void
5982 test1()
5983 {
5984 auto lambda1 = [](){};
5985 auto lambda2 = lambda1;
5986 lambda1();
5987 lambda2();
5988 }
5989
5990 int
5991 test2()
5992 {
5993 auto a = [](int i, int j){ return i + j; }(1, 2);
5994 auto b = []() -> int { return '0'; }();
5995 auto c = [=](){ return a + b; }();
5996 auto d = [&](){ return c; }();
5997 auto e = [a, &b](int x) mutable {
5998 const auto identity = [](int y){ return y; };
5999 for (auto i = 0; i < a; ++i)
6000 a += b--;
6001 return x + identity(a + b);
6002 }(0);
6003 return a + b + c + d + e;
6004 }
6005
6006 int
6007 test3()
6008 {
6009 const auto nullary = [](){ return 0; };
6010 const auto unary = [](int x){ return x; };
6011 using nullary_t = decltype(nullary);
6012 using unary_t = decltype(unary);
6013 const auto higher1st = [](nullary_t f){ return f(); };
6014 const auto higher2nd = [unary](nullary_t f1){
6015 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6016 };
6017 return higher1st(nullary) + higher2nd(nullary)(unary);
6018 }
6019
6020 }
6021
6022 namespace test_variadic_templates
6023 {
6024
6025 template <int...>
6026 struct sum;
6027
6028 template <int N0, int... N1toN>
6029 struct sum<N0, N1toN...>
6030 {
6031 static constexpr auto value = N0 + sum<N1toN...>::value;
6032 };
6033
6034 template <>
6035 struct sum<>
6036 {
6037 static constexpr auto value = 0;
6038 };
6039
6040 static_assert(sum<>::value == 0, "");
6041 static_assert(sum<1>::value == 1, "");
6042 static_assert(sum<23>::value == 23, "");
6043 static_assert(sum<1, 2>::value == 3, "");
6044 static_assert(sum<5, 5, 11>::value == 21, "");
6045 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6046
6047 }
6048
6049 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6050 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6051 // because of this.
6052 namespace test_template_alias_sfinae
6053 {
6054
6055 struct foo {};
6056
6057 template<typename T>
6058 using member = typename T::member_type;
6059
6060 template<typename T>
6061 void func(...) {}
6062
6063 template<typename T>
6064 void func(member<T>*) {}
6065
6066 void test();
6067
6068 void test() { func<foo>(0); }
6069
6070 }
6071
6072} // namespace cxx11
6073
6074#endif // __cplusplus >= 201103L
6075
6076
6077
6078_ACEOF
6079if ac_fn_cxx_try_compile "$LINENO"; then :
6080 ax_cv_cxx_compile_cxx11=yes
6081else
6082 ax_cv_cxx_compile_cxx11=no
6083fi
6084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6085fi
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
6087$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
6088 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
6089 ac_success=yes
6090 fi
6091
6092 if test x$ac_success = xno; then
6093 for alternative in ${ax_cxx_compile_alternatives}; do
6094 switch="-std=gnu++${alternative}"
6095 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
6097$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
6098if eval \${$cachevar+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100else
6101 ac_save_CXX="$CXX"
6102 CXX="$CXX $switch"
6103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104/* end confdefs.h. */
6105
6106
6107// If the compiler admits that it is not ready for C++11, why torture it?
6108// Hopefully, this will speed up the test.
6109
6110#ifndef __cplusplus
6111
6112#error "This is not a C++ compiler"
6113
6114#elif __cplusplus < 201103L
6115
6116#error "This is not a C++11 compiler"
6117
6118#else
6119
6120namespace cxx11
6121{
6122
6123 namespace test_static_assert
6124 {
6125
6126 template <typename T>
6127 struct check
6128 {
6129 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6130 };
6131
6132 }
6133
6134 namespace test_final_override
6135 {
6136
6137 struct Base
6138 {
6139 virtual ~Base() {}
6140 virtual void f() {}
6141 };
6142
6143 struct Derived : public Base
6144 {
6145 virtual ~Derived() override {}
6146 virtual void f() override {}
6147 };
6148
6149 }
6150
6151 namespace test_double_right_angle_brackets
6152 {
6153
6154 template < typename T >
6155 struct check {};
6156
6157 typedef check<void> single_type;
6158 typedef check<check<void>> double_type;
6159 typedef check<check<check<void>>> triple_type;
6160 typedef check<check<check<check<void>>>> quadruple_type;
6161
6162 }
6163
6164 namespace test_decltype
6165 {
6166
6167 int
6168 f()
6169 {
6170 int a = 1;
6171 decltype(a) b = 2;
6172 return a + b;
6173 }
6174
6175 }
6176
6177 namespace test_type_deduction
6178 {
6179
6180 template < typename T1, typename T2 >
6181 struct is_same
6182 {
6183 static const bool value = false;
6184 };
6185
6186 template < typename T >
6187 struct is_same<T, T>
6188 {
6189 static const bool value = true;
6190 };
6191
6192 template < typename T1, typename T2 >
6193 auto
6194 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6195 {
6196 return a1 + a2;
6197 }
6198
6199 int
6200 test(const int c, volatile int v)
6201 {
6202 static_assert(is_same<int, decltype(0)>::value == true, "");
6203 static_assert(is_same<int, decltype(c)>::value == false, "");
6204 static_assert(is_same<int, decltype(v)>::value == false, "");
6205 auto ac = c;
6206 auto av = v;
6207 auto sumi = ac + av + 'x';
6208 auto sumf = ac + av + 1.0;
6209 static_assert(is_same<int, decltype(ac)>::value == true, "");
6210 static_assert(is_same<int, decltype(av)>::value == true, "");
6211 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6212 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6213 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6214 return (sumf > 0.0) ? sumi : add(c, v);
6215 }
6216
6217 }
6218
6219 namespace test_noexcept
6220 {
6221
6222 int f() { return 0; }
6223 int g() noexcept { return 0; }
6224
6225 static_assert(noexcept(f()) == false, "");
6226 static_assert(noexcept(g()) == true, "");
6227
6228 }
6229
6230 namespace test_constexpr
6231 {
6232
6233 template < typename CharT >
6234 unsigned long constexpr
6235 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6236 {
6237 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6238 }
6239
6240 template < typename CharT >
6241 unsigned long constexpr
6242 strlen_c(const CharT *const s) noexcept
6243 {
6244 return strlen_c_r(s, 0UL);
6245 }
6246
6247 static_assert(strlen_c("") == 0UL, "");
6248 static_assert(strlen_c("1") == 1UL, "");
6249 static_assert(strlen_c("example") == 7UL, "");
6250 static_assert(strlen_c("another\0example") == 7UL, "");
6251
6252 }
6253
6254 namespace test_rvalue_references
6255 {
6256
6257 template < int N >
6258 struct answer
6259 {
6260 static constexpr int value = N;
6261 };
6262
6263 answer<1> f(int&) { return answer<1>(); }
6264 answer<2> f(const int&) { return answer<2>(); }
6265 answer<3> f(int&&) { return answer<3>(); }
6266
6267 void
6268 test()
6269 {
6270 int i = 0;
6271 const int c = 0;
6272 static_assert(decltype(f(i))::value == 1, "");
6273 static_assert(decltype(f(c))::value == 2, "");
6274 static_assert(decltype(f(0))::value == 3, "");
6275 }
6276
6277 }
6278
6279 namespace test_uniform_initialization
6280 {
6281
6282 struct test
6283 {
6284 static const int zero {};
6285 static const int one {1};
6286 };
6287
6288 static_assert(test::zero == 0, "");
6289 static_assert(test::one == 1, "");
6290
6291 }
6292
6293 namespace test_lambdas
6294 {
6295
6296 void
6297 test1()
6298 {
6299 auto lambda1 = [](){};
6300 auto lambda2 = lambda1;
6301 lambda1();
6302 lambda2();
6303 }
6304
6305 int
6306 test2()
6307 {
6308 auto a = [](int i, int j){ return i + j; }(1, 2);
6309 auto b = []() -> int { return '0'; }();
6310 auto c = [=](){ return a + b; }();
6311 auto d = [&](){ return c; }();
6312 auto e = [a, &b](int x) mutable {
6313 const auto identity = [](int y){ return y; };
6314 for (auto i = 0; i < a; ++i)
6315 a += b--;
6316 return x + identity(a + b);
6317 }(0);
6318 return a + b + c + d + e;
6319 }
6320
6321 int
6322 test3()
6323 {
6324 const auto nullary = [](){ return 0; };
6325 const auto unary = [](int x){ return x; };
6326 using nullary_t = decltype(nullary);
6327 using unary_t = decltype(unary);
6328 const auto higher1st = [](nullary_t f){ return f(); };
6329 const auto higher2nd = [unary](nullary_t f1){
6330 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6331 };
6332 return higher1st(nullary) + higher2nd(nullary)(unary);
6333 }
6334
6335 }
6336
6337 namespace test_variadic_templates
6338 {
6339
6340 template <int...>
6341 struct sum;
6342
6343 template <int N0, int... N1toN>
6344 struct sum<N0, N1toN...>
6345 {
6346 static constexpr auto value = N0 + sum<N1toN...>::value;
6347 };
6348
6349 template <>
6350 struct sum<>
6351 {
6352 static constexpr auto value = 0;
6353 };
6354
6355 static_assert(sum<>::value == 0, "");
6356 static_assert(sum<1>::value == 1, "");
6357 static_assert(sum<23>::value == 23, "");
6358 static_assert(sum<1, 2>::value == 3, "");
6359 static_assert(sum<5, 5, 11>::value == 21, "");
6360 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6361
6362 }
6363
6364 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6365 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6366 // because of this.
6367 namespace test_template_alias_sfinae
6368 {
6369
6370 struct foo {};
6371
6372 template<typename T>
6373 using member = typename T::member_type;
6374
6375 template<typename T>
6376 void func(...) {}
6377
6378 template<typename T>
6379 void func(member<T>*) {}
6380
6381 void test();
6382
6383 void test() { func<foo>(0); }
6384
6385 }
6386
6387} // namespace cxx11
6388
6389#endif // __cplusplus >= 201103L
6390
6391
6392
6393_ACEOF
6394if ac_fn_cxx_try_compile "$LINENO"; then :
6395 eval $cachevar=yes
6396else
6397 eval $cachevar=no
6398fi
6399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6400 CXX="$ac_save_CXX"
6401fi
6402eval ac_res=\$$cachevar
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6404$as_echo "$ac_res" >&6; }
6405 if eval test x\$$cachevar = xyes; then
6406 CXX="$CXX $switch"
6407 if test -n "$CXXCPP" ; then
6408 CXXCPP="$CXXCPP $switch"
6409 fi
6410 ac_success=yes
6411 break
6412 fi
6413 done
6414 fi
6415
6416 if test x$ac_success = xno; then
6417 for alternative in ${ax_cxx_compile_alternatives}; do
6418 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
6419 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
6421$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
6422if eval \${$cachevar+:} false; then :
6423 $as_echo_n "(cached) " >&6
6424else
6425 ac_save_CXX="$CXX"
6426 CXX="$CXX $switch"
6427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6428/* end confdefs.h. */
6429
6430
6431// If the compiler admits that it is not ready for C++11, why torture it?
6432// Hopefully, this will speed up the test.
6433
6434#ifndef __cplusplus
6435
6436#error "This is not a C++ compiler"
6437
6438#elif __cplusplus < 201103L
6439
6440#error "This is not a C++11 compiler"
6441
6442#else
6443
6444namespace cxx11
6445{
6446
6447 namespace test_static_assert
6448 {
6449
6450 template <typename T>
6451 struct check
6452 {
6453 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6454 };
6455
6456 }
6457
6458 namespace test_final_override
6459 {
6460
6461 struct Base
6462 {
6463 virtual ~Base() {}
6464 virtual void f() {}
6465 };
6466
6467 struct Derived : public Base
6468 {
6469 virtual ~Derived() override {}
6470 virtual void f() override {}
6471 };
6472
6473 }
6474
6475 namespace test_double_right_angle_brackets
6476 {
6477
6478 template < typename T >
6479 struct check {};
6480
6481 typedef check<void> single_type;
6482 typedef check<check<void>> double_type;
6483 typedef check<check<check<void>>> triple_type;
6484 typedef check<check<check<check<void>>>> quadruple_type;
6485
6486 }
6487
6488 namespace test_decltype
6489 {
6490
6491 int
6492 f()
6493 {
6494 int a = 1;
6495 decltype(a) b = 2;
6496 return a + b;
6497 }
6498
6499 }
6500
6501 namespace test_type_deduction
6502 {
6503
6504 template < typename T1, typename T2 >
6505 struct is_same
6506 {
6507 static const bool value = false;
6508 };
6509
6510 template < typename T >
6511 struct is_same<T, T>
6512 {
6513 static const bool value = true;
6514 };
6515
6516 template < typename T1, typename T2 >
6517 auto
6518 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6519 {
6520 return a1 + a2;
6521 }
6522
6523 int
6524 test(const int c, volatile int v)
6525 {
6526 static_assert(is_same<int, decltype(0)>::value == true, "");
6527 static_assert(is_same<int, decltype(c)>::value == false, "");
6528 static_assert(is_same<int, decltype(v)>::value == false, "");
6529 auto ac = c;
6530 auto av = v;
6531 auto sumi = ac + av + 'x';
6532 auto sumf = ac + av + 1.0;
6533 static_assert(is_same<int, decltype(ac)>::value == true, "");
6534 static_assert(is_same<int, decltype(av)>::value == true, "");
6535 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6536 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6537 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6538 return (sumf > 0.0) ? sumi : add(c, v);
6539 }
6540
6541 }
6542
6543 namespace test_noexcept
6544 {
6545
6546 int f() { return 0; }
6547 int g() noexcept { return 0; }
6548
6549 static_assert(noexcept(f()) == false, "");
6550 static_assert(noexcept(g()) == true, "");
6551
6552 }
6553
6554 namespace test_constexpr
6555 {
6556
6557 template < typename CharT >
6558 unsigned long constexpr
6559 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6560 {
6561 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6562 }
6563
6564 template < typename CharT >
6565 unsigned long constexpr
6566 strlen_c(const CharT *const s) noexcept
6567 {
6568 return strlen_c_r(s, 0UL);
6569 }
6570
6571 static_assert(strlen_c("") == 0UL, "");
6572 static_assert(strlen_c("1") == 1UL, "");
6573 static_assert(strlen_c("example") == 7UL, "");
6574 static_assert(strlen_c("another\0example") == 7UL, "");
6575
6576 }
6577
6578 namespace test_rvalue_references
6579 {
6580
6581 template < int N >
6582 struct answer
6583 {
6584 static constexpr int value = N;
6585 };
6586
6587 answer<1> f(int&) { return answer<1>(); }
6588 answer<2> f(const int&) { return answer<2>(); }
6589 answer<3> f(int&&) { return answer<3>(); }
6590
6591 void
6592 test()
6593 {
6594 int i = 0;
6595 const int c = 0;
6596 static_assert(decltype(f(i))::value == 1, "");
6597 static_assert(decltype(f(c))::value == 2, "");
6598 static_assert(decltype(f(0))::value == 3, "");
6599 }
6600
6601 }
6602
6603 namespace test_uniform_initialization
6604 {
6605
6606 struct test
6607 {
6608 static const int zero {};
6609 static const int one {1};
6610 };
6611
6612 static_assert(test::zero == 0, "");
6613 static_assert(test::one == 1, "");
6614
6615 }
6616
6617 namespace test_lambdas
6618 {
6619
6620 void
6621 test1()
6622 {
6623 auto lambda1 = [](){};
6624 auto lambda2 = lambda1;
6625 lambda1();
6626 lambda2();
6627 }
6628
6629 int
6630 test2()
6631 {
6632 auto a = [](int i, int j){ return i + j; }(1, 2);
6633 auto b = []() -> int { return '0'; }();
6634 auto c = [=](){ return a + b; }();
6635 auto d = [&](){ return c; }();
6636 auto e = [a, &b](int x) mutable {
6637 const auto identity = [](int y){ return y; };
6638 for (auto i = 0; i < a; ++i)
6639 a += b--;
6640 return x + identity(a + b);
6641 }(0);
6642 return a + b + c + d + e;
6643 }
6644
6645 int
6646 test3()
6647 {
6648 const auto nullary = [](){ return 0; };
6649 const auto unary = [](int x){ return x; };
6650 using nullary_t = decltype(nullary);
6651 using unary_t = decltype(unary);
6652 const auto higher1st = [](nullary_t f){ return f(); };
6653 const auto higher2nd = [unary](nullary_t f1){
6654 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6655 };
6656 return higher1st(nullary) + higher2nd(nullary)(unary);
6657 }
6658
6659 }
6660
6661 namespace test_variadic_templates
6662 {
6663
6664 template <int...>
6665 struct sum;
6666
6667 template <int N0, int... N1toN>
6668 struct sum<N0, N1toN...>
6669 {
6670 static constexpr auto value = N0 + sum<N1toN...>::value;
6671 };
6672
6673 template <>
6674 struct sum<>
6675 {
6676 static constexpr auto value = 0;
6677 };
6678
6679 static_assert(sum<>::value == 0, "");
6680 static_assert(sum<1>::value == 1, "");
6681 static_assert(sum<23>::value == 23, "");
6682 static_assert(sum<1, 2>::value == 3, "");
6683 static_assert(sum<5, 5, 11>::value == 21, "");
6684 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6685
6686 }
6687
6688 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6689 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6690 // because of this.
6691 namespace test_template_alias_sfinae
6692 {
6693
6694 struct foo {};
6695
6696 template<typename T>
6697 using member = typename T::member_type;
6698
6699 template<typename T>
6700 void func(...) {}
6701
6702 template<typename T>
6703 void func(member<T>*) {}
6704
6705 void test();
6706
6707 void test() { func<foo>(0); }
6708
6709 }
6710
6711} // namespace cxx11
6712
6713#endif // __cplusplus >= 201103L
6714
6715
6716
6717_ACEOF
6718if ac_fn_cxx_try_compile "$LINENO"; then :
6719 eval $cachevar=yes
6720else
6721 eval $cachevar=no
6722fi
6723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6724 CXX="$ac_save_CXX"
6725fi
6726eval ac_res=\$$cachevar
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6728$as_echo "$ac_res" >&6; }
6729 if eval test x\$$cachevar = xyes; then
6730 CXX="$CXX $switch"
6731 if test -n "$CXXCPP" ; then
6732 CXXCPP="$CXXCPP $switch"
6733 fi
6734 ac_success=yes
6735 break
6736 fi
6737 done
6738 if test x$ac_success = xyes; then
6739 break
6740 fi
6741 done
6742 fi
7ffcf5d6 6743
ffac9597
JM
6744 ac_ext=c
6745ac_cpp='$CPP $CPPFLAGS'
6746ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6747ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6748ac_compiler_gnu=$ac_cv_c_compiler_gnu
6749
6750 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6751 if test x$ac_success = xno; then
6752 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6753 fi
6754 fi
6755 if test x$ac_success = xno; then
6756 HAVE_CXX11=0
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6758$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6759 else
6760 HAVE_CXX11=1
6761
6762$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6763
6764 fi
6765
6766
7ffcf5d6
TB
6767
6768 if test "${build}" != "${host}"; then
6769 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
6770 ac_ext=cpp
6771ac_cpp='$CXXCPP $CPPFLAGS'
6772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6775 ac_success=no
6776 ax_cv_cxx_compile_cxx11_orig_cxx="$CXX"
6777 ax_cv_cxx_compile_cxx11_orig_cxxflags="$CXXFLAGS"
6778 ax_cv_cxx_compile_cxx11_orig_cppflags="$CPPFLAGS"
6779 CXX="$CXX_FOR_BUILD"
6780 CXXFLAGS="$CXXFLAGS_FOR_BUILD"
6781 CPPFLAGS="$CPPFLAGS_FOR_BUILD"
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
6783$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
6784if ${ax_cv_cxx_compile_cxx11_FOR_BUILD+:} false; then :
6785 $as_echo_n "(cached) " >&6
6786else
6787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6788/* end confdefs.h. */
6789
6790
6791// If the compiler admits that it is not ready for C++11, why torture it?
6792// Hopefully, this will speed up the test.
6793
6794#ifndef __cplusplus
6795
6796#error "This is not a C++ compiler"
6797
6798#elif __cplusplus < 201103L
6799
6800#error "This is not a C++11 compiler"
6801
6802#else
6803
6804namespace cxx11
6805{
6806
6807 namespace test_static_assert
6808 {
6809
6810 template <typename T>
6811 struct check
6812 {
6813 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6814 };
6815
6816 }
6817
6818 namespace test_final_override
6819 {
6820
6821 struct Base
6822 {
6823 virtual ~Base() {}
6824 virtual void f() {}
6825 };
6826
6827 struct Derived : public Base
6828 {
6829 virtual ~Derived() override {}
6830 virtual void f() override {}
6831 };
6832
6833 }
6834
6835 namespace test_double_right_angle_brackets
6836 {
6837
6838 template < typename T >
6839 struct check {};
6840
6841 typedef check<void> single_type;
6842 typedef check<check<void>> double_type;
6843 typedef check<check<check<void>>> triple_type;
6844 typedef check<check<check<check<void>>>> quadruple_type;
6845
6846 }
6847
6848 namespace test_decltype
6849 {
6850
6851 int
6852 f()
6853 {
6854 int a = 1;
6855 decltype(a) b = 2;
6856 return a + b;
6857 }
6858
6859 }
6860
6861 namespace test_type_deduction
6862 {
6863
6864 template < typename T1, typename T2 >
6865 struct is_same
6866 {
6867 static const bool value = false;
6868 };
6869
6870 template < typename T >
6871 struct is_same<T, T>
6872 {
6873 static const bool value = true;
6874 };
6875
6876 template < typename T1, typename T2 >
6877 auto
6878 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6879 {
6880 return a1 + a2;
6881 }
6882
6883 int
6884 test(const int c, volatile int v)
6885 {
6886 static_assert(is_same<int, decltype(0)>::value == true, "");
6887 static_assert(is_same<int, decltype(c)>::value == false, "");
6888 static_assert(is_same<int, decltype(v)>::value == false, "");
6889 auto ac = c;
6890 auto av = v;
6891 auto sumi = ac + av + 'x';
6892 auto sumf = ac + av + 1.0;
6893 static_assert(is_same<int, decltype(ac)>::value == true, "");
6894 static_assert(is_same<int, decltype(av)>::value == true, "");
6895 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6896 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6897 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6898 return (sumf > 0.0) ? sumi : add(c, v);
6899 }
6900
6901 }
6902
6903 namespace test_noexcept
6904 {
6905
6906 int f() { return 0; }
6907 int g() noexcept { return 0; }
6908
6909 static_assert(noexcept(f()) == false, "");
6910 static_assert(noexcept(g()) == true, "");
6911
6912 }
6913
6914 namespace test_constexpr
6915 {
6916
6917 template < typename CharT >
6918 unsigned long constexpr
6919 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6920 {
6921 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6922 }
6923
6924 template < typename CharT >
6925 unsigned long constexpr
6926 strlen_c(const CharT *const s) noexcept
6927 {
6928 return strlen_c_r(s, 0UL);
6929 }
6930
6931 static_assert(strlen_c("") == 0UL, "");
6932 static_assert(strlen_c("1") == 1UL, "");
6933 static_assert(strlen_c("example") == 7UL, "");
6934 static_assert(strlen_c("another\0example") == 7UL, "");
6935
6936 }
6937
6938 namespace test_rvalue_references
6939 {
6940
6941 template < int N >
6942 struct answer
6943 {
6944 static constexpr int value = N;
6945 };
6946
6947 answer<1> f(int&) { return answer<1>(); }
6948 answer<2> f(const int&) { return answer<2>(); }
6949 answer<3> f(int&&) { return answer<3>(); }
6950
6951 void
6952 test()
6953 {
6954 int i = 0;
6955 const int c = 0;
6956 static_assert(decltype(f(i))::value == 1, "");
6957 static_assert(decltype(f(c))::value == 2, "");
6958 static_assert(decltype(f(0))::value == 3, "");
6959 }
6960
6961 }
6962
6963 namespace test_uniform_initialization
6964 {
6965
6966 struct test
6967 {
6968 static const int zero {};
6969 static const int one {1};
6970 };
6971
6972 static_assert(test::zero == 0, "");
6973 static_assert(test::one == 1, "");
6974
6975 }
6976
6977 namespace test_lambdas
6978 {
6979
6980 void
6981 test1()
6982 {
6983 auto lambda1 = [](){};
6984 auto lambda2 = lambda1;
6985 lambda1();
6986 lambda2();
6987 }
6988
6989 int
6990 test2()
6991 {
6992 auto a = [](int i, int j){ return i + j; }(1, 2);
6993 auto b = []() -> int { return '0'; }();
6994 auto c = [=](){ return a + b; }();
6995 auto d = [&](){ return c; }();
6996 auto e = [a, &b](int x) mutable {
6997 const auto identity = [](int y){ return y; };
6998 for (auto i = 0; i < a; ++i)
6999 a += b--;
7000 return x + identity(a + b);
7001 }(0);
7002 return a + b + c + d + e;
7003 }
7004
7005 int
7006 test3()
7007 {
7008 const auto nullary = [](){ return 0; };
7009 const auto unary = [](int x){ return x; };
7010 using nullary_t = decltype(nullary);
7011 using unary_t = decltype(unary);
7012 const auto higher1st = [](nullary_t f){ return f(); };
7013 const auto higher2nd = [unary](nullary_t f1){
7014 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7015 };
7016 return higher1st(nullary) + higher2nd(nullary)(unary);
7017 }
7018
7019 }
7020
7021 namespace test_variadic_templates
7022 {
7023
7024 template <int...>
7025 struct sum;
7026
7027 template <int N0, int... N1toN>
7028 struct sum<N0, N1toN...>
7029 {
7030 static constexpr auto value = N0 + sum<N1toN...>::value;
7031 };
7032
7033 template <>
7034 struct sum<>
7035 {
7036 static constexpr auto value = 0;
7037 };
7038
7039 static_assert(sum<>::value == 0, "");
7040 static_assert(sum<1>::value == 1, "");
7041 static_assert(sum<23>::value == 23, "");
7042 static_assert(sum<1, 2>::value == 3, "");
7043 static_assert(sum<5, 5, 11>::value == 21, "");
7044 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7045
7046 }
7047
7048 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7049 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7050 // because of this.
7051 namespace test_template_alias_sfinae
7052 {
7053
7054 struct foo {};
7055
7056 template<typename T>
7057 using member = typename T::member_type;
7058
7059 template<typename T>
7060 void func(...) {}
7061
7062 template<typename T>
7063 void func(member<T>*) {}
7064
7065 void test();
7066
7067 void test() { func<foo>(0); }
7068
7069 }
7070
7071} // namespace cxx11
7072
7073#endif // __cplusplus >= 201103L
7074
7075
7076
7077_ACEOF
7078if ac_fn_cxx_try_compile "$LINENO"; then :
7079 ax_cv_cxx_compile_cxx11_FOR_BUILD=yes
7080else
7081 ax_cv_cxx_compile_cxx11_FOR_BUILD=no
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084fi
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11_FOR_BUILD" >&5
7086$as_echo "$ax_cv_cxx_compile_cxx11_FOR_BUILD" >&6; }
7087 if test x$ax_cv_cxx_compile_cxx11_FOR_BUILD = xyes; then
7088 ac_success=yes
7089 fi
7090
7091 if test x$ac_success = xno; then
7092 for alternative in ${ax_cxx_compile_alternatives}; do
7093 switch="-std=gnu++${alternative}"
7094 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_FOR_BUILD_$switch" | $as_tr_sh`
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
7096$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
7097if eval \${$cachevar+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 ac_save_CXX="$CXX"
7101 CXX="$CXX $switch"
7102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7103/* end confdefs.h. */
7104
7105
7106// If the compiler admits that it is not ready for C++11, why torture it?
7107// Hopefully, this will speed up the test.
7108
7109#ifndef __cplusplus
7110
7111#error "This is not a C++ compiler"
7112
7113#elif __cplusplus < 201103L
7114
7115#error "This is not a C++11 compiler"
7116
7117#else
7118
7119namespace cxx11
7120{
7121
7122 namespace test_static_assert
7123 {
7124
7125 template <typename T>
7126 struct check
7127 {
7128 static_assert(sizeof(int) <= sizeof(T), "not big enough");
7129 };
7130
7131 }
7132
7133 namespace test_final_override
7134 {
7135
7136 struct Base
7137 {
7138 virtual ~Base() {}
7139 virtual void f() {}
7140 };
7141
7142 struct Derived : public Base
7143 {
7144 virtual ~Derived() override {}
7145 virtual void f() override {}
7146 };
7147
7148 }
7149
7150 namespace test_double_right_angle_brackets
7151 {
7152
7153 template < typename T >
7154 struct check {};
7155
7156 typedef check<void> single_type;
7157 typedef check<check<void>> double_type;
7158 typedef check<check<check<void>>> triple_type;
7159 typedef check<check<check<check<void>>>> quadruple_type;
7160
7161 }
7162
7163 namespace test_decltype
7164 {
7165
7166 int
7167 f()
7168 {
7169 int a = 1;
7170 decltype(a) b = 2;
7171 return a + b;
7172 }
7173
7174 }
7175
7176 namespace test_type_deduction
7177 {
7178
7179 template < typename T1, typename T2 >
7180 struct is_same
7181 {
7182 static const bool value = false;
7183 };
7184
7185 template < typename T >
7186 struct is_same<T, T>
7187 {
7188 static const bool value = true;
7189 };
7190
7191 template < typename T1, typename T2 >
7192 auto
7193 add(T1 a1, T2 a2) -> decltype(a1 + a2)
7194 {
7195 return a1 + a2;
7196 }
7197
7198 int
7199 test(const int c, volatile int v)
7200 {
7201 static_assert(is_same<int, decltype(0)>::value == true, "");
7202 static_assert(is_same<int, decltype(c)>::value == false, "");
7203 static_assert(is_same<int, decltype(v)>::value == false, "");
7204 auto ac = c;
7205 auto av = v;
7206 auto sumi = ac + av + 'x';
7207 auto sumf = ac + av + 1.0;
7208 static_assert(is_same<int, decltype(ac)>::value == true, "");
7209 static_assert(is_same<int, decltype(av)>::value == true, "");
7210 static_assert(is_same<int, decltype(sumi)>::value == true, "");
7211 static_assert(is_same<int, decltype(sumf)>::value == false, "");
7212 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7213 return (sumf > 0.0) ? sumi : add(c, v);
7214 }
7215
7216 }
7217
7218 namespace test_noexcept
7219 {
7220
7221 int f() { return 0; }
7222 int g() noexcept { return 0; }
7223
7224 static_assert(noexcept(f()) == false, "");
7225 static_assert(noexcept(g()) == true, "");
7226
7227 }
7228
7229 namespace test_constexpr
7230 {
7231
7232 template < typename CharT >
7233 unsigned long constexpr
7234 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7235 {
7236 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7237 }
7238
7239 template < typename CharT >
7240 unsigned long constexpr
7241 strlen_c(const CharT *const s) noexcept
7242 {
7243 return strlen_c_r(s, 0UL);
7244 }
7245
7246 static_assert(strlen_c("") == 0UL, "");
7247 static_assert(strlen_c("1") == 1UL, "");
7248 static_assert(strlen_c("example") == 7UL, "");
7249 static_assert(strlen_c("another\0example") == 7UL, "");
7250
7251 }
7252
7253 namespace test_rvalue_references
7254 {
7255
7256 template < int N >
7257 struct answer
7258 {
7259 static constexpr int value = N;
7260 };
7261
7262 answer<1> f(int&) { return answer<1>(); }
7263 answer<2> f(const int&) { return answer<2>(); }
7264 answer<3> f(int&&) { return answer<3>(); }
7265
7266 void
7267 test()
7268 {
7269 int i = 0;
7270 const int c = 0;
7271 static_assert(decltype(f(i))::value == 1, "");
7272 static_assert(decltype(f(c))::value == 2, "");
7273 static_assert(decltype(f(0))::value == 3, "");
7274 }
7275
7276 }
7277
7278 namespace test_uniform_initialization
7279 {
7280
7281 struct test
7282 {
7283 static const int zero {};
7284 static const int one {1};
7285 };
7286
7287 static_assert(test::zero == 0, "");
7288 static_assert(test::one == 1, "");
7289
7290 }
7291
7292 namespace test_lambdas
7293 {
7294
7295 void
7296 test1()
7297 {
7298 auto lambda1 = [](){};
7299 auto lambda2 = lambda1;
7300 lambda1();
7301 lambda2();
7302 }
7303
7304 int
7305 test2()
7306 {
7307 auto a = [](int i, int j){ return i + j; }(1, 2);
7308 auto b = []() -> int { return '0'; }();
7309 auto c = [=](){ return a + b; }();
7310 auto d = [&](){ return c; }();
7311 auto e = [a, &b](int x) mutable {
7312 const auto identity = [](int y){ return y; };
7313 for (auto i = 0; i < a; ++i)
7314 a += b--;
7315 return x + identity(a + b);
7316 }(0);
7317 return a + b + c + d + e;
7318 }
7319
7320 int
7321 test3()
7322 {
7323 const auto nullary = [](){ return 0; };
7324 const auto unary = [](int x){ return x; };
7325 using nullary_t = decltype(nullary);
7326 using unary_t = decltype(unary);
7327 const auto higher1st = [](nullary_t f){ return f(); };
7328 const auto higher2nd = [unary](nullary_t f1){
7329 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7330 };
7331 return higher1st(nullary) + higher2nd(nullary)(unary);
7332 }
7333
7334 }
7335
7336 namespace test_variadic_templates
7337 {
7338
7339 template <int...>
7340 struct sum;
7341
7342 template <int N0, int... N1toN>
7343 struct sum<N0, N1toN...>
7344 {
7345 static constexpr auto value = N0 + sum<N1toN...>::value;
7346 };
7347
7348 template <>
7349 struct sum<>
7350 {
7351 static constexpr auto value = 0;
7352 };
7353
7354 static_assert(sum<>::value == 0, "");
7355 static_assert(sum<1>::value == 1, "");
7356 static_assert(sum<23>::value == 23, "");
7357 static_assert(sum<1, 2>::value == 3, "");
7358 static_assert(sum<5, 5, 11>::value == 21, "");
7359 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7360
7361 }
7362
7363 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7364 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7365 // because of this.
7366 namespace test_template_alias_sfinae
7367 {
7368
7369 struct foo {};
7370
7371 template<typename T>
7372 using member = typename T::member_type;
7373
7374 template<typename T>
7375 void func(...) {}
7376
7377 template<typename T>
7378 void func(member<T>*) {}
7379
7380 void test();
7381
7382 void test() { func<foo>(0); }
7383
7384 }
7385
7386} // namespace cxx11
7387
7388#endif // __cplusplus >= 201103L
7389
7390
7391
7392_ACEOF
7393if ac_fn_cxx_try_compile "$LINENO"; then :
7394 eval $cachevar=yes
7395else
7396 eval $cachevar=no
7397fi
7398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7399 CXX="$ac_save_CXX"
7400fi
7401eval ac_res=\$$cachevar
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7403$as_echo "$ac_res" >&6; }
7404 if eval test x\$$cachevar = xyes; then
7405 CXX="$CXX $switch"
7406 if test -n "$CXXCPP" ; then
7407 CXXCPP="$CXXCPP $switch"
7408 fi
7409 ac_success=yes
7410 break
7411 fi
7412 done
7413 fi
7414
7415 if test x$ac_success = xno; then
7416 for alternative in ${ax_cxx_compile_alternatives}; do
7417 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
7418 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_FOR_BUILD_$switch" | $as_tr_sh`
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
7420$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
7421if eval \${$cachevar+:} false; then :
7422 $as_echo_n "(cached) " >&6
7423else
7424 ac_save_CXX="$CXX"
7425 CXX="$CXX $switch"
7426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7427/* end confdefs.h. */
7428
7429
7430// If the compiler admits that it is not ready for C++11, why torture it?
7431// Hopefully, this will speed up the test.
7432
7433#ifndef __cplusplus
7434
7435#error "This is not a C++ compiler"
7436
7437#elif __cplusplus < 201103L
7438
7439#error "This is not a C++11 compiler"
7440
7441#else
7442
7443namespace cxx11
7444{
7445
7446 namespace test_static_assert
7447 {
7448
7449 template <typename T>
7450 struct check
7451 {
7452 static_assert(sizeof(int) <= sizeof(T), "not big enough");
7453 };
7454
7455 }
7456
7457 namespace test_final_override
7458 {
7459
7460 struct Base
7461 {
7462 virtual ~Base() {}
7463 virtual void f() {}
7464 };
7465
7466 struct Derived : public Base
7467 {
7468 virtual ~Derived() override {}
7469 virtual void f() override {}
7470 };
7471
7472 }
7473
7474 namespace test_double_right_angle_brackets
7475 {
7476
7477 template < typename T >
7478 struct check {};
7479
7480 typedef check<void> single_type;
7481 typedef check<check<void>> double_type;
7482 typedef check<check<check<void>>> triple_type;
7483 typedef check<check<check<check<void>>>> quadruple_type;
7484
7485 }
7486
7487 namespace test_decltype
7488 {
7489
7490 int
7491 f()
7492 {
7493 int a = 1;
7494 decltype(a) b = 2;
7495 return a + b;
7496 }
7497
7498 }
7499
7500 namespace test_type_deduction
7501 {
7502
7503 template < typename T1, typename T2 >
7504 struct is_same
7505 {
7506 static const bool value = false;
7507 };
7508
7509 template < typename T >
7510 struct is_same<T, T>
7511 {
7512 static const bool value = true;
7513 };
7514
7515 template < typename T1, typename T2 >
7516 auto
7517 add(T1 a1, T2 a2) -> decltype(a1 + a2)
7518 {
7519 return a1 + a2;
7520 }
7521
7522 int
7523 test(const int c, volatile int v)
7524 {
7525 static_assert(is_same<int, decltype(0)>::value == true, "");
7526 static_assert(is_same<int, decltype(c)>::value == false, "");
7527 static_assert(is_same<int, decltype(v)>::value == false, "");
7528 auto ac = c;
7529 auto av = v;
7530 auto sumi = ac + av + 'x';
7531 auto sumf = ac + av + 1.0;
7532 static_assert(is_same<int, decltype(ac)>::value == true, "");
7533 static_assert(is_same<int, decltype(av)>::value == true, "");
7534 static_assert(is_same<int, decltype(sumi)>::value == true, "");
7535 static_assert(is_same<int, decltype(sumf)>::value == false, "");
7536 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7537 return (sumf > 0.0) ? sumi : add(c, v);
7538 }
7539
7540 }
7541
7542 namespace test_noexcept
7543 {
7544
7545 int f() { return 0; }
7546 int g() noexcept { return 0; }
7547
7548 static_assert(noexcept(f()) == false, "");
7549 static_assert(noexcept(g()) == true, "");
7550
7551 }
7552
7553 namespace test_constexpr
7554 {
7555
7556 template < typename CharT >
7557 unsigned long constexpr
7558 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7559 {
7560 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7561 }
7562
7563 template < typename CharT >
7564 unsigned long constexpr
7565 strlen_c(const CharT *const s) noexcept
7566 {
7567 return strlen_c_r(s, 0UL);
7568 }
7569
7570 static_assert(strlen_c("") == 0UL, "");
7571 static_assert(strlen_c("1") == 1UL, "");
7572 static_assert(strlen_c("example") == 7UL, "");
7573 static_assert(strlen_c("another\0example") == 7UL, "");
7574
7575 }
7576
7577 namespace test_rvalue_references
7578 {
7579
7580 template < int N >
7581 struct answer
7582 {
7583 static constexpr int value = N;
7584 };
7585
7586 answer<1> f(int&) { return answer<1>(); }
7587 answer<2> f(const int&) { return answer<2>(); }
7588 answer<3> f(int&&) { return answer<3>(); }
7589
7590 void
7591 test()
7592 {
7593 int i = 0;
7594 const int c = 0;
7595 static_assert(decltype(f(i))::value == 1, "");
7596 static_assert(decltype(f(c))::value == 2, "");
7597 static_assert(decltype(f(0))::value == 3, "");
7598 }
7599
7600 }
7601
7602 namespace test_uniform_initialization
7603 {
7604
7605 struct test
7606 {
7607 static const int zero {};
7608 static const int one {1};
7609 };
7610
7611 static_assert(test::zero == 0, "");
7612 static_assert(test::one == 1, "");
7613
7614 }
7615
7616 namespace test_lambdas
7617 {
7618
7619 void
7620 test1()
7621 {
7622 auto lambda1 = [](){};
7623 auto lambda2 = lambda1;
7624 lambda1();
7625 lambda2();
7626 }
7627
7628 int
7629 test2()
7630 {
7631 auto a = [](int i, int j){ return i + j; }(1, 2);
7632 auto b = []() -> int { return '0'; }();
7633 auto c = [=](){ return a + b; }();
7634 auto d = [&](){ return c; }();
7635 auto e = [a, &b](int x) mutable {
7636 const auto identity = [](int y){ return y; };
7637 for (auto i = 0; i < a; ++i)
7638 a += b--;
7639 return x + identity(a + b);
7640 }(0);
7641 return a + b + c + d + e;
7642 }
7643
7644 int
7645 test3()
7646 {
7647 const auto nullary = [](){ return 0; };
7648 const auto unary = [](int x){ return x; };
7649 using nullary_t = decltype(nullary);
7650 using unary_t = decltype(unary);
7651 const auto higher1st = [](nullary_t f){ return f(); };
7652 const auto higher2nd = [unary](nullary_t f1){
7653 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7654 };
7655 return higher1st(nullary) + higher2nd(nullary)(unary);
7656 }
7657
7658 }
7659
7660 namespace test_variadic_templates
7661 {
7662
7663 template <int...>
7664 struct sum;
7665
7666 template <int N0, int... N1toN>
7667 struct sum<N0, N1toN...>
7668 {
7669 static constexpr auto value = N0 + sum<N1toN...>::value;
7670 };
7671
7672 template <>
7673 struct sum<>
7674 {
7675 static constexpr auto value = 0;
7676 };
7677
7678 static_assert(sum<>::value == 0, "");
7679 static_assert(sum<1>::value == 1, "");
7680 static_assert(sum<23>::value == 23, "");
7681 static_assert(sum<1, 2>::value == 3, "");
7682 static_assert(sum<5, 5, 11>::value == 21, "");
7683 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7684
7685 }
7686
7687 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7688 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7689 // because of this.
7690 namespace test_template_alias_sfinae
7691 {
7692
7693 struct foo {};
7694
7695 template<typename T>
7696 using member = typename T::member_type;
7697
7698 template<typename T>
7699 void func(...) {}
7700
7701 template<typename T>
7702 void func(member<T>*) {}
7703
7704 void test();
7705
7706 void test() { func<foo>(0); }
7707
7708 }
7709
7710} // namespace cxx11
7711
7712#endif // __cplusplus >= 201103L
7713
7714
7715
7716_ACEOF
7717if ac_fn_cxx_try_compile "$LINENO"; then :
7718 eval $cachevar=yes
7719else
7720 eval $cachevar=no
7721fi
7722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7723 CXX="$ac_save_CXX"
7724fi
7725eval ac_res=\$$cachevar
7726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7727$as_echo "$ac_res" >&6; }
7728 if eval test x\$$cachevar = xyes; then
7729 CXX="$CXX $switch"
7730 if test -n "$CXXCPP" ; then
7731 CXXCPP="$CXXCPP $switch"
7732 fi
7733 ac_success=yes
7734 break
7735 fi
7736 done
7737 if test x$ac_success = xyes; then
7738 break
7739 fi
7740 done
7741 fi
7742 CXX_FOR_BUILD="$CXX"
7743 CXXFLAGS_FOR_BUILD="$CXXFLAGS"
7744 CPPFLAGS_FOR_BUILD="$CPPFLAGS"
7745 CXX="$ax_cv_cxx_compile_cxx11_orig_cxx"
7746 CXXFLAGS="$ax_cv_cxx_compile_cxx11_orig_cxxflags"
7747 CPPFLAGS="$ax_cv_cxx_compile_cxx11_orig_cppflags"
7748 ac_ext=c
7749ac_cpp='$CPP $CPPFLAGS'
7750ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7751ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7752ac_compiler_gnu=$ac_cv_c_compiler_gnu
7753
7754 if test x$ax_cxx_compile_cxx11_required = xtrue; then
7755 if test x$ac_success = xno; then
7756 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
7757 fi
7758 fi
7759 if test x$ac_success = xno; then
7760 HAVE_CXX11_FOR_BUILD=0
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
7762$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
7763 else
7764 HAVE_CXX11_FOR_BUILD=1
7765
7766$as_echo "#define HAVE_CXX11_FOR_BUILD 1" >>confdefs.h
7767
7768 fi
7769
7770
7771 fi
46070488
JM
7772fi
7773
4a5e71f2
L
7774# Check whether --enable-pgo-build was given.
7775if test "${enable_pgo_build+set}" = set; then :
7776 enableval=$enable_pgo_build; enable_pgo_build=$enableval
7777else
7778 enable_pgo_build=no
7779fi
7780
7781
7782# Issue errors and warnings for invalid/strange PGO build combinations.
7783case "$have_compiler:$host:$target:$enable_pgo_build" in
7784 *:*:*:no) ;;
7785
7786 # Allow the PGO build only if we aren't building a compiler and
7787 # we are in a native configuration.
7788 no:$build:$build:yes | no:$build:$build:lto) ;;
7789
7790 # Disallow the PGO bootstrap if we are building a compiler.
7791 yes:*:*:yes | yes:*:*:lto)
7792 as_fn_error $? "cannot perform the PGO bootstrap when building a compiler" "$LINENO" 5 ;;
7793
7794 *)
7795 as_fn_error $? "invalid option for --enable-pgo-build" "$LINENO" 5
7796 ;;
7797esac
7798
7799if test "$enable_pgo_build" != "no"; then
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fprofile-generate" >&5
7801$as_echo_n "checking whether the compiler supports -fprofile-generate... " >&6; }
7802 old_CFLAGS="$CFLAGS"
7803 PGO_BUILD_GEN_CFLAGS="-fprofile-generate"
7804 CFLAGS="$CFLAGS $PGO_BUILD_CFLAGS"
7805
7806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7807/* end confdefs.h. */
7808int foo;
7809_ACEOF
7810if ac_fn_c_try_compile "$LINENO"; then :
7811
7812else
7813 PGO_BUILD_GEN_CFLAGS=
7814fi
7815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7816 CFLAGS="$old_CFLAGS"
7817 if test -n "$PGO_BUILD_GEN_CFLAGS"; then
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7819$as_echo "yes" >&6; }
7820 PGO_BUILD_USE_CFLAGS="-fprofile-use"
7821 else
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824 as_fn_error $? "cannot perform the PGO build without -fprofile-generate" "$LINENO" 5
7825 fi
7826
7827 if test "$enable_pgo_build" = "lto"; then
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -flto=jobserver -ffat-lto-objects" >&5
7829$as_echo_n "checking whether the compiler supports -flto=jobserver -ffat-lto-objects... " >&6; }
7830 old_CFLAGS="$CFLAGS"
7831 PGO_BUILD_LTO_CFLAGS="-flto=jobserver -ffat-lto-objects"
7832 CFLAGS="$CFLAGS $PGO_BUILD_LTO_CFLAGS"
7833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7834/* end confdefs.h. */
7835int foo;
7836_ACEOF
7837if ac_fn_c_try_compile "$LINENO"; then :
7838
7839else
7840 PGO_BUILD_LTO_CFLAGS=
7841fi
7842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7843 CFLAGS="$old_CFLAGS"
7844 if test -n "$PGO_BUILD_LTO_CFLAGS"; then
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7846$as_echo "yes" >&6; }
7847 else
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7849$as_echo "no" >&6; }
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: LTO is disabled for the PGO build" >&5
7851$as_echo "$as_me: WARNING: LTO is disabled for the PGO build" >&2;}
7852 fi
7853 fi
7854fi
7855
7856
7857
7858
592c90ff
KG
7859# Used for setting $lt_cv_objdir
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7861$as_echo_n "checking for objdir... " >&6; }
22e05272 7862if ${lt_cv_objdir+:} false; then :
592c90ff
KG
7863 $as_echo_n "(cached) " >&6
7864else
7865 rm -f .libs 2>/dev/null
7866mkdir .libs 2>/dev/null
7867if test -d .libs; then
7868 lt_cv_objdir=.libs
7869else
7870 # MS-DOS does not allow filenames that begin with a dot.
7871 lt_cv_objdir=_libs
7872fi
7873rmdir .libs 2>/dev/null
7874fi
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7876$as_echo "$lt_cv_objdir" >&6; }
7877objdir=$lt_cv_objdir
7878
7879
7880
7881
7882
7883cat >>confdefs.h <<_ACEOF
7884#define LT_OBJDIR "$lt_cv_objdir/"
7885_ACEOF
7886
7887
7888
acd26225 7889# Check for GMP, MPFR and MPC
3a5729ea 7890gmplibs="-lmpc -lmpfr -lgmp"
6de9cd9a 7891gmpinc=
e69bf64b 7892have_gmp=no
acd26225
KG
7893
7894# Specify a location for mpc
7895# check for this first so it ends up on the link line before mpfr.
7896
5213506e
RW
7897# Check whether --with-mpc was given.
7898if test "${with_mpc+set}" = set; then :
7899 withval=$with_mpc;
7900fi
acd26225 7901
acd26225 7902
9965e3cd 7903# Check whether --with-mpc-include was given.
5213506e
RW
7904if test "${with_mpc_include+set}" = set; then :
7905 withval=$with_mpc_include;
7906fi
acd26225 7907
acd26225 7908
9965e3cd 7909# Check whether --with-mpc-lib was given.
5213506e
RW
7910if test "${with_mpc_lib+set}" = set; then :
7911 withval=$with_mpc_lib;
7912fi
acd26225 7913
acd26225
KG
7914
7915if test "x$with_mpc" != x; then
3a5729ea
KG
7916 gmplibs="-L$with_mpc/lib $gmplibs"
7917 gmpinc="-I$with_mpc/include $gmpinc"
acd26225
KG
7918fi
7919if test "x$with_mpc_include" != x; then
3a5729ea 7920 gmpinc="-I$with_mpc_include $gmpinc"
acd26225
KG
7921fi
7922if test "x$with_mpc_lib" != x; then
3a5729ea 7923 gmplibs="-L$with_mpc_lib $gmplibs"
acd26225
KG
7924fi
7925if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
592c90ff 7926 gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
3a5729ea 7927 gmpinc='-I$$s/mpc/src '"$gmpinc"
acd26225
KG
7928 # Do not test the mpc version. Assume that it is sufficient, since
7929 # it is in the source tree, and the library has not been built yet
7930 # but it would be included on the link line in the version check below
7931 # hence making the test fail.
3a5729ea 7932 have_gmp=yes
acd26225 7933fi
e69bf64b 7934
bebf829d
PB
7935# Specify a location for mpfr
7936# check for this first so it ends up on the link line before gmp.
1c710c3c 7937
5213506e
RW
7938# Check whether --with-mpfr was given.
7939if test "${with_mpfr+set}" = set; then :
7940 withval=$with_mpfr;
7941fi
1c710c3c 7942
bebf829d 7943
9965e3cd 7944# Check whether --with-mpfr-include was given.
5213506e
RW
7945if test "${with_mpfr_include+set}" = set; then :
7946 withval=$with_mpfr_include;
7947fi
1c710c3c 7948
8a877c9c 7949
9965e3cd 7950# Check whether --with-mpfr-lib was given.
5213506e
RW
7951if test "${with_mpfr_lib+set}" = set; then :
7952 withval=$with_mpfr_lib;
7953fi
8a877c9c 7954
bebf829d
PB
7955
7956if test "x$with_mpfr" != x; then
7957 gmplibs="-L$with_mpfr/lib $gmplibs"
3a5729ea 7958 gmpinc="-I$with_mpfr/include $gmpinc"
bebf829d 7959fi
8a877c9c 7960if test "x$with_mpfr_include" != x; then
3a5729ea 7961 gmpinc="-I$with_mpfr_include $gmpinc"
8a877c9c
KG
7962fi
7963if test "x$with_mpfr_lib" != x; then
7964 gmplibs="-L$with_mpfr_lib $gmplibs"
7965fi
e69bf64b 7966if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
8f3675f8
MR
7967 # MPFR v3.1.0 moved the sources into a src sub-directory.
7968 if ! test -d ${srcdir}/mpfr/src; then
22e05272 7969 as_fn_error $? "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5
8f3675f8 7970 fi
00f35794
BE
7971 gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
7972 gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
7973 extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
e69bf64b
PB
7974 # Do not test the mpfr version. Assume that it is sufficient, since
7975 # it is in the source tree, and the library has not been built yet
7976 # but it would be included on the link line in the version check below
7977 # hence making the test fail.
7978 have_gmp=yes
7979fi
bebf829d 7980
6de9cd9a 7981# Specify a location for gmp
1c710c3c 7982
5213506e
RW
7983# Check whether --with-gmp was given.
7984if test "${with_gmp+set}" = set; then :
7985 withval=$with_gmp;
7986fi
1c710c3c 7987
6de9cd9a 7988
9965e3cd 7989# Check whether --with-gmp-include was given.
5213506e
RW
7990if test "${with_gmp_include+set}" = set; then :
7991 withval=$with_gmp_include;
7992fi
1c710c3c 7993
8a877c9c 7994
9965e3cd 7995# Check whether --with-gmp-lib was given.
5213506e
RW
7996if test "${with_gmp_lib+set}" = set; then :
7997 withval=$with_gmp_lib;
7998fi
8a877c9c
KG
7999
8000
6de9cd9a 8001
bebf829d
PB
8002if test "x$with_gmp" != x; then
8003 gmplibs="-L$with_gmp/lib $gmplibs"
8004 gmpinc="-I$with_gmp/include $gmpinc"
6de9cd9a 8005fi
8a877c9c
KG
8006if test "x$with_gmp_include" != x; then
8007 gmpinc="-I$with_gmp_include $gmpinc"
8008fi
8009if test "x$with_gmp_lib" != x; then
8010 gmplibs="-L$with_gmp_lib $gmplibs"
8011fi
e69bf64b 8012if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
592c90ff 8013 gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
e69bf64b 8014 gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
9183bdcf 8015 extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir"
592c90ff 8016 extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir"
0ff2d841 8017 extra_isl_gmp_configure_flags='--with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp'
e69bf64b
PB
8018 # Do not test the gmp version. Assume that it is sufficient, since
8019 # it is in the source tree, and the library has not been built yet
8020 # but it would be included on the link line in the version check below
8021 # hence making the test fail.
8022 have_gmp=yes
8023fi
6de9cd9a 8024
d943d7c4 8025if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
e69bf64b
PB
8026 have_gmp=yes
8027 saved_CFLAGS="$CFLAGS"
8028 CFLAGS="$CFLAGS $gmpinc"
362c6d2f
KG
8029 # Check for the recommended and required versions of GMP.
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of gmp.h" >&5
8031$as_echo_n "checking for the correct version of gmp.h... " >&6; }
4a5e71f2 8032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
362c6d2f
KG
8033/* end confdefs.h. */
8034#include "gmp.h"
8035int
8036main ()
8037{
8038
8039 #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
8040 #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
385c0681 8041 #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3)
362c6d2f
KG
8042 choke me
8043 #endif
8044
8045 ;
8046 return 0;
8047}
8048_ACEOF
8049if ac_fn_c_try_compile "$LINENO"; then :
e8fd69bb 8050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c 8051/* end confdefs.h. */
362c6d2f 8052#include <gmp.h>
1c710c3c
DJ
8053int
8054main ()
8055{
6de9cd9a 8056
362c6d2f
KG
8057 #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
8058 #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
8059 #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
e69bf64b
PB
8060 choke me
8061 #endif
1c710c3c
DJ
8062
8063 ;
8064 return 0;
8065}
8066_ACEOF
5213506e
RW
8067if ac_fn_c_try_compile "$LINENO"; then :
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8069$as_echo "yes" >&6; }
362c6d2f
KG
8070else
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
8072$as_echo "buggy but acceptable" >&6; }
8073fi
8074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1c710c3c 8075else
5213506e
RW
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }; have_gmp=no
1c710c3c 8078fi
5213506e 8079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6de9cd9a 8080
acd26225 8081 # If we have GMP, check the MPFR version.
e69bf64b 8082 if test x"$have_gmp" = xyes; then
362c6d2f
KG
8083 # Check for the recommended and required versions of MPFR.
8084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpfr.h" >&5
8085$as_echo_n "checking for the correct version of mpfr.h... " >&6; }
5213506e 8086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c 8087/* end confdefs.h. */
70ec446f 8088#include <gmp.h>
e69bf64b 8089 #include <mpfr.h>
1c710c3c
DJ
8090int
8091main ()
8092{
e48d66a9 8093
8be34204 8094 #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0)
e69bf64b
PB
8095 choke me
8096 #endif
1c710c3c
DJ
8097
8098 ;
8099 return 0;
8100}
8101_ACEOF
5213506e
RW
8102if ac_fn_c_try_compile "$LINENO"; then :
8103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1c710c3c 8104/* end confdefs.h. */
a3993f33 8105#include <gmp.h>
e69bf64b 8106 #include <mpfr.h>
1c710c3c
DJ
8107int
8108main ()
8109{
a3993f33 8110
8be34204 8111 #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,6)
e69bf64b
PB
8112 choke me
8113 #endif
acd26225
KG
8114
8115 ;
8116 return 0;
8117}
8118_ACEOF
5213506e
RW
8119if ac_fn_c_try_compile "$LINENO"; then :
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8121$as_echo "yes" >&6; }
acd26225 8122else
5213506e
RW
8123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
8124$as_echo "buggy but acceptable" >&6; }
acd26225 8125fi
5213506e 8126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
acd26225 8127else
5213506e
RW
8128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }; have_gmp=no
acd26225 8130fi
5213506e 8131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
acd26225
KG
8132 fi
8133
8134 # Check for the MPC header version.
3a5729ea 8135 if test x"$have_gmp" = xyes ; then
362c6d2f 8136 # Check for the recommended and required versions of MPC.
5213506e
RW
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5
8138$as_echo_n "checking for the correct version of mpc.h... " >&6; }
8139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
acd26225
KG
8140/* end confdefs.h. */
8141#include <mpc.h>
8142int
8143main ()
8144{
8145
362c6d2f
KG
8146 #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
8147 choke me
8148 #endif
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154if ac_fn_c_try_compile "$LINENO"; then :
8155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8156/* end confdefs.h. */
8157#include <mpc.h>
8158int
8159main ()
8160{
8161
8162 #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
acd26225
KG
8163 choke me
8164 #endif
8165
8166 ;
8167 return 0;
8168}
8169_ACEOF
5213506e
RW
8170if ac_fn_c_try_compile "$LINENO"; then :
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3a5729ea 8172$as_echo "yes" >&6; }
362c6d2f
KG
8173else
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
8175$as_echo "buggy but acceptable" >&6; }
8176fi
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
acd26225 8178else
5213506e 8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3a5729ea 8180$as_echo "no" >&6; }; have_gmp=no
acd26225 8181fi
5213506e 8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
acd26225
KG
8183 fi
8184
8185 # Now check the MPFR library.
8186 if test x"$have_gmp" = xyes; then
8187 saved_LIBS="$LIBS"
8188 LIBS="$LIBS $gmplibs"
3a5729ea
KG
8189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr/mpc libraries" >&5
8190$as_echo_n "checking for the correct version of the gmp/mpfr/mpc libraries... " >&6; }
5213506e 8191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
acd26225 8192/* end confdefs.h. */
3a5729ea 8193#include <mpc.h>
acd26225
KG
8194int
8195main ()
8196{
8197
8198 mpfr_t n;
8199 mpfr_t x;
3a5729ea 8200 mpc_t c;
acd26225
KG
8201 int t;
8202 mpfr_init (n);
8203 mpfr_init (x);
90ca6847
TB
8204 mpfr_atan2 (n, n, x, MPFR_RNDN);
8205 mpfr_erfc (n, x, MPFR_RNDN);
8206 mpfr_subnormalize (x, t, MPFR_RNDN);
3a5729ea
KG
8207 mpfr_clear(n);
8208 mpfr_clear(x);
8209 mpc_init2 (c, 53);
8210 mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
8211 mpc_cosh (c, c, MPC_RNDNN);
8212 mpc_pow (c, c, c, MPC_RNDNN);
8213 mpc_acosh (c, c, MPC_RNDNN);
8214 mpc_clear (c);
1c710c3c
DJ
8215
8216 ;
8217 return 0;
8218}
8219_ACEOF
5213506e
RW
8220if ac_fn_c_try_link "$LINENO"; then :
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8222$as_echo "yes" >&6; }
1c710c3c 8223else
5213506e
RW
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8225$as_echo "no" >&6; }; have_gmp=no
1c710c3c 8226fi
5213506e
RW
8227rm -f core conftest.err conftest.$ac_objext \
8228 conftest$ac_exeext conftest.$ac_ext
acd26225
KG
8229 LIBS="$saved_LIBS"
8230 fi
8231
e69bf64b 8232 CFLAGS="$saved_CFLAGS"
6de9cd9a 8233
362c6d2f
KG
8234# The library versions listed in the error message below should match
8235# the HARD-minimums enforced above.
e69bf64b 8236 if test x$have_gmp != xyes; then
8be34204 8237 as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
3a5729ea
KG
8238Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
8239their locations. Source code for these libraries can be found at
8240their respective hosting sites as well as at
aeebd94c 8241https://gcc.gnu.org/pub/gcc/infrastructure/. See also
45ab87d4 8242http://gcc.gnu.org/install/prerequisites.html for additional info. If
3a5729ea
KG
8243you obtained GMP, MPFR and/or MPC from a vendor distribution package,
8244make sure that you have installed both the libraries and the header
8245files. They may be located in separate packages." "$LINENO" 5
e69bf64b 8246 fi
70ec446f
KG
8247fi
8248
acd26225
KG
8249# Flags needed for both GMP, MPFR and/or MPC.
8250
8251
6de9cd9a
DN
8252
8253
8254
9e3eba15 8255
0ff2d841 8256
0b21f5d3 8257# Libraries to use for stage1 or when not bootstrapping.
00020c16 8258
0b21f5d3
EB
8259# Check whether --with-stage1-libs was given.
8260if test "${with_stage1_libs+set}" = set; then :
8261 withval=$with_stage1_libs; if test "$withval" = "no" -o "$withval" = "yes"; then
8262 stage1_libs=
00020c16 8263 else
0b21f5d3 8264 stage1_libs=$withval
00020c16
ILT
8265 fi
8266else
5dc85f7e 8267 stage1_libs=
5213506e
RW
8268fi
8269
00020c16
ILT
8270
8271
aac9103b
TT
8272# Whether or not to use -static-libstdc++ and -static-libgcc. The
8273# default is yes if gcc is being built; no otherwise. The reason for
8274# this default is that gdb is sometimes linked against GNU Source
8275# Highlight, which is a shared library that uses C++ exceptions. In
8276# this case, -static-libstdc++ will cause crashes.
8277
8278# Check whether --with-static-standard-libraries was given.
8279if test "${with_static_standard_libraries+set}" = set; then :
8280 withval=$with_static_standard_libraries;
8281else
8282 with_static_standard_libraries=auto
8283fi
8284
8285if test "$with_static_standard_libraries" = auto; then
8286 with_static_standard_libraries=$have_compiler
8287fi
8288
0b21f5d3 8289# Linker flags to use for stage1 or when not bootstrapping.
00020c16 8290
0b21f5d3
EB
8291# Check whether --with-stage1-ldflags was given.
8292if test "${with_stage1_ldflags+set}" = set; then :
8293 withval=$with_stage1_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then
8294 stage1_ldflags=
00020c16 8295 else
0b21f5d3 8296 stage1_ldflags=$withval
00020c16
ILT
8297 fi
8298else
0b21f5d3
EB
8299 stage1_ldflags=
8300 # In stage 1, default to linking libstdc++ and libgcc statically with GCC
8301 # if supported. But if the user explicitly specified the libraries to use,
8302 # trust that they are doing what they want.
aac9103b
TT
8303 if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
8304 -a "$have_static_libs" = yes; then
0b21f5d3
EB
8305 stage1_ldflags="-static-libstdc++ -static-libgcc"
8306 fi
5213506e
RW
8307fi
8308
00020c16
ILT
8309
8310
5dc85f7e 8311# Libraries to use for stage2 and later builds.
00020c16 8312
5213506e
RW
8313# Check whether --with-boot-libs was given.
8314if test "${with_boot_libs+set}" = set; then :
8315 withval=$with_boot_libs; if test "$withval" = "no" -o "$withval" = "yes"; then
e90e6bd7
ILT
8316 poststage1_libs=
8317 else
8318 poststage1_libs=$withval
8319 fi
8320else
5dc85f7e 8321 poststage1_libs=
5213506e
RW
8322fi
8323
00020c16
ILT
8324
8325
ed2eaa9f
ILT
8326# Linker flags to use for stage2 and later builds.
8327
8328# Check whether --with-boot-ldflags was given.
8329if test "${with_boot_ldflags+set}" = set; then :
8330 withval=$with_boot_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then
8331 poststage1_ldflags=
8332 else
8333 poststage1_ldflags=$withval
8334 fi
8335else
8336 poststage1_ldflags=
bec93d73
ILT
8337 # In stages 2 and 3, default to linking libstdc++ and libgcc
8338 # statically. But if the user explicitly specified the libraries to
8339 # use, trust that they are doing what they want.
8340 if test "$poststage1_libs" = ""; then
ed2eaa9f
ILT
8341 poststage1_ldflags="-static-libstdc++ -static-libgcc"
8342 fi
8343fi
8344
8345
8346
e357a5e0 8347# GCC GRAPHITE dependency isl.
4a9bb2aa 8348# Basic setup is inlined here, actual checks are in config/isl.m4
f8bf9252
SP
8349
8350
33ad93b9
RG
8351# Check whether --with-isl was given.
8352if test "${with_isl+set}" = set; then :
8353 withval=$with_isl;
5213506e 8354fi
f8bf9252 8355
f8bf9252 8356
eae1a5d4 8357# Treat --without-isl as a request to disable
625afa23 8358# GRAPHITE support and skip all following checks.
eae1a5d4 8359if test "x$with_isl" != "xno"; then
e357a5e0 8360 # Check for isl
625afa23
RG
8361
8362
33ad93b9
RG
8363# Check whether --with-isl-include was given.
8364if test "${with_isl_include+set}" = set; then :
8365 withval=$with_isl_include;
5213506e
RW
8366fi
8367
f8bf9252 8368
33ad93b9
RG
8369# Check whether --with-isl-lib was given.
8370if test "${with_isl_lib+set}" = set; then :
8371 withval=$with_isl_lib;
5213506e 8372fi
f8bf9252 8373
f8bf9252 8374
33ad93b9
RG
8375 # Check whether --enable-isl-version-check was given.
8376if test "${enable_isl_version_check+set}" = set; then :
8377 enableval=$enable_isl_version_check; ENABLE_ISL_CHECK=$enableval
8378else
8379 ENABLE_ISL_CHECK=yes
7d32a440
SP
8380fi
8381
8382
33ad93b9
RG
8383 # Initialize isllibs and islinc.
8384 case $with_isl in
8385 no)
8386 isllibs=
8387 islinc=
8388 ;;
8389 "" | yes)
8390 ;;
8391 *)
8392 isllibs="-L$with_isl/lib"
8393 islinc="-I$with_isl/include"
8394 ;;
8395 esac
8396 if test "x${with_isl_include}" != x ; then
8397 islinc="-I$with_isl_include"
8398 fi
8399 if test "x${with_isl_lib}" != x; then
8400 isllibs="-L$with_isl_lib"
8401 fi
8402 if test "x${islinc}" = x && test "x${isllibs}" = x \
8403 && test -d ${srcdir}/isl; then
8404 isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
8405 islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
8406 ENABLE_ISL_CHECK=no
560d18d3
AK
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
8408$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
33ad93b9 8409 fi
7d32a440 8410
eae1a5d4
RG
8411 isllibs="${isllibs} -lisl"
8412
7d32a440 8413
7d32a440 8414
9847828b
RB
8415 if test "${ENABLE_ISL_CHECK}" = yes ; then
8416 _isl_saved_CFLAGS=$CFLAGS
8417 _isl_saved_LDFLAGS=$LDFLAGS
8418 _isl_saved_LIBS=$LIBS
8419
8420 CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
70decafb
NS
8421 LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
8422 LIBS="${_isl_saved_LIBS} -lisl -lgmp"
9847828b 8423
f877b3ad
RB
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.15 or later" >&5
8425$as_echo_n "checking for isl 0.15 or later... " >&6; }
e0c0c325 8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
622dbadf 8427/* end confdefs.h. */
f877b3ad 8428#include <isl/schedule.h>
622dbadf
BC
8429int
8430main ()
8431{
f877b3ad 8432isl_options_set_schedule_serialize_sccs (NULL, 0);
622dbadf
BC
8433 ;
8434 return 0;
8435}
8436_ACEOF
8437if ac_fn_c_try_link "$LINENO"; then :
9847828b 8438 gcc_cv_isl=yes
622dbadf
BC
8439else
8440 gcc_cv_isl=no
8441fi
8442rm -f core conftest.err conftest.$ac_objext \
8443 conftest$ac_exeext conftest.$ac_ext
9847828b
RB
8444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
8445$as_echo "$gcc_cv_isl" >&6; }
8446
560d18d3 8447 if test "${gcc_cv_isl}" = no ; then
f877b3ad
RB
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: required isl version is 0.15 or later" >&5
8449$as_echo "required isl version is 0.15 or later" >&6; }
1e050c90
AK
8450 fi
8451
9847828b
RB
8452 CFLAGS=$_isl_saved_CFLAGS
8453 LDFLAGS=$_isl_saved_LDFLAGS
8454 LIBS=$_isl_saved_LIBS
8455 fi
8456
8457
f8bf9252 8458
f8bf9252 8459
33ad93b9
RG
8460
8461
33ad93b9
RG
8462 if test "x${with_isl}" = xno; then
8463 graphite_requested=no
8464 elif test "x${with_isl}" != x \
8465 || test "x${with_isl_include}" != x \
8466 || test "x${with_isl_lib}" != x ; then
8467 graphite_requested=yes
8468 else
8469 graphite_requested=no
7d32a440 8470 fi
d789184e 8471
d789184e
SP
8472
8473
33ad93b9
RG
8474 if test "${gcc_cv_isl}" = no ; then
8475 isllibs=
8476 islinc=
8477 fi
8478
8479 if test "${graphite_requested}" = yes \
8480 && test "x${isllibs}" = x \
8481 && test "x${islinc}" = x ; then
f8bf9252 8482
22e05272 8483 as_fn_error $? "Unable to find a usable isl. See config.log for details." "$LINENO" 5
33ad93b9 8484 fi
f8bf9252 8485
d32ef397 8486
d32ef397
AS
8487fi
8488
e357a5e0 8489# If the isl check failed, disable builds of in-tree variant of isl
625afa23 8490if test "x$with_isl" = xno ||
625afa23 8491 test "x$gcc_cv_isl" = xno; then
4a9bb2aa 8492 noconfigdirs="$noconfigdirs isl"
625afa23 8493 islinc=
32d024bf
RG
8494fi
8495
625afa23
RG
8496
8497
8498
d7f09764
DN
8499# Check for LTO support.
8500# Check whether --enable-lto was given.
8501if test "${enable_lto+set}" = set; then :
8502 enableval=$enable_lto; enable_lto=$enableval
8503else
8504 enable_lto=yes; default_enable_lto=yes
8505fi
8506
8507
7413962d 8508
9a02962b
DK
8509
8510
8511target_elf=no
8512case $target in
8513 *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
e44dbbe1 8514 *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
8f56cb51 8515 alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux* | \
8ae12d71 8516 nvptx-*-none)
9a02962b
DK
8517 target_elf=no
8518 ;;
8519 *)
8520 target_elf=yes
8521 ;;
8522esac
8523
8524if test $target_elf = yes; then :
48215350
DK
8525 # ELF platforms build the lto-plugin always.
8526 build_lto_plugin=yes
9a02962b 8527
9a02962b
DK
8528else
8529 if test x"$default_enable_lto" = x"yes" ; then
bb79486c 8530 case $target in
deeba76a 8531 *-apple-darwin[912]* | *-cygwin* | *-mingw* | *djgpp*) ;;
48215350 8532 # On other non-ELF platforms, LTO has yet to be validated.
bb79486c
JH
8533 *) enable_lto=no ;;
8534 esac
9a02962b 8535 else
db50fe7d
IS
8536 # Apart from ELF platforms, only Windows and Darwin support LTO so far.
8537 # It would also be nice to check the binutils support, but we don't
9a02962b
DK
8538 # have gcc_GAS_CHECK_FEATURE available here. For now, we'll just
8539 # warn during gcc/ subconfigure; unless you're bootstrapping with
8540 # -flto it won't be needed until after installation anyway.
8541 case $target in
9e530bcd 8542 *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
9a02962b 8543 *) if test x"$enable_lto" = x"yes"; then
22e05272 8544 as_fn_error $? "LTO support is not enabled for this target." "$LINENO" 5
9a02962b
DK
8545 fi
8546 ;;
8547 esac
8548 fi
1cd0b716 8549 # Among non-ELF, only Windows platforms support the lto-plugin so far.
48215350 8550 # Build it unless LTO was explicitly disabled.
1cd0b716 8551 case $target in
48215350 8552 *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
1cd0b716
DK
8553 *) ;;
8554 esac
48215350 8555
9a02962b
DK
8556fi
8557
d7f09764 8558
45b3824d
TS
8559# Check whether --enable-linker-plugin-configure-flags was given.
8560if test "${enable_linker_plugin_configure_flags+set}" = set; then :
8561 enableval=$enable_linker_plugin_configure_flags; extra_linker_plugin_configure_flags=$enableval
8562else
8563 extra_linker_plugin_configure_flags=
8564fi
8565
8566
8567# Check whether --enable-linker-plugin-flags was given.
8568if test "${enable_linker_plugin_flags+set}" = set; then :
8569 enableval=$enable_linker_plugin_flags; extra_linker_plugin_flags=$enableval
8570else
8571 extra_linker_plugin_flags=
8572fi
8573
8574
8575
cdfee50a
NS
8576# Enable --enable-host-shared.
8577# Checked early to determine whether jit is an 'all' language
8578# Check whether --enable-host-shared was given.
8579if test "${enable_host_shared+set}" = set; then :
8580 enableval=$enable_host_shared; host_shared=$enableval
1edfc8f2 8581 case $host in
a1d2b162
IS
8582 x86_64-*-darwin* | aarch64-*-darwin*)
8583 if test x$host_shared != xyes ; then
8584 # PIC is the default, and actually cannot be switched off.
8585 echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2
8586 host_shared=yes
8587 fi ;;
8588 *) ;;
8589 esac
cdfee50a 8590else
1edfc8f2 8591 case $host in
a1d2b162
IS
8592 x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;;
8593 *) host_shared=no ;;
8594 esac
cdfee50a
NS
8595fi
8596
8597
f8bf9252 8598
0823efed 8599# By default, C and C++ are the only stage 1 languages.
e1888513 8600stage1_languages=,c,
2805b53a 8601
00020c16 8602# Target libraries that we bootstrap.
ad1e5170 8603bootstrap_target_libs=,target-libgcc,
00020c16 8604
55ffb5ed
NN
8605# Figure out what language subdirectories are present.
8606# Look if the user specified --enable-languages="..."; if not, use
8607# the environment variable $LANGUAGES if defined. $LANGUAGES might
8608# go away some day.
8609# NB: embedded tabs in this IF block -- do not untabify
8610if test -d ${srcdir}/gcc; then
8611 if test x"${enable_languages+set}" != xset; then
8612 if test x"${LANGUAGES+set}" = xset; then
8613 enable_languages="${LANGUAGES}"
6b1786aa 8614 echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
55ffb5ed 8615 else
cdfee50a 8616 enable_languages=default
55ffb5ed
NN
8617 fi
8618 else
8619 if test x"${enable_languages}" = x ||
8620 test x"${enable_languages}" = xyes;
8621 then
6b1786aa 8622 echo configure.ac: --enable-languages needs at least one language argument 1>&2
55ffb5ed
NN
8623 exit 1
8624 fi
8625 fi
8626 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8627
7f26dfa3
FXC
8628 # 'f95' is the old name for the 'fortran' language. We issue a warning
8629 # and make the substitution.
8630 case ,${enable_languages}, in
8631 *,f95,*)
6b1786aa 8632 echo configure.ac: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
7f26dfa3
FXC
8633 enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
8634 ;;
8635 esac
8636
0823efed
DN
8637 # If bootstrapping, C++ must be enabled.
8638 case ",$enable_languages,:$enable_bootstrap" in
8639 *,c++,*:*) ;;
8640 *:yes)
ff3ac0f4
ILT
8641 if test -f ${srcdir}/gcc/cp/config-lang.in; then
8642 enable_languages="${enable_languages},c++"
8643 else
22e05272 8644 as_fn_error $? "bootstrapping requires c++ sources" "$LINENO" 5
ff3ac0f4
ILT
8645 fi
8646 ;;
8647 esac
8648
55ffb5ed
NN
8649 # First scan to see if an enabled language requires some other language.
8650 # We assume that a given config-lang.in will list all the language
8651 # front ends it requires, even if some are required indirectly.
8652 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
8653 case ${lang_frag} in
8654 ..) ;;
8655 # The odd quoting in the next line works around
8656 # an apparent bug in bash 1.12 on linux.
8657 ${srcdir}/gcc/[*]/config-lang.in) ;;
8658 *)
69ecd18f
ILT
8659 # From the config-lang.in, get $language, $lang_requires, and
8660 # $lang_requires_boot_languages.
55ffb5ed
NN
8661 language=
8662 lang_requires=
69ecd18f 8663 lang_requires_boot_languages=
d4360477
NS
8664 # set srcdir during sourcing lang_frag to the gcc dir.
8665 # Sadly overriding srcdir on the . line doesn't work in plain sh as it
8666 # polutes this shell
8667 saved_srcdir=${srcdir}
8668 srcdir=${srcdir}/gcc . ${lang_frag}
8669 srcdir=${saved_srcdir}
69ecd18f 8670 for other in ${lang_requires} ${lang_requires_boot_languages}; do
55ffb5ed
NN
8671 case ,${enable_languages}, in
8672 *,$other,*) ;;
cdfee50a 8673 *,default,*) ;;
55ffb5ed
NN
8674 *,all,*) ;;
8675 *,$language,*)
8676 echo " \`$other' language required by \`$language'; enabling" 1>&2
8677 enable_languages="${enable_languages},${other}"
8678 ;;
8679 esac
8680 done
69ecd18f
ILT
8681 for other in ${lang_requires_boot_languages} ; do
8682 if test "$other" != "c"; then
8683 case ,${enable_stage1_languages}, in
8684 *,$other,*) ;;
cdfee50a 8685 *,default,*) ;;
69ecd18f
ILT
8686 *,all,*) ;;
8687 *)
8688 case ,${enable_languages}, in
8689 *,$language,*)
8690 echo " '$other' language required by '$language' in stage 1; enabling" 1>&2
8691 enable_stage1_languages="$enable_stage1_languages,${other}"
8692 ;;
8693 esac
8694 ;;
8695 esac
8696 fi
8697 done
55ffb5ed
NN
8698 ;;
8699 esac
8700 done
8701
e1888513 8702 new_enable_languages=,c,
d7f09764
DN
8703
8704 # If LTO is enabled, add the LTO front end.
d7f09764 8705 if test "$enable_lto" = "yes" ; then
e4c5bd48
RW
8706 case ,${enable_languages}, in
8707 *,lto,*) ;;
8708 *) enable_languages="${enable_languages},lto" ;;
8709 esac
1cd0b716 8710 if test "${build_lto_plugin}" = "yes" ; then
d7f09764 8711 configdirs="$configdirs lto-plugin"
d7f09764
DN
8712 fi
8713 fi
8714
426c1eb0
TS
8715 # If we're building an offloading compiler, add the LTO front end.
8716 if test x"$enable_as_accelerator_for" != x ; then
8717 case ,${enable_languages}, in
8718 *,lto,*) ;;
8719 *) enable_languages="${enable_languages},lto" ;;
8720 esac
8721 fi
8722
cdfee50a 8723 missing_languages=`echo ",$enable_languages," | sed -e s/,default,/,/ -e s/,all,/,/ -e s/,c,/,/ `
e1888513 8724 potential_languages=,c,
55ffb5ed 8725
4da3b0f8
ILT
8726 enabled_target_libs=
8727 disabled_target_libs=
8728
55ffb5ed
NN
8729 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
8730 case ${lang_frag} in
8731 ..) ;;
8732 # The odd quoting in the next line works around
8733 # an apparent bug in bash 1.12 on linux.
8734 ${srcdir}/gcc/[*]/config-lang.in) ;;
8735 *)
1c710c3c 8736 # From the config-lang.in, get $language, $target_libs,
2805b53a 8737 # $lang_dirs, $boot_language, and $build_by_default
55ffb5ed
NN
8738 language=
8739 target_libs=
8740 lang_dirs=
1546bb64 8741 subdir_requires=
e1888513
PB
8742 boot_language=no
8743 build_by_default=yes
d4360477
NS
8744 # set srcdir during sourcing. See above about save & restore
8745 saved_srcdir=${srcdir}
8746 srcdir=${srcdir}/gcc . ${lang_frag}
8747 srcdir=${saved_srcdir}
e1888513
PB
8748 if test x${language} = x; then
8749 echo "${lang_frag} doesn't set \$language." 1>&2
8750 exit 1
8751 fi
8752
78767fd9 8753 if test "$language" = "c++"; then
0823efed 8754 boot_language=yes
00020c16
ILT
8755 fi
8756
178f875a 8757 add_this_lang=no
cdfee50a
NS
8758 # C is always enabled, so no need to add it again
8759 if test "$language" != "c"; then
8760 case ,${enable_languages}, in
8761 *,${language},*)
8762 # Language was explicitly selected; include it
d4a10d0a 8763 add_this_lang=yes
cdfee50a
NS
8764 ;;
8765 *,all,*)
8766 # All languages are enabled
8767 add_this_lang=all
8768 ;;
8769 *,default,*)
8770 # 'default' was selected, select it if it is a default language
178f875a 8771 add_this_lang=${build_by_default}
cdfee50a
NS
8772 ;;
8773 esac
8774 fi
6de9cd9a 8775
1546bb64 8776 # Disable languages that need other directories if these aren't available.
95695ad3 8777 for i in $subdir_requires; do
b6348cb3 8778 test -f "$srcdir/gcc/$i/config-lang.in" && continue
cdfee50a
NS
8779 case ${add_this_lang} in
8780 yes)
1546bb64 8781 # Specifically requested language; tell them.
22e05272 8782 as_fn_error $? "The gcc/$i directory contains parts of $language but is missing" "$LINENO" 5
1546bb64 8783 ;;
cdfee50a
NS
8784 all)
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The gcc/$i directory contains parts of $language but is missing" >&5
8786$as_echo "$as_me: WARNING: The gcc/$i directory contains parts of $language but is missing" >&2;}
8787 add_this_lang=unsupported
8788 ;;
1546bb64
PB
8789 *)
8790 # Silently disable.
e1888513 8791 add_this_lang=unsupported
1546bb64
PB
8792 ;;
8793 esac
8794 done
8795
e1888513 8796 # Disable Ada if no preexisting GNAT is available.
cdfee50a
NS
8797 case ${add_this_lang}:${language}:${have_gnat} in
8798 yes:ada:no)
e1888513 8799 # Specifically requested language; tell them.
22e05272 8800 as_fn_error $? "GNAT is required to build $language" "$LINENO" 5
e1888513 8801 ;;
cdfee50a
NS
8802 all:ada:no)
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNAT is required to build $language" >&5
8804$as_echo "$as_me: WARNING: GNAT is required to build $language" >&2;}
8805 add_this_lang=unsupported
8806 ;;
e1888513
PB
8807 *:ada:no)
8808 # Silently disable.
8809 add_this_lang=unsupported
8810 ;;
8811 esac
8812
5fee5ec3
IB
8813 # Disable D if no preexisting GDC is available.
8814 case ${add_this_lang}:${language}:${have_gdc} in
8815 yes:d:no)
8816 # Specifically requested language; tell them.
8817 as_fn_error $? "GDC is required to build $language" "$LINENO" 5
8818 ;;
8819 all:d:no)
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GDC is required to build $language" >&5
8821$as_echo "$as_me: WARNING: GDC is required to build $language" >&2;}
8822 add_this_lang=unsupported
8823 ;;
8824 *:d:no)
8825 # Silently disable.
8826 add_this_lang=unsupported
8827 ;;
8828 esac
8829
cdfee50a 8830 # Disable jit if -enable-host-shared not specified
ffac9597
JM
8831 # but not if building for Mingw. All code in Windows
8832 # is position independent code (PIC).
c83027f3
NB
8833 case $target in
8834 *mingw*) ;;
8835 *)
8836 case ${add_this_lang}:${language}:${host_shared} in
8837 yes:jit:no)
8838 # PR jit/64780: explicitly specify --enable-host-shared
22e05272 8839 as_fn_error $? "
cdfee50a
NS
8840Enabling language \"jit\" requires --enable-host-shared.
8841
8842--enable-host-shared typically slows the rest of the compiler down by
8843a few %, so you must explicitly enable it.
8844
8845If you want to build both the jit and the regular compiler, it is often
8846best to do this via two separate configure/builds, in separate
8847directories, to avoid imposing the performance cost of
8848--enable-host-shared on the regular compiler." "$LINENO" 5
c83027f3
NB
8849 ;;
8850 all:jit:no)
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-host-shared required to build $language" >&5
cdfee50a 8852$as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2;}
c83027f3
NB
8853 add_this_lang=unsupported
8854 ;;
8855 *:jit:no)
8856 # Silently disable.
8857 add_this_lang=unsupported
8858 ;;
8859 esac
8860 ;;
8861 esac
cdfee50a
NS
8862
8863 # Disable a language that is unsupported by the target.
8864 case "${add_this_lang}: $unsupported_languages " in
8865 no:*) ;;
8866 unsupported:*) ;;
8867 *:*" $language "*)
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${language} not supported for this target" >&5
8869$as_echo "$as_me: WARNING: ${language} not supported for this target" >&2;}
e1888513 8870 add_this_lang=unsupported
4fab7234
HPN
8871 ;;
8872 esac
8873
6de9cd9a 8874 case $add_this_lang in
e1888513 8875 unsupported)
55ffb5ed 8876 # Remove language-dependent dirs.
4da3b0f8
ILT
8877 disabled_target_libs="$disabled_target_libs $target_libs"
8878 noconfigdirs="$noconfigdirs $lang_dirs"
2805b53a 8879 ;;
e1888513
PB
8880 no)
8881 # Remove language-dependent dirs; still show language as supported.
4da3b0f8
ILT
8882 disabled_target_libs="$disabled_target_libs $target_libs"
8883 noconfigdirs="$noconfigdirs $lang_dirs"
e1888513
PB
8884 potential_languages="${potential_languages}${language},"
8885 ;;
cdfee50a 8886 all|yes)
e1888513
PB
8887 new_enable_languages="${new_enable_languages}${language},"
8888 potential_languages="${potential_languages}${language},"
2805b53a 8889 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
4da3b0f8 8890 enabled_target_libs="$enabled_target_libs $target_libs"
ab9dcd0c
RW
8891 case "${boot_language}:,$enable_stage1_languages," in
8892 yes:* | *:*,$language,* | *:*,yes, | *:*,all,)
340de83f 8893 # Add to (comma-separated) list of stage 1 languages.
ab9dcd0c
RW
8894 case ",$stage1_languages," in
8895 *,$language,* | ,yes, | ,all,) ;;
8896 *) stage1_languages="${stage1_languages}${language}," ;;
8897 esac
00020c16 8898 # We need to bootstrap any supporting libraries.
5fee5ec3 8899 bootstrap_target_libs=`echo "${bootstrap_target_libs}${target_libs}," | sed "s/ /,/g"`
2805b53a
NN
8900 ;;
8901 esac
8902 ;;
55ffb5ed
NN
8903 esac
8904 ;;
8905 esac
8906 done
8907
4da3b0f8
ILT
8908 # Add target libraries which are only needed for disabled languages
8909 # to noconfigdirs.
8910 if test -n "$disabled_target_libs"; then
8911 for dir in $disabled_target_libs; do
8912 case " $enabled_target_libs " in
8913 *" ${dir} "*) ;;
8914 *) noconfigdirs="$noconfigdirs $dir" ;;
8915 esac
8916 done
8917 fi
8918
5213506e
RW
8919 # Check whether --enable-stage1-languages was given.
8920if test "${enable_stage1_languages+set}" = set; then :
8921 enableval=$enable_stage1_languages; case ,${enable_stage1_languages}, in
e1888513
PB
8922 ,no,|,,)
8923 # Set it to something that will have no effect in the loop below
8924 enable_stage1_languages=c ;;
8925 ,yes,)
8926 enable_stage1_languages=`echo $new_enable_languages | \
8927 sed -e "s/^,//" -e "s/,$//" ` ;;
8928 *,all,*)
8929 enable_stage1_languages=`echo ,$enable_stage1_languages, | \
8930 sed -e "s/,all,/$new_enable_languages/" -e "s/^,//" -e "s/,$//" ` ;;
8931 esac
8932
8933 # Add "good" languages from enable_stage1_languages to stage1_languages,
8934 # while "bad" languages go in missing_languages. Leave no duplicates.
8935 for i in `echo $enable_stage1_languages | sed 's/,/ /g' `; do
8936 case $potential_languages in
8937 *,$i,*)
8938 case $stage1_languages in
8939 *,$i,*) ;;
8940 *) stage1_languages="$stage1_languages$i," ;;
8941 esac ;;
8942 *)
8943 case $missing_languages in
8944 *,$i,*) ;;
8945 *) missing_languages="$missing_languages$i," ;;
8946 esac ;;
8947 esac
8948 done
5213506e
RW
8949fi
8950
e1888513
PB
8951
8952 # Remove leading/trailing commas that were added for simplicity
8953 potential_languages=`echo "$potential_languages" | sed -e "s/^,//" -e "s/,$//"`
79b4b7d2 8954 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
e1888513
PB
8955 stage1_languages=`echo "$stage1_languages" | sed -e "s/^,//" -e "s/,$//"`
8956 new_enable_languages=`echo "$new_enable_languages" | sed -e "s/^,//" -e "s/,$//"`
8957
55ffb5ed 8958 if test "x$missing_languages" != x; then
22e05272 8959 as_fn_error $? "
0cf085e4 8960The following requested languages could not be built: ${missing_languages}
5213506e 8961Supported languages are: ${potential_languages}" "$LINENO" 5
55ffb5ed 8962 fi
55ffb5ed
NN
8963 if test "x$new_enable_languages" != "x$enable_languages"; then
8964 echo The following languages will be built: ${new_enable_languages}
e1888513 8965 enable_languages="$new_enable_languages"
55ffb5ed 8966 fi
e1888513 8967
1c710c3c 8968
b2eaac4a 8969 ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[^ ]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" `
55ffb5ed
NN
8970fi
8971
27079765
AH
8972# Handle --disable-<component> generically.
8973for dir in $configdirs $build_configdirs $target_configdirs ; do
8974 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
ac9e6043
RW
8975 varname=`echo $dirname | sed -e s/+/_/g`
8976 if eval test x\${enable_${varname}} "=" xno ; then
27079765
AH
8977 noconfigdirs="$noconfigdirs $dir"
8978 fi
8979done
8980
43c40f3e
RO
8981# Check for Boehm's garbage collector
8982# Check whether --enable-objc-gc was given.
8983if test "${enable_objc_gc+set}" = set; then :
114bf3f1
MK
8984 enableval=$enable_objc_gc;
8985fi
8986
8987
8988# Check whether --with-target-bdw-gc was given.
8989if test "${with_target_bdw_gc+set}" = set; then :
8990 withval=$with_target_bdw_gc;
8991fi
8992
8993
8994# Check whether --with-target-bdw-gc-include was given.
8995if test "${with_target_bdw_gc_include+set}" = set; then :
8996 withval=$with_target_bdw_gc_include;
8997fi
8998
8999
9000# Check whether --with-target-bdw-gc-lib was given.
9001if test "${with_target_bdw_gc_lib+set}" = set; then :
9002 withval=$with_target_bdw_gc_lib;
9003fi
9004
9005
9006case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bdw garbage collector" >&5
9008$as_echo_n "checking for bdw garbage collector... " >&6; }
9009 if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
825fba52
MK
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using bdw-gc in default locations" >&5
9011$as_echo "using bdw-gc in default locations" >&6; }
114bf3f1
MK
9012 else
9013 if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
22e05272 9014 as_fn_error $? "found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing" "$LINENO" 5
114bf3f1 9015 elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
22e05272 9016 as_fn_error $? "found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing" "$LINENO" 5
114bf3f1
MK
9017 else
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-bdw-gc options" >&5
9019$as_echo "using paths configured with --with-target-bdw-gc options" >&6; }
9020 fi
9021 fi
43c40f3e
RO
9022esac
9023
e4cba494 9024# Disable libitm, libsanitizer, libvtv if we're not building C++
99776ebd 9025case ,${enable_languages}, in
1007a55c 9026 *,c++,*)
5e9d6aa4 9027 # Disable libitm, libsanitizer if we're not building libstdc++
1007a55c
JW
9028 case "${noconfigdirs}" in
9029 *target-libstdc++-v3*)
5e9d6aa4 9030 noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
1007a55c
JW
9031 ;;
9032 *) ;;
9033 esac
9034 ;;
99776ebd 9035 *)
e4cba494 9036 noconfigdirs="$noconfigdirs target-libitm target-libsanitizer target-libvtv"
99776ebd
RH
9037 ;;
9038esac
9039
dc614a83
AB
9040# If gcc/ is not in the source tree then we'll not be building a
9041# target compiler, assume in that case we don't want to build any
9042# target libraries or tools.
9043#
9044# This was added primarily for the benefit for binutils-gdb who reuse
9045# this configure script, but don't always have target tools available.
9046if test ! -d ${srcdir}/gcc; then
9047 skipdirs="${skipdirs} ${target_configdirs}"
9048fi
9049
ee6a22df
L
9050# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
9051# $build_configdirs and $target_configdirs.
55ffb5ed
NN
9052# If we have the source for $noconfigdirs entries, add them to $notsupp.
9053
9054notsupp=""
9055for dir in . $skipdirs $noconfigdirs ; do
ee6a22df 9056 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
55ffb5ed
NN
9057 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9058 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
9059 if test -r $srcdir/$dirname/configure ; then
9060 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9061 true
9062 else
9063 notsupp="$notsupp $dir"
9064 fi
9065 fi
9066 fi
ee6a22df
L
9067 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9068 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
9069 if test -r $srcdir/$dirname/configure ; then
9070 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9071 true
9072 else
9073 notsupp="$notsupp $dir"
9074 fi
9075 fi
9076 fi
55ffb5ed
NN
9077 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9078 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
9079 if test -r $srcdir/$dirname/configure ; then
9080 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9081 true
9082 else
9083 notsupp="$notsupp $dir"
9084 fi
9085 fi
9086 fi
9087done
9088
55ffb5ed
NN
9089# Quietly strip out all directories which aren't configurable in this tree.
9090# This relies on all configurable subdirectories being autoconfiscated, which
9091# is now the case.
23f6b2f9
PB
9092build_configdirs_all="$build_configdirs"
9093build_configdirs=
9094for i in ${build_configdirs_all} ; do
1c710c3c 9095 j=`echo $i | sed -e s/build-//g`
23f6b2f9
PB
9096 if test -f ${srcdir}/$j/configure ; then
9097 build_configdirs="${build_configdirs} $i"
9098 fi
9099done
9100
55ffb5ed
NN
9101configdirs_all="$configdirs"
9102configdirs=
9103for i in ${configdirs_all} ; do
9104 if test -f ${srcdir}/$i/configure ; then
9105 configdirs="${configdirs} $i"
9106 fi
9107done
23f6b2f9 9108
55ffb5ed
NN
9109target_configdirs_all="$target_configdirs"
9110target_configdirs=
9111for i in ${target_configdirs_all} ; do
1c710c3c 9112 j=`echo $i | sed -e s/target-//g`
55ffb5ed
NN
9113 if test -f ${srcdir}/$j/configure ; then
9114 target_configdirs="${target_configdirs} $i"
9115 fi
9116done
9117
45b3824d
TS
9118# libiberty-linker-plugin is special: it doesn't have its own source directory,
9119# so we have to add it after the preceding checks.
9120if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
9121then
9122 case " $configdirs " in
9123 *" libiberty "*)
9124 # If we can build libiberty, we can also build libiberty-linker-plugin.
9125 configdirs="$configdirs libiberty-linker-plugin"
9126 extra_linker_plugin_configure_flags="$extra_linker_plugin_configure_flags \
9127 --with-libiberty=../libiberty-linker-plugin";;
9128 *)
22e05272 9129 as_fn_error $? "libiberty missing" "$LINENO" 5;;
45b3824d
TS
9130 esac
9131fi
9132
fca38047
TS
9133# Sometimes we have special requirements for the host libiberty.
9134extra_host_libiberty_configure_flags=
9135case " $configdirs " in
15368960 9136 *" lto-plugin "* | *" libcc1 "* | *" gdbserver "*)
fca38047
TS
9137 # When these are to be built as shared libraries, the same applies to
9138 # libiberty.
9139 extra_host_libiberty_configure_flags=--enable-shared
9140 ;;
04bb15e4
TV
9141esac
9142
9143
9144# Sometimes we have special requirements for the host zlib.
9145extra_host_zlib_configure_flags=
9146case " $configdirs " in
1c01ebf6
L
9147 *" bfd "*)
9148 # When bfd is to be built as a shared library, the same applies to
9149 # zlib.
9150 if test "$enable_shared" = "yes"; then
9151 extra_host_zlib_configure_flags=--enable-host-shared
9152 fi
9153 ;;
fca38047
TS
9154esac
9155
9156
55ffb5ed
NN
9157# Produce a warning message for the subdirs we can't configure.
9158# This isn't especially interesting in the Cygnus tree, but in the individual
9159# FSF releases, it's important to let people know when their machine isn't
9160# supported by the one or two programs in a package.
9161
9162if test -n "${notsupp}" && test -z "${norecursion}" ; then
9163 # If $appdirs is non-empty, at least one of those directories must still
9164 # be configured, or we error out. (E.g., if the gas release supports a
9165 # specified target in some subdirs but not the gas subdir, we shouldn't
9166 # pretend that all is well.)
9167 if test -n "$appdirs" ; then
9168 for dir in $appdirs ; do
9169 if test -r $dir/Makefile.in ; then
9170 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
9171 appdirs=""
9172 break
9173 fi
23f6b2f9 9174 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
55ffb5ed
NN
9175 appdirs=""
9176 break
9177 fi
9178 fi
9179 done
9180 if test -n "$appdirs" ; then
9181 echo "*** This configuration is not supported by this package." 1>&2
9182 exit 1
9183 fi
9184 fi
9185 # Okay, some application will build, or we don't care to check. Still
9186 # notify of subdirs not getting built.
9187 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
9188 echo " ${notsupp}" 1>&2
9189 echo " (Any other directories should still work fine.)" 1>&2
9190fi
9191
9192case "$host" in
9193 *msdosdjgpp*)
9194 enable_gdbtk=no ;;
9195esac
9196
c3a86da9
DJ
9197# To find our prefix, in gcc_cv_tool_prefix.
9198
9199# The user is always right.
9200if test "${PATH_SEPARATOR+set}" != set; then
9201 echo "#! /bin/sh" >conf$$.sh
9202 echo "exit 0" >>conf$$.sh
9203 chmod +x conf$$.sh
9204 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9205 PATH_SEPARATOR=';'
9206 else
9207 PATH_SEPARATOR=:
9208 fi
9209 rm -f conf$$.sh
9210fi
9211
9212
3c36aa6b
JJ
9213 get_gcc_base_ver="cat"
9214
9215# Check whether --with-gcc-major-version-only was given.
9216if test "${with_gcc_major_version_only+set}" = set; then :
9217 withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
31db0fe0 9218 get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
3c36aa6b
JJ
9219 fi
9220
9221fi
9222
9223
9224
9225
9226
c3a86da9
DJ
9227
9228if test "x$exec_prefix" = xNONE; then
9229 if test "x$prefix" = xNONE; then
9230 gcc_cv_tool_prefix=$ac_default_prefix
9231 else
9232 gcc_cv_tool_prefix=$prefix
9233 fi
9234else
9235 gcc_cv_tool_prefix=$exec_prefix
9236fi
9237
9238# If there is no compiler in the tree, use the PATH only. In any
9239# case, if there is no compiler in the tree nobody should use
9240# AS_FOR_TARGET and LD_FOR_TARGET.
9241if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
3c36aa6b
JJ
9242 if test x$with_gcc_major_version_only = xyes ; then
9243 gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
9244 else
9245 gcc_version=`cat $srcdir/gcc/BASE-VER`
9246 fi
c3a86da9
DJ
9247 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
9248 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
9249 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
9250 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
9251 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
9252 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
9253else
9254 gcc_cv_tool_dirs=
9255fi
9256
9257if test x$build = x$target && test -n "$md_exec_prefix"; then
9258 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
9259fi
9260
9261
9262
55ffb5ed
NN
9263copy_dirs=
9264
1c710c3c 9265
5213506e
RW
9266# Check whether --with-build-sysroot was given.
9267if test "${with_build_sysroot+set}" = set; then :
9268 withval=$with_build_sysroot; if test x"$withval" != x ; then
526635cb
MM
9269 SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
9270 fi
9271else
9272 SYSROOT_CFLAGS_FOR_TARGET=
5213506e 9273fi
526635cb
MM
9274
9275
c8aea42c 9276
5213506e
RW
9277
9278# Check whether --with-debug-prefix-map was given.
9279if test "${with_debug_prefix_map+set}" = set; then :
9280 withval=$with_debug_prefix_map; if test x"$withval" != x; then
c8aea42c
PB
9281 DEBUG_PREFIX_CFLAGS_FOR_TARGET=
9282 for debug_map in $withval; do
9283 DEBUG_PREFIX_CFLAGS_FOR_TARGET="$DEBUG_PREFIX_CFLAGS_FOR_TARGET -fdebug-prefix-map=$debug_map"
9284 done
9285 fi
9286else
9287 DEBUG_PREFIX_CFLAGS_FOR_TARGET=
5213506e
RW
9288fi
9289
c8aea42c
PB
9290
9291
1c8bd6a3
PB
9292# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
9293# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
9294# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
9295# We want to ensure that TARGET libraries (which we know are built with
9296# gcc) are built with "-O2 -g", so include those options when setting
9297# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
9298if test "x$CFLAGS_FOR_TARGET" = x; then
fc30054e
AH
9299 if test "x${is_cross_compiler}" = xyes; then
9300 CFLAGS_FOR_TARGET="-g -O2"
9301 else
9302 CFLAGS_FOR_TARGET=$CFLAGS
9303 case " $CFLAGS " in
9304 *" -O2 "*) ;;
9305 *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
9306 esac
9307 case " $CFLAGS " in
9308 *" -g "* | *" -g3 "*) ;;
9309 *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
9310 esac
9311 fi
1c8bd6a3
PB
9312fi
9313
9314
9315if test "x$CXXFLAGS_FOR_TARGET" = x; then
fc30054e
AH
9316 if test "x${is_cross_compiler}" = xyes; then
9317 CXXFLAGS_FOR_TARGET="-g -O2"
9318 else
9319 CXXFLAGS_FOR_TARGET=$CXXFLAGS
9320 case " $CXXFLAGS " in
9321 *" -O2 "*) ;;
9322 *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
9323 esac
9324 case " $CXXFLAGS " in
9325 *" -g "* | *" -g3 "*) ;;
9326 *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
9327 esac
9328 fi
1c8bd6a3
PB
9329fi
9330
9331
6f57bdf6
DK
9332
9333
55ffb5ed
NN
9334# Handle --with-headers=XXX. If the value is not "yes", the contents of
9335# the named directory are copied to $(tooldir)/sys-include.
9336if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
9337 if test x${is_cross_compiler} = xno ; then
9338 echo 1>&2 '***' --with-headers is only supported when cross compiling
9339 exit 1
9340 fi
9341 if test x"${with_headers}" != xyes ; then
c3a86da9 9342 x=${gcc_cv_tool_prefix}
1c710c3c 9343 copy_dirs="${copy_dirs} ${with_headers} $x/${target_noncanonical}/sys-include"
55ffb5ed
NN
9344 fi
9345fi
9346
9347# Handle --with-libs=XXX. If the value is not "yes", the contents of
9348# the name directories are copied to $(tooldir)/lib. Multiple directories
9349# are permitted.
9350if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
9351 if test x${is_cross_compiler} = xno ; then
9352 echo 1>&2 '***' --with-libs is only supported when cross compiling
9353 exit 1
9354 fi
9355 if test x"${with_libs}" != xyes ; then
9356 # Copy the libraries in reverse order, so that files in the first named
9357 # library override files in subsequent libraries.
c3a86da9 9358 x=${gcc_cv_tool_prefix}
55ffb5ed 9359 for l in ${with_libs}; do
1c710c3c 9360 copy_dirs="$l $x/${target_noncanonical}/lib ${copy_dirs}"
55ffb5ed
NN
9361 done
9362 fi
9363fi
9364
d7f09764 9365# Set with_gnu_as, with_gnu_ld, and with_system_zlib as appropriate.
e8b05380
PB
9366#
9367# This is done by determining whether or not the appropriate directory
9368# is available, and by checking whether or not specific configurations
9369# have requested that this magic not happen.
1c710c3c
DJ
9370#
9371# The command line options always override the explicit settings in
6b1786aa 9372# configure.ac, and the settings in configure.ac override this magic.
e8b05380 9373#
1c710c3c 9374# If the default for a toolchain is to use GNU as and ld, and you don't
e8b05380 9375# want to do that, then you should use the --without-gnu-as and
d7f09764
DN
9376# --without-gnu-ld options for the configure script. Similarly, if
9377# the default is to use the included zlib and you don't want to do that,
9378# you should use the --with-system-zlib option for the configure script.
e8b05380
PB
9379
9380if test x${use_gnu_as} = x &&
9381 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
9382 with_gnu_as=yes
9383 extra_host_args="$extra_host_args --with-gnu-as"
9384fi
9385
9386if test x${use_gnu_ld} = x &&
5afab7ad 9387 echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
e8b05380
PB
9388 with_gnu_ld=yes
9389 extra_host_args="$extra_host_args --with-gnu-ld"
9390fi
9391
d7f09764
DN
9392if test x${use_included_zlib} = x &&
9393 echo " ${configdirs} " | grep " zlib " > /dev/null 2>&1 ; then
9394 :
9395else
9396 with_system_zlib=yes
9397 extra_host_args="$extra_host_args --with-system-zlib"
9398fi
9399
e8b05380
PB
9400# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
9401# can detect this case.
9402
9403if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
9404 with_newlib=yes
9405 extra_host_args="$extra_host_args --with-newlib"
9406fi
9407
55ffb5ed
NN
9408# Handle ${copy_dirs}
9409set fnord ${copy_dirs}
9410shift
9411while test $# != 0 ; do
9412 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
9413 :
9414 else
9415 echo Copying $1 to $2
9416
9417 # Use the install script to create the directory and all required
9418 # parent directories.
9419 if test -d $2 ; then
9420 :
9421 else
9422 echo >config.temp
9423 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
9424 fi
9425
9426 # Copy the directory, assuming we have tar.
9427 # FIXME: Should we use B in the second tar? Not all systems support it.
9428 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
9429
9430 # It is the responsibility of the user to correctly adjust all
9431 # symlinks. If somebody can figure out how to handle them correctly
9432 # here, feel free to add the code.
9433
9434 echo $1 > $2/COPIED
9435 fi
9436 shift; shift
9437done
9438
e8b05380
PB
9439# Determine a target-dependent exec_prefix that the installed
9440# gcc will search in. Keep this list sorted by triplet, with
9441# the *-*-osname triplets last.
9442md_exec_prefix=
9443case "${target}" in
30b74385 9444 i[34567]86-pc-msdosdjgpp*)
e8b05380
PB
9445 md_exec_prefix=/dev/env/DJDIR/bin
9446 ;;
e8b05380 9447 *-*-hpux* | \
e8b05380 9448 *-*-nto-qnx* | \
6de66370 9449 *-*-solaris2*)
e8b05380
PB
9450 md_exec_prefix=/usr/ccs/bin
9451 ;;
9452esac
9453
671aa708
NN
9454extra_arflags_for_target=
9455extra_nmflags_for_target=
9456extra_ranlibflags_for_target=
9457target_makefile_frag=/dev/null
9458case "${target}" in
58e24147
AM
9459 spu-*-*)
9460 target_makefile_frag="config/mt-spu"
9461 ;;
d896cc4d 9462 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
4bf6c438
RS
9463 target_makefile_frag="config/mt-sde"
9464 ;;
1ec3b87b
RS
9465 mipsisa*-*-elfoabi*)
9466 target_makefile_frag="config/mt-mips-elfoabi"
9467 ;;
08d0963a
RS
9468 mips*-*-*linux* | mips*-*-gnu*)
9469 target_makefile_frag="config/mt-mips-gnu"
9470 ;;
707f1839
SL
9471 nios2-*-elf*)
9472 target_makefile_frag="config/mt-nios2-elf"
9473 ;;
76052545
EB
9474 *-*-linux-android*)
9475 target_makefile_frag="config/mt-android"
9476 ;;
416ac4d4 9477 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
98a5bb3b 9478 target_makefile_frag="config/mt-gnu"
671aa708
NN
9479 ;;
9480 *-*-aix4.[3456789]* | *-*-aix[56789].*)
1c710c3c 9481 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
671aa708
NN
9482 # commands to handle both 32-bit and 64-bit objects. These flags are
9483 # harmless if we're using GNU nm or ar.
9484 extra_arflags_for_target=" -X32_64"
9485 extra_nmflags_for_target=" -B -X32_64"
9486 ;;
671aa708
NN
9487esac
9488
9489alphaieee_frag=/dev/null
9490case $target in
9491 alpha*-*-*)
9492 # This just makes sure to use the -mieee option to build target libs.
9493 # This should probably be set individually by each library.
9494 alphaieee_frag="config/mt-alphaieee"
9495 ;;
9496esac
9497
9498# If --enable-target-optspace always use -Os instead of -O2 to build
9499# the target libraries, similarly if it is not specified, use -Os
9500# on selected platforms.
9501ospace_frag=/dev/null
9502case "${enable_target_optspace}:${target}" in
9503 yes:*)
9504 ospace_frag="config/mt-ospace"
9505 ;;
9506 :d30v-*)
9507 ospace_frag="config/mt-d30v"
9508 ;;
d9063947 9509 :m32r-* | :d10v-* | :fr30-* | :i?86*-*-elfiamcu)
671aa708
NN
9510 ospace_frag="config/mt-ospace"
9511 ;;
9512 no:* | :*)
9513 ;;
9514 *)
9515 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
9516 ;;
9517esac
9518
671aa708
NN
9519# Some systems (e.g., one of the i386-aix systems the gas testers are
9520# using) don't handle "\$" correctly, so don't use it here.
1c710c3c 9521tooldir='${exec_prefix}'/${target_noncanonical}
671aa708
NN
9522build_tooldir=${tooldir}
9523
671aa708
NN
9524# Create a .gdbinit file which runs the one in srcdir
9525# and tells GDB to look there for source files.
9526
9527if test -r ${srcdir}/.gdbinit ; then
9528 case ${srcdir} in
9529 .) ;;
9530 *) cat > ./.gdbinit <<EOF
9531# ${NO_EDIT}
9532dir ${srcdir}
9533dir .
9534source ${srcdir}/.gdbinit
9535EOF
9536 ;;
9537 esac
9538fi
9539
671aa708
NN
9540# Make sure that the compiler is able to generate an executable. If it
9541# can't, we are probably in trouble. We don't care whether we can run the
9542# executable--we might be using a cross compiler--we only care whether it
9543# can be created. At this point the main configure script has set CC.
9544we_are_ok=no
9545echo "int main () { return 0; }" > conftest.c
9546${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
9547if test $? = 0 ; then
9548 if test -s conftest || test -s conftest.exe ; then
9549 we_are_ok=yes
9550 fi
1c710c3c 9551fi
671aa708
NN
9552case $we_are_ok in
9553 no)
9554 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
9555 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
9556 rm -f conftest*
9557 exit 1
9558 ;;
9559esac
9560rm -f conftest*
9561
d89f0ad6 9562# Decide which environment variable is used to find dynamic libraries.
671aa708
NN
9563case "${host}" in
9564 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
111eeb6e 9565 *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
d89f0ad6 9566 *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
671aa708
NN
9567 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
9568esac
9569
d89f0ad6
AL
9570# On systems where the dynamic library environment variable is PATH,
9571# gcc/ will put dynamic libraries into a subdirectory to avoid adding
9572# built executables to PATH.
9573if test "$RPATH_ENVVAR" = PATH; then
9574 GCC_SHLIB_SUBDIR=/shlib
9575else
9576 GCC_SHLIB_SUBDIR=
9577fi
9578
beeda1d9
JJ
9579# Adjust the toplevel makefile according to whether bootstrap was selected.
9580case $enable_bootstrap in
9581 yes)
9582 bootstrap_suffix=bootstrap
9583 BUILD_CONFIG=bootstrap-debug
9584 ;;
9585 no)
9586 bootstrap_suffix=no-bootstrap
9587 BUILD_CONFIG=
9588 ;;
9589esac
9590
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5
9592$as_echo_n "checking for default BUILD_CONFIG... " >&6; }
9593
9594
9595# Check whether --with-build-config was given.
9596if test "${with_build_config+set}" = set; then :
9597 withval=$with_build_config; case $with_build_config in
9598 yes) with_build_config= ;;
9599 no) with_build_config= BUILD_CONFIG= ;;
9600 esac
9601fi
9602
9603
9604if test "x${with_build_config}" != x; then
9605 BUILD_CONFIG=$with_build_config
9606else
9607 case $BUILD_CONFIG in
9608 bootstrap-debug)
9609 if echo "int f (void) { return 0; }" > conftest.c &&
9610 ${CC} -c conftest.c &&
9611 mv conftest.o conftest.o.g0 &&
9612 ${CC} -c -g conftest.c &&
9613 mv conftest.o conftest.o.g &&
9614 ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
9615 :
9616 else
9617 BUILD_CONFIG=
9618 fi
9619 rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
9620 ;;
9621 esac
9622fi
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5
9624$as_echo "$BUILD_CONFIG" >&6; }
9625
9626
9627# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
9628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-vtable-verify" >&5
9629$as_echo_n "checking for --enable-vtable-verify... " >&6; }
9630# Check whether --enable-vtable-verify was given.
9631if test "${enable_vtable_verify+set}" = set; then :
9632 enableval=$enable_vtable_verify; case "$enableval" in
9633 yes) enable_vtable_verify=yes ;;
9634 no) enable_vtable_verify=no ;;
9635 *) enable_vtable_verify=no;;
9636 esac
9637else
9638 enable_vtable_verify=no
9639fi
9640
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vtable_verify" >&5
9642$as_echo "$enable_vtable_verify" >&6; }
9643
671aa708
NN
9644# Record target_configdirs and the configure arguments for target and
9645# build configuration in Makefile.
9646target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
23f6b2f9 9647build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
9e1c8fc1 9648bootstrap_fixincludes=no
671aa708 9649
ad1e5170
JR
9650# If we are building libgomp, bootstrap it.
9651if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then
9652 bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
9653fi
9654
beeda1d9
JJ
9655# If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan
9656# or bootstrap-ubsan, bootstrap it.
9657if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then
9658 case "$BUILD_CONFIG" in
170e618e 9659 *bootstrap-hwasan* | *bootstrap-asan* | *bootstrap-ubsan* )
beeda1d9 9660 bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
9e1c8fc1 9661 bootstrap_fixincludes=yes
beeda1d9
JJ
9662 ;;
9663 esac
ac8701fe
L
9664fi
9665
beeda1d9
JJ
9666# If we are building libvtv and --enable-vtable-verify, bootstrap it.
9667if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 &&
9668 test "$enable_vtable_verify" != no; then
2077db1b
CT
9669 bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
9670fi
9671
5fee5ec3
IB
9672# If we are building libatomic and the list of enabled languages includes the
9673# D frontend, bootstrap it.
9674if echo " ${target_configdirs} " | grep " libatomic " > /dev/null 2>&1; then
9675 case ,${enable_languages}, in
9676 *,d,*)
9677 bootstrap_target_libs=${bootstrap_target_libs}target-libatomic,
9678 ;;
9679 esac
9680fi
9681
671aa708
NN
9682# Determine whether gdb needs tk/tcl or not.
9683# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
9684# and in that case we want gdb to be built without tk. Ugh!
9685# In fact I believe gdb is the *only* package directly dependent on tk,
9686# so we should be able to put the 'maybe's in unconditionally and
9687# leave out the maybe dependencies when enable_gdbtk is false. I'm not
9688# 100% sure that that's safe though.
e914a571 9689
b4f96efe 9690gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
671aa708
NN
9691case "$enable_gdbtk" in
9692 no)
9693 GDB_TK="" ;;
e914a571
AC
9694 yes)
9695 GDB_TK="${gdb_tk}" ;;
671aa708 9696 *)
e914a571
AC
9697 # Only add the dependency on gdbtk when GDBtk is part of the gdb
9698 # distro. Eventually someone will fix this and move Insight, nee
9699 # gdbtk to a separate directory.
9700 if test -d ${srcdir}/gdb/gdbtk ; then
9701 GDB_TK="${gdb_tk}"
9702 else
9703 GDB_TK=""
9704 fi
9705 ;;
671aa708 9706esac
ef9db8d5
DJ
9707CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
9708INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
671aa708 9709
f9d09df0
TT
9710# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing
9711# else does, only include them if one of these is built. The Makefile
9712# provides the ordering, so it's enough here to add to the list.
9713case " ${configdirs} " in
9714 *\ gdb\ *)
9715 configdirs="${configdirs} gnulib gdbsupport"
9716 ;;
9717 *\ gdbserver\ *)
9718 configdirs="${configdirs} gnulib gdbsupport"
9719 ;;
f14c9bd4
MF
9720 *\ sim\ *)
9721 configdirs="${configdirs} gnulib"
9722 ;;
f9d09df0 9723esac
98e5be21 9724
60975492 9725# Strip out unwanted targets.
8b87bb96
NN
9726
9727# While at that, we remove Makefiles if we were started for recursive
9728# configuration, so that the top-level Makefile reconfigures them,
9729# like we used to do when configure itself was recursive.
8b87bb96 9730
3e54529c
RW
9731# Loop over modules. We used to use the "$extrasub" feature from Autoconf
9732# but now we're fixing up the Makefile ourselves with the additional
9733# commands passed to AC_CONFIG_FILES. Use separate variables
9734# extrasub-{build,host,target} not because there is any reason to split
9735# the substitutions up that way, but only to remain below the limit of
9736# 99 commands in a script, for HP-UX sed.
da34ca3f
AO
9737
9738# Do not nest @if/@endif or @unless/@endunless pairs, because
9739# configure will not warn you at all.
8b87bb96 9740
79cd2b23
RW
9741case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
9742 yes:yes:*\ gold\ *:*,c++,*) ;;
9743 yes:yes:*\ gold\ *:*)
22e05272 9744 as_fn_error $? "in a combined tree, bootstrapping with --enable-gold requires c++ in stage1_languages" "$LINENO" 5
79cd2b23
RW
9745 ;;
9746esac
9747
3e54529c 9748extrasub_build=
23f6b2f9 9749for module in ${build_configdirs} ; do
5607edfd
PB
9750 if test -z "${no_recursion}" \
9751 && test -f ${build_subdir}/${module}/Makefile; then
9752 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
9753 rm -f ${build_subdir}/${module}/Makefile
9754 fi
3e54529c 9755 extrasub_build="$extrasub_build
5607edfd
PB
9756/^@if build-$module\$/d
9757/^@endif build-$module\$/d
da34ca3f 9758/^@unless build-$module\$/,/^@endunless build-$module\$/d
5607edfd 9759/^@if build-$module-$bootstrap_suffix\$/d
da34ca3f
AO
9760/^@endif build-$module-$bootstrap_suffix\$/d
9761/^@unless build-$module-$bootstrap_suffix\$/,/^@endunless build-$module-$bootstrap_suffix\$/d"
5607edfd 9762done
3e54529c 9763extrasub_host=
5607edfd 9764for module in ${configdirs} ; do
a6fbc1e2 9765 if test -z "${no_recursion}"; then
f063a9ed 9766 for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
a6fbc1e2
AS
9767 if test -f ${file}; then
9768 echo 1>&2 "*** removing ${file} to force reconfigure"
9769 rm -f ${file}
9770 fi
9771 done
5607edfd 9772 fi
9e1c8fc1
JJ
9773 case ${module},${bootstrap_fixincludes} in
9774 fixincludes,no) host_bootstrap_suffix=no-bootstrap ;;
9775 *) host_bootstrap_suffix=$bootstrap_suffix ;;
9776 esac
3e54529c 9777 extrasub_host="$extrasub_host
5607edfd
PB
9778/^@if $module\$/d
9779/^@endif $module\$/d
da34ca3f 9780/^@unless $module\$/,/^@endunless $module\$/d
9e1c8fc1 9781/^@if $module-$host_bootstrap_suffix\$/d
da34ca3f
AO
9782/^@endif $module-$host_bootstrap_suffix\$/d
9783/^@unless $module-$host_bootstrap_suffix\$/,/^@endunless $module-$host_bootstrap_suffix\$/d"
5607edfd 9784done
3e54529c 9785extrasub_target=
5607edfd
PB
9786for module in ${target_configdirs} ; do
9787 if test -z "${no_recursion}" \
9788 && test -f ${target_subdir}/${module}/Makefile; then
9789 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
9790 rm -f ${target_subdir}/${module}/Makefile
9791 fi
00020c16
ILT
9792
9793 # We only bootstrap target libraries listed in bootstrap_target_libs.
9794 case $bootstrap_target_libs in
9795 *,target-$module,*) target_bootstrap_suffix=$bootstrap_suffix ;;
9796 *) target_bootstrap_suffix=no-bootstrap ;;
9797 esac
9798
3e54529c 9799 extrasub_target="$extrasub_target
5607edfd
PB
9800/^@if target-$module\$/d
9801/^@endif target-$module\$/d
da34ca3f 9802/^@unless target-$module\$/,/^@endunless target-$module\$/d
00020c16 9803/^@if target-$module-$target_bootstrap_suffix\$/d
da34ca3f
AO
9804/^@endif target-$module-$target_bootstrap_suffix\$/d
9805/^@unless target-$module-$target_bootstrap_suffix\$/,/^@endunless target-$module-$target_bootstrap_suffix\$/d"
5607edfd
PB
9806done
9807
3e54529c
RW
9808# Do the final fixup along with target modules.
9809extrasub_target="$extrasub_target
da34ca3f
AO
9810/^@if /,/^@endif /d
9811/^@unless /d
9812/^@endunless /d"
671aa708 9813
4a5e71f2
L
9814if test "$enable_pgo_build" != "no"; then
9815 extrasub_build="$extrasub_build
9816/^@if pgo-build\$/d
9817/^@endif pgo-build\$/d"
9818fi
9819
671aa708
NN
9820# Create the serialization dependencies. This uses a temporary file.
9821
5213506e
RW
9822# Check whether --enable-serial-configure was given.
9823if test "${enable_serial_configure+set}" = set; then :
9824 enableval=$enable_serial_configure;
9825fi
ade82b16
AO
9826
9827
bf1d3e81
NN
9828case ${enable_serial_configure} in
9829 yes)
9830 enable_serial_build_configure=yes
9831 enable_serial_host_configure=yes
9832 enable_serial_target_configure=yes
9833 ;;
9834esac
9835
671aa708
NN
9836# These force 'configure's to be done one at a time, to avoid problems
9837# with contention over a shared config.cache.
9838rm -f serdep.tmp
ade82b16 9839echo '# serdep.tmp' > serdep.tmp
671aa708 9840olditem=
bf1d3e81 9841test "x${enable_serial_build_configure}" = xyes &&
671aa708
NN
9842for item in ${build_configdirs} ; do
9843 case ${olditem} in
9844 "") ;;
ade82b16 9845 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
671aa708
NN
9846 esac
9847 olditem=${item}
9848done
9849olditem=
bf1d3e81 9850test "x${enable_serial_host_configure}" = xyes &&
671aa708
NN
9851for item in ${configdirs} ; do
9852 case ${olditem} in
9853 "") ;;
ade82b16 9854 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
671aa708
NN
9855 esac
9856 olditem=${item}
9857done
9858olditem=
bf1d3e81 9859test "x${enable_serial_target_configure}" = xyes &&
671aa708
NN
9860for item in ${target_configdirs} ; do
9861 case ${olditem} in
9862 "") ;;
ade82b16 9863 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
671aa708
NN
9864 esac
9865 olditem=${item}
9866done
9867serialization_dependencies=serdep.tmp
9868
9869
ade82b16 9870# Base args. Strip norecursion, cache-file, srcdir, host, build,
1c710c3c 9871# target, nonopt, and variable assignments. These are the ones we
f1a036e4
NC
9872# might not want to pass down to subconfigures. The exception being
9873# --cache-file=/dev/null, which is used to turn off the use of cache
9874# files altogether, and which should be passed on to subconfigures.
9875# Also strip program-prefix, program-suffix, and program-transform-name,
9876# so that we can pass down a consistent program-transform-name.
1c710c3c 9877baseargs=
29a63921 9878tbaseargs=
1c710c3c
DJ
9879keep_next=no
9880skip_next=no
9881eval "set -- $ac_configure_args"
44bfc3ac
DJ
9882for ac_arg
9883do
1c710c3c
DJ
9884 if test X"$skip_next" = X"yes"; then
9885 skip_next=no
9886 continue
9887 fi
9888 if test X"$keep_next" = X"yes"; then
9889 case $ac_arg in
9890 *\'*)
9891 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
9892 esac
9893 baseargs="$baseargs '$ac_arg'"
29a63921 9894 tbaseargs="$tbaseargs '$ac_arg'"
1c710c3c
DJ
9895 keep_next=no
9896 continue
9897 fi
9898
9899 # Handle separated arguments. Based on the logic generated by
9900 # autoconf 2.59.
9901 case $ac_arg in
9902 *=* | --config-cache | -C | -disable-* | --disable-* \
9903 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
9904 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
9905 | -with-* | --with-* | -without-* | --without-* | --x)
9906 separate_arg=no
9907 ;;
9908 -*)
9909 separate_arg=yes
9910 ;;
9911 *)
9912 separate_arg=no
9913 ;;
9914 esac
9915
29a63921
AO
9916 skip_targ=no
9917 case $ac_arg in
9918
9919 --with-* | --without-*)
9920 libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'`
9921
9922 case $libopt in
9923 *[-_]include)
9924 lib=`echo "$libopt" | sed 's,[-_]include$,,'`
9925 ;;
9926 *[-_]lib)
9927 lib=`echo "$libopt" | sed 's,[-_]lib$,,'`
9928 ;;
9929 *)
9930 lib=$libopt
9931 ;;
9932 esac
9933
9934
9935 case $lib in
4a9bb2aa 9936 mpc | mpfr | gmp | isl)
29a63921
AO
9937 # If we're processing --with-$lib, --with-$lib-include or
9938 # --with-$lib-lib, for one of the libs above, and target is
9939 # different from host, don't pass the current argument to any
9940 # target library's configure.
9941 if test x$is_cross_compiler = xyes; then
9942 skip_targ=yes
9943 fi
9944 ;;
9945 esac
9946 ;;
9947 esac
9948
1c710c3c 9949 case "$ac_arg" in
f1a036e4
NC
9950 --cache-file=/dev/null | \
9951 -cache-file=/dev/null )
9952 # Handled here to avoid the test to skip args below.
9953 baseargs="$baseargs '$ac_arg'"
29a63921 9954 tbaseargs="$tbaseargs '$ac_arg'"
f1a036e4
NC
9955 # Assert: $separate_arg should always be no.
9956 keep_next=$separate_arg
9957 ;;
1c710c3c
DJ
9958 --no*)
9959 continue
9960 ;;
9961 --c* | \
9962 --sr* | \
9963 --ho* | \
9964 --bu* | \
9965 --t* | \
9966 --program-* | \
9967 -cache_file* | \
9968 -srcdir* | \
9969 -host* | \
9970 -build* | \
9971 -target* | \
9972 -program-prefix* | \
9973 -program-suffix* | \
9974 -program-transform-name* )
9975 skip_next=$separate_arg
9976 continue
9977 ;;
9978 -*)
9979 # An option. Add it.
9980 case $ac_arg in
9981 *\'*)
9982 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
9983 esac
9984 baseargs="$baseargs '$ac_arg'"
29a63921
AO
9985 if test X"$skip_targ" = Xno; then
9986 tbaseargs="$tbaseargs '$ac_arg'"
9987 fi
1c710c3c
DJ
9988 keep_next=$separate_arg
9989 ;;
9990 *)
9991 # Either a variable assignment, or a nonopt (triplet). Don't
9992 # pass it down; let the Makefile handle this.
9993 continue
9994 ;;
9995 esac
9996done
9997# Remove the initial space we just introduced and, as these will be
9998# expanded by make, quote '$'.
9999baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
671aa708 10000
43bb47c2
DJ
10001# Add in --program-transform-name, after --program-prefix and
10002# --program-suffix have been applied to it. Autoconf has already
10003# doubled dollar signs and backslashes in program_transform_name; we want
10004# the backslashes un-doubled, and then the entire thing wrapped in single
1c710c3c 10005# quotes, because this will be expanded first by make and then by the shell.
43bb47c2
DJ
10006# Also, because we want to override the logic in subdir configure scripts to
10007# choose program_transform_name, replace any s,x,x, with s,y,y,.
10008sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
10009${program_transform_name}
10010EOF_SED
10011gcc_transform_name=`cat conftestsed.out`
10012rm -f conftestsed.out
10013baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
29a63921 10014tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'"
d9acb717
RW
10015if test "$silent" = yes; then
10016 baseargs="$baseargs --silent"
29a63921 10017 tbaseargs="$tbaseargs --silent"
d9acb717 10018fi
0115d4a3 10019baseargs="$baseargs --disable-option-checking"
29a63921 10020tbaseargs="$tbaseargs --disable-option-checking"
43bb47c2 10021
ffedf511
RW
10022# Record and document user additions to sub configure arguments.
10023
10024
10025
10026
671aa708
NN
10027# For the build-side libraries, we just need to pretend we're native,
10028# and not use the same cache file. Multilibs are neither needed nor
3d96b0d0
HPN
10029# desired. We can't even use the same cache file for all build-side
10030# libraries, as they're compiled differently; some with C, some with
10031# C++ or with different feature-enabling options.
10032build_configargs="$build_configargs --cache-file=./config.cache ${baseargs}"
671aa708
NN
10033
10034# For host modules, accept cache file option, or specification as blank.
10035case "${cache_file}" in
10036"") # empty
10037 cache_file_option="" ;;
10038/* | [A-Za-z]:[\\/]* ) # absolute path
10039 cache_file_option="--cache-file=${cache_file}" ;;
10040*) # relative path
10041 cache_file_option="--cache-file=../${cache_file}" ;;
10042esac
10043
09438bde
NN
10044# Host dirs don't like to share a cache file either, horribly enough.
10045# This seems to be due to autoconf 2.5x stupidity.
ffedf511 10046host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}"
671aa708 10047
29a63921 10048target_configargs="$target_configargs ${tbaseargs}"
671aa708
NN
10049
10050# Passing a --with-cross-host argument lets the target libraries know
10051# whether they are being built with a cross-compiler or being built
10052# native. However, it would be better to use other mechanisms to make the
10053# sorts of decisions they want to make on this basis. Please consider
10054# this option to be deprecated. FIXME.
10055if test x${is_cross_compiler} = xyes ; then
1c710c3c 10056 target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
671aa708
NN
10057fi
10058
79e0604d
FXC
10059# Special user-friendly check for native x86_64-linux build, if
10060# multilib is not explicitly enabled.
10061case "$target:$have_compiler:$host:$target:$enable_multilib" in
10062 x86_64-*linux*:yes:$build:$build:)
e640447c 10063 # Make sure we have a development environment that handles 32-bit
79e0604d
FXC
10064 dev64=no
10065 echo "int main () { return 0; }" > conftest.c
10066 ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
10067 if test $? = 0 ; then
10068 if test -s conftest || test -s conftest.exe ; then
10069 dev64=yes
10070 fi
10071 fi
10072 rm -f conftest*
10073 if test x${dev64} != xyes ; then
22e05272 10074 as_fn_error $? "I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib." "$LINENO" 5
79e0604d
FXC
10075 fi
10076 ;;
10077esac
10078
dc683a3f
RW
10079# Default to --enable-multilib.
10080if test x${enable_multilib} = x ; then
671aa708 10081 target_configargs="--enable-multilib ${target_configargs}"
dc683a3f 10082fi
671aa708
NN
10083
10084# Pass --with-newlib if appropriate. Note that target_configdirs has
10085# changed from the earlier setting of with_newlib.
10086if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
10087 target_configargs="--with-newlib ${target_configargs}"
10088fi
10089
6b9eb62c
NN
10090# Different target subdirs use different values of certain variables
10091# (notably CXX). Worse, multilibs use *lots* of different values.
10092# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
10093# it doesn't automatically accept command-line overrides of them.
10094# This means it's not safe for target subdirs to share a cache file,
10095# which is disgusting, but there you have it. Hopefully this can be
10096# fixed in future. It's still worthwhile to use a cache file for each
10097# directory. I think.
10098
bebcd931
MS
10099# Pass the appropriate --build, --host, --target and --cache-file arguments.
10100# We need to pass --target, as newer autoconf's requires consistency
10101# for target_alias and gcc doesn't manage it consistently.
e69bf64b 10102target_configargs="--cache-file=./config.cache ${target_configargs}"
671aa708 10103
671aa708
NN
10104FLAGS_FOR_TARGET=
10105case " $target_configdirs " in
10106 *" newlib "*)
10107 case " $target_configargs " in
10108 *" --with-newlib "*)
10109 case "$target" in
5d571eaa 10110 *-cygwin*)
443e6238 10111 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
5d571eaa 10112 ;;
671aa708
NN
10113 esac
10114
10115 # If we're not building GCC, don't discard standard headers.
10116 if test -d ${srcdir}/gcc; then
10117 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
10118
10119 if test "${build}" != "${host}"; then
10120 # On Canadian crosses, CC_FOR_TARGET will have already been set
10121 # by `configure', so we won't have an opportunity to add -Bgcc/
10122 # to it. This is right: we don't want to search that directory
10123 # for binaries, but we want the header files in there, so add
10124 # them explicitly.
0463992b 10125 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
671aa708
NN
10126
10127 # Someone might think of using the pre-installed headers on
10128 # Canadian crosses, in case the installed compiler is not fully
10129 # compatible with the compiler being built. In this case, it
10130 # would be better to flag an error than risking having
10131 # incompatible object files being constructed. We can't
10132 # guarantee that an error will be flagged, but let's hope the
10133 # compiler will do it, when presented with incompatible header
10134 # files.
10135 fi
10136 fi
10137
10138 case "${target}-${is_cross_compiler}" in
f2a0e225 10139 i[3456789]86-*-linux*-no)
671aa708
NN
10140 # Here host == target, so we don't need to build gcc,
10141 # so we don't want to discard standard headers.
10142 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
10143 ;;
10144 *)
10145 # If we're building newlib, use its generic headers last, but search
10146 # for any libc-related directories first (so make it the last -B
10147 # switch).
10148 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
c03353e2
RIL
10149
10150 # If we're building libgloss, find the startup file, simulator library
10151 # and linker script.
10152 case " $target_configdirs " in
10153 *" libgloss "*)
10154 # Look for startup file, simulator library and maybe linker script.
10155 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/'"$libgloss_dir"
10156 # Look for libnosys.a in case the target needs it.
10157 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
10158 # Most targets have the linker script in the source directory.
10159 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$s/libgloss/'"$libgloss_dir"
10160 ;;
10161 esac
671aa708
NN
10162 ;;
10163 esac
10164 ;;
10165 esac
10166 ;;
10167esac
5d571eaa 10168
b91f0a41 10169case "$target" in
5d571eaa
OS
10170 x86_64-*mingw* | *-w64-mingw*)
10171 # MinGW-w64 does not use newlib, nor does it use winsup. It may,
10172 # however, use a symlink named 'mingw' in ${prefix} .
10173 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L${prefix}/${target}/lib -L${prefix}/mingw/lib -isystem ${prefix}/${target}/include -isystem ${prefix}/mingw/include'
10174 ;;
10175 *-mingw*)
10176 # MinGW can't be handled as Cygwin above since it does not use newlib.
10177 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include'
10178 ;;
b91f0a41 10179esac
671aa708 10180
6691a79e
ME
10181# Allow the user to override the flags for
10182# our build compiler if desired.
f019adc1
MF
10183if test x"${build}" = x"${host}" ; then
10184 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
84401ce5 10185 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
f019adc1
MF
10186 CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
10187 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
10188fi
6691a79e 10189
671aa708
NN
10190# On Canadian crosses, we'll be searching the right directories for
10191# the previously-installed cross compiler, so don't bother to add
10192# flags for directories within the install tree of the compiler
10193# being built; programs in there won't even run.
10194if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
10195 # Search for pre-installed headers if nothing else fits.
9124bc53 10196 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
671aa708
NN
10197fi
10198
10199if test "x${use_gnu_ld}" = x &&
10200 echo " ${configdirs} " | grep " ld " > /dev/null ; then
10201 # Arrange for us to find uninstalled linker scripts.
215c351a 10202 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
671aa708
NN
10203fi
10204
e88a2c09
DD
10205# Search for other target-specific linker scripts and such.
10206case "${target}" in
3e19841a
PB
10207 mep*)
10208 FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
10209 ;;
9b8ffbb8
OH
10210 # The VxWorks support for shared libraries is getting in
10211 # incrementally. Make sure it doesn't get activated implicitly:
10212 *vxworks*)
10213 if test "${enable_shared-unset}" = unset ; then
10214 enable_shared=no
10215 # So the build of libraries knows ...
10216 target_configargs="${target_configargs} --disable-shared"
10217 # So gcc knows ...
10218 host_configargs="${host_configargs} --disable-shared"
10219 fi
10220 ;;
e88a2c09
DD
10221esac
10222
671aa708 10223# Makefile fragments.
7b61653a
PE
10224for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
10225do
10226 eval fragval=\$$frag
10227 if test $fragval != /dev/null; then
10228 eval $frag=${srcdir}/$fragval
10229 fi
10230done
671aa708
NN
10231
10232
10233
10234
10235
10236# Miscellanea: directories, flags, etc.
10237
10238
10239
10240
10241
10242
10243
d89f0ad6 10244
23f6b2f9 10245# Build module lists & subconfigure args.
671aa708
NN
10246
10247
10248
2abefe3d
PB
10249# Host module lists & subconfigure args.
10250
10251
10252
aae29963 10253
2abefe3d
PB
10254# Target module lists & subconfigure args.
10255
10256
10257
10258# Build tools.
10259
10260
10261
0999159b
PB
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
b4c522fa 10275
3b5e8ee4 10276
a1d2b162
IS
10277
10278
2abefe3d
PB
10279# Generate default definitions for YACC, M4, LEX and other programs that run
10280# on the build machine. These are used if the Makefile can't locate these
10281# programs in objdir.
10282MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
10283
10284for ac_prog in 'bison -y' byacc yacc
10285do
1c710c3c 10286 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10287set dummy $ac_prog; ac_word=$2
5213506e
RW
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10290if ${ac_cv_prog_YACC+:} false; then :
5213506e 10291 $as_echo_n "(cached) " >&6
2abefe3d
PB
10292else
10293 if test -n "$YACC"; then
10294 ac_cv_prog_YACC="$YACC" # Let the user override the test.
10295else
1c710c3c
DJ
10296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10297for as_dir in $PATH
10298do
10299 IFS=$as_save_IFS
10300 test -z "$as_dir" && as_dir=.
5213506e 10301 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10303 ac_cv_prog_YACC="$ac_prog"
5213506e 10304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10305 break 2
10306 fi
10307done
5213506e
RW
10308 done
10309IFS=$as_save_IFS
1c710c3c 10310
2abefe3d
PB
10311fi
10312fi
1c710c3c 10313YACC=$ac_cv_prog_YACC
2abefe3d 10314if test -n "$YACC"; then
5213506e
RW
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
10316$as_echo "$YACC" >&6; }
2abefe3d 10317else
5213506e
RW
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
2abefe3d
PB
10320fi
10321
5213506e 10322
1c710c3c 10323 test -n "$YACC" && break
2abefe3d
PB
10324done
10325test -n "$YACC" || YACC="$MISSING bison -y"
10326
10327case " $build_configdirs " in
10328 *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
2abefe3d
PB
10329esac
10330
10331for ac_prog in bison
10332do
1c710c3c 10333 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10334set dummy $ac_prog; ac_word=$2
5213506e
RW
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10337if ${ac_cv_prog_BISON+:} false; then :
5213506e 10338 $as_echo_n "(cached) " >&6
2abefe3d
PB
10339else
10340 if test -n "$BISON"; then
10341 ac_cv_prog_BISON="$BISON" # Let the user override the test.
10342else
1c710c3c
DJ
10343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10344for as_dir in $PATH
10345do
10346 IFS=$as_save_IFS
10347 test -z "$as_dir" && as_dir=.
5213506e 10348 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10350 ac_cv_prog_BISON="$ac_prog"
5213506e 10351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10352 break 2
10353 fi
10354done
5213506e
RW
10355 done
10356IFS=$as_save_IFS
1c710c3c 10357
2abefe3d
PB
10358fi
10359fi
1c710c3c 10360BISON=$ac_cv_prog_BISON
2abefe3d 10361if test -n "$BISON"; then
5213506e
RW
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10363$as_echo "$BISON" >&6; }
2abefe3d 10364else
5213506e
RW
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
2abefe3d
PB
10367fi
10368
5213506e 10369
1c710c3c 10370 test -n "$BISON" && break
2abefe3d
PB
10371done
10372test -n "$BISON" || BISON="$MISSING bison"
10373
10374case " $build_configdirs " in
10375 *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
10376esac
10377
10378for ac_prog in gm4 gnum4 m4
10379do
1c710c3c 10380 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10381set dummy $ac_prog; ac_word=$2
5213506e
RW
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10384if ${ac_cv_prog_M4+:} false; then :
5213506e 10385 $as_echo_n "(cached) " >&6
2abefe3d
PB
10386else
10387 if test -n "$M4"; then
10388 ac_cv_prog_M4="$M4" # Let the user override the test.
10389else
1c710c3c
DJ
10390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10391for as_dir in $PATH
10392do
10393 IFS=$as_save_IFS
10394 test -z "$as_dir" && as_dir=.
5213506e 10395 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10396 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10397 ac_cv_prog_M4="$ac_prog"
5213506e 10398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10399 break 2
10400 fi
10401done
5213506e
RW
10402 done
10403IFS=$as_save_IFS
1c710c3c 10404
2abefe3d
PB
10405fi
10406fi
1c710c3c 10407M4=$ac_cv_prog_M4
2abefe3d 10408if test -n "$M4"; then
5213506e
RW
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5
10410$as_echo "$M4" >&6; }
2abefe3d 10411else
5213506e
RW
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
2abefe3d
PB
10414fi
10415
5213506e 10416
1c710c3c 10417 test -n "$M4" && break
2abefe3d
PB
10418done
10419test -n "$M4" || M4="$MISSING m4"
10420
10421case " $build_configdirs " in
10422 *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
10423esac
10424
10425for ac_prog in flex lex
10426do
1c710c3c 10427 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10428set dummy $ac_prog; ac_word=$2
5213506e
RW
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10430$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10431if ${ac_cv_prog_LEX+:} false; then :
5213506e 10432 $as_echo_n "(cached) " >&6
2abefe3d
PB
10433else
10434 if test -n "$LEX"; then
10435 ac_cv_prog_LEX="$LEX" # Let the user override the test.
10436else
1c710c3c
DJ
10437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440 IFS=$as_save_IFS
10441 test -z "$as_dir" && as_dir=.
5213506e 10442 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10444 ac_cv_prog_LEX="$ac_prog"
5213506e 10445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10446 break 2
10447 fi
10448done
5213506e
RW
10449 done
10450IFS=$as_save_IFS
1c710c3c 10451
2abefe3d
PB
10452fi
10453fi
1c710c3c 10454LEX=$ac_cv_prog_LEX
2abefe3d 10455if test -n "$LEX"; then
5213506e
RW
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
10457$as_echo "$LEX" >&6; }
2abefe3d 10458else
5213506e
RW
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460$as_echo "no" >&6; }
2abefe3d
PB
10461fi
10462
5213506e 10463
1c710c3c 10464 test -n "$LEX" && break
2abefe3d
PB
10465done
10466test -n "$LEX" || LEX="$MISSING flex"
10467
10468case " $build_configdirs " in
10469 *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
10470 *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
10471esac
10472
10473for ac_prog in flex
10474do
1c710c3c 10475 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10476set dummy $ac_prog; ac_word=$2
5213506e
RW
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10478$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10479if ${ac_cv_prog_FLEX+:} false; then :
5213506e 10480 $as_echo_n "(cached) " >&6
2abefe3d
PB
10481else
10482 if test -n "$FLEX"; then
10483 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
10484else
1c710c3c
DJ
10485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486for as_dir in $PATH
10487do
10488 IFS=$as_save_IFS
10489 test -z "$as_dir" && as_dir=.
5213506e 10490 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10492 ac_cv_prog_FLEX="$ac_prog"
5213506e 10493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10494 break 2
10495 fi
10496done
5213506e
RW
10497 done
10498IFS=$as_save_IFS
1c710c3c 10499
2abefe3d
PB
10500fi
10501fi
1c710c3c 10502FLEX=$ac_cv_prog_FLEX
2abefe3d 10503if test -n "$FLEX"; then
5213506e
RW
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
10505$as_echo "$FLEX" >&6; }
2abefe3d 10506else
5213506e
RW
10507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508$as_echo "no" >&6; }
2abefe3d
PB
10509fi
10510
5213506e 10511
1c710c3c 10512 test -n "$FLEX" && break
2abefe3d
PB
10513done
10514test -n "$FLEX" || FLEX="$MISSING flex"
10515
10516case " $build_configdirs " in
10517 *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
10518esac
10519
10520for ac_prog in makeinfo
10521do
1c710c3c 10522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10523set dummy $ac_prog; ac_word=$2
5213506e
RW
10524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10525$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10526if ${ac_cv_prog_MAKEINFO+:} false; then :
5213506e 10527 $as_echo_n "(cached) " >&6
2abefe3d
PB
10528else
10529 if test -n "$MAKEINFO"; then
10530 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
10531else
1c710c3c
DJ
10532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10533for as_dir in $PATH
10534do
10535 IFS=$as_save_IFS
10536 test -z "$as_dir" && as_dir=.
5213506e 10537 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10539 ac_cv_prog_MAKEINFO="$ac_prog"
5213506e 10540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10541 break 2
10542 fi
10543done
5213506e
RW
10544 done
10545IFS=$as_save_IFS
1c710c3c 10546
2abefe3d
PB
10547fi
10548fi
1c710c3c 10549MAKEINFO=$ac_cv_prog_MAKEINFO
2abefe3d 10550if test -n "$MAKEINFO"; then
5213506e
RW
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
10552$as_echo "$MAKEINFO" >&6; }
2abefe3d 10553else
5213506e
RW
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
2abefe3d
PB
10556fi
10557
5213506e 10558
1c710c3c 10559 test -n "$MAKEINFO" && break
2abefe3d
PB
10560done
10561test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
10562
10563case " $build_configdirs " in
10564 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
10565 *)
10566
d18ff35a 10567 # For an installed makeinfo, we require it to be from texinfo 4.7 or
2abefe3d
PB
10568 # higher, else we use the "missing" dummy.
10569 if ${MAKEINFO} --version \
d18ff35a 10570 | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
2abefe3d
PB
10571 :
10572 else
10573 MAKEINFO="$MISSING makeinfo"
10574 fi
10575 ;;
10576
10577esac
671aa708 10578
2abefe3d 10579# FIXME: expect and dejagnu may become build tools?
671aa708 10580
2abefe3d
PB
10581for ac_prog in expect
10582do
1c710c3c 10583 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10584set dummy $ac_prog; ac_word=$2
5213506e
RW
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10586$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10587if ${ac_cv_prog_EXPECT+:} false; then :
5213506e 10588 $as_echo_n "(cached) " >&6
2abefe3d
PB
10589else
10590 if test -n "$EXPECT"; then
10591 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
10592else
1c710c3c
DJ
10593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10594for as_dir in $PATH
10595do
10596 IFS=$as_save_IFS
10597 test -z "$as_dir" && as_dir=.
5213506e 10598 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10600 ac_cv_prog_EXPECT="$ac_prog"
5213506e 10601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10602 break 2
10603 fi
10604done
5213506e
RW
10605 done
10606IFS=$as_save_IFS
1c710c3c 10607
2abefe3d
PB
10608fi
10609fi
1c710c3c 10610EXPECT=$ac_cv_prog_EXPECT
2abefe3d 10611if test -n "$EXPECT"; then
5213506e
RW
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPECT" >&5
10613$as_echo "$EXPECT" >&6; }
2abefe3d 10614else
5213506e
RW
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10616$as_echo "no" >&6; }
2abefe3d 10617fi
671aa708 10618
5213506e 10619
1c710c3c 10620 test -n "$EXPECT" && break
2abefe3d
PB
10621done
10622test -n "$EXPECT" || EXPECT="expect"
671aa708 10623
2abefe3d
PB
10624case " $configdirs " in
10625 *" expect "*)
10626 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
10627 ;;
10628esac
671aa708 10629
2abefe3d
PB
10630for ac_prog in runtest
10631do
1c710c3c 10632 # Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 10633set dummy $ac_prog; ac_word=$2
5213506e
RW
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10635$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10636if ${ac_cv_prog_RUNTEST+:} false; then :
5213506e 10637 $as_echo_n "(cached) " >&6
2abefe3d
PB
10638else
10639 if test -n "$RUNTEST"; then
10640 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
fb0103e5 10641else
1c710c3c
DJ
10642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10643for as_dir in $PATH
10644do
10645 IFS=$as_save_IFS
10646 test -z "$as_dir" && as_dir=.
5213506e 10647 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10649 ac_cv_prog_RUNTEST="$ac_prog"
5213506e 10650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10651 break 2
10652 fi
10653done
5213506e
RW
10654 done
10655IFS=$as_save_IFS
1c710c3c 10656
2abefe3d
PB
10657fi
10658fi
1c710c3c 10659RUNTEST=$ac_cv_prog_RUNTEST
2abefe3d 10660if test -n "$RUNTEST"; then
5213506e
RW
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNTEST" >&5
10662$as_echo "$RUNTEST" >&6; }
2abefe3d 10663else
5213506e
RW
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
2abefe3d 10666fi
671aa708 10667
5213506e 10668
1c710c3c 10669 test -n "$RUNTEST" && break
2abefe3d
PB
10670done
10671test -n "$RUNTEST" || RUNTEST="runtest"
671aa708 10672
2abefe3d
PB
10673case " $configdirs " in
10674 *" dejagnu "*)
c394e891 10675 test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
2abefe3d
PB
10676 ;;
10677esac
671aa708 10678
4e3dcf20 10679
671aa708 10680# Host tools.
ca9f4b81
AO
10681ncn_tool_prefix=
10682test -n "$host_alias" && ncn_tool_prefix=$host_alias-
10683ncn_target_tool_prefix=
10684test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
10685
278a7a38
AO
10686
10687
10688if test -n "$AR"; then
10689 ac_cv_prog_AR=$AR
10690elif test -n "$ac_cv_prog_AR"; then
10691 AR=$ac_cv_prog_AR
10692fi
10693
10694if test -n "$ac_cv_prog_AR"; then
10695 for ncn_progname in ar; do
10696 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
10697set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10699$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10700if ${ac_cv_prog_AR+:} false; then :
5213506e 10701 $as_echo_n "(cached) " >&6
278a7a38
AO
10702else
10703 if test -n "$AR"; then
10704 ac_cv_prog_AR="$AR" # Let the user override the test.
10705else
10706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10707for as_dir in $PATH
10708do
10709 IFS=$as_save_IFS
10710 test -z "$as_dir" && as_dir=.
5213506e 10711 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 10713 ac_cv_prog_AR="${ncn_progname}"
5213506e 10714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
10715 break 2
10716 fi
10717done
5213506e
RW
10718 done
10719IFS=$as_save_IFS
278a7a38
AO
10720
10721fi
10722fi
10723AR=$ac_cv_prog_AR
10724if test -n "$AR"; then
5213506e
RW
10725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10726$as_echo "$AR" >&6; }
278a7a38 10727else
5213506e
RW
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
278a7a38
AO
10730fi
10731
5213506e 10732
278a7a38
AO
10733 done
10734fi
10735
10736for ncn_progname in ar; do
2693c0b0
PB
10737 if test -n "$ncn_tool_prefix"; then
10738 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
10739set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10741$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10742if ${ac_cv_prog_AR+:} false; then :
5213506e 10743 $as_echo_n "(cached) " >&6
ca9f4b81
AO
10744else
10745 if test -n "$AR"; then
10746 ac_cv_prog_AR="$AR" # Let the user override the test.
10747else
1c710c3c
DJ
10748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10749for as_dir in $PATH
10750do
10751 IFS=$as_save_IFS
10752 test -z "$as_dir" && as_dir=.
5213506e 10753 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10755 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
5213506e 10756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10757 break 2
10758 fi
10759done
5213506e
RW
10760 done
10761IFS=$as_save_IFS
1c710c3c 10762
ca9f4b81
AO
10763fi
10764fi
1c710c3c 10765AR=$ac_cv_prog_AR
ca9f4b81 10766if test -n "$AR"; then
5213506e
RW
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10768$as_echo "$AR" >&6; }
ca9f4b81 10769else
5213506e
RW
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
ca9f4b81
AO
10772fi
10773
5213506e 10774
2693c0b0
PB
10775 fi
10776 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
10777 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
10778set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
10779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10780$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10781if ${ac_cv_prog_AR+:} false; then :
5213506e 10782 $as_echo_n "(cached) " >&6
ca9f4b81 10783else
2693c0b0 10784 if test -n "$AR"; then
af71363e
AS
10785 ac_cv_prog_AR="$AR" # Let the user override the test.
10786else
1c710c3c
DJ
10787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10788for as_dir in $PATH
10789do
10790 IFS=$as_save_IFS
10791 test -z "$as_dir" && as_dir=.
5213506e 10792 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10794 ac_cv_prog_AR="${ncn_progname}"
5213506e 10795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10796 break 2
10797 fi
10798done
5213506e
RW
10799 done
10800IFS=$as_save_IFS
1c710c3c 10801
ca9f4b81
AO
10802fi
10803fi
1c710c3c 10804AR=$ac_cv_prog_AR
2693c0b0 10805if test -n "$AR"; then
5213506e
RW
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10807$as_echo "$AR" >&6; }
ca9f4b81 10808else
5213506e
RW
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810$as_echo "no" >&6; }
ca9f4b81 10811fi
1c710c3c 10812
5213506e 10813
2693c0b0
PB
10814 fi
10815 test -n "$ac_cv_prog_AR" && break
10816done
10817
10818if test -z "$ac_cv_prog_AR" ; then
10819 set dummy ar
10820 if test $build = $host ; then
10821 AR="$2"
ca9f4b81 10822 else
2693c0b0 10823 AR="${ncn_tool_prefix}$2"
ca9f4b81 10824 fi
ca9f4b81
AO
10825fi
10826
278a7a38
AO
10827
10828
10829if test -n "$AS"; then
10830 ac_cv_prog_AS=$AS
10831elif test -n "$ac_cv_prog_AS"; then
10832 AS=$ac_cv_prog_AS
10833fi
10834
10835if test -n "$ac_cv_prog_AS"; then
10836 for ncn_progname in as; do
10837 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
10838set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10841if ${ac_cv_prog_AS+:} false; then :
5213506e 10842 $as_echo_n "(cached) " >&6
278a7a38
AO
10843else
10844 if test -n "$AS"; then
10845 ac_cv_prog_AS="$AS" # Let the user override the test.
10846else
10847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10848for as_dir in $PATH
10849do
10850 IFS=$as_save_IFS
10851 test -z "$as_dir" && as_dir=.
5213506e 10852 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 10854 ac_cv_prog_AS="${ncn_progname}"
5213506e 10855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
10856 break 2
10857 fi
10858done
5213506e
RW
10859 done
10860IFS=$as_save_IFS
278a7a38
AO
10861
10862fi
10863fi
10864AS=$ac_cv_prog_AS
10865if test -n "$AS"; then
5213506e
RW
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
10867$as_echo "$AS" >&6; }
278a7a38 10868else
5213506e
RW
10869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10870$as_echo "no" >&6; }
278a7a38
AO
10871fi
10872
5213506e 10873
278a7a38
AO
10874 done
10875fi
10876
10877for ncn_progname in as; do
2693c0b0
PB
10878 if test -n "$ncn_tool_prefix"; then
10879 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
10880set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10882$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10883if ${ac_cv_prog_AS+:} false; then :
5213506e 10884 $as_echo_n "(cached) " >&6
ca9f4b81
AO
10885else
10886 if test -n "$AS"; then
10887 ac_cv_prog_AS="$AS" # Let the user override the test.
0b0dc272 10888else
1c710c3c
DJ
10889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892 IFS=$as_save_IFS
10893 test -z "$as_dir" && as_dir=.
5213506e 10894 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10896 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
5213506e 10897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10898 break 2
10899 fi
10900done
5213506e
RW
10901 done
10902IFS=$as_save_IFS
1c710c3c 10903
ca9f4b81
AO
10904fi
10905fi
1c710c3c 10906AS=$ac_cv_prog_AS
ca9f4b81 10907if test -n "$AS"; then
5213506e
RW
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
10909$as_echo "$AS" >&6; }
ca9f4b81 10910else
5213506e
RW
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
ca9f4b81
AO
10913fi
10914
5213506e 10915
2693c0b0
PB
10916 fi
10917 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
10918 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
10919set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10921$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10922if ${ac_cv_prog_AS+:} false; then :
5213506e 10923 $as_echo_n "(cached) " >&6
ca9f4b81 10924else
2693c0b0
PB
10925 if test -n "$AS"; then
10926 ac_cv_prog_AS="$AS" # Let the user override the test.
ca9f4b81 10927else
1c710c3c
DJ
10928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10929for as_dir in $PATH
10930do
10931 IFS=$as_save_IFS
10932 test -z "$as_dir" && as_dir=.
5213506e 10933 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 10935 ac_cv_prog_AS="${ncn_progname}"
5213506e 10936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
10937 break 2
10938 fi
10939done
5213506e
RW
10940 done
10941IFS=$as_save_IFS
1c710c3c 10942
ca9f4b81
AO
10943fi
10944fi
1c710c3c 10945AS=$ac_cv_prog_AS
2693c0b0 10946if test -n "$AS"; then
5213506e
RW
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
10948$as_echo "$AS" >&6; }
ca9f4b81 10949else
5213506e
RW
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10951$as_echo "no" >&6; }
ca9f4b81 10952fi
1c710c3c 10953
5213506e 10954
2693c0b0
PB
10955 fi
10956 test -n "$ac_cv_prog_AS" && break
10957done
10958
10959if test -z "$ac_cv_prog_AS" ; then
10960 set dummy as
10961 if test $build = $host ; then
10962 AS="$2"
ca9f4b81 10963 else
2693c0b0 10964 AS="${ncn_tool_prefix}$2"
ca9f4b81 10965 fi
ca9f4b81
AO
10966fi
10967
278a7a38
AO
10968
10969
10970if test -n "$DLLTOOL"; then
10971 ac_cv_prog_DLLTOOL=$DLLTOOL
10972elif test -n "$ac_cv_prog_DLLTOOL"; then
10973 DLLTOOL=$ac_cv_prog_DLLTOOL
10974fi
10975
10976if test -n "$ac_cv_prog_DLLTOOL"; then
10977 for ncn_progname in dlltool; do
10978 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
10979set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10981$as_echo_n "checking for $ac_word... " >&6; }
22e05272 10982if ${ac_cv_prog_DLLTOOL+:} false; then :
5213506e 10983 $as_echo_n "(cached) " >&6
278a7a38
AO
10984else
10985 if test -n "$DLLTOOL"; then
10986 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
10987else
10988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10989for as_dir in $PATH
10990do
10991 IFS=$as_save_IFS
10992 test -z "$as_dir" && as_dir=.
5213506e 10993 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 10994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 10995 ac_cv_prog_DLLTOOL="${ncn_progname}"
5213506e 10996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
10997 break 2
10998 fi
10999done
5213506e
RW
11000 done
11001IFS=$as_save_IFS
278a7a38
AO
11002
11003fi
11004fi
11005DLLTOOL=$ac_cv_prog_DLLTOOL
11006if test -n "$DLLTOOL"; then
5213506e
RW
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11008$as_echo "$DLLTOOL" >&6; }
278a7a38 11009else
5213506e
RW
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
278a7a38
AO
11012fi
11013
5213506e 11014
278a7a38
AO
11015 done
11016fi
11017
11018for ncn_progname in dlltool; do
2693c0b0
PB
11019 if test -n "$ncn_tool_prefix"; then
11020 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11021set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11023$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11024if ${ac_cv_prog_DLLTOOL+:} false; then :
5213506e 11025 $as_echo_n "(cached) " >&6
ca9f4b81
AO
11026else
11027 if test -n "$DLLTOOL"; then
11028 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
11029else
1c710c3c
DJ
11030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033 IFS=$as_save_IFS
11034 test -z "$as_dir" && as_dir=.
5213506e 11035 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11037 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
5213506e 11038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11039 break 2
11040 fi
11041done
5213506e
RW
11042 done
11043IFS=$as_save_IFS
1c710c3c 11044
ca9f4b81
AO
11045fi
11046fi
1c710c3c 11047DLLTOOL=$ac_cv_prog_DLLTOOL
ca9f4b81 11048if test -n "$DLLTOOL"; then
5213506e
RW
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11050$as_echo "$DLLTOOL" >&6; }
ca9f4b81 11051else
5213506e
RW
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053$as_echo "no" >&6; }
ca9f4b81
AO
11054fi
11055
5213506e 11056
2693c0b0
PB
11057 fi
11058 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
11059 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11060set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11063if ${ac_cv_prog_DLLTOOL+:} false; then :
5213506e 11064 $as_echo_n "(cached) " >&6
ca9f4b81 11065else
2693c0b0
PB
11066 if test -n "$DLLTOOL"; then
11067 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
ca9f4b81 11068else
1c710c3c
DJ
11069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11070for as_dir in $PATH
11071do
11072 IFS=$as_save_IFS
11073 test -z "$as_dir" && as_dir=.
5213506e 11074 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11076 ac_cv_prog_DLLTOOL="${ncn_progname}"
5213506e 11077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11078 break 2
11079 fi
11080done
5213506e
RW
11081 done
11082IFS=$as_save_IFS
1c710c3c 11083
ca9f4b81
AO
11084fi
11085fi
1c710c3c 11086DLLTOOL=$ac_cv_prog_DLLTOOL
2693c0b0 11087if test -n "$DLLTOOL"; then
5213506e
RW
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11089$as_echo "$DLLTOOL" >&6; }
ca9f4b81 11090else
5213506e
RW
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
ca9f4b81 11093fi
1c710c3c 11094
5213506e 11095
2693c0b0
PB
11096 fi
11097 test -n "$ac_cv_prog_DLLTOOL" && break
11098done
11099
11100if test -z "$ac_cv_prog_DLLTOOL" ; then
11101 set dummy dlltool
11102 if test $build = $host ; then
11103 DLLTOOL="$2"
ca9f4b81 11104 else
2693c0b0 11105 DLLTOOL="${ncn_tool_prefix}$2"
ca9f4b81 11106 fi
ca9f4b81
AO
11107fi
11108
278a7a38
AO
11109
11110
3b5e8ee4
IS
11111if test -n "$DSYMUTIL"; then
11112 ac_cv_prog_DSYMUTIL=$DSYMUTIL
11113elif test -n "$ac_cv_prog_DSYMUTIL"; then
11114 DSYMUTIL=$ac_cv_prog_DSYMUTIL
11115fi
11116
11117if test -n "$ac_cv_prog_DSYMUTIL"; then
11118 for ncn_progname in dsymutil; do
11119 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11120set dummy ${ncn_progname}; ac_word=$2
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11122$as_echo_n "checking for $ac_word... " >&6; }
11123if ${ac_cv_prog_DSYMUTIL+:} false; then :
11124 $as_echo_n "(cached) " >&6
11125else
11126 if test -n "$DSYMUTIL"; then
11127 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
11128else
11129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132 IFS=$as_save_IFS
11133 test -z "$as_dir" && as_dir=.
11134 for ac_exec_ext in '' $ac_executable_extensions; do
11135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136 ac_cv_prog_DSYMUTIL="${ncn_progname}"
11137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138 break 2
11139 fi
11140done
11141 done
11142IFS=$as_save_IFS
11143
11144fi
11145fi
11146DSYMUTIL=$ac_cv_prog_DSYMUTIL
11147if test -n "$DSYMUTIL"; then
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
11149$as_echo "$DSYMUTIL" >&6; }
11150else
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
11153fi
11154
11155
11156 done
11157fi
11158
11159for ncn_progname in dsymutil; do
11160 if test -n "$ncn_tool_prefix"; then
11161 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11162set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
11163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11164$as_echo_n "checking for $ac_word... " >&6; }
11165if ${ac_cv_prog_DSYMUTIL+:} false; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168 if test -n "$DSYMUTIL"; then
11169 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
11170else
11171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11172for as_dir in $PATH
11173do
11174 IFS=$as_save_IFS
11175 test -z "$as_dir" && as_dir=.
11176 for ac_exec_ext in '' $ac_executable_extensions; do
11177 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11178 ac_cv_prog_DSYMUTIL="${ncn_tool_prefix}${ncn_progname}"
11179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11180 break 2
11181 fi
11182done
11183 done
11184IFS=$as_save_IFS
11185
11186fi
11187fi
11188DSYMUTIL=$ac_cv_prog_DSYMUTIL
11189if test -n "$DSYMUTIL"; then
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
11191$as_echo "$DSYMUTIL" >&6; }
11192else
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11194$as_echo "no" >&6; }
11195fi
11196
11197
11198 fi
11199 if test -z "$ac_cv_prog_DSYMUTIL" && test $build = $host ; then
11200 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11201set dummy ${ncn_progname}; ac_word=$2
11202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203$as_echo_n "checking for $ac_word... " >&6; }
11204if ${ac_cv_prog_DSYMUTIL+:} false; then :
11205 $as_echo_n "(cached) " >&6
11206else
11207 if test -n "$DSYMUTIL"; then
11208 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
11209else
11210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11211for as_dir in $PATH
11212do
11213 IFS=$as_save_IFS
11214 test -z "$as_dir" && as_dir=.
11215 for ac_exec_ext in '' $ac_executable_extensions; do
11216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11217 ac_cv_prog_DSYMUTIL="${ncn_progname}"
11218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11219 break 2
11220 fi
11221done
11222 done
11223IFS=$as_save_IFS
11224
11225fi
11226fi
11227DSYMUTIL=$ac_cv_prog_DSYMUTIL
11228if test -n "$DSYMUTIL"; then
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
11230$as_echo "$DSYMUTIL" >&6; }
11231else
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
11234fi
11235
11236
11237 fi
11238 test -n "$ac_cv_prog_DSYMUTIL" && break
11239done
11240
11241if test -z "$ac_cv_prog_DSYMUTIL" ; then
11242 set dummy dsymutil
11243 if test $build = $host ; then
11244 DSYMUTIL="$2"
11245 else
11246 DSYMUTIL="${ncn_tool_prefix}$2"
11247 fi
11248fi
11249
11250
11251
278a7a38
AO
11252if test -n "$LD"; then
11253 ac_cv_prog_LD=$LD
11254elif test -n "$ac_cv_prog_LD"; then
11255 LD=$ac_cv_prog_LD
11256fi
11257
11258if test -n "$ac_cv_prog_LD"; then
11259 for ncn_progname in ld; do
11260 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11261set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11264if ${ac_cv_prog_LD+:} false; then :
5213506e 11265 $as_echo_n "(cached) " >&6
278a7a38
AO
11266else
11267 if test -n "$LD"; then
11268 ac_cv_prog_LD="$LD" # Let the user override the test.
11269else
11270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11271for as_dir in $PATH
11272do
11273 IFS=$as_save_IFS
11274 test -z "$as_dir" && as_dir=.
5213506e 11275 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11277 ac_cv_prog_LD="${ncn_progname}"
5213506e 11278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11279 break 2
11280 fi
11281done
5213506e
RW
11282 done
11283IFS=$as_save_IFS
278a7a38
AO
11284
11285fi
11286fi
11287LD=$ac_cv_prog_LD
11288if test -n "$LD"; then
5213506e
RW
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11290$as_echo "$LD" >&6; }
278a7a38 11291else
5213506e
RW
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
278a7a38
AO
11294fi
11295
5213506e 11296
278a7a38
AO
11297 done
11298fi
11299
11300for ncn_progname in ld; do
2693c0b0
PB
11301 if test -n "$ncn_tool_prefix"; then
11302 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11303set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11305$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11306if ${ac_cv_prog_LD+:} false; then :
5213506e 11307 $as_echo_n "(cached) " >&6
ca9f4b81
AO
11308else
11309 if test -n "$LD"; then
11310 ac_cv_prog_LD="$LD" # Let the user override the test.
11311else
1c710c3c
DJ
11312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11313for as_dir in $PATH
11314do
11315 IFS=$as_save_IFS
11316 test -z "$as_dir" && as_dir=.
5213506e 11317 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11319 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
5213506e 11320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11321 break 2
11322 fi
11323done
5213506e
RW
11324 done
11325IFS=$as_save_IFS
1c710c3c 11326
ca9f4b81
AO
11327fi
11328fi
1c710c3c 11329LD=$ac_cv_prog_LD
ca9f4b81 11330if test -n "$LD"; then
5213506e
RW
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11332$as_echo "$LD" >&6; }
ca9f4b81 11333else
5213506e
RW
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
ca9f4b81
AO
11336fi
11337
5213506e 11338
2693c0b0
PB
11339 fi
11340 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
11341 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11342set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11344$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11345if ${ac_cv_prog_LD+:} false; then :
5213506e 11346 $as_echo_n "(cached) " >&6
ca9f4b81 11347else
2693c0b0
PB
11348 if test -n "$LD"; then
11349 ac_cv_prog_LD="$LD" # Let the user override the test.
6b65a26d 11350else
1c710c3c
DJ
11351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354 IFS=$as_save_IFS
11355 test -z "$as_dir" && as_dir=.
5213506e 11356 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11358 ac_cv_prog_LD="${ncn_progname}"
5213506e 11359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11360 break 2
11361 fi
11362done
5213506e
RW
11363 done
11364IFS=$as_save_IFS
1c710c3c 11365
ca9f4b81
AO
11366fi
11367fi
1c710c3c 11368LD=$ac_cv_prog_LD
2693c0b0 11369if test -n "$LD"; then
5213506e
RW
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11371$as_echo "$LD" >&6; }
ca9f4b81 11372else
5213506e
RW
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
ca9f4b81 11375fi
1c710c3c 11376
5213506e 11377
2693c0b0
PB
11378 fi
11379 test -n "$ac_cv_prog_LD" && break
11380done
11381
11382if test -z "$ac_cv_prog_LD" ; then
11383 set dummy ld
11384 if test $build = $host ; then
11385 LD="$2"
ca9f4b81 11386 else
2693c0b0 11387 LD="${ncn_tool_prefix}$2"
ca9f4b81 11388 fi
ca9f4b81
AO
11389fi
11390
278a7a38
AO
11391
11392
11393if test -n "$LIPO"; then
11394 ac_cv_prog_LIPO=$LIPO
11395elif test -n "$ac_cv_prog_LIPO"; then
11396 LIPO=$ac_cv_prog_LIPO
11397fi
11398
11399if test -n "$ac_cv_prog_LIPO"; then
11400 for ncn_progname in lipo; do
11401 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11402set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11404$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11405if ${ac_cv_prog_LIPO+:} false; then :
5213506e 11406 $as_echo_n "(cached) " >&6
278a7a38
AO
11407else
11408 if test -n "$LIPO"; then
11409 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11410else
11411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11412for as_dir in $PATH
11413do
11414 IFS=$as_save_IFS
11415 test -z "$as_dir" && as_dir=.
5213506e 11416 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11418 ac_cv_prog_LIPO="${ncn_progname}"
5213506e 11419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11420 break 2
11421 fi
11422done
5213506e
RW
11423 done
11424IFS=$as_save_IFS
278a7a38
AO
11425
11426fi
11427fi
11428LIPO=$ac_cv_prog_LIPO
11429if test -n "$LIPO"; then
5213506e
RW
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11431$as_echo "$LIPO" >&6; }
278a7a38 11432else
5213506e
RW
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
278a7a38
AO
11435fi
11436
5213506e 11437
278a7a38
AO
11438 done
11439fi
11440
11441for ncn_progname in lipo; do
2abefe3d
PB
11442 if test -n "$ncn_tool_prefix"; then
11443 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11444set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11446$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11447if ${ac_cv_prog_LIPO+:} false; then :
5213506e 11448 $as_echo_n "(cached) " >&6
2abefe3d
PB
11449else
11450 if test -n "$LIPO"; then
11451 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11452else
1c710c3c
DJ
11453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11454for as_dir in $PATH
11455do
11456 IFS=$as_save_IFS
11457 test -z "$as_dir" && as_dir=.
5213506e 11458 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11460 ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
5213506e 11461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11462 break 2
11463 fi
11464done
5213506e
RW
11465 done
11466IFS=$as_save_IFS
1c710c3c 11467
2abefe3d
PB
11468fi
11469fi
1c710c3c 11470LIPO=$ac_cv_prog_LIPO
2abefe3d 11471if test -n "$LIPO"; then
5213506e
RW
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11473$as_echo "$LIPO" >&6; }
2abefe3d 11474else
5213506e
RW
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
2abefe3d
PB
11477fi
11478
5213506e 11479
2abefe3d
PB
11480 fi
11481 if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
11482 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11483set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11485$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11486if ${ac_cv_prog_LIPO+:} false; then :
5213506e 11487 $as_echo_n "(cached) " >&6
2abefe3d
PB
11488else
11489 if test -n "$LIPO"; then
11490 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11491else
1c710c3c
DJ
11492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11493for as_dir in $PATH
11494do
11495 IFS=$as_save_IFS
11496 test -z "$as_dir" && as_dir=.
5213506e 11497 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11499 ac_cv_prog_LIPO="${ncn_progname}"
5213506e 11500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11501 break 2
11502 fi
11503done
5213506e
RW
11504 done
11505IFS=$as_save_IFS
1c710c3c 11506
2abefe3d
PB
11507fi
11508fi
1c710c3c 11509LIPO=$ac_cv_prog_LIPO
2abefe3d 11510if test -n "$LIPO"; then
5213506e
RW
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11512$as_echo "$LIPO" >&6; }
2abefe3d 11513else
5213506e
RW
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
2abefe3d 11516fi
1c710c3c 11517
5213506e 11518
2abefe3d
PB
11519 fi
11520 test -n "$ac_cv_prog_LIPO" && break
11521done
11522
11523if test -z "$ac_cv_prog_LIPO" ; then
11524 set dummy lipo
11525 if test $build = $host ; then
11526 LIPO="$2"
11527 else
11528 LIPO="${ncn_tool_prefix}$2"
11529 fi
11530fi
11531
278a7a38
AO
11532
11533
11534if test -n "$NM"; then
11535 ac_cv_prog_NM=$NM
11536elif test -n "$ac_cv_prog_NM"; then
11537 NM=$ac_cv_prog_NM
11538fi
11539
11540if test -n "$ac_cv_prog_NM"; then
11541 for ncn_progname in nm; do
11542 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11543set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11545$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11546if ${ac_cv_prog_NM+:} false; then :
5213506e 11547 $as_echo_n "(cached) " >&6
ca9f4b81
AO
11548else
11549 if test -n "$NM"; then
11550 ac_cv_prog_NM="$NM" # Let the user override the test.
11551else
1c710c3c
DJ
11552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11553for as_dir in $PATH
11554do
11555 IFS=$as_save_IFS
11556 test -z "$as_dir" && as_dir=.
5213506e 11557 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11559 ac_cv_prog_NM="${ncn_progname}"
5213506e 11560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11561 break 2
11562 fi
11563done
5213506e
RW
11564 done
11565IFS=$as_save_IFS
1c710c3c 11566
ca9f4b81
AO
11567fi
11568fi
1c710c3c 11569NM=$ac_cv_prog_NM
ca9f4b81 11570if test -n "$NM"; then
5213506e
RW
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
11572$as_echo "$NM" >&6; }
ca9f4b81 11573else
5213506e
RW
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
ca9f4b81
AO
11576fi
11577
5213506e 11578
278a7a38
AO
11579 done
11580fi
11581
11582for ncn_progname in nm; do
11583 if test -n "$ncn_tool_prefix"; then
11584 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11585set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11587$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11588if ${ac_cv_prog_NM+:} false; then :
5213506e 11589 $as_echo_n "(cached) " >&6
ca9f4b81 11590else
2693c0b0
PB
11591 if test -n "$NM"; then
11592 ac_cv_prog_NM="$NM" # Let the user override the test.
ca9f4b81 11593else
1c710c3c
DJ
11594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11595for as_dir in $PATH
11596do
11597 IFS=$as_save_IFS
11598 test -z "$as_dir" && as_dir=.
5213506e 11599 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11601 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
5213506e 11602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11603 break 2
11604 fi
11605done
5213506e
RW
11606 done
11607IFS=$as_save_IFS
1c710c3c 11608
ca9f4b81
AO
11609fi
11610fi
1c710c3c 11611NM=$ac_cv_prog_NM
2693c0b0 11612if test -n "$NM"; then
5213506e
RW
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
11614$as_echo "$NM" >&6; }
ca9f4b81 11615else
5213506e
RW
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
ca9f4b81 11618fi
1c710c3c 11619
5213506e 11620
2693c0b0 11621 fi
278a7a38
AO
11622 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
11623 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11624set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11627if ${ac_cv_prog_NM+:} false; then :
5213506e 11628 $as_echo_n "(cached) " >&6
278a7a38
AO
11629else
11630 if test -n "$NM"; then
11631 ac_cv_prog_NM="$NM" # Let the user override the test.
11632else
11633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636 IFS=$as_save_IFS
11637 test -z "$as_dir" && as_dir=.
5213506e 11638 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11640 ac_cv_prog_NM="${ncn_progname}"
5213506e 11641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11642 break 2
11643 fi
11644done
5213506e
RW
11645 done
11646IFS=$as_save_IFS
278a7a38
AO
11647
11648fi
11649fi
11650NM=$ac_cv_prog_NM
11651if test -n "$NM"; then
5213506e
RW
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
11653$as_echo "$NM" >&6; }
278a7a38 11654else
5213506e
RW
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11656$as_echo "no" >&6; }
278a7a38
AO
11657fi
11658
5213506e 11659
278a7a38
AO
11660 fi
11661 test -n "$ac_cv_prog_NM" && break
11662done
11663
11664if test -z "$ac_cv_prog_NM" ; then
11665 set dummy nm
11666 if test $build = $host ; then
11667 NM="$2"
11668 else
11669 NM="${ncn_tool_prefix}$2"
11670 fi
11671fi
11672
11673
11674
11675if test -n "$RANLIB"; then
11676 ac_cv_prog_RANLIB=$RANLIB
11677elif test -n "$ac_cv_prog_RANLIB"; then
11678 RANLIB=$ac_cv_prog_RANLIB
11679fi
11680
11681if test -n "$ac_cv_prog_RANLIB"; then
11682 for ncn_progname in ranlib; do
11683 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11684set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11686$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11687if ${ac_cv_prog_RANLIB+:} false; then :
5213506e 11688 $as_echo_n "(cached) " >&6
278a7a38
AO
11689else
11690 if test -n "$RANLIB"; then
11691 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
11692else
11693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696 IFS=$as_save_IFS
11697 test -z "$as_dir" && as_dir=.
5213506e 11698 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11700 ac_cv_prog_RANLIB="${ncn_progname}"
5213506e 11701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11702 break 2
11703 fi
11704done
5213506e
RW
11705 done
11706IFS=$as_save_IFS
278a7a38
AO
11707
11708fi
11709fi
11710RANLIB=$ac_cv_prog_RANLIB
11711if test -n "$RANLIB"; then
5213506e
RW
11712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
11713$as_echo "$RANLIB" >&6; }
278a7a38 11714else
5213506e
RW
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716$as_echo "no" >&6; }
278a7a38
AO
11717fi
11718
5213506e 11719
278a7a38
AO
11720 done
11721fi
ca9f4b81 11722
278a7a38 11723for ncn_progname in ranlib; do
2693c0b0
PB
11724 if test -n "$ncn_tool_prefix"; then
11725 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11726set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11728$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11729if ${ac_cv_prog_RANLIB+:} false; then :
5213506e 11730 $as_echo_n "(cached) " >&6
ca9f4b81
AO
11731else
11732 if test -n "$RANLIB"; then
11733 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
11734else
1c710c3c
DJ
11735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11736for as_dir in $PATH
11737do
11738 IFS=$as_save_IFS
11739 test -z "$as_dir" && as_dir=.
5213506e 11740 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11742 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
5213506e 11743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11744 break 2
11745 fi
11746done
5213506e
RW
11747 done
11748IFS=$as_save_IFS
1c710c3c 11749
ca9f4b81
AO
11750fi
11751fi
1c710c3c 11752RANLIB=$ac_cv_prog_RANLIB
ca9f4b81 11753if test -n "$RANLIB"; then
5213506e
RW
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
11755$as_echo "$RANLIB" >&6; }
ca9f4b81 11756else
5213506e
RW
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758$as_echo "no" >&6; }
ca9f4b81
AO
11759fi
11760
5213506e 11761
2693c0b0
PB
11762 fi
11763 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
11764 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11765set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11767$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11768if ${ac_cv_prog_RANLIB+:} false; then :
5213506e 11769 $as_echo_n "(cached) " >&6
ca9f4b81 11770else
2693c0b0
PB
11771 if test -n "$RANLIB"; then
11772 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
ca9f4b81 11773else
1c710c3c
DJ
11774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11775for as_dir in $PATH
11776do
11777 IFS=$as_save_IFS
11778 test -z "$as_dir" && as_dir=.
5213506e 11779 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11781 ac_cv_prog_RANLIB="${ncn_progname}"
5213506e 11782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11783 break 2
11784 fi
11785done
5213506e
RW
11786 done
11787IFS=$as_save_IFS
1c710c3c 11788
ca9f4b81
AO
11789fi
11790fi
1c710c3c 11791RANLIB=$ac_cv_prog_RANLIB
2693c0b0 11792if test -n "$RANLIB"; then
5213506e
RW
11793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
11794$as_echo "$RANLIB" >&6; }
ca9f4b81 11795else
5213506e
RW
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
ca9f4b81 11798fi
1c710c3c 11799
5213506e 11800
ca9f4b81 11801 fi
2693c0b0
PB
11802 test -n "$ac_cv_prog_RANLIB" && break
11803done
11804
11805if test -z "$ac_cv_prog_RANLIB" ; then
8927b7c0 11806 RANLIB="true"
ca9f4b81
AO
11807fi
11808
278a7a38
AO
11809
11810
11811if test -n "$STRIP"; then
11812 ac_cv_prog_STRIP=$STRIP
11813elif test -n "$ac_cv_prog_STRIP"; then
11814 STRIP=$ac_cv_prog_STRIP
11815fi
11816
11817if test -n "$ac_cv_prog_STRIP"; then
11818 for ncn_progname in strip; do
11819 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11820set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11823if ${ac_cv_prog_STRIP+:} false; then :
5213506e 11824 $as_echo_n "(cached) " >&6
278a7a38
AO
11825else
11826 if test -n "$STRIP"; then
11827 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11828else
11829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832 IFS=$as_save_IFS
11833 test -z "$as_dir" && as_dir=.
5213506e 11834 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11836 ac_cv_prog_STRIP="${ncn_progname}"
5213506e 11837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11838 break 2
11839 fi
11840done
5213506e
RW
11841 done
11842IFS=$as_save_IFS
278a7a38
AO
11843
11844fi
11845fi
11846STRIP=$ac_cv_prog_STRIP
11847if test -n "$STRIP"; then
5213506e
RW
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
11849$as_echo "$STRIP" >&6; }
278a7a38 11850else
5213506e
RW
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
278a7a38
AO
11853fi
11854
5213506e 11855
278a7a38
AO
11856 done
11857fi
11858
11859for ncn_progname in strip; do
2abefe3d
PB
11860 if test -n "$ncn_tool_prefix"; then
11861 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11862set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11864$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11865if ${ac_cv_prog_STRIP+:} false; then :
5213506e 11866 $as_echo_n "(cached) " >&6
2abefe3d
PB
11867else
11868 if test -n "$STRIP"; then
11869 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11870else
1c710c3c
DJ
11871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874 IFS=$as_save_IFS
11875 test -z "$as_dir" && as_dir=.
5213506e 11876 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11878 ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
5213506e 11879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11880 break 2
11881 fi
11882done
5213506e
RW
11883 done
11884IFS=$as_save_IFS
1c710c3c 11885
2abefe3d
PB
11886fi
11887fi
1c710c3c 11888STRIP=$ac_cv_prog_STRIP
2abefe3d 11889if test -n "$STRIP"; then
5213506e
RW
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
11891$as_echo "$STRIP" >&6; }
2abefe3d 11892else
5213506e
RW
11893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11894$as_echo "no" >&6; }
2abefe3d
PB
11895fi
11896
5213506e 11897
2abefe3d
PB
11898 fi
11899 if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
11900 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11901set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11903$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11904if ${ac_cv_prog_STRIP+:} false; then :
5213506e 11905 $as_echo_n "(cached) " >&6
2abefe3d
PB
11906else
11907 if test -n "$STRIP"; then
11908 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11909else
1c710c3c
DJ
11910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911for as_dir in $PATH
11912do
11913 IFS=$as_save_IFS
11914 test -z "$as_dir" && as_dir=.
5213506e 11915 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 11917 ac_cv_prog_STRIP="${ncn_progname}"
5213506e 11918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
11919 break 2
11920 fi
11921done
5213506e
RW
11922 done
11923IFS=$as_save_IFS
1c710c3c 11924
2abefe3d
PB
11925fi
11926fi
1c710c3c 11927STRIP=$ac_cv_prog_STRIP
2abefe3d 11928if test -n "$STRIP"; then
5213506e
RW
11929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
11930$as_echo "$STRIP" >&6; }
2abefe3d 11931else
5213506e
RW
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
2abefe3d 11934fi
1c710c3c 11935
5213506e 11936
2abefe3d
PB
11937 fi
11938 test -n "$ac_cv_prog_STRIP" && break
11939done
11940
11941if test -z "$ac_cv_prog_STRIP" ; then
8927b7c0 11942 STRIP="true"
2abefe3d
PB
11943fi
11944
278a7a38
AO
11945
11946
11947if test -n "$WINDRES"; then
11948 ac_cv_prog_WINDRES=$WINDRES
11949elif test -n "$ac_cv_prog_WINDRES"; then
11950 WINDRES=$ac_cv_prog_WINDRES
11951fi
11952
11953if test -n "$ac_cv_prog_WINDRES"; then
11954 for ncn_progname in windres; do
11955 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
11956set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11958$as_echo_n "checking for $ac_word... " >&6; }
22e05272 11959if ${ac_cv_prog_WINDRES+:} false; then :
5213506e 11960 $as_echo_n "(cached) " >&6
278a7a38
AO
11961else
11962 if test -n "$WINDRES"; then
11963 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
11964else
11965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11966for as_dir in $PATH
11967do
11968 IFS=$as_save_IFS
11969 test -z "$as_dir" && as_dir=.
5213506e 11970 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 11971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 11972 ac_cv_prog_WINDRES="${ncn_progname}"
5213506e 11973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
11974 break 2
11975 fi
11976done
5213506e
RW
11977 done
11978IFS=$as_save_IFS
278a7a38
AO
11979
11980fi
11981fi
11982WINDRES=$ac_cv_prog_WINDRES
11983if test -n "$WINDRES"; then
5213506e
RW
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
11985$as_echo "$WINDRES" >&6; }
278a7a38 11986else
5213506e
RW
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
278a7a38
AO
11989fi
11990
5213506e 11991
278a7a38
AO
11992 done
11993fi
11994
11995for ncn_progname in windres; do
2693c0b0
PB
11996 if test -n "$ncn_tool_prefix"; then
11997 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
11998set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12000$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12001if ${ac_cv_prog_WINDRES+:} false; then :
5213506e 12002 $as_echo_n "(cached) " >&6
ca9f4b81
AO
12003else
12004 if test -n "$WINDRES"; then
12005 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
12006else
1c710c3c
DJ
12007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12008for as_dir in $PATH
12009do
12010 IFS=$as_save_IFS
12011 test -z "$as_dir" && as_dir=.
5213506e 12012 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12014 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
5213506e 12015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12016 break 2
12017 fi
12018done
5213506e
RW
12019 done
12020IFS=$as_save_IFS
1c710c3c 12021
ca9f4b81
AO
12022fi
12023fi
1c710c3c 12024WINDRES=$ac_cv_prog_WINDRES
ca9f4b81 12025if test -n "$WINDRES"; then
5213506e
RW
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
12027$as_echo "$WINDRES" >&6; }
ca9f4b81 12028else
5213506e
RW
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12030$as_echo "no" >&6; }
ca9f4b81
AO
12031fi
12032
5213506e 12033
2693c0b0
PB
12034 fi
12035 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
12036 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12037set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12039$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12040if ${ac_cv_prog_WINDRES+:} false; then :
5213506e 12041 $as_echo_n "(cached) " >&6
ca9f4b81 12042else
2693c0b0
PB
12043 if test -n "$WINDRES"; then
12044 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
ca9f4b81 12045else
1c710c3c
DJ
12046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12047for as_dir in $PATH
12048do
12049 IFS=$as_save_IFS
12050 test -z "$as_dir" && as_dir=.
5213506e 12051 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12053 ac_cv_prog_WINDRES="${ncn_progname}"
5213506e 12054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12055 break 2
12056 fi
12057done
5213506e
RW
12058 done
12059IFS=$as_save_IFS
1c710c3c 12060
ca9f4b81
AO
12061fi
12062fi
1c710c3c 12063WINDRES=$ac_cv_prog_WINDRES
2693c0b0 12064if test -n "$WINDRES"; then
5213506e
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
12066$as_echo "$WINDRES" >&6; }
ca9f4b81 12067else
5213506e
RW
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12069$as_echo "no" >&6; }
ca9f4b81 12070fi
1c710c3c 12071
5213506e 12072
2693c0b0
PB
12073 fi
12074 test -n "$ac_cv_prog_WINDRES" && break
12075done
12076
12077if test -z "$ac_cv_prog_WINDRES" ; then
12078 set dummy windres
12079 if test $build = $host ; then
12080 WINDRES="$2"
ca9f4b81 12081 else
2693c0b0 12082 WINDRES="${ncn_tool_prefix}$2"
ca9f4b81 12083 fi
ca9f4b81
AO
12084fi
12085
278a7a38
AO
12086
12087
901119ae
KT
12088if test -n "$WINDMC"; then
12089 ac_cv_prog_WINDMC=$WINDMC
12090elif test -n "$ac_cv_prog_WINDMC"; then
12091 WINDMC=$ac_cv_prog_WINDMC
12092fi
12093
12094if test -n "$ac_cv_prog_WINDMC"; then
12095 for ncn_progname in windmc; do
12096 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12097set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12099$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12100if ${ac_cv_prog_WINDMC+:} false; then :
5213506e 12101 $as_echo_n "(cached) " >&6
901119ae
KT
12102else
12103 if test -n "$WINDMC"; then
12104 ac_cv_prog_WINDMC="$WINDMC" # Let the user override the test.
12105else
12106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107for as_dir in $PATH
12108do
12109 IFS=$as_save_IFS
12110 test -z "$as_dir" && as_dir=.
5213506e 12111 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 12113 ac_cv_prog_WINDMC="${ncn_progname}"
5213506e 12114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
12115 break 2
12116 fi
12117done
5213506e
RW
12118 done
12119IFS=$as_save_IFS
901119ae
KT
12120
12121fi
12122fi
12123WINDMC=$ac_cv_prog_WINDMC
12124if test -n "$WINDMC"; then
5213506e
RW
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC" >&5
12126$as_echo "$WINDMC" >&6; }
901119ae 12127else
5213506e
RW
12128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12129$as_echo "no" >&6; }
901119ae
KT
12130fi
12131
5213506e 12132
901119ae
KT
12133 done
12134fi
12135
12136for ncn_progname in windmc; do
12137 if test -n "$ncn_tool_prefix"; then
12138 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
12139set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12141$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12142if ${ac_cv_prog_WINDMC+:} false; then :
5213506e 12143 $as_echo_n "(cached) " >&6
901119ae
KT
12144else
12145 if test -n "$WINDMC"; then
12146 ac_cv_prog_WINDMC="$WINDMC" # Let the user override the test.
12147else
12148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12149for as_dir in $PATH
12150do
12151 IFS=$as_save_IFS
12152 test -z "$as_dir" && as_dir=.
5213506e 12153 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 12155 ac_cv_prog_WINDMC="${ncn_tool_prefix}${ncn_progname}"
5213506e 12156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
12157 break 2
12158 fi
12159done
5213506e
RW
12160 done
12161IFS=$as_save_IFS
901119ae
KT
12162
12163fi
12164fi
12165WINDMC=$ac_cv_prog_WINDMC
12166if test -n "$WINDMC"; then
5213506e
RW
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC" >&5
12168$as_echo "$WINDMC" >&6; }
901119ae 12169else
5213506e
RW
12170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12171$as_echo "no" >&6; }
901119ae
KT
12172fi
12173
5213506e 12174
901119ae
KT
12175 fi
12176 if test -z "$ac_cv_prog_WINDMC" && test $build = $host ; then
12177 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12178set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12181if ${ac_cv_prog_WINDMC+:} false; then :
5213506e 12182 $as_echo_n "(cached) " >&6
901119ae
KT
12183else
12184 if test -n "$WINDMC"; then
12185 ac_cv_prog_WINDMC="$WINDMC" # Let the user override the test.
12186else
12187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188for as_dir in $PATH
12189do
12190 IFS=$as_save_IFS
12191 test -z "$as_dir" && as_dir=.
5213506e 12192 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 12194 ac_cv_prog_WINDMC="${ncn_progname}"
5213506e 12195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
12196 break 2
12197 fi
12198done
5213506e
RW
12199 done
12200IFS=$as_save_IFS
901119ae
KT
12201
12202fi
12203fi
12204WINDMC=$ac_cv_prog_WINDMC
12205if test -n "$WINDMC"; then
5213506e
RW
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC" >&5
12207$as_echo "$WINDMC" >&6; }
901119ae 12208else
5213506e
RW
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12210$as_echo "no" >&6; }
901119ae
KT
12211fi
12212
5213506e 12213
901119ae
KT
12214 fi
12215 test -n "$ac_cv_prog_WINDMC" && break
12216done
12217
12218if test -z "$ac_cv_prog_WINDMC" ; then
12219 set dummy windmc
12220 if test $build = $host ; then
12221 WINDMC="$2"
12222 else
12223 WINDMC="${ncn_tool_prefix}$2"
12224 fi
12225fi
12226
12227
12228
278a7a38
AO
12229if test -n "$OBJCOPY"; then
12230 ac_cv_prog_OBJCOPY=$OBJCOPY
12231elif test -n "$ac_cv_prog_OBJCOPY"; then
12232 OBJCOPY=$ac_cv_prog_OBJCOPY
12233fi
12234
12235if test -n "$ac_cv_prog_OBJCOPY"; then
12236 for ncn_progname in objcopy; do
12237 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12238set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12240$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12241if ${ac_cv_prog_OBJCOPY+:} false; then :
5213506e 12242 $as_echo_n "(cached) " >&6
278a7a38
AO
12243else
12244 if test -n "$OBJCOPY"; then
12245 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
12246else
12247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250 IFS=$as_save_IFS
12251 test -z "$as_dir" && as_dir=.
5213506e 12252 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12253 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 12254 ac_cv_prog_OBJCOPY="${ncn_progname}"
5213506e 12255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
12256 break 2
12257 fi
12258done
5213506e
RW
12259 done
12260IFS=$as_save_IFS
278a7a38
AO
12261
12262fi
12263fi
12264OBJCOPY=$ac_cv_prog_OBJCOPY
12265if test -n "$OBJCOPY"; then
5213506e
RW
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
12267$as_echo "$OBJCOPY" >&6; }
278a7a38 12268else
5213506e
RW
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12270$as_echo "no" >&6; }
278a7a38
AO
12271fi
12272
5213506e 12273
278a7a38
AO
12274 done
12275fi
12276
12277for ncn_progname in objcopy; do
2693c0b0
PB
12278 if test -n "$ncn_tool_prefix"; then
12279 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
12280set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
12281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12282$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12283if ${ac_cv_prog_OBJCOPY+:} false; then :
5213506e 12284 $as_echo_n "(cached) " >&6
ca9f4b81
AO
12285else
12286 if test -n "$OBJCOPY"; then
12287 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
12288else
1c710c3c
DJ
12289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12290for as_dir in $PATH
12291do
12292 IFS=$as_save_IFS
12293 test -z "$as_dir" && as_dir=.
5213506e 12294 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12295 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12296 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
5213506e 12297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12298 break 2
12299 fi
12300done
5213506e
RW
12301 done
12302IFS=$as_save_IFS
1c710c3c 12303
ca9f4b81
AO
12304fi
12305fi
1c710c3c 12306OBJCOPY=$ac_cv_prog_OBJCOPY
ca9f4b81 12307if test -n "$OBJCOPY"; then
5213506e
RW
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
12309$as_echo "$OBJCOPY" >&6; }
ca9f4b81 12310else
5213506e
RW
12311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12312$as_echo "no" >&6; }
ca9f4b81
AO
12313fi
12314
5213506e 12315
2693c0b0
PB
12316 fi
12317 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
12318 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12319set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12321$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12322if ${ac_cv_prog_OBJCOPY+:} false; then :
5213506e 12323 $as_echo_n "(cached) " >&6
ca9f4b81 12324else
2693c0b0
PB
12325 if test -n "$OBJCOPY"; then
12326 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
ca9f4b81 12327else
1c710c3c
DJ
12328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12329for as_dir in $PATH
12330do
12331 IFS=$as_save_IFS
12332 test -z "$as_dir" && as_dir=.
5213506e 12333 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12335 ac_cv_prog_OBJCOPY="${ncn_progname}"
5213506e 12336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12337 break 2
12338 fi
12339done
5213506e
RW
12340 done
12341IFS=$as_save_IFS
1c710c3c 12342
ca9f4b81
AO
12343fi
12344fi
1c710c3c 12345OBJCOPY=$ac_cv_prog_OBJCOPY
2693c0b0 12346if test -n "$OBJCOPY"; then
5213506e
RW
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
12348$as_echo "$OBJCOPY" >&6; }
ca9f4b81 12349else
5213506e
RW
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
ca9f4b81 12352fi
1c710c3c 12353
5213506e 12354
2693c0b0
PB
12355 fi
12356 test -n "$ac_cv_prog_OBJCOPY" && break
12357done
12358
12359if test -z "$ac_cv_prog_OBJCOPY" ; then
12360 set dummy objcopy
12361 if test $build = $host ; then
12362 OBJCOPY="$2"
ca9f4b81 12363 else
2693c0b0 12364 OBJCOPY="${ncn_tool_prefix}$2"
ca9f4b81 12365 fi
ca9f4b81
AO
12366fi
12367
278a7a38
AO
12368
12369
12370if test -n "$OBJDUMP"; then
12371 ac_cv_prog_OBJDUMP=$OBJDUMP
12372elif test -n "$ac_cv_prog_OBJDUMP"; then
12373 OBJDUMP=$ac_cv_prog_OBJDUMP
12374fi
12375
12376if test -n "$ac_cv_prog_OBJDUMP"; then
12377 for ncn_progname in objdump; do
12378 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12379set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12381$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12382if ${ac_cv_prog_OBJDUMP+:} false; then :
5213506e 12383 $as_echo_n "(cached) " >&6
278a7a38
AO
12384else
12385 if test -n "$OBJDUMP"; then
12386 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
12387else
12388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12389for as_dir in $PATH
12390do
12391 IFS=$as_save_IFS
12392 test -z "$as_dir" && as_dir=.
5213506e 12393 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12394 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 12395 ac_cv_prog_OBJDUMP="${ncn_progname}"
5213506e 12396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
12397 break 2
12398 fi
12399done
5213506e
RW
12400 done
12401IFS=$as_save_IFS
278a7a38
AO
12402
12403fi
12404fi
12405OBJDUMP=$ac_cv_prog_OBJDUMP
12406if test -n "$OBJDUMP"; then
5213506e
RW
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12408$as_echo "$OBJDUMP" >&6; }
278a7a38 12409else
5213506e
RW
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
278a7a38
AO
12412fi
12413
5213506e 12414
278a7a38
AO
12415 done
12416fi
12417
12418for ncn_progname in objdump; do
2693c0b0
PB
12419 if test -n "$ncn_tool_prefix"; then
12420 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
12421set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12423$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12424if ${ac_cv_prog_OBJDUMP+:} false; then :
5213506e 12425 $as_echo_n "(cached) " >&6
ca9f4b81
AO
12426else
12427 if test -n "$OBJDUMP"; then
12428 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
12429else
1c710c3c
DJ
12430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433 IFS=$as_save_IFS
12434 test -z "$as_dir" && as_dir=.
5213506e 12435 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12436 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12437 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
5213506e 12438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12439 break 2
12440 fi
12441done
5213506e
RW
12442 done
12443IFS=$as_save_IFS
1c710c3c 12444
ca9f4b81
AO
12445fi
12446fi
1c710c3c 12447OBJDUMP=$ac_cv_prog_OBJDUMP
ca9f4b81 12448if test -n "$OBJDUMP"; then
5213506e
RW
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12450$as_echo "$OBJDUMP" >&6; }
ca9f4b81 12451else
5213506e
RW
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12453$as_echo "no" >&6; }
ca9f4b81
AO
12454fi
12455
5213506e 12456
2693c0b0
PB
12457 fi
12458 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
12459 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12460set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12462$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12463if ${ac_cv_prog_OBJDUMP+:} false; then :
5213506e 12464 $as_echo_n "(cached) " >&6
ca9f4b81 12465else
2693c0b0
PB
12466 if test -n "$OBJDUMP"; then
12467 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
ca9f4b81 12468else
1c710c3c
DJ
12469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12470for as_dir in $PATH
12471do
12472 IFS=$as_save_IFS
12473 test -z "$as_dir" && as_dir=.
5213506e 12474 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12475 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12476 ac_cv_prog_OBJDUMP="${ncn_progname}"
5213506e 12477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12478 break 2
12479 fi
12480done
5213506e
RW
12481 done
12482IFS=$as_save_IFS
1c710c3c 12483
ca9f4b81
AO
12484fi
12485fi
1c710c3c 12486OBJDUMP=$ac_cv_prog_OBJDUMP
2693c0b0 12487if test -n "$OBJDUMP"; then
5213506e
RW
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12489$as_echo "$OBJDUMP" >&6; }
ca9f4b81 12490else
5213506e
RW
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12492$as_echo "no" >&6; }
ca9f4b81 12493fi
1c710c3c 12494
5213506e 12495
2693c0b0
PB
12496 fi
12497 test -n "$ac_cv_prog_OBJDUMP" && break
12498done
12499
12500if test -z "$ac_cv_prog_OBJDUMP" ; then
12501 set dummy objdump
12502 if test $build = $host ; then
12503 OBJDUMP="$2"
ca9f4b81 12504 else
2693c0b0 12505 OBJDUMP="${ncn_tool_prefix}$2"
ca9f4b81 12506 fi
ca9f4b81
AO
12507fi
12508
671aa708
NN
12509
12510
e4a9a572
IS
12511if test -n "$OTOOL"; then
12512 ac_cv_prog_OTOOL=$OTOOL
12513elif test -n "$ac_cv_prog_OTOOL"; then
12514 OTOOL=$ac_cv_prog_OTOOL
12515fi
12516
12517if test -n "$ac_cv_prog_OTOOL"; then
12518 for ncn_progname in otool; do
12519 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12520set dummy ${ncn_progname}; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_prog_OTOOL+:} false; then :
12524 $as_echo_n "(cached) " >&6
12525else
12526 if test -n "$OTOOL"; then
12527 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
12528else
12529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12530for as_dir in $PATH
12531do
12532 IFS=$as_save_IFS
12533 test -z "$as_dir" && as_dir=.
12534 for ac_exec_ext in '' $ac_executable_extensions; do
12535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12536 ac_cv_prog_OTOOL="${ncn_progname}"
12537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12538 break 2
12539 fi
12540done
12541 done
12542IFS=$as_save_IFS
12543
12544fi
12545fi
12546OTOOL=$ac_cv_prog_OTOOL
12547if test -n "$OTOOL"; then
12548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
12549$as_echo "$OTOOL" >&6; }
12550else
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12552$as_echo "no" >&6; }
12553fi
12554
12555
12556 done
12557fi
12558
12559for ncn_progname in otool; do
12560 if test -n "$ncn_tool_prefix"; then
12561 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
12562set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
12563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12564$as_echo_n "checking for $ac_word... " >&6; }
12565if ${ac_cv_prog_OTOOL+:} false; then :
12566 $as_echo_n "(cached) " >&6
12567else
12568 if test -n "$OTOOL"; then
12569 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
12570else
12571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12572for as_dir in $PATH
12573do
12574 IFS=$as_save_IFS
12575 test -z "$as_dir" && as_dir=.
12576 for ac_exec_ext in '' $ac_executable_extensions; do
12577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12578 ac_cv_prog_OTOOL="${ncn_tool_prefix}${ncn_progname}"
12579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12580 break 2
12581 fi
12582done
12583 done
12584IFS=$as_save_IFS
12585
12586fi
12587fi
12588OTOOL=$ac_cv_prog_OTOOL
12589if test -n "$OTOOL"; then
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
12591$as_echo "$OTOOL" >&6; }
12592else
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12594$as_echo "no" >&6; }
12595fi
12596
12597
12598 fi
12599 if test -z "$ac_cv_prog_OTOOL" && test $build = $host ; then
12600 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12601set dummy ${ncn_progname}; ac_word=$2
12602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12603$as_echo_n "checking for $ac_word... " >&6; }
12604if ${ac_cv_prog_OTOOL+:} false; then :
12605 $as_echo_n "(cached) " >&6
12606else
12607 if test -n "$OTOOL"; then
12608 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
12609else
12610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12611for as_dir in $PATH
12612do
12613 IFS=$as_save_IFS
12614 test -z "$as_dir" && as_dir=.
12615 for ac_exec_ext in '' $ac_executable_extensions; do
12616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12617 ac_cv_prog_OTOOL="${ncn_progname}"
12618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12619 break 2
12620 fi
12621done
12622 done
12623IFS=$as_save_IFS
12624
12625fi
12626fi
12627OTOOL=$ac_cv_prog_OTOOL
12628if test -n "$OTOOL"; then
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
12630$as_echo "$OTOOL" >&6; }
12631else
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12633$as_echo "no" >&6; }
12634fi
12635
12636
12637 fi
12638 test -n "$ac_cv_prog_OTOOL" && break
12639done
12640
12641if test -z "$ac_cv_prog_OTOOL" ; then
12642 set dummy otool
12643 if test $build = $host ; then
12644 OTOOL="$2"
12645 else
12646 OTOOL="${ncn_tool_prefix}$2"
12647 fi
12648fi
12649
12650
12651
e7a82751
RM
12652if test -n "$READELF"; then
12653 ac_cv_prog_READELF=$READELF
12654elif test -n "$ac_cv_prog_READELF"; then
12655 READELF=$ac_cv_prog_READELF
12656fi
12657
12658if test -n "$ac_cv_prog_READELF"; then
12659 for ncn_progname in readelf; do
12660 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12661set dummy ${ncn_progname}; ac_word=$2
12662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12663$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12664if ${ac_cv_prog_READELF+:} false; then :
e7a82751
RM
12665 $as_echo_n "(cached) " >&6
12666else
12667 if test -n "$READELF"; then
12668 ac_cv_prog_READELF="$READELF" # Let the user override the test.
12669else
12670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12671for as_dir in $PATH
12672do
12673 IFS=$as_save_IFS
12674 test -z "$as_dir" && as_dir=.
12675 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
12677 ac_cv_prog_READELF="${ncn_progname}"
12678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12679 break 2
12680 fi
12681done
12682 done
12683IFS=$as_save_IFS
12684
12685fi
12686fi
12687READELF=$ac_cv_prog_READELF
12688if test -n "$READELF"; then
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
12690$as_echo "$READELF" >&6; }
12691else
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12693$as_echo "no" >&6; }
12694fi
12695
12696
12697 done
12698fi
12699
12700for ncn_progname in readelf; do
12701 if test -n "$ncn_tool_prefix"; then
12702 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
12703set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
12704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12705$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12706if ${ac_cv_prog_READELF+:} false; then :
e7a82751
RM
12707 $as_echo_n "(cached) " >&6
12708else
12709 if test -n "$READELF"; then
12710 ac_cv_prog_READELF="$READELF" # Let the user override the test.
12711else
12712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12713for as_dir in $PATH
12714do
12715 IFS=$as_save_IFS
12716 test -z "$as_dir" && as_dir=.
12717 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
12719 ac_cv_prog_READELF="${ncn_tool_prefix}${ncn_progname}"
12720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12721 break 2
12722 fi
12723done
12724 done
12725IFS=$as_save_IFS
12726
12727fi
12728fi
12729READELF=$ac_cv_prog_READELF
12730if test -n "$READELF"; then
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
12732$as_echo "$READELF" >&6; }
12733else
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735$as_echo "no" >&6; }
12736fi
12737
12738
12739 fi
12740 if test -z "$ac_cv_prog_READELF" && test $build = $host ; then
12741 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12742set dummy ${ncn_progname}; ac_word=$2
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12744$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12745if ${ac_cv_prog_READELF+:} false; then :
e7a82751
RM
12746 $as_echo_n "(cached) " >&6
12747else
12748 if test -n "$READELF"; then
12749 ac_cv_prog_READELF="$READELF" # Let the user override the test.
12750else
12751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12752for as_dir in $PATH
12753do
12754 IFS=$as_save_IFS
12755 test -z "$as_dir" && as_dir=.
12756 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
12758 ac_cv_prog_READELF="${ncn_progname}"
12759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12760 break 2
12761 fi
12762done
12763 done
12764IFS=$as_save_IFS
12765
12766fi
12767fi
12768READELF=$ac_cv_prog_READELF
12769if test -n "$READELF"; then
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
12771$as_echo "$READELF" >&6; }
12772else
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12774$as_echo "no" >&6; }
12775fi
12776
12777
12778 fi
12779 test -n "$ac_cv_prog_READELF" && break
12780done
12781
12782if test -z "$ac_cv_prog_READELF" ; then
12783 set dummy readelf
12784 if test $build = $host ; then
12785 READELF="$2"
12786 else
12787 READELF="${ncn_tool_prefix}$2"
12788 fi
12789fi
12790
12791
12792
671aa708
NN
12793
12794
12795
5fee5ec3
IB
12796
12797
2abefe3d 12798# Target tools.
1c710c3c 12799
5213506e
RW
12800# Check whether --with-build-time-tools was given.
12801if test "${with_build_time_tools+set}" = set; then :
12802 withval=$with_build_time_tools; case x"$withval" in
e8b05380
PB
12803 x/*) ;;
12804 *)
12805 with_build_time_tools=
5213506e
RW
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: argument to --with-build-time-tools must be an absolute path" >&5
12807$as_echo "$as_me: WARNING: argument to --with-build-time-tools must be an absolute path" >&2;}
e8b05380
PB
12808 ;;
12809 esac
ca9f4b81 12810else
e8b05380 12811 with_build_time_tools=
5213506e
RW
12812fi
12813
ca9f4b81 12814
278a7a38
AO
12815
12816
12817if test -n "$CC_FOR_TARGET"; then
12818 ac_cv_prog_CC_FOR_TARGET=$CC_FOR_TARGET
12819elif test -n "$ac_cv_prog_CC_FOR_TARGET"; then
12820 CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
12821fi
12822
12823if test -n "$ac_cv_prog_CC_FOR_TARGET"; then
12824 for ncn_progname in cc gcc; do
12825 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12826set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12829if ${ac_cv_prog_CC_FOR_TARGET+:} false; then :
5213506e 12830 $as_echo_n "(cached) " >&6
278a7a38
AO
12831else
12832 if test -n "$CC_FOR_TARGET"; then
12833 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
12834else
12835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12836for as_dir in $PATH
12837do
12838 IFS=$as_save_IFS
12839 test -z "$as_dir" && as_dir=.
5213506e 12840 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 12842 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
5213506e 12843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
12844 break 2
12845 fi
12846done
5213506e
RW
12847 done
12848IFS=$as_save_IFS
278a7a38
AO
12849
12850fi
12851fi
12852CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
12853if test -n "$CC_FOR_TARGET"; then
5213506e
RW
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_TARGET" >&5
12855$as_echo "$CC_FOR_TARGET" >&6; }
278a7a38 12856else
5213506e
RW
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12858$as_echo "no" >&6; }
278a7a38
AO
12859fi
12860
5213506e 12861
278a7a38
AO
12862 done
12863fi
12864
12865if test -z "$ac_cv_prog_CC_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 12866 for ncn_progname in cc gcc; do
5213506e
RW
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
12868$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
12869 if test -x $with_build_time_tools/${ncn_progname}; then
12870 ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12872$as_echo "yes" >&6; }
72a7ab82 12873 break
e8b05380 12874 else
5213506e
RW
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12876$as_echo "no" >&6; }
72a7ab82
AP
12877 fi
12878 done
4de997d1
PB
12879fi
12880
e8b05380
PB
12881if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
12882 for ncn_progname in cc gcc; do
12883 if test -n "$ncn_target_tool_prefix"; then
12884 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 12885set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
12886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12887$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12888if ${ac_cv_prog_CC_FOR_TARGET+:} false; then :
5213506e 12889 $as_echo_n "(cached) " >&6
4de997d1
PB
12890else
12891 if test -n "$CC_FOR_TARGET"; then
12892 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
12893else
1c710c3c
DJ
12894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12895for as_dir in $PATH
12896do
12897 IFS=$as_save_IFS
12898 test -z "$as_dir" && as_dir=.
5213506e 12899 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12901 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 12902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12903 break 2
12904 fi
12905done
5213506e
RW
12906 done
12907IFS=$as_save_IFS
1c710c3c 12908
4de997d1
PB
12909fi
12910fi
1c710c3c 12911CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
4de997d1 12912if test -n "$CC_FOR_TARGET"; then
5213506e
RW
12913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_TARGET" >&5
12914$as_echo "$CC_FOR_TARGET" >&6; }
4de997d1 12915else
5213506e
RW
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
4de997d1
PB
12918fi
12919
5213506e 12920
e8b05380
PB
12921 fi
12922 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
12923 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 12924set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12926$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12927if ${ac_cv_prog_CC_FOR_TARGET+:} false; then :
5213506e 12928 $as_echo_n "(cached) " >&6
4de997d1 12929else
2693c0b0
PB
12930 if test -n "$CC_FOR_TARGET"; then
12931 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4de997d1 12932else
1c710c3c
DJ
12933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12934for as_dir in $PATH
12935do
12936 IFS=$as_save_IFS
12937 test -z "$as_dir" && as_dir=.
5213506e 12938 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 12939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 12940 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
5213506e 12941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
12942 break 2
12943 fi
12944done
5213506e
RW
12945 done
12946IFS=$as_save_IFS
1c710c3c 12947
4de997d1
PB
12948fi
12949fi
1c710c3c 12950CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
2693c0b0 12951if test -n "$CC_FOR_TARGET"; then
5213506e
RW
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_TARGET" >&5
12953$as_echo "$CC_FOR_TARGET" >&6; }
4de997d1 12954else
5213506e
RW
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12956$as_echo "no" >&6; }
4de997d1 12957fi
1c710c3c 12958
5213506e 12959
e8b05380
PB
12960 fi
12961 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
12962 done
12963fi
1c710c3c 12964
2693c0b0
PB
12965if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
12966 set dummy cc gcc
12967 if test $build = $target ; then
12968 CC_FOR_TARGET="$2"
4de997d1 12969 else
2693c0b0 12970 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 12971 fi
1c00b503
PB
12972else
12973 CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4de997d1
PB
12974fi
12975
278a7a38
AO
12976
12977
12978if test -n "$CXX_FOR_TARGET"; then
12979 ac_cv_prog_CXX_FOR_TARGET=$CXX_FOR_TARGET
12980elif test -n "$ac_cv_prog_CXX_FOR_TARGET"; then
12981 CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
12982fi
12983
12984if test -n "$ac_cv_prog_CXX_FOR_TARGET"; then
12985 for ncn_progname in c++ g++ cxx gxx; do
12986 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
12987set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12989$as_echo_n "checking for $ac_word... " >&6; }
22e05272 12990if ${ac_cv_prog_CXX_FOR_TARGET+:} false; then :
5213506e 12991 $as_echo_n "(cached) " >&6
278a7a38
AO
12992else
12993 if test -n "$CXX_FOR_TARGET"; then
12994 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
12995else
12996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999 IFS=$as_save_IFS
13000 test -z "$as_dir" && as_dir=.
5213506e 13001 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 13003 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
5213506e 13004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
13005 break 2
13006 fi
13007done
5213506e
RW
13008 done
13009IFS=$as_save_IFS
278a7a38
AO
13010
13011fi
13012fi
13013CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
13014if test -n "$CXX_FOR_TARGET"; then
5213506e
RW
13015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_FOR_TARGET" >&5
13016$as_echo "$CXX_FOR_TARGET" >&6; }
278a7a38 13017else
5213506e
RW
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13019$as_echo "no" >&6; }
278a7a38
AO
13020fi
13021
5213506e 13022
278a7a38
AO
13023 done
13024fi
13025
13026if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 13027 for ncn_progname in c++ g++ cxx gxx; do
5213506e
RW
13028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13029$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
13030 if test -x $with_build_time_tools/${ncn_progname}; then
13031 ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13033$as_echo "yes" >&6; }
e8b05380
PB
13034 break
13035 else
5213506e
RW
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13037$as_echo "no" >&6; }
e8b05380
PB
13038 fi
13039 done
13040fi
13041
13042if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
13043 for ncn_progname in c++ g++ cxx gxx; do
13044 if test -n "$ncn_target_tool_prefix"; then
13045 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 13046set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
13047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13048$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13049if ${ac_cv_prog_CXX_FOR_TARGET+:} false; then :
5213506e 13050 $as_echo_n "(cached) " >&6
4de997d1
PB
13051else
13052 if test -n "$CXX_FOR_TARGET"; then
13053 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
13054else
1c710c3c
DJ
13055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056for as_dir in $PATH
13057do
13058 IFS=$as_save_IFS
13059 test -z "$as_dir" && as_dir=.
5213506e 13060 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13062 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 13063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13064 break 2
13065 fi
13066done
5213506e
RW
13067 done
13068IFS=$as_save_IFS
1c710c3c 13069
4de997d1
PB
13070fi
13071fi
1c710c3c 13072CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
4de997d1 13073if test -n "$CXX_FOR_TARGET"; then
5213506e
RW
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_FOR_TARGET" >&5
13075$as_echo "$CXX_FOR_TARGET" >&6; }
4de997d1 13076else
5213506e
RW
13077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
4de997d1
PB
13079fi
13080
5213506e 13081
e8b05380
PB
13082 fi
13083 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
13084 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 13085set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13087$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13088if ${ac_cv_prog_CXX_FOR_TARGET+:} false; then :
5213506e 13089 $as_echo_n "(cached) " >&6
4de997d1 13090else
2693c0b0
PB
13091 if test -n "$CXX_FOR_TARGET"; then
13092 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4de997d1 13093else
1c710c3c
DJ
13094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13095for as_dir in $PATH
13096do
13097 IFS=$as_save_IFS
13098 test -z "$as_dir" && as_dir=.
5213506e 13099 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13101 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
5213506e 13102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13103 break 2
13104 fi
13105done
5213506e
RW
13106 done
13107IFS=$as_save_IFS
1c710c3c 13108
4de997d1
PB
13109fi
13110fi
1c710c3c 13111CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
2693c0b0 13112if test -n "$CXX_FOR_TARGET"; then
5213506e
RW
13113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_FOR_TARGET" >&5
13114$as_echo "$CXX_FOR_TARGET" >&6; }
4de997d1 13115else
5213506e
RW
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13117$as_echo "no" >&6; }
4de997d1 13118fi
1c710c3c 13119
5213506e 13120
e8b05380
PB
13121 fi
13122 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
13123 done
13124fi
1c710c3c 13125
2693c0b0
PB
13126if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
13127 set dummy c++ g++ cxx gxx
13128 if test $build = $target ; then
13129 CXX_FOR_TARGET="$2"
4de997d1 13130 else
2693c0b0 13131 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 13132 fi
1c00b503
PB
13133else
13134 CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
ca9f4b81
AO
13135fi
13136
278a7a38
AO
13137
13138
13139if test -n "$GCC_FOR_TARGET"; then
13140 ac_cv_prog_GCC_FOR_TARGET=$GCC_FOR_TARGET
13141elif test -n "$ac_cv_prog_GCC_FOR_TARGET"; then
13142 GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
13143fi
13144
13145if test -n "$ac_cv_prog_GCC_FOR_TARGET"; then
13146 for ncn_progname in gcc; do
13147 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13148set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13150$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13151if ${ac_cv_prog_GCC_FOR_TARGET+:} false; then :
5213506e 13152 $as_echo_n "(cached) " >&6
278a7a38
AO
13153else
13154 if test -n "$GCC_FOR_TARGET"; then
13155 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
13156else
13157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13158for as_dir in $PATH
13159do
13160 IFS=$as_save_IFS
13161 test -z "$as_dir" && as_dir=.
5213506e 13162 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13163 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 13164 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
5213506e 13165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
13166 break 2
13167 fi
13168done
5213506e
RW
13169 done
13170IFS=$as_save_IFS
278a7a38
AO
13171
13172fi
13173fi
13174GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
13175if test -n "$GCC_FOR_TARGET"; then
5213506e
RW
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_FOR_TARGET" >&5
13177$as_echo "$GCC_FOR_TARGET" >&6; }
278a7a38 13178else
5213506e
RW
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13180$as_echo "no" >&6; }
278a7a38
AO
13181fi
13182
5213506e 13183
278a7a38
AO
13184 done
13185fi
13186
13187if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 13188 for ncn_progname in gcc; do
5213506e
RW
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13190$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
13191 if test -x $with_build_time_tools/${ncn_progname}; then
13192 ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13194$as_echo "yes" >&6; }
e8b05380
PB
13195 break
13196 else
5213506e
RW
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13198$as_echo "no" >&6; }
e8b05380
PB
13199 fi
13200 done
13201fi
13202
13203if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
13204 for ncn_progname in gcc; do
13205 if test -n "$ncn_target_tool_prefix"; then
13206 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 13207set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
13208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13209$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13210if ${ac_cv_prog_GCC_FOR_TARGET+:} false; then :
5213506e 13211 $as_echo_n "(cached) " >&6
ca9f4b81 13212else
e8b05380
PB
13213 if test -n "$GCC_FOR_TARGET"; then
13214 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
ca9f4b81 13215else
1c710c3c
DJ
13216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH
13218do
13219 IFS=$as_save_IFS
13220 test -z "$as_dir" && as_dir=.
5213506e 13221 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13222 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13223 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 13224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13225 break 2
13226 fi
13227done
5213506e
RW
13228 done
13229IFS=$as_save_IFS
1c710c3c 13230
ca9f4b81
AO
13231fi
13232fi
1c710c3c 13233GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
e8b05380 13234if test -n "$GCC_FOR_TARGET"; then
5213506e
RW
13235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_FOR_TARGET" >&5
13236$as_echo "$GCC_FOR_TARGET" >&6; }
ca9f4b81 13237else
5213506e
RW
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13239$as_echo "no" >&6; }
ca9f4b81
AO
13240fi
13241
5213506e 13242
e8b05380
PB
13243 fi
13244 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
13245 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 13246set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13248$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13249if ${ac_cv_prog_GCC_FOR_TARGET+:} false; then :
5213506e 13250 $as_echo_n "(cached) " >&6
ca9f4b81 13251else
e8b05380
PB
13252 if test -n "$GCC_FOR_TARGET"; then
13253 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
ca9f4b81 13254else
1c710c3c
DJ
13255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13256for as_dir in $PATH
13257do
13258 IFS=$as_save_IFS
13259 test -z "$as_dir" && as_dir=.
5213506e 13260 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13262 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
5213506e 13263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13264 break 2
13265 fi
13266done
5213506e
RW
13267 done
13268IFS=$as_save_IFS
1c710c3c 13269
ca9f4b81
AO
13270fi
13271fi
1c710c3c 13272GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
e8b05380 13273if test -n "$GCC_FOR_TARGET"; then
5213506e
RW
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_FOR_TARGET" >&5
13275$as_echo "$GCC_FOR_TARGET" >&6; }
ca9f4b81 13276else
5213506e
RW
13277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278$as_echo "no" >&6; }
ca9f4b81 13279fi
1c710c3c 13280
5213506e 13281
e8b05380
PB
13282 fi
13283 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
13284 done
13285fi
1c710c3c 13286
e8b05380
PB
13287if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
13288 GCC_FOR_TARGET="${CC_FOR_TARGET}"
1c00b503
PB
13289else
13290 GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
e8b05380
PB
13291fi
13292
278a7a38
AO
13293
13294
278a7a38
AO
13295if test -n "$GFORTRAN_FOR_TARGET"; then
13296 ac_cv_prog_GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET
13297elif test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
13298 GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
e8b05380
PB
13299fi
13300
278a7a38
AO
13301if test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
13302 for ncn_progname in gfortran; do
13303 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
e8b05380 13304set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13306$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13307if ${ac_cv_prog_GFORTRAN_FOR_TARGET+:} false; then :
5213506e 13308 $as_echo_n "(cached) " >&6
e8b05380 13309else
278a7a38
AO
13310 if test -n "$GFORTRAN_FOR_TARGET"; then
13311 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
e8b05380 13312else
1c710c3c
DJ
13313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13314for as_dir in $PATH
13315do
13316 IFS=$as_save_IFS
13317 test -z "$as_dir" && as_dir=.
5213506e 13318 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 13320 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5213506e 13321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13322 break 2
13323 fi
13324done
5213506e
RW
13325 done
13326IFS=$as_save_IFS
1c710c3c 13327
e8b05380
PB
13328fi
13329fi
278a7a38
AO
13330GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
13331if test -n "$GFORTRAN_FOR_TARGET"; then
5213506e
RW
13332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GFORTRAN_FOR_TARGET" >&5
13333$as_echo "$GFORTRAN_FOR_TARGET" >&6; }
e8b05380 13334else
5213506e
RW
13335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13336$as_echo "no" >&6; }
e8b05380 13337fi
1c710c3c 13338
5213506e 13339
e8b05380
PB
13340 done
13341fi
1c710c3c 13342
278a7a38 13343if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 13344 for ncn_progname in gfortran; do
5213506e
RW
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13346$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
13347 if test -x $with_build_time_tools/${ncn_progname}; then
13348 ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13350$as_echo "yes" >&6; }
e8b05380
PB
13351 break
13352 else
5213506e
RW
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13354$as_echo "no" >&6; }
e8b05380
PB
13355 fi
13356 done
13357fi
13358
13359if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
13360 for ncn_progname in gfortran; do
13361 if test -n "$ncn_target_tool_prefix"; then
13362 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
13363set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13365$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13366if ${ac_cv_prog_GFORTRAN_FOR_TARGET+:} false; then :
5213506e 13367 $as_echo_n "(cached) " >&6
e8b05380
PB
13368else
13369 if test -n "$GFORTRAN_FOR_TARGET"; then
1c710c3c
DJ
13370 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
13371else
13372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13373for as_dir in $PATH
13374do
13375 IFS=$as_save_IFS
13376 test -z "$as_dir" && as_dir=.
5213506e 13377 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13379 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 13380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13381 break 2
13382 fi
13383done
5213506e
RW
13384 done
13385IFS=$as_save_IFS
1c710c3c 13386
e8b05380
PB
13387fi
13388fi
1c710c3c 13389GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
e8b05380 13390if test -n "$GFORTRAN_FOR_TARGET"; then
5213506e
RW
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GFORTRAN_FOR_TARGET" >&5
13392$as_echo "$GFORTRAN_FOR_TARGET" >&6; }
e8b05380 13393else
5213506e
RW
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13395$as_echo "no" >&6; }
e8b05380
PB
13396fi
13397
5213506e 13398
e8b05380
PB
13399 fi
13400 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
13401 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13402set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13404$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13405if ${ac_cv_prog_GFORTRAN_FOR_TARGET+:} false; then :
5213506e 13406 $as_echo_n "(cached) " >&6
e8b05380
PB
13407else
13408 if test -n "$GFORTRAN_FOR_TARGET"; then
13409 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
13410else
1c710c3c
DJ
13411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13412for as_dir in $PATH
13413do
13414 IFS=$as_save_IFS
13415 test -z "$as_dir" && as_dir=.
5213506e 13416 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13418 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5213506e 13419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13420 break 2
13421 fi
13422done
5213506e
RW
13423 done
13424IFS=$as_save_IFS
1c710c3c 13425
e8b05380
PB
13426fi
13427fi
1c710c3c 13428GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
e8b05380 13429if test -n "$GFORTRAN_FOR_TARGET"; then
5213506e
RW
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GFORTRAN_FOR_TARGET" >&5
13431$as_echo "$GFORTRAN_FOR_TARGET" >&6; }
e8b05380 13432else
5213506e
RW
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13434$as_echo "no" >&6; }
e8b05380 13435fi
1c710c3c 13436
5213506e 13437
e8b05380
PB
13438 fi
13439 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
13440 done
13441fi
1c710c3c 13442
e8b05380
PB
13443if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
13444 set dummy gfortran
2693c0b0 13445 if test $build = $target ; then
e8b05380 13446 GFORTRAN_FOR_TARGET="$2"
ca9f4b81 13447 else
e8b05380
PB
13448 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
13449 fi
1c00b503
PB
13450else
13451 GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
e8b05380
PB
13452fi
13453
13454
13455
632e2a07
ILT
13456if test -n "$GOC_FOR_TARGET"; then
13457 ac_cv_prog_GOC_FOR_TARGET=$GOC_FOR_TARGET
13458elif test -n "$ac_cv_prog_GOC_FOR_TARGET"; then
13459 GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
13460fi
13461
13462if test -n "$ac_cv_prog_GOC_FOR_TARGET"; then
13463 for ncn_progname in gccgo; do
13464 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13465set dummy ${ncn_progname}; ac_word=$2
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13467$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13468if ${ac_cv_prog_GOC_FOR_TARGET+:} false; then :
632e2a07
ILT
13469 $as_echo_n "(cached) " >&6
13470else
13471 if test -n "$GOC_FOR_TARGET"; then
13472 ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
13473else
13474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13475for as_dir in $PATH
13476do
13477 IFS=$as_save_IFS
13478 test -z "$as_dir" && as_dir=.
13479 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13480 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
632e2a07
ILT
13481 ac_cv_prog_GOC_FOR_TARGET="${ncn_progname}"
13482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13483 break 2
13484 fi
13485done
13486 done
13487IFS=$as_save_IFS
13488
13489fi
13490fi
13491GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
13492if test -n "$GOC_FOR_TARGET"; then
13493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
13494$as_echo "$GOC_FOR_TARGET" >&6; }
13495else
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13497$as_echo "no" >&6; }
13498fi
13499
13500
13501 done
13502fi
13503
13504if test -z "$ac_cv_prog_GOC_FOR_TARGET" && test -n "$with_build_time_tools"; then
13505 for ncn_progname in gccgo; do
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13507$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
13508 if test -x $with_build_time_tools/${ncn_progname}; then
13509 ac_cv_prog_GOC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
13510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13511$as_echo "yes" >&6; }
13512 break
13513 else
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
13516 fi
13517 done
13518fi
13519
13520if test -z "$ac_cv_prog_GOC_FOR_TARGET"; then
13521 for ncn_progname in gccgo; do
13522 if test -n "$ncn_target_tool_prefix"; then
13523 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
13524set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
13525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13526$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13527if ${ac_cv_prog_GOC_FOR_TARGET+:} false; then :
632e2a07
ILT
13528 $as_echo_n "(cached) " >&6
13529else
13530 if test -n "$GOC_FOR_TARGET"; then
13531 ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
13532else
13533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13534for as_dir in $PATH
13535do
13536 IFS=$as_save_IFS
13537 test -z "$as_dir" && as_dir=.
13538 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
632e2a07
ILT
13540 ac_cv_prog_GOC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
13541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13542 break 2
13543 fi
13544done
13545 done
13546IFS=$as_save_IFS
13547
13548fi
13549fi
13550GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
13551if test -n "$GOC_FOR_TARGET"; then
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
13553$as_echo "$GOC_FOR_TARGET" >&6; }
13554else
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13556$as_echo "no" >&6; }
13557fi
13558
13559
13560 fi
13561 if test -z "$ac_cv_prog_GOC_FOR_TARGET" && test $build = $target ; then
13562 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13563set dummy ${ncn_progname}; ac_word=$2
13564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13565$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13566if ${ac_cv_prog_GOC_FOR_TARGET+:} false; then :
632e2a07
ILT
13567 $as_echo_n "(cached) " >&6
13568else
13569 if test -n "$GOC_FOR_TARGET"; then
13570 ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
13571else
13572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13573for as_dir in $PATH
13574do
13575 IFS=$as_save_IFS
13576 test -z "$as_dir" && as_dir=.
13577 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
632e2a07
ILT
13579 ac_cv_prog_GOC_FOR_TARGET="${ncn_progname}"
13580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13581 break 2
13582 fi
13583done
13584 done
13585IFS=$as_save_IFS
13586
13587fi
13588fi
13589GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
13590if test -n "$GOC_FOR_TARGET"; then
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
13592$as_echo "$GOC_FOR_TARGET" >&6; }
13593else
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13595$as_echo "no" >&6; }
13596fi
13597
13598
13599 fi
13600 test -n "$ac_cv_prog_GOC_FOR_TARGET" && break
13601 done
13602fi
13603
13604if test -z "$ac_cv_prog_GOC_FOR_TARGET" ; then
13605 set dummy gccgo
13606 if test $build = $target ; then
13607 GOC_FOR_TARGET="$2"
13608 else
13609 GOC_FOR_TARGET="${ncn_target_tool_prefix}$2"
13610 fi
13611else
13612 GOC_FOR_TARGET="$ac_cv_prog_GOC_FOR_TARGET"
13613fi
13614
13615
13616
b4c522fa
IB
13617if test -n "$GDC_FOR_TARGET"; then
13618 ac_cv_prog_GDC_FOR_TARGET=$GDC_FOR_TARGET
13619elif test -n "$ac_cv_prog_GDC_FOR_TARGET"; then
13620 GDC_FOR_TARGET=$ac_cv_prog_GDC_FOR_TARGET
13621fi
13622
13623if test -n "$ac_cv_prog_GDC_FOR_TARGET"; then
13624 for ncn_progname in gdc; do
13625 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13626set dummy ${ncn_progname}; ac_word=$2
13627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13628$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13629if ${ac_cv_prog_GDC_FOR_TARGET+:} false; then :
b4c522fa
IB
13630 $as_echo_n "(cached) " >&6
13631else
13632 if test -n "$GDC_FOR_TARGET"; then
13633 ac_cv_prog_GDC_FOR_TARGET="$GDC_FOR_TARGET" # Let the user override the test.
13634else
13635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13636for as_dir in $PATH
13637do
13638 IFS=$as_save_IFS
13639 test -z "$as_dir" && as_dir=.
13640 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b4c522fa
IB
13642 ac_cv_prog_GDC_FOR_TARGET="${ncn_progname}"
13643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13644 break 2
13645 fi
13646done
13647 done
13648IFS=$as_save_IFS
13649
13650fi
13651fi
13652GDC_FOR_TARGET=$ac_cv_prog_GDC_FOR_TARGET
13653if test -n "$GDC_FOR_TARGET"; then
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDC_FOR_TARGET" >&5
13655$as_echo "$GDC_FOR_TARGET" >&6; }
13656else
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658$as_echo "no" >&6; }
13659fi
13660
13661
13662 done
13663fi
13664
13665if test -z "$ac_cv_prog_GDC_FOR_TARGET" && test -n "$with_build_time_tools"; then
13666 for ncn_progname in gdc; do
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13668$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
13669 if test -x $with_build_time_tools/${ncn_progname}; then
13670 ac_cv_prog_GDC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13672$as_echo "yes" >&6; }
13673 break
13674 else
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13676$as_echo "no" >&6; }
13677 fi
13678 done
13679fi
13680
13681if test -z "$ac_cv_prog_GDC_FOR_TARGET"; then
13682 for ncn_progname in gdc; do
13683 if test -n "$ncn_target_tool_prefix"; then
13684 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
13685set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
13686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13687$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13688if ${ac_cv_prog_GDC_FOR_TARGET+:} false; then :
b4c522fa
IB
13689 $as_echo_n "(cached) " >&6
13690else
13691 if test -n "$GDC_FOR_TARGET"; then
13692 ac_cv_prog_GDC_FOR_TARGET="$GDC_FOR_TARGET" # Let the user override the test.
13693else
13694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13695for as_dir in $PATH
13696do
13697 IFS=$as_save_IFS
13698 test -z "$as_dir" && as_dir=.
13699 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b4c522fa
IB
13701 ac_cv_prog_GDC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
13702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13703 break 2
13704 fi
13705done
13706 done
13707IFS=$as_save_IFS
13708
13709fi
13710fi
13711GDC_FOR_TARGET=$ac_cv_prog_GDC_FOR_TARGET
13712if test -n "$GDC_FOR_TARGET"; then
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDC_FOR_TARGET" >&5
13714$as_echo "$GDC_FOR_TARGET" >&6; }
13715else
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13717$as_echo "no" >&6; }
13718fi
13719
13720
13721 fi
13722 if test -z "$ac_cv_prog_GDC_FOR_TARGET" && test $build = $target ; then
13723 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13724set dummy ${ncn_progname}; ac_word=$2
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13726$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13727if ${ac_cv_prog_GDC_FOR_TARGET+:} false; then :
b4c522fa
IB
13728 $as_echo_n "(cached) " >&6
13729else
13730 if test -n "$GDC_FOR_TARGET"; then
13731 ac_cv_prog_GDC_FOR_TARGET="$GDC_FOR_TARGET" # Let the user override the test.
13732else
13733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13734for as_dir in $PATH
13735do
13736 IFS=$as_save_IFS
13737 test -z "$as_dir" && as_dir=.
13738 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b4c522fa
IB
13740 ac_cv_prog_GDC_FOR_TARGET="${ncn_progname}"
13741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13742 break 2
13743 fi
13744done
13745 done
13746IFS=$as_save_IFS
13747
13748fi
13749fi
13750GDC_FOR_TARGET=$ac_cv_prog_GDC_FOR_TARGET
13751if test -n "$GDC_FOR_TARGET"; then
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDC_FOR_TARGET" >&5
13753$as_echo "$GDC_FOR_TARGET" >&6; }
13754else
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13756$as_echo "no" >&6; }
13757fi
13758
13759
13760 fi
13761 test -n "$ac_cv_prog_GDC_FOR_TARGET" && break
13762 done
13763fi
13764
13765if test -z "$ac_cv_prog_GDC_FOR_TARGET" ; then
13766 set dummy gdc
13767 if test $build = $target ; then
13768 GDC_FOR_TARGET="$2"
13769 else
13770 GDC_FOR_TARGET="${ncn_target_tool_prefix}$2"
13771 fi
13772else
13773 GDC_FOR_TARGET="$ac_cv_prog_GDC_FOR_TARGET"
13774fi
13775
13776
13777
e8b05380
PB
13778cat > conftest.c << \EOF
13779#ifdef __GNUC__
13780 gcc_yay;
13781#endif
13782EOF
13783if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
13784 have_gcc_for_target=yes
13785else
13786 GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
13787 have_gcc_for_target=no
13788fi
13789rm conftest.c
13790
13791
13792
13793
13794if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
13795 if test -n "$with_build_time_tools"; then
5213506e
RW
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ar in $with_build_time_tools" >&5
13797$as_echo_n "checking for ar in $with_build_time_tools... " >&6; }
d1f8db0c
PB
13798 if test -x $with_build_time_tools/ar; then
13799 AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
13800 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5213506e
RW
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_AR_FOR_TARGET" >&5
13802$as_echo "$ac_cv_path_AR_FOR_TARGET" >&6; }
d1f8db0c 13803 else
5213506e
RW
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13805$as_echo "no" >&6; }
d1f8db0c 13806 fi
e8b05380
PB
13807 elif test $build != $host && test $have_gcc_for_target = yes; then
13808 AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
1c00b503
PB
13809 test $AR_FOR_TARGET = ar && AR_FOR_TARGET=
13810 test -n "$AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
e8b05380
PB
13811 fi
13812fi
3e19841a 13813if test -z "$ac_cv_path_AR_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
13814 # Extract the first word of "ar", so it can be a program name with args.
13815set dummy ar; ac_word=$2
5213506e
RW
13816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13817$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13818if ${ac_cv_path_AR_FOR_TARGET+:} false; then :
5213506e 13819 $as_echo_n "(cached) " >&6
e8b05380 13820else
1c710c3c
DJ
13821 case $AR_FOR_TARGET in
13822 [\\/]* | ?:[\\/]*)
e8b05380
PB
13823 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
13824 ;;
e8b05380 13825 *)
1c710c3c
DJ
13826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13827for as_dir in $gcc_cv_tool_dirs
13828do
13829 IFS=$as_save_IFS
13830 test -z "$as_dir" && as_dir=.
5213506e 13831 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13833 ac_cv_path_AR_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 13834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13835 break 2
13836 fi
13837done
5213506e
RW
13838 done
13839IFS=$as_save_IFS
1c710c3c 13840
e8b05380
PB
13841 ;;
13842esac
13843fi
1c710c3c 13844AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
e8b05380 13845if test -n "$AR_FOR_TARGET"; then
5213506e
RW
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR_FOR_TARGET" >&5
13847$as_echo "$AR_FOR_TARGET" >&6; }
e8b05380 13848else
5213506e
RW
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
4de997d1
PB
13851fi
13852
5213506e 13853
e8b05380
PB
13854fi
13855if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
278a7a38
AO
13856
13857
13858if test -n "$AR_FOR_TARGET"; then
13859 ac_cv_prog_AR_FOR_TARGET=$AR_FOR_TARGET
13860elif test -n "$ac_cv_prog_AR_FOR_TARGET"; then
13861 AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
13862fi
13863
13864if test -n "$ac_cv_prog_AR_FOR_TARGET"; then
13865 for ncn_progname in ar; do
13866 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13867set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13869$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13870if ${ac_cv_prog_AR_FOR_TARGET+:} false; then :
5213506e 13871 $as_echo_n "(cached) " >&6
278a7a38
AO
13872else
13873 if test -n "$AR_FOR_TARGET"; then
13874 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
13875else
13876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13877for as_dir in $PATH
13878do
13879 IFS=$as_save_IFS
13880 test -z "$as_dir" && as_dir=.
5213506e 13881 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 13883 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
5213506e 13884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
13885 break 2
13886 fi
13887done
5213506e
RW
13888 done
13889IFS=$as_save_IFS
278a7a38
AO
13890
13891fi
13892fi
13893AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
13894if test -n "$AR_FOR_TARGET"; then
5213506e
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR_FOR_TARGET" >&5
13896$as_echo "$AR_FOR_TARGET" >&6; }
278a7a38 13897else
5213506e
RW
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13899$as_echo "no" >&6; }
278a7a38
AO
13900fi
13901
5213506e 13902
278a7a38
AO
13903 done
13904fi
13905
13906if test -z "$ac_cv_prog_AR_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 13907 for ncn_progname in ar; do
5213506e
RW
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
13909$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
13910 if test -x $with_build_time_tools/${ncn_progname}; then
13911 ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13913$as_echo "yes" >&6; }
e8b05380
PB
13914 break
13915 else
5213506e
RW
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13917$as_echo "no" >&6; }
e8b05380
PB
13918 fi
13919 done
13920fi
13921
13922if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
13923 for ncn_progname in ar; do
13924 if test -n "$ncn_target_tool_prefix"; then
13925 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 13926set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
13927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13928$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13929if ${ac_cv_prog_AR_FOR_TARGET+:} false; then :
5213506e 13930 $as_echo_n "(cached) " >&6
4de997d1 13931else
e8b05380
PB
13932 if test -n "$AR_FOR_TARGET"; then
13933 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
4de997d1 13934else
1c710c3c
DJ
13935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13936for as_dir in $PATH
13937do
13938 IFS=$as_save_IFS
13939 test -z "$as_dir" && as_dir=.
5213506e 13940 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13942 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 13943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13944 break 2
13945 fi
13946done
5213506e
RW
13947 done
13948IFS=$as_save_IFS
1c710c3c 13949
4de997d1
PB
13950fi
13951fi
1c710c3c 13952AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
e8b05380 13953if test -n "$AR_FOR_TARGET"; then
5213506e
RW
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR_FOR_TARGET" >&5
13955$as_echo "$AR_FOR_TARGET" >&6; }
4de997d1 13956else
5213506e
RW
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13958$as_echo "no" >&6; }
4de997d1
PB
13959fi
13960
5213506e 13961
e8b05380
PB
13962 fi
13963 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
13964 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
13965set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
13966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13967$as_echo_n "checking for $ac_word... " >&6; }
22e05272 13968if ${ac_cv_prog_AR_FOR_TARGET+:} false; then :
5213506e 13969 $as_echo_n "(cached) " >&6
e8b05380
PB
13970else
13971 if test -n "$AR_FOR_TARGET"; then
13972 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
13973else
1c710c3c
DJ
13974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13975for as_dir in $PATH
13976do
13977 IFS=$as_save_IFS
13978 test -z "$as_dir" && as_dir=.
5213506e 13979 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 13980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 13981 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
5213506e 13982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
13983 break 2
13984 fi
13985done
5213506e
RW
13986 done
13987IFS=$as_save_IFS
1c710c3c 13988
e8b05380
PB
13989fi
13990fi
1c710c3c 13991AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
e8b05380 13992if test -n "$AR_FOR_TARGET"; then
5213506e
RW
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR_FOR_TARGET" >&5
13994$as_echo "$AR_FOR_TARGET" >&6; }
e8b05380 13995else
5213506e
RW
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13997$as_echo "no" >&6; }
e8b05380 13998fi
1c710c3c 13999
5213506e 14000
e8b05380
PB
14001 fi
14002 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
14003 done
14004fi
1c710c3c 14005
e8b05380
PB
14006if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
14007 set dummy ar
14008 if test $build = $target ; then
14009 AR_FOR_TARGET="$2"
14010 else
14011 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
2693c0b0 14012 fi
1c00b503
PB
14013else
14014 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
e8b05380
PB
14015fi
14016
d1f8db0c
PB
14017else
14018 AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
e8b05380
PB
14019fi
14020
14021
14022
14023
14024if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
14025 if test -n "$with_build_time_tools"; then
5213506e
RW
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for as in $with_build_time_tools" >&5
14027$as_echo_n "checking for as in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14028 if test -x $with_build_time_tools/as; then
14029 AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
14030 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5213506e
RW
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_AS_FOR_TARGET" >&5
14032$as_echo "$ac_cv_path_AS_FOR_TARGET" >&6; }
d1f8db0c 14033 else
5213506e
RW
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14035$as_echo "no" >&6; }
d1f8db0c 14036 fi
e8b05380
PB
14037 elif test $build != $host && test $have_gcc_for_target = yes; then
14038 AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
1c00b503
PB
14039 test $AS_FOR_TARGET = as && AS_FOR_TARGET=
14040 test -n "$AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
e8b05380
PB
14041 fi
14042fi
3e19841a 14043if test -z "$ac_cv_path_AS_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
14044 # Extract the first word of "as", so it can be a program name with args.
14045set dummy as; ac_word=$2
5213506e
RW
14046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14047$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14048if ${ac_cv_path_AS_FOR_TARGET+:} false; then :
5213506e 14049 $as_echo_n "(cached) " >&6
e8b05380 14050else
1c710c3c
DJ
14051 case $AS_FOR_TARGET in
14052 [\\/]* | ?:[\\/]*)
e8b05380
PB
14053 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
14054 ;;
e8b05380 14055 *)
1c710c3c
DJ
14056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14057for as_dir in $gcc_cv_tool_dirs
14058do
14059 IFS=$as_save_IFS
14060 test -z "$as_dir" && as_dir=.
5213506e 14061 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14063 ac_cv_path_AS_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 14064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14065 break 2
14066 fi
14067done
5213506e
RW
14068 done
14069IFS=$as_save_IFS
1c710c3c 14070
e8b05380
PB
14071 ;;
14072esac
14073fi
1c710c3c 14074AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
e8b05380 14075if test -n "$AS_FOR_TARGET"; then
5213506e
RW
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS_FOR_TARGET" >&5
14077$as_echo "$AS_FOR_TARGET" >&6; }
e8b05380 14078else
5213506e
RW
14079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14080$as_echo "no" >&6; }
e8b05380
PB
14081fi
14082
5213506e 14083
e8b05380
PB
14084fi
14085if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
278a7a38
AO
14086
14087
14088if test -n "$AS_FOR_TARGET"; then
14089 ac_cv_prog_AS_FOR_TARGET=$AS_FOR_TARGET
14090elif test -n "$ac_cv_prog_AS_FOR_TARGET"; then
14091 AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
14092fi
14093
14094if test -n "$ac_cv_prog_AS_FOR_TARGET"; then
14095 for ncn_progname in as; do
14096 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14097set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14099$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14100if ${ac_cv_prog_AS_FOR_TARGET+:} false; then :
5213506e 14101 $as_echo_n "(cached) " >&6
278a7a38
AO
14102else
14103 if test -n "$AS_FOR_TARGET"; then
14104 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
14105else
14106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14107for as_dir in $PATH
14108do
14109 IFS=$as_save_IFS
14110 test -z "$as_dir" && as_dir=.
5213506e 14111 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 14113 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
5213506e 14114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
14115 break 2
14116 fi
14117done
5213506e
RW
14118 done
14119IFS=$as_save_IFS
278a7a38
AO
14120
14121fi
14122fi
14123AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
14124if test -n "$AS_FOR_TARGET"; then
5213506e
RW
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS_FOR_TARGET" >&5
14126$as_echo "$AS_FOR_TARGET" >&6; }
278a7a38 14127else
5213506e
RW
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14129$as_echo "no" >&6; }
278a7a38
AO
14130fi
14131
5213506e 14132
278a7a38
AO
14133 done
14134fi
14135
14136if test -z "$ac_cv_prog_AS_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 14137 for ncn_progname in as; do
5213506e
RW
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
14139$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14140 if test -x $with_build_time_tools/${ncn_progname}; then
14141 ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14143$as_echo "yes" >&6; }
e8b05380
PB
14144 break
14145 else
5213506e
RW
14146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14147$as_echo "no" >&6; }
e8b05380
PB
14148 fi
14149 done
14150fi
14151
14152if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
14153 for ncn_progname in as; do
14154 if test -n "$ncn_target_tool_prefix"; then
14155 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
14156set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
14157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14158$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14159if ${ac_cv_prog_AS_FOR_TARGET+:} false; then :
5213506e 14160 $as_echo_n "(cached) " >&6
e8b05380
PB
14161else
14162 if test -n "$AS_FOR_TARGET"; then
14163 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
14164else
1c710c3c
DJ
14165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14166for as_dir in $PATH
14167do
14168 IFS=$as_save_IFS
14169 test -z "$as_dir" && as_dir=.
5213506e 14170 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14172 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 14173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14174 break 2
14175 fi
14176done
5213506e
RW
14177 done
14178IFS=$as_save_IFS
1c710c3c 14179
e8b05380
PB
14180fi
14181fi
1c710c3c 14182AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
e8b05380 14183if test -n "$AS_FOR_TARGET"; then
5213506e
RW
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS_FOR_TARGET" >&5
14185$as_echo "$AS_FOR_TARGET" >&6; }
e8b05380 14186else
5213506e
RW
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14188$as_echo "no" >&6; }
e8b05380
PB
14189fi
14190
5213506e 14191
e8b05380
PB
14192 fi
14193 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
14194 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 14195set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14197$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14198if ${ac_cv_prog_AS_FOR_TARGET+:} false; then :
5213506e 14199 $as_echo_n "(cached) " >&6
4de997d1 14200else
e8b05380
PB
14201 if test -n "$AS_FOR_TARGET"; then
14202 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
4de997d1 14203else
1c710c3c
DJ
14204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14205for as_dir in $PATH
14206do
14207 IFS=$as_save_IFS
14208 test -z "$as_dir" && as_dir=.
5213506e 14209 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14211 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
5213506e 14212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14213 break 2
14214 fi
14215done
5213506e
RW
14216 done
14217IFS=$as_save_IFS
1c710c3c 14218
4de997d1
PB
14219fi
14220fi
1c710c3c 14221AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
e8b05380 14222if test -n "$AS_FOR_TARGET"; then
5213506e
RW
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS_FOR_TARGET" >&5
14224$as_echo "$AS_FOR_TARGET" >&6; }
4de997d1 14225else
5213506e
RW
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14227$as_echo "no" >&6; }
4de997d1 14228fi
1c710c3c 14229
5213506e 14230
e8b05380
PB
14231 fi
14232 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
14233 done
14234fi
1c710c3c 14235
e8b05380
PB
14236if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
14237 set dummy as
14238 if test $build = $target ; then
14239 AS_FOR_TARGET="$2"
14240 else
14241 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 14242 fi
1c00b503
PB
14243else
14244 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
e8b05380 14245fi
2693c0b0 14246
d1f8db0c
PB
14247else
14248 AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
4de997d1
PB
14249fi
14250
e8b05380
PB
14251
14252
14253
14254if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
14255 if test -n "$with_build_time_tools"; then
5213506e
RW
14256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlltool in $with_build_time_tools" >&5
14257$as_echo_n "checking for dlltool in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14258 if test -x $with_build_time_tools/dlltool; then
14259 DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
14260 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5213506e
RW
14261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_DLLTOOL_FOR_TARGET" >&5
14262$as_echo "$ac_cv_path_DLLTOOL_FOR_TARGET" >&6; }
d1f8db0c 14263 else
5213506e
RW
14264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14265$as_echo "no" >&6; }
d1f8db0c 14266 fi
e8b05380
PB
14267 elif test $build != $host && test $have_gcc_for_target = yes; then
14268 DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
1c00b503
PB
14269 test $DLLTOOL_FOR_TARGET = dlltool && DLLTOOL_FOR_TARGET=
14270 test -n "$DLLTOOL_FOR_TARGET" && ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
e8b05380
PB
14271 fi
14272fi
3e19841a 14273if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
14274 # Extract the first word of "dlltool", so it can be a program name with args.
14275set dummy dlltool; ac_word=$2
5213506e
RW
14276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14277$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14278if ${ac_cv_path_DLLTOOL_FOR_TARGET+:} false; then :
5213506e 14279 $as_echo_n "(cached) " >&6
4de997d1 14280else
1c710c3c
DJ
14281 case $DLLTOOL_FOR_TARGET in
14282 [\\/]* | ?:[\\/]*)
e8b05380
PB
14283 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
14284 ;;
e8b05380 14285 *)
1c710c3c
DJ
14286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14287for as_dir in $gcc_cv_tool_dirs
14288do
14289 IFS=$as_save_IFS
14290 test -z "$as_dir" && as_dir=.
5213506e 14291 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14293 ac_cv_path_DLLTOOL_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 14294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14295 break 2
14296 fi
14297done
5213506e
RW
14298 done
14299IFS=$as_save_IFS
1c710c3c 14300
e8b05380
PB
14301 ;;
14302esac
4de997d1 14303fi
1c710c3c 14304DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
e8b05380 14305if test -n "$DLLTOOL_FOR_TARGET"; then
5213506e
RW
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL_FOR_TARGET" >&5
14307$as_echo "$DLLTOOL_FOR_TARGET" >&6; }
4de997d1 14308else
5213506e
RW
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310$as_echo "no" >&6; }
4de997d1
PB
14311fi
14312
5213506e 14313
e8b05380
PB
14314fi
14315if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
278a7a38
AO
14316
14317
14318if test -n "$DLLTOOL_FOR_TARGET"; then
14319 ac_cv_prog_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
14320elif test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
14321 DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
14322fi
14323
14324if test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
14325 for ncn_progname in dlltool; do
14326 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14327set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14329$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14330if ${ac_cv_prog_DLLTOOL_FOR_TARGET+:} false; then :
5213506e 14331 $as_echo_n "(cached) " >&6
278a7a38
AO
14332else
14333 if test -n "$DLLTOOL_FOR_TARGET"; then
14334 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
14335else
14336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14337for as_dir in $PATH
14338do
14339 IFS=$as_save_IFS
14340 test -z "$as_dir" && as_dir=.
5213506e 14341 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 14343 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
5213506e 14344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
14345 break 2
14346 fi
14347done
5213506e
RW
14348 done
14349IFS=$as_save_IFS
278a7a38
AO
14350
14351fi
14352fi
14353DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
14354if test -n "$DLLTOOL_FOR_TARGET"; then
5213506e
RW
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL_FOR_TARGET" >&5
14356$as_echo "$DLLTOOL_FOR_TARGET" >&6; }
278a7a38 14357else
5213506e
RW
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14359$as_echo "no" >&6; }
278a7a38
AO
14360fi
14361
5213506e 14362
278a7a38
AO
14363 done
14364fi
14365
14366if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 14367 for ncn_progname in dlltool; do
5213506e
RW
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
14369$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14370 if test -x $with_build_time_tools/${ncn_progname}; then
14371 ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14373$as_echo "yes" >&6; }
e8b05380
PB
14374 break
14375 else
5213506e
RW
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14377$as_echo "no" >&6; }
e8b05380
PB
14378 fi
14379 done
14380fi
14381
14382if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
14383 for ncn_progname in dlltool; do
14384 if test -n "$ncn_target_tool_prefix"; then
14385 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
14386set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14388$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14389if ${ac_cv_prog_DLLTOOL_FOR_TARGET+:} false; then :
5213506e 14390 $as_echo_n "(cached) " >&6
4de997d1 14391else
e8b05380
PB
14392 if test -n "$DLLTOOL_FOR_TARGET"; then
14393 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 14394else
1c710c3c
DJ
14395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396for as_dir in $PATH
14397do
14398 IFS=$as_save_IFS
14399 test -z "$as_dir" && as_dir=.
5213506e 14400 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14402 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 14403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14404 break 2
14405 fi
14406done
5213506e
RW
14407 done
14408IFS=$as_save_IFS
1c710c3c 14409
4de997d1
PB
14410fi
14411fi
1c710c3c 14412DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
e8b05380 14413if test -n "$DLLTOOL_FOR_TARGET"; then
5213506e
RW
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL_FOR_TARGET" >&5
14415$as_echo "$DLLTOOL_FOR_TARGET" >&6; }
4de997d1 14416else
5213506e
RW
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14418$as_echo "no" >&6; }
4de997d1 14419fi
4de997d1 14420
5213506e 14421
e8b05380
PB
14422 fi
14423 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
14424 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14425set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14427$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14428if ${ac_cv_prog_DLLTOOL_FOR_TARGET+:} false; then :
5213506e 14429 $as_echo_n "(cached) " >&6
4de997d1 14430else
e8b05380
PB
14431 if test -n "$DLLTOOL_FOR_TARGET"; then
14432 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 14433else
1c710c3c
DJ
14434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14435for as_dir in $PATH
14436do
14437 IFS=$as_save_IFS
14438 test -z "$as_dir" && as_dir=.
5213506e 14439 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14441 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
5213506e 14442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14443 break 2
14444 fi
14445done
5213506e
RW
14446 done
14447IFS=$as_save_IFS
1c710c3c 14448
4de997d1
PB
14449fi
14450fi
1c710c3c 14451DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
e8b05380 14452if test -n "$DLLTOOL_FOR_TARGET"; then
5213506e
RW
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL_FOR_TARGET" >&5
14454$as_echo "$DLLTOOL_FOR_TARGET" >&6; }
4de997d1 14455else
5213506e
RW
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14457$as_echo "no" >&6; }
4de997d1 14458fi
1c710c3c 14459
5213506e 14460
e8b05380
PB
14461 fi
14462 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
14463 done
14464fi
1c710c3c 14465
e8b05380
PB
14466if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
14467 set dummy dlltool
14468 if test $build = $target ; then
14469 DLLTOOL_FOR_TARGET="$2"
14470 else
14471 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
14472 fi
1c00b503
PB
14473else
14474 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
e8b05380
PB
14475fi
14476
d1f8db0c
PB
14477else
14478 DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
e8b05380
PB
14479fi
14480
4de997d1 14481
e8b05380
PB
14482
14483
3b5e8ee4
IS
14484if test -z "$ac_cv_path_DSYMUTIL_FOR_TARGET" ; then
14485 if test -n "$with_build_time_tools"; then
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dsymutil in $with_build_time_tools" >&5
14487$as_echo_n "checking for dsymutil in $with_build_time_tools... " >&6; }
14488 if test -x $with_build_time_tools/dsymutil; then
14489 DSYMUTIL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dsymutil
14490 ac_cv_path_DSYMUTIL_FOR_TARGET=$DSYMUTIL_FOR_TARGET
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_DSYMUTIL_FOR_TARGET" >&5
14492$as_echo "$ac_cv_path_DSYMUTIL_FOR_TARGET" >&6; }
14493 else
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14495$as_echo "no" >&6; }
14496 fi
14497 elif test $build != $host && test $have_gcc_for_target = yes; then
14498 DSYMUTIL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dsymutil`
14499 test $DSYMUTIL_FOR_TARGET = dsymutil && DSYMUTIL_FOR_TARGET=
14500 test -n "$DSYMUTIL_FOR_TARGET" && ac_cv_path_DSYMUTIL_FOR_TARGET=$DSYMUTIL_FOR_TARGET
14501 fi
14502fi
14503if test -z "$ac_cv_path_DSYMUTIL_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
14504 # Extract the first word of "dsymutil", so it can be a program name with args.
14505set dummy dsymutil; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_DSYMUTIL_FOR_TARGET+:} false; then :
14509 $as_echo_n "(cached) " >&6
14510else
14511 case $DSYMUTIL_FOR_TARGET in
14512 [\\/]* | ?:[\\/]*)
14513 ac_cv_path_DSYMUTIL_FOR_TARGET="$DSYMUTIL_FOR_TARGET" # Let the user override the test with a path.
14514 ;;
14515 *)
14516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $gcc_cv_tool_dirs
14518do
14519 IFS=$as_save_IFS
14520 test -z "$as_dir" && as_dir=.
14521 for ac_exec_ext in '' $ac_executable_extensions; do
14522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523 ac_cv_path_DSYMUTIL_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
14524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525 break 2
14526 fi
14527done
14528 done
14529IFS=$as_save_IFS
14530
14531 ;;
14532esac
14533fi
14534DSYMUTIL_FOR_TARGET=$ac_cv_path_DSYMUTIL_FOR_TARGET
14535if test -n "$DSYMUTIL_FOR_TARGET"; then
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL_FOR_TARGET" >&5
14537$as_echo "$DSYMUTIL_FOR_TARGET" >&6; }
14538else
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544fi
14545if test -z "$ac_cv_path_DSYMUTIL_FOR_TARGET" ; then
14546
14547
14548if test -n "$DSYMUTIL_FOR_TARGET"; then
14549 ac_cv_prog_DSYMUTIL_FOR_TARGET=$DSYMUTIL_FOR_TARGET
14550elif test -n "$ac_cv_prog_DSYMUTIL_FOR_TARGET"; then
14551 DSYMUTIL_FOR_TARGET=$ac_cv_prog_DSYMUTIL_FOR_TARGET
14552fi
14553
14554if test -n "$ac_cv_prog_DSYMUTIL_FOR_TARGET"; then
14555 for ncn_progname in dsymutil; do
14556 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14557set dummy ${ncn_progname}; ac_word=$2
14558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14559$as_echo_n "checking for $ac_word... " >&6; }
14560if ${ac_cv_prog_DSYMUTIL_FOR_TARGET+:} false; then :
14561 $as_echo_n "(cached) " >&6
14562else
14563 if test -n "$DSYMUTIL_FOR_TARGET"; then
14564 ac_cv_prog_DSYMUTIL_FOR_TARGET="$DSYMUTIL_FOR_TARGET" # Let the user override the test.
14565else
14566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14567for as_dir in $PATH
14568do
14569 IFS=$as_save_IFS
14570 test -z "$as_dir" && as_dir=.
14571 for ac_exec_ext in '' $ac_executable_extensions; do
14572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14573 ac_cv_prog_DSYMUTIL_FOR_TARGET="${ncn_progname}"
14574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14575 break 2
14576 fi
14577done
14578 done
14579IFS=$as_save_IFS
14580
14581fi
14582fi
14583DSYMUTIL_FOR_TARGET=$ac_cv_prog_DSYMUTIL_FOR_TARGET
14584if test -n "$DSYMUTIL_FOR_TARGET"; then
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL_FOR_TARGET" >&5
14586$as_echo "$DSYMUTIL_FOR_TARGET" >&6; }
14587else
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14589$as_echo "no" >&6; }
14590fi
14591
14592
14593 done
14594fi
14595
14596if test -z "$ac_cv_prog_DSYMUTIL_FOR_TARGET" && test -n "$with_build_time_tools"; then
14597 for ncn_progname in dsymutil; do
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
14599$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
14600 if test -x $with_build_time_tools/${ncn_progname}; then
14601 ac_cv_prog_DSYMUTIL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14603$as_echo "yes" >&6; }
14604 break
14605 else
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608 fi
14609 done
14610fi
14611
14612if test -z "$ac_cv_prog_DSYMUTIL_FOR_TARGET"; then
14613 for ncn_progname in dsymutil; do
14614 if test -n "$ncn_target_tool_prefix"; then
14615 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
14616set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
14617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14618$as_echo_n "checking for $ac_word... " >&6; }
14619if ${ac_cv_prog_DSYMUTIL_FOR_TARGET+:} false; then :
14620 $as_echo_n "(cached) " >&6
14621else
14622 if test -n "$DSYMUTIL_FOR_TARGET"; then
14623 ac_cv_prog_DSYMUTIL_FOR_TARGET="$DSYMUTIL_FOR_TARGET" # Let the user override the test.
14624else
14625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14626for as_dir in $PATH
14627do
14628 IFS=$as_save_IFS
14629 test -z "$as_dir" && as_dir=.
14630 for ac_exec_ext in '' $ac_executable_extensions; do
14631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14632 ac_cv_prog_DSYMUTIL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
14633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14634 break 2
14635 fi
14636done
14637 done
14638IFS=$as_save_IFS
14639
14640fi
14641fi
14642DSYMUTIL_FOR_TARGET=$ac_cv_prog_DSYMUTIL_FOR_TARGET
14643if test -n "$DSYMUTIL_FOR_TARGET"; then
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL_FOR_TARGET" >&5
14645$as_echo "$DSYMUTIL_FOR_TARGET" >&6; }
14646else
14647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14648$as_echo "no" >&6; }
14649fi
14650
14651
14652 fi
14653 if test -z "$ac_cv_prog_DSYMUTIL_FOR_TARGET" && test $build = $target ; then
14654 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14655set dummy ${ncn_progname}; ac_word=$2
14656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14657$as_echo_n "checking for $ac_word... " >&6; }
14658if ${ac_cv_prog_DSYMUTIL_FOR_TARGET+:} false; then :
14659 $as_echo_n "(cached) " >&6
14660else
14661 if test -n "$DSYMUTIL_FOR_TARGET"; then
14662 ac_cv_prog_DSYMUTIL_FOR_TARGET="$DSYMUTIL_FOR_TARGET" # Let the user override the test.
14663else
14664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14665for as_dir in $PATH
14666do
14667 IFS=$as_save_IFS
14668 test -z "$as_dir" && as_dir=.
14669 for ac_exec_ext in '' $ac_executable_extensions; do
14670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14671 ac_cv_prog_DSYMUTIL_FOR_TARGET="${ncn_progname}"
14672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14673 break 2
14674 fi
14675done
14676 done
14677IFS=$as_save_IFS
14678
14679fi
14680fi
14681DSYMUTIL_FOR_TARGET=$ac_cv_prog_DSYMUTIL_FOR_TARGET
14682if test -n "$DSYMUTIL_FOR_TARGET"; then
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL_FOR_TARGET" >&5
14684$as_echo "$DSYMUTIL_FOR_TARGET" >&6; }
14685else
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14687$as_echo "no" >&6; }
14688fi
14689
14690
14691 fi
14692 test -n "$ac_cv_prog_DSYMUTIL_FOR_TARGET" && break
14693 done
14694fi
14695
14696if test -z "$ac_cv_prog_DSYMUTIL_FOR_TARGET" ; then
14697 set dummy dsymutil
14698 if test $build = $target ; then
14699 DSYMUTIL_FOR_TARGET="$2"
14700 else
14701 DSYMUTIL_FOR_TARGET="${ncn_target_tool_prefix}$2"
14702 fi
14703else
14704 DSYMUTIL_FOR_TARGET="$ac_cv_prog_DSYMUTIL_FOR_TARGET"
14705fi
14706
14707else
14708 DSYMUTIL_FOR_TARGET=$ac_cv_path_DSYMUTIL_FOR_TARGET
14709fi
14710
14711
14712
14713
e8b05380
PB
14714if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
14715 if test -n "$with_build_time_tools"; then
5213506e
RW
14716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld in $with_build_time_tools" >&5
14717$as_echo_n "checking for ld in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14718 if test -x $with_build_time_tools/ld; then
14719 LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
14720 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5213506e
RW
14721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_LD_FOR_TARGET" >&5
14722$as_echo "$ac_cv_path_LD_FOR_TARGET" >&6; }
d1f8db0c 14723 else
5213506e
RW
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725$as_echo "no" >&6; }
d1f8db0c 14726 fi
e8b05380
PB
14727 elif test $build != $host && test $have_gcc_for_target = yes; then
14728 LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
1c00b503
PB
14729 test $LD_FOR_TARGET = ld && LD_FOR_TARGET=
14730 test -n "$LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
2693c0b0 14731 fi
e8b05380 14732fi
3e19841a 14733if test -z "$ac_cv_path_LD_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
14734 # Extract the first word of "ld", so it can be a program name with args.
14735set dummy ld; ac_word=$2
5213506e
RW
14736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14737$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14738if ${ac_cv_path_LD_FOR_TARGET+:} false; then :
5213506e 14739 $as_echo_n "(cached) " >&6
4de997d1 14740else
1c710c3c
DJ
14741 case $LD_FOR_TARGET in
14742 [\\/]* | ?:[\\/]*)
e8b05380
PB
14743 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
14744 ;;
e8b05380 14745 *)
1c710c3c
DJ
14746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14747for as_dir in $gcc_cv_tool_dirs
14748do
14749 IFS=$as_save_IFS
14750 test -z "$as_dir" && as_dir=.
5213506e 14751 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14753 ac_cv_path_LD_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 14754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14755 break 2
14756 fi
14757done
5213506e
RW
14758 done
14759IFS=$as_save_IFS
1c710c3c 14760
e8b05380
PB
14761 ;;
14762esac
4de997d1 14763fi
1c710c3c 14764LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
e8b05380 14765if test -n "$LD_FOR_TARGET"; then
5213506e
RW
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_FOR_TARGET" >&5
14767$as_echo "$LD_FOR_TARGET" >&6; }
4de997d1 14768else
5213506e
RW
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14770$as_echo "no" >&6; }
4de997d1 14771fi
2693c0b0 14772
5213506e 14773
e8b05380
PB
14774fi
14775if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
278a7a38
AO
14776
14777
14778if test -n "$LD_FOR_TARGET"; then
14779 ac_cv_prog_LD_FOR_TARGET=$LD_FOR_TARGET
14780elif test -n "$ac_cv_prog_LD_FOR_TARGET"; then
14781 LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
14782fi
14783
14784if test -n "$ac_cv_prog_LD_FOR_TARGET"; then
14785 for ncn_progname in ld; do
14786 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
14787set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14789$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14790if ${ac_cv_prog_LD_FOR_TARGET+:} false; then :
5213506e 14791 $as_echo_n "(cached) " >&6
278a7a38
AO
14792else
14793 if test -n "$LD_FOR_TARGET"; then
14794 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
14795else
14796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14797for as_dir in $PATH
14798do
14799 IFS=$as_save_IFS
14800 test -z "$as_dir" && as_dir=.
5213506e 14801 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 14803 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5213506e 14804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
14805 break 2
14806 fi
14807done
5213506e
RW
14808 done
14809IFS=$as_save_IFS
278a7a38
AO
14810
14811fi
14812fi
14813LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
14814if test -n "$LD_FOR_TARGET"; then
5213506e
RW
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_FOR_TARGET" >&5
14816$as_echo "$LD_FOR_TARGET" >&6; }
278a7a38 14817else
5213506e
RW
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14819$as_echo "no" >&6; }
278a7a38
AO
14820fi
14821
5213506e 14822
278a7a38
AO
14823 done
14824fi
14825
14826if test -z "$ac_cv_prog_LD_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 14827 for ncn_progname in ld; do
5213506e
RW
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
14829$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14830 if test -x $with_build_time_tools/${ncn_progname}; then
14831 ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14833$as_echo "yes" >&6; }
e8b05380
PB
14834 break
14835 else
5213506e
RW
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14837$as_echo "no" >&6; }
e8b05380
PB
14838 fi
14839 done
ca9f4b81
AO
14840fi
14841
e8b05380
PB
14842if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
14843 for ncn_progname in ld; do
14844 if test -n "$ncn_target_tool_prefix"; then
14845 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 14846set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14848$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14849if ${ac_cv_prog_LD_FOR_TARGET+:} false; then :
5213506e 14850 $as_echo_n "(cached) " >&6
ca9f4b81 14851else
4de997d1
PB
14852 if test -n "$LD_FOR_TARGET"; then
14853 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 14854else
1c710c3c
DJ
14855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14856for as_dir in $PATH
14857do
14858 IFS=$as_save_IFS
14859 test -z "$as_dir" && as_dir=.
5213506e 14860 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14862 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 14863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14864 break 2
14865 fi
14866done
5213506e
RW
14867 done
14868IFS=$as_save_IFS
1c710c3c 14869
ca9f4b81
AO
14870fi
14871fi
1c710c3c 14872LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
4de997d1 14873if test -n "$LD_FOR_TARGET"; then
5213506e
RW
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_FOR_TARGET" >&5
14875$as_echo "$LD_FOR_TARGET" >&6; }
ca9f4b81 14876else
5213506e
RW
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14878$as_echo "no" >&6; }
ca9f4b81
AO
14879fi
14880
5213506e 14881
e8b05380
PB
14882 fi
14883 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
14884 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 14885set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14887$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14888if ${ac_cv_prog_LD_FOR_TARGET+:} false; then :
5213506e 14889 $as_echo_n "(cached) " >&6
ca9f4b81 14890else
2693c0b0
PB
14891 if test -n "$LD_FOR_TARGET"; then
14892 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 14893else
1c710c3c
DJ
14894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14895for as_dir in $PATH
14896do
14897 IFS=$as_save_IFS
14898 test -z "$as_dir" && as_dir=.
5213506e 14899 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 14901 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5213506e 14902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
14903 break 2
14904 fi
14905done
5213506e
RW
14906 done
14907IFS=$as_save_IFS
1c710c3c 14908
ca9f4b81
AO
14909fi
14910fi
1c710c3c 14911LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
2693c0b0 14912if test -n "$LD_FOR_TARGET"; then
5213506e
RW
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_FOR_TARGET" >&5
14914$as_echo "$LD_FOR_TARGET" >&6; }
ca9f4b81 14915else
5213506e
RW
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917$as_echo "no" >&6; }
ca9f4b81 14918fi
1c710c3c 14919
5213506e 14920
e8b05380
PB
14921 fi
14922 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
14923 done
14924fi
1c710c3c 14925
2693c0b0
PB
14926if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
14927 set dummy ld
14928 if test $build = $target ; then
14929 LD_FOR_TARGET="$2"
ca9f4b81 14930 else
2693c0b0 14931 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 14932 fi
1c00b503
PB
14933else
14934 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
ca9f4b81
AO
14935fi
14936
d1f8db0c
PB
14937else
14938 LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
e8b05380
PB
14939fi
14940
14941
14942
14943
14944if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
14945 if test -n "$with_build_time_tools"; then
5213506e
RW
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lipo in $with_build_time_tools" >&5
14947$as_echo_n "checking for lipo in $with_build_time_tools... " >&6; }
d1f8db0c
PB
14948 if test -x $with_build_time_tools/lipo; then
14949 LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
14950 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5213506e
RW
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_LIPO_FOR_TARGET" >&5
14952$as_echo "$ac_cv_path_LIPO_FOR_TARGET" >&6; }
d1f8db0c 14953 else
5213506e
RW
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14955$as_echo "no" >&6; }
d1f8db0c 14956 fi
e8b05380
PB
14957 elif test $build != $host && test $have_gcc_for_target = yes; then
14958 LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
1c00b503
PB
14959 test $LIPO_FOR_TARGET = lipo && LIPO_FOR_TARGET=
14960 test -n "$LIPO_FOR_TARGET" && ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
e8b05380
PB
14961 fi
14962fi
278a7a38
AO
14963if test -z "$ac_cv_path_LIPO_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
14964 # Extract the first word of "lipo", so it can be a program name with args.
14965set dummy lipo; ac_word=$2
5213506e
RW
14966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14967$as_echo_n "checking for $ac_word... " >&6; }
22e05272 14968if ${ac_cv_path_LIPO_FOR_TARGET+:} false; then :
5213506e 14969 $as_echo_n "(cached) " >&6
278a7a38
AO
14970else
14971 case $LIPO_FOR_TARGET in
14972 [\\/]* | ?:[\\/]*)
14973 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
14974 ;;
14975 *)
14976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14977for as_dir in $gcc_cv_tool_dirs
14978do
14979 IFS=$as_save_IFS
14980 test -z "$as_dir" && as_dir=.
5213506e 14981 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 14982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 14983 ac_cv_path_LIPO_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 14984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
14985 break 2
14986 fi
14987done
5213506e
RW
14988 done
14989IFS=$as_save_IFS
278a7a38
AO
14990
14991 ;;
14992esac
14993fi
14994LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
278a7a38 14995if test -n "$LIPO_FOR_TARGET"; then
5213506e
RW
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO_FOR_TARGET" >&5
14997$as_echo "$LIPO_FOR_TARGET" >&6; }
278a7a38 14998else
5213506e
RW
14999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15000$as_echo "no" >&6; }
278a7a38
AO
15001fi
15002
5213506e 15003
278a7a38
AO
15004fi
15005if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
15006
15007
15008if test -n "$LIPO_FOR_TARGET"; then
15009 ac_cv_prog_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
15010elif test -n "$ac_cv_prog_LIPO_FOR_TARGET"; then
15011 LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
15012fi
15013
15014if test -n "$ac_cv_prog_LIPO_FOR_TARGET"; then
15015 for ncn_progname in lipo; do
15016 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15017set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15019$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15020if ${ac_cv_prog_LIPO_FOR_TARGET+:} false; then :
5213506e 15021 $as_echo_n "(cached) " >&6
e8b05380 15022else
278a7a38
AO
15023 if test -n "$LIPO_FOR_TARGET"; then
15024 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
15025else
15026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15027for as_dir in $PATH
1c710c3c
DJ
15028do
15029 IFS=$as_save_IFS
15030 test -z "$as_dir" && as_dir=.
5213506e 15031 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 15033 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5213506e 15034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15035 break 2
15036 fi
15037done
5213506e
RW
15038 done
15039IFS=$as_save_IFS
1c710c3c 15040
e8b05380 15041fi
278a7a38
AO
15042fi
15043LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
e8b05380 15044if test -n "$LIPO_FOR_TARGET"; then
5213506e
RW
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO_FOR_TARGET" >&5
15046$as_echo "$LIPO_FOR_TARGET" >&6; }
e8b05380 15047else
5213506e
RW
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
e8b05380
PB
15050fi
15051
5213506e 15052
278a7a38 15053 done
e8b05380 15054fi
278a7a38
AO
15055
15056if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 15057 for ncn_progname in lipo; do
5213506e
RW
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
15059$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
15060 if test -x $with_build_time_tools/${ncn_progname}; then
15061 ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15063$as_echo "yes" >&6; }
e8b05380
PB
15064 break
15065 else
5213506e
RW
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15067$as_echo "no" >&6; }
e8b05380
PB
15068 fi
15069 done
15070fi
15071
15072if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
15073 for ncn_progname in lipo; do
15074 if test -n "$ncn_target_tool_prefix"; then
15075 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 15076set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
15077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15078$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15079if ${ac_cv_prog_LIPO_FOR_TARGET+:} false; then :
5213506e 15080 $as_echo_n "(cached) " >&6
040b1c5a
GK
15081else
15082 if test -n "$LIPO_FOR_TARGET"; then
15083 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
15084else
1c710c3c
DJ
15085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15086for as_dir in $PATH
15087do
15088 IFS=$as_save_IFS
15089 test -z "$as_dir" && as_dir=.
5213506e 15090 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15092 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 15093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15094 break 2
15095 fi
15096done
5213506e
RW
15097 done
15098IFS=$as_save_IFS
1c710c3c 15099
040b1c5a
GK
15100fi
15101fi
1c710c3c 15102LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
040b1c5a 15103if test -n "$LIPO_FOR_TARGET"; then
5213506e
RW
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO_FOR_TARGET" >&5
15105$as_echo "$LIPO_FOR_TARGET" >&6; }
040b1c5a 15106else
5213506e
RW
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15108$as_echo "no" >&6; }
040b1c5a
GK
15109fi
15110
5213506e 15111
e8b05380
PB
15112 fi
15113 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
15114 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
040b1c5a 15115set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15117$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15118if ${ac_cv_prog_LIPO_FOR_TARGET+:} false; then :
5213506e 15119 $as_echo_n "(cached) " >&6
040b1c5a
GK
15120else
15121 if test -n "$LIPO_FOR_TARGET"; then
72a7ab82
AP
15122 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
15123else
1c710c3c
DJ
15124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15125for as_dir in $PATH
15126do
15127 IFS=$as_save_IFS
15128 test -z "$as_dir" && as_dir=.
5213506e 15129 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15131 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5213506e 15132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15133 break 2
15134 fi
15135done
5213506e
RW
15136 done
15137IFS=$as_save_IFS
1c710c3c 15138
040b1c5a
GK
15139fi
15140fi
1c710c3c 15141LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
040b1c5a 15142if test -n "$LIPO_FOR_TARGET"; then
5213506e
RW
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO_FOR_TARGET" >&5
15144$as_echo "$LIPO_FOR_TARGET" >&6; }
040b1c5a 15145else
5213506e
RW
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15147$as_echo "no" >&6; }
040b1c5a 15148fi
1c710c3c 15149
5213506e 15150
e8b05380
PB
15151 fi
15152 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
15153 done
15154fi
1c710c3c 15155
040b1c5a
GK
15156if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
15157 set dummy lipo
15158 if test $build = $target ; then
15159 LIPO_FOR_TARGET="$2"
15160 else
15161 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
15162 fi
1c00b503
PB
15163else
15164 LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a
GK
15165fi
15166
d1f8db0c
PB
15167else
15168 LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
e8b05380
PB
15169fi
15170
15171
15172
15173
15174if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
15175 if test -n "$with_build_time_tools"; then
5213506e
RW
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nm in $with_build_time_tools" >&5
15177$as_echo_n "checking for nm in $with_build_time_tools... " >&6; }
d1f8db0c
PB
15178 if test -x $with_build_time_tools/nm; then
15179 NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
15180 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5213506e
RW
15181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_NM_FOR_TARGET" >&5
15182$as_echo "$ac_cv_path_NM_FOR_TARGET" >&6; }
d1f8db0c 15183 else
5213506e
RW
15184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
d1f8db0c 15186 fi
e8b05380
PB
15187 elif test $build != $host && test $have_gcc_for_target = yes; then
15188 NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
1c00b503
PB
15189 test $NM_FOR_TARGET = nm && NM_FOR_TARGET=
15190 test -n "$NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
e8b05380
PB
15191 fi
15192fi
3e19841a 15193if test -z "$ac_cv_path_NM_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
15194 # Extract the first word of "nm", so it can be a program name with args.
15195set dummy nm; ac_word=$2
5213506e
RW
15196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15197$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15198if ${ac_cv_path_NM_FOR_TARGET+:} false; then :
5213506e 15199 $as_echo_n "(cached) " >&6
e8b05380 15200else
1c710c3c
DJ
15201 case $NM_FOR_TARGET in
15202 [\\/]* | ?:[\\/]*)
e8b05380
PB
15203 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
15204 ;;
e8b05380 15205 *)
1c710c3c
DJ
15206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15207for as_dir in $gcc_cv_tool_dirs
15208do
15209 IFS=$as_save_IFS
15210 test -z "$as_dir" && as_dir=.
5213506e 15211 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15212 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15213 ac_cv_path_NM_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 15214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15215 break 2
15216 fi
15217done
5213506e
RW
15218 done
15219IFS=$as_save_IFS
1c710c3c 15220
e8b05380
PB
15221 ;;
15222esac
15223fi
1c710c3c 15224NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
e8b05380 15225if test -n "$NM_FOR_TARGET"; then
5213506e
RW
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM_FOR_TARGET" >&5
15227$as_echo "$NM_FOR_TARGET" >&6; }
e8b05380 15228else
5213506e
RW
15229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15230$as_echo "no" >&6; }
e8b05380
PB
15231fi
15232
5213506e 15233
e8b05380
PB
15234fi
15235if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
278a7a38
AO
15236
15237
15238if test -n "$NM_FOR_TARGET"; then
15239 ac_cv_prog_NM_FOR_TARGET=$NM_FOR_TARGET
15240elif test -n "$ac_cv_prog_NM_FOR_TARGET"; then
15241 NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
15242fi
15243
15244if test -n "$ac_cv_prog_NM_FOR_TARGET"; then
15245 for ncn_progname in nm; do
15246 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15247set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15249$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15250if ${ac_cv_prog_NM_FOR_TARGET+:} false; then :
5213506e 15251 $as_echo_n "(cached) " >&6
278a7a38
AO
15252else
15253 if test -n "$NM_FOR_TARGET"; then
15254 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
15255else
15256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15257for as_dir in $PATH
15258do
15259 IFS=$as_save_IFS
15260 test -z "$as_dir" && as_dir=.
5213506e 15261 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 15263 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
5213506e 15264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
15265 break 2
15266 fi
15267done
5213506e
RW
15268 done
15269IFS=$as_save_IFS
278a7a38
AO
15270
15271fi
15272fi
15273NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
15274if test -n "$NM_FOR_TARGET"; then
5213506e
RW
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM_FOR_TARGET" >&5
15276$as_echo "$NM_FOR_TARGET" >&6; }
278a7a38 15277else
5213506e
RW
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15279$as_echo "no" >&6; }
278a7a38
AO
15280fi
15281
5213506e 15282
278a7a38
AO
15283 done
15284fi
15285
15286if test -z "$ac_cv_prog_NM_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 15287 for ncn_progname in nm; do
5213506e
RW
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
15289$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
15290 if test -x $with_build_time_tools/${ncn_progname}; then
15291 ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15293$as_echo "yes" >&6; }
e8b05380
PB
15294 break
15295 else
5213506e
RW
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15297$as_echo "no" >&6; }
e8b05380
PB
15298 fi
15299 done
15300fi
15301
15302if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
15303 for ncn_progname in nm; do
15304 if test -n "$ncn_target_tool_prefix"; then
15305 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
040b1c5a 15306set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
15307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15308$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15309if ${ac_cv_prog_NM_FOR_TARGET+:} false; then :
5213506e 15310 $as_echo_n "(cached) " >&6
ca9f4b81 15311else
4de997d1
PB
15312 if test -n "$NM_FOR_TARGET"; then
15313 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 15314else
1c710c3c
DJ
15315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15316for as_dir in $PATH
15317do
15318 IFS=$as_save_IFS
15319 test -z "$as_dir" && as_dir=.
5213506e 15320 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15322 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 15323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15324 break 2
15325 fi
15326done
5213506e
RW
15327 done
15328IFS=$as_save_IFS
1c710c3c 15329
ca9f4b81
AO
15330fi
15331fi
1c710c3c 15332NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
4de997d1 15333if test -n "$NM_FOR_TARGET"; then
5213506e
RW
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM_FOR_TARGET" >&5
15335$as_echo "$NM_FOR_TARGET" >&6; }
ca9f4b81 15336else
5213506e
RW
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15338$as_echo "no" >&6; }
ca9f4b81
AO
15339fi
15340
5213506e 15341
e8b05380
PB
15342 fi
15343 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
15344 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 15345set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15347$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15348if ${ac_cv_prog_NM_FOR_TARGET+:} false; then :
5213506e 15349 $as_echo_n "(cached) " >&6
ca9f4b81 15350else
2693c0b0
PB
15351 if test -n "$NM_FOR_TARGET"; then
15352 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 15353else
1c710c3c
DJ
15354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15355for as_dir in $PATH
15356do
15357 IFS=$as_save_IFS
15358 test -z "$as_dir" && as_dir=.
5213506e 15359 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15360 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15361 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
5213506e 15362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15363 break 2
15364 fi
15365done
5213506e
RW
15366 done
15367IFS=$as_save_IFS
1c710c3c 15368
ca9f4b81
AO
15369fi
15370fi
1c710c3c 15371NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
2693c0b0 15372if test -n "$NM_FOR_TARGET"; then
5213506e
RW
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM_FOR_TARGET" >&5
15374$as_echo "$NM_FOR_TARGET" >&6; }
ca9f4b81 15375else
5213506e
RW
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15377$as_echo "no" >&6; }
ca9f4b81 15378fi
1c710c3c 15379
5213506e 15380
e8b05380
PB
15381 fi
15382 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
15383 done
15384fi
1c710c3c 15385
2693c0b0
PB
15386if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
15387 set dummy nm
15388 if test $build = $target ; then
15389 NM_FOR_TARGET="$2"
ca9f4b81 15390 else
2693c0b0 15391 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 15392 fi
1c00b503
PB
15393else
15394 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
ca9f4b81
AO
15395fi
15396
d1f8db0c
PB
15397else
15398 NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
e8b05380
PB
15399fi
15400
15401
15402
15403
9bccfdf5
AP
15404if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" ; then
15405 if test -n "$with_build_time_tools"; then
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objcopy in $with_build_time_tools" >&5
15407$as_echo_n "checking for objcopy in $with_build_time_tools... " >&6; }
15408 if test -x $with_build_time_tools/objcopy; then
15409 OBJCOPY_FOR_TARGET=`cd $with_build_time_tools && pwd`/objcopy
15410 ac_cv_path_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_OBJCOPY_FOR_TARGET" >&5
15412$as_echo "$ac_cv_path_OBJCOPY_FOR_TARGET" >&6; }
15413 else
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15415$as_echo "no" >&6; }
15416 fi
15417 elif test $build != $host && test $have_gcc_for_target = yes; then
15418 OBJCOPY_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objcopy`
15419 test $OBJCOPY_FOR_TARGET = objcopy && OBJCOPY_FOR_TARGET=
15420 test -n "$OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
15421 fi
15422fi
15423if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
15424 # Extract the first word of "objcopy", so it can be a program name with args.
15425set dummy objcopy; ac_word=$2
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15427$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15428if ${ac_cv_path_OBJCOPY_FOR_TARGET+:} false; then :
9bccfdf5
AP
15429 $as_echo_n "(cached) " >&6
15430else
15431 case $OBJCOPY_FOR_TARGET in
15432 [\\/]* | ?:[\\/]*)
15433 ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
15434 ;;
15435 *)
15436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15437for as_dir in $gcc_cv_tool_dirs
15438do
15439 IFS=$as_save_IFS
15440 test -z "$as_dir" && as_dir=.
15441 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15442 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9bccfdf5
AP
15443 ac_cv_path_OBJCOPY_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
15444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15445 break 2
15446 fi
15447done
15448 done
15449IFS=$as_save_IFS
15450
15451 ;;
15452esac
15453fi
15454OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
15455if test -n "$OBJCOPY_FOR_TARGET"; then
15456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
15457$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
15458else
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15460$as_echo "no" >&6; }
15461fi
15462
15463
15464fi
15465if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" ; then
15466
15467
15468if test -n "$OBJCOPY_FOR_TARGET"; then
15469 ac_cv_prog_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
15470elif test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
15471 OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
15472fi
15473
15474if test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
15475 for ncn_progname in objcopy; do
15476 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15477set dummy ${ncn_progname}; ac_word=$2
15478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15479$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15480if ${ac_cv_prog_OBJCOPY_FOR_TARGET+:} false; then :
9bccfdf5
AP
15481 $as_echo_n "(cached) " >&6
15482else
15483 if test -n "$OBJCOPY_FOR_TARGET"; then
15484 ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
15485else
15486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15487for as_dir in $PATH
15488do
15489 IFS=$as_save_IFS
15490 test -z "$as_dir" && as_dir=.
15491 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9bccfdf5
AP
15493 ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_progname}"
15494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15495 break 2
15496 fi
15497done
15498 done
15499IFS=$as_save_IFS
15500
15501fi
15502fi
15503OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
15504if test -n "$OBJCOPY_FOR_TARGET"; then
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
15506$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
15507else
15508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15509$as_echo "no" >&6; }
15510fi
15511
15512
15513 done
15514fi
15515
15516if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" && test -n "$with_build_time_tools"; then
15517 for ncn_progname in objcopy; do
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
15519$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
15520 if test -x $with_build_time_tools/${ncn_progname}; then
15521 ac_cv_prog_OBJCOPY_FOR_TARGET=$with_build_time_tools/${ncn_progname}
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15523$as_echo "yes" >&6; }
15524 break
15525 else
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15527$as_echo "no" >&6; }
15528 fi
15529 done
15530fi
15531
15532if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
15533 for ncn_progname in objcopy; do
15534 if test -n "$ncn_target_tool_prefix"; then
15535 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
15536set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
15537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15538$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15539if ${ac_cv_prog_OBJCOPY_FOR_TARGET+:} false; then :
9bccfdf5
AP
15540 $as_echo_n "(cached) " >&6
15541else
15542 if test -n "$OBJCOPY_FOR_TARGET"; then
15543 ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
15544else
15545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15546for as_dir in $PATH
15547do
15548 IFS=$as_save_IFS
15549 test -z "$as_dir" && as_dir=.
15550 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9bccfdf5
AP
15552 ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
15553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15554 break 2
15555 fi
15556done
15557 done
15558IFS=$as_save_IFS
15559
15560fi
15561fi
15562OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
15563if test -n "$OBJCOPY_FOR_TARGET"; then
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
15565$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
15566else
15567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15568$as_echo "no" >&6; }
15569fi
15570
15571
15572 fi
15573 if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" && test $build = $target ; then
15574 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15575set dummy ${ncn_progname}; ac_word=$2
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15577$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15578if ${ac_cv_prog_OBJCOPY_FOR_TARGET+:} false; then :
9bccfdf5
AP
15579 $as_echo_n "(cached) " >&6
15580else
15581 if test -n "$OBJCOPY_FOR_TARGET"; then
15582 ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
15583else
15584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15585for as_dir in $PATH
15586do
15587 IFS=$as_save_IFS
15588 test -z "$as_dir" && as_dir=.
15589 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9bccfdf5
AP
15591 ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_progname}"
15592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15593 break 2
15594 fi
15595done
15596 done
15597IFS=$as_save_IFS
15598
15599fi
15600fi
15601OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
15602if test -n "$OBJCOPY_FOR_TARGET"; then
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
15604$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
15605else
15606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15607$as_echo "no" >&6; }
15608fi
15609
15610
15611 fi
15612 test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET" && break
15613 done
15614fi
15615
15616if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" ; then
15617 set dummy objcopy
15618 if test $build = $target ; then
15619 OBJCOPY_FOR_TARGET="$2"
15620 else
15621 OBJCOPY_FOR_TARGET="${ncn_target_tool_prefix}$2"
15622 fi
15623else
15624 OBJCOPY_FOR_TARGET="$ac_cv_prog_OBJCOPY_FOR_TARGET"
15625fi
15626
15627else
15628 OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
15629fi
15630
15631
15632
15633
e8b05380
PB
15634if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
15635 if test -n "$with_build_time_tools"; then
5213506e
RW
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdump in $with_build_time_tools" >&5
15637$as_echo_n "checking for objdump in $with_build_time_tools... " >&6; }
d1f8db0c
PB
15638 if test -x $with_build_time_tools/objdump; then
15639 OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
15640 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
5213506e
RW
15641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_OBJDUMP_FOR_TARGET" >&5
15642$as_echo "$ac_cv_path_OBJDUMP_FOR_TARGET" >&6; }
d1f8db0c 15643 else
5213506e
RW
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15645$as_echo "no" >&6; }
d1f8db0c 15646 fi
e8b05380
PB
15647 elif test $build != $host && test $have_gcc_for_target = yes; then
15648 OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
1c00b503
PB
15649 test $OBJDUMP_FOR_TARGET = objdump && OBJDUMP_FOR_TARGET=
15650 test -n "$OBJDUMP_FOR_TARGET" && ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
e8b05380
PB
15651 fi
15652fi
3e19841a 15653if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
15654 # Extract the first word of "objdump", so it can be a program name with args.
15655set dummy objdump; ac_word=$2
5213506e
RW
15656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15657$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15658if ${ac_cv_path_OBJDUMP_FOR_TARGET+:} false; then :
5213506e 15659 $as_echo_n "(cached) " >&6
e8b05380 15660else
1c710c3c
DJ
15661 case $OBJDUMP_FOR_TARGET in
15662 [\\/]* | ?:[\\/]*)
e8b05380
PB
15663 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
15664 ;;
e8b05380 15665 *)
1c710c3c
DJ
15666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15667for as_dir in $gcc_cv_tool_dirs
15668do
15669 IFS=$as_save_IFS
15670 test -z "$as_dir" && as_dir=.
5213506e 15671 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15673 ac_cv_path_OBJDUMP_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 15674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15675 break 2
15676 fi
15677done
5213506e
RW
15678 done
15679IFS=$as_save_IFS
1c710c3c 15680
e8b05380
PB
15681 ;;
15682esac
15683fi
1c710c3c 15684OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
e8b05380 15685if test -n "$OBJDUMP_FOR_TARGET"; then
5213506e
RW
15686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP_FOR_TARGET" >&5
15687$as_echo "$OBJDUMP_FOR_TARGET" >&6; }
e8b05380 15688else
5213506e
RW
15689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15690$as_echo "no" >&6; }
e8b05380
PB
15691fi
15692
5213506e 15693
e8b05380
PB
15694fi
15695if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
278a7a38
AO
15696
15697
15698if test -n "$OBJDUMP_FOR_TARGET"; then
15699 ac_cv_prog_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
15700elif test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
15701 OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
15702fi
15703
15704if test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
15705 for ncn_progname in objdump; do
15706 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15707set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15709$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15710if ${ac_cv_prog_OBJDUMP_FOR_TARGET+:} false; then :
5213506e 15711 $as_echo_n "(cached) " >&6
278a7a38
AO
15712else
15713 if test -n "$OBJDUMP_FOR_TARGET"; then
15714 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
15715else
15716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15717for as_dir in $PATH
15718do
15719 IFS=$as_save_IFS
15720 test -z "$as_dir" && as_dir=.
5213506e 15721 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 15723 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
5213506e 15724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
15725 break 2
15726 fi
15727done
5213506e
RW
15728 done
15729IFS=$as_save_IFS
278a7a38
AO
15730
15731fi
15732fi
15733OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
15734if test -n "$OBJDUMP_FOR_TARGET"; then
5213506e
RW
15735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP_FOR_TARGET" >&5
15736$as_echo "$OBJDUMP_FOR_TARGET" >&6; }
278a7a38 15737else
5213506e
RW
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15739$as_echo "no" >&6; }
278a7a38
AO
15740fi
15741
5213506e 15742
278a7a38
AO
15743 done
15744fi
15745
15746if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 15747 for ncn_progname in objdump; do
5213506e
RW
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
15749$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
15750 if test -x $with_build_time_tools/${ncn_progname}; then
15751 ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15753$as_echo "yes" >&6; }
e8b05380
PB
15754 break
15755 else
5213506e
RW
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15757$as_echo "no" >&6; }
e8b05380
PB
15758 fi
15759 done
15760fi
15761
15762if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
15763 for ncn_progname in objdump; do
15764 if test -n "$ncn_target_tool_prefix"; then
15765 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 15766set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
15767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15768$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15769if ${ac_cv_prog_OBJDUMP_FOR_TARGET+:} false; then :
5213506e 15770 $as_echo_n "(cached) " >&6
d739199a
DJ
15771else
15772 if test -n "$OBJDUMP_FOR_TARGET"; then
15773 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
15774else
1c710c3c
DJ
15775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15776for as_dir in $PATH
15777do
15778 IFS=$as_save_IFS
15779 test -z "$as_dir" && as_dir=.
5213506e 15780 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15782 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 15783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15784 break 2
15785 fi
15786done
5213506e
RW
15787 done
15788IFS=$as_save_IFS
1c710c3c 15789
d739199a
DJ
15790fi
15791fi
1c710c3c 15792OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
d739199a 15793if test -n "$OBJDUMP_FOR_TARGET"; then
5213506e
RW
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP_FOR_TARGET" >&5
15795$as_echo "$OBJDUMP_FOR_TARGET" >&6; }
d739199a 15796else
5213506e
RW
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15798$as_echo "no" >&6; }
d739199a
DJ
15799fi
15800
5213506e 15801
e8b05380
PB
15802 fi
15803 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
15804 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
d739199a 15805set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
15806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15807$as_echo_n "checking for $ac_word... " >&6; }
22e05272 15808if ${ac_cv_prog_OBJDUMP_FOR_TARGET+:} false; then :
5213506e 15809 $as_echo_n "(cached) " >&6
d739199a
DJ
15810else
15811 if test -n "$OBJDUMP_FOR_TARGET"; then
15812 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
15813else
1c710c3c
DJ
15814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15815for as_dir in $PATH
15816do
15817 IFS=$as_save_IFS
15818 test -z "$as_dir" && as_dir=.
5213506e 15819 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 15820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 15821 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
5213506e 15822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
15823 break 2
15824 fi
15825done
5213506e
RW
15826 done
15827IFS=$as_save_IFS
1c710c3c 15828
d739199a
DJ
15829fi
15830fi
1c710c3c 15831OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
d739199a 15832if test -n "$OBJDUMP_FOR_TARGET"; then
5213506e
RW
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP_FOR_TARGET" >&5
15834$as_echo "$OBJDUMP_FOR_TARGET" >&6; }
d739199a 15835else
5213506e
RW
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15837$as_echo "no" >&6; }
d739199a 15838fi
1c710c3c 15839
5213506e 15840
e8b05380
PB
15841 fi
15842 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
15843 done
15844fi
1c710c3c 15845
d739199a
DJ
15846if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
15847 set dummy objdump
15848 if test $build = $target ; then
15849 OBJDUMP_FOR_TARGET="$2"
15850 else
15851 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
15852 fi
1c00b503
PB
15853else
15854 OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
d739199a
DJ
15855fi
15856
d1f8db0c
PB
15857else
15858 OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
e8b05380
PB
15859fi
15860
15861
15862
15863
e4a9a572
IS
15864if test -z "$ac_cv_path_OTOOL_FOR_TARGET" ; then
15865 if test -n "$with_build_time_tools"; then
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for otool in $with_build_time_tools" >&5
15867$as_echo_n "checking for otool in $with_build_time_tools... " >&6; }
15868 if test -x $with_build_time_tools/otool; then
15869 OTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/otool
15870 ac_cv_path_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_OTOOL_FOR_TARGET" >&5
15872$as_echo "$ac_cv_path_OTOOL_FOR_TARGET" >&6; }
15873 else
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15875$as_echo "no" >&6; }
15876 fi
15877 elif test $build != $host && test $have_gcc_for_target = yes; then
15878 OTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=otool`
15879 test $OTOOL_FOR_TARGET = otool && OTOOL_FOR_TARGET=
15880 test -n "$OTOOL_FOR_TARGET" && ac_cv_path_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
15881 fi
15882fi
15883if test -z "$ac_cv_path_OTOOL_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
15884 # Extract the first word of "otool", so it can be a program name with args.
15885set dummy otool; ac_word=$2
15886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15887$as_echo_n "checking for $ac_word... " >&6; }
15888if ${ac_cv_path_OTOOL_FOR_TARGET+:} false; then :
15889 $as_echo_n "(cached) " >&6
15890else
15891 case $OTOOL_FOR_TARGET in
15892 [\\/]* | ?:[\\/]*)
15893 ac_cv_path_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # Let the user override the test with a path.
15894 ;;
15895 *)
15896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15897for as_dir in $gcc_cv_tool_dirs
15898do
15899 IFS=$as_save_IFS
15900 test -z "$as_dir" && as_dir=.
15901 for ac_exec_ext in '' $ac_executable_extensions; do
15902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15903 ac_cv_path_OTOOL_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
15904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15905 break 2
15906 fi
15907done
15908 done
15909IFS=$as_save_IFS
15910
15911 ;;
15912esac
15913fi
15914OTOOL_FOR_TARGET=$ac_cv_path_OTOOL_FOR_TARGET
15915if test -n "$OTOOL_FOR_TARGET"; then
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
15917$as_echo "$OTOOL_FOR_TARGET" >&6; }
15918else
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15920$as_echo "no" >&6; }
15921fi
15922
15923
15924fi
15925if test -z "$ac_cv_path_OTOOL_FOR_TARGET" ; then
15926
15927
15928if test -n "$OTOOL_FOR_TARGET"; then
15929 ac_cv_prog_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
15930elif test -n "$ac_cv_prog_OTOOL_FOR_TARGET"; then
15931 OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
15932fi
15933
15934if test -n "$ac_cv_prog_OTOOL_FOR_TARGET"; then
15935 for ncn_progname in otool; do
15936 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
15937set dummy ${ncn_progname}; ac_word=$2
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15939$as_echo_n "checking for $ac_word... " >&6; }
15940if ${ac_cv_prog_OTOOL_FOR_TARGET+:} false; then :
15941 $as_echo_n "(cached) " >&6
15942else
15943 if test -n "$OTOOL_FOR_TARGET"; then
15944 ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # Let the user override the test.
15945else
15946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15947for as_dir in $PATH
15948do
15949 IFS=$as_save_IFS
15950 test -z "$as_dir" && as_dir=.
15951 for ac_exec_ext in '' $ac_executable_extensions; do
15952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15953 ac_cv_prog_OTOOL_FOR_TARGET="${ncn_progname}"
15954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15955 break 2
15956 fi
15957done
15958 done
15959IFS=$as_save_IFS
15960
15961fi
15962fi
15963OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
15964if test -n "$OTOOL_FOR_TARGET"; then
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
15966$as_echo "$OTOOL_FOR_TARGET" >&6; }
15967else
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15969$as_echo "no" >&6; }
15970fi
15971
15972
15973 done
15974fi
15975
15976if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" && test -n "$with_build_time_tools"; then
15977 for ncn_progname in otool; do
15978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
15979$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
15980 if test -x $with_build_time_tools/${ncn_progname}; then
15981 ac_cv_prog_OTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15983$as_echo "yes" >&6; }
15984 break
15985 else
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15987$as_echo "no" >&6; }
15988 fi
15989 done
15990fi
15991
15992if test -z "$ac_cv_prog_OTOOL_FOR_TARGET"; then
15993 for ncn_progname in otool; do
15994 if test -n "$ncn_target_tool_prefix"; then
15995 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
15996set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
15997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15998$as_echo_n "checking for $ac_word... " >&6; }
15999if ${ac_cv_prog_OTOOL_FOR_TARGET+:} false; then :
16000 $as_echo_n "(cached) " >&6
16001else
16002 if test -n "$OTOOL_FOR_TARGET"; then
16003 ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # Let the user override the test.
16004else
16005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16006for as_dir in $PATH
16007do
16008 IFS=$as_save_IFS
16009 test -z "$as_dir" && as_dir=.
16010 for ac_exec_ext in '' $ac_executable_extensions; do
16011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16012 ac_cv_prog_OTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
16013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16014 break 2
16015 fi
16016done
16017 done
16018IFS=$as_save_IFS
16019
16020fi
16021fi
16022OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
16023if test -n "$OTOOL_FOR_TARGET"; then
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
16025$as_echo "$OTOOL_FOR_TARGET" >&6; }
16026else
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16028$as_echo "no" >&6; }
16029fi
16030
16031
16032 fi
16033 if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" && test $build = $target ; then
16034 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16035set dummy ${ncn_progname}; ac_word=$2
16036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16037$as_echo_n "checking for $ac_word... " >&6; }
16038if ${ac_cv_prog_OTOOL_FOR_TARGET+:} false; then :
16039 $as_echo_n "(cached) " >&6
16040else
16041 if test -n "$OTOOL_FOR_TARGET"; then
16042 ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # Let the user override the test.
16043else
16044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16045for as_dir in $PATH
16046do
16047 IFS=$as_save_IFS
16048 test -z "$as_dir" && as_dir=.
16049 for ac_exec_ext in '' $ac_executable_extensions; do
16050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16051 ac_cv_prog_OTOOL_FOR_TARGET="${ncn_progname}"
16052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16053 break 2
16054 fi
16055done
16056 done
16057IFS=$as_save_IFS
16058
16059fi
16060fi
16061OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
16062if test -n "$OTOOL_FOR_TARGET"; then
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
16064$as_echo "$OTOOL_FOR_TARGET" >&6; }
16065else
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16067$as_echo "no" >&6; }
16068fi
16069
16070
16071 fi
16072 test -n "$ac_cv_prog_OTOOL_FOR_TARGET" && break
16073 done
16074fi
16075
16076if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" ; then
16077 set dummy otool
16078 if test $build = $target ; then
16079 OTOOL_FOR_TARGET="$2"
16080 else
16081 OTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
16082 fi
16083else
16084 OTOOL_FOR_TARGET="$ac_cv_prog_OTOOL_FOR_TARGET"
16085fi
16086
16087else
16088 OTOOL_FOR_TARGET=$ac_cv_path_OTOOL_FOR_TARGET
16089fi
16090
16091
16092
16093
e8b05380
PB
16094if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
16095 if test -n "$with_build_time_tools"; then
5213506e
RW
16096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ranlib in $with_build_time_tools" >&5
16097$as_echo_n "checking for ranlib in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16098 if test -x $with_build_time_tools/ranlib; then
16099 RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
16100 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
5213506e
RW
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_RANLIB_FOR_TARGET" >&5
16102$as_echo "$ac_cv_path_RANLIB_FOR_TARGET" >&6; }
d1f8db0c 16103 else
5213506e
RW
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16105$as_echo "no" >&6; }
d1f8db0c 16106 fi
e8b05380
PB
16107 elif test $build != $host && test $have_gcc_for_target = yes; then
16108 RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
1c00b503
PB
16109 test $RANLIB_FOR_TARGET = ranlib && RANLIB_FOR_TARGET=
16110 test -n "$RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
e8b05380
PB
16111 fi
16112fi
3e19841a 16113if test -z "$ac_cv_path_RANLIB_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
16114 # Extract the first word of "ranlib", so it can be a program name with args.
16115set dummy ranlib; ac_word=$2
5213506e
RW
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16117$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16118if ${ac_cv_path_RANLIB_FOR_TARGET+:} false; then :
5213506e 16119 $as_echo_n "(cached) " >&6
e8b05380 16120else
1c710c3c
DJ
16121 case $RANLIB_FOR_TARGET in
16122 [\\/]* | ?:[\\/]*)
e8b05380
PB
16123 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
16124 ;;
e8b05380 16125 *)
1c710c3c
DJ
16126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16127for as_dir in $gcc_cv_tool_dirs
16128do
16129 IFS=$as_save_IFS
16130 test -z "$as_dir" && as_dir=.
5213506e 16131 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16133 ac_cv_path_RANLIB_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 16134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16135 break 2
16136 fi
16137done
5213506e
RW
16138 done
16139IFS=$as_save_IFS
1c710c3c 16140
e8b05380
PB
16141 ;;
16142esac
16143fi
1c710c3c 16144RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
e8b05380 16145if test -n "$RANLIB_FOR_TARGET"; then
5213506e
RW
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB_FOR_TARGET" >&5
16147$as_echo "$RANLIB_FOR_TARGET" >&6; }
e8b05380 16148else
5213506e
RW
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150$as_echo "no" >&6; }
e8b05380
PB
16151fi
16152
5213506e 16153
e8b05380
PB
16154fi
16155if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
278a7a38
AO
16156
16157
16158if test -n "$RANLIB_FOR_TARGET"; then
16159 ac_cv_prog_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
16160elif test -n "$ac_cv_prog_RANLIB_FOR_TARGET"; then
16161 RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
16162fi
16163
16164if test -n "$ac_cv_prog_RANLIB_FOR_TARGET"; then
16165 for ncn_progname in ranlib; do
16166 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16167set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16169$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16170if ${ac_cv_prog_RANLIB_FOR_TARGET+:} false; then :
5213506e 16171 $as_echo_n "(cached) " >&6
278a7a38
AO
16172else
16173 if test -n "$RANLIB_FOR_TARGET"; then
16174 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
16175else
16176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16177for as_dir in $PATH
16178do
16179 IFS=$as_save_IFS
16180 test -z "$as_dir" && as_dir=.
5213506e 16181 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16182 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 16183 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
5213506e 16184 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
16185 break 2
16186 fi
16187done
5213506e
RW
16188 done
16189IFS=$as_save_IFS
278a7a38
AO
16190
16191fi
16192fi
16193RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
16194if test -n "$RANLIB_FOR_TARGET"; then
5213506e
RW
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB_FOR_TARGET" >&5
16196$as_echo "$RANLIB_FOR_TARGET" >&6; }
278a7a38 16197else
5213506e
RW
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16199$as_echo "no" >&6; }
278a7a38
AO
16200fi
16201
5213506e 16202
278a7a38
AO
16203 done
16204fi
16205
16206if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 16207 for ncn_progname in ranlib; do
5213506e
RW
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
16209$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16210 if test -x $with_build_time_tools/${ncn_progname}; then
16211 ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16213$as_echo "yes" >&6; }
e8b05380
PB
16214 break
16215 else
5213506e
RW
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16217$as_echo "no" >&6; }
e8b05380
PB
16218 fi
16219 done
16220fi
16221
16222if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
16223 for ncn_progname in ranlib; do
16224 if test -n "$ncn_target_tool_prefix"; then
16225 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
d739199a 16226set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16228$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16229if ${ac_cv_prog_RANLIB_FOR_TARGET+:} false; then :
5213506e 16230 $as_echo_n "(cached) " >&6
ca9f4b81 16231else
4de997d1
PB
16232 if test -n "$RANLIB_FOR_TARGET"; then
16233 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 16234else
1c710c3c
DJ
16235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16236for as_dir in $PATH
16237do
16238 IFS=$as_save_IFS
16239 test -z "$as_dir" && as_dir=.
5213506e 16240 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16242 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 16243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16244 break 2
16245 fi
16246done
5213506e
RW
16247 done
16248IFS=$as_save_IFS
1c710c3c 16249
ca9f4b81
AO
16250fi
16251fi
1c710c3c 16252RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
4de997d1 16253if test -n "$RANLIB_FOR_TARGET"; then
5213506e
RW
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB_FOR_TARGET" >&5
16255$as_echo "$RANLIB_FOR_TARGET" >&6; }
ca9f4b81 16256else
5213506e
RW
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258$as_echo "no" >&6; }
ca9f4b81
AO
16259fi
16260
5213506e 16261
e8b05380
PB
16262 fi
16263 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
16264 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 16265set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16267$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16268if ${ac_cv_prog_RANLIB_FOR_TARGET+:} false; then :
5213506e 16269 $as_echo_n "(cached) " >&6
ca9f4b81 16270else
2693c0b0
PB
16271 if test -n "$RANLIB_FOR_TARGET"; then
16272 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 16273else
1c710c3c
DJ
16274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16275for as_dir in $PATH
16276do
16277 IFS=$as_save_IFS
16278 test -z "$as_dir" && as_dir=.
5213506e 16279 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16281 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
5213506e 16282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16283 break 2
16284 fi
16285done
5213506e
RW
16286 done
16287IFS=$as_save_IFS
1c710c3c 16288
ca9f4b81
AO
16289fi
16290fi
1c710c3c 16291RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
2693c0b0 16292if test -n "$RANLIB_FOR_TARGET"; then
5213506e
RW
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB_FOR_TARGET" >&5
16294$as_echo "$RANLIB_FOR_TARGET" >&6; }
ca9f4b81 16295else
5213506e
RW
16296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16297$as_echo "no" >&6; }
ca9f4b81 16298fi
1c710c3c 16299
5213506e 16300
e8b05380
PB
16301 fi
16302 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
16303 done
16304fi
1c710c3c 16305
e8b05380
PB
16306if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
16307 set dummy ranlib
16308 if test $build = $target ; then
16309 RANLIB_FOR_TARGET="$2"
16310 else
16311 RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 16312 fi
1c00b503
PB
16313else
16314 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
e8b05380 16315fi
2693c0b0 16316
d1f8db0c
PB
16317else
16318 RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
ca9f4b81
AO
16319fi
16320
e8b05380
PB
16321
16322
16323
e7a82751
RM
16324if test -z "$ac_cv_path_READELF_FOR_TARGET" ; then
16325 if test -n "$with_build_time_tools"; then
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readelf in $with_build_time_tools" >&5
16327$as_echo_n "checking for readelf in $with_build_time_tools... " >&6; }
16328 if test -x $with_build_time_tools/readelf; then
16329 READELF_FOR_TARGET=`cd $with_build_time_tools && pwd`/readelf
16330 ac_cv_path_READELF_FOR_TARGET=$READELF_FOR_TARGET
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_READELF_FOR_TARGET" >&5
16332$as_echo "$ac_cv_path_READELF_FOR_TARGET" >&6; }
16333 else
16334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16335$as_echo "no" >&6; }
16336 fi
16337 elif test $build != $host && test $have_gcc_for_target = yes; then
16338 READELF_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=readelf`
16339 test $READELF_FOR_TARGET = readelf && READELF_FOR_TARGET=
16340 test -n "$READELF_FOR_TARGET" && ac_cv_path_READELF_FOR_TARGET=$READELF_FOR_TARGET
16341 fi
16342fi
16343if test -z "$ac_cv_path_READELF_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
16344 # Extract the first word of "readelf", so it can be a program name with args.
16345set dummy readelf; ac_word=$2
16346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16347$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16348if ${ac_cv_path_READELF_FOR_TARGET+:} false; then :
e7a82751
RM
16349 $as_echo_n "(cached) " >&6
16350else
16351 case $READELF_FOR_TARGET in
16352 [\\/]* | ?:[\\/]*)
16353 ac_cv_path_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test with a path.
16354 ;;
16355 *)
16356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16357for as_dir in $gcc_cv_tool_dirs
16358do
16359 IFS=$as_save_IFS
16360 test -z "$as_dir" && as_dir=.
16361 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
16363 ac_cv_path_READELF_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
16364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16365 break 2
16366 fi
16367done
16368 done
16369IFS=$as_save_IFS
16370
16371 ;;
16372esac
16373fi
16374READELF_FOR_TARGET=$ac_cv_path_READELF_FOR_TARGET
16375if test -n "$READELF_FOR_TARGET"; then
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
16377$as_echo "$READELF_FOR_TARGET" >&6; }
16378else
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16380$as_echo "no" >&6; }
16381fi
16382
16383
16384fi
16385if test -z "$ac_cv_path_READELF_FOR_TARGET" ; then
16386
16387
16388if test -n "$READELF_FOR_TARGET"; then
16389 ac_cv_prog_READELF_FOR_TARGET=$READELF_FOR_TARGET
16390elif test -n "$ac_cv_prog_READELF_FOR_TARGET"; then
16391 READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
16392fi
16393
16394if test -n "$ac_cv_prog_READELF_FOR_TARGET"; then
16395 for ncn_progname in readelf; do
16396 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16397set dummy ${ncn_progname}; ac_word=$2
16398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16399$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16400if ${ac_cv_prog_READELF_FOR_TARGET+:} false; then :
e7a82751
RM
16401 $as_echo_n "(cached) " >&6
16402else
16403 if test -n "$READELF_FOR_TARGET"; then
16404 ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
16405else
16406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16407for as_dir in $PATH
16408do
16409 IFS=$as_save_IFS
16410 test -z "$as_dir" && as_dir=.
16411 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
16413 ac_cv_prog_READELF_FOR_TARGET="${ncn_progname}"
16414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16415 break 2
16416 fi
16417done
16418 done
16419IFS=$as_save_IFS
16420
16421fi
16422fi
16423READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
16424if test -n "$READELF_FOR_TARGET"; then
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
16426$as_echo "$READELF_FOR_TARGET" >&6; }
16427else
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16429$as_echo "no" >&6; }
16430fi
16431
16432
16433 done
16434fi
16435
16436if test -z "$ac_cv_prog_READELF_FOR_TARGET" && test -n "$with_build_time_tools"; then
16437 for ncn_progname in readelf; do
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
16439$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
16440 if test -x $with_build_time_tools/${ncn_progname}; then
16441 ac_cv_prog_READELF_FOR_TARGET=$with_build_time_tools/${ncn_progname}
16442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16443$as_echo "yes" >&6; }
16444 break
16445 else
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16447$as_echo "no" >&6; }
16448 fi
16449 done
16450fi
16451
16452if test -z "$ac_cv_prog_READELF_FOR_TARGET"; then
16453 for ncn_progname in readelf; do
16454 if test -n "$ncn_target_tool_prefix"; then
16455 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
16456set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
16457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16458$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16459if ${ac_cv_prog_READELF_FOR_TARGET+:} false; then :
e7a82751
RM
16460 $as_echo_n "(cached) " >&6
16461else
16462 if test -n "$READELF_FOR_TARGET"; then
16463 ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
16464else
16465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16466for as_dir in $PATH
16467do
16468 IFS=$as_save_IFS
16469 test -z "$as_dir" && as_dir=.
16470 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
16472 ac_cv_prog_READELF_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
16473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16474 break 2
16475 fi
16476done
16477 done
16478IFS=$as_save_IFS
16479
16480fi
16481fi
16482READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
16483if test -n "$READELF_FOR_TARGET"; then
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
16485$as_echo "$READELF_FOR_TARGET" >&6; }
16486else
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16488$as_echo "no" >&6; }
16489fi
16490
16491
16492 fi
16493 if test -z "$ac_cv_prog_READELF_FOR_TARGET" && test $build = $target ; then
16494 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16495set dummy ${ncn_progname}; ac_word=$2
16496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16497$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16498if ${ac_cv_prog_READELF_FOR_TARGET+:} false; then :
e7a82751
RM
16499 $as_echo_n "(cached) " >&6
16500else
16501 if test -n "$READELF_FOR_TARGET"; then
16502 ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
16503else
16504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16505for as_dir in $PATH
16506do
16507 IFS=$as_save_IFS
16508 test -z "$as_dir" && as_dir=.
16509 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16510 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e7a82751
RM
16511 ac_cv_prog_READELF_FOR_TARGET="${ncn_progname}"
16512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16513 break 2
16514 fi
16515done
16516 done
16517IFS=$as_save_IFS
16518
16519fi
16520fi
16521READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
16522if test -n "$READELF_FOR_TARGET"; then
16523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
16524$as_echo "$READELF_FOR_TARGET" >&6; }
16525else
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16527$as_echo "no" >&6; }
16528fi
16529
16530
16531 fi
16532 test -n "$ac_cv_prog_READELF_FOR_TARGET" && break
16533 done
16534fi
16535
16536if test -z "$ac_cv_prog_READELF_FOR_TARGET" ; then
16537 set dummy readelf
16538 if test $build = $target ; then
16539 READELF_FOR_TARGET="$2"
16540 else
16541 READELF_FOR_TARGET="${ncn_target_tool_prefix}$2"
16542 fi
16543else
16544 READELF_FOR_TARGET="$ac_cv_prog_READELF_FOR_TARGET"
16545fi
16546
16547else
16548 READELF_FOR_TARGET=$ac_cv_path_READELF_FOR_TARGET
16549fi
16550
16551
16552
16553
e8b05380
PB
16554if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
16555 if test -n "$with_build_time_tools"; then
5213506e
RW
16556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strip in $with_build_time_tools" >&5
16557$as_echo_n "checking for strip in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16558 if test -x $with_build_time_tools/strip; then
16559 STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
16560 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
5213506e
RW
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_STRIP_FOR_TARGET" >&5
16562$as_echo "$ac_cv_path_STRIP_FOR_TARGET" >&6; }
d1f8db0c 16563 else
5213506e
RW
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16565$as_echo "no" >&6; }
d1f8db0c 16566 fi
e8b05380
PB
16567 elif test $build != $host && test $have_gcc_for_target = yes; then
16568 STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
1c00b503
PB
16569 test $STRIP_FOR_TARGET = strip && STRIP_FOR_TARGET=
16570 test -n "$STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
e8b05380
PB
16571 fi
16572fi
3e19841a 16573if test -z "$ac_cv_path_STRIP_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
16574 # Extract the first word of "strip", so it can be a program name with args.
16575set dummy strip; ac_word=$2
5213506e
RW
16576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16577$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16578if ${ac_cv_path_STRIP_FOR_TARGET+:} false; then :
5213506e 16579 $as_echo_n "(cached) " >&6
e8b05380 16580else
1c710c3c
DJ
16581 case $STRIP_FOR_TARGET in
16582 [\\/]* | ?:[\\/]*)
e8b05380
PB
16583 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
16584 ;;
e8b05380 16585 *)
1c710c3c
DJ
16586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16587for as_dir in $gcc_cv_tool_dirs
16588do
16589 IFS=$as_save_IFS
16590 test -z "$as_dir" && as_dir=.
5213506e 16591 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16593 ac_cv_path_STRIP_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 16594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16595 break 2
16596 fi
16597done
5213506e
RW
16598 done
16599IFS=$as_save_IFS
1c710c3c 16600
e8b05380
PB
16601 ;;
16602esac
16603fi
1c710c3c 16604STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
e8b05380 16605if test -n "$STRIP_FOR_TARGET"; then
5213506e
RW
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP_FOR_TARGET" >&5
16607$as_echo "$STRIP_FOR_TARGET" >&6; }
e8b05380 16608else
5213506e
RW
16609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16610$as_echo "no" >&6; }
e8b05380
PB
16611fi
16612
5213506e 16613
e8b05380
PB
16614fi
16615if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
278a7a38
AO
16616
16617
16618if test -n "$STRIP_FOR_TARGET"; then
16619 ac_cv_prog_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
16620elif test -n "$ac_cv_prog_STRIP_FOR_TARGET"; then
16621 STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
16622fi
16623
16624if test -n "$ac_cv_prog_STRIP_FOR_TARGET"; then
16625 for ncn_progname in strip; do
16626 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16627set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16629$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16630if ${ac_cv_prog_STRIP_FOR_TARGET+:} false; then :
5213506e 16631 $as_echo_n "(cached) " >&6
278a7a38
AO
16632else
16633 if test -n "$STRIP_FOR_TARGET"; then
16634 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
16635else
16636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16637for as_dir in $PATH
16638do
16639 IFS=$as_save_IFS
16640 test -z "$as_dir" && as_dir=.
5213506e 16641 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 16643 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
5213506e 16644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
16645 break 2
16646 fi
16647done
5213506e
RW
16648 done
16649IFS=$as_save_IFS
278a7a38
AO
16650
16651fi
16652fi
16653STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
16654if test -n "$STRIP_FOR_TARGET"; then
5213506e
RW
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP_FOR_TARGET" >&5
16656$as_echo "$STRIP_FOR_TARGET" >&6; }
278a7a38 16657else
5213506e
RW
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16659$as_echo "no" >&6; }
278a7a38
AO
16660fi
16661
5213506e 16662
278a7a38
AO
16663 done
16664fi
16665
16666if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 16667 for ncn_progname in strip; do
5213506e
RW
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
16669$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16670 if test -x $with_build_time_tools/${ncn_progname}; then
16671 ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16673$as_echo "yes" >&6; }
e8b05380
PB
16674 break
16675 else
5213506e
RW
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16677$as_echo "no" >&6; }
e8b05380
PB
16678 fi
16679 done
16680fi
16681
16682if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
16683 for ncn_progname in strip; do
16684 if test -n "$ncn_target_tool_prefix"; then
16685 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
040b1c5a 16686set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
16687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16688$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16689if ${ac_cv_prog_STRIP_FOR_TARGET+:} false; then :
5213506e 16690 $as_echo_n "(cached) " >&6
af71363e
AS
16691else
16692 if test -n "$STRIP_FOR_TARGET"; then
1c710c3c
DJ
16693 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
16694else
16695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16696for as_dir in $PATH
16697do
16698 IFS=$as_save_IFS
16699 test -z "$as_dir" && as_dir=.
5213506e 16700 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16702 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 16703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16704 break 2
16705 fi
16706done
5213506e
RW
16707 done
16708IFS=$as_save_IFS
1c710c3c 16709
040b1c5a
GK
16710fi
16711fi
1c710c3c 16712STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
040b1c5a 16713if test -n "$STRIP_FOR_TARGET"; then
5213506e
RW
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP_FOR_TARGET" >&5
16715$as_echo "$STRIP_FOR_TARGET" >&6; }
040b1c5a 16716else
5213506e
RW
16717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16718$as_echo "no" >&6; }
040b1c5a
GK
16719fi
16720
5213506e 16721
e8b05380
PB
16722 fi
16723 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
16724 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
040b1c5a 16725set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16727$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16728if ${ac_cv_prog_STRIP_FOR_TARGET+:} false; then :
5213506e 16729 $as_echo_n "(cached) " >&6
040b1c5a
GK
16730else
16731 if test -n "$STRIP_FOR_TARGET"; then
16732 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
16733else
1c710c3c
DJ
16734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16735for as_dir in $PATH
16736do
16737 IFS=$as_save_IFS
16738 test -z "$as_dir" && as_dir=.
5213506e 16739 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16741 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
5213506e 16742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16743 break 2
16744 fi
16745done
5213506e
RW
16746 done
16747IFS=$as_save_IFS
1c710c3c 16748
040b1c5a
GK
16749fi
16750fi
1c710c3c 16751STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
040b1c5a 16752if test -n "$STRIP_FOR_TARGET"; then
5213506e
RW
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP_FOR_TARGET" >&5
16754$as_echo "$STRIP_FOR_TARGET" >&6; }
040b1c5a 16755else
5213506e
RW
16756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16757$as_echo "no" >&6; }
040b1c5a 16758fi
1c710c3c 16759
5213506e 16760
e8b05380
PB
16761 fi
16762 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
16763 done
16764fi
1c710c3c 16765
040b1c5a
GK
16766if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
16767 set dummy strip
16768 if test $build = $target ; then
16769 STRIP_FOR_TARGET="$2"
16770 else
16771 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
16772 fi
1c00b503
PB
16773else
16774 STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a
GK
16775fi
16776
d1f8db0c
PB
16777else
16778 STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
e8b05380
PB
16779fi
16780
16781
16782
16783
16784if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
16785 if test -n "$with_build_time_tools"; then
5213506e
RW
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windres in $with_build_time_tools" >&5
16787$as_echo_n "checking for windres in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16788 if test -x $with_build_time_tools/windres; then
16789 WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
16790 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
5213506e
RW
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_WINDRES_FOR_TARGET" >&5
16792$as_echo "$ac_cv_path_WINDRES_FOR_TARGET" >&6; }
d1f8db0c 16793 else
5213506e
RW
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16795$as_echo "no" >&6; }
d1f8db0c 16796 fi
e8b05380
PB
16797 elif test $build != $host && test $have_gcc_for_target = yes; then
16798 WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
1c00b503
PB
16799 test $WINDRES_FOR_TARGET = windres && WINDRES_FOR_TARGET=
16800 test -n "$WINDRES_FOR_TARGET" && ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
e8b05380
PB
16801 fi
16802fi
3e19841a 16803if test -z "$ac_cv_path_WINDRES_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
e8b05380
PB
16804 # Extract the first word of "windres", so it can be a program name with args.
16805set dummy windres; ac_word=$2
5213506e
RW
16806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16807$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16808if ${ac_cv_path_WINDRES_FOR_TARGET+:} false; then :
5213506e 16809 $as_echo_n "(cached) " >&6
e8b05380 16810else
1c710c3c
DJ
16811 case $WINDRES_FOR_TARGET in
16812 [\\/]* | ?:[\\/]*)
e8b05380
PB
16813 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
16814 ;;
e8b05380 16815 *)
1c710c3c
DJ
16816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16817for as_dir in $gcc_cv_tool_dirs
16818do
16819 IFS=$as_save_IFS
16820 test -z "$as_dir" && as_dir=.
5213506e 16821 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16823 ac_cv_path_WINDRES_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 16824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16825 break 2
16826 fi
16827done
5213506e
RW
16828 done
16829IFS=$as_save_IFS
1c710c3c 16830
e8b05380
PB
16831 ;;
16832esac
16833fi
1c710c3c 16834WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
e8b05380 16835if test -n "$WINDRES_FOR_TARGET"; then
5213506e
RW
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES_FOR_TARGET" >&5
16837$as_echo "$WINDRES_FOR_TARGET" >&6; }
e8b05380 16838else
5213506e
RW
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16840$as_echo "no" >&6; }
e8b05380
PB
16841fi
16842
5213506e 16843
e8b05380
PB
16844fi
16845if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
278a7a38
AO
16846
16847
16848if test -n "$WINDRES_FOR_TARGET"; then
16849 ac_cv_prog_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
16850elif test -n "$ac_cv_prog_WINDRES_FOR_TARGET"; then
16851 WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
16852fi
16853
16854if test -n "$ac_cv_prog_WINDRES_FOR_TARGET"; then
16855 for ncn_progname in windres; do
16856 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
16857set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16859$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16860if ${ac_cv_prog_WINDRES_FOR_TARGET+:} false; then :
5213506e 16861 $as_echo_n "(cached) " >&6
278a7a38
AO
16862else
16863 if test -n "$WINDRES_FOR_TARGET"; then
16864 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
16865else
16866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16867for as_dir in $PATH
16868do
16869 IFS=$as_save_IFS
16870 test -z "$as_dir" && as_dir=.
5213506e 16871 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
278a7a38 16873 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
5213506e 16874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
278a7a38
AO
16875 break 2
16876 fi
16877done
5213506e
RW
16878 done
16879IFS=$as_save_IFS
278a7a38
AO
16880
16881fi
16882fi
16883WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
16884if test -n "$WINDRES_FOR_TARGET"; then
5213506e
RW
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES_FOR_TARGET" >&5
16886$as_echo "$WINDRES_FOR_TARGET" >&6; }
278a7a38 16887else
5213506e
RW
16888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16889$as_echo "no" >&6; }
278a7a38
AO
16890fi
16891
5213506e 16892
278a7a38
AO
16893 done
16894fi
16895
16896if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test -n "$with_build_time_tools"; then
e8b05380 16897 for ncn_progname in windres; do
5213506e
RW
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
16899$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
d1f8db0c
PB
16900 if test -x $with_build_time_tools/${ncn_progname}; then
16901 ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16903$as_echo "yes" >&6; }
e8b05380
PB
16904 break
16905 else
5213506e
RW
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16907$as_echo "no" >&6; }
e8b05380
PB
16908 fi
16909 done
16910fi
16911
16912if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
16913 for ncn_progname in windres; do
16914 if test -n "$ncn_target_tool_prefix"; then
16915 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 16916set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
16917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16918$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16919if ${ac_cv_prog_WINDRES_FOR_TARGET+:} false; then :
5213506e 16920 $as_echo_n "(cached) " >&6
ca9f4b81 16921else
4de997d1
PB
16922 if test -n "$WINDRES_FOR_TARGET"; then
16923 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 16924else
1c710c3c
DJ
16925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16926for as_dir in $PATH
16927do
16928 IFS=$as_save_IFS
16929 test -z "$as_dir" && as_dir=.
5213506e 16930 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16932 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 16933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16934 break 2
16935 fi
16936done
5213506e
RW
16937 done
16938IFS=$as_save_IFS
1c710c3c 16939
ca9f4b81
AO
16940fi
16941fi
1c710c3c 16942WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
4de997d1 16943if test -n "$WINDRES_FOR_TARGET"; then
5213506e
RW
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES_FOR_TARGET" >&5
16945$as_echo "$WINDRES_FOR_TARGET" >&6; }
ca9f4b81 16946else
5213506e
RW
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16948$as_echo "no" >&6; }
ca9f4b81
AO
16949fi
16950
5213506e 16951
e8b05380
PB
16952 fi
16953 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
16954 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 16955set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
16956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16957$as_echo_n "checking for $ac_word... " >&6; }
22e05272 16958if ${ac_cv_prog_WINDRES_FOR_TARGET+:} false; then :
5213506e 16959 $as_echo_n "(cached) " >&6
ca9f4b81 16960else
2693c0b0
PB
16961 if test -n "$WINDRES_FOR_TARGET"; then
16962 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 16963else
1c710c3c
DJ
16964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16965for as_dir in $PATH
16966do
16967 IFS=$as_save_IFS
16968 test -z "$as_dir" && as_dir=.
5213506e 16969 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 16970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1c710c3c 16971 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
5213506e 16972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1c710c3c
DJ
16973 break 2
16974 fi
16975done
5213506e
RW
16976 done
16977IFS=$as_save_IFS
1c710c3c 16978
ca9f4b81
AO
16979fi
16980fi
1c710c3c 16981WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
2693c0b0 16982if test -n "$WINDRES_FOR_TARGET"; then
5213506e
RW
16983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES_FOR_TARGET" >&5
16984$as_echo "$WINDRES_FOR_TARGET" >&6; }
ca9f4b81 16985else
5213506e
RW
16986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16987$as_echo "no" >&6; }
ca9f4b81 16988fi
1c710c3c 16989
5213506e 16990
e8b05380
PB
16991 fi
16992 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
16993 done
16994fi
1c710c3c 16995
2693c0b0
PB
16996if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
16997 set dummy windres
16998 if test $build = $target ; then
16999 WINDRES_FOR_TARGET="$2"
ca9f4b81 17000 else
2693c0b0 17001 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 17002 fi
1c00b503
PB
17003else
17004 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
ca9f4b81
AO
17005fi
17006
d1f8db0c
PB
17007else
17008 WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
e8b05380
PB
17009fi
17010
4977bab6 17011
901119ae
KT
17012
17013
17014if test -z "$ac_cv_path_WINDMC_FOR_TARGET" ; then
17015 if test -n "$with_build_time_tools"; then
5213506e
RW
17016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windmc in $with_build_time_tools" >&5
17017$as_echo_n "checking for windmc in $with_build_time_tools... " >&6; }
901119ae
KT
17018 if test -x $with_build_time_tools/windmc; then
17019 WINDMC_FOR_TARGET=`cd $with_build_time_tools && pwd`/windmc
17020 ac_cv_path_WINDMC_FOR_TARGET=$WINDMC_FOR_TARGET
5213506e
RW
17021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_WINDMC_FOR_TARGET" >&5
17022$as_echo "$ac_cv_path_WINDMC_FOR_TARGET" >&6; }
901119ae 17023 else
5213506e
RW
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025$as_echo "no" >&6; }
901119ae
KT
17026 fi
17027 elif test $build != $host && test $have_gcc_for_target = yes; then
17028 WINDMC_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windmc`
1c00b503
PB
17029 test $WINDMC_FOR_TARGET = windmc && WINDMC_FOR_TARGET=
17030 test -n "$WINDMC_FOR_TARGET" && ac_cv_path_WINDMC_FOR_TARGET=$WINDMC_FOR_TARGET
901119ae
KT
17031 fi
17032fi
17033if test -z "$ac_cv_path_WINDMC_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
17034 # Extract the first word of "windmc", so it can be a program name with args.
17035set dummy windmc; ac_word=$2
5213506e
RW
17036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17037$as_echo_n "checking for $ac_word... " >&6; }
22e05272 17038if ${ac_cv_path_WINDMC_FOR_TARGET+:} false; then :
5213506e 17039 $as_echo_n "(cached) " >&6
901119ae
KT
17040else
17041 case $WINDMC_FOR_TARGET in
17042 [\\/]* | ?:[\\/]*)
17043 ac_cv_path_WINDMC_FOR_TARGET="$WINDMC_FOR_TARGET" # Let the user override the test with a path.
17044 ;;
17045 *)
17046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17047for as_dir in $gcc_cv_tool_dirs
17048do
17049 IFS=$as_save_IFS
17050 test -z "$as_dir" && as_dir=.
5213506e 17051 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 17052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 17053 ac_cv_path_WINDMC_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
5213506e 17054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
17055 break 2
17056 fi
17057done
5213506e
RW
17058 done
17059IFS=$as_save_IFS
901119ae
KT
17060
17061 ;;
17062esac
17063fi
17064WINDMC_FOR_TARGET=$ac_cv_path_WINDMC_FOR_TARGET
901119ae 17065if test -n "$WINDMC_FOR_TARGET"; then
5213506e
RW
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC_FOR_TARGET" >&5
17067$as_echo "$WINDMC_FOR_TARGET" >&6; }
901119ae 17068else
5213506e
RW
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17070$as_echo "no" >&6; }
901119ae
KT
17071fi
17072
5213506e 17073
901119ae
KT
17074fi
17075if test -z "$ac_cv_path_WINDMC_FOR_TARGET" ; then
17076
17077
17078if test -n "$WINDMC_FOR_TARGET"; then
17079 ac_cv_prog_WINDMC_FOR_TARGET=$WINDMC_FOR_TARGET
17080elif test -n "$ac_cv_prog_WINDMC_FOR_TARGET"; then
17081 WINDMC_FOR_TARGET=$ac_cv_prog_WINDMC_FOR_TARGET
17082fi
17083
17084if test -n "$ac_cv_prog_WINDMC_FOR_TARGET"; then
17085 for ncn_progname in windmc; do
17086 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
17087set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17089$as_echo_n "checking for $ac_word... " >&6; }
22e05272 17090if ${ac_cv_prog_WINDMC_FOR_TARGET+:} false; then :
5213506e 17091 $as_echo_n "(cached) " >&6
901119ae
KT
17092else
17093 if test -n "$WINDMC_FOR_TARGET"; then
17094 ac_cv_prog_WINDMC_FOR_TARGET="$WINDMC_FOR_TARGET" # Let the user override the test.
17095else
17096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17097for as_dir in $PATH
17098do
17099 IFS=$as_save_IFS
17100 test -z "$as_dir" && as_dir=.
5213506e 17101 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 17102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 17103 ac_cv_prog_WINDMC_FOR_TARGET="${ncn_progname}"
5213506e 17104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
17105 break 2
17106 fi
17107done
5213506e
RW
17108 done
17109IFS=$as_save_IFS
901119ae
KT
17110
17111fi
17112fi
17113WINDMC_FOR_TARGET=$ac_cv_prog_WINDMC_FOR_TARGET
17114if test -n "$WINDMC_FOR_TARGET"; then
5213506e
RW
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC_FOR_TARGET" >&5
17116$as_echo "$WINDMC_FOR_TARGET" >&6; }
901119ae 17117else
5213506e
RW
17118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17119$as_echo "no" >&6; }
901119ae
KT
17120fi
17121
5213506e 17122
901119ae
KT
17123 done
17124fi
17125
17126if test -z "$ac_cv_prog_WINDMC_FOR_TARGET" && test -n "$with_build_time_tools"; then
17127 for ncn_progname in windmc; do
5213506e
RW
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
17129$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
901119ae
KT
17130 if test -x $with_build_time_tools/${ncn_progname}; then
17131 ac_cv_prog_WINDMC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5213506e
RW
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17133$as_echo "yes" >&6; }
901119ae
KT
17134 break
17135 else
5213506e
RW
17136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17137$as_echo "no" >&6; }
901119ae
KT
17138 fi
17139 done
17140fi
17141
17142if test -z "$ac_cv_prog_WINDMC_FOR_TARGET"; then
17143 for ncn_progname in windmc; do
17144 if test -n "$ncn_target_tool_prefix"; then
17145 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
17146set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5213506e
RW
17147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17148$as_echo_n "checking for $ac_word... " >&6; }
22e05272 17149if ${ac_cv_prog_WINDMC_FOR_TARGET+:} false; then :
5213506e 17150 $as_echo_n "(cached) " >&6
901119ae
KT
17151else
17152 if test -n "$WINDMC_FOR_TARGET"; then
17153 ac_cv_prog_WINDMC_FOR_TARGET="$WINDMC_FOR_TARGET" # Let the user override the test.
17154else
17155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17156for as_dir in $PATH
17157do
17158 IFS=$as_save_IFS
17159 test -z "$as_dir" && as_dir=.
5213506e 17160 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 17161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 17162 ac_cv_prog_WINDMC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5213506e 17163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
17164 break 2
17165 fi
17166done
5213506e
RW
17167 done
17168IFS=$as_save_IFS
901119ae
KT
17169
17170fi
17171fi
17172WINDMC_FOR_TARGET=$ac_cv_prog_WINDMC_FOR_TARGET
17173if test -n "$WINDMC_FOR_TARGET"; then
5213506e
RW
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC_FOR_TARGET" >&5
17175$as_echo "$WINDMC_FOR_TARGET" >&6; }
901119ae 17176else
5213506e
RW
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17178$as_echo "no" >&6; }
901119ae
KT
17179fi
17180
5213506e 17181
901119ae
KT
17182 fi
17183 if test -z "$ac_cv_prog_WINDMC_FOR_TARGET" && test $build = $target ; then
17184 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
17185set dummy ${ncn_progname}; ac_word=$2
5213506e
RW
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17187$as_echo_n "checking for $ac_word... " >&6; }
22e05272 17188if ${ac_cv_prog_WINDMC_FOR_TARGET+:} false; then :
5213506e 17189 $as_echo_n "(cached) " >&6
901119ae
KT
17190else
17191 if test -n "$WINDMC_FOR_TARGET"; then
17192 ac_cv_prog_WINDMC_FOR_TARGET="$WINDMC_FOR_TARGET" # Let the user override the test.
17193else
17194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17195for as_dir in $PATH
17196do
17197 IFS=$as_save_IFS
17198 test -z "$as_dir" && as_dir=.
5213506e 17199 for ac_exec_ext in '' $ac_executable_extensions; do
22e05272 17200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
901119ae 17201 ac_cv_prog_WINDMC_FOR_TARGET="${ncn_progname}"
5213506e 17202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901119ae
KT
17203 break 2
17204 fi
17205done
5213506e
RW
17206 done
17207IFS=$as_save_IFS
901119ae
KT
17208
17209fi
17210fi
17211WINDMC_FOR_TARGET=$ac_cv_prog_WINDMC_FOR_TARGET
17212if test -n "$WINDMC_FOR_TARGET"; then
5213506e
RW
17213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDMC_FOR_TARGET" >&5
17214$as_echo "$WINDMC_FOR_TARGET" >&6; }
901119ae 17215else
5213506e
RW
17216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17217$as_echo "no" >&6; }
901119ae
KT
17218fi
17219
5213506e 17220
901119ae
KT
17221 fi
17222 test -n "$ac_cv_prog_WINDMC_FOR_TARGET" && break
17223 done
17224fi
17225
17226if test -z "$ac_cv_prog_WINDMC_FOR_TARGET" ; then
17227 set dummy windmc
17228 if test $build = $target ; then
17229 WINDMC_FOR_TARGET="$2"
17230 else
17231 WINDMC_FOR_TARGET="${ncn_target_tool_prefix}$2"
17232 fi
1c00b503
PB
17233else
17234 WINDMC_FOR_TARGET="$ac_cv_prog_WINDMC_FOR_TARGET"
901119ae
KT
17235fi
17236
17237else
17238 WINDMC_FOR_TARGET=$ac_cv_path_WINDMC_FOR_TARGET
17239fi
17240
17241
2abefe3d
PB
17242RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
17243
5213506e
RW
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
17245$as_echo_n "checking where to find the target ar... " >&6; }
2abefe3d 17246if test "x${build}" != "x${host}" ; then
e8b05380
PB
17247 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
17248 # We already found the complete path
172e41aa 17249 ac_dir=`dirname $AR_FOR_TARGET`
5213506e
RW
17250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17251$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17252 else
17253 # Canadian cross, just use what we found
5213506e
RW
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17255$as_echo "pre-installed" >&6; }
e8b05380 17256 fi
2abefe3d
PB
17257else
17258 ok=yes
17259 case " ${configdirs} " in
17260 *" binutils "*) ;;
17261 *) ok=no ;;
17262 esac
1c710c3c 17263
2abefe3d
PB
17264 if test $ok = yes; then
17265 # An in-tree tool is available and we can use it
17266 AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
5213506e
RW
17267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17268$as_echo "just compiled" >&6; }
e8b05380
PB
17269 elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
17270 # We already found the complete path
172e41aa 17271 ac_dir=`dirname $AR_FOR_TARGET`
5213506e
RW
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17273$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17274 elif test "x$target" = "x$host"; then
17275 # We can use an host tool
17276 AR_FOR_TARGET='$(AR)'
5213506e
RW
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17278$as_echo "host tool" >&6; }
2abefe3d
PB
17279 else
17280 # We need a cross tool
5213506e
RW
17281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17282$as_echo "pre-installed" >&6; }
2abefe3d
PB
17283 fi
17284fi
0b0dc272 17285
5213506e
RW
17286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target as" >&5
17287$as_echo_n "checking where to find the target as... " >&6; }
2abefe3d 17288if test "x${build}" != "x${host}" ; then
e8b05380
PB
17289 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
17290 # We already found the complete path
172e41aa 17291 ac_dir=`dirname $AS_FOR_TARGET`
5213506e
RW
17292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17293$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17294 else
17295 # Canadian cross, just use what we found
5213506e
RW
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17297$as_echo "pre-installed" >&6; }
e8b05380 17298 fi
2abefe3d
PB
17299else
17300 ok=yes
17301 case " ${configdirs} " in
17302 *" gas "*) ;;
17303 *) ok=no ;;
17304 esac
1c710c3c 17305
2abefe3d
PB
17306 if test $ok = yes; then
17307 # An in-tree tool is available and we can use it
17308 AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
5213506e
RW
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17310$as_echo "just compiled" >&6; }
e8b05380
PB
17311 elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
17312 # We already found the complete path
172e41aa 17313 ac_dir=`dirname $AS_FOR_TARGET`
5213506e
RW
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17315$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17316 elif test "x$target" = "x$host"; then
17317 # We can use an host tool
17318 AS_FOR_TARGET='$(AS)'
5213506e
RW
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17320$as_echo "host tool" >&6; }
2abefe3d
PB
17321 else
17322 # We need a cross tool
5213506e
RW
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17324$as_echo "pre-installed" >&6; }
2abefe3d
PB
17325 fi
17326fi
0b0dc272 17327
5213506e
RW
17328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target cc" >&5
17329$as_echo_n "checking where to find the target cc... " >&6; }
2abefe3d 17330if test "x${build}" != "x${host}" ; then
e8b05380
PB
17331 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
17332 # We already found the complete path
172e41aa 17333 ac_dir=`dirname $CC_FOR_TARGET`
5213506e
RW
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17335$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17336 else
17337 # Canadian cross, just use what we found
5213506e
RW
17338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17339$as_echo "pre-installed" >&6; }
e8b05380 17340 fi
2abefe3d
PB
17341else
17342 ok=yes
17343 case " ${configdirs} " in
17344 *" gcc "*) ;;
17345 *) ok=no ;;
17346 esac
1c710c3c 17347
2abefe3d
PB
17348 if test $ok = yes; then
17349 # An in-tree tool is available and we can use it
17350 CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
5213506e
RW
17351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17352$as_echo "just compiled" >&6; }
e8b05380
PB
17353 elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
17354 # We already found the complete path
172e41aa 17355 ac_dir=`dirname $CC_FOR_TARGET`
5213506e
RW
17356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17357$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17358 elif test "x$target" = "x$host"; then
17359 # We can use an host tool
17360 CC_FOR_TARGET='$(CC)'
5213506e
RW
17361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17362$as_echo "host tool" >&6; }
2abefe3d
PB
17363 else
17364 # We need a cross tool
5213506e
RW
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17366$as_echo "pre-installed" >&6; }
2abefe3d
PB
17367 fi
17368fi
0b0dc272 17369
5213506e
RW
17370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++" >&5
17371$as_echo_n "checking where to find the target c++... " >&6; }
2abefe3d 17372if test "x${build}" != "x${host}" ; then
e8b05380
PB
17373 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
17374 # We already found the complete path
172e41aa 17375 ac_dir=`dirname $CXX_FOR_TARGET`
5213506e
RW
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17377$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17378 else
17379 # Canadian cross, just use what we found
5213506e
RW
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17381$as_echo "pre-installed" >&6; }
e8b05380 17382 fi
2abefe3d
PB
17383else
17384 ok=yes
17385 case " ${configdirs} " in
17386 *" gcc "*) ;;
17387 *) ok=no ;;
17388 esac
17389 case ,${enable_languages}, in
17390 *,c++,*) ;;
17391 *) ok=no ;;
17392 esac
17393 if test $ok = yes; then
17394 # An in-tree tool is available and we can use it
2077db1b 17395 CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xg++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `if test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags; then $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; else echo -funconfigured-libstdc++-v3 ; fi` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs'
5213506e
RW
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17397$as_echo "just compiled" >&6; }
e8b05380
PB
17398 elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
17399 # We already found the complete path
172e41aa 17400 ac_dir=`dirname $CXX_FOR_TARGET`
5213506e
RW
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17402$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17403 elif test "x$target" = "x$host"; then
17404 # We can use an host tool
17405 CXX_FOR_TARGET='$(CXX)'
5213506e
RW
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17407$as_echo "host tool" >&6; }
2abefe3d
PB
17408 else
17409 # We need a cross tool
5213506e
RW
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17411$as_echo "pre-installed" >&6; }
2abefe3d
PB
17412 fi
17413fi
0b0dc272 17414
5213506e
RW
17415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++ for libstdc++" >&5
17416$as_echo_n "checking where to find the target c++ for libstdc++... " >&6; }
2abefe3d 17417if test "x${build}" != "x${host}" ; then
e8b05380
PB
17418 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
17419 # We already found the complete path
172e41aa 17420 ac_dir=`dirname $RAW_CXX_FOR_TARGET`
5213506e
RW
17421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17422$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17423 else
17424 # Canadian cross, just use what we found
5213506e
RW
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17426$as_echo "pre-installed" >&6; }
e8b05380 17427 fi
2abefe3d
PB
17428else
17429 ok=yes
17430 case " ${configdirs} " in
17431 *" gcc "*) ;;
17432 *) ok=no ;;
17433 esac
17434 case ,${enable_languages}, in
17435 *,c++,*) ;;
17436 *) ok=no ;;
17437 esac
17438 if test $ok = yes; then
17439 # An in-tree tool is available and we can use it
2077db1b 17440 RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs'
5213506e
RW
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17442$as_echo "just compiled" >&6; }
e8b05380
PB
17443 elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
17444 # We already found the complete path
172e41aa 17445 ac_dir=`dirname $RAW_CXX_FOR_TARGET`
5213506e
RW
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17447$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17448 elif test "x$target" = "x$host"; then
17449 # We can use an host tool
17450 RAW_CXX_FOR_TARGET='$(CXX)'
5213506e
RW
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17452$as_echo "host tool" >&6; }
2abefe3d
PB
17453 else
17454 # We need a cross tool
5213506e
RW
17455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17456$as_echo "pre-installed" >&6; }
2abefe3d
PB
17457 fi
17458fi
0b0dc272 17459
5213506e
RW
17460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target dlltool" >&5
17461$as_echo_n "checking where to find the target dlltool... " >&6; }
2abefe3d 17462if test "x${build}" != "x${host}" ; then
e8b05380
PB
17463 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
17464 # We already found the complete path
172e41aa 17465 ac_dir=`dirname $DLLTOOL_FOR_TARGET`
5213506e
RW
17466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17467$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17468 else
17469 # Canadian cross, just use what we found
5213506e
RW
17470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17471$as_echo "pre-installed" >&6; }
e8b05380 17472 fi
2abefe3d
PB
17473else
17474 ok=yes
17475 case " ${configdirs} " in
17476 *" binutils "*) ;;
17477 *) ok=no ;;
17478 esac
1c710c3c 17479
2abefe3d
PB
17480 if test $ok = yes; then
17481 # An in-tree tool is available and we can use it
17482 DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
5213506e
RW
17483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17484$as_echo "just compiled" >&6; }
e8b05380
PB
17485 elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
17486 # We already found the complete path
172e41aa 17487 ac_dir=`dirname $DLLTOOL_FOR_TARGET`
5213506e
RW
17488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17489$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17490 elif test "x$target" = "x$host"; then
17491 # We can use an host tool
17492 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
5213506e
RW
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17494$as_echo "host tool" >&6; }
2abefe3d
PB
17495 else
17496 # We need a cross tool
5213506e
RW
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17498$as_echo "pre-installed" >&6; }
2abefe3d
PB
17499 fi
17500fi
0b0dc272 17501
3b5e8ee4
IS
17502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target dsymutil" >&5
17503$as_echo_n "checking where to find the target dsymutil... " >&6; }
17504if test "x${build}" != "x${host}" ; then
17505 if expr "x$DSYMUTIL_FOR_TARGET" : "x/" > /dev/null; then
17506 # We already found the complete path
17507 ac_dir=`dirname $DSYMUTIL_FOR_TARGET`
17508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17509$as_echo "pre-installed in $ac_dir" >&6; }
17510 else
17511 # Canadian cross, just use what we found
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17513$as_echo "pre-installed" >&6; }
17514 fi
17515else
17516 if expr "x$DSYMUTIL_FOR_TARGET" : "x/" > /dev/null; then
17517 # We already found the complete path
17518 ac_dir=`dirname $DSYMUTIL_FOR_TARGET`
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17520$as_echo "pre-installed in $ac_dir" >&6; }
17521 elif test "x$target" = "x$host"; then
17522 # We can use an host tool
17523 DSYMUTIL_FOR_TARGET='$(DSYMUTIL)'
17524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17525$as_echo "host tool" >&6; }
17526 else
17527 # We need a cross tool
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17529$as_echo "pre-installed" >&6; }
17530 fi
17531fi
17532
5213506e
RW
17533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gcc" >&5
17534$as_echo_n "checking where to find the target gcc... " >&6; }
2abefe3d 17535if test "x${build}" != "x${host}" ; then
e8b05380
PB
17536 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
17537 # We already found the complete path
172e41aa 17538 ac_dir=`dirname $GCC_FOR_TARGET`
5213506e
RW
17539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17540$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17541 else
17542 # Canadian cross, just use what we found
5213506e
RW
17543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17544$as_echo "pre-installed" >&6; }
e8b05380 17545 fi
2abefe3d
PB
17546else
17547 ok=yes
17548 case " ${configdirs} " in
17549 *" gcc "*) ;;
17550 *) ok=no ;;
17551 esac
1c710c3c 17552
2abefe3d
PB
17553 if test $ok = yes; then
17554 # An in-tree tool is available and we can use it
17555 GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
5213506e
RW
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17557$as_echo "just compiled" >&6; }
e8b05380
PB
17558 elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
17559 # We already found the complete path
172e41aa 17560 ac_dir=`dirname $GCC_FOR_TARGET`
5213506e
RW
17561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17562$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17563 elif test "x$target" = "x$host"; then
17564 # We can use an host tool
17565 GCC_FOR_TARGET='$()'
5213506e
RW
17566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17567$as_echo "host tool" >&6; }
2abefe3d
PB
17568 else
17569 # We need a cross tool
5213506e
RW
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17571$as_echo "pre-installed" >&6; }
2abefe3d
PB
17572 fi
17573fi
0b0dc272 17574
5213506e
RW
17575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gfortran" >&5
17576$as_echo_n "checking where to find the target gfortran... " >&6; }
2abefe3d 17577if test "x${build}" != "x${host}" ; then
e8b05380
PB
17578 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
17579 # We already found the complete path
172e41aa 17580 ac_dir=`dirname $GFORTRAN_FOR_TARGET`
5213506e
RW
17581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17582$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17583 else
17584 # Canadian cross, just use what we found
5213506e
RW
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17586$as_echo "pre-installed" >&6; }
e8b05380 17587 fi
2abefe3d
PB
17588else
17589 ok=yes
17590 case " ${configdirs} " in
17591 *" gcc "*) ;;
17592 *) ok=no ;;
17593 esac
17594 case ,${enable_languages}, in
17595 *,fortran,*) ;;
17596 *) ok=no ;;
17597 esac
17598 if test $ok = yes; then
17599 # An in-tree tool is available and we can use it
17600 GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
5213506e
RW
17601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17602$as_echo "just compiled" >&6; }
e8b05380
PB
17603 elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
17604 # We already found the complete path
172e41aa 17605 ac_dir=`dirname $GFORTRAN_FOR_TARGET`
5213506e
RW
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17607$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17608 elif test "x$target" = "x$host"; then
17609 # We can use an host tool
17610 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
5213506e
RW
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17612$as_echo "host tool" >&6; }
2abefe3d
PB
17613 else
17614 # We need a cross tool
5213506e
RW
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17616$as_echo "pre-installed" >&6; }
2abefe3d
PB
17617 fi
17618fi
0b0dc272 17619
632e2a07
ILT
17620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gccgo" >&5
17621$as_echo_n "checking where to find the target gccgo... " >&6; }
17622if test "x${build}" != "x${host}" ; then
17623 if expr "x$GOC_FOR_TARGET" : "x/" > /dev/null; then
17624 # We already found the complete path
17625 ac_dir=`dirname $GOC_FOR_TARGET`
17626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17627$as_echo "pre-installed in $ac_dir" >&6; }
17628 else
17629 # Canadian cross, just use what we found
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17631$as_echo "pre-installed" >&6; }
17632 fi
17633else
17634 ok=yes
17635 case " ${configdirs} " in
17636 *" gcc "*) ;;
17637 *) ok=no ;;
17638 esac
17639 case ,${enable_languages}, in
17640 *,go,*) ;;
17641 *) ok=no ;;
17642 esac
17643 if test $ok = yes; then
17644 # An in-tree tool is available and we can use it
17645 GOC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/'
17646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17647$as_echo "just compiled" >&6; }
17648 elif expr "x$GOC_FOR_TARGET" : "x/" > /dev/null; then
17649 # We already found the complete path
17650 ac_dir=`dirname $GOC_FOR_TARGET`
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17652$as_echo "pre-installed in $ac_dir" >&6; }
17653 elif test "x$target" = "x$host"; then
17654 # We can use an host tool
17655 GOC_FOR_TARGET='$(GOC)'
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17657$as_echo "host tool" >&6; }
17658 else
17659 # We need a cross tool
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17661$as_echo "pre-installed" >&6; }
17662 fi
17663fi
17664
b4c522fa
IB
17665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gdc" >&5
17666$as_echo_n "checking where to find the target gdc... " >&6; }
17667if test "x${build}" != "x${host}" ; then
17668 if expr "x$GDC_FOR_TARGET" : "x/" > /dev/null; then
17669 # We already found the complete path
17670 ac_dir=`dirname $GDC_FOR_TARGET`
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17672$as_echo "pre-installed in $ac_dir" >&6; }
17673 else
17674 # Canadian cross, just use what we found
17675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17676$as_echo "pre-installed" >&6; }
17677 fi
17678else
17679 ok=yes
17680 case " ${configdirs} " in
17681 *" gcc "*) ;;
17682 *) ok=no ;;
17683 esac
17684 case ,${enable_languages}, in
17685 *,d,*) ;;
17686 *) ok=no ;;
17687 esac
17688 if test $ok = yes; then
17689 # An in-tree tool is available and we can use it
17690 GDC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/'
17691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17692$as_echo "just compiled" >&6; }
17693 elif expr "x$GDC_FOR_TARGET" : "x/" > /dev/null; then
17694 # We already found the complete path
17695 ac_dir=`dirname $GDC_FOR_TARGET`
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17697$as_echo "pre-installed in $ac_dir" >&6; }
17698 elif test "x$target" = "x$host"; then
17699 # We can use an host tool
17700 GDC_FOR_TARGET='$(GDC)'
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17702$as_echo "host tool" >&6; }
17703 else
17704 # We need a cross tool
17705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17706$as_echo "pre-installed" >&6; }
17707 fi
17708fi
17709
5213506e
RW
17710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
17711$as_echo_n "checking where to find the target ld... " >&6; }
2abefe3d 17712if test "x${build}" != "x${host}" ; then
e8b05380
PB
17713 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
17714 # We already found the complete path
172e41aa 17715 ac_dir=`dirname $LD_FOR_TARGET`
5213506e
RW
17716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17717$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17718 else
17719 # Canadian cross, just use what we found
5213506e
RW
17720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17721$as_echo "pre-installed" >&6; }
e8b05380 17722 fi
2abefe3d
PB
17723else
17724 ok=yes
17725 case " ${configdirs} " in
17726 *" ld "*) ;;
17727 *) ok=no ;;
17728 esac
1c710c3c 17729
2abefe3d
PB
17730 if test $ok = yes; then
17731 # An in-tree tool is available and we can use it
17732 LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
5213506e
RW
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17734$as_echo "just compiled" >&6; }
e8b05380
PB
17735 elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
17736 # We already found the complete path
172e41aa 17737 ac_dir=`dirname $LD_FOR_TARGET`
5213506e
RW
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17739$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17740 elif test "x$target" = "x$host"; then
17741 # We can use an host tool
17742 LD_FOR_TARGET='$(LD)'
5213506e
RW
17743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17744$as_echo "host tool" >&6; }
2abefe3d
PB
17745 else
17746 # We need a cross tool
5213506e
RW
17747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17748$as_echo "pre-installed" >&6; }
2abefe3d
PB
17749 fi
17750fi
0b0dc272 17751
5213506e
RW
17752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target lipo" >&5
17753$as_echo_n "checking where to find the target lipo... " >&6; }
2abefe3d 17754if test "x${build}" != "x${host}" ; then
e8b05380
PB
17755 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
17756 # We already found the complete path
172e41aa 17757 ac_dir=`dirname $LIPO_FOR_TARGET`
5213506e
RW
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17759$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17760 else
17761 # Canadian cross, just use what we found
5213506e
RW
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17763$as_echo "pre-installed" >&6; }
e8b05380 17764 fi
2abefe3d 17765else
e8b05380
PB
17766 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
17767 # We already found the complete path
172e41aa 17768 ac_dir=`dirname $LIPO_FOR_TARGET`
5213506e
RW
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17770$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380 17771 elif test "x$target" = "x$host"; then
2abefe3d
PB
17772 # We can use an host tool
17773 LIPO_FOR_TARGET='$(LIPO)'
5213506e
RW
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17775$as_echo "host tool" >&6; }
2abefe3d
PB
17776 else
17777 # We need a cross tool
5213506e
RW
17778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17779$as_echo "pre-installed" >&6; }
2abefe3d
PB
17780 fi
17781fi
0b0dc272 17782
5213506e
RW
17783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target nm" >&5
17784$as_echo_n "checking where to find the target nm... " >&6; }
2abefe3d 17785if test "x${build}" != "x${host}" ; then
e8b05380
PB
17786 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
17787 # We already found the complete path
172e41aa 17788 ac_dir=`dirname $NM_FOR_TARGET`
5213506e
RW
17789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17790$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17791 else
17792 # Canadian cross, just use what we found
5213506e
RW
17793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17794$as_echo "pre-installed" >&6; }
e8b05380 17795 fi
2abefe3d
PB
17796else
17797 ok=yes
17798 case " ${configdirs} " in
17799 *" binutils "*) ;;
17800 *) ok=no ;;
17801 esac
1c710c3c 17802
2abefe3d
PB
17803 if test $ok = yes; then
17804 # An in-tree tool is available and we can use it
17805 NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
5213506e
RW
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17807$as_echo "just compiled" >&6; }
e8b05380
PB
17808 elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
17809 # We already found the complete path
172e41aa 17810 ac_dir=`dirname $NM_FOR_TARGET`
5213506e
RW
17811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17812$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17813 elif test "x$target" = "x$host"; then
17814 # We can use an host tool
17815 NM_FOR_TARGET='$(NM)'
5213506e
RW
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17817$as_echo "host tool" >&6; }
2abefe3d
PB
17818 else
17819 # We need a cross tool
5213506e
RW
17820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17821$as_echo "pre-installed" >&6; }
2abefe3d
PB
17822 fi
17823fi
0b0dc272 17824
9bccfdf5
AP
17825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target objcopy" >&5
17826$as_echo_n "checking where to find the target objcopy... " >&6; }
17827if test "x${build}" != "x${host}" ; then
17828 if expr "x$OBJCOPY_FOR_TARGET" : "x/" > /dev/null; then
17829 # We already found the complete path
17830 ac_dir=`dirname $OBJCOPY_FOR_TARGET`
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17832$as_echo "pre-installed in $ac_dir" >&6; }
17833 else
17834 # Canadian cross, just use what we found
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17836$as_echo "pre-installed" >&6; }
17837 fi
17838else
17839 ok=yes
17840 case " ${configdirs} " in
17841 *" binutils "*) ;;
17842 *) ok=no ;;
17843 esac
17844
17845 if test $ok = yes; then
17846 # An in-tree tool is available and we can use it
17847 OBJCOPY_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objcopy'
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17849$as_echo "just compiled" >&6; }
17850 elif expr "x$OBJCOPY_FOR_TARGET" : "x/" > /dev/null; then
17851 # We already found the complete path
17852 ac_dir=`dirname $OBJCOPY_FOR_TARGET`
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17854$as_echo "pre-installed in $ac_dir" >&6; }
17855 elif test "x$target" = "x$host"; then
17856 # We can use an host tool
ec8fd1c0 17857 OBJCOPY_FOR_TARGET='$(OBJCOPY)'
9bccfdf5
AP
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17859$as_echo "host tool" >&6; }
17860 else
17861 # We need a cross tool
17862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17863$as_echo "pre-installed" >&6; }
17864 fi
17865fi
17866
5213506e
RW
17867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target objdump" >&5
17868$as_echo_n "checking where to find the target objdump... " >&6; }
2abefe3d 17869if test "x${build}" != "x${host}" ; then
e8b05380
PB
17870 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
17871 # We already found the complete path
172e41aa 17872 ac_dir=`dirname $OBJDUMP_FOR_TARGET`
5213506e
RW
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17874$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17875 else
17876 # Canadian cross, just use what we found
5213506e
RW
17877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17878$as_echo "pre-installed" >&6; }
e8b05380 17879 fi
2abefe3d
PB
17880else
17881 ok=yes
17882 case " ${configdirs} " in
17883 *" binutils "*) ;;
17884 *) ok=no ;;
17885 esac
1c710c3c 17886
2abefe3d
PB
17887 if test $ok = yes; then
17888 # An in-tree tool is available and we can use it
17889 OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
5213506e
RW
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17891$as_echo "just compiled" >&6; }
e8b05380
PB
17892 elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
17893 # We already found the complete path
172e41aa 17894 ac_dir=`dirname $OBJDUMP_FOR_TARGET`
5213506e
RW
17895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17896$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17897 elif test "x$target" = "x$host"; then
17898 # We can use an host tool
17899 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
5213506e
RW
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17901$as_echo "host tool" >&6; }
2abefe3d
PB
17902 else
17903 # We need a cross tool
5213506e
RW
17904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17905$as_echo "pre-installed" >&6; }
2abefe3d
PB
17906 fi
17907fi
0b0dc272 17908
e4a9a572
IS
17909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target otool" >&5
17910$as_echo_n "checking where to find the target otool... " >&6; }
17911if test "x${build}" != "x${host}" ; then
17912 if expr "x$OTOOL_FOR_TARGET" : "x/" > /dev/null; then
17913 # We already found the complete path
17914 ac_dir=`dirname $OTOOL_FOR_TARGET`
17915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17916$as_echo "pre-installed in $ac_dir" >&6; }
17917 else
17918 # Canadian cross, just use what we found
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17920$as_echo "pre-installed" >&6; }
17921 fi
17922else
17923 if expr "x$OTOOL_FOR_TARGET" : "x/" > /dev/null; then
17924 # We already found the complete path
17925 ac_dir=`dirname $OTOOL_FOR_TARGET`
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17927$as_echo "pre-installed in $ac_dir" >&6; }
17928 elif test "x$target" = "x$host"; then
17929 # We can use an host tool
17930 OTOOL_FOR_TARGET='$(OTOOL)'
17931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17932$as_echo "host tool" >&6; }
17933 else
17934 # We need a cross tool
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17936$as_echo "pre-installed" >&6; }
17937 fi
17938fi
17939
5213506e
RW
17940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ranlib" >&5
17941$as_echo_n "checking where to find the target ranlib... " >&6; }
2abefe3d 17942if test "x${build}" != "x${host}" ; then
e8b05380
PB
17943 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
17944 # We already found the complete path
172e41aa 17945 ac_dir=`dirname $RANLIB_FOR_TARGET`
5213506e
RW
17946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17947$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
17948 else
17949 # Canadian cross, just use what we found
5213506e
RW
17950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17951$as_echo "pre-installed" >&6; }
e8b05380 17952 fi
2abefe3d
PB
17953else
17954 ok=yes
17955 case " ${configdirs} " in
17956 *" binutils "*) ;;
17957 *) ok=no ;;
17958 esac
1c710c3c 17959
2abefe3d
PB
17960 if test $ok = yes; then
17961 # An in-tree tool is available and we can use it
17962 RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
5213506e
RW
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
17964$as_echo "just compiled" >&6; }
e8b05380
PB
17965 elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
17966 # We already found the complete path
172e41aa 17967 ac_dir=`dirname $RANLIB_FOR_TARGET`
5213506e
RW
17968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17969$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
17970 elif test "x$target" = "x$host"; then
17971 # We can use an host tool
17972 RANLIB_FOR_TARGET='$(RANLIB)'
5213506e
RW
17973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
17974$as_echo "host tool" >&6; }
2abefe3d
PB
17975 else
17976 # We need a cross tool
5213506e
RW
17977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17978$as_echo "pre-installed" >&6; }
2abefe3d
PB
17979 fi
17980fi
0b0dc272 17981
e7a82751
RM
17982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target readelf" >&5
17983$as_echo_n "checking where to find the target readelf... " >&6; }
17984if test "x${build}" != "x${host}" ; then
17985 if expr "x$READELF_FOR_TARGET" : "x/" > /dev/null; then
17986 # We already found the complete path
17987 ac_dir=`dirname $READELF_FOR_TARGET`
17988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
17989$as_echo "pre-installed in $ac_dir" >&6; }
17990 else
17991 # Canadian cross, just use what we found
17992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
17993$as_echo "pre-installed" >&6; }
17994 fi
17995else
17996 ok=yes
17997 case " ${configdirs} " in
17998 *" binutils "*) ;;
17999 *) ok=no ;;
18000 esac
18001
18002 if test $ok = yes; then
18003 # An in-tree tool is available and we can use it
18004 READELF_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/readelf'
18005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
18006$as_echo "just compiled" >&6; }
18007 elif expr "x$READELF_FOR_TARGET" : "x/" > /dev/null; then
18008 # We already found the complete path
18009 ac_dir=`dirname $READELF_FOR_TARGET`
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18011$as_echo "pre-installed in $ac_dir" >&6; }
18012 elif test "x$target" = "x$host"; then
18013 # We can use an host tool
18014 READELF_FOR_TARGET='$(READELF)'
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
18016$as_echo "host tool" >&6; }
18017 else
18018 # We need a cross tool
18019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18020$as_echo "pre-installed" >&6; }
18021 fi
18022fi
18023
5213506e
RW
18024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target strip" >&5
18025$as_echo_n "checking where to find the target strip... " >&6; }
2abefe3d 18026if test "x${build}" != "x${host}" ; then
e8b05380
PB
18027 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
18028 # We already found the complete path
172e41aa 18029 ac_dir=`dirname $STRIP_FOR_TARGET`
5213506e
RW
18030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18031$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
18032 else
18033 # Canadian cross, just use what we found
5213506e
RW
18034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18035$as_echo "pre-installed" >&6; }
e8b05380 18036 fi
2abefe3d
PB
18037else
18038 ok=yes
18039 case " ${configdirs} " in
18040 *" binutils "*) ;;
18041 *) ok=no ;;
18042 esac
1c710c3c 18043
2abefe3d
PB
18044 if test $ok = yes; then
18045 # An in-tree tool is available and we can use it
455c8f48 18046 STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip-new'
5213506e
RW
18047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
18048$as_echo "just compiled" >&6; }
e8b05380
PB
18049 elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
18050 # We already found the complete path
172e41aa 18051 ac_dir=`dirname $STRIP_FOR_TARGET`
5213506e
RW
18052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18053$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
18054 elif test "x$target" = "x$host"; then
18055 # We can use an host tool
18056 STRIP_FOR_TARGET='$(STRIP)'
5213506e
RW
18057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
18058$as_echo "host tool" >&6; }
2abefe3d
PB
18059 else
18060 # We need a cross tool
5213506e
RW
18061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18062$as_echo "pre-installed" >&6; }
2abefe3d
PB
18063 fi
18064fi
0b0dc272 18065
5213506e
RW
18066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target windres" >&5
18067$as_echo_n "checking where to find the target windres... " >&6; }
2abefe3d 18068if test "x${build}" != "x${host}" ; then
e8b05380
PB
18069 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
18070 # We already found the complete path
172e41aa 18071 ac_dir=`dirname $WINDRES_FOR_TARGET`
5213506e
RW
18072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18073$as_echo "pre-installed in $ac_dir" >&6; }
e8b05380
PB
18074 else
18075 # Canadian cross, just use what we found
5213506e
RW
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18077$as_echo "pre-installed" >&6; }
e8b05380 18078 fi
2abefe3d
PB
18079else
18080 ok=yes
18081 case " ${configdirs} " in
18082 *" binutils "*) ;;
18083 *) ok=no ;;
18084 esac
1c710c3c 18085
2abefe3d
PB
18086 if test $ok = yes; then
18087 # An in-tree tool is available and we can use it
18088 WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
5213506e
RW
18089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
18090$as_echo "just compiled" >&6; }
e8b05380
PB
18091 elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
18092 # We already found the complete path
172e41aa 18093 ac_dir=`dirname $WINDRES_FOR_TARGET`
5213506e
RW
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18095$as_echo "pre-installed in $ac_dir" >&6; }
2abefe3d
PB
18096 elif test "x$target" = "x$host"; then
18097 # We can use an host tool
18098 WINDRES_FOR_TARGET='$(WINDRES)'
5213506e
RW
18099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
18100$as_echo "host tool" >&6; }
2abefe3d
PB
18101 else
18102 # We need a cross tool
5213506e
RW
18103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18104$as_echo "pre-installed" >&6; }
2abefe3d 18105 fi
671aa708 18106fi
be912515 18107
5213506e
RW
18108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target windmc" >&5
18109$as_echo_n "checking where to find the target windmc... " >&6; }
901119ae
KT
18110if test "x${build}" != "x${host}" ; then
18111 if expr "x$WINDMC_FOR_TARGET" : "x/" > /dev/null; then
18112 # We already found the complete path
18113 ac_dir=`dirname $WINDMC_FOR_TARGET`
5213506e
RW
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18115$as_echo "pre-installed in $ac_dir" >&6; }
901119ae
KT
18116 else
18117 # Canadian cross, just use what we found
5213506e
RW
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18119$as_echo "pre-installed" >&6; }
901119ae
KT
18120 fi
18121else
18122 ok=yes
18123 case " ${configdirs} " in
18124 *" binutils "*) ;;
18125 *) ok=no ;;
18126 esac
18127
18128 if test $ok = yes; then
18129 # An in-tree tool is available and we can use it
18130 WINDMC_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windmc'
5213506e
RW
18131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
18132$as_echo "just compiled" >&6; }
901119ae
KT
18133 elif expr "x$WINDMC_FOR_TARGET" : "x/" > /dev/null; then
18134 # We already found the complete path
18135 ac_dir=`dirname $WINDMC_FOR_TARGET`
5213506e
RW
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
18137$as_echo "pre-installed in $ac_dir" >&6; }
901119ae
KT
18138 elif test "x$target" = "x$host"; then
18139 # We can use an host tool
18140 WINDMC_FOR_TARGET='$(WINDMC)'
5213506e
RW
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
18142$as_echo "host tool" >&6; }
901119ae
KT
18143 else
18144 # We need a cross tool
5213506e
RW
18145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
18146$as_echo "pre-installed" >&6; }
901119ae
KT
18147 fi
18148fi
18149
be912515
NN
18150
18151
2abefe3d 18152
0b0dc272 18153
671aa708
NN
18154# Certain tools may need extra flags.
18155AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
18156RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
18157NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
18158
2abefe3d
PB
18159# When building target libraries, except in a Canadian cross, we use
18160# the same toolchain as the compiler we just built.
18161COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
18162COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
18163COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
18164if test $host = $build; then
18165 case " $configdirs " in
18166 *" gcc "*)
18167 COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
18168 COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
18169 COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
18170 ;;
18171 esac
18172fi
18173
18174
18175
18176
18177
5213506e
RW
18178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
18179$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
18180# Check whether --enable-maintainer-mode was given.
18181if test "${enable_maintainer_mode+set}" = set; then :
18182 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
ee03dc5e
AO
18183else
18184 USE_MAINTAINER_MODE=no
5213506e
RW
18185fi
18186
18187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
18188$as_echo "$USE_MAINTAINER_MODE" >&6; }
ee03dc5e
AO
18189
18190
18191if test "$USE_MAINTAINER_MODE" = yes; then
18192 MAINTAINER_MODE_TRUE=
18193 MAINTAINER_MODE_FALSE='#'
18194else
18195 MAINTAINER_MODE_TRUE='#'
18196 MAINTAINER_MODE_FALSE=
1c710c3c 18197fi
ee03dc5e
AO
18198MAINT=$MAINTAINER_MODE_TRUE
18199
2805b53a
NN
18200# ---------------------
18201# GCC bootstrap support
18202# ---------------------
18203
18204# Stage specific cflags for build.
18205stage1_cflags="-g"
18206case $build in
18207 vax-*-*)
18208 case ${GCC} in
18209 yes) stage1_cflags="-g -Wa,-J" ;;
18210 *) stage1_cflags="-g -J" ;;
18211 esac ;;
2805b53a
NN
18212esac
18213
0b50988a 18214
2805b53a 18215
8efea775 18216# Enable --enable-checking in stage1 of the compiler.
5213506e
RW
18217# Check whether --enable-stage1-checking was given.
18218if test "${enable_stage1_checking+set}" = set; then :
18219 enableval=$enable_stage1_checking; stage1_checking=--enable-checking=${enable_stage1_checking}
8efea775 18220else
e643dc23 18221 if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
c10b5ea0
JJ
18222 # For --disable-checking or implicit --enable-checking=release, avoid
18223 # setting --enable-checking=gc in the default stage1 checking for LTO
18224 # bootstraps. See PR62077.
c10b5ea0
JJ
18225 case $BUILD_CONFIG in
18226 *lto*)
7db11a5a
JJ
18227 stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
18228 *)
18229 stage1_checking=--enable-checking=yes,types;;
c10b5ea0 18230 esac
7db11a5a
JJ
18231 if test "x$enable_checking" = x && \
18232 test -d ${srcdir}/gcc && \
18233 test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
c100769b 18234 stage1_checking=--enable-checking=yes,types,extra
7db11a5a 18235 fi
8efea775 18236else
e643dc23 18237 stage1_checking=--enable-checking=$enable_checking,types
8efea775 18238fi
5213506e 18239fi
8efea775
PB
18240
18241
2aeb72e9 18242
5213506e
RW
18243# Enable -Werror in bootstrap stage2 and later.
18244# Check whether --enable-werror was given.
18245if test "${enable_werror+set}" = set; then :
18246 enableval=$enable_werror;
09a9c095
NN
18247case ${enable_werror} in
18248 yes) stage2_werror_flag="--enable-werror-always" ;;
18249 *) stage2_werror_flag="" ;;
2805b53a
NN
18250esac
18251
afd88efc
ML
18252else
18253
01c712cb
ML
18254if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
18255 case $BUILD_CONFIG in
18256 bootstrap-debug)
18257 stage2_werror_flag="--enable-werror-always" ;;
18258 "")
18259 stage2_werror_flag="--enable-werror-always" ;;
18260 esac
18261fi
18262
afd88efc
ML
18263fi
18264
18265
01c712cb 18266
2805b53a 18267
f2689b09
SE
18268# Specify what files to not compare during bootstrap.
18269
18270compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
18271case "$target" in
18272 hppa*64*-*-hpux*) ;;
4f943869 18273 powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;;
f2689b09
SE
18274esac
18275
18276
5213506e
RW
18277ac_config_files="$ac_config_files Makefile"
18278
1c710c3c 18279cat >confcache <<\_ACEOF
671aa708
NN
18280# This file is a shell script that caches the results of configure
18281# tests run on this system so they can be shared between configure
1c710c3c
DJ
18282# scripts and configure runs, see configure's option --config-cache.
18283# It is not useful on other systems. If it contains results you don't
18284# want to keep, you may remove or edit it.
671aa708 18285#
1c710c3c
DJ
18286# config.status only pays attention to the cache file if you give it
18287# the --recheck option to rerun configure.
671aa708 18288#
1c710c3c
DJ
18289# `ac_cv_env_foo' variables (set or unset) will be overridden when
18290# loading this file, other *unset* `ac_cv_foo' will be assigned the
18291# following values.
18292
18293_ACEOF
18294
671aa708
NN
18295# The following way of writing the cache mishandles newlines in values,
18296# but we know of no workaround that is simple, portable, and efficient.
5213506e 18297# So, we kill variables containing newlines.
671aa708
NN
18298# Ultrix sh set writes to stderr and can't be redirected directly,
18299# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
18300(
18301 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18302 eval ac_val=\$$ac_var
18303 case $ac_val in #(
18304 *${as_nl}*)
18305 case $ac_var in #(
18306 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18307$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18308 esac
18309 case $ac_var in #(
18310 _ | IFS | as_nl) ;; #(
18311 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18312 *) { eval $ac_var=; unset $ac_var;} ;;
18313 esac ;;
18314 esac
18315 done
18316
1c710c3c 18317 (set) 2>&1 |
5213506e
RW
18318 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18319 *${as_nl}ac_space=\ *)
18320 # `set' does not quote correctly, so add quotes: double-quote
18321 # substitution turns \\\\ into \\, and sed turns \\ into \.
1c710c3c
DJ
18322 sed -n \
18323 "s/'/'\\\\''/g;
18324 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 18325 ;; #(
1c710c3c
DJ
18326 *)
18327 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 18328 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1c710c3c 18329 ;;
5213506e
RW
18330 esac |
18331 sort
18332) |
1c710c3c 18333 sed '
5213506e 18334 /^ac_cv_env_/b end
1c710c3c 18335 t clear
5213506e 18336 :clear
1c710c3c
DJ
18337 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18338 t end
5213506e
RW
18339 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18340 :end' >>confcache
18341if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18342 if test -w "$cache_file"; then
22e05272 18343 if test "x$cache_file" != "x/dev/null"; then
5213506e
RW
18344 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18345$as_echo "$as_me: updating cache $cache_file" >&6;}
22e05272
JM
18346 if test ! -f "$cache_file" || test -h "$cache_file"; then
18347 cat confcache >"$cache_file"
18348 else
18349 case $cache_file in #(
18350 */* | ?:*)
18351 mv -f confcache "$cache_file"$$ &&
18352 mv -f "$cache_file"$$ "$cache_file" ;; #(
18353 *)
18354 mv -f confcache "$cache_file" ;;
18355 esac
18356 fi
18357 fi
671aa708 18358 else
5213506e
RW
18359 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18360$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
671aa708 18361 fi
4977bab6 18362fi
671aa708 18363rm -f confcache
79c06341 18364
671aa708
NN
18365test "x$prefix" = xNONE && prefix=$ac_default_prefix
18366# Let make expand exec_prefix.
18367test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4e77e8f1 18368
671aa708
NN
18369# Transform confdefs.h into DEFS.
18370# Protect against shell expansion while executing Makefile rules.
18371# Protect against Makefile macro expansion.
1c710c3c
DJ
18372#
18373# If the first sed substitution is executed (which looks for macros that
5213506e 18374# take arguments), then branch to the quote section. Otherwise,
1c710c3c 18375# look for a macro that doesn't take arguments.
5213506e
RW
18376ac_script='
18377:mline
18378/\\$/{
18379 N
18380 s,\\\n,,
18381 b mline
18382}
1c710c3c 18383t clear
5213506e
RW
18384:clear
18385s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
1c710c3c 18386t quote
5213506e 18387s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
1c710c3c 18388t quote
5213506e
RW
18389b any
18390:quote
18391s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
18392s/\[/\\&/g
18393s/\]/\\&/g
18394s/\$/$$/g
18395H
18396:any
18397${
18398 g
18399 s/^\n//
18400 s/\n/ /g
18401 p
18402}
18403'
18404DEFS=`sed -n "$ac_script" confdefs.h`
1c710c3c
DJ
18405
18406
18407ac_libobjs=
18408ac_ltlibobjs=
22e05272 18409U=
1c710c3c
DJ
18410for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18411 # 1. Remove the extension, and $U if already installed.
5213506e
RW
18412 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18413 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18414 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18415 # will be set to the directory where LIBOBJS objects are built.
18416 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18417 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
1c710c3c
DJ
18418done
18419LIBOBJS=$ac_libobjs
fb0103e5 18420
1c710c3c 18421LTLIBOBJS=$ac_ltlibobjs
0b0dc272 18422
af71363e 18423
1c710c3c 18424
22e05272 18425: "${CONFIG_STATUS=./config.status}"
5213506e 18426ac_write_fail=0
1c710c3c
DJ
18427ac_clean_files_save=$ac_clean_files
18428ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18430$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18431as_write_fail=0
18432cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
1c710c3c
DJ
18433#! $SHELL
18434# Generated by $as_me.
671aa708 18435# Run this file to recreate the current configuration.
671aa708 18436# Compiler output produced by configure, useful for debugging
1c710c3c 18437# configure, is in config.log if it exists.
0b0dc272 18438
1c710c3c
DJ
18439debug=false
18440ac_cs_recheck=false
18441ac_cs_silent=false
1c710c3c 18442
5213506e
RW
18443SHELL=\${CONFIG_SHELL-$SHELL}
18444export SHELL
18445_ASEOF
18446cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18447## -------------------- ##
18448## M4sh Initialization. ##
18449## -------------------- ##
18450
18451# Be more Bourne compatible
18452DUALCASE=1; export DUALCASE # for MKS sh
18453if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
1c710c3c
DJ
18454 emulate sh
18455 NULLCMD=:
5213506e 18456 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
1c710c3c
DJ
18457 # is contrary to our usage. Disable this feature.
18458 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
18459 setopt NO_GLOB_SUBST
18460else
18461 case `(set -o) 2>/dev/null` in #(
18462 *posix*) :
18463 set -o posix ;; #(
18464 *) :
18465 ;;
18466esac
1c710c3c 18467fi
1c710c3c 18468
5213506e
RW
18469
18470as_nl='
18471'
18472export as_nl
18473# Printing a long string crashes Solaris 7 /usr/bin/printf.
18474as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18475as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18476as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18477# Prefer a ksh shell builtin over an external printf program on Solaris,
18478# but without wasting forks for bash or zsh.
18479if test -z "$BASH_VERSION$ZSH_VERSION" \
18480 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18481 as_echo='print -r --'
18482 as_echo_n='print -rn --'
18483elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18484 as_echo='printf %s\n'
18485 as_echo_n='printf %s'
18486else
18487 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18488 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18489 as_echo_n='/usr/ucb/echo -n'
18490 else
18491 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18492 as_echo_n_body='eval
18493 arg=$1;
18494 case $arg in #(
18495 *"$as_nl"*)
18496 expr "X$arg" : "X\\(.*\\)$as_nl";
18497 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18498 esac;
18499 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18500 '
18501 export as_echo_n_body
18502 as_echo_n='sh -c $as_echo_n_body as_echo'
18503 fi
18504 export as_echo_body
18505 as_echo='sh -c $as_echo_body as_echo'
1c710c3c
DJ
18506fi
18507
5213506e
RW
18508# The user is always right.
18509if test "${PATH_SEPARATOR+set}" != set; then
18510 PATH_SEPARATOR=:
18511 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18512 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18513 PATH_SEPARATOR=';'
18514 }
18515fi
18516
18517
18518# IFS
18519# We need space, tab and new line, in precisely that order. Quoting is
18520# there to prevent editors from complaining about space-tab.
18521# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18522# splitting by setting IFS to empty value.)
18523IFS=" "" $as_nl"
18524
18525# Find who we are. Look in the path if we contain no directory separator.
22e05272 18526as_myself=
5213506e
RW
18527case $0 in #((
18528 *[\\/]* ) as_myself=$0 ;;
18529 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530for as_dir in $PATH
18531do
18532 IFS=$as_save_IFS
18533 test -z "$as_dir" && as_dir=.
18534 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18535 done
18536IFS=$as_save_IFS
18537
18538 ;;
18539esac
18540# We did not find ourselves, most probably we were run as `sh COMMAND'
18541# in which case we are not to be found in the path.
18542if test "x$as_myself" = x; then
18543 as_myself=$0
18544fi
18545if test ! -f "$as_myself"; then
18546 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18547 exit 1
18548fi
1c710c3c 18549
5213506e
RW
18550# Unset variables that we do not need and which cause bugs (e.g. in
18551# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18552# suppresses any "Segmentation fault" message there. '((' could
18553# trigger a bug in pdksh 5.2.14.
18554for as_var in BASH_ENV ENV MAIL MAILPATH
18555do eval test x\${$as_var+set} = xset \
18556 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18557done
1c710c3c
DJ
18558PS1='$ '
18559PS2='> '
18560PS4='+ '
18561
18562# NLS nuisances.
5213506e
RW
18563LC_ALL=C
18564export LC_ALL
18565LANGUAGE=C
18566export LANGUAGE
18567
18568# CDPATH.
18569(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18570
18571
22e05272
JM
18572# as_fn_error STATUS ERROR [LINENO LOG_FD]
18573# ----------------------------------------
5213506e
RW
18574# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18575# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22e05272 18576# script with STATUS, using 1 if that was 0.
5213506e
RW
18577as_fn_error ()
18578{
22e05272
JM
18579 as_status=$1; test $as_status -eq 0 && as_status=1
18580 if test "$4"; then
18581 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18582 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
1c710c3c 18583 fi
22e05272 18584 $as_echo "$as_me: error: $2" >&2
5213506e
RW
18585 as_fn_exit $as_status
18586} # as_fn_error
18587
18588
18589# as_fn_set_status STATUS
18590# -----------------------
18591# Set $? to STATUS, without forking.
18592as_fn_set_status ()
18593{
18594 return $1
18595} # as_fn_set_status
18596
18597# as_fn_exit STATUS
18598# -----------------
18599# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18600as_fn_exit ()
18601{
18602 set +e
18603 as_fn_set_status $1
18604 exit $1
18605} # as_fn_exit
18606
18607# as_fn_unset VAR
18608# ---------------
18609# Portably unset VAR.
18610as_fn_unset ()
18611{
18612 { eval $1=; unset $1;}
18613}
18614as_unset=as_fn_unset
18615# as_fn_append VAR VALUE
18616# ----------------------
18617# Append the text in VALUE to the end of the definition contained in VAR. Take
18618# advantage of any shell optimizations that allow amortized linear growth over
18619# repeated appends, instead of the typical quadratic growth present in naive
18620# implementations.
18621if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18622 eval 'as_fn_append ()
18623 {
18624 eval $1+=\$2
18625 }'
18626else
18627 as_fn_append ()
18628 {
18629 eval $1=\$$1\$2
18630 }
18631fi # as_fn_append
18632
18633# as_fn_arith ARG...
18634# ------------------
18635# Perform arithmetic evaluation on the ARGs, and store the result in the
18636# global $as_val. Take advantage of shells that can avoid forks. The arguments
18637# must be portable across $(()) and expr.
18638if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18639 eval 'as_fn_arith ()
18640 {
18641 as_val=$(( $* ))
18642 }'
18643else
18644 as_fn_arith ()
18645 {
18646 as_val=`expr "$@" || test $? -eq 1`
18647 }
18648fi # as_fn_arith
18649
1c710c3c 18650
5213506e
RW
18651if expr a : '\(a\)' >/dev/null 2>&1 &&
18652 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1c710c3c
DJ
18653 as_expr=expr
18654else
18655 as_expr=false
18656fi
18657
5213506e 18658if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1c710c3c
DJ
18659 as_basename=basename
18660else
18661 as_basename=false
18662fi
18663
5213506e
RW
18664if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18665 as_dirname=dirname
18666else
18667 as_dirname=false
18668fi
1c710c3c 18669
5213506e 18670as_me=`$as_basename -- "$0" ||
1c710c3c
DJ
18671$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18672 X"$0" : 'X\(//\)$' \| \
5213506e
RW
18673 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18674$as_echo X/"$0" |
18675 sed '/^.*\/\([^/][^/]*\)\/*$/{
18676 s//\1/
18677 q
18678 }
18679 /^X\/\(\/\/\)$/{
18680 s//\1/
18681 q
18682 }
18683 /^X\/\(\/\).*/{
18684 s//\1/
18685 q
18686 }
18687 s/.*/./; q'`
2aeb72e9 18688
2aeb72e9
DD
18689# Avoid depending upon Character Ranges.
18690as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18691as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18692as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18693as_cr_digits='0123456789'
18694as_cr_alnum=$as_cr_Letters$as_cr_digits
18695
5213506e
RW
18696ECHO_C= ECHO_N= ECHO_T=
18697case `echo -n x` in #(((((
18698-n*)
18699 case `echo 'xy\c'` in
18700 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18701 xy) ECHO_C='\c';;
18702 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18703 ECHO_T=' ';;
18704 esac;;
18705*)
18706 ECHO_N='-n';;
1c710c3c
DJ
18707esac
18708
5213506e
RW
18709rm -f conf$$ conf$$.exe conf$$.file
18710if test -d conf$$.dir; then
18711 rm -f conf$$.dir/conf$$.file
1c710c3c 18712else
5213506e
RW
18713 rm -f conf$$.dir
18714 mkdir conf$$.dir 2>/dev/null
1c710c3c 18715fi
5213506e
RW
18716if (echo >conf$$.file) 2>/dev/null; then
18717 if ln -s conf$$.file conf$$ 2>/dev/null; then
2aeb72e9 18718 as_ln_s='ln -s'
5213506e
RW
18719 # ... but there are two gotchas:
18720 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18721 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22e05272 18722 # In both cases, we have to default to `cp -pR'.
5213506e 18723 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22e05272 18724 as_ln_s='cp -pR'
5213506e
RW
18725 elif ln conf$$.file conf$$ 2>/dev/null; then
18726 as_ln_s=ln
18727 else
22e05272 18728 as_ln_s='cp -pR'
2aeb72e9 18729 fi
1c710c3c 18730else
22e05272 18731 as_ln_s='cp -pR'
1c710c3c 18732fi
5213506e
RW
18733rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18734rmdir conf$$.dir 2>/dev/null
18735
18736
18737# as_fn_mkdir_p
18738# -------------
18739# Create "$as_dir" as a directory, including parents if necessary.
18740as_fn_mkdir_p ()
18741{
18742
18743 case $as_dir in #(
18744 -*) as_dir=./$as_dir;;
18745 esac
18746 test -d "$as_dir" || eval $as_mkdir_p || {
18747 as_dirs=
18748 while :; do
18749 case $as_dir in #(
18750 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18751 *) as_qdir=$as_dir;;
18752 esac
18753 as_dirs="'$as_qdir' $as_dirs"
18754 as_dir=`$as_dirname -- "$as_dir" ||
18755$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18756 X"$as_dir" : 'X\(//\)[^/]' \| \
18757 X"$as_dir" : 'X\(//\)$' \| \
18758 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18759$as_echo X"$as_dir" |
18760 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18761 s//\1/
18762 q
18763 }
18764 /^X\(\/\/\)[^/].*/{
18765 s//\1/
18766 q
18767 }
18768 /^X\(\/\/\)$/{
18769 s//\1/
18770 q
18771 }
18772 /^X\(\/\).*/{
18773 s//\1/
18774 q
18775 }
18776 s/.*/./; q'`
18777 test -d "$as_dir" && break
18778 done
18779 test -z "$as_dirs" || eval "mkdir $as_dirs"
22e05272 18780 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
5213506e 18781
1c710c3c 18782
5213506e 18783} # as_fn_mkdir_p
1c710c3c 18784if mkdir -p . 2>/dev/null; then
5213506e 18785 as_mkdir_p='mkdir -p "$as_dir"'
1c710c3c
DJ
18786else
18787 test -d ./-p && rmdir ./-p
18788 as_mkdir_p=false
18789fi
18790
22e05272
JM
18791
18792# as_fn_executable_p FILE
18793# -----------------------
18794# Test if FILE is an executable regular file.
18795as_fn_executable_p ()
18796{
18797 test -f "$1" && test -x "$1"
18798} # as_fn_executable_p
18799as_test_x='test -x'
18800as_executable_p=as_fn_executable_p
1c710c3c
DJ
18801
18802# Sed expression to map a string onto a valid CPP name.
18803as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18804
18805# Sed expression to map a string onto a valid variable name.
18806as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18807
18808
1c710c3c 18809exec 6>&1
5213506e
RW
18810## ----------------------------------- ##
18811## Main body of $CONFIG_STATUS script. ##
18812## ----------------------------------- ##
18813_ASEOF
18814test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18815
18816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18817# Save the log message, to keep $0 and so on meaningful, and to
1c710c3c 18818# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
18819# values after options handling.
18820ac_log="
1c710c3c 18821This file was extended by $as_me, which was
22e05272 18822generated by GNU Autoconf 2.69. Invocation command line was
1c710c3c
DJ
18823
18824 CONFIG_FILES = $CONFIG_FILES
18825 CONFIG_HEADERS = $CONFIG_HEADERS
18826 CONFIG_LINKS = $CONFIG_LINKS
18827 CONFIG_COMMANDS = $CONFIG_COMMANDS
18828 $ $0 $@
18829
5213506e
RW
18830on `(hostname || uname -n) 2>/dev/null | sed 1q`
18831"
18832
1c710c3c
DJ
18833_ACEOF
18834
5213506e
RW
18835case $ac_config_files in *"
18836"*) set x $ac_config_files; shift; ac_config_files=$*;;
18837esac
1c710c3c 18838
2aeb72e9 18839
2aeb72e9 18840
5213506e
RW
18841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18842# Files that config.status was made for.
18843config_files="$ac_config_files"
1c710c3c 18844
5213506e 18845_ACEOF
2aeb72e9 18846
5213506e 18847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1c710c3c 18848ac_cs_usage="\
5213506e
RW
18849\`$as_me' instantiates files and other configuration actions
18850from templates according to the current configuration. Unless the files
18851and actions are specified as TAGs, all are instantiated by default.
1c710c3c 18852
5213506e 18853Usage: $0 [OPTION]... [TAG]...
1c710c3c
DJ
18854
18855 -h, --help print this help, then exit
5213506e 18856 -V, --version print version number and configuration settings, then exit
22e05272 18857 --config print configuration, then exit
5213506e
RW
18858 -q, --quiet, --silent
18859 do not print progress messages
1c710c3c
DJ
18860 -d, --debug don't remove temporary files
18861 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
18862 --file=FILE[:TEMPLATE]
18863 instantiate the configuration file FILE
1c710c3c
DJ
18864
18865Configuration files:
18866$config_files
18867
5213506e 18868Report bugs to the package provider."
2aeb72e9 18869
5213506e
RW
18870_ACEOF
18871cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22e05272 18872ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1c710c3c
DJ
18873ac_cs_version="\\
18874config.status
22e05272
JM
18875configured by $0, generated by GNU Autoconf 2.69,
18876 with options \\"\$ac_cs_config\\"
1c710c3c 18877
22e05272 18878Copyright (C) 2012 Free Software Foundation, Inc.
1c710c3c
DJ
18879This config.status script is free software; the Free Software Foundation
18880gives unlimited permission to copy, distribute and modify it."
5213506e
RW
18881
18882ac_pwd='$ac_pwd'
18883srcdir='$srcdir'
18884INSTALL='$INSTALL'
87264276 18885AWK='$AWK'
5213506e 18886test -n "\$AWK" || AWK=awk
1c710c3c
DJ
18887_ACEOF
18888
5213506e
RW
18889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18890# The default lists apply if the user does not specify any file.
1c710c3c
DJ
18891ac_need_defaults=:
18892while test $# != 0
a4b9e93e 18893do
1c710c3c 18894 case $1 in
22e05272 18895 --*=?*)
5213506e
RW
18896 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18897 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
1c710c3c
DJ
18898 ac_shift=:
18899 ;;
22e05272
JM
18900 --*=)
18901 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18902 ac_optarg=
18903 ac_shift=:
18904 ;;
5213506e 18905 *)
1c710c3c
DJ
18906 ac_option=$1
18907 ac_optarg=$2
18908 ac_shift=shift
18909 ;;
1c710c3c
DJ
18910 esac
18911
18912 case $ac_option in
18913 # Handling of the options.
671aa708 18914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1c710c3c 18915 ac_cs_recheck=: ;;
5213506e
RW
18916 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18917 $as_echo "$ac_cs_version"; exit ;;
22e05272
JM
18918 --config | --confi | --conf | --con | --co | --c )
18919 $as_echo "$ac_cs_config"; exit ;;
5213506e 18920 --debug | --debu | --deb | --de | --d | -d )
1c710c3c
DJ
18921 debug=: ;;
18922 --file | --fil | --fi | --f )
18923 $ac_shift
5213506e
RW
18924 case $ac_optarg in
18925 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22e05272 18926 '') as_fn_error $? "missing file argument" ;;
5213506e
RW
18927 esac
18928 as_fn_append CONFIG_FILES " '$ac_optarg'"
2aeb72e9 18929 ac_need_defaults=false;;
5213506e
RW
18930 --he | --h | --help | --hel | -h )
18931 $as_echo "$ac_cs_usage"; exit ;;
1c710c3c
DJ
18932 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18933 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18934 ac_cs_silent=: ;;
18935
18936 # This is an error.
22e05272 18937 -*) as_fn_error $? "unrecognized option: \`$1'
5213506e 18938Try \`$0 --help' for more information." ;;
1c710c3c 18939
5213506e
RW
18940 *) as_fn_append ac_config_targets " $1"
18941 ac_need_defaults=false ;;
1c710c3c 18942
0b0dc272 18943 esac
1c710c3c 18944 shift
0b0dc272
AM
18945done
18946
1c710c3c 18947ac_configure_extra_args=
0b0dc272 18948
1c710c3c
DJ
18949if $ac_cs_silent; then
18950 exec 6>/dev/null
18951 ac_configure_extra_args="$ac_configure_extra_args --silent"
18952fi
0b0dc272 18953
1c710c3c 18954_ACEOF
5213506e 18955cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1c710c3c 18956if \$ac_cs_recheck; then
22e05272 18957 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5213506e
RW
18958 shift
18959 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18960 CONFIG_SHELL='$SHELL'
18961 export CONFIG_SHELL
18962 exec "\$@"
1c710c3c
DJ
18963fi
18964
18965_ACEOF
5213506e
RW
18966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18967exec 5>>config.log
18968{
18969 echo
18970 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18971## Running $as_me. ##
18972_ASBOX
18973 $as_echo "$ac_log"
18974} >&5
1c710c3c 18975
5213506e
RW
18976_ACEOF
18977cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3e54529c
RW
18978#
18979# INIT-COMMANDS
18980#
18981extrasub_build="$extrasub_build"
18982 extrasub_host="$extrasub_host"
18983 extrasub_target="$extrasub_target"
18984
5213506e 18985_ACEOF
1c710c3c 18986
5213506e 18987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11a67599 18988
5213506e 18989# Handling of arguments.
1c710c3c
DJ
18990for ac_config_target in $ac_config_targets
18991do
5213506e
RW
18992 case $ac_config_target in
18993 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18994
22e05272 18995 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1c710c3c
DJ
18996 esac
18997done
18998
5213506e 18999
1c710c3c
DJ
19000# If the user did not use the arguments to specify the items to instantiate,
19001# then the envvar interface is used. Set only those that are not.
19002# We use the long form for the default assignment because of an extremely
19003# bizarre bug on SunOS 4.1.3.
19004if $ac_need_defaults; then
19005 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19006fi
19007
19008# Have a temporary directory for convenience. Make it in the build tree
5213506e 19009# simply because there is no reason against having it here, and in addition,
1c710c3c 19010# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
19011# Hook for its removal unless debugging.
19012# Note that there is a small window in which the directory will not be cleaned:
19013# after its creation but before its name has been assigned to `$tmp'.
1c710c3c
DJ
19014$debug ||
19015{
22e05272 19016 tmp= ac_tmp=
5213506e 19017 trap 'exit_status=$?
22e05272
JM
19018 : "${ac_tmp:=$tmp}"
19019 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
5213506e
RW
19020' 0
19021 trap 'as_fn_exit 1' 1 2 13 15
1c710c3c 19022}
1c710c3c
DJ
19023# Create a (secure) tmp directory for tmp files.
19024
19025{
5213506e 19026 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22e05272 19027 test -d "$tmp"
1c710c3c
DJ
19028} ||
19029{
5213506e
RW
19030 tmp=./conf$$-$RANDOM
19031 (umask 077 && mkdir "$tmp")
22e05272
JM
19032} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19033ac_tmp=$tmp
5213506e
RW
19034
19035# Set up the scripts for CONFIG_FILES section.
19036# No need to generate them if there are no CONFIG_FILES.
19037# This happens for instance with `./config.status config.h'.
19038if test -n "$CONFIG_FILES"; then
19039
19040if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19041 ac_cs_awk_getline=:
19042 ac_cs_awk_pipe_init=
19043 ac_cs_awk_read_file='
19044 while ((getline aline < (F[key])) > 0)
19045 print(aline)
19046 close(F[key])'
19047 ac_cs_awk_pipe_fini=
19048else
19049 ac_cs_awk_getline=false
19050 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19051 ac_cs_awk_read_file='
19052 print "|#_!!_#|"
19053 print "cat " F[key] " &&"
19054 '$ac_cs_awk_pipe_init
19055 # The final `:' finishes the AND list.
19056 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19057fi
19058ac_cr=`echo X | tr X '\015'`
19059# On cygwin, bash can eat \r inside `` if the user requested igncr.
19060# But we know of no other shell where ac_cr would be empty at this
19061# point, so we can use a bashism as a fallback.
19062if test "x$ac_cr" = x; then
19063 eval ac_cr=\$\'\\r\'
19064fi
19065ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19066if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22e05272 19067 ac_cs_awk_cr='\\r'
5213506e
RW
19068else
19069 ac_cs_awk_cr=$ac_cr
19070fi
19071
22e05272 19072echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
5213506e
RW
19073_ACEOF
19074
19075# Create commands to substitute file output variables.
1c710c3c 19076{
5213506e 19077 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
22e05272 19078 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
5213506e
RW
19079 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19080 echo "_ACAWK" &&
19081 echo "_ACEOF"
19082} >conf$$files.sh &&
19083. ./conf$$files.sh ||
22e05272 19084 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5213506e 19085rm -f conf$$files.sh
1c710c3c 19086
5213506e
RW
19087{
19088 echo "cat >conf$$subs.awk <<_ACEOF" &&
19089 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19090 echo "_ACEOF"
19091} >conf$$subs.sh ||
22e05272
JM
19092 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19093ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
5213506e
RW
19094ac_delim='%!_!# '
19095for ac_last_try in false false false false false :; do
19096 . ./conf$$subs.sh ||
22e05272 19097 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5213506e
RW
19098
19099 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19100 if test $ac_delim_n = $ac_delim_num; then
19101 break
19102 elif $ac_last_try; then
22e05272 19103 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5213506e
RW
19104 else
19105 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19106 fi
19107done
19108rm -f conf$$subs.sh
19109
19110cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22e05272 19111cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
2aeb72e9 19112_ACEOF
5213506e
RW
19113sed -n '
19114h
19115s/^/S["/; s/!.*/"]=/
19116p
19117g
19118s/^[^!]*!//
19119:repl
19120t repl
19121s/'"$ac_delim"'$//
19122t delim
19123:nl
19124h
22e05272 19125s/\(.\{148\}\)..*/\1/
5213506e
RW
19126t more1
19127s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19128p
19129n
19130b repl
19131:more1
19132s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19133p
19134g
19135s/.\{148\}//
19136t nl
19137:delim
19138h
22e05272 19139s/\(.\{148\}\)..*/\1/
5213506e
RW
19140t more2
19141s/["\\]/\\&/g; s/^/"/; s/$/"/
19142p
19143b
19144:more2
19145s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19146p
19147g
19148s/.\{148\}//
19149t delim
19150' <conf$$subs.awk | sed '
19151/^[^""]/{
19152 N
19153 s/\n//
19154}
19155' >>$CONFIG_STATUS || ac_write_fail=1
19156rm -f conf$$subs.awk
19157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19158_ACAWK
22e05272 19159cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
5213506e
RW
19160 for (key in S) S_is_set[key] = 1
19161 FS = "\a"
19162 \$ac_cs_awk_pipe_init
19163}
19164{
19165 line = $ 0
19166 nfields = split(line, field, "@")
19167 substed = 0
19168 len = length(field[1])
19169 for (i = 2; i < nfields; i++) {
19170 key = field[i]
19171 keylen = length(key)
19172 if (S_is_set[key]) {
19173 value = S[key]
19174 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19175 len += length(value) + length(field[++i])
19176 substed = 1
19177 } else
19178 len += 1 + keylen
19179 }
19180 if (nfields == 3 && !substed) {
19181 key = field[2]
19182 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19183 \$ac_cs_awk_read_file
19184 next
19185 }
19186 }
19187 print line
19188}
19189\$ac_cs_awk_pipe_fini
19190_ACAWK
19191_ACEOF
19192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19193if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19194 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19195else
19196 cat
22e05272
JM
19197fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19198 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
5213506e
RW
19199_ACEOF
19200
22e05272
JM
19201# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19202# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
5213506e
RW
19203# trailing colons and then remove the whole line if VPATH becomes empty
19204# (actually we leave an empty line to preserve line numbers).
19205if test "x$srcdir" = x.; then
22e05272
JM
19206 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19207h
19208s///
19209s/^/:/
19210s/[ ]*$/:/
19211s/:\$(srcdir):/:/g
19212s/:\${srcdir}:/:/g
19213s/:@srcdir@:/:/g
19214s/^:*//
5213506e 19215s/:*$//
22e05272
JM
19216x
19217s/\(=[ ]*\).*/\1/
19218G
19219s/\n//
5213506e
RW
19220s/^[^=]*=[ ]*$//
19221}'
19222fi
2aeb72e9 19223
5213506e
RW
19224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19225fi # test -n "$CONFIG_FILES"
2aeb72e9 19226
1c710c3c 19227
5213506e
RW
19228eval set X " :F $CONFIG_FILES "
19229shift
19230for ac_tag
19231do
19232 case $ac_tag in
19233 :[FHLC]) ac_mode=$ac_tag; continue;;
19234 esac
19235 case $ac_mode$ac_tag in
19236 :[FHL]*:*);;
22e05272 19237 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
5213506e
RW
19238 :[FH]-) ac_tag=-:-;;
19239 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19240 esac
19241 ac_save_IFS=$IFS
19242 IFS=:
19243 set x $ac_tag
19244 IFS=$ac_save_IFS
19245 shift
19246 ac_file=$1
19247 shift
79c06341 19248
5213506e
RW
19249 case $ac_mode in
19250 :L) ac_source=$1;;
19251 :[FH])
19252 ac_file_inputs=
19253 for ac_f
19254 do
19255 case $ac_f in
22e05272 19256 -) ac_f="$ac_tmp/stdin";;
5213506e
RW
19257 *) # Look for the file first in the build tree, then in the source tree
19258 # (if the path is not absolute). The absolute path cannot be DOS-style,
19259 # because $ac_f cannot contain `:'.
19260 test -f "$ac_f" ||
19261 case $ac_f in
19262 [\\/$]*) false;;
19263 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19264 esac ||
22e05272 19265 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
5213506e
RW
19266 esac
19267 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19268 as_fn_append ac_file_inputs " '$ac_f'"
19269 done
1c710c3c 19270
5213506e
RW
19271 # Let's still pretend it is `configure' which instantiates (i.e., don't
19272 # use $as_me), people would be surprised to read:
19273 # /* config.h. Generated by config.status. */
19274 configure_input='Generated from '`
19275 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19276 `' by configure.'
19277 if test x"$ac_file" != x-; then
19278 configure_input="$ac_file. $configure_input"
19279 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19280$as_echo "$as_me: creating $ac_file" >&6;}
2aeb72e9 19281 fi
5213506e
RW
19282 # Neutralize special characters interpreted by sed in replacement strings.
19283 case $configure_input in #(
19284 *\&* | *\|* | *\\* )
19285 ac_sed_conf_input=`$as_echo "$configure_input" |
19286 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19287 *) ac_sed_conf_input=$configure_input;;
19288 esac
11a67599 19289
5213506e 19290 case $ac_tag in
22e05272
JM
19291 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19292 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
5213506e
RW
19293 esac
19294 ;;
11a67599
ZW
19295 esac
19296
5213506e 19297 ac_dir=`$as_dirname -- "$ac_file" ||
1c710c3c
DJ
19298$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19299 X"$ac_file" : 'X\(//\)[^/]' \| \
19300 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
19301 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19302$as_echo X"$ac_file" |
19303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19304 s//\1/
19305 q
19306 }
19307 /^X\(\/\/\)[^/].*/{
19308 s//\1/
19309 q
19310 }
19311 /^X\(\/\/\)$/{
19312 s//\1/
19313 q
19314 }
19315 /^X\(\/\).*/{
19316 s//\1/
19317 q
19318 }
19319 s/.*/./; q'`
19320 as_dir="$ac_dir"; as_fn_mkdir_p
1c710c3c 19321 ac_builddir=.
0b0dc272 19322
5213506e
RW
19323case "$ac_dir" in
19324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19325*)
19326 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19327 # A ".." for each directory in $ac_dir_suffix.
19328 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19329 case $ac_top_builddir_sub in
19330 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19331 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19332 esac ;;
19333esac
19334ac_abs_top_builddir=$ac_pwd
19335ac_abs_builddir=$ac_pwd$ac_dir_suffix
19336# for backward compatibility:
19337ac_top_builddir=$ac_top_build_prefix
1c710c3c
DJ
19338
19339case $srcdir in
5213506e 19340 .) # We are building in place.
1c710c3c 19341 ac_srcdir=.
5213506e
RW
19342 ac_top_srcdir=$ac_top_builddir_sub
19343 ac_abs_top_srcdir=$ac_pwd ;;
19344 [\\/]* | ?:[\\/]* ) # Absolute name.
1c710c3c 19345 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
19346 ac_top_srcdir=$srcdir
19347 ac_abs_top_srcdir=$srcdir ;;
19348 *) # Relative name.
19349 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19350 ac_top_srcdir=$ac_top_build_prefix$srcdir
19351 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1c710c3c 19352esac
5213506e 19353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
a4b9e93e 19354
0b0dc272 19355
5213506e
RW
19356 case $ac_mode in
19357 :F)
19358 #
19359 # CONFIG_FILE
19360 #
1c710c3c
DJ
19361
19362 case $INSTALL in
19363 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5213506e 19364 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
671aa708 19365 esac
5213506e 19366_ACEOF
11a67599 19367
5213506e
RW
19368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19369# If the template does not know about datarootdir, expand it.
19370# FIXME: This hack should be removed a few years after 2.60.
19371ac_datarootdir_hack=; ac_datarootdir_seen=
19372ac_sed_dataroot='
19373/datarootdir/ {
19374 p
19375 q
19376}
19377/@datadir@/p
19378/@docdir@/p
19379/@infodir@/p
19380/@localedir@/p
19381/@mandir@/p'
19382case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19383*datarootdir*) ac_datarootdir_seen=yes;;
19384*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19386$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11a67599 19387_ACEOF
5213506e
RW
19388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19389 ac_datarootdir_hack='
19390 s&@datadir@&$datadir&g
19391 s&@docdir@&$docdir&g
19392 s&@infodir@&$infodir&g
19393 s&@localedir@&$localedir&g
19394 s&@mandir@&$mandir&g
19395 s&\\\${datarootdir}&$datarootdir&g' ;;
19396esac
19397_ACEOF
19398
19399# Neutralize VPATH when `$srcdir' = `.'.
19400# Shell code in configure.ac might set extrasub.
19401# FIXME: do we really want to maintain this feature?
19402cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19403ac_sed_extra="$ac_vpsub
1c710c3c
DJ
19404$extrasub
19405_ACEOF
5213506e 19406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1c710c3c
DJ
19407:t
19408/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
19409s|@configure_input@|$ac_sed_conf_input|;t t
19410s&@top_builddir@&$ac_top_builddir_sub&;t t
19411s&@top_build_prefix@&$ac_top_build_prefix&;t t
19412s&@srcdir@&$ac_srcdir&;t t
19413s&@abs_srcdir@&$ac_abs_srcdir&;t t
19414s&@top_srcdir@&$ac_top_srcdir&;t t
19415s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19416s&@builddir@&$ac_builddir&;t t
19417s&@abs_builddir@&$ac_abs_builddir&;t t
19418s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19419s&@INSTALL@&$ac_INSTALL&;t t
19420$ac_datarootdir_hack
19421"
19422eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19423if $ac_cs_awk_getline; then
22e05272 19424 $AWK -f "$ac_tmp/subs.awk"
5213506e 19425else
22e05272
JM
19426 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19427fi \
19428 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5213506e
RW
19429
19430test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22e05272
JM
19431 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19432 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19433 "$ac_tmp/out"`; test -z "$ac_out"; } &&
5213506e 19434 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22e05272 19435which seems to be undefined. Please make sure it is defined" >&5
5213506e 19436$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22e05272 19437which seems to be undefined. Please make sure it is defined" >&2;}
5213506e 19438
22e05272 19439 rm -f "$ac_tmp/stdin"
5213506e 19440 case $ac_file in
22e05272
JM
19441 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19442 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
5213506e 19443 esac \
22e05272 19444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5213506e 19445 ;;
11a67599 19446
11a67599 19447
79c06341 19448
5213506e
RW
19449 esac
19450
3e54529c
RW
19451
19452 case $ac_file$ac_mode in
19453 "Makefile":F) sed "$extrasub_build" Makefile |
19454 sed "$extrasub_host" |
19455 sed "$extrasub_target" > mf$$
19456 mv -f mf$$ Makefile ;;
19457
19458 esac
5213506e
RW
19459done # for ac_tag
19460
19461
19462as_fn_exit 0
1c710c3c 19463_ACEOF
1c710c3c
DJ
19464ac_clean_files=$ac_clean_files_save
19465
5213506e 19466test $ac_write_fail = 0 ||
22e05272 19467 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
5213506e 19468
1c710c3c
DJ
19469
19470# configure is writing to config.log, and then calls config.status.
19471# config.status does its own redirection, appending to config.log.
19472# Unfortunately, on DOS this fails, as config.log is still kept open
19473# by configure, so config.status won't be able to write to it; its
19474# output is simply discarded. So we exec the FD to /dev/null,
19475# effectively closing config.log, so it can be properly (re)opened and
19476# appended to by config.status. When coming back to configure, we
19477# need to make the FD available again.
19478if test "$no_create" != yes; then
19479 ac_cs_success=:
19480 ac_config_status_args=
19481 test "$silent" = yes &&
19482 ac_config_status_args="$ac_config_status_args --quiet"
19483 exec 5>/dev/null
19484 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19485 exec 5>>config.log
19486 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19487 # would make configure fail if this is the last instruction.
22e05272 19488 $ac_cs_success || as_fn_exit 1
5213506e
RW
19489fi
19490if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19492$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
1c710c3c 19493fi
79c06341 19494