]> git.ipfire.org Git - thirdparty/gcc.git/blame - configure
configure.ac: Add -Wc++-compat to ac_libibety_warn_cflags where supported.
[thirdparty/gcc.git] / configure
CommitLineData
671aa708 1#! /bin/sh
72a7ab82 2
671aa708 3# Guess values for system-dependent variables and create Makefiles.
72a7ab82
AP
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
671aa708
NN
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
72a7ab82
AP
10# Defaults:
11ac_help=
671aa708 12ac_default_prefix=/usr/local
72a7ab82
AP
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-libada Builds libada directory"
16ac_help="$ac_help
17 --enable-libssp Builds libssp directory"
18ac_help="$ac_help
19 --with-mpfr-dir=PATH Specify source directory for MPFR library"
20ac_help="$ac_help
21 --with-mpfr=PATH Specify directory for installed MPFR library"
22ac_help="$ac_help
23 --with-gmp-dir=PATH Specify source directory for GMP library"
24ac_help="$ac_help
25 --with-gmp=PATH Specify directory for installed GMP library"
26ac_help="$ac_help
27 --with-build-sysroot=sysroot
28 use sysroot as the system root during the build"
29ac_help="$ac_help
2d309510 30 --enable-bootstrap Enable bootstrapping [yes if native build]"
72a7ab82
AP
31ac_help="$ac_help
32 --enable-serial-[{host,target,build}-]configure
33 Force sequential configuration of
34 sub-packages for the host, target or build
35 machine, or all sub-packages"
e8b05380
PB
36ac_help="$ac_help
37 --with-build-time-tools=path
38 use given path to find target tools during the build"
72a7ab82
AP
39ac_help="$ac_help
40 --enable-maintainer-mode enable make rules and dependencies not useful
41 (and sometimes confusing) to the casual installer"
42ac_help="$ac_help
43 --enable-werror enable -Werror in bootstrap stage2 and later"
671aa708
NN
44
45# Initialize some variables set by options.
46# The variables have the same names as the options, with
47# dashes changed to underlines.
72a7ab82
AP
48build=NONE
49cache_file=./config.cache
671aa708 50exec_prefix=NONE
72a7ab82 51host=NONE
671aa708 52no_create=
72a7ab82 53nonopt=NONE
671aa708
NN
54no_recursion=
55prefix=NONE
56program_prefix=NONE
57program_suffix=NONE
58program_transform_name=s,x,x,
59silent=
60site=
61srcdir=
72a7ab82 62target=NONE
671aa708
NN
63verbose=
64x_includes=NONE
65x_libraries=NONE
66bindir='${exec_prefix}/bin'
67sbindir='${exec_prefix}/sbin'
68libexecdir='${exec_prefix}/libexec'
69datadir='${prefix}/share'
70sysconfdir='${prefix}/etc'
71sharedstatedir='${prefix}/com'
72localstatedir='${prefix}/var'
73libdir='${exec_prefix}/lib'
74includedir='${prefix}/include'
75oldincludedir='/usr/include'
76infodir='${prefix}/info'
77mandir='${prefix}/man'
79c06341 78
72a7ab82
AP
79# Initialize some other variables.
80subdirs=
81MFLAGS= MAKEFLAGS=
82SHELL=${CONFIG_SHELL-/bin/sh}
83# Maximum number of lines to put in a shell here document.
84ac_max_here_lines=12
85
671aa708
NN
86ac_prev=
87for ac_option
88do
72a7ab82 89
671aa708
NN
90 # If the previous option needs an argument, assign it.
91 if test -n "$ac_prev"; then
92 eval "$ac_prev=\$ac_option"
93 ac_prev=
94 continue
95 fi
79c06341 96
72a7ab82
AP
97 case "$ac_option" in
98 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99 *) ac_optarg= ;;
100 esac
671aa708
NN
101
102 # Accept the important Cygnus configure options, so we can diagnose typos.
103
72a7ab82 104 case "$ac_option" in
671aa708
NN
105
106 -bindir | --bindir | --bindi | --bind | --bin | --bi)
107 ac_prev=bindir ;;
108 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
72a7ab82 109 bindir="$ac_optarg" ;;
671aa708
NN
110
111 -build | --build | --buil | --bui | --bu)
72a7ab82 112 ac_prev=build ;;
671aa708 113 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
72a7ab82 114 build="$ac_optarg" ;;
671aa708
NN
115
116 -cache-file | --cache-file | --cache-fil | --cache-fi \
117 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
118 ac_prev=cache_file ;;
119 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
120 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
72a7ab82 121 cache_file="$ac_optarg" ;;
671aa708
NN
122
123 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
124 ac_prev=datadir ;;
125 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
126 | --da=*)
72a7ab82 127 datadir="$ac_optarg" ;;
671aa708
NN
128
129 -disable-* | --disable-*)
72a7ab82 130 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
671aa708 131 # Reject names that are not valid shell variable names.
72a7ab82
AP
132 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134 fi
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136 eval "enable_${ac_feature}=no" ;;
671aa708
NN
137
138 -enable-* | --enable-*)
72a7ab82 139 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
671aa708 140 # Reject names that are not valid shell variable names.
72a7ab82
AP
141 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
142 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143 fi
144 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145 case "$ac_option" in
146 *=*) ;;
671aa708
NN
147 *) ac_optarg=yes ;;
148 esac
72a7ab82 149 eval "enable_${ac_feature}='$ac_optarg'" ;;
671aa708
NN
150
151 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
152 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
153 | --exec | --exe | --ex)
154 ac_prev=exec_prefix ;;
155 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
156 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
157 | --exec=* | --exe=* | --ex=*)
72a7ab82 158 exec_prefix="$ac_optarg" ;;
671aa708
NN
159
160 -gas | --gas | --ga | --g)
161 # Obsolete; use --with-gas.
162 with_gas=yes ;;
163
72a7ab82
AP
164 -help | --help | --hel | --he)
165 # Omit some internal or obsolete options to make the list less imposing.
166 # This message is too long to be a string in the A/UX 3.1 sh.
167 cat << EOF
168Usage: configure [options] [host]
169Options: [defaults in brackets after descriptions]
170Configuration:
171 --cache-file=FILE cache test results in FILE
172 --help print this message
173 --no-create do not create output files
174 --quiet, --silent do not print \`checking...' messages
175 --version print the version of autoconf that created configure
176Directory and file names:
177 --prefix=PREFIX install architecture-independent files in PREFIX
178 [$ac_default_prefix]
179 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
180 [same as prefix]
181 --bindir=DIR user executables in DIR [EPREFIX/bin]
182 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
183 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
184 --datadir=DIR read-only architecture-independent data in DIR
185 [PREFIX/share]
186 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
187 --sharedstatedir=DIR modifiable architecture-independent data in DIR
188 [PREFIX/com]
189 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
190 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
191 --includedir=DIR C header files in DIR [PREFIX/include]
192 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
193 --infodir=DIR info documentation in DIR [PREFIX/info]
194 --mandir=DIR man documentation in DIR [PREFIX/man]
195 --srcdir=DIR find the sources in DIR [configure dir or ..]
196 --program-prefix=PREFIX prepend PREFIX to installed program names
197 --program-suffix=SUFFIX append SUFFIX to installed program names
198 --program-transform-name=PROGRAM
199 run sed PROGRAM on installed program names
200EOF
201 cat << EOF
202Host type:
203 --build=BUILD configure for building on BUILD [BUILD=HOST]
204 --host=HOST configure for HOST [guessed]
205 --target=TARGET configure for TARGET [TARGET=HOST]
206Features and packages:
207 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
208 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
209 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
210 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
211 --x-includes=DIR X include files are in DIR
212 --x-libraries=DIR X library files are in DIR
213EOF
214 if test -n "$ac_help"; then
215 echo "--enable and --with options recognized:$ac_help"
216 fi
217 exit 0 ;;
671aa708
NN
218
219 -host | --host | --hos | --ho)
72a7ab82 220 ac_prev=host ;;
671aa708 221 -host=* | --host=* | --hos=* | --ho=*)
72a7ab82 222 host="$ac_optarg" ;;
671aa708
NN
223
224 -includedir | --includedir | --includedi | --included | --include \
225 | --includ | --inclu | --incl | --inc)
226 ac_prev=includedir ;;
227 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
228 | --includ=* | --inclu=* | --incl=* | --inc=*)
72a7ab82 229 includedir="$ac_optarg" ;;
671aa708
NN
230
231 -infodir | --infodir | --infodi | --infod | --info | --inf)
232 ac_prev=infodir ;;
233 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
72a7ab82 234 infodir="$ac_optarg" ;;
671aa708
NN
235
236 -libdir | --libdir | --libdi | --libd)
237 ac_prev=libdir ;;
238 -libdir=* | --libdir=* | --libdi=* | --libd=*)
72a7ab82 239 libdir="$ac_optarg" ;;
671aa708
NN
240
241 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
242 | --libexe | --libex | --libe)
243 ac_prev=libexecdir ;;
244 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
245 | --libexe=* | --libex=* | --libe=*)
72a7ab82 246 libexecdir="$ac_optarg" ;;
671aa708
NN
247
248 -localstatedir | --localstatedir | --localstatedi | --localstated \
249 | --localstate | --localstat | --localsta | --localst \
250 | --locals | --local | --loca | --loc | --lo)
251 ac_prev=localstatedir ;;
252 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
253 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
254 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
72a7ab82 255 localstatedir="$ac_optarg" ;;
671aa708
NN
256
257 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
258 ac_prev=mandir ;;
259 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
72a7ab82 260 mandir="$ac_optarg" ;;
671aa708
NN
261
262 -nfp | --nfp | --nf)
263 # Obsolete; use --without-fp.
264 with_fp=no ;;
265
266 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
72a7ab82 267 | --no-cr | --no-c)
671aa708
NN
268 no_create=yes ;;
269
270 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
271 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272 no_recursion=yes ;;
273
274 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
275 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
276 | --oldin | --oldi | --old | --ol | --o)
277 ac_prev=oldincludedir ;;
278 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
279 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
280 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
72a7ab82 281 oldincludedir="$ac_optarg" ;;
671aa708
NN
282
283 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
284 ac_prev=prefix ;;
285 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
72a7ab82 286 prefix="$ac_optarg" ;;
671aa708
NN
287
288 -program-prefix | --program-prefix | --program-prefi | --program-pref \
289 | --program-pre | --program-pr | --program-p)
290 ac_prev=program_prefix ;;
291 -program-prefix=* | --program-prefix=* | --program-prefi=* \
292 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
72a7ab82 293 program_prefix="$ac_optarg" ;;
671aa708
NN
294
295 -program-suffix | --program-suffix | --program-suffi | --program-suff \
296 | --program-suf | --program-su | --program-s)
297 ac_prev=program_suffix ;;
298 -program-suffix=* | --program-suffix=* | --program-suffi=* \
299 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
72a7ab82 300 program_suffix="$ac_optarg" ;;
671aa708
NN
301
302 -program-transform-name | --program-transform-name \
303 | --program-transform-nam | --program-transform-na \
304 | --program-transform-n | --program-transform- \
305 | --program-transform | --program-transfor \
306 | --program-transfo | --program-transf \
307 | --program-trans | --program-tran \
308 | --progr-tra | --program-tr | --program-t)
309 ac_prev=program_transform_name ;;
310 -program-transform-name=* | --program-transform-name=* \
311 | --program-transform-nam=* | --program-transform-na=* \
312 | --program-transform-n=* | --program-transform-=* \
313 | --program-transform=* | --program-transfor=* \
314 | --program-transfo=* | --program-transf=* \
315 | --program-trans=* | --program-tran=* \
316 | --progr-tra=* | --program-tr=* | --program-t=*)
72a7ab82 317 program_transform_name="$ac_optarg" ;;
671aa708
NN
318
319 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
320 | -silent | --silent | --silen | --sile | --sil)
321 silent=yes ;;
322
323 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
324 ac_prev=sbindir ;;
325 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
326 | --sbi=* | --sb=*)
72a7ab82 327 sbindir="$ac_optarg" ;;
671aa708
NN
328
329 -sharedstatedir | --sharedstatedir | --sharedstatedi \
330 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
331 | --sharedst | --shareds | --shared | --share | --shar \
332 | --sha | --sh)
333 ac_prev=sharedstatedir ;;
334 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
335 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
336 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
337 | --sha=* | --sh=*)
72a7ab82 338 sharedstatedir="$ac_optarg" ;;
671aa708
NN
339
340 -site | --site | --sit)
341 ac_prev=site ;;
342 -site=* | --site=* | --sit=*)
72a7ab82 343 site="$ac_optarg" ;;
671aa708
NN
344
345 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 ac_prev=srcdir ;;
347 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
72a7ab82 348 srcdir="$ac_optarg" ;;
671aa708
NN
349
350 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351 | --syscon | --sysco | --sysc | --sys | --sy)
352 ac_prev=sysconfdir ;;
353 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
72a7ab82 355 sysconfdir="$ac_optarg" ;;
671aa708
NN
356
357 -target | --target | --targe | --targ | --tar | --ta | --t)
72a7ab82 358 ac_prev=target ;;
671aa708 359 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
72a7ab82 360 target="$ac_optarg" ;;
671aa708
NN
361
362 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 verbose=yes ;;
364
72a7ab82
AP
365 -version | --version | --versio | --versi | --vers)
366 echo "configure generated by autoconf version 2.13"
367 exit 0 ;;
671aa708
NN
368
369 -with-* | --with-*)
72a7ab82 370 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
671aa708 371 # Reject names that are not valid shell variable names.
72a7ab82
AP
372 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 fi
671aa708 375 ac_package=`echo $ac_package| sed 's/-/_/g'`
72a7ab82
AP
376 case "$ac_option" in
377 *=*) ;;
671aa708
NN
378 *) ac_optarg=yes ;;
379 esac
72a7ab82 380 eval "with_${ac_package}='$ac_optarg'" ;;
671aa708
NN
381
382 -without-* | --without-*)
72a7ab82 383 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
671aa708 384 # Reject names that are not valid shell variable names.
72a7ab82
AP
385 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387 fi
388 ac_package=`echo $ac_package| sed 's/-/_/g'`
389 eval "with_${ac_package}=no" ;;
671aa708
NN
390
391 --x)
392 # Obsolete; use --with-x.
393 with_x=yes ;;
394
395 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396 | --x-incl | --x-inc | --x-in | --x-i)
397 ac_prev=x_includes ;;
398 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
72a7ab82 400 x_includes="$ac_optarg" ;;
671aa708
NN
401
402 -x-libraries | --x-libraries | --x-librarie | --x-librari \
403 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404 ac_prev=x_libraries ;;
405 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
72a7ab82 407 x_libraries="$ac_optarg" ;;
671aa708 408
72a7ab82 409 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
671aa708
NN
410 ;;
411
412 *)
72a7ab82
AP
413 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414 echo "configure: warning: $ac_option: invalid host type" 1>&2
415 fi
416 if test "x$nonopt" != xNONE; then
417 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418 fi
419 nonopt="$ac_option"
671aa708
NN
420 ;;
421
422 esac
423done
424
425if test -n "$ac_prev"; then
72a7ab82 426 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
671aa708 427fi
671aa708 428
72a7ab82
AP
429trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430
431# File descriptor usage:
432# 0 standard input
433# 1 file creation
434# 2 errors and warnings
435# 3 some systems may open it to /dev/tty
436# 4 used on the Kubota Titan
437# 6 checking for... messages and results
438# 5 compiler messages saved in config.log
439if test "$silent" = yes; then
440 exec 6>/dev/null
441else
442 exec 6>&1
443fi
444exec 5>./config.log
445
446echo "\
447This file contains any messages produced by compilers while
448running configure, to aid debugging if configure makes a mistake.
449" 1>&5
671aa708 450
72a7ab82
AP
451# Strip out --no-create and --no-recursion so they do not pile up.
452# Also quote any args containing shell metacharacters.
453ac_configure_args=
454for ac_arg
671aa708 455do
72a7ab82
AP
456 case "$ac_arg" in
457 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458 | --no-cr | --no-c) ;;
459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
671aa708
NN
464 esac
465done
466
72a7ab82
AP
467# NLS nuisances.
468# Only set these to C if already set. These must not be set unconditionally
469# because not all systems understand e.g. LANG=C (notably SCO).
470# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471# Non-C LC_CTYPE values break the ctype check.
472if test "${LANG+set}" = set; then LANG=C; export LANG; fi
473if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
6b65a26d 476
72a7ab82
AP
477# confdefs.h avoids OS command line length limits that DEFS can exceed.
478rm -rf conftest* confdefs.h
479# AIX cpp loses on an empty file, so make sure it contains at least a newline.
480echo > confdefs.h
671aa708 481
72a7ab82
AP
482# A filename unique to this package, relative to the directory that
483# configure is in, which we can look for to find out if srcdir is correct.
484ac_unique_file=move-if-change
671aa708
NN
485
486# Find the source files, if location was not specified.
487if test -z "$srcdir"; then
488 ac_srcdir_defaulted=yes
489 # Try the directory containing this script, then its parent.
72a7ab82
AP
490 ac_prog=$0
491 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
671aa708
NN
493 srcdir=$ac_confdir
494 if test ! -r $srcdir/$ac_unique_file; then
495 srcdir=..
496 fi
497else
498 ac_srcdir_defaulted=no
499fi
500if test ! -r $srcdir/$ac_unique_file; then
501 if test "$ac_srcdir_defaulted" = yes; then
72a7ab82 502 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
671aa708 503 else
72a7ab82 504 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
671aa708
NN
505 fi
506fi
72a7ab82 507srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
671aa708
NN
508
509# Prefer explicitly selected file to automatically selected ones.
bba5e0ca
EB
510if test -z "$CONFIG_SITE"; then
511 if test "x$prefix" != xNONE; then
512 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
513 else
514 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
671aa708
NN
515 fi
516fi
517for ac_site_file in $CONFIG_SITE; do
518 if test -r "$ac_site_file"; then
72a7ab82 519 echo "loading site script $ac_site_file"
671aa708
NN
520 . "$ac_site_file"
521 fi
522done
523
524if test -r "$cache_file"; then
72a7ab82
AP
525 echo "loading cache $cache_file"
526 . $cache_file
671aa708 527else
72a7ab82
AP
528 echo "creating cache $cache_file"
529 > $cache_file
671aa708
NN
530fi
531
532ac_ext=c
72a7ab82 533# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
671aa708 534ac_cpp='$CPP $CPPFLAGS'
72a7ab82
AP
535ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
536ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
537cross_compiling=$ac_cv_prog_cc_cross
538
539ac_exeext=
540ac_objext=o
541if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
542 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
543 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
544 ac_n= ac_c='
545' ac_t=' '
546 else
547 ac_n=-n ac_c= ac_t=
548 fi
549else
550 ac_n= ac_c='\c' ac_t=
551fi
671aa708
NN
552
553
d02c69be 554
671aa708 555ac_aux_dir=
4c4a5bbc 556for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
671aa708
NN
557 if test -f $ac_dir/install-sh; then
558 ac_aux_dir=$ac_dir
559 ac_install_sh="$ac_aux_dir/install-sh -c"
560 break
561 elif test -f $ac_dir/install.sh; then
562 ac_aux_dir=$ac_dir
563 ac_install_sh="$ac_aux_dir/install.sh -c"
564 break
565 fi
566done
567if test -z "$ac_aux_dir"; then
72a7ab82 568 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
671aa708 569fi
72a7ab82
AP
570ac_config_guess=$ac_aux_dir/config.guess
571ac_config_sub=$ac_aux_dir/config.sub
572ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
671aa708
NN
573
574
72a7ab82
AP
575# Do some error checking and defaulting for the host and target type.
576# The inputs are:
577# configure --host=HOST --target=TARGET --build=BUILD NONOPT
578#
579# The rules are:
580# 1. You are not allowed to specify --host, --target, and nonopt at the
581# same time.
582# 2. Host defaults to nonopt.
583# 3. If nonopt is not specified, then host defaults to the current host,
584# as determined by config.guess.
585# 4. Target and build default to nonopt.
586# 5. If nonopt is not specified, then target and build default to host.
671aa708
NN
587
588# The aliases save the names the user supplied, while $host etc.
589# will get canonicalized.
72a7ab82
AP
590case $host---$target---$nonopt in
591NONE---*---* | *---NONE---* | *---*---NONE) ;;
592*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
593esac
594
595
596# Make sure we can run config.sub.
597if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
598else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
599fi
600
601echo $ac_n "checking host system type""... $ac_c" 1>&6
e8b05380 602echo "configure:603: checking host system type" >&5
72a7ab82
AP
603
604host_alias=$host
605case "$host_alias" in
606NONE)
607 case $nonopt in
608 NONE)
609 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
610 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
611 fi ;;
612 *) host_alias=$nonopt ;;
613 esac ;;
614esac
615
616host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
617host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
618host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
619host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
620echo "$ac_t""$host" 1>&6
621
622echo $ac_n "checking target system type""... $ac_c" 1>&6
e8b05380 623echo "configure:624: checking target system type" >&5
72a7ab82
AP
624
625target_alias=$target
626case "$target_alias" in
627NONE)
628 case $nonopt in
629 NONE) target_alias=$host_alias ;;
630 *) target_alias=$nonopt ;;
631 esac ;;
632esac
633
634target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
635target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
636target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
637target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
638echo "$ac_t""$target" 1>&6
639
640echo $ac_n "checking build system type""... $ac_c" 1>&6
e8b05380 641echo "configure:642: checking build system type" >&5
72a7ab82
AP
642
643build_alias=$build
644case "$build_alias" in
645NONE)
646 case $nonopt in
647 NONE) build_alias=$host_alias ;;
648 *) build_alias=$nonopt ;;
649 esac ;;
650esac
651
652build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
653build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
654build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
655build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
656echo "$ac_t""$build" 1>&6
657
658test "$host_alias" != "$target_alias" &&
671aa708
NN
659 test "$program_prefix$program_suffix$program_transform_name" = \
660 NONENONEs,x,x, &&
661 program_prefix=${target_alias}-
72a7ab82
AP
662
663if test "$program_transform_name" = s,x,x,; then
664 program_transform_name=
665else
666 # Double any \ or $. echo might interpret backslashes.
667 cat <<\EOF_SED > conftestsed
668s,\\,\\\\,g; s,\$,$$,g
669EOF_SED
670 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
671 rm -f conftestsed
672fi
671aa708 673test "$program_prefix" != NONE &&
72a7ab82 674 program_transform_name="s,^,${program_prefix},; $program_transform_name"
671aa708
NN
675# Use a double $ so make ignores it.
676test "$program_suffix" != NONE &&
72a7ab82
AP
677 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
678
679# sed with no file args requires a program.
680test "$program_transform_name" = "" && program_transform_name="s,x,x,"
671aa708
NN
681
682
775956d0
NN
683# Get 'install' or 'install-sh' and its variants.
684# Find a good install program. We prefer a C program (faster),
685# so one script is as good as another. But avoid the broken or
686# incompatible versions:
687# SysV /etc/install, /usr/sbin/install
688# SunOS /usr/etc/install
689# IRIX /sbin/install
690# AIX /bin/install
691# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
692# AFS /usr/afsws/bin/install, which mishandles nonexistent args
693# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
694# ./install, which can be erroneously created by make from ./install.sh.
72a7ab82 695echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
e8b05380 696echo "configure:697: checking for a BSD compatible install" >&5
775956d0 697if test -z "$INSTALL"; then
72a7ab82
AP
698if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
699 echo $ac_n "(cached) $ac_c" 1>&6
700else
701 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
702 for ac_dir in $PATH; do
703 # Account for people who put trailing slashes in PATH elements.
704 case "$ac_dir/" in
705 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
706 *)
707 # OSF1 and SCO ODT 3.0 have their own names for install.
708 # Don't use installbsd from OSF since it installs stuff as root
709 # by default.
710 for ac_prog in ginstall scoinst install; do
711 if test -f $ac_dir/$ac_prog; then
775956d0 712 if test $ac_prog = install &&
72a7ab82 713 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
775956d0
NN
714 # AIX install. It has an incompatible calling convention.
715 :
716 else
72a7ab82
AP
717 ac_cv_path_install="$ac_dir/$ac_prog -c"
718 break 2
775956d0
NN
719 fi
720 fi
721 done
72a7ab82
AP
722 ;;
723 esac
724 done
725 IFS="$ac_save_IFS"
775956d0
NN
726
727fi
728 if test "${ac_cv_path_install+set}" = set; then
72a7ab82 729 INSTALL="$ac_cv_path_install"
775956d0
NN
730 else
731 # As a last resort, use the slow shell script. We don't cache a
732 # path for INSTALL within a source directory, because that will
733 # break other packages using the cache if that directory is
734 # removed, or if the path is relative.
72a7ab82 735 INSTALL="$ac_install_sh"
775956d0
NN
736 fi
737fi
72a7ab82 738echo "$ac_t""$INSTALL" 1>&6
775956d0
NN
739
740# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
741# It thinks the first close brace ends the variable substitution.
742test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
743
72a7ab82 744test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
775956d0
NN
745
746test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
747
72a7ab82 748echo $ac_n "checking whether ln works""... $ac_c" 1>&6
e8b05380 749echo "configure:750: checking whether ln works" >&5
72a7ab82
AP
750if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
751 echo $ac_n "(cached) $ac_c" 1>&6
ad6717df
PB
752else
753 rm -f conftestdata_t
754echo >conftestdata_f
755if ln conftestdata_f conftestdata_t 2>/dev/null
756then
757 acx_cv_prog_LN=ln
758else
759 acx_cv_prog_LN=no
760fi
761rm -f conftestdata_f conftestdata_t
762
763fi
764if test $acx_cv_prog_LN = no; then
765 LN="cp"
72a7ab82 766 echo "$ac_t""no, using $LN" 1>&6
ad6717df
PB
767else
768 LN="$acx_cv_prog_LN"
72a7ab82 769 echo "$ac_t""yes" 1>&6
ad6717df
PB
770fi
771
72a7ab82 772echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
e8b05380 773echo "configure:774: checking whether ln -s works" >&5
72a7ab82
AP
774if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
776else
777 rm -f conftestdata
778if ln -s X conftestdata 2>/dev/null
779then
780 rm -f conftestdata
781 ac_cv_prog_LN_S="ln -s"
782else
783 ac_cv_prog_LN_S=ln
784fi
785fi
786LN_S="$ac_cv_prog_LN_S"
787if test "$ac_cv_prog_LN_S" = "ln -s"; then
788 echo "$ac_t""yes" 1>&6
148907ea 789else
72a7ab82 790 echo "$ac_t""no" 1>&6
148907ea
PB
791fi
792
775956d0 793
79c06341 794### we might need to use some other shell than /bin/sh for running subshells
79c06341
JL
795### If we are on Windows, search for the shell. This will permit people
796### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
797### without also having to set CONFIG_SHELL. This code will work when
798### using bash, which sets OSTYPE.
799case "${OSTYPE}" in
800*win32*)
671aa708
NN
801 if test x${CONFIG_SHELL} = x ; then
802 if test ! -f /bin/sh ; then
803 if test x${SHELL} != x && test -f ${SHELL} ; then
79c06341
JL
804 CONFIG_SHELL=${SHELL}
805 export CONFIG_SHELL
806 else
807 for prog in sh sh.exe bash bash.exe; do
808 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
809 for dir in $PATH; do
810 test -z "$dir" && dir=.
811 if test -f $dir/$prog; then
812 CONFIG_SHELL=$dir/$prog
813 export CONFIG_SHELL
814 break
815 fi
816 done
817 IFS="$save_ifs"
818 test -n "${CONFIG_SHELL}" && break
819 done
820 fi
821 fi
822 fi
823 ;;
824esac
825
826config_shell=${CONFIG_SHELL-/bin/sh}
827
79c06341
JL
828progname=$0
829# if PWD already has a value, it is probably wrong.
671aa708 830if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
79c06341 831
b348267b 832# Export original configure arguments for use by sub-configures. These
eeae7b41
DJ
833# will be expanded by make, so quote '$'.
834tmp="$progname $@"
835sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
836$tmp
b348267b 837EOF_SED
eeae7b41
DJ
838TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
839rm -f conftestsed.out
3dfabf63 840
cc1e60ea 841
671aa708 842moveifchange=${srcdir}/move-if-change
79c06341 843
ee6a22df
L
844srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
845
846# We pass INSTALL explicitly to sub-makes. Make sure that it is not
847# a relative path.
848if test "$INSTALL" = "${srcdir}/install-sh -c"; then
849 INSTALL="${srcpwd}/install-sh -c"
850fi
851
671aa708
NN
852# Set srcdir to "." if that's what it is.
853# This is important for multilib support.
854pwd=`${PWDCMD-pwd}`
671aa708
NN
855if test "${pwd}" = "${srcpwd}" ; then
856 srcdir=.
79c06341
JL
857fi
858
671aa708 859topsrcdir=$srcpwd
5d4a5ee6 860
671aa708 861extra_host_args=
afabd8e6 862
671aa708
NN
863### To add a new directory to the tree, first choose whether it is a target
864### or a host dependent tool. Then put it into the appropriate list
865### (library or tools, host or target), doing a dependency sort.
79c06341 866
72a7ab82 867# Subdirs will be configured in the order listed in build_configdirs,
671aa708 868# configdirs, or target_configdirs; see the serialization section below.
79c06341 869
72a7ab82
AP
870# Dependency sorting is only needed when *configuration* must be done in
871# a particular order. In all cases a dependency should be specified in
671aa708 872# the Makefile, whether or not it's implicitly specified here.
79c06341 873
671aa708
NN
874# Double entries in build_configdirs, configdirs, or target_configdirs may
875# cause circular dependencies and break everything horribly.
79c06341 876
23f6b2f9
PB
877# these library is used by various programs built for the build
878# environment
879#
880build_libs="build-libiberty"
881
882# these tools are built for the build environment
71b5d516 883build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
23f6b2f9 884
671aa708
NN
885# these libraries are used by various programs built for the host environment
886#
a4b6c45a 887host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
671aa708 888
671aa708
NN
889# these tools are built for the host environment
890# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
891# know that we are building the simulator.
892# binutils, gas and ld appear in that order because it makes sense to run
893# "make check" in that particular order.
5395b47b 894host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
671aa708
NN
895
896# libgcj represents the runtime libraries only used by gcj.
897libgcj="target-libffi \
898 target-boehm-gc \
899 target-zlib \
900 target-qthreads \
901 target-libjava"
902
903# these libraries are built for the target environment, and are built after
904# the host libraries and the host tools (which may be a cross compiler)
905#
4dbda6f0 906target_libraries="target-libiberty \
671aa708
NN
907 target-libgloss \
908 target-newlib \
cb543528 909 target-libstdc++-v3 \
6de9cd9a 910 target-libmudflap \
77008252 911 target-libssp \
6de9cd9a 912 target-libgfortran \
77d187bc 913 ${libgcj} \
d9cdb878 914 target-libobjc \
953ff289
DN
915 target-libada \
916 target-libgomp"
671aa708 917
4dbda6f0
NN
918# these tools are built using the target libraries, and are intended to
919# run only in the target environment
671aa708 920#
4dbda6f0 921# note: any program that *uses* libraries that are in the "target_libraries"
671aa708
NN
922# list belongs in this list. those programs are also very likely
923# candidates for the "native_only" list which follows
924#
97286f7f 925target_tools="target-examples target-groff target-gperf target-rda"
79c06341 926
671aa708 927################################################################################
79c06341 928
671aa708
NN
929## All tools belong in one of the four categories, and are assigned above
930## We assign ${configdirs} this way to remove all embedded newlines. This
931## is important because configure will choke if they ever get through.
932## ${configdirs} is directories we build using the host tools.
933## ${target_configdirs} is directories we build using the target tools.
671aa708 934configdirs=`echo ${host_libs} ${host_tools}`
4dbda6f0 935target_configdirs=`echo ${target_libraries} ${target_tools}`
71b5d516 936build_configdirs=`echo ${build_libs} ${build_tools}`
8b87bb96 937
671aa708 938################################################################################
79c06341 939
671aa708 940srcname="gnu development package"
79c06341 941
671aa708
NN
942# This gets set non-empty for some net releases of packages.
943appdirs=""
79c06341 944
671aa708
NN
945# Define is_cross_compiler to save on calls to 'test'.
946is_cross_compiler=
947if test x"${host}" = x"${target}" ; then
948 is_cross_compiler=no
79c06341 949else
671aa708 950 is_cross_compiler=yes
72a7ab82 951fi
79c06341 952
b4acb5ef 953# Find the build and target subdir names.
8b87bb96
NN
954 case ${build_alias} in
955 "") build_noncanonical=${build} ;;
956 *) build_noncanonical=${build_alias} ;;
957esac
958
959 case ${host_alias} in
960 "") host_noncanonical=${build_noncanonical} ;;
961 *) host_noncanonical=${host_alias} ;;
962esac
963
964 case ${target_alias} in
965 "") target_noncanonical=${host_noncanonical} ;;
966 *) target_noncanonical=${target_alias} ;;
967esac
968
969 # Prefix 'build-' so this never conflicts with target_subdir.
970build_subdir="build-${build_noncanonical}"
215c351a
PB
971# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
972if ( test $srcdir = . && test -d gcc ) \
973 || test -d $srcdir/../host-${host_noncanonical}; then
974 host_subdir="host-${host_noncanonical}"
975else
976 host_subdir=.
977fi
8b87bb96
NN
978# No prefix.
979target_subdir=${target_noncanonical}
72a7ab82 980
79c06341 981
671aa708
NN
982# Skipdirs are removed silently.
983skipdirs=
984# Noconfigdirs are removed loudly.
985noconfigdirs=""
79c06341 986
671aa708
NN
987use_gnu_ld=
988# Make sure we don't let GNU ld be added if we didn't want it.
989if test x$with_gnu_ld = xno ; then
990 use_gnu_ld=no
991 noconfigdirs="$noconfigdirs ld"
79c06341
JL
992fi
993
671aa708
NN
994use_gnu_as=
995# Make sure we don't let GNU as be added if we didn't want it.
996if test x$with_gnu_as = xno ; then
997 use_gnu_as=no
998 noconfigdirs="$noconfigdirs gas"
79c06341
JL
999fi
1000
72a7ab82 1001# some tools are so dependent upon X11 that if we're not building with X,
671aa708 1002# it's not even worth trying to configure, much less build, that tool.
79c06341 1003
671aa708
NN
1004case ${with_x} in
1005 yes | "") ;; # the default value for this tree is that X11 is available
1006 no)
b4f96efe 1007 skipdirs="${skipdirs} tk itcl libgui"
671aa708 1008 # We won't be able to build gdbtk without X.
72a7ab82 1009 enable_gdbtk=no
671aa708
NN
1010 ;;
1011 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1012esac
79c06341 1013
671aa708 1014# Some tools are only suitable for building in a "native" situation.
72a7ab82 1015# Remove these if host!=target.
61b56b2e 1016native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
79c06341 1017
671aa708
NN
1018# Similarly, some are only suitable for cross toolchains.
1019# Remove these if host=target.
1020cross_only="target-libgloss target-newlib target-opcodes"
1021
1022case $is_cross_compiler in
1023 no) skipdirs="${skipdirs} ${cross_only}" ;;
1024 yes) skipdirs="${skipdirs} ${native_only}" ;;
1025esac
79c06341 1026
671aa708
NN
1027# If both --with-headers and --with-libs are specified, default to
1028# --without-newlib.
ee6a22df
L
1029if test x"${with_headers}" != x && test x"${with_headers}" != xno \
1030 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
671aa708
NN
1031 if test x"${with_newlib}" = x ; then
1032 with_newlib=no
1033 fi
79c06341
JL
1034fi
1035
671aa708
NN
1036# Recognize --with-newlib/--without-newlib.
1037case ${with_newlib} in
1038 no) skipdirs="${skipdirs} target-newlib" ;;
1039 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1040esac
79c06341 1041
671aa708 1042# Configure extra directories which are host specific
79c06341 1043
671aa708
NN
1044case "${host}" in
1045 *-cygwin*)
1046 configdirs="$configdirs libtermcap" ;;
1047esac
79c06341 1048
4fab7234
HPN
1049# A target can indicate whether a language isn't supported for some reason.
1050# Only spaces may be used in this macro; not newlines or tabs.
1051unsupported_languages=
1052
72a7ab82 1053# Remove more programs from consideration, based on the host or
671aa708
NN
1054# target this usually means that a port of the program doesn't
1055# exist yet.
ec8d6ddc 1056
671aa708
NN
1057case "${host}" in
1058 hppa*64*-*-*)
1059 noconfigdirs="$noconfigdirs byacc"
1060 ;;
f2a0e225 1061 i[3456789]86-*-vsta)
b4f96efe 1062 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
671aa708 1063 ;;
f2a0e225 1064 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
b4f96efe 1065 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
3aa83176 1066 ;;
f2a0e225 1067 i[3456789]86-*-mingw32*)
b4f96efe 1068 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
a22c2d8d 1069 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
3aa83176 1070 ;;
f2a0e225 1071 i[3456789]86-*-beos*)
b4f96efe 1072 noconfigdirs="$noconfigdirs tk itcl libgui gdb"
3aa83176 1073 ;;
671aa708 1074 *-*-cygwin*)
a22c2d8d 1075 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
671aa708
NN
1076 ;;
1077 *-*-netbsd*)
a22c2d8d 1078 noconfigdirs="$noconfigdirs rcs"
671aa708
NN
1079 ;;
1080 ppc*-*-pe)
b4f96efe 1081 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
671aa708
NN
1082 ;;
1083 powerpc-*-beos*)
b4f96efe 1084 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
671aa708 1085 ;;
671aa708 1086esac
ec8d6ddc 1087
6de9cd9a 1088
d9cdb878
AC
1089# Check whether --enable-libada or --disable-libada was given.
1090if test "${enable_libada+set}" = set; then
1091 enableval="$enable_libada"
1092 ENABLE_LIBADA=$enableval
1093else
1094 ENABLE_LIBADA=yes
72a7ab82
AP
1095fi
1096
d9cdb878
AC
1097if test "${ENABLE_LIBADA}" != "yes" ; then
1098 noconfigdirs="$noconfigdirs target-libada"
5395b47b 1099 noconfigdirs="$noconfigdirs gnattools"
d9cdb878
AC
1100fi
1101
ef0087a7
KH
1102# Check whether --enable-libssp or --disable-libssp was given.
1103if test "${enable_libssp+set}" = set; then
1104 enableval="$enable_libssp"
1105 ENABLE_LIBSSP=$enableval
1106else
1107 ENABLE_LIBSSP=yes
72a7ab82
AP
1108fi
1109
ef0087a7
KH
1110if test "${ENABLE_LIBSSP}" != "yes" ; then
1111 noconfigdirs="$noconfigdirs target-libssp"
1112fi
1113
671aa708
NN
1114# Save it here so that, even in case of --enable-libgcj, if the Java
1115# front-end isn't enabled, we still get libgcj disabled.
1116libgcj_saved=$libgcj
1117case $enable_libgcj in
1118yes)
1119 # If we reset it here, it won't get added to noconfigdirs in the
1120 # target-specific build rules, so it will be forcibly enabled
1121 # (unless the Java language itself isn't enabled).
1122 libgcj=
1123 ;;
1124no)
1125 # Make sure we get it printed in the list of not supported target libs.
1126 noconfigdirs="$noconfigdirs ${libgcj}"
1127 ;;
1128esac
ec8d6ddc 1129
6de9cd9a
DN
1130
1131# Allow --disable-libmudflap to exclude target-libmudflap
1132case $enable_libmudflap in
dfcada9a 1133yes)
6de9cd9a
DN
1134 ;;
1135no)
1136 noconfigdirs="$noconfigdirs target-libmudflap"
1137 ;;
dfcada9a
MM
1138"")
1139 case "${target}" in
670cbfcf 1140 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
98a5bb3b 1141 # Enable libmudflap by default in GNU and friends.
dfcada9a 1142 ;;
a3e8d8b4
LR
1143 *-*-freebsd*)
1144 # Enable libmudflap by default in FreeBSD.
1145 ;;
dfcada9a
MM
1146 *)
1147 # Disable it by default everywhere else.
1148 noconfigdirs="$noconfigdirs target-libmudflap"
1149 ;;
1150 esac
6de9cd9a
DN
1151esac
1152
953ff289
DN
1153# Allow --disable-libgomp to exclude target-libgomp
1154case $enable_libgomp in
1155yes)
1156 ;;
1157no)
1158 noconfigdirs="$noconfigdirs target-libgomp"
1159 ;;
1160"")
1161 # Enable libgomp by default on hosted POSIX systems.
1162 case "${target}" in
670cbfcf 1163 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
953ff289
DN
1164 ;;
1165 *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
1166 ;;
1167 *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
1168 ;;
1169 *-*-darwin*)
1170 ;;
1171 *)
1172 noconfigdirs="$noconfigdirs target-libgomp"
1173 ;;
1174 esac
1175esac
1176
6de9cd9a 1177
671aa708
NN
1178case "${target}" in
1179 *-*-chorusos)
1180 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1181 ;;
940cde4d 1182 powerpc-*-darwin*)
c8e5d1af 1183 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
9c8f9ec2 1184 noconfigdirs="$noconfigdirs sim target-rda"
c8e5d1af 1185 ;;
940cde4d 1186 *-*-darwin*)
39d16468 1187 noconfigdirs="$noconfigdirs ld gas gdb gprof"
9c8f9ec2 1188 noconfigdirs="$noconfigdirs sim target-rda"
0a1c093b 1189 noconfigdirs="$noconfigdirs ${libgcj}"
940cde4d 1190 ;;
671aa708
NN
1191 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1192 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1193 ;;
c3f84f61 1194 *-*-freebsd*)
6de9cd9a
DN
1195 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1196 if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1197 && test -f /usr/local/include/gmp.h; then
1198 with_gmp=/usr/local
1199 fi
1200
1201 # Skip some stuff that's unsupported on some FreeBSD configurations.
1202 case "${target}" in
1203 i*86-*-*) ;;
1204 alpha*-*-*) ;;
1205 *)
1206 noconfigdirs="$noconfigdirs ${libgcj}"
1207 ;;
1208 esac
1209 ;;
ef4e7569
US
1210 *-*-kaos*)
1211 # Remove unsupported stuff on all kaOS configurations.
b4117c30 1212 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
ef4e7569
US
1213 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1214 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1215 noconfigdirs="$noconfigdirs target-libgloss"
1216 ;;
671aa708
NN
1217 *-*-netbsd*)
1218 # Skip some stuff on all NetBSD configurations.
1219 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1220
1221 # Skip some stuff that's unsupported on some NetBSD configurations.
1222 case "${target}" in
1223 i*86-*-netbsdelf*) ;;
0590b963 1224 arm*-*-netbsdelf*) ;;
671aa708
NN
1225 *)
1226 noconfigdirs="$noconfigdirs ${libgcj}"
1227 ;;
1228 esac
1229 ;;
61fec9ff
JB
1230 *-*-netware*)
1231 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
671aa708
NN
1232 ;;
1233 *-*-rtems*)
1234 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1235 ;;
a8ba31f2
EC
1236 # The tpf target doesn't support gdb yet.
1237 *-*-tpf*)
1238 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
1239 ;;
5785c0ed
BI
1240 *-*-uclinux*)
1241 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1242 ;;
671aa708 1243 *-*-vxworks*)
d8852c4f 1244 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1245 ;;
fd7ea4ab
JB
1246 m32c-*-*)
1247 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1248 ;;
671aa708
NN
1249 alpha*-dec-osf*)
1250 # ld works, but does not support shared libraries.
1251 # newlib is not 64 bit ready. I'm not sure about fileutils.
1252 # gas doesn't generate exception information.
1253 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1254 ;;
1255 alpha*-*-*vms*)
556f03c4 1256 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
671aa708
NN
1257 ;;
1258 alpha*-*-linux*)
1259 # newlib is not 64 bit ready
1260 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1261 ;;
671aa708
NN
1262 alpha*-*-*)
1263 # newlib is not 64 bit ready
1264 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1265 ;;
33952f6f
AO
1266 am33_2.0-*-linux*)
1267 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1268 ;;
671aa708
NN
1269 sh-*-linux*)
1270 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
72a7ab82 1271 ;;
671aa708
NN
1272 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1273 noconfigdirs="$noconfigdirs ${libgcj}"
1274 noconfigdirs="$noconfigdirs target-examples"
1275 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
b4f96efe 1276 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
671aa708
NN
1277 noconfigdirs="$noconfigdirs expect dejagnu"
1278 # the C++ libraries don't build on top of CE's C libraries
cb543528 1279 noconfigdirs="$noconfigdirs target-libstdc++-v3"
671aa708
NN
1280 noconfigdirs="$noconfigdirs target-newlib"
1281 case "${host}" in
1282 *-*-cygwin*) ;; # keep gdb and readline
aa9c3ab4 1283 *) noconfigdirs="$noconfigdirs gdb readline"
671aa708
NN
1284 ;;
1285 esac
1286 ;;
1287 arc-*-*)
1288 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1289 ;;
ee6a22df 1290 arm-semi-aof )
ee6a22df 1291 ;;
671aa708
NN
1292 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1293 noconfigdirs="$noconfigdirs ${libgcj}"
1294 ;;
b3f8d95d 1295 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
671aa708
NN
1296 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1297 ;;
077fc835
KH
1298 arm*-*-linux-gnueabi)
1299 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1300 noconfigdirs="$noconfigdirs target-libjava target-libobjc"
1301 ;;
972974fc
MM
1302 arm*-*-symbianelf*)
1303 noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
1304 ;;
671aa708
NN
1305 arm-*-pe*)
1306 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1307 ;;
671aa708
NN
1308 thumb-*-coff)
1309 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1310 ;;
1311 thumb-*-elf)
1312 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1313 ;;
671aa708
NN
1314 thumb-*-pe)
1315 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1316 ;;
1317 arm-*-riscix*)
1318 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1319 ;;
1320 avr-*-*)
556f03c4 1321 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1322 ;;
6b65a26d
CM
1323 bfin-*-*)
1324 noconfigdirs="$noconfigdirs target-libgloss gdb"
61efc800 1325 if test x${is_cross_compiler} != xno ; then
6b65a26d
CM
1326 target_configdirs="${target_configdirs} target-bsp target-cygmon"
1327 fi
1328 ;;
671aa708 1329 c4x-*-* | tic4x-*-*)
cb543528 1330 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1331 ;;
1332 c54x*-*-* | tic54x-*-*)
cb543528 1333 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
671aa708 1334 ;;
40d64b5a 1335 cris-*-* | crisv32-*-*)
4fab7234 1336 unsupported_languages="$unsupported_languages java"
40d64b5a 1337 case "${target}" in
c2e0d3a9 1338 *-*-aout)
7f26dfa3 1339 unsupported_languages="$unsupported_languages fortran"
4fab7234 1340 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
c2e0d3a9 1341 *-*-elf)
7f26dfa3 1342 unsupported_languages="$unsupported_languages fortran"
789ec619 1343 noconfigdirs="$noconfigdirs target-boehm-gc";;
c2e0d3a9 1344 *-*-linux*)
789ec619 1345 noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
40d64b5a 1346 *)
7f26dfa3 1347 unsupported_languages="$unsupported_languages fortran"
40d64b5a
HPN
1348 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
1349 esac
671aa708 1350 ;;
25b656e7 1351 crx-*-*)
ee6a22df 1352 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
25b656e7 1353 ;;
671aa708 1354 d10v-*-*)
cb543528 1355 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1356 ;;
1357 d30v-*-*)
fb87ad5d 1358 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1359 ;;
1360 fr30-*-elf*)
fb87ad5d 1361 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1362 ;;
1363 frv-*-*)
1364 noconfigdirs="$noconfigdirs ${libgcj}"
1365 ;;
1366 h8300*-*-*)
b4117c30 1367 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1368 ;;
1369 h8500-*-*)
b4117c30 1370 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1371 ;;
ee6a22df 1372 hppa1.1-*-osf* | hppa1.1-*-bsd* )
ee6a22df 1373 ;;
671aa708
NN
1374 hppa*64*-*-linux* | parisc*64*-*-linux*)
1375 # In this case, it's because the hppa64-linux target is for
1376 # the kernel only at this point and has no libc, and thus no
1377 # headers, crt*.o, etc., all of which are needed by these.
1378 noconfigdirs="$noconfigdirs target-zlib"
1379 ;;
3e732ba0
JDA
1380 parisc*-*-linux* | hppa*-*-linux*)
1381 ;;
671aa708 1382 hppa*-*-*elf* | \
671aa708
NN
1383 hppa*-*-lites* | \
1384 hppa*-*-openbsd* | \
1385 hppa*64*-*-*)
1386 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1387 ;;
1388 hppa*-*-*)
1389 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1390 # build on HP-UX 10.20.
1391 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1392 ;;
fb87ad5d
HPN
1393 i960-*-*)
1394 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1395 ;;
671aa708
NN
1396 ia64*-*-elf*)
1397 # No gdb support yet.
b4f96efe 1398 noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
671aa708
NN
1399 ;;
1400 ia64*-**-hpux*)
1401 # No gdb or ld support yet.
b4f96efe 1402 noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
671aa708 1403 ;;
ee6a22df 1404 i370-*-opened*)
ee6a22df 1405 ;;
f2a0e225 1406 i[3456789]86-*-coff | i[3456789]86-*-elf)
671aa708
NN
1407 noconfigdirs="$noconfigdirs ${libgcj}"
1408 ;;
f2a0e225 1409 i[3456789]86-*-linux*)
671aa708
NN
1410 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1411 # not build java stuff by default.
1412 case "${target}" in
1413 *-*-*libc1*)
1414 noconfigdirs="$noconfigdirs ${libgcj}";;
1415 esac
1416
1417 # This section makes it possible to build newlib natively on linux.
1418 # If we are using a cross compiler then don't configure newlib.
1419 if test x${is_cross_compiler} != xno ; then
3aa83176 1420 noconfigdirs="$noconfigdirs target-newlib"
671aa708
NN
1421 fi
1422 noconfigdirs="$noconfigdirs target-libgloss"
1423 # If we are not using a cross compiler, do configure newlib.
1424 # Note however, that newlib will only be configured in this situation
1425 # if the --with-newlib option has been given, because otherwise
1426 # 'target-newlib' will appear in skipdirs.
1427 ;;
f2a0e225 1428 i[3456789]86-*-mingw32*)
671aa708 1429 target_configdirs="$target_configdirs target-mingw"
556f03c4 1430 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
671aa708
NN
1431
1432 # Can't build gdb for mingw32 if not native.
1433 case "${host}" in
f2a0e225 1434 i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
b4f96efe 1435 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
671aa708
NN
1436 ;;
1437 esac
72a7ab82 1438 ;;
671aa708
NN
1439 *-*-cygwin*)
1440 target_configdirs="$target_configdirs target-libtermcap target-winsup"
556f03c4 1441 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
801e2270 1442 # always build newlib if winsup directory is present.
ee6a22df 1443 if test -d "$srcdir/winsup"; then
801e2270 1444 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ee6a22df 1445 elif test -d "$srcdir/newlib"; then
801e2270
CV
1446 echo "Warning: winsup is missing so newlib can't be built."
1447 fi
671aa708
NN
1448
1449 # Can't build gdb for Cygwin if not native.
1450 case "${host}" in
1451 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
b4f96efe 1452 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
671aa708
NN
1453 ;;
1454 esac
72a7ab82 1455 ;;
ee6a22df
L
1456 i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1457 i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
ee6a22df 1458 ;;
f2a0e225 1459 i[3456789]86-*-pe)
556f03c4 1460 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1461 ;;
f2a0e225 1462 i[3456789]86-*-sco3.2v5*)
671aa708
NN
1463 # The linker does not yet know about weak symbols in COFF,
1464 # and is not configured to handle mixed ELF and COFF.
1465 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1466 ;;
f2a0e225 1467 i[3456789]86-*-sco*)
671aa708
NN
1468 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1469 ;;
f2a0e225 1470 i[3456789]86-*-solaris2*)
671aa708
NN
1471 noconfigdirs="$noconfigdirs target-libgloss"
1472 ;;
f2a0e225 1473 i[3456789]86-*-sysv4*)
671aa708
NN
1474 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1475 ;;
f2a0e225 1476 i[3456789]86-*-beos*)
3aa83176
NN
1477 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1478 ;;
fb87ad5d 1479 m32r-*-*)
c197e306 1480 noconfigdirs="$noconfigdirs ${libgcj}"
fb87ad5d 1481 ;;
671aa708 1482 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
cb543528 1483 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1484 ;;
1485 m68k-*-elf*)
1486 noconfigdirs="$noconfigdirs ${libgcj}"
1487 ;;
1488 m68k-*-coff*)
1489 noconfigdirs="$noconfigdirs ${libgcj}"
1490 ;;
1491 mcore-*-pe*)
1492 # The EPOC C++ environment does not support exceptions or rtti,
1493 # and so building libstdc++-v3 tends not to always work.
1494 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1495 ;;
1496 mmix-*-*)
4fab7234 1497 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
7f26dfa3 1498 unsupported_languages="$unsupported_languages fortran java"
671aa708
NN
1499 ;;
1500 mn10200-*-*)
1501 noconfigdirs="$noconfigdirs ${libgcj}"
1502 ;;
1503 mn10300-*-*)
1504 noconfigdirs="$noconfigdirs ${libgcj}"
1505 ;;
ab34901f 1506 mt-*-*)
79dd769c
AH
1507 noconfigdirs="$noconfigdirs sim"
1508 ;;
671aa708
NN
1509 powerpc-*-aix*)
1510 # copied from rs6000-*-* entry
3a3c28db 1511 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1512 ;;
1513 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1514 target_configdirs="$target_configdirs target-winsup"
b4f96efe 1515 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
671aa708
NN
1516 # always build newlib.
1517 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1518 ;;
1519 # This is temporary until we can link against shared libraries
1520 powerpcle-*-solaris*)
b4f96efe 1521 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
671aa708
NN
1522 ;;
1523 powerpc-*-beos*)
1524 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1525 ;;
671aa708 1526 powerpc-*-eabi)
556f03c4 1527 noconfigdirs="$noconfigdirs ${libgcj}"
ee6a22df
L
1528 ;;
1529 powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
671aa708 1530 ;;
671aa708
NN
1531 rs6000-*-lynxos*)
1532 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1533 ;;
1534 rs6000-*-aix*)
3a3c28db 1535 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1536 ;;
1537 rs6000-*-*)
1538 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1539 ;;
1540 m68k-apollo-*)
1541 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1542 ;;
1543 mips*-*-irix5*)
1f1d584b 1544 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1545 ;;
1546 mips*-*-irix6*)
671aa708
NN
1547 # Linking libjava exceeds command-line length limits on at least
1548 # IRIX 6.2, but not on IRIX 6.5.
1549 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1550 # <oldham@codesourcery.com>
7c005a3a 1551 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1552 ;;
1553 mips*-dec-bsd*)
1554 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1555 ;;
1556 mips*-*-bsd*)
1557 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1558 ;;
1559 mipstx39-*-*)
1560 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
3aa83176 1561 ;;
d0fe5ad3
RS
1562 mips64*-*-linux*)
1563 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1564 ;;
671aa708
NN
1565 mips*-*-linux*)
1566 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1567 ;;
1568 mips*-*-*)
1569 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1570 ;;
1571 romp-*-*)
1572 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1573 ;;
669f01d8 1574 sh-*-* | sh64-*-*)
671aa708 1575 case "${host}" in
f2a0e225
KC
1576 i[3456789]86-*-vsta) ;; # don't add gprof back in
1577 i[3456789]86-*-go32*) ;; # don't add gprof back in
1578 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
671aa708
NN
1579 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1580 esac
1581 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1582 ;;
671aa708
NN
1583 sparc-*-elf*)
1584 noconfigdirs="$noconfigdirs ${libgcj}"
1585 ;;
1586 sparc64-*-elf*)
1587 noconfigdirs="$noconfigdirs ${libgcj}"
1588 ;;
1589 sparclite-*-*)
1590 noconfigdirs="$noconfigdirs ${libgcj}"
1591 ;;
1592 sparc-*-sunos4*)
1593 noconfigdirs="$noconfigdirs ${libgcj}"
1594 if test x${is_cross_compiler} != xno ; then
1595 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1596 else
1597 use_gnu_ld=no
1598 fi
1599 ;;
bba5e0ca
EB
1600 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1601 noconfigdirs="$noconfigdirs ${libgcj}"
1602 ;;
671aa708
NN
1603 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1604 ;;
1605 v810-*-*)
cb543528 1606 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
671aa708
NN
1607 ;;
1608 v850-*-*)
1609 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1610 ;;
1611 v850e-*-*)
1612 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1613 ;;
1614 v850ea-*-*)
1615 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1616 ;;
1617 vax-*-vms)
1618 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1619 ;;
1620 vax-*-*)
1621 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1622 ;;
0d4f1b4e
BW
1623 xtensa-*-*)
1624 noconfigdirs="$noconfigdirs ${libgcj}"
1625 ;;
671aa708 1626 ip2k-*-*)
cb543528 1627 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1628 ;;
c3f84f61 1629 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
671aa708
NN
1630 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1631 ;;
1632 *-*-lynxos*)
1633 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
72a7ab82 1634 ;;
671aa708
NN
1635 *-*-*)
1636 noconfigdirs="$noconfigdirs ${libgcj}"
1637 ;;
1638esac
79c06341 1639
671aa708
NN
1640# If we aren't building newlib, then don't build libgloss, since libgloss
1641# depends upon some newlib header files.
1642case "${noconfigdirs}" in
1643 *target-libgloss*) ;;
1644 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1645esac
1646
671aa708
NN
1647# Work in distributions that contain no compiler tools, like Autoconf.
1648tentative_cc=""
1649host_makefile_frag=/dev/null
1650if test -d ${srcdir}/config ; then
1651case "${host}" in
1652 m68k-hp-hpux*)
1653 # Avoid "too much defining" errors from HPUX compiler.
1654 tentative_cc="cc -Wp,-H256000"
1655 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1656 # If it's HP/UX ar, this should be harmless.
1657 RANLIB="ar ts"
1658 ;;
1659 m68k-apollo-sysv*)
1660 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1661 ;;
1662 m68k-apollo-bsd*)
1663 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1664 # chokes on bfd, the compiler won't let you assign integers to enums, and
1665 # other problems. Defining CC to gcc is a questionable way to say "don't use
1666 # the apollo compiler" (the preferred version of GCC could be called cc,
1667 # or whatever), but I'm not sure leaving CC as cc is any better...
1668 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1669 # Used to have BISON=yacc.
1670 tentative_cc=gcc
1671 ;;
1672 m88k-dg-dgux*)
1673 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
671aa708
NN
1674 ;;
1675 m88k-harris-cxux*)
1676 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1677 tentative_cc="cc -Xa"
1678 host_makefile_frag="config/mh-cxux"
1679 ;;
1680 m88k-motorola-sysv*)
1681 ;;
1682 mips*-dec-ultrix*)
1683 tentative_cc="cc -Wf,-XNg1000"
1684 host_makefile_frag="config/mh-decstation"
1685 ;;
1686 mips*-nec-sysv4*)
1687 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1688 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1689 host_makefile_frag="config/mh-necv4"
1690 ;;
1691 mips*-sgi-irix4*)
1692 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1693 # environment. Also bump switch table size so that cp-parse will
1694 # compile. Bump string length limit so linker builds.
1695 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1696 ;;
1697 mips*-*-sysv4*)
1698 host_makefile_frag="config/mh-sysv4"
1699 ;;
1700 mips*-*-sysv*)
1701 # This is for a MIPS running RISC/os 4.52C.
1702
1703 # This is needed for GDB, but needs to be in the top-level make because
1704 # if a library is compiled with the bsd headers and gets linked with the
1705 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1706 # a different size).
1707 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1708 # known except to select the sysv environment. Could we use /proc instead?
1709 # These "sysv environments" and "bsd environments" often end up being a pain.
1710 #
1711 # This is not part of CFLAGS because perhaps not all C compilers have this
1712 # option.
1713 tentative_cc="cc -systype sysv"
1714 ;;
1715 i370-ibm-opened*)
1716 tentative_cc="c89"
1717 ;;
f2a0e225 1718 i[3456789]86-*-sysv5*)
671aa708
NN
1719 host_makefile_frag="config/mh-sysv5"
1720 ;;
f2a0e225 1721 i[3456789]86-*-dgux*)
671aa708
NN
1722 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1723 host_makefile_frag="config/mh-dgux386"
1724 ;;
f2a0e225 1725 i[3456789]86-ncr-sysv4.3*)
671aa708
NN
1726 # The MetaWare compiler will generate a copyright message unless you
1727 # turn it off by adding the -Hnocopyr flag.
1728 tentative_cc="cc -Hnocopyr"
1729 ;;
f2a0e225 1730 i[3456789]86-ncr-sysv4*)
671aa708
NN
1731 # for an NCR 3000 (i486/SVR4) system.
1732 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1733 # This compiler not only emits obnoxious copyright messages every time
1734 # you run it, but it chokes and dies on a whole bunch of GNU source
1735 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1736 tentative_cc="/usr/ccs/ATT/cc"
1737 host_makefile_frag="config/mh-ncr3000"
1738 ;;
f2a0e225 1739 i[3456789]86-*-sco3.2v5*)
671aa708 1740 ;;
f2a0e225 1741 i[3456789]86-*-sco*)
671aa708
NN
1742 # The native C compiler botches some simple uses of const. Unfortunately,
1743 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1744 tentative_cc="cc -Dconst="
1745 host_makefile_frag="config/mh-sco"
1746 ;;
f2a0e225 1747 i[3456789]86-*-udk*)
671aa708
NN
1748 host_makefile_frag="config/mh-sysv5"
1749 ;;
f2a0e225 1750 i[3456789]86-*-solaris2*)
671aa708
NN
1751 host_makefile_frag="config/mh-sysv4"
1752 ;;
f2a0e225 1753 i[3456789]86-*-msdosdjgpp*)
671aa708
NN
1754 host_makefile_frag="config/mh-djgpp"
1755 ;;
1756 *-cygwin*)
1757 host_makefile_frag="config/mh-cygwin"
1758 ;;
1759 *-mingw32*)
671aa708
NN
1760 ;;
1761 *-interix*)
1762 host_makefile_frag="config/mh-interix"
1763 ;;
1764 vax-*-ultrix2*)
1765 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1766 tentative_cc=gcc
1767 ;;
1768 *-*-solaris2*)
1769 host_makefile_frag="config/mh-solaris"
1770 ;;
1771 m68k-sun-sunos*)
1772 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1773 # without overflowing the jump tables (-J says to use a 32 bit table)
1774 tentative_cc="cc -J"
1775 ;;
1776 *-hp-hpux*)
1777 tentative_cc="cc -Wp,-H256000"
1778 ;;
1779 *-*-hiux*)
1780 tentative_cc="cc -Wp,-H256000"
1781 ;;
1782 rs6000-*-lynxos*)
1783 # /bin/cc is less than useful for our purposes. Always use GCC
1784 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1785 host_makefile_frag="config/mh-lynxrs6k"
1786 ;;
45f366ab 1787 powerpc-*-darwin*)
be8fff81
RB
1788 host_makefile_frag="config/mh-ppc-darwin"
1789 ;;
d19bca38
PB
1790 powerpc-*-aix*)
1791 host_makefile_frag="config/mh-ppc-aix"
1792 ;;
1793 rs6000-*-aix*)
1794 host_makefile_frag="config/mh-ppc-aix"
1795 ;;
671aa708
NN
1796 *-*-lynxos*)
1797 # /bin/cc is less than useful for our purposes. Always use GCC
1798 tentative_cc="/bin/gcc"
1799 ;;
1800 *-*-sysv4*)
1801 host_makefile_frag="config/mh-sysv4"
1802 ;;
95c53c62
RS
1803 # This is placed last to prevent interfering with the cases above.
1804 i[3456789]86-*-*)
1805 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1806 host_makefile_frag="config/mh-x86omitfp"
1807 ;;
671aa708
NN
1808esac
1809fi
1810
55ffb5ed
NN
1811# If we aren't going to be using gcc, see if we can extract a definition
1812# of CC from the fragment.
1813# Actually, use the 'pre-extracted' version above.
1814if test -z "${CC}" && test "${build}" = "${host}" ; then
1815 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1816 found=
1817 for dir in $PATH; do
1818 test -z "$dir" && dir=.
1819 if test -f $dir/gcc; then
1820 found=yes
1821 break
1822 fi
1823 done
1824 IFS="$save_ifs"
1825 if test -z "${found}" && test -n "${tentative_cc}" ; then
1826 CC=$tentative_cc
1827 fi
1828fi
1829
1830if test "${build}" != "${host}" ; then
1831 # If we are doing a Canadian Cross, in which the host and build systems
1832 # are not the same, we set reasonable default values for the tools.
1833
55ffb5ed
NN
1834 CC=${CC-${host_alias}-gcc}
1835 CFLAGS=${CFLAGS-"-g -O2"}
1836 CXX=${CXX-${host_alias}-c++}
1837 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1838 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
55ffb5ed
NN
1839 BUILD_PREFIX=${build_alias}-
1840 BUILD_PREFIX_1=${build_alias}-
55ffb5ed
NN
1841
1842else
1843 # Set reasonable default values for some tools even if not Canadian.
1844 # Of course, these are different reasonable default values, originally
1845 # specified directly in the Makefile.
1846 # We don't export, so that autoconf can do its job.
1847 # Note that all these settings are above the fragment inclusion point
1848 # in Makefile.in, so can still be overridden by fragments.
1849 # This is all going to change when we autoconfiscate...
1850
55ffb5ed 1851 CC_FOR_BUILD="\$(CC)"
55ffb5ed
NN
1852 BUILD_PREFIX=
1853 BUILD_PREFIX_1=loser-
55ffb5ed 1854
23f6b2f9 1855 # Extract the first word of "gcc", so it can be a program name with args.
55ffb5ed 1856set dummy gcc; ac_word=$2
72a7ab82 1857echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 1858echo "configure:1859: checking for $ac_word" >&5
72a7ab82
AP
1859if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1860 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1861else
1862 if test -n "$CC"; then
1863 ac_cv_prog_CC="$CC" # Let the user override the test.
1864else
72a7ab82
AP
1865 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1866 ac_dummy="$PATH"
1867 for ac_dir in $ac_dummy; do
1868 test -z "$ac_dir" && ac_dir=.
1869 if test -f $ac_dir/$ac_word; then
1870 ac_cv_prog_CC="gcc"
1871 break
1872 fi
1873 done
1874 IFS="$ac_save_ifs"
55ffb5ed
NN
1875fi
1876fi
72a7ab82 1877CC="$ac_cv_prog_CC"
55ffb5ed 1878if test -n "$CC"; then
72a7ab82 1879 echo "$ac_t""$CC" 1>&6
55ffb5ed 1880else
72a7ab82 1881 echo "$ac_t""no" 1>&6
55ffb5ed
NN
1882fi
1883
1884if test -z "$CC"; then
1885 # Extract the first word of "cc", so it can be a program name with args.
1886set dummy cc; ac_word=$2
72a7ab82 1887echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 1888echo "configure:1889: checking for $ac_word" >&5
72a7ab82
AP
1889if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1891else
1892 if test -n "$CC"; then
1893 ac_cv_prog_CC="$CC" # Let the user override the test.
1894else
72a7ab82 1895 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
55ffb5ed 1896 ac_prog_rejected=no
72a7ab82
AP
1897 ac_dummy="$PATH"
1898 for ac_dir in $ac_dummy; do
1899 test -z "$ac_dir" && ac_dir=.
1900 if test -f $ac_dir/$ac_word; then
1901 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1902 ac_prog_rejected=yes
1903 continue
1904 fi
1905 ac_cv_prog_CC="cc"
1906 break
1907 fi
1908 done
1909 IFS="$ac_save_ifs"
55ffb5ed
NN
1910if test $ac_prog_rejected = yes; then
1911 # We found a bogon in the path, so make sure we never use it.
1912 set dummy $ac_cv_prog_CC
1913 shift
72a7ab82 1914 if test $# -gt 0; then
55ffb5ed
NN
1915 # We chose a different compiler from the bogus one.
1916 # However, it has the same basename, so the bogon will be chosen
1917 # first if we set CC to just the basename; use the full file name.
1918 shift
72a7ab82
AP
1919 set dummy "$ac_dir/$ac_word" "$@"
1920 shift
1921 ac_cv_prog_CC="$@"
55ffb5ed
NN
1922 fi
1923fi
1924fi
1925fi
72a7ab82 1926CC="$ac_cv_prog_CC"
55ffb5ed 1927if test -n "$CC"; then
72a7ab82 1928 echo "$ac_t""$CC" 1>&6
55ffb5ed 1929else
72a7ab82 1930 echo "$ac_t""no" 1>&6
55ffb5ed
NN
1931fi
1932
72a7ab82
AP
1933 if test -z "$CC"; then
1934 case "`uname -s`" in
1935 *win32* | *WIN32*)
1936 # Extract the first word of "cl", so it can be a program name with args.
1937set dummy cl; ac_word=$2
1938echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 1939echo "configure:1940: checking for $ac_word" >&5
72a7ab82
AP
1940if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1941 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1942else
1943 if test -n "$CC"; then
1944 ac_cv_prog_CC="$CC" # Let the user override the test.
1945else
72a7ab82
AP
1946 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1947 ac_dummy="$PATH"
1948 for ac_dir in $ac_dummy; do
1949 test -z "$ac_dir" && ac_dir=.
1950 if test -f $ac_dir/$ac_word; then
1951 ac_cv_prog_CC="cl"
1952 break
1953 fi
1954 done
1955 IFS="$ac_save_ifs"
55ffb5ed
NN
1956fi
1957fi
72a7ab82 1958CC="$ac_cv_prog_CC"
55ffb5ed 1959if test -n "$CC"; then
72a7ab82 1960 echo "$ac_t""$CC" 1>&6
55ffb5ed 1961else
72a7ab82 1962 echo "$ac_t""no" 1>&6
55ffb5ed 1963fi
72a7ab82
AP
1964 ;;
1965 esac
6b65a26d 1966 fi
72a7ab82 1967 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
55ffb5ed
NN
1968fi
1969
72a7ab82 1970echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
e8b05380 1971echo "configure:1972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
55ffb5ed 1972
72a7ab82
AP
1973ac_ext=c
1974# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1975ac_cpp='$CPP $CPPFLAGS'
1976ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1977ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1978cross_compiling=$ac_cv_prog_cc_cross
1979
1980cat > conftest.$ac_ext << EOF
1981
e8b05380 1982#line 1983 "configure"
72a7ab82
AP
1983#include "confdefs.h"
1984
1985main(){return(0);}
1986EOF
e8b05380 1987if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
72a7ab82
AP
1988 ac_cv_prog_cc_works=yes
1989 # If we can't run a trivial program, we are probably using a cross compiler.
1990 if (./conftest; exit) 2>/dev/null; then
1991 ac_cv_prog_cc_cross=no
6b65a26d 1992 else
72a7ab82 1993 ac_cv_prog_cc_cross=yes
6b65a26d 1994 fi
72a7ab82
AP
1995else
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1998 ac_cv_prog_cc_works=no
55ffb5ed 1999fi
72a7ab82
AP
2000rm -fr conftest*
2001ac_ext=c
2002# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2003ac_cpp='$CPP $CPPFLAGS'
2004ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2005ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2006cross_compiling=$ac_cv_prog_cc_cross
2007
2008echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2009if test $ac_cv_prog_cc_works = no; then
2010 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2011fi
2012echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
e8b05380 2013echo "configure:2014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
72a7ab82
AP
2014echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2015cross_compiling=$ac_cv_prog_cc_cross
2016
2017echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
e8b05380 2018echo "configure:2019: checking whether we are using GNU C" >&5
72a7ab82
AP
2019if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2020 echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022 cat > conftest.c <<EOF
2023#ifdef __GNUC__
2024 yes;
2025#endif
2026EOF
e8b05380 2027if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
72a7ab82 2028 ac_cv_prog_gcc=yes
6b65a26d 2029else
72a7ab82
AP
2030 ac_cv_prog_gcc=no
2031fi
2032fi
2033
2034echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2035
2036if test $ac_cv_prog_gcc = yes; then
2037 GCC=yes
55ffb5ed 2038else
72a7ab82
AP
2039 GCC=
2040fi
6b65a26d 2041
72a7ab82
AP
2042ac_test_CFLAGS="${CFLAGS+set}"
2043ac_save_CFLAGS="$CFLAGS"
2044CFLAGS=
2045echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
e8b05380 2046echo "configure:2047: checking whether ${CC-cc} accepts -g" >&5
72a7ab82
AP
2047if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2049else
2050 echo 'void f(){}' > conftest.c
2051if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
55ffb5ed
NN
2052 ac_cv_prog_cc_g=yes
2053else
72a7ab82 2054 ac_cv_prog_cc_g=no
55ffb5ed 2055fi
72a7ab82
AP
2056rm -f conftest*
2057
6b65a26d 2058fi
72a7ab82
AP
2059
2060echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
55ffb5ed 2061if test "$ac_test_CFLAGS" = set; then
72a7ab82 2062 CFLAGS="$ac_save_CFLAGS"
55ffb5ed
NN
2063elif test $ac_cv_prog_cc_g = yes; then
2064 if test "$GCC" = yes; then
2065 CFLAGS="-g -O2"
2066 else
2067 CFLAGS="-g"
2068 fi
2069else
2070 if test "$GCC" = yes; then
2071 CFLAGS="-O2"
2072 else
2073 CFLAGS=
2074 fi
2075fi
2076
2077
23f6b2f9
PB
2078 # We must set the default linker to the linker used by gcc for the correct
2079 # operation of libtool. If LD is not defined and we are using gcc, try to
2080 # set the LD default to the ld used by gcc.
2081 if test -z "$LD"; then
2082 if test "$GCC" = yes; then
2083 case $build in
2084 *-*-mingw*)
2085 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2086 *)
2087 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2088 esac
2089 case $gcc_prog_ld in
2090 # Accept absolute paths.
2091 [\\/]* | [A-Za-z]:[\\/]*)
2092 LD="$gcc_prog_ld" ;;
2093 esac
2094 fi
2095 fi
2096
2097 CXX=${CXX-"c++"}
2098 CFLAGS=${CFLAGS-"-g"}
2099 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2100fi
2101
72a7ab82
AP
2102if test $host != $build; then
2103 ac_tool_prefix=${host_alias}-
2104else
2105 ac_tool_prefix=
2106fi
23f6b2f9
PB
2107
2108
55ffb5ed 2109
72a7ab82 2110# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
55ffb5ed 2111set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
72a7ab82 2112echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 2113echo "configure:2114: checking for $ac_word" >&5
72a7ab82
AP
2114if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2115 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
2116else
2117 if test -n "$GNATBIND"; then
2118 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2119else
72a7ab82
AP
2120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2121 ac_dummy="$PATH"
2122 for ac_dir in $ac_dummy; do
2123 test -z "$ac_dir" && ac_dir=.
2124 if test -f $ac_dir/$ac_word; then
2125 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2126 break
2127 fi
2128 done
2129 IFS="$ac_save_ifs"
55ffb5ed
NN
2130fi
2131fi
72a7ab82 2132GNATBIND="$ac_cv_prog_GNATBIND"
55ffb5ed 2133if test -n "$GNATBIND"; then
72a7ab82 2134 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2135else
72a7ab82 2136 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2137fi
2138
72a7ab82 2139
55ffb5ed 2140if test -z "$ac_cv_prog_GNATBIND"; then
72a7ab82 2141if test -n "$ac_tool_prefix"; then
55ffb5ed
NN
2142 # Extract the first word of "gnatbind", so it can be a program name with args.
2143set dummy gnatbind; ac_word=$2
72a7ab82 2144echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 2145echo "configure:2146: checking for $ac_word" >&5
72a7ab82
AP
2146if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2147 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed 2148else
72a7ab82
AP
2149 if test -n "$GNATBIND"; then
2150 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
55ffb5ed 2151else
72a7ab82
AP
2152 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2153 ac_dummy="$PATH"
2154 for ac_dir in $ac_dummy; do
2155 test -z "$ac_dir" && ac_dir=.
2156 if test -f $ac_dir/$ac_word; then
2157 ac_cv_prog_GNATBIND="gnatbind"
2158 break
2159 fi
2160 done
2161 IFS="$ac_save_ifs"
2162 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
55ffb5ed
NN
2163fi
2164fi
72a7ab82
AP
2165GNATBIND="$ac_cv_prog_GNATBIND"
2166if test -n "$GNATBIND"; then
2167 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2168else
72a7ab82 2169 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2170fi
2171
2172else
72a7ab82
AP
2173 GNATBIND="no"
2174fi
55ffb5ed
NN
2175fi
2176
72a7ab82 2177echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
e8b05380 2178echo "configure:2179: checking whether compiler driver understands Ada" >&5
72a7ab82
AP
2179if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
2181else
2182 cat >conftest.adb <<EOF
2183procedure conftest is begin null; end conftest;
2184EOF
2185acx_cv_cc_gcc_supports_ada=no
2186# There is a bug in old released versions of GCC which causes the
2187# driver to exit successfully when the appropriate language module
2188# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2189# Therefore we must check for the error message as well as an
2190# unsuccessful exit.
1db673ca
RO
2191# Other compilers, like HP Tru64 UNIX cc, exit successfully when
2192# given a .adb file, but produce no object file. So we must check
2193# if an object file was really produced to guard against this.
55ffb5ed 2194errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
1db673ca 2195if test x"$errors" = x && test -f conftest.$ac_objext; then
55ffb5ed 2196 acx_cv_cc_gcc_supports_ada=yes
55ffb5ed
NN
2197fi
2198rm -f conftest.*
2199fi
72a7ab82
AP
2200
2201echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
55ffb5ed 2202
1db673ca 2203if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
55ffb5ed
NN
2204 have_gnat=yes
2205else
2206 have_gnat=no
2207fi
2208
72a7ab82 2209echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
e8b05380 2210echo "configure:2211: checking how to compare bootstrapped objects" >&5
72a7ab82
AP
2211if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2212 echo $ac_n "(cached) $ac_c" 1>&6
a76494aa
PB
2213else
2214 echo abfoo >t1
2215 echo cdfoo >t2
2216 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
6cf1ac42
PB
2217 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2218 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2219 :
2220 else
2221 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2222 fi
2223 fi
a76494aa
PB
2224 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2225 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
6cf1ac42 2226 :
a76494aa
PB
2227 else
2228 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2229 fi
2230 fi
2231 rm t1 t2
2232
2233fi
72a7ab82
AP
2234
2235echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
a76494aa
PB
2236do_compare="$gcc_cv_prog_cmp_skip"
2237
2238
55ffb5ed 2239
bebf829d 2240# Check for GMP and MPFR
6de9cd9a
DN
2241gmplibs=
2242gmpinc=
2243have_gmp=yes
bebf829d
PB
2244# Specify a location for mpfr
2245# check for this first so it ends up on the link line before gmp.
2246# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2247if test "${with_mpfr_dir+set}" = set; then
2248 withval="$with_mpfr_dir"
72a7ab82
AP
2249 :
2250fi
bebf829d
PB
2251
2252
2253if test "x$with_mpfr_dir" != x; then
68193f9b 2254 gmpinc="-I$with_mpfr_dir"
bebf829d
PB
2255 gmplibs="$with_mpfr_dir/libmpfr.a"
2256else
2257 gmplibs="-lmpfr"
2258fi
2259
2260# Check whether --with-mpfr or --without-mpfr was given.
2261if test "${with_mpfr+set}" = set; then
2262 withval="$with_mpfr"
72a7ab82
AP
2263 :
2264fi
bebf829d
PB
2265
2266
2267if test "x$with_mpfr" != x; then
2268 gmplibs="-L$with_mpfr/lib $gmplibs"
2269 gmpinc="-I$with_mpfr/include"
2270fi
2271
6de9cd9a
DN
2272# Specify a location for gmp
2273# Check whether --with-gmp-dir or --without-gmp-dir was given.
2274if test "${with_gmp_dir+set}" = set; then
2275 withval="$with_gmp_dir"
72a7ab82
AP
2276 :
2277fi
6de9cd9a
DN
2278
2279
bebf829d
PB
2280if test "x$with_gmp_dir" != x; then
2281 gmpinc="$gmpinc -I$with_gmp_dir"
6de9cd9a 2282 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
bebf829d 2283 gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
6de9cd9a 2284 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
bebf829d 2285 gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
6de9cd9a
DN
2286 fi
2287 # One of the later tests will catch the error if neither library is present.
bebf829d
PB
2288else
2289 gmplibs="$gmplibs -lgmp"
6de9cd9a
DN
2290fi
2291
2292# Check whether --with-gmp or --without-gmp was given.
2293if test "${with_gmp+set}" = set; then
2294 withval="$with_gmp"
72a7ab82
AP
2295 :
2296fi
6de9cd9a
DN
2297
2298
bebf829d
PB
2299if test "x$with_gmp" != x; then
2300 gmplibs="-L$with_gmp/lib $gmplibs"
2301 gmpinc="-I$with_gmp/include $gmpinc"
6de9cd9a
DN
2302fi
2303
2304saved_CFLAGS="$CFLAGS"
2305CFLAGS="$CFLAGS $gmpinc"
2306# Check GMP actually works
72a7ab82 2307echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
e8b05380 2308echo "configure:2309: checking for correct version of gmp.h" >&5
72a7ab82 2309cat > conftest.$ac_ext <<EOF
e8b05380 2310#line 2311 "configure"
72a7ab82 2311#include "confdefs.h"
6de9cd9a 2312#include "gmp.h"
72a7ab82 2313int main() {
6de9cd9a
DN
2314
2315#if __GNU_MP_VERSION < 3
2316choke me
2317#endif
2318
72a7ab82
AP
2319; return 0; }
2320EOF
e8b05380 2321if { (eval echo configure:2322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
72a7ab82
AP
2322 rm -rf conftest*
2323 echo "$ac_t""yes" 1>&6
2324else
2325 echo "configure: failed program was:" >&5
2326 cat conftest.$ac_ext >&5
2327 rm -rf conftest*
2328 echo "$ac_t""no" 1>&6; have_gmp=no
2329fi
2330rm -f conftest*
6de9cd9a
DN
2331
2332if test x"$have_gmp" = xyes; then
72a7ab82 2333 echo $ac_n "checking for MPFR""... $ac_c" 1>&6
e8b05380 2334echo "configure:2335: checking for MPFR" >&5
6de9cd9a
DN
2335
2336 saved_LIBS="$LIBS"
2337 LIBS="$LIBS $gmplibs"
72a7ab82 2338 cat > conftest.$ac_ext <<EOF
e8b05380 2339#line 2340 "configure"
72a7ab82 2340#include "confdefs.h"
6de9cd9a 2341#include <gmp.h>
bebf829d 2342#include <mpfr.h>
72a7ab82 2343int main() {
bebf829d 2344mpfr_t n; mpfr_init(n);
72a7ab82
AP
2345; return 0; }
2346EOF
e8b05380 2347if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
72a7ab82
AP
2348 rm -rf conftest*
2349 echo "$ac_t""yes" 1>&6
2350else
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2353 rm -rf conftest*
2354 echo "$ac_t""no" 1>&6; have_gmp=no
2355fi
2356rm -f conftest*
6de9cd9a
DN
2357 LIBS="$saved_LIBS"
2358 CFLAGS="$saved_CFLAGS"
2359fi
2360
bebf829d 2361# Flags needed for both GMP and/or MPFR
6de9cd9a
DN
2362
2363
2364
1e0f07d3 2365# By default, C is the only stage 1 language.
2805b53a
NN
2366stage1_languages=c
2367
2368
55ffb5ed
NN
2369# Figure out what language subdirectories are present.
2370# Look if the user specified --enable-languages="..."; if not, use
2371# the environment variable $LANGUAGES if defined. $LANGUAGES might
2372# go away some day.
2373# NB: embedded tabs in this IF block -- do not untabify
2374if test -d ${srcdir}/gcc; then
2375 if test x"${enable_languages+set}" != xset; then
2376 if test x"${LANGUAGES+set}" = xset; then
2377 enable_languages="${LANGUAGES}"
2378 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2379 else
2380 enable_languages=all
2381 fi
2382 else
2383 if test x"${enable_languages}" = x ||
2384 test x"${enable_languages}" = xyes;
2385 then
2386 echo configure.in: --enable-languages needs at least one language argument 1>&2
2387 exit 1
2388 fi
2389 fi
2390 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2391
7f26dfa3
FXC
2392 # 'f95' is the old name for the 'fortran' language. We issue a warning
2393 # and make the substitution.
2394 case ,${enable_languages}, in
2395 *,f95,*)
2396 echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
2397 enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
2398 ;;
2399 esac
2400
55ffb5ed
NN
2401 # First scan to see if an enabled language requires some other language.
2402 # We assume that a given config-lang.in will list all the language
2403 # front ends it requires, even if some are required indirectly.
2404 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2405 case ${lang_frag} in
2406 ..) ;;
2407 # The odd quoting in the next line works around
2408 # an apparent bug in bash 1.12 on linux.
2409 ${srcdir}/gcc/[*]/config-lang.in) ;;
2410 *)
2411 # From the config-lang.in, get $language, $lang_requires
2412 language=
2413 lang_requires=
2414 . ${lang_frag}
2415 for other in ${lang_requires} ; do
2416 case ,${enable_languages}, in
2417 *,$other,*) ;;
2418 *,all,*) ;;
2419 *,$language,*)
2420 echo " \`$other' language required by \`$language'; enabling" 1>&2
2421 enable_languages="${enable_languages},${other}"
2422 ;;
2423 esac
2424 done
2425 ;;
2426 esac
2427 done
2428
2429 new_enable_languages=c
2430 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
9c71a529 2431 potential_languages=c
55ffb5ed
NN
2432
2433 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2434 case ${lang_frag} in
2435 ..) ;;
2436 # The odd quoting in the next line works around
2437 # an apparent bug in bash 1.12 on linux.
2438 ${srcdir}/gcc/[*]/config-lang.in) ;;
2439 *)
72a7ab82 2440 # From the config-lang.in, get $language, $target_libs,
2805b53a 2441 # $lang_dirs, $boot_language, and $build_by_default
55ffb5ed
NN
2442 language=
2443 target_libs=
2444 lang_dirs=
2805b53a 2445 boot_language=
55ffb5ed 2446 build_by_default=
9c71a529 2447 need_gmp=
55ffb5ed 2448 . ${lang_frag}
9c71a529 2449 potential_languages="${potential_languages},${language}"
55ffb5ed
NN
2450 # This is quite sensitive to the ordering of the case statement arms.
2451 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2452 *::*:*)
2453 echo "${lang_frag} doesn't set \$language." 1>&2
2454 exit 1
9c71a529 2455 ;;
55ffb5ed
NN
2456 *:ada:no:*)
2457 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2458 add_this_lang=no
2459 ;;
2460 *,${language},*:*:*:*)
2461 # Language was explicitly selected; include it.
2462 add_this_lang=yes
2463 ;;
2464 *,all,*:*:*:no)
2465 # 'all' was selected, but this is not a default language
9c71a529 2466 # so do not include it.
55ffb5ed 2467 add_this_lang=no
9c71a529 2468 ;;
55ffb5ed
NN
2469 *,all,*:*:*:*)
2470 # 'all' was selected and this is a default language; include it.
2471 add_this_lang=yes
2472 ;;
2473 *)
2474 add_this_lang=no
2475 ;;
2476 esac
6de9cd9a 2477
ce7cbbb0
PE
2478 # Disable languages that need GMP if it isn't available.
2479 case ,${enable_languages},:${have_gmp}:${need_gmp} in
2480 *,${language},*:no:yes)
2481 # Specifically requested language; tell them.
72a7ab82 2482 { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
ce7cbbb0
PE
2483 ;;
2484 *:no:yes)
2485 # Silently disable.
2486 add_this_lang=no
2487 ;;
2488 esac
4fab7234
HPN
2489
2490 # Disable a language that is unsupported by the target.
2491 case " $unsupported_languages " in
2492 *" $language "*)
2493 add_this_lang=no
2494 ;;
2495 esac
2496
6de9cd9a 2497 case $add_this_lang in
55ffb5ed
NN
2498 no)
2499 # Remove language-dependent dirs.
2805b53a
NN
2500 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2501 ;;
55ffb5ed
NN
2502 *)
2503 new_enable_languages="$new_enable_languages,$language"
2805b53a
NN
2504 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2505 case ${boot_language} in
2506 yes)
340de83f
NN
2507 # Add to (comma-separated) list of stage 1 languages.
2508 stage1_languages="${stage1_languages},${language}"
2805b53a
NN
2509 ;;
2510 esac
2511 ;;
55ffb5ed
NN
2512 esac
2513 ;;
2514 esac
2515 done
2516
79b4b7d2 2517 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
55ffb5ed 2518 if test "x$missing_languages" != x; then
72a7ab82 2519 { echo "configure: error:
0cf085e4 2520The following requested languages could not be built: ${missing_languages}
72a7ab82 2521Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
55ffb5ed
NN
2522 fi
2523
2524 if test "x$new_enable_languages" != "x$enable_languages"; then
2525 echo The following languages will be built: ${new_enable_languages}
2526 fi
2527 enable_languages="$new_enable_languages"
6bbec498 2528 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
55ffb5ed
NN
2529fi
2530
ee6a22df
L
2531# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2532# $build_configdirs and $target_configdirs.
55ffb5ed
NN
2533# If we have the source for $noconfigdirs entries, add them to $notsupp.
2534
2535notsupp=""
2536for dir in . $skipdirs $noconfigdirs ; do
ee6a22df 2537 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
55ffb5ed
NN
2538 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2539 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2540 if test -r $srcdir/$dirname/configure ; then
2541 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2542 true
2543 else
2544 notsupp="$notsupp $dir"
2545 fi
2546 fi
2547 fi
ee6a22df
L
2548 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2549 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2550 if test -r $srcdir/$dirname/configure ; then
2551 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2552 true
2553 else
2554 notsupp="$notsupp $dir"
2555 fi
2556 fi
2557 fi
55ffb5ed
NN
2558 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2559 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2560 if test -r $srcdir/$dirname/configure ; then
2561 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2562 true
2563 else
2564 notsupp="$notsupp $dir"
2565 fi
2566 fi
2567 fi
2568done
2569
2570# Sometimes the tools are distributed with libiberty but with no other
2571# libraries. In that case, we don't want to build target-libiberty.
2572if test -n "${target_configdirs}" ; then
2573 others=
2574 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2575 if test "$i" != "libiberty" ; then
2576 if test -r $srcdir/$i/configure ; then
2577 others=yes;
2578 break;
2579 fi
2580 fi
2581 done
2582 if test -z "${others}" ; then
2583 target_configdirs=
2584 fi
2585fi
2586
2587# Quietly strip out all directories which aren't configurable in this tree.
2588# This relies on all configurable subdirectories being autoconfiscated, which
2589# is now the case.
23f6b2f9
PB
2590build_configdirs_all="$build_configdirs"
2591build_configdirs=
2592for i in ${build_configdirs_all} ; do
72a7ab82 2593 j=`echo $i | sed -e s/build-//g`
23f6b2f9
PB
2594 if test -f ${srcdir}/$j/configure ; then
2595 build_configdirs="${build_configdirs} $i"
2596 fi
2597done
2598
55ffb5ed
NN
2599configdirs_all="$configdirs"
2600configdirs=
2601for i in ${configdirs_all} ; do
2602 if test -f ${srcdir}/$i/configure ; then
2603 configdirs="${configdirs} $i"
2604 fi
2605done
23f6b2f9 2606
55ffb5ed
NN
2607target_configdirs_all="$target_configdirs"
2608target_configdirs=
2609for i in ${target_configdirs_all} ; do
72a7ab82 2610 j=`echo $i | sed -e s/target-//g`
55ffb5ed
NN
2611 if test -f ${srcdir}/$j/configure ; then
2612 target_configdirs="${target_configdirs} $i"
2613 fi
2614done
2615
2616# Produce a warning message for the subdirs we can't configure.
2617# This isn't especially interesting in the Cygnus tree, but in the individual
2618# FSF releases, it's important to let people know when their machine isn't
2619# supported by the one or two programs in a package.
2620
2621if test -n "${notsupp}" && test -z "${norecursion}" ; then
2622 # If $appdirs is non-empty, at least one of those directories must still
2623 # be configured, or we error out. (E.g., if the gas release supports a
2624 # specified target in some subdirs but not the gas subdir, we shouldn't
2625 # pretend that all is well.)
2626 if test -n "$appdirs" ; then
2627 for dir in $appdirs ; do
2628 if test -r $dir/Makefile.in ; then
2629 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2630 appdirs=""
2631 break
2632 fi
23f6b2f9 2633 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
55ffb5ed
NN
2634 appdirs=""
2635 break
2636 fi
2637 fi
2638 done
2639 if test -n "$appdirs" ; then
2640 echo "*** This configuration is not supported by this package." 1>&2
2641 exit 1
2642 fi
2643 fi
2644 # Okay, some application will build, or we don't care to check. Still
2645 # notify of subdirs not getting built.
2646 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2647 echo " ${notsupp}" 1>&2
2648 echo " (Any other directories should still work fine.)" 1>&2
2649fi
2650
2651case "$host" in
2652 *msdosdjgpp*)
2653 enable_gdbtk=no ;;
2654esac
2655
2656copy_dirs=
2657
526635cb
MM
2658# Check whether --with-build-sysroot or --without-build-sysroot was given.
2659if test "${with_build_sysroot+set}" = set; then
2660 withval="$with_build_sysroot"
2661 if test x"$withval" != x ; then
2662 SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
2663 fi
2664else
2665 SYSROOT_CFLAGS_FOR_TARGET=
72a7ab82
AP
2666fi
2667
526635cb
MM
2668
2669
55ffb5ed
NN
2670# Handle --with-headers=XXX. If the value is not "yes", the contents of
2671# the named directory are copied to $(tooldir)/sys-include.
2672if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2673 if test x${is_cross_compiler} = xno ; then
2674 echo 1>&2 '***' --with-headers is only supported when cross compiling
2675 exit 1
2676 fi
2677 if test x"${with_headers}" != xyes ; then
2678 case "${exec_prefixoption}" in
2679 "") x=${prefix} ;;
2680 *) x=${exec_prefix} ;;
2681 esac
2682 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2683 fi
2684fi
2685
2686# Handle --with-libs=XXX. If the value is not "yes", the contents of
2687# the name directories are copied to $(tooldir)/lib. Multiple directories
2688# are permitted.
2689if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2690 if test x${is_cross_compiler} = xno ; then
2691 echo 1>&2 '***' --with-libs is only supported when cross compiling
2692 exit 1
2693 fi
2694 if test x"${with_libs}" != xyes ; then
2695 # Copy the libraries in reverse order, so that files in the first named
2696 # library override files in subsequent libraries.
2697 case "${exec_prefixoption}" in
2698 "") x=${prefix} ;;
2699 *) x=${exec_prefix} ;;
2700 esac
2701 for l in ${with_libs}; do
2702 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2703 done
2704 fi
2705fi
2706
e8b05380
PB
2707# Set with_gnu_as and with_gnu_ld as appropriate.
2708#
2709# This is done by determining whether or not the appropriate directory
2710# is available, and by checking whether or not specific configurations
2711# have requested that this magic not happen.
2712#
2713# The command line options always override the explicit settings in
2714# configure.in, and the settings in configure.in override this magic.
2715#
2716# If the default for a toolchain is to use GNU as and ld, and you don't
2717# want to do that, then you should use the --without-gnu-as and
2718# --without-gnu-ld options for the configure script.
2719
2720if test x${use_gnu_as} = x &&
2721 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2722 with_gnu_as=yes
2723 extra_host_args="$extra_host_args --with-gnu-as"
2724fi
2725
2726if test x${use_gnu_ld} = x &&
2727 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2728 with_gnu_ld=yes
2729 extra_host_args="$extra_host_args --with-gnu-ld"
2730fi
2731
2732# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2733# can detect this case.
2734
2735if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2736 with_newlib=yes
2737 extra_host_args="$extra_host_args --with-newlib"
2738fi
2739
55ffb5ed
NN
2740# Handle ${copy_dirs}
2741set fnord ${copy_dirs}
2742shift
2743while test $# != 0 ; do
2744 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2745 :
2746 else
2747 echo Copying $1 to $2
2748
2749 # Use the install script to create the directory and all required
2750 # parent directories.
2751 if test -d $2 ; then
2752 :
2753 else
2754 echo >config.temp
2755 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2756 fi
2757
2758 # Copy the directory, assuming we have tar.
2759 # FIXME: Should we use B in the second tar? Not all systems support it.
2760 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2761
2762 # It is the responsibility of the user to correctly adjust all
2763 # symlinks. If somebody can figure out how to handle them correctly
2764 # here, feel free to add the code.
2765
2766 echo $1 > $2/COPIED
2767 fi
2768 shift; shift
2769done
2770
e8b05380
PB
2771# Determine a target-dependent exec_prefix that the installed
2772# gcc will search in. Keep this list sorted by triplet, with
2773# the *-*-osname triplets last.
2774md_exec_prefix=
2775case "${target}" in
2776 alpha*-*-*vms*)
2777 md_exec_prefix=/gnu/lib/gcc-lib
2778 ;;
2779 i3456786-pc-msdosdjgpp*)
2780 md_exec_prefix=/dev/env/DJDIR/bin
2781 ;;
2782 i3456786-*-sco3.2v5*)
2783 if test $with_gnu_as = yes; then
2784 md_exec_prefix=/usr/gnu/bin
2785 else
2786 md_exec_prefix=/usr/ccs/bin/elf
2787 fi
2788 ;;
2789
2790 mn10300-*-* | \
2791 powerpc-*-chorusos* | \
2792 powerpc*-*-eabi* | \
2793 powerpc*-*-sysv* | \
2794 powerpc*-*-kaos* | \
2795 s390x-ibm-tpf*)
2796 md_exec_prefix=/usr/ccs/bin
2797 ;;
2798 sparc64-*-elf*)
2799 ;;
2800 v850*-*-*)
2801 md_exec_prefix=/usr/ccs/bin
2802 ;;
2803 xtensa-*-elf*)
2804 ;;
2805
2806 *-*-beos* | \
2807 *-*-elf* | \
2808 *-*-hpux* | \
2809 *-*-netware* | \
2810 *-*-nto-qnx* | \
2811 *-*-rtems* | \
2812 *-*-solaris2* | \
2813 *-*-sysv45* | \
2814 *-*-vxworks* | \
2815 *-wrs-windiss)
2816 md_exec_prefix=/usr/ccs/bin
2817 ;;
2818esac
2819
671aa708
NN
2820extra_arflags_for_target=
2821extra_nmflags_for_target=
2822extra_ranlibflags_for_target=
2823target_makefile_frag=/dev/null
2824case "${target}" in
61fec9ff 2825 *-*-netware*)
671aa708
NN
2826 target_makefile_frag="config/mt-netware"
2827 ;;
98a5bb3b
RM
2828 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2829 target_makefile_frag="config/mt-gnu"
671aa708
NN
2830 ;;
2831 *-*-aix4.[3456789]* | *-*-aix[56789].*)
72a7ab82 2832 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
671aa708
NN
2833 # commands to handle both 32-bit and 64-bit objects. These flags are
2834 # harmless if we're using GNU nm or ar.
2835 extra_arflags_for_target=" -X32_64"
2836 extra_nmflags_for_target=" -B -X32_64"
2837 ;;
2838 *-*-darwin*)
2839 # ranlib from Darwin requires the -c flag to look at common symbols.
2840 extra_ranlibflags_for_target=" -c"
2841 ;;
2842 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2843 target_makefile_frag="config/mt-wince"
2844 ;;
2845esac
2846
2847alphaieee_frag=/dev/null
2848case $target in
2849 alpha*-*-*)
2850 # This just makes sure to use the -mieee option to build target libs.
2851 # This should probably be set individually by each library.
2852 alphaieee_frag="config/mt-alphaieee"
2853 ;;
2854esac
2855
2856# If --enable-target-optspace always use -Os instead of -O2 to build
2857# the target libraries, similarly if it is not specified, use -Os
2858# on selected platforms.
2859ospace_frag=/dev/null
2860case "${enable_target_optspace}:${target}" in
2861 yes:*)
2862 ospace_frag="config/mt-ospace"
2863 ;;
2864 :d30v-*)
2865 ospace_frag="config/mt-d30v"
2866 ;;
2867 :m32r-* | :d10v-* | :fr30-*)
2868 ospace_frag="config/mt-ospace"
2869 ;;
2870 no:* | :*)
2871 ;;
2872 *)
2873 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2874 ;;
2875esac
2876
671aa708
NN
2877# Default to using --with-stabs for certain targets.
2878if test x${with_stabs} = x ; then
2879 case "${target}" in
89a95129 2880 mips*-*-irix[56]*)
671aa708
NN
2881 ;;
2882 mips*-*-* | alpha*-*-osf*)
2883 with_stabs=yes;
2884 extra_host_args="${extra_host_args} --with-stabs"
2885 ;;
2886 esac
2887fi
2888
2889# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2890# them automatically.
2891case "${host}" in
72a7ab82 2892 hppa*64*-*-hpux11*)
671aa708
NN
2893 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2894 ;;
2895esac
2896
671aa708
NN
2897# Some systems (e.g., one of the i386-aix systems the gas testers are
2898# using) don't handle "\$" correctly, so don't use it here.
df445104 2899tooldir='${exec_prefix}'/${target_alias}
671aa708
NN
2900build_tooldir=${tooldir}
2901
671aa708
NN
2902# Create a .gdbinit file which runs the one in srcdir
2903# and tells GDB to look there for source files.
2904
2905if test -r ${srcdir}/.gdbinit ; then
2906 case ${srcdir} in
2907 .) ;;
2908 *) cat > ./.gdbinit <<EOF
2909# ${NO_EDIT}
2910dir ${srcdir}
2911dir .
2912source ${srcdir}/.gdbinit
2913EOF
2914 ;;
2915 esac
2916fi
2917
671aa708
NN
2918# Make sure that the compiler is able to generate an executable. If it
2919# can't, we are probably in trouble. We don't care whether we can run the
2920# executable--we might be using a cross compiler--we only care whether it
2921# can be created. At this point the main configure script has set CC.
2922we_are_ok=no
2923echo "int main () { return 0; }" > conftest.c
2924${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2925if test $? = 0 ; then
2926 if test -s conftest || test -s conftest.exe ; then
2927 we_are_ok=yes
2928 fi
72a7ab82 2929fi
671aa708
NN
2930case $we_are_ok in
2931 no)
2932 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2933 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2934 rm -f conftest*
2935 exit 1
2936 ;;
2937esac
2938rm -f conftest*
2939
2940# The Solaris /usr/ucb/cc compiler does not appear to work.
2941case "${host}" in
2942 sparc-sun-solaris2*)
2943 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2944 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2945 could_use=
2946 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2947 if test -d /opt/cygnus/bin ; then
2948 if test "$could_use" = "" ; then
2949 could_use="/opt/cygnus/bin"
2950 else
2951 could_use="$could_use or /opt/cygnus/bin"
2952 fi
2953 fi
2954 if test "$could_use" = "" ; then
2955 echo "Warning: compilation may fail because you're using"
2956 echo "/usr/ucb/cc. You should change your PATH or CC "
2957 echo "variable and rerun configure."
2958 else
2959 echo "Warning: compilation may fail because you're using"
2960 echo "/usr/ucb/cc, when you should use the C compiler from"
2961 echo "$could_use. You should change your"
2962 echo "PATH or CC variable and rerun configure."
2963 fi
2964 fi
2965 ;;
2966esac
2967
671aa708
NN
2968case "${host}" in
2969 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
256f7136 2970 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
671aa708
NN
2971 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
2972esac
2973
2974# Record target_configdirs and the configure arguments for target and
2975# build configuration in Makefile.
2976target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
23f6b2f9 2977build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
671aa708 2978
671aa708
NN
2979# Determine whether gdb needs tk/tcl or not.
2980# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
2981# and in that case we want gdb to be built without tk. Ugh!
2982# In fact I believe gdb is the *only* package directly dependent on tk,
2983# so we should be able to put the 'maybe's in unconditionally and
2984# leave out the maybe dependencies when enable_gdbtk is false. I'm not
2985# 100% sure that that's safe though.
e914a571 2986
b4f96efe 2987gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
671aa708
NN
2988case "$enable_gdbtk" in
2989 no)
2990 GDB_TK="" ;;
e914a571
AC
2991 yes)
2992 GDB_TK="${gdb_tk}" ;;
671aa708 2993 *)
e914a571
AC
2994 # Only add the dependency on gdbtk when GDBtk is part of the gdb
2995 # distro. Eventually someone will fix this and move Insight, nee
2996 # gdbtk to a separate directory.
2997 if test -d ${srcdir}/gdb/gdbtk ; then
2998 GDB_TK="${gdb_tk}"
2999 else
3000 GDB_TK=""
3001 fi
3002 ;;
671aa708 3003esac
ef9db8d5
DJ
3004CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
3005INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
671aa708 3006
60975492 3007# Strip out unwanted targets.
8b87bb96
NN
3008
3009# While at that, we remove Makefiles if we were started for recursive
3010# configuration, so that the top-level Makefile reconfigures them,
3011# like we used to do when configure itself was recursive.
8b87bb96 3012
60975492
PB
3013# Loop over modules. $extrasub must be used with care, limiting as
3014# much as possible the usage of range addresses. That's because autoconf
3015# splits the sed script to overcome limits in the number of commands,
3016# and relying on carefully-timed sed passes may turn out to be very hard
3017# to maintain later. In this particular case, you just have to be careful
3018# not to nest @if/@endif pairs, because configure will not warn you at all.
8b87bb96 3019
f516a7da
PB
3020# Check whether --enable-bootstrap or --disable-bootstrap was given.
3021if test "${enable_bootstrap+set}" = set; then
3022 enableval="$enable_bootstrap"
72a7ab82 3023 :
f516a7da 3024else
ce521a9c 3025 enable_bootstrap=default
72a7ab82
AP
3026fi
3027
f516a7da 3028
ce521a9c
PB
3029# Issue errors and warnings for invalid/strange bootstrap combinations.
3030case "$configdirs" in
3031 *gcc*) have_compiler=yes ;;
3032 *) have_compiler=no ;;
3033esac
3034
3035case "$have_compiler:$host:$target:$enable_bootstrap" in
3036 *:*:*:no) ;;
3037
1ca26cd2 3038 # Default behavior. Enable bootstrap if we have a compiler
ce521a9c
PB
3039 # and we are in a native configuration.
3040 yes:$build:$build:default)
1ca26cd2 3041 enable_bootstrap=yes ;;
ce521a9c
PB
3042
3043 *:*:*:default)
3044 enable_bootstrap=no ;;
3045
3046 # We have a compiler and we are in a native configuration, bootstrap is ok
2d309510 3047 yes:$build:$build:yes)
ce521a9c
PB
3048 ;;
3049
3050 # Other configurations, but we have a compiler. Assume the user knows
3051 # what he's doing.
2d309510 3052 yes:*:*:yes)
72a7ab82 3053 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
ce521a9c
PB
3054 ;;
3055
3056 # No compiler: if they passed --enable-bootstrap explicitly, fail
2d309510 3057 no:*:*:yes)
72a7ab82 3058 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
ce521a9c
PB
3059
3060 # Fail if wrong command line
3061 *)
72a7ab82 3062 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
ce521a9c
PB
3063 ;;
3064esac
3065
3066# Adjust the toplevel makefile according to whether bootstrap was selected.
f516a7da
PB
3067case "$enable_bootstrap" in
3068 yes)
5607edfd 3069 bootstrap_suffix=bootstrap ;;
f516a7da 3070 no)
5607edfd 3071 bootstrap_suffix=no-bootstrap ;;
f516a7da
PB
3072esac
3073
23f6b2f9 3074for module in ${build_configdirs} ; do
5607edfd
PB
3075 if test -z "${no_recursion}" \
3076 && test -f ${build_subdir}/${module}/Makefile; then
3077 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3078 rm -f ${build_subdir}/${module}/Makefile
3079 fi
3080 extrasub="$extrasub
3081/^@if build-$module\$/d
3082/^@endif build-$module\$/d
3083/^@if build-$module-$bootstrap_suffix\$/d
3084/^@endif build-$module-$bootstrap_suffix\$/d"
3085done
3086for module in ${configdirs} ; do
a6fbc1e2
AS
3087 if test -z "${no_recursion}"; then
3088 for file in stage*-${module}/Makefile ${module}/Makefile; do
3089 if test -f ${file}; then
3090 echo 1>&2 "*** removing ${file} to force reconfigure"
3091 rm -f ${file}
3092 fi
3093 done
5607edfd
PB
3094 fi
3095 extrasub="$extrasub
3096/^@if $module\$/d
3097/^@endif $module\$/d
3098/^@if $module-$bootstrap_suffix\$/d
3099/^@endif $module-$bootstrap_suffix\$/d"
3100done
3101for module in ${target_configdirs} ; do
3102 if test -z "${no_recursion}" \
3103 && test -f ${target_subdir}/${module}/Makefile; then
3104 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3105 rm -f ${target_subdir}/${module}/Makefile
3106 fi
3107 extrasub="$extrasub
3108/^@if target-$module\$/d
3109/^@endif target-$module\$/d
3110/^@if target-$module-$bootstrap_suffix\$/d
3111/^@endif target-$module-$bootstrap_suffix\$/d"
3112done
3113
60975492
PB
3114extrasub="$extrasub
3115/^@if /,/^@endif /d"
671aa708
NN
3116
3117# Create the serialization dependencies. This uses a temporary file.
3118
ade82b16
AO
3119# Check whether --enable-serial-configure or --disable-serial-configure was given.
3120if test "${enable_serial_configure+set}" = set; then
3121 enableval="$enable_serial_configure"
72a7ab82
AP
3122 :
3123fi
ade82b16
AO
3124
3125
bf1d3e81
NN
3126case ${enable_serial_configure} in
3127 yes)
3128 enable_serial_build_configure=yes
3129 enable_serial_host_configure=yes
3130 enable_serial_target_configure=yes
3131 ;;
3132esac
3133
671aa708
NN
3134# These force 'configure's to be done one at a time, to avoid problems
3135# with contention over a shared config.cache.
3136rm -f serdep.tmp
ade82b16 3137echo '# serdep.tmp' > serdep.tmp
671aa708 3138olditem=
bf1d3e81 3139test "x${enable_serial_build_configure}" = xyes &&
671aa708
NN
3140for item in ${build_configdirs} ; do
3141 case ${olditem} in
3142 "") ;;
ade82b16 3143 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
671aa708
NN
3144 esac
3145 olditem=${item}
3146done
3147olditem=
bf1d3e81 3148test "x${enable_serial_host_configure}" = xyes &&
671aa708
NN
3149for item in ${configdirs} ; do
3150 case ${olditem} in
3151 "") ;;
ade82b16 3152 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
671aa708
NN
3153 esac
3154 olditem=${item}
3155done
3156olditem=
bf1d3e81 3157test "x${enable_serial_target_configure}" = xyes &&
671aa708
NN
3158for item in ${target_configdirs} ; do
3159 case ${olditem} in
3160 "") ;;
ade82b16 3161 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
671aa708
NN
3162 esac
3163 olditem=${item}
3164done
3165serialization_dependencies=serdep.tmp
3166
3167
ade82b16
AO
3168# Base args. Strip norecursion, cache-file, srcdir, host, build,
3169# target and nonopt. These are the ones we might not want to pass
43bb47c2
DJ
3170# down to subconfigures. Also strip program-prefix, program-suffix,
3171# and program-transform-name, so that we can pass down a consistent
3172# program-transform-name. If autoconf has put single quotes around
3173# any of these arguments (because they contain shell metacharacters)
3174# then this will fail; in practice this only happens for
3175# --program-transform-name, so be sure to override --program-transform-name
3176# at the end of the argument list.
3177# These will be expanded by make, so quote '$'.
b348267b 3178cat <<\EOF_SED > conftestsed
9104315a
NN
3179s/ --no[^ ]*/ /g
3180s/ --c[a-z-]*[= ][^ ]*//g
3181s/ --sr[a-z-]*[= ][^ ]*//g
3182s/ --ho[a-z-]*[= ][^ ]*//g
3183s/ --bu[a-z-]*[= ][^ ]*//g
3184s/ --t[a-z-]*[= ][^ ]*//g
3185s/ --program-[pst][a-z-]*[= ][^ ]*//g
3186s/ -cache-file[= ][^ ]*//g
3187s/ -srcdir[= ][^ ]*//g
3188s/ -host[= ][^ ]*//g
3189s/ -build[= ][^ ]*//g
3190s/ -target[= ][^ ]*//g
3191s/ -program-prefix[= ][^ ]*//g
3192s/ -program-suffix[= ][^ ]*//g
3193s/ -program-transform-name[= ][^ ]*//g
b348267b
GK
3194s/ [^' -][^ ]* / /
3195s/^ *//;s/ *$//
eeae7b41
DJ
3196s,\$,$$,g
3197EOF_SED
3198sed -f conftestsed <<EOF_SED > conftestsed.out
72a7ab82 3199 ${ac_configure_args}
b348267b 3200EOF_SED
eeae7b41
DJ
3201baseargs=`cat conftestsed.out`
3202rm -f conftestsed conftestsed.out
671aa708 3203
43bb47c2
DJ
3204# Add in --program-transform-name, after --program-prefix and
3205# --program-suffix have been applied to it. Autoconf has already
3206# doubled dollar signs and backslashes in program_transform_name; we want
3207# the backslashes un-doubled, and then the entire thing wrapped in single
72a7ab82 3208# quotes, because this will be expanded first by make and then by the shell.
43bb47c2
DJ
3209# Also, because we want to override the logic in subdir configure scripts to
3210# choose program_transform_name, replace any s,x,x, with s,y,y,.
3211sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3212${program_transform_name}
3213EOF_SED
3214gcc_transform_name=`cat conftestsed.out`
3215rm -f conftestsed.out
3216baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3217
671aa708
NN
3218# For the build-side libraries, we just need to pretend we're native,
3219# and not use the same cache file. Multilibs are neither needed nor
3220# desired.
556f03c4 3221build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
671aa708
NN
3222
3223# For host modules, accept cache file option, or specification as blank.
3224case "${cache_file}" in
3225"") # empty
3226 cache_file_option="" ;;
3227/* | [A-Za-z]:[\\/]* ) # absolute path
3228 cache_file_option="--cache-file=${cache_file}" ;;
3229*) # relative path
3230 cache_file_option="--cache-file=../${cache_file}" ;;
3231esac
3232
09438bde
NN
3233# Host dirs don't like to share a cache file either, horribly enough.
3234# This seems to be due to autoconf 2.5x stupidity.
2b6c260d 3235host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
671aa708
NN
3236
3237target_configargs=${baseargs}
3238
3239# Passing a --with-cross-host argument lets the target libraries know
3240# whether they are being built with a cross-compiler or being built
3241# native. However, it would be better to use other mechanisms to make the
3242# sorts of decisions they want to make on this basis. Please consider
3243# this option to be deprecated. FIXME.
3244if test x${is_cross_compiler} = xyes ; then
3245 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3246fi
3247
3248# Default to --enable-multilib.
3249if test x${enable_multilib} = x ; then
3250 target_configargs="--enable-multilib ${target_configargs}"
3251fi
3252
3253# Pass --with-newlib if appropriate. Note that target_configdirs has
3254# changed from the earlier setting of with_newlib.
3255if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3256 target_configargs="--with-newlib ${target_configargs}"
3257fi
3258
6b9eb62c
NN
3259# Different target subdirs use different values of certain variables
3260# (notably CXX). Worse, multilibs use *lots* of different values.
3261# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3262# it doesn't automatically accept command-line overrides of them.
3263# This means it's not safe for target subdirs to share a cache file,
3264# which is disgusting, but there you have it. Hopefully this can be
3265# fixed in future. It's still worthwhile to use a cache file for each
3266# directory. I think.
3267
bebcd931
MS
3268# Pass the appropriate --build, --host, --target and --cache-file arguments.
3269# We need to pass --target, as newer autoconf's requires consistency
3270# for target_alias and gcc doesn't manage it consistently.
3271target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
671aa708 3272
671aa708
NN
3273FLAGS_FOR_TARGET=
3274case " $target_configdirs " in
3275 *" newlib "*)
3276 case " $target_configargs " in
3277 *" --with-newlib "*)
3278 case "$target" in
3279 *-cygwin*)
aa8f1f57 3280 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include' ;;
671aa708
NN
3281 esac
3282
3283 # If we're not building GCC, don't discard standard headers.
3284 if test -d ${srcdir}/gcc; then
3285 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3286
3287 if test "${build}" != "${host}"; then
3288 # On Canadian crosses, CC_FOR_TARGET will have already been set
3289 # by `configure', so we won't have an opportunity to add -Bgcc/
3290 # to it. This is right: we don't want to search that directory
3291 # for binaries, but we want the header files in there, so add
3292 # them explicitly.
215c351a 3293 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
671aa708
NN
3294
3295 # Someone might think of using the pre-installed headers on
3296 # Canadian crosses, in case the installed compiler is not fully
3297 # compatible with the compiler being built. In this case, it
3298 # would be better to flag an error than risking having
3299 # incompatible object files being constructed. We can't
3300 # guarantee that an error will be flagged, but let's hope the
3301 # compiler will do it, when presented with incompatible header
3302 # files.
3303 fi
3304 fi
3305
3306 case "${target}-${is_cross_compiler}" in
f2a0e225 3307 i[3456789]86-*-linux*-no)
671aa708
NN
3308 # Here host == target, so we don't need to build gcc,
3309 # so we don't want to discard standard headers.
3310 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3311 ;;
3312 *)
3313 # If we're building newlib, use its generic headers last, but search
3314 # for any libc-related directories first (so make it the last -B
3315 # switch).
3316 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3317 ;;
3318 esac
3319 ;;
3320 esac
3321 ;;
3322esac
3323
6691a79e
ME
3324# Allow the user to override the flags for
3325# our build compiler if desired.
3326CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3327
671aa708
NN
3328# On Canadian crosses, we'll be searching the right directories for
3329# the previously-installed cross compiler, so don't bother to add
3330# flags for directories within the install tree of the compiler
3331# being built; programs in there won't even run.
3332if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3333 # Search for pre-installed headers if nothing else fits.
9124bc53 3334 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
3335fi
3336
3337if test "x${use_gnu_ld}" = x &&
3338 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3339 # Arrange for us to find uninstalled linker scripts.
215c351a 3340 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
671aa708
NN
3341fi
3342
671aa708 3343# Makefile fragments.
7b61653a
PE
3344for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3345do
3346 eval fragval=\$$frag
3347 if test $fragval != /dev/null; then
3348 eval $frag=${srcdir}/$fragval
3349 fi
3350done
671aa708
NN
3351
3352
3353
3354
3355
3356# Miscellanea: directories, flags, etc.
3357
3358
3359
3360
3361
3362
3363
ef9db8d5
DJ
3364
3365
23f6b2f9 3366# Build module lists & subconfigure args.
671aa708
NN
3367
3368
3369
2abefe3d
PB
3370# Host module lists & subconfigure args.
3371
3372
3373
3374# Target module lists & subconfigure args.
3375
3376
3377
3378# Build tools.
3379
3380
3381
3382# Generate default definitions for YACC, M4, LEX and other programs that run
3383# on the build machine. These are used if the Makefile can't locate these
3384# programs in objdir.
3385MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
3386
3387for ac_prog in 'bison -y' byacc yacc
3388do
3389# Extract the first word of "$ac_prog", so it can be a program name with args.
3390set dummy $ac_prog; ac_word=$2
3391echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3392echo "configure:3393: checking for $ac_word" >&5
2abefe3d
PB
3393if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3394 echo $ac_n "(cached) $ac_c" 1>&6
3395else
3396 if test -n "$YACC"; then
3397 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3398else
3399 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3400 ac_dummy="$PATH"
3401 for ac_dir in $ac_dummy; do
3402 test -z "$ac_dir" && ac_dir=.
3403 if test -f $ac_dir/$ac_word; then
3404 ac_cv_prog_YACC="$ac_prog"
3405 break
3406 fi
3407 done
3408 IFS="$ac_save_ifs"
3409fi
3410fi
3411YACC="$ac_cv_prog_YACC"
3412if test -n "$YACC"; then
3413 echo "$ac_t""$YACC" 1>&6
3414else
3415 echo "$ac_t""no" 1>&6
3416fi
3417
3418test -n "$YACC" && break
3419done
3420test -n "$YACC" || YACC="$MISSING bison -y"
3421
3422case " $build_configdirs " in
3423 *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
3424 *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
3425esac
3426
3427for ac_prog in bison
3428do
3429# Extract the first word of "$ac_prog", so it can be a program name with args.
3430set dummy $ac_prog; ac_word=$2
3431echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3432echo "configure:3433: checking for $ac_word" >&5
2abefe3d
PB
3433if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3434 echo $ac_n "(cached) $ac_c" 1>&6
3435else
3436 if test -n "$BISON"; then
3437 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3438else
3439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3440 ac_dummy="$PATH"
3441 for ac_dir in $ac_dummy; do
3442 test -z "$ac_dir" && ac_dir=.
3443 if test -f $ac_dir/$ac_word; then
3444 ac_cv_prog_BISON="$ac_prog"
3445 break
3446 fi
3447 done
3448 IFS="$ac_save_ifs"
3449fi
3450fi
3451BISON="$ac_cv_prog_BISON"
3452if test -n "$BISON"; then
3453 echo "$ac_t""$BISON" 1>&6
3454else
3455 echo "$ac_t""no" 1>&6
3456fi
3457
3458test -n "$BISON" && break
3459done
3460test -n "$BISON" || BISON="$MISSING bison"
3461
3462case " $build_configdirs " in
3463 *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
3464esac
3465
3466for ac_prog in gm4 gnum4 m4
3467do
3468# Extract the first word of "$ac_prog", so it can be a program name with args.
3469set dummy $ac_prog; ac_word=$2
3470echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3471echo "configure:3472: checking for $ac_word" >&5
2abefe3d
PB
3472if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3473 echo $ac_n "(cached) $ac_c" 1>&6
3474else
3475 if test -n "$M4"; then
3476 ac_cv_prog_M4="$M4" # Let the user override the test.
3477else
3478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3479 ac_dummy="$PATH"
3480 for ac_dir in $ac_dummy; do
3481 test -z "$ac_dir" && ac_dir=.
3482 if test -f $ac_dir/$ac_word; then
3483 ac_cv_prog_M4="$ac_prog"
3484 break
3485 fi
3486 done
3487 IFS="$ac_save_ifs"
3488fi
3489fi
3490M4="$ac_cv_prog_M4"
3491if test -n "$M4"; then
3492 echo "$ac_t""$M4" 1>&6
3493else
3494 echo "$ac_t""no" 1>&6
3495fi
3496
3497test -n "$M4" && break
3498done
3499test -n "$M4" || M4="$MISSING m4"
3500
3501case " $build_configdirs " in
3502 *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
3503esac
3504
3505for ac_prog in flex lex
3506do
3507# Extract the first word of "$ac_prog", so it can be a program name with args.
3508set dummy $ac_prog; ac_word=$2
3509echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3510echo "configure:3511: checking for $ac_word" >&5
2abefe3d
PB
3511if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3513else
3514 if test -n "$LEX"; then
3515 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3516else
3517 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3518 ac_dummy="$PATH"
3519 for ac_dir in $ac_dummy; do
3520 test -z "$ac_dir" && ac_dir=.
3521 if test -f $ac_dir/$ac_word; then
3522 ac_cv_prog_LEX="$ac_prog"
3523 break
3524 fi
3525 done
3526 IFS="$ac_save_ifs"
3527fi
3528fi
3529LEX="$ac_cv_prog_LEX"
3530if test -n "$LEX"; then
3531 echo "$ac_t""$LEX" 1>&6
3532else
3533 echo "$ac_t""no" 1>&6
3534fi
3535
3536test -n "$LEX" && break
3537done
3538test -n "$LEX" || LEX="$MISSING flex"
3539
3540case " $build_configdirs " in
3541 *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3542 *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
3543esac
3544
3545for ac_prog in flex
3546do
3547# Extract the first word of "$ac_prog", so it can be a program name with args.
3548set dummy $ac_prog; ac_word=$2
3549echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3550echo "configure:3551: checking for $ac_word" >&5
2abefe3d
PB
3551if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3552 echo $ac_n "(cached) $ac_c" 1>&6
3553else
3554 if test -n "$FLEX"; then
3555 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3556else
3557 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3558 ac_dummy="$PATH"
3559 for ac_dir in $ac_dummy; do
3560 test -z "$ac_dir" && ac_dir=.
3561 if test -f $ac_dir/$ac_word; then
3562 ac_cv_prog_FLEX="$ac_prog"
3563 break
3564 fi
3565 done
3566 IFS="$ac_save_ifs"
3567fi
3568fi
3569FLEX="$ac_cv_prog_FLEX"
3570if test -n "$FLEX"; then
3571 echo "$ac_t""$FLEX" 1>&6
3572else
3573 echo "$ac_t""no" 1>&6
3574fi
3575
3576test -n "$FLEX" && break
3577done
3578test -n "$FLEX" || FLEX="$MISSING flex"
3579
3580case " $build_configdirs " in
3581 *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3582esac
3583
3584for ac_prog in makeinfo
3585do
3586# Extract the first word of "$ac_prog", so it can be a program name with args.
3587set dummy $ac_prog; ac_word=$2
3588echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3589echo "configure:3590: checking for $ac_word" >&5
2abefe3d
PB
3590if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3591 echo $ac_n "(cached) $ac_c" 1>&6
3592else
3593 if test -n "$MAKEINFO"; then
3594 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3595else
3596 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3597 ac_dummy="$PATH"
3598 for ac_dir in $ac_dummy; do
3599 test -z "$ac_dir" && ac_dir=.
3600 if test -f $ac_dir/$ac_word; then
3601 ac_cv_prog_MAKEINFO="$ac_prog"
3602 break
3603 fi
3604 done
3605 IFS="$ac_save_ifs"
3606fi
3607fi
3608MAKEINFO="$ac_cv_prog_MAKEINFO"
3609if test -n "$MAKEINFO"; then
3610 echo "$ac_t""$MAKEINFO" 1>&6
3611else
3612 echo "$ac_t""no" 1>&6
3613fi
3614
3615test -n "$MAKEINFO" && break
3616done
3617test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3618
3619case " $build_configdirs " in
3620 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3621 *)
3622
3623 # For an installed makeinfo, we require it to be from texinfo 4.2 or
3624 # higher, else we use the "missing" dummy.
3625 if ${MAKEINFO} --version \
3626 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
3627 :
3628 else
3629 MAKEINFO="$MISSING makeinfo"
3630 fi
3631 ;;
3632
3633esac
671aa708 3634
2abefe3d 3635# FIXME: expect and dejagnu may become build tools?
671aa708 3636
2abefe3d
PB
3637for ac_prog in expect
3638do
3639# Extract the first word of "$ac_prog", so it can be a program name with args.
3640set dummy $ac_prog; ac_word=$2
3641echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3642echo "configure:3643: checking for $ac_word" >&5
2abefe3d
PB
3643if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 if test -n "$EXPECT"; then
3647 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3648else
3649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3650 ac_dummy="$PATH"
3651 for ac_dir in $ac_dummy; do
3652 test -z "$ac_dir" && ac_dir=.
3653 if test -f $ac_dir/$ac_word; then
3654 ac_cv_prog_EXPECT="$ac_prog"
3655 break
3656 fi
3657 done
3658 IFS="$ac_save_ifs"
3659fi
3660fi
3661EXPECT="$ac_cv_prog_EXPECT"
3662if test -n "$EXPECT"; then
3663 echo "$ac_t""$EXPECT" 1>&6
3664else
3665 echo "$ac_t""no" 1>&6
3666fi
671aa708 3667
2abefe3d
PB
3668test -n "$EXPECT" && break
3669done
3670test -n "$EXPECT" || EXPECT="expect"
671aa708 3671
2abefe3d
PB
3672case " $configdirs " in
3673 *" expect "*)
3674 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3675 ;;
3676esac
671aa708 3677
2abefe3d
PB
3678for ac_prog in runtest
3679do
3680# Extract the first word of "$ac_prog", so it can be a program name with args.
3681set dummy $ac_prog; ac_word=$2
3682echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3683echo "configure:3684: checking for $ac_word" >&5
2abefe3d
PB
3684if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3685 echo $ac_n "(cached) $ac_c" 1>&6
3686else
3687 if test -n "$RUNTEST"; then
3688 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
3689else
3690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3691 ac_dummy="$PATH"
3692 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 if test -f $ac_dir/$ac_word; then
3695 ac_cv_prog_RUNTEST="$ac_prog"
3696 break
3697 fi
3698 done
3699 IFS="$ac_save_ifs"
3700fi
3701fi
3702RUNTEST="$ac_cv_prog_RUNTEST"
3703if test -n "$RUNTEST"; then
3704 echo "$ac_t""$RUNTEST" 1>&6
3705else
3706 echo "$ac_t""no" 1>&6
3707fi
671aa708 3708
2abefe3d
PB
3709test -n "$RUNTEST" && break
3710done
3711test -n "$RUNTEST" || RUNTEST="runtest"
671aa708 3712
2abefe3d
PB
3713case " $configdirs " in
3714 *" dejagnu "*)
3715 test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
3716 ;;
3717esac
671aa708
NN
3718
3719
671aa708 3720# Host tools.
ca9f4b81
AO
3721ncn_tool_prefix=
3722test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3723ncn_target_tool_prefix=
3724test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3725
2693c0b0
PB
3726 for ncn_progname in ar; do
3727 if test -n "$ncn_tool_prefix"; then
3728 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3729set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3730echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3731echo "configure:3732: checking for $ac_word" >&5
72a7ab82
AP
3732if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3733 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3734else
3735 if test -n "$AR"; then
3736 ac_cv_prog_AR="$AR" # Let the user override the test.
3737else
72a7ab82
AP
3738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3739 ac_dummy="$PATH"
3740 for ac_dir in $ac_dummy; do
3741 test -z "$ac_dir" && ac_dir=.
3742 if test -f $ac_dir/$ac_word; then
3743 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
3744 break
3745 fi
3746 done
3747 IFS="$ac_save_ifs"
ca9f4b81
AO
3748fi
3749fi
72a7ab82 3750AR="$ac_cv_prog_AR"
ca9f4b81 3751if test -n "$AR"; then
72a7ab82 3752 echo "$ac_t""$AR" 1>&6
ca9f4b81 3753else
72a7ab82 3754 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3755fi
3756
2693c0b0
PB
3757 fi
3758 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3759 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3760set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3762echo "configure:3763: checking for $ac_word" >&5
72a7ab82
AP
3763if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3765else
2693c0b0
PB
3766 if test -n "$AR"; then
3767 ac_cv_prog_AR="$AR" # Let the user override the test.
ca9f4b81 3768else
72a7ab82
AP
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3770 ac_dummy="$PATH"
3771 for ac_dir in $ac_dummy; do
3772 test -z "$ac_dir" && ac_dir=.
3773 if test -f $ac_dir/$ac_word; then
3774 ac_cv_prog_AR="${ncn_progname}"
3775 break
3776 fi
3777 done
3778 IFS="$ac_save_ifs"
ca9f4b81
AO
3779fi
3780fi
72a7ab82 3781AR="$ac_cv_prog_AR"
2693c0b0 3782if test -n "$AR"; then
72a7ab82 3783 echo "$ac_t""$AR" 1>&6
ca9f4b81 3784else
72a7ab82 3785 echo "$ac_t""no" 1>&6
ca9f4b81 3786fi
72a7ab82 3787
2693c0b0
PB
3788 fi
3789 test -n "$ac_cv_prog_AR" && break
3790done
3791
3792if test -z "$ac_cv_prog_AR" ; then
3793 set dummy ar
3794 if test $build = $host ; then
3795 AR="$2"
ca9f4b81 3796 else
2693c0b0 3797 AR="${ncn_tool_prefix}$2"
ca9f4b81 3798 fi
ca9f4b81
AO
3799fi
3800
2693c0b0
PB
3801 for ncn_progname in as; do
3802 if test -n "$ncn_tool_prefix"; then
3803 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3804set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3805echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3806echo "configure:3807: checking for $ac_word" >&5
72a7ab82
AP
3807if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3809else
3810 if test -n "$AS"; then
3811 ac_cv_prog_AS="$AS" # Let the user override the test.
3812else
72a7ab82
AP
3813 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3814 ac_dummy="$PATH"
3815 for ac_dir in $ac_dummy; do
3816 test -z "$ac_dir" && ac_dir=.
3817 if test -f $ac_dir/$ac_word; then
3818 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
3819 break
3820 fi
3821 done
3822 IFS="$ac_save_ifs"
ca9f4b81
AO
3823fi
3824fi
72a7ab82 3825AS="$ac_cv_prog_AS"
ca9f4b81 3826if test -n "$AS"; then
72a7ab82 3827 echo "$ac_t""$AS" 1>&6
ca9f4b81 3828else
72a7ab82 3829 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3830fi
3831
2693c0b0
PB
3832 fi
3833 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3834 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3835set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3837echo "configure:3838: checking for $ac_word" >&5
72a7ab82
AP
3838if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3839 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3840else
2693c0b0
PB
3841 if test -n "$AS"; then
3842 ac_cv_prog_AS="$AS" # Let the user override the test.
ca9f4b81 3843else
72a7ab82
AP
3844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847 test -z "$ac_dir" && ac_dir=.
3848 if test -f $ac_dir/$ac_word; then
3849 ac_cv_prog_AS="${ncn_progname}"
3850 break
3851 fi
3852 done
3853 IFS="$ac_save_ifs"
ca9f4b81
AO
3854fi
3855fi
72a7ab82 3856AS="$ac_cv_prog_AS"
2693c0b0 3857if test -n "$AS"; then
72a7ab82 3858 echo "$ac_t""$AS" 1>&6
ca9f4b81 3859else
72a7ab82 3860 echo "$ac_t""no" 1>&6
ca9f4b81 3861fi
72a7ab82 3862
2693c0b0
PB
3863 fi
3864 test -n "$ac_cv_prog_AS" && break
3865done
3866
3867if test -z "$ac_cv_prog_AS" ; then
3868 set dummy as
3869 if test $build = $host ; then
3870 AS="$2"
ca9f4b81 3871 else
2693c0b0 3872 AS="${ncn_tool_prefix}$2"
ca9f4b81 3873 fi
ca9f4b81
AO
3874fi
3875
2693c0b0
PB
3876 for ncn_progname in dlltool; do
3877 if test -n "$ncn_tool_prefix"; then
3878 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3879set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3880echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3881echo "configure:3882: checking for $ac_word" >&5
72a7ab82
AP
3882if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3884else
3885 if test -n "$DLLTOOL"; then
3886 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3887else
72a7ab82
AP
3888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3889 ac_dummy="$PATH"
3890 for ac_dir in $ac_dummy; do
3891 test -z "$ac_dir" && ac_dir=.
3892 if test -f $ac_dir/$ac_word; then
3893 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
3894 break
3895 fi
3896 done
3897 IFS="$ac_save_ifs"
ca9f4b81
AO
3898fi
3899fi
72a7ab82 3900DLLTOOL="$ac_cv_prog_DLLTOOL"
ca9f4b81 3901if test -n "$DLLTOOL"; then
72a7ab82 3902 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 3903else
72a7ab82 3904 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3905fi
3906
2693c0b0
PB
3907 fi
3908 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3909 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3910set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3911echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3912echo "configure:3913: checking for $ac_word" >&5
72a7ab82
AP
3913if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3914 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3915else
2693c0b0
PB
3916 if test -n "$DLLTOOL"; then
3917 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
ca9f4b81 3918else
72a7ab82
AP
3919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3920 ac_dummy="$PATH"
3921 for ac_dir in $ac_dummy; do
3922 test -z "$ac_dir" && ac_dir=.
3923 if test -f $ac_dir/$ac_word; then
3924 ac_cv_prog_DLLTOOL="${ncn_progname}"
3925 break
3926 fi
3927 done
3928 IFS="$ac_save_ifs"
ca9f4b81
AO
3929fi
3930fi
72a7ab82 3931DLLTOOL="$ac_cv_prog_DLLTOOL"
2693c0b0 3932if test -n "$DLLTOOL"; then
72a7ab82 3933 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 3934else
72a7ab82 3935 echo "$ac_t""no" 1>&6
ca9f4b81 3936fi
72a7ab82 3937
2693c0b0
PB
3938 fi
3939 test -n "$ac_cv_prog_DLLTOOL" && break
3940done
3941
3942if test -z "$ac_cv_prog_DLLTOOL" ; then
3943 set dummy dlltool
3944 if test $build = $host ; then
3945 DLLTOOL="$2"
ca9f4b81 3946 else
2693c0b0 3947 DLLTOOL="${ncn_tool_prefix}$2"
ca9f4b81 3948 fi
ca9f4b81
AO
3949fi
3950
2693c0b0
PB
3951 for ncn_progname in ld; do
3952 if test -n "$ncn_tool_prefix"; then
3953 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3954set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3955echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3956echo "configure:3957: checking for $ac_word" >&5
72a7ab82
AP
3957if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3959else
3960 if test -n "$LD"; then
3961 ac_cv_prog_LD="$LD" # Let the user override the test.
3962else
72a7ab82
AP
3963 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3964 ac_dummy="$PATH"
3965 for ac_dir in $ac_dummy; do
3966 test -z "$ac_dir" && ac_dir=.
3967 if test -f $ac_dir/$ac_word; then
3968 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
3969 break
3970 fi
3971 done
3972 IFS="$ac_save_ifs"
ca9f4b81
AO
3973fi
3974fi
72a7ab82 3975LD="$ac_cv_prog_LD"
ca9f4b81 3976if test -n "$LD"; then
72a7ab82 3977 echo "$ac_t""$LD" 1>&6
ca9f4b81 3978else
72a7ab82 3979 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3980fi
3981
2693c0b0
PB
3982 fi
3983 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
3984 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3985set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3986echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 3987echo "configure:3988: checking for $ac_word" >&5
72a7ab82
AP
3988if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3990else
2693c0b0
PB
3991 if test -n "$LD"; then
3992 ac_cv_prog_LD="$LD" # Let the user override the test.
6b65a26d 3993else
72a7ab82
AP
3994 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3995 ac_dummy="$PATH"
3996 for ac_dir in $ac_dummy; do
3997 test -z "$ac_dir" && ac_dir=.
3998 if test -f $ac_dir/$ac_word; then
3999 ac_cv_prog_LD="${ncn_progname}"
4000 break
4001 fi
4002 done
4003 IFS="$ac_save_ifs"
ca9f4b81
AO
4004fi
4005fi
72a7ab82 4006LD="$ac_cv_prog_LD"
2693c0b0 4007if test -n "$LD"; then
72a7ab82 4008 echo "$ac_t""$LD" 1>&6
ca9f4b81 4009else
72a7ab82 4010 echo "$ac_t""no" 1>&6
ca9f4b81 4011fi
72a7ab82 4012
2693c0b0
PB
4013 fi
4014 test -n "$ac_cv_prog_LD" && break
4015done
4016
4017if test -z "$ac_cv_prog_LD" ; then
4018 set dummy ld
4019 if test $build = $host ; then
4020 LD="$2"
ca9f4b81 4021 else
2693c0b0 4022 LD="${ncn_tool_prefix}$2"
ca9f4b81 4023 fi
ca9f4b81
AO
4024fi
4025
2abefe3d
PB
4026 for ncn_progname in lipo; do
4027 if test -n "$ncn_tool_prefix"; then
4028 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4029set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4030echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4031echo "configure:4032: checking for $ac_word" >&5
2abefe3d
PB
4032if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4033 echo $ac_n "(cached) $ac_c" 1>&6
4034else
4035 if test -n "$LIPO"; then
4036 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4037else
4038 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4039 ac_dummy="$PATH"
4040 for ac_dir in $ac_dummy; do
4041 test -z "$ac_dir" && ac_dir=.
4042 if test -f $ac_dir/$ac_word; then
4043 ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
4044 break
4045 fi
4046 done
4047 IFS="$ac_save_ifs"
4048fi
4049fi
4050LIPO="$ac_cv_prog_LIPO"
4051if test -n "$LIPO"; then
4052 echo "$ac_t""$LIPO" 1>&6
4053else
4054 echo "$ac_t""no" 1>&6
4055fi
4056
4057 fi
4058 if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
4059 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4060set dummy ${ncn_progname}; ac_word=$2
4061echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4062echo "configure:4063: checking for $ac_word" >&5
2abefe3d
PB
4063if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4064 echo $ac_n "(cached) $ac_c" 1>&6
4065else
4066 if test -n "$LIPO"; then
4067 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4068else
4069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4070 ac_dummy="$PATH"
4071 for ac_dir in $ac_dummy; do
4072 test -z "$ac_dir" && ac_dir=.
4073 if test -f $ac_dir/$ac_word; then
4074 ac_cv_prog_LIPO="${ncn_progname}"
4075 break
4076 fi
4077 done
4078 IFS="$ac_save_ifs"
4079fi
4080fi
4081LIPO="$ac_cv_prog_LIPO"
4082if test -n "$LIPO"; then
4083 echo "$ac_t""$LIPO" 1>&6
4084else
4085 echo "$ac_t""no" 1>&6
4086fi
4087
4088 fi
4089 test -n "$ac_cv_prog_LIPO" && break
4090done
4091
4092if test -z "$ac_cv_prog_LIPO" ; then
4093 set dummy lipo
4094 if test $build = $host ; then
4095 LIPO="$2"
4096 else
4097 LIPO="${ncn_tool_prefix}$2"
4098 fi
4099fi
4100
2693c0b0
PB
4101 for ncn_progname in nm; do
4102 if test -n "$ncn_tool_prefix"; then
4103 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4104set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4105echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4106echo "configure:4107: checking for $ac_word" >&5
72a7ab82
AP
4107if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4108 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4109else
4110 if test -n "$NM"; then
4111 ac_cv_prog_NM="$NM" # Let the user override the test.
4112else
72a7ab82
AP
4113 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116 test -z "$ac_dir" && ac_dir=.
4117 if test -f $ac_dir/$ac_word; then
4118 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
4119 break
4120 fi
4121 done
4122 IFS="$ac_save_ifs"
ca9f4b81
AO
4123fi
4124fi
72a7ab82 4125NM="$ac_cv_prog_NM"
ca9f4b81 4126if test -n "$NM"; then
72a7ab82 4127 echo "$ac_t""$NM" 1>&6
ca9f4b81 4128else
72a7ab82 4129 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4130fi
4131
2693c0b0
PB
4132 fi
4133 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
4134 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4135set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4136echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4137echo "configure:4138: checking for $ac_word" >&5
72a7ab82
AP
4138if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4139 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4140else
2693c0b0
PB
4141 if test -n "$NM"; then
4142 ac_cv_prog_NM="$NM" # Let the user override the test.
ca9f4b81 4143else
72a7ab82
AP
4144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4145 ac_dummy="$PATH"
4146 for ac_dir in $ac_dummy; do
4147 test -z "$ac_dir" && ac_dir=.
4148 if test -f $ac_dir/$ac_word; then
4149 ac_cv_prog_NM="${ncn_progname}"
4150 break
4151 fi
4152 done
4153 IFS="$ac_save_ifs"
ca9f4b81
AO
4154fi
4155fi
72a7ab82 4156NM="$ac_cv_prog_NM"
2693c0b0 4157if test -n "$NM"; then
72a7ab82 4158 echo "$ac_t""$NM" 1>&6
ca9f4b81 4159else
72a7ab82 4160 echo "$ac_t""no" 1>&6
ca9f4b81 4161fi
72a7ab82 4162
2693c0b0
PB
4163 fi
4164 test -n "$ac_cv_prog_NM" && break
4165done
4166
4167if test -z "$ac_cv_prog_NM" ; then
4168 set dummy nm
4169 if test $build = $host ; then
4170 NM="$2"
ca9f4b81 4171 else
2693c0b0 4172 NM="${ncn_tool_prefix}$2"
ca9f4b81 4173 fi
ca9f4b81
AO
4174fi
4175
2693c0b0
PB
4176 for ncn_progname in ranlib; do
4177 if test -n "$ncn_tool_prefix"; then
4178 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4179set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4180echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4181echo "configure:4182: checking for $ac_word" >&5
72a7ab82
AP
4182if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4183 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4184else
4185 if test -n "$RANLIB"; then
4186 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4187else
72a7ab82
AP
4188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4189 ac_dummy="$PATH"
4190 for ac_dir in $ac_dummy; do
4191 test -z "$ac_dir" && ac_dir=.
4192 if test -f $ac_dir/$ac_word; then
4193 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
4194 break
4195 fi
4196 done
4197 IFS="$ac_save_ifs"
ca9f4b81
AO
4198fi
4199fi
72a7ab82 4200RANLIB="$ac_cv_prog_RANLIB"
ca9f4b81 4201if test -n "$RANLIB"; then
72a7ab82 4202 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4203else
72a7ab82 4204 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4205fi
4206
2693c0b0
PB
4207 fi
4208 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
4209 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4210set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4211echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4212echo "configure:4213: checking for $ac_word" >&5
72a7ab82
AP
4213if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4214 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4215else
2693c0b0
PB
4216 if test -n "$RANLIB"; then
4217 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
ca9f4b81 4218else
72a7ab82
AP
4219 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4220 ac_dummy="$PATH"
4221 for ac_dir in $ac_dummy; do
4222 test -z "$ac_dir" && ac_dir=.
4223 if test -f $ac_dir/$ac_word; then
4224 ac_cv_prog_RANLIB="${ncn_progname}"
4225 break
4226 fi
4227 done
4228 IFS="$ac_save_ifs"
ca9f4b81
AO
4229fi
4230fi
72a7ab82 4231RANLIB="$ac_cv_prog_RANLIB"
2693c0b0 4232if test -n "$RANLIB"; then
72a7ab82 4233 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4234else
72a7ab82 4235 echo "$ac_t""no" 1>&6
ca9f4b81 4236fi
72a7ab82 4237
ca9f4b81 4238 fi
2693c0b0
PB
4239 test -n "$ac_cv_prog_RANLIB" && break
4240done
4241
4242if test -z "$ac_cv_prog_RANLIB" ; then
4243 RANLIB=":"
ca9f4b81
AO
4244fi
4245
2abefe3d
PB
4246 for ncn_progname in strip; do
4247 if test -n "$ncn_tool_prefix"; then
4248 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4249set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4250echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4251echo "configure:4252: checking for $ac_word" >&5
2abefe3d
PB
4252if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4253 echo $ac_n "(cached) $ac_c" 1>&6
4254else
4255 if test -n "$STRIP"; then
4256 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4257else
4258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4259 ac_dummy="$PATH"
4260 for ac_dir in $ac_dummy; do
4261 test -z "$ac_dir" && ac_dir=.
4262 if test -f $ac_dir/$ac_word; then
4263 ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
4264 break
4265 fi
4266 done
4267 IFS="$ac_save_ifs"
4268fi
4269fi
4270STRIP="$ac_cv_prog_STRIP"
4271if test -n "$STRIP"; then
4272 echo "$ac_t""$STRIP" 1>&6
4273else
4274 echo "$ac_t""no" 1>&6
4275fi
4276
4277 fi
4278 if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
4279 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4280set dummy ${ncn_progname}; ac_word=$2
4281echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4282echo "configure:4283: checking for $ac_word" >&5
2abefe3d
PB
4283if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4284 echo $ac_n "(cached) $ac_c" 1>&6
4285else
4286 if test -n "$STRIP"; then
4287 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4288else
4289 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4290 ac_dummy="$PATH"
4291 for ac_dir in $ac_dummy; do
4292 test -z "$ac_dir" && ac_dir=.
4293 if test -f $ac_dir/$ac_word; then
4294 ac_cv_prog_STRIP="${ncn_progname}"
4295 break
4296 fi
4297 done
4298 IFS="$ac_save_ifs"
4299fi
4300fi
4301STRIP="$ac_cv_prog_STRIP"
4302if test -n "$STRIP"; then
4303 echo "$ac_t""$STRIP" 1>&6
4304else
4305 echo "$ac_t""no" 1>&6
4306fi
4307
4308 fi
4309 test -n "$ac_cv_prog_STRIP" && break
4310done
4311
4312if test -z "$ac_cv_prog_STRIP" ; then
4313 STRIP=":"
4314fi
4315
2693c0b0
PB
4316 for ncn_progname in windres; do
4317 if test -n "$ncn_tool_prefix"; then
4318 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4319set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4320echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4321echo "configure:4322: checking for $ac_word" >&5
72a7ab82
AP
4322if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4323 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4324else
4325 if test -n "$WINDRES"; then
4326 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4327else
72a7ab82
AP
4328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4329 ac_dummy="$PATH"
4330 for ac_dir in $ac_dummy; do
4331 test -z "$ac_dir" && ac_dir=.
4332 if test -f $ac_dir/$ac_word; then
4333 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
4334 break
4335 fi
4336 done
4337 IFS="$ac_save_ifs"
ca9f4b81
AO
4338fi
4339fi
72a7ab82 4340WINDRES="$ac_cv_prog_WINDRES"
ca9f4b81 4341if test -n "$WINDRES"; then
72a7ab82 4342 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4343else
72a7ab82 4344 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4345fi
4346
2693c0b0
PB
4347 fi
4348 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
4349 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4350set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4351echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4352echo "configure:4353: checking for $ac_word" >&5
72a7ab82
AP
4353if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4354 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4355else
2693c0b0
PB
4356 if test -n "$WINDRES"; then
4357 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
ca9f4b81 4358else
72a7ab82
AP
4359 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4360 ac_dummy="$PATH"
4361 for ac_dir in $ac_dummy; do
4362 test -z "$ac_dir" && ac_dir=.
4363 if test -f $ac_dir/$ac_word; then
4364 ac_cv_prog_WINDRES="${ncn_progname}"
4365 break
4366 fi
4367 done
4368 IFS="$ac_save_ifs"
ca9f4b81
AO
4369fi
4370fi
72a7ab82 4371WINDRES="$ac_cv_prog_WINDRES"
2693c0b0 4372if test -n "$WINDRES"; then
72a7ab82 4373 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4374else
72a7ab82 4375 echo "$ac_t""no" 1>&6
ca9f4b81 4376fi
72a7ab82 4377
2693c0b0
PB
4378 fi
4379 test -n "$ac_cv_prog_WINDRES" && break
4380done
4381
4382if test -z "$ac_cv_prog_WINDRES" ; then
4383 set dummy windres
4384 if test $build = $host ; then
4385 WINDRES="$2"
ca9f4b81 4386 else
2693c0b0 4387 WINDRES="${ncn_tool_prefix}$2"
ca9f4b81 4388 fi
ca9f4b81
AO
4389fi
4390
2693c0b0
PB
4391 for ncn_progname in objcopy; do
4392 if test -n "$ncn_tool_prefix"; then
4393 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4394set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4395echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4396echo "configure:4397: checking for $ac_word" >&5
72a7ab82
AP
4397if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4398 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4399else
4400 if test -n "$OBJCOPY"; then
4401 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4402else
72a7ab82
AP
4403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4404 ac_dummy="$PATH"
4405 for ac_dir in $ac_dummy; do
4406 test -z "$ac_dir" && ac_dir=.
4407 if test -f $ac_dir/$ac_word; then
4408 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
4409 break
4410 fi
4411 done
4412 IFS="$ac_save_ifs"
ca9f4b81
AO
4413fi
4414fi
72a7ab82 4415OBJCOPY="$ac_cv_prog_OBJCOPY"
ca9f4b81 4416if test -n "$OBJCOPY"; then
72a7ab82 4417 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4418else
72a7ab82 4419 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4420fi
4421
2693c0b0
PB
4422 fi
4423 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4424 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4425set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4426echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4427echo "configure:4428: checking for $ac_word" >&5
72a7ab82
AP
4428if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4430else
2693c0b0
PB
4431 if test -n "$OBJCOPY"; then
4432 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
ca9f4b81 4433else
72a7ab82
AP
4434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437 test -z "$ac_dir" && ac_dir=.
4438 if test -f $ac_dir/$ac_word; then
4439 ac_cv_prog_OBJCOPY="${ncn_progname}"
4440 break
4441 fi
4442 done
4443 IFS="$ac_save_ifs"
ca9f4b81
AO
4444fi
4445fi
72a7ab82 4446OBJCOPY="$ac_cv_prog_OBJCOPY"
2693c0b0 4447if test -n "$OBJCOPY"; then
72a7ab82 4448 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4449else
72a7ab82 4450 echo "$ac_t""no" 1>&6
ca9f4b81 4451fi
72a7ab82 4452
2693c0b0
PB
4453 fi
4454 test -n "$ac_cv_prog_OBJCOPY" && break
4455done
4456
4457if test -z "$ac_cv_prog_OBJCOPY" ; then
4458 set dummy objcopy
4459 if test $build = $host ; then
4460 OBJCOPY="$2"
ca9f4b81 4461 else
2693c0b0 4462 OBJCOPY="${ncn_tool_prefix}$2"
ca9f4b81 4463 fi
ca9f4b81
AO
4464fi
4465
2693c0b0
PB
4466 for ncn_progname in objdump; do
4467 if test -n "$ncn_tool_prefix"; then
4468 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4469set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4470echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4471echo "configure:4472: checking for $ac_word" >&5
72a7ab82
AP
4472if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4474else
4475 if test -n "$OBJDUMP"; then
4476 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4477else
72a7ab82
AP
4478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481 test -z "$ac_dir" && ac_dir=.
4482 if test -f $ac_dir/$ac_word; then
4483 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
4484 break
4485 fi
4486 done
4487 IFS="$ac_save_ifs"
ca9f4b81
AO
4488fi
4489fi
72a7ab82 4490OBJDUMP="$ac_cv_prog_OBJDUMP"
ca9f4b81 4491if test -n "$OBJDUMP"; then
72a7ab82 4492 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4493else
72a7ab82 4494 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4495fi
4496
2693c0b0
PB
4497 fi
4498 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4499 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4500set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4501echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4502echo "configure:4503: checking for $ac_word" >&5
72a7ab82
AP
4503if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4505else
2693c0b0
PB
4506 if test -n "$OBJDUMP"; then
4507 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
ca9f4b81 4508else
72a7ab82
AP
4509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4510 ac_dummy="$PATH"
4511 for ac_dir in $ac_dummy; do
4512 test -z "$ac_dir" && ac_dir=.
4513 if test -f $ac_dir/$ac_word; then
4514 ac_cv_prog_OBJDUMP="${ncn_progname}"
4515 break
4516 fi
4517 done
4518 IFS="$ac_save_ifs"
ca9f4b81
AO
4519fi
4520fi
72a7ab82 4521OBJDUMP="$ac_cv_prog_OBJDUMP"
2693c0b0 4522if test -n "$OBJDUMP"; then
72a7ab82 4523 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4524else
72a7ab82 4525 echo "$ac_t""no" 1>&6
ca9f4b81 4526fi
72a7ab82 4527
2693c0b0
PB
4528 fi
4529 test -n "$ac_cv_prog_OBJDUMP" && break
4530done
4531
4532if test -z "$ac_cv_prog_OBJDUMP" ; then
4533 set dummy objdump
4534 if test $build = $host ; then
4535 OBJDUMP="$2"
ca9f4b81 4536 else
2693c0b0 4537 OBJDUMP="${ncn_tool_prefix}$2"
ca9f4b81 4538 fi
ca9f4b81
AO
4539fi
4540
671aa708
NN
4541
4542
4543
4544
4545
4546
2abefe3d 4547# Target tools.
e8b05380
PB
4548# Check whether --with-build-time-tools or --without-build-time-tools was given.
4549if test "${with_build_time_tools+set}" = set; then
4550 withval="$with_build_time_tools"
4551 case x"$withval" in
4552 x/*) ;;
4553 *)
4554 with_build_time_tools=
4555 echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
4556 ;;
4557 esac
ca9f4b81 4558else
e8b05380 4559 with_build_time_tools=
ca9f4b81
AO
4560fi
4561
ca9f4b81 4562
e8b05380
PB
4563 if test -n "$with_build_time_tools"; then
4564 for ncn_progname in cc gcc; do
4565 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4566echo "configure:4567: checking for ${ncn_progname} in $with_build_time_tools" >&5
4567 if test -x $with_build_time_tools/CC_FOR_TARGET; then
4568 ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/CC_FOR_TARGET
4569 echo "$ac_t""yes" 1>&6
72a7ab82 4570 break
e8b05380
PB
4571 else
4572 echo "$ac_t""no" 1>&6
72a7ab82
AP
4573 fi
4574 done
4de997d1
PB
4575fi
4576
e8b05380
PB
4577if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
4578 for ncn_progname in cc gcc; do
4579 if test -n "$ncn_target_tool_prefix"; then
4580 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 4581set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4582echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4583echo "configure:4584: checking for $ac_word" >&5
72a7ab82
AP
4584if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4585 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4586else
4587 if test -n "$CC_FOR_TARGET"; then
4588 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4589else
72a7ab82
AP
4590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4591 ac_dummy="$PATH"
4592 for ac_dir in $ac_dummy; do
4593 test -z "$ac_dir" && ac_dir=.
4594 if test -f $ac_dir/$ac_word; then
4595 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4596 break
4597 fi
4598 done
4599 IFS="$ac_save_ifs"
4de997d1
PB
4600fi
4601fi
72a7ab82 4602CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4de997d1 4603if test -n "$CC_FOR_TARGET"; then
72a7ab82 4604 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4605else
72a7ab82 4606 echo "$ac_t""no" 1>&6
4de997d1
PB
4607fi
4608
e8b05380
PB
4609 fi
4610 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4611 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 4612set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4614echo "configure:4615: checking for $ac_word" >&5
72a7ab82
AP
4615if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4616 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4617else
2693c0b0
PB
4618 if test -n "$CC_FOR_TARGET"; then
4619 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4de997d1 4620else
72a7ab82
AP
4621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4622 ac_dummy="$PATH"
4623 for ac_dir in $ac_dummy; do
4624 test -z "$ac_dir" && ac_dir=.
4625 if test -f $ac_dir/$ac_word; then
4626 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
4627 break
4628 fi
4629 done
4630 IFS="$ac_save_ifs"
4de997d1
PB
4631fi
4632fi
72a7ab82 4633CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
2693c0b0 4634if test -n "$CC_FOR_TARGET"; then
72a7ab82 4635 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4636else
72a7ab82 4637 echo "$ac_t""no" 1>&6
4de997d1 4638fi
72a7ab82 4639
e8b05380
PB
4640 fi
4641 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4642 done
4643fi
4644
2693c0b0
PB
4645if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4646 set dummy cc gcc
4647 if test $build = $target ; then
4648 CC_FOR_TARGET="$2"
4de997d1 4649 else
2693c0b0 4650 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4651 fi
4de997d1
PB
4652fi
4653
e8b05380
PB
4654 if test -n "$with_build_time_tools"; then
4655 for ncn_progname in c++ g++ cxx gxx; do
4656 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4657echo "configure:4658: checking for ${ncn_progname} in $with_build_time_tools" >&5
4658 if test -x $with_build_time_tools/CXX_FOR_TARGET; then
4659 ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/CXX_FOR_TARGET
4660 echo "$ac_t""yes" 1>&6
4661 break
4662 else
4663 echo "$ac_t""no" 1>&6
4664 fi
4665 done
4666fi
4667
4668if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
4669 for ncn_progname in c++ g++ cxx gxx; do
4670 if test -n "$ncn_target_tool_prefix"; then
4671 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 4672set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4673echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4674echo "configure:4675: checking for $ac_word" >&5
72a7ab82
AP
4675if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4676 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4677else
4678 if test -n "$CXX_FOR_TARGET"; then
4679 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4680else
72a7ab82
AP
4681 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4682 ac_dummy="$PATH"
4683 for ac_dir in $ac_dummy; do
4684 test -z "$ac_dir" && ac_dir=.
4685 if test -f $ac_dir/$ac_word; then
4686 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4687 break
4688 fi
4689 done
4690 IFS="$ac_save_ifs"
4de997d1
PB
4691fi
4692fi
72a7ab82 4693CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4de997d1 4694if test -n "$CXX_FOR_TARGET"; then
72a7ab82 4695 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4696else
72a7ab82 4697 echo "$ac_t""no" 1>&6
4de997d1
PB
4698fi
4699
e8b05380
PB
4700 fi
4701 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4702 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 4703set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4704echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 4705echo "configure:4706: checking for $ac_word" >&5
72a7ab82
AP
4706if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4708else
2693c0b0
PB
4709 if test -n "$CXX_FOR_TARGET"; then
4710 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4de997d1 4711else
72a7ab82
AP
4712 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715 test -z "$ac_dir" && ac_dir=.
4716 if test -f $ac_dir/$ac_word; then
4717 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
4718 break
4719 fi
4720 done
4721 IFS="$ac_save_ifs"
4de997d1
PB
4722fi
4723fi
72a7ab82 4724CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
2693c0b0 4725if test -n "$CXX_FOR_TARGET"; then
72a7ab82 4726 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4727else
72a7ab82 4728 echo "$ac_t""no" 1>&6
4de997d1 4729fi
72a7ab82 4730
e8b05380
PB
4731 fi
4732 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4733 done
4734fi
4735
2693c0b0
PB
4736if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4737 set dummy c++ g++ cxx gxx
4738 if test $build = $target ; then
4739 CXX_FOR_TARGET="$2"
4de997d1 4740 else
2693c0b0 4741 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4742 fi
ca9f4b81
AO
4743fi
4744
e8b05380
PB
4745 if test -n "$with_build_time_tools"; then
4746 for ncn_progname in gcc; do
4747 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4748echo "configure:4749: checking for ${ncn_progname} in $with_build_time_tools" >&5
4749 if test -x $with_build_time_tools/GCC_FOR_TARGET; then
4750 ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/GCC_FOR_TARGET
4751 echo "$ac_t""yes" 1>&6
4752 break
4753 else
4754 echo "$ac_t""no" 1>&6
4755 fi
4756 done
4757fi
4758
4759if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
4760 for ncn_progname in gcc; do
4761 if test -n "$ncn_target_tool_prefix"; then
4762 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 4763set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4764echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
4765echo "configure:4766: checking for $ac_word" >&5
4766if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 4767 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4768else
e8b05380
PB
4769 if test -n "$GCC_FOR_TARGET"; then
4770 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
ca9f4b81 4771else
72a7ab82
AP
4772 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4773 ac_dummy="$PATH"
4774 for ac_dir in $ac_dummy; do
4775 test -z "$ac_dir" && ac_dir=.
4776 if test -f $ac_dir/$ac_word; then
e8b05380 4777 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
72a7ab82
AP
4778 break
4779 fi
4780 done
4781 IFS="$ac_save_ifs"
ca9f4b81
AO
4782fi
4783fi
e8b05380
PB
4784GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4785if test -n "$GCC_FOR_TARGET"; then
4786 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
ca9f4b81 4787else
72a7ab82 4788 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4789fi
4790
e8b05380
PB
4791 fi
4792 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4793 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 4794set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4795echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
4796echo "configure:4797: checking for $ac_word" >&5
4797if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 4798 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4799else
e8b05380
PB
4800 if test -n "$GCC_FOR_TARGET"; then
4801 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
ca9f4b81 4802else
72a7ab82
AP
4803 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4804 ac_dummy="$PATH"
4805 for ac_dir in $ac_dummy; do
4806 test -z "$ac_dir" && ac_dir=.
4807 if test -f $ac_dir/$ac_word; then
e8b05380 4808 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
72a7ab82
AP
4809 break
4810 fi
4811 done
4812 IFS="$ac_save_ifs"
ca9f4b81
AO
4813fi
4814fi
e8b05380
PB
4815GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4816if test -n "$GCC_FOR_TARGET"; then
4817 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
ca9f4b81 4818else
72a7ab82 4819 echo "$ac_t""no" 1>&6
ca9f4b81 4820fi
72a7ab82 4821
e8b05380
PB
4822 fi
4823 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4824 done
4825fi
4826
4827if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4828 GCC_FOR_TARGET="${CC_FOR_TARGET}"
4829fi
4830
4831 if test -n "$with_build_time_tools"; then
4832 for ncn_progname in gcj; do
4833 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4834echo "configure:4835: checking for ${ncn_progname} in $with_build_time_tools" >&5
4835 if test -x $with_build_time_tools/GCJ_FOR_TARGET; then
4836 ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/GCJ_FOR_TARGET
4837 echo "$ac_t""yes" 1>&6
4838 break
4839 else
4840 echo "$ac_t""no" 1>&6
4841 fi
4842 done
4843fi
4844
4845if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
4846 for ncn_progname in gcj; do
4847 if test -n "$ncn_target_tool_prefix"; then
4848 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4849set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4850echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4851echo "configure:4852: checking for $ac_word" >&5
4852if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4853 echo $ac_n "(cached) $ac_c" 1>&6
4854else
4855 if test -n "$GCJ_FOR_TARGET"; then
4856 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4857else
4858 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4859 ac_dummy="$PATH"
4860 for ac_dir in $ac_dummy; do
4861 test -z "$ac_dir" && ac_dir=.
4862 if test -f $ac_dir/$ac_word; then
4863 ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4864 break
4865 fi
4866 done
4867 IFS="$ac_save_ifs"
4868fi
4869fi
4870GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4871if test -n "$GCJ_FOR_TARGET"; then
4872 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4873else
4874 echo "$ac_t""no" 1>&6
4875fi
4876
4877 fi
4878 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4879 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4880set dummy ${ncn_progname}; ac_word=$2
4881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4882echo "configure:4883: checking for $ac_word" >&5
4883if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4884 echo $ac_n "(cached) $ac_c" 1>&6
4885else
4886 if test -n "$GCJ_FOR_TARGET"; then
4887 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4888else
4889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4890 ac_dummy="$PATH"
4891 for ac_dir in $ac_dummy; do
4892 test -z "$ac_dir" && ac_dir=.
4893 if test -f $ac_dir/$ac_word; then
4894 ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
4895 break
4896 fi
4897 done
4898 IFS="$ac_save_ifs"
4899fi
4900fi
4901GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4902if test -n "$GCJ_FOR_TARGET"; then
4903 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4904else
4905 echo "$ac_t""no" 1>&6
4906fi
4907
4908 fi
4909 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4910 done
4911fi
4912
4913if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4914 set dummy gcj
4915 if test $build = $target ; then
4916 GCJ_FOR_TARGET="$2"
4917 else
4918 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
2693c0b0 4919 fi
e8b05380 4920fi
2693c0b0 4921
e8b05380
PB
4922 if test -n "$with_build_time_tools"; then
4923 for ncn_progname in gfortran; do
4924 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4925echo "configure:4926: checking for ${ncn_progname} in $with_build_time_tools" >&5
4926 if test -x $with_build_time_tools/GFORTRAN_FOR_TARGET; then
4927 ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/GFORTRAN_FOR_TARGET
4928 echo "$ac_t""yes" 1>&6
4929 break
4930 else
4931 echo "$ac_t""no" 1>&6
4932 fi
4933 done
4934fi
4935
4936if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
4937 for ncn_progname in gfortran; do
4938 if test -n "$ncn_target_tool_prefix"; then
4939 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4940set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4941echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4942echo "configure:4943: checking for $ac_word" >&5
4943if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
4944 echo $ac_n "(cached) $ac_c" 1>&6
4945else
4946 if test -n "$GFORTRAN_FOR_TARGET"; then
4947 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
4948else
4949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4950 ac_dummy="$PATH"
4951 for ac_dir in $ac_dummy; do
4952 test -z "$ac_dir" && ac_dir=.
4953 if test -f $ac_dir/$ac_word; then
4954 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4955 break
4956 fi
4957 done
4958 IFS="$ac_save_ifs"
4959fi
4960fi
4961GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
4962if test -n "$GFORTRAN_FOR_TARGET"; then
4963 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
4964else
4965 echo "$ac_t""no" 1>&6
4966fi
4967
4968 fi
4969 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
4970 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4971set dummy ${ncn_progname}; ac_word=$2
4972echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4973echo "configure:4974: checking for $ac_word" >&5
4974if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
4975 echo $ac_n "(cached) $ac_c" 1>&6
4976else
4977 if test -n "$GFORTRAN_FOR_TARGET"; then
4978 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
4979else
4980 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4981 ac_dummy="$PATH"
4982 for ac_dir in $ac_dummy; do
4983 test -z "$ac_dir" && ac_dir=.
4984 if test -f $ac_dir/$ac_word; then
4985 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
4986 break
4987 fi
4988 done
4989 IFS="$ac_save_ifs"
4990fi
4991fi
4992GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
4993if test -n "$GFORTRAN_FOR_TARGET"; then
4994 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
4995else
4996 echo "$ac_t""no" 1>&6
4997fi
4998
4999 fi
5000 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5001 done
5002fi
5003
5004if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5005 set dummy gfortran
2693c0b0 5006 if test $build = $target ; then
e8b05380 5007 GFORTRAN_FOR_TARGET="$2"
ca9f4b81 5008 else
e8b05380
PB
5009 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
5010 fi
5011fi
5012
5013
5014
5015# The user is always right.
5016if test "${PATH_SEPARATOR+set}" != set; then
5017 echo "#! /bin/sh" >conf$$.sh
5018 echo "exit 0" >>conf$$.sh
5019 chmod +x conf$$.sh
5020 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5021 PATH_SEPARATOR=';'
5022 else
5023 PATH_SEPARATOR=:
ca9f4b81 5024 fi
e8b05380
PB
5025 rm -f conf$$.sh
5026fi
5027
5028
5029
5030if test "x$exec_prefix" = xNONE; then
5031 if test "x$prefix" = xNONE; then
5032 gcc_cv_tool_prefix=$ac_default_prefix
5033 else
5034 gcc_cv_tool_prefix=$prefix
5035 fi
5036else
5037 gcc_cv_tool_prefix=$exec_prefix
5038fi
5039
5040# If there is no compiler in the tree, use the PATH only. In any
5041# case, if there is no compiler in the tree nobody should use
5042# AS_FOR_TARGET and LD_FOR_TARGET.
5043if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
5044 gcc_version=`cat $srcdir/gcc/BASE-VER`
5045 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5046 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
5047 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5048 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
5049 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5050 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
5051else
5052 gcc_cv_tool_dirs=
5053fi
5054
5055if test x$build = x$target && test -n "$md_exec_prefix"; then
5056 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
5057fi
5058
5059
5060
5061cat > conftest.c << \EOF
5062#ifdef __GNUC__
5063 gcc_yay;
5064#endif
5065EOF
5066if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
5067 have_gcc_for_target=yes
5068else
5069 GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
5070 have_gcc_for_target=no
5071fi
5072rm conftest.c
5073
5074
5075
5076
5077if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5078 if test -n "$with_build_time_tools"; then
5079 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5080echo "configure:5081: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5081 AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/AR_FOR_TARGET
5082 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5083 echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
5084 elif test $build != $host && test $have_gcc_for_target = yes; then
5085 AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
5086 test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
5087 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5088 fi
5089fi
5090if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5091 # Extract the first word of "ar", so it can be a program name with args.
5092set dummy ar; ac_word=$2
5093echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5094echo "configure:5095: checking for $ac_word" >&5
5095if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
5096 echo $ac_n "(cached) $ac_c" 1>&6
5097else
5098 case "$AR_FOR_TARGET" in
5099 /*)
5100 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
5101 ;;
5102 ?:/*)
5103 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
5104 ;;
5105 *)
5106 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5107 ac_dummy="$gcc_cv_tool_dirs"
5108 for ac_dir in $ac_dummy; do
5109 test -z "$ac_dir" && ac_dir=.
5110 if test -f $ac_dir/$ac_word; then
5111 ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
5112 break
5113 fi
5114 done
5115 IFS="$ac_save_ifs"
5116 ;;
5117esac
5118fi
5119AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
5120if test -n "$AR_FOR_TARGET"; then
5121 echo "$ac_t""$AR_FOR_TARGET" 1>&6
5122else
5123 echo "$ac_t""no" 1>&6
4de997d1
PB
5124fi
5125
e8b05380
PB
5126fi
5127if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5128 if test -n "$with_build_time_tools"; then
5129 for ncn_progname in ar; do
5130 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5131echo "configure:5132: checking for ${ncn_progname} in $with_build_time_tools" >&5
5132 if test -x $with_build_time_tools/AR_FOR_TARGET; then
5133 ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/AR_FOR_TARGET
5134 echo "$ac_t""yes" 1>&6
5135 break
5136 else
5137 echo "$ac_t""no" 1>&6
5138 fi
5139 done
5140fi
5141
5142if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
5143 for ncn_progname in ar; do
5144 if test -n "$ncn_target_tool_prefix"; then
5145 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 5146set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5147echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5148echo "configure:5149: checking for $ac_word" >&5
5149if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5150 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5151else
e8b05380
PB
5152 if test -n "$AR_FOR_TARGET"; then
5153 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
4de997d1 5154else
72a7ab82
AP
5155 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5156 ac_dummy="$PATH"
5157 for ac_dir in $ac_dummy; do
5158 test -z "$ac_dir" && ac_dir=.
5159 if test -f $ac_dir/$ac_word; then
e8b05380 5160 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
72a7ab82
AP
5161 break
5162 fi
5163 done
5164 IFS="$ac_save_ifs"
4de997d1
PB
5165fi
5166fi
e8b05380
PB
5167AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5168if test -n "$AR_FOR_TARGET"; then
5169 echo "$ac_t""$AR_FOR_TARGET" 1>&6
4de997d1 5170else
72a7ab82 5171 echo "$ac_t""no" 1>&6
4de997d1
PB
5172fi
5173
e8b05380
PB
5174 fi
5175 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
5176 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5177set dummy ${ncn_progname}; ac_word=$2
5178echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5179echo "configure:5180: checking for $ac_word" >&5
5180if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
5182else
5183 if test -n "$AR_FOR_TARGET"; then
5184 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
5185else
5186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5187 ac_dummy="$PATH"
5188 for ac_dir in $ac_dummy; do
5189 test -z "$ac_dir" && ac_dir=.
5190 if test -f $ac_dir/$ac_word; then
5191 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
5192 break
5193 fi
5194 done
5195 IFS="$ac_save_ifs"
5196fi
5197fi
5198AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5199if test -n "$AR_FOR_TARGET"; then
5200 echo "$ac_t""$AR_FOR_TARGET" 1>&6
5201else
5202 echo "$ac_t""no" 1>&6
5203fi
5204
5205 fi
5206 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
5207 done
5208fi
5209
5210if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
5211 set dummy ar
5212 if test $build = $target ; then
5213 AR_FOR_TARGET="$2"
5214 else
5215 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
2693c0b0 5216 fi
e8b05380
PB
5217fi
5218
5219fi
5220
5221
5222
5223
5224if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5225 if test -n "$with_build_time_tools"; then
5226 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5227echo "configure:5228: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5228 AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/AS_FOR_TARGET
5229 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5230 echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
5231 elif test $build != $host && test $have_gcc_for_target = yes; then
5232 AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
5233 test $AS_FOR_TARGET=as && AS_FOR_TARGET=
5234 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5235 fi
5236fi
5237if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5238 # Extract the first word of "as", so it can be a program name with args.
5239set dummy as; ac_word=$2
5240echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5241echo "configure:5242: checking for $ac_word" >&5
5242if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
5243 echo $ac_n "(cached) $ac_c" 1>&6
5244else
5245 case "$AS_FOR_TARGET" in
5246 /*)
5247 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
5248 ;;
5249 ?:/*)
5250 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
5251 ;;
5252 *)
5253 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5254 ac_dummy="$gcc_cv_tool_dirs"
5255 for ac_dir in $ac_dummy; do
5256 test -z "$ac_dir" && ac_dir=.
5257 if test -f $ac_dir/$ac_word; then
5258 ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
5259 break
5260 fi
5261 done
5262 IFS="$ac_save_ifs"
5263 ;;
5264esac
5265fi
5266AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
5267if test -n "$AS_FOR_TARGET"; then
5268 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5269else
5270 echo "$ac_t""no" 1>&6
5271fi
5272
5273fi
5274if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5275 if test -n "$with_build_time_tools"; then
5276 for ncn_progname in as; do
5277 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5278echo "configure:5279: checking for ${ncn_progname} in $with_build_time_tools" >&5
5279 if test -x $with_build_time_tools/AS_FOR_TARGET; then
5280 ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/AS_FOR_TARGET
5281 echo "$ac_t""yes" 1>&6
5282 break
5283 else
5284 echo "$ac_t""no" 1>&6
5285 fi
5286 done
5287fi
5288
5289if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
5290 for ncn_progname in as; do
5291 if test -n "$ncn_target_tool_prefix"; then
5292 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5293set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5294echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5295echo "configure:5296: checking for $ac_word" >&5
5296if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298else
5299 if test -n "$AS_FOR_TARGET"; then
5300 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5301else
5302 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5303 ac_dummy="$PATH"
5304 for ac_dir in $ac_dummy; do
5305 test -z "$ac_dir" && ac_dir=.
5306 if test -f $ac_dir/$ac_word; then
5307 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5308 break
5309 fi
5310 done
5311 IFS="$ac_save_ifs"
5312fi
5313fi
5314AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5315if test -n "$AS_FOR_TARGET"; then
5316 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5317else
5318 echo "$ac_t""no" 1>&6
5319fi
5320
5321 fi
5322 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
5323 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 5324set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5325echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5326echo "configure:5327: checking for $ac_word" >&5
5327if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5328 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5329else
e8b05380
PB
5330 if test -n "$AS_FOR_TARGET"; then
5331 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
4de997d1 5332else
72a7ab82
AP
5333 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5334 ac_dummy="$PATH"
5335 for ac_dir in $ac_dummy; do
5336 test -z "$ac_dir" && ac_dir=.
5337 if test -f $ac_dir/$ac_word; then
e8b05380 5338 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
72a7ab82
AP
5339 break
5340 fi
5341 done
5342 IFS="$ac_save_ifs"
4de997d1
PB
5343fi
5344fi
e8b05380
PB
5345AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5346if test -n "$AS_FOR_TARGET"; then
5347 echo "$ac_t""$AS_FOR_TARGET" 1>&6
4de997d1 5348else
72a7ab82 5349 echo "$ac_t""no" 1>&6
4de997d1 5350fi
72a7ab82 5351
e8b05380
PB
5352 fi
5353 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
5354 done
5355fi
5356
5357if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
5358 set dummy as
5359 if test $build = $target ; then
5360 AS_FOR_TARGET="$2"
5361 else
5362 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 5363 fi
e8b05380 5364fi
2693c0b0 5365
4de997d1
PB
5366fi
5367
e8b05380
PB
5368
5369
5370
5371if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5372 if test -n "$with_build_time_tools"; then
5373 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5374echo "configure:5375: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5375 DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/DLLTOOL_FOR_TARGET
5376 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5377 echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
5378 elif test $build != $host && test $have_gcc_for_target = yes; then
5379 DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
5380 test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
5381 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5382 fi
5383fi
5384if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5385 # Extract the first word of "dlltool", so it can be a program name with args.
5386set dummy dlltool; ac_word=$2
72a7ab82 5387echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5388echo "configure:5389: checking for $ac_word" >&5
5389if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5390 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5391else
e8b05380
PB
5392 case "$DLLTOOL_FOR_TARGET" in
5393 /*)
5394 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
5395 ;;
5396 ?:/*)
5397 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
5398 ;;
5399 *)
72a7ab82 5400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
e8b05380
PB
5401 ac_dummy="$gcc_cv_tool_dirs"
5402 for ac_dir in $ac_dummy; do
72a7ab82
AP
5403 test -z "$ac_dir" && ac_dir=.
5404 if test -f $ac_dir/$ac_word; then
e8b05380 5405 ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word"
72a7ab82
AP
5406 break
5407 fi
5408 done
5409 IFS="$ac_save_ifs"
e8b05380
PB
5410 ;;
5411esac
4de997d1 5412fi
e8b05380
PB
5413DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
5414if test -n "$DLLTOOL_FOR_TARGET"; then
5415 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5416else
72a7ab82 5417 echo "$ac_t""no" 1>&6
4de997d1
PB
5418fi
5419
e8b05380
PB
5420fi
5421if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5422 if test -n "$with_build_time_tools"; then
5423 for ncn_progname in dlltool; do
5424 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5425echo "configure:5426: checking for ${ncn_progname} in $with_build_time_tools" >&5
5426 if test -x $with_build_time_tools/DLLTOOL_FOR_TARGET; then
5427 ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/DLLTOOL_FOR_TARGET
5428 echo "$ac_t""yes" 1>&6
5429 break
5430 else
5431 echo "$ac_t""no" 1>&6
5432 fi
5433 done
5434fi
5435
5436if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
5437 for ncn_progname in dlltool; do
5438 if test -n "$ncn_target_tool_prefix"; then
5439 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5440set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5441echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5442echo "configure:5443: checking for $ac_word" >&5
5443if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5444 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5445else
e8b05380
PB
5446 if test -n "$DLLTOOL_FOR_TARGET"; then
5447 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 5448else
72a7ab82
AP
5449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5450 ac_dummy="$PATH"
5451 for ac_dir in $ac_dummy; do
5452 test -z "$ac_dir" && ac_dir=.
5453 if test -f $ac_dir/$ac_word; then
e8b05380 5454 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
72a7ab82
AP
5455 break
5456 fi
5457 done
5458 IFS="$ac_save_ifs"
4de997d1
PB
5459fi
5460fi
e8b05380
PB
5461DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5462if test -n "$DLLTOOL_FOR_TARGET"; then
5463 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5464else
72a7ab82 5465 echo "$ac_t""no" 1>&6
4de997d1 5466fi
4de997d1 5467
e8b05380
PB
5468 fi
5469 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
5470 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5471set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5472echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5473echo "configure:5474: checking for $ac_word" >&5
5474if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5475 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5476else
e8b05380
PB
5477 if test -n "$DLLTOOL_FOR_TARGET"; then
5478 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 5479else
72a7ab82
AP
5480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5481 ac_dummy="$PATH"
5482 for ac_dir in $ac_dummy; do
5483 test -z "$ac_dir" && ac_dir=.
5484 if test -f $ac_dir/$ac_word; then
e8b05380 5485 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
72a7ab82
AP
5486 break
5487 fi
5488 done
5489 IFS="$ac_save_ifs"
4de997d1
PB
5490fi
5491fi
e8b05380
PB
5492DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5493if test -n "$DLLTOOL_FOR_TARGET"; then
5494 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5495else
72a7ab82 5496 echo "$ac_t""no" 1>&6
4de997d1 5497fi
e8b05380
PB
5498
5499 fi
5500 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
5501 done
5502fi
5503
5504if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
5505 set dummy dlltool
5506 if test $build = $target ; then
5507 DLLTOOL_FOR_TARGET="$2"
5508 else
5509 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
5510 fi
5511fi
5512
5513fi
5514
4de997d1 5515
e8b05380
PB
5516
5517
5518if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5519 if test -n "$with_build_time_tools"; then
5520 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5521echo "configure:5522: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5522 LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/LD_FOR_TARGET
5523 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5524 echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
5525 elif test $build != $host && test $have_gcc_for_target = yes; then
5526 LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
5527 test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
5528 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
2693c0b0 5529 fi
e8b05380
PB
5530fi
5531if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5532 # Extract the first word of "ld", so it can be a program name with args.
5533set dummy ld; ac_word=$2
72a7ab82 5534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380
PB
5535echo "configure:5536: checking for $ac_word" >&5
5536if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
72a7ab82 5537 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5538else
e8b05380
PB
5539 case "$LD_FOR_TARGET" in
5540 /*)
5541 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
5542 ;;
5543 ?:/*)
5544 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
5545 ;;
5546 *)
72a7ab82 5547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
e8b05380
PB
5548 ac_dummy="$gcc_cv_tool_dirs"
5549 for ac_dir in $ac_dummy; do
72a7ab82
AP
5550 test -z "$ac_dir" && ac_dir=.
5551 if test -f $ac_dir/$ac_word; then
e8b05380 5552 ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
72a7ab82
AP
5553 break
5554 fi
5555 done
5556 IFS="$ac_save_ifs"
e8b05380
PB
5557 ;;
5558esac
4de997d1 5559fi
e8b05380
PB
5560LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
5561if test -n "$LD_FOR_TARGET"; then
5562 echo "$ac_t""$LD_FOR_TARGET" 1>&6
4de997d1 5563else
72a7ab82 5564 echo "$ac_t""no" 1>&6
4de997d1 5565fi
2693c0b0 5566
e8b05380
PB
5567fi
5568if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5569 if test -n "$with_build_time_tools"; then
5570 for ncn_progname in ld; do
5571 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5572echo "configure:5573: checking for ${ncn_progname} in $with_build_time_tools" >&5
5573 if test -x $with_build_time_tools/LD_FOR_TARGET; then
5574 ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/LD_FOR_TARGET
5575 echo "$ac_t""yes" 1>&6
5576 break
5577 else
5578 echo "$ac_t""no" 1>&6
5579 fi
5580 done
ca9f4b81
AO
5581fi
5582
e8b05380
PB
5583if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
5584 for ncn_progname in ld; do
5585 if test -n "$ncn_target_tool_prefix"; then
5586 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 5587set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5588echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5589echo "configure:5590: checking for $ac_word" >&5
72a7ab82
AP
5590if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5591 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5592else
4de997d1
PB
5593 if test -n "$LD_FOR_TARGET"; then
5594 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5595else
72a7ab82
AP
5596 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5597 ac_dummy="$PATH"
5598 for ac_dir in $ac_dummy; do
5599 test -z "$ac_dir" && ac_dir=.
5600 if test -f $ac_dir/$ac_word; then
5601 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5602 break
5603 fi
5604 done
5605 IFS="$ac_save_ifs"
ca9f4b81
AO
5606fi
5607fi
72a7ab82 5608LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
4de997d1 5609if test -n "$LD_FOR_TARGET"; then
72a7ab82 5610 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5611else
72a7ab82 5612 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5613fi
5614
e8b05380
PB
5615 fi
5616 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
5617 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 5618set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5619echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5620echo "configure:5621: checking for $ac_word" >&5
72a7ab82
AP
5621if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5622 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5623else
2693c0b0
PB
5624 if test -n "$LD_FOR_TARGET"; then
5625 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5626else
72a7ab82
AP
5627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5628 ac_dummy="$PATH"
5629 for ac_dir in $ac_dummy; do
5630 test -z "$ac_dir" && ac_dir=.
5631 if test -f $ac_dir/$ac_word; then
5632 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5633 break
5634 fi
5635 done
5636 IFS="$ac_save_ifs"
ca9f4b81
AO
5637fi
5638fi
72a7ab82 5639LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
2693c0b0 5640if test -n "$LD_FOR_TARGET"; then
72a7ab82 5641 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5642else
72a7ab82 5643 echo "$ac_t""no" 1>&6
ca9f4b81 5644fi
72a7ab82 5645
e8b05380
PB
5646 fi
5647 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5648 done
5649fi
5650
2693c0b0
PB
5651if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
5652 set dummy ld
5653 if test $build = $target ; then
5654 LD_FOR_TARGET="$2"
ca9f4b81 5655 else
2693c0b0 5656 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5657 fi
ca9f4b81
AO
5658fi
5659
e8b05380
PB
5660fi
5661
5662
5663
5664
5665if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5666 if test -n "$with_build_time_tools"; then
5667 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5668echo "configure:5669: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5669 LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/LIPO_FOR_TARGET
5670 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5671 echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
5672 elif test $build != $host && test $have_gcc_for_target = yes; then
5673 LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
5674 test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
5675 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5676 fi
5677fi
5678if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5679 # Extract the first word of "lipo", so it can be a program name with args.
5680set dummy lipo; ac_word=$2
5681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5682echo "configure:5683: checking for $ac_word" >&5
5683if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
5684 echo $ac_n "(cached) $ac_c" 1>&6
5685else
5686 case "$LIPO_FOR_TARGET" in
5687 /*)
5688 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
5689 ;;
5690 ?:/*)
5691 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
5692 ;;
5693 *)
5694 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5695 ac_dummy="$gcc_cv_tool_dirs"
5696 for ac_dir in $ac_dummy; do
5697 test -z "$ac_dir" && ac_dir=.
5698 if test -f $ac_dir/$ac_word; then
5699 ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word"
5700 break
5701 fi
5702 done
5703 IFS="$ac_save_ifs"
5704 ;;
5705esac
5706fi
5707LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
5708if test -n "$LIPO_FOR_TARGET"; then
5709 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5710else
5711 echo "$ac_t""no" 1>&6
5712fi
5713
5714fi
5715if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5716 if test -n "$with_build_time_tools"; then
5717 for ncn_progname in lipo; do
5718 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5719echo "configure:5720: checking for ${ncn_progname} in $with_build_time_tools" >&5
5720 if test -x $with_build_time_tools/LIPO_FOR_TARGET; then
5721 ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/LIPO_FOR_TARGET
5722 echo "$ac_t""yes" 1>&6
5723 break
5724 else
5725 echo "$ac_t""no" 1>&6
5726 fi
5727 done
5728fi
5729
5730if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
5731 for ncn_progname in lipo; do
5732 if test -n "$ncn_target_tool_prefix"; then
5733 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 5734set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5736echo "configure:5737: checking for $ac_word" >&5
72a7ab82
AP
5737if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5738 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5739else
5740 if test -n "$LIPO_FOR_TARGET"; then
5741 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5742else
72a7ab82
AP
5743 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5744 ac_dummy="$PATH"
5745 for ac_dir in $ac_dummy; do
5746 test -z "$ac_dir" && ac_dir=.
5747 if test -f $ac_dir/$ac_word; then
5748 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5749 break
5750 fi
5751 done
5752 IFS="$ac_save_ifs"
040b1c5a
GK
5753fi
5754fi
72a7ab82 5755LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5756if test -n "$LIPO_FOR_TARGET"; then
72a7ab82 5757 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5758else
72a7ab82 5759 echo "$ac_t""no" 1>&6
040b1c5a
GK
5760fi
5761
e8b05380
PB
5762 fi
5763 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
5764 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
040b1c5a 5765set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5766echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5767echo "configure:5768: checking for $ac_word" >&5
72a7ab82
AP
5768if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5769 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5770else
5771 if test -n "$LIPO_FOR_TARGET"; then
72a7ab82
AP
5772 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5773else
5774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5775 ac_dummy="$PATH"
5776 for ac_dir in $ac_dummy; do
5777 test -z "$ac_dir" && ac_dir=.
5778 if test -f $ac_dir/$ac_word; then
5779 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5780 break
5781 fi
5782 done
5783 IFS="$ac_save_ifs"
040b1c5a
GK
5784fi
5785fi
72a7ab82 5786LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5787if test -n "$LIPO_FOR_TARGET"; then
72a7ab82 5788 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5789else
72a7ab82 5790 echo "$ac_t""no" 1>&6
040b1c5a 5791fi
72a7ab82 5792
e8b05380
PB
5793 fi
5794 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5795 done
5796fi
5797
040b1c5a
GK
5798if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
5799 set dummy lipo
5800 if test $build = $target ; then
5801 LIPO_FOR_TARGET="$2"
5802 else
5803 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
5804 fi
5805fi
5806
e8b05380
PB
5807fi
5808
5809
5810
5811
5812if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5813 if test -n "$with_build_time_tools"; then
5814 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5815echo "configure:5816: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5816 NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/NM_FOR_TARGET
5817 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5818 echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
5819 elif test $build != $host && test $have_gcc_for_target = yes; then
5820 NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
5821 test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
5822 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5823 fi
5824fi
5825if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5826 # Extract the first word of "nm", so it can be a program name with args.
5827set dummy nm; ac_word=$2
5828echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5829echo "configure:5830: checking for $ac_word" >&5
5830if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
5831 echo $ac_n "(cached) $ac_c" 1>&6
5832else
5833 case "$NM_FOR_TARGET" in
5834 /*)
5835 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
5836 ;;
5837 ?:/*)
5838 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
5839 ;;
5840 *)
5841 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5842 ac_dummy="$gcc_cv_tool_dirs"
5843 for ac_dir in $ac_dummy; do
5844 test -z "$ac_dir" && ac_dir=.
5845 if test -f $ac_dir/$ac_word; then
5846 ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
5847 break
5848 fi
5849 done
5850 IFS="$ac_save_ifs"
5851 ;;
5852esac
5853fi
5854NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
5855if test -n "$NM_FOR_TARGET"; then
5856 echo "$ac_t""$NM_FOR_TARGET" 1>&6
5857else
5858 echo "$ac_t""no" 1>&6
5859fi
5860
5861fi
5862if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5863 if test -n "$with_build_time_tools"; then
5864 for ncn_progname in nm; do
5865 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5866echo "configure:5867: checking for ${ncn_progname} in $with_build_time_tools" >&5
5867 if test -x $with_build_time_tools/NM_FOR_TARGET; then
5868 ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/NM_FOR_TARGET
5869 echo "$ac_t""yes" 1>&6
5870 break
5871 else
5872 echo "$ac_t""no" 1>&6
5873 fi
5874 done
5875fi
5876
5877if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
5878 for ncn_progname in nm; do
5879 if test -n "$ncn_target_tool_prefix"; then
5880 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
040b1c5a 5881set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5882echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5883echo "configure:5884: checking for $ac_word" >&5
72a7ab82
AP
5884if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5886else
4de997d1
PB
5887 if test -n "$NM_FOR_TARGET"; then
5888 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 5889else
72a7ab82
AP
5890 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5891 ac_dummy="$PATH"
5892 for ac_dir in $ac_dummy; do
5893 test -z "$ac_dir" && ac_dir=.
5894 if test -f $ac_dir/$ac_word; then
5895 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5896 break
5897 fi
5898 done
5899 IFS="$ac_save_ifs"
ca9f4b81
AO
5900fi
5901fi
72a7ab82 5902NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
4de997d1 5903if test -n "$NM_FOR_TARGET"; then
72a7ab82 5904 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 5905else
72a7ab82 5906 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5907fi
5908
e8b05380
PB
5909 fi
5910 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
5911 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 5912set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5913echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 5914echo "configure:5915: checking for $ac_word" >&5
72a7ab82
AP
5915if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5917else
2693c0b0
PB
5918 if test -n "$NM_FOR_TARGET"; then
5919 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 5920else
72a7ab82
AP
5921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5922 ac_dummy="$PATH"
5923 for ac_dir in $ac_dummy; do
5924 test -z "$ac_dir" && ac_dir=.
5925 if test -f $ac_dir/$ac_word; then
5926 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
5927 break
5928 fi
5929 done
5930 IFS="$ac_save_ifs"
ca9f4b81
AO
5931fi
5932fi
72a7ab82 5933NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
2693c0b0 5934if test -n "$NM_FOR_TARGET"; then
72a7ab82 5935 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 5936else
72a7ab82 5937 echo "$ac_t""no" 1>&6
ca9f4b81 5938fi
72a7ab82 5939
e8b05380
PB
5940 fi
5941 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
5942 done
5943fi
5944
2693c0b0
PB
5945if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
5946 set dummy nm
5947 if test $build = $target ; then
5948 NM_FOR_TARGET="$2"
ca9f4b81 5949 else
2693c0b0 5950 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5951 fi
ca9f4b81
AO
5952fi
5953
e8b05380
PB
5954fi
5955
5956
5957
5958
5959if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
5960 if test -n "$with_build_time_tools"; then
5961 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5962echo "configure:5963: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
5963 OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/OBJDUMP_FOR_TARGET
5964 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
5965 echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
5966 elif test $build != $host && test $have_gcc_for_target = yes; then
5967 OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
5968 test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
5969 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
5970 fi
5971fi
5972if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
5973 # Extract the first word of "objdump", so it can be a program name with args.
5974set dummy objdump; ac_word=$2
5975echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5976echo "configure:5977: checking for $ac_word" >&5
5977if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
5978 echo $ac_n "(cached) $ac_c" 1>&6
5979else
5980 case "$OBJDUMP_FOR_TARGET" in
5981 /*)
5982 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
5983 ;;
5984 ?:/*)
5985 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
5986 ;;
5987 *)
5988 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5989 ac_dummy="$gcc_cv_tool_dirs"
5990 for ac_dir in $ac_dummy; do
5991 test -z "$ac_dir" && ac_dir=.
5992 if test -f $ac_dir/$ac_word; then
5993 ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word"
5994 break
5995 fi
5996 done
5997 IFS="$ac_save_ifs"
5998 ;;
5999esac
6000fi
6001OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
6002if test -n "$OBJDUMP_FOR_TARGET"; then
6003 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6004else
6005 echo "$ac_t""no" 1>&6
6006fi
6007
6008fi
6009if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6010 if test -n "$with_build_time_tools"; then
6011 for ncn_progname in objdump; do
6012 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6013echo "configure:6014: checking for ${ncn_progname} in $with_build_time_tools" >&5
6014 if test -x $with_build_time_tools/OBJDUMP_FOR_TARGET; then
6015 ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/OBJDUMP_FOR_TARGET
6016 echo "$ac_t""yes" 1>&6
6017 break
6018 else
6019 echo "$ac_t""no" 1>&6
6020 fi
6021 done
6022fi
6023
6024if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
6025 for ncn_progname in objdump; do
6026 if test -n "$ncn_target_tool_prefix"; then
6027 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 6028set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 6029echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6030echo "configure:6031: checking for $ac_word" >&5
d739199a
DJ
6031if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6032 echo $ac_n "(cached) $ac_c" 1>&6
6033else
6034 if test -n "$OBJDUMP_FOR_TARGET"; then
6035 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6036else
6037 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6038 ac_dummy="$PATH"
6039 for ac_dir in $ac_dummy; do
6040 test -z "$ac_dir" && ac_dir=.
6041 if test -f $ac_dir/$ac_word; then
6042 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6043 break
6044 fi
6045 done
6046 IFS="$ac_save_ifs"
6047fi
6048fi
6049OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6050if test -n "$OBJDUMP_FOR_TARGET"; then
6051 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6052else
6053 echo "$ac_t""no" 1>&6
6054fi
6055
e8b05380
PB
6056 fi
6057 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
6058 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
d739199a
DJ
6059set dummy ${ncn_progname}; ac_word=$2
6060echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6061echo "configure:6062: checking for $ac_word" >&5
d739199a
DJ
6062if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6063 echo $ac_n "(cached) $ac_c" 1>&6
6064else
6065 if test -n "$OBJDUMP_FOR_TARGET"; then
6066 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6067else
6068 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6069 ac_dummy="$PATH"
6070 for ac_dir in $ac_dummy; do
6071 test -z "$ac_dir" && ac_dir=.
6072 if test -f $ac_dir/$ac_word; then
6073 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
6074 break
6075 fi
6076 done
6077 IFS="$ac_save_ifs"
6078fi
6079fi
6080OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6081if test -n "$OBJDUMP_FOR_TARGET"; then
6082 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6083else
6084 echo "$ac_t""no" 1>&6
6085fi
6086
e8b05380
PB
6087 fi
6088 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
6089 done
6090fi
6091
d739199a
DJ
6092if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
6093 set dummy objdump
6094 if test $build = $target ; then
6095 OBJDUMP_FOR_TARGET="$2"
6096 else
6097 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6098 fi
6099fi
6100
e8b05380
PB
6101fi
6102
6103
6104
6105
6106if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6107 if test -n "$with_build_time_tools"; then
6108 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6109echo "configure:6110: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
6110 RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/RANLIB_FOR_TARGET
6111 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6112 echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
6113 elif test $build != $host && test $have_gcc_for_target = yes; then
6114 RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
6115 test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
6116 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6117 fi
6118fi
6119if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6120 # Extract the first word of "ranlib", so it can be a program name with args.
6121set dummy ranlib; ac_word=$2
6122echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6123echo "configure:6124: checking for $ac_word" >&5
6124if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6125 echo $ac_n "(cached) $ac_c" 1>&6
6126else
6127 case "$RANLIB_FOR_TARGET" in
6128 /*)
6129 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
6130 ;;
6131 ?:/*)
6132 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
6133 ;;
6134 *)
6135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6136 ac_dummy="$gcc_cv_tool_dirs"
6137 for ac_dir in $ac_dummy; do
6138 test -z "$ac_dir" && ac_dir=.
6139 if test -f $ac_dir/$ac_word; then
6140 ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
6141 break
6142 fi
6143 done
6144 IFS="$ac_save_ifs"
6145 ;;
6146esac
6147fi
6148RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
6149if test -n "$RANLIB_FOR_TARGET"; then
6150 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6151else
6152 echo "$ac_t""no" 1>&6
6153fi
6154
6155fi
6156if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6157 if test -n "$with_build_time_tools"; then
6158 for ncn_progname in ranlib; do
6159 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6160echo "configure:6161: checking for ${ncn_progname} in $with_build_time_tools" >&5
6161 if test -x $with_build_time_tools/RANLIB_FOR_TARGET; then
6162 ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/RANLIB_FOR_TARGET
6163 echo "$ac_t""yes" 1>&6
6164 break
6165 else
6166 echo "$ac_t""no" 1>&6
6167 fi
6168 done
6169fi
6170
6171if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
6172 for ncn_progname in ranlib; do
6173 if test -n "$ncn_target_tool_prefix"; then
6174 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
d739199a
DJ
6175set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6176echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6177echo "configure:6178: checking for $ac_word" >&5
72a7ab82
AP
6178if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6179 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6180else
4de997d1
PB
6181 if test -n "$RANLIB_FOR_TARGET"; then
6182 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 6183else
72a7ab82
AP
6184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6185 ac_dummy="$PATH"
6186 for ac_dir in $ac_dummy; do
6187 test -z "$ac_dir" && ac_dir=.
6188 if test -f $ac_dir/$ac_word; then
6189 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6190 break
6191 fi
6192 done
6193 IFS="$ac_save_ifs"
ca9f4b81
AO
6194fi
6195fi
72a7ab82 6196RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
4de997d1 6197if test -n "$RANLIB_FOR_TARGET"; then
72a7ab82 6198 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 6199else
72a7ab82 6200 echo "$ac_t""no" 1>&6
ca9f4b81
AO
6201fi
6202
e8b05380
PB
6203 fi
6204 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
6205 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 6206set dummy ${ncn_progname}; ac_word=$2
72a7ab82 6207echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6208echo "configure:6209: checking for $ac_word" >&5
72a7ab82
AP
6209if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6210 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6211else
2693c0b0
PB
6212 if test -n "$RANLIB_FOR_TARGET"; then
6213 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 6214else
72a7ab82
AP
6215 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6216 ac_dummy="$PATH"
6217 for ac_dir in $ac_dummy; do
6218 test -z "$ac_dir" && ac_dir=.
6219 if test -f $ac_dir/$ac_word; then
6220 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
6221 break
6222 fi
6223 done
6224 IFS="$ac_save_ifs"
ca9f4b81
AO
6225fi
6226fi
72a7ab82 6227RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
2693c0b0 6228if test -n "$RANLIB_FOR_TARGET"; then
72a7ab82 6229 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 6230else
72a7ab82 6231 echo "$ac_t""no" 1>&6
ca9f4b81 6232fi
72a7ab82 6233
e8b05380
PB
6234 fi
6235 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
6236 done
6237fi
6238
6239if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
6240 set dummy ranlib
6241 if test $build = $target ; then
6242 RANLIB_FOR_TARGET="$2"
6243 else
6244 RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 6245 fi
e8b05380 6246fi
2693c0b0 6247
ca9f4b81
AO
6248fi
6249
e8b05380
PB
6250
6251
6252
6253if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6254 if test -n "$with_build_time_tools"; then
6255 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6256echo "configure:6257: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
6257 STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/STRIP_FOR_TARGET
6258 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6259 echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
6260 elif test $build != $host && test $have_gcc_for_target = yes; then
6261 STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
6262 test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
6263 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6264 fi
6265fi
6266if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6267 # Extract the first word of "strip", so it can be a program name with args.
6268set dummy strip; ac_word=$2
6269echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6270echo "configure:6271: checking for $ac_word" >&5
6271if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
6272 echo $ac_n "(cached) $ac_c" 1>&6
6273else
6274 case "$STRIP_FOR_TARGET" in
6275 /*)
6276 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
6277 ;;
6278 ?:/*)
6279 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
6280 ;;
6281 *)
6282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6283 ac_dummy="$gcc_cv_tool_dirs"
6284 for ac_dir in $ac_dummy; do
6285 test -z "$ac_dir" && ac_dir=.
6286 if test -f $ac_dir/$ac_word; then
6287 ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
6288 break
6289 fi
6290 done
6291 IFS="$ac_save_ifs"
6292 ;;
6293esac
6294fi
6295STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
6296if test -n "$STRIP_FOR_TARGET"; then
6297 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6298else
6299 echo "$ac_t""no" 1>&6
6300fi
6301
6302fi
6303if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6304 if test -n "$with_build_time_tools"; then
6305 for ncn_progname in strip; do
6306 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6307echo "configure:6308: checking for ${ncn_progname} in $with_build_time_tools" >&5
6308 if test -x $with_build_time_tools/STRIP_FOR_TARGET; then
6309 ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/STRIP_FOR_TARGET
6310 echo "$ac_t""yes" 1>&6
6311 break
6312 else
6313 echo "$ac_t""no" 1>&6
6314 fi
6315 done
6316fi
6317
6318if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
6319 for ncn_progname in strip; do
6320 if test -n "$ncn_target_tool_prefix"; then
6321 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
040b1c5a 6322set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 6323echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6324echo "configure:6325: checking for $ac_word" >&5
72a7ab82
AP
6325if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6326 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
6327else
6328 if test -n "$STRIP_FOR_TARGET"; then
6329 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6330else
72a7ab82
AP
6331 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6332 ac_dummy="$PATH"
6333 for ac_dir in $ac_dummy; do
6334 test -z "$ac_dir" && ac_dir=.
6335 if test -f $ac_dir/$ac_word; then
6336 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6337 break
6338 fi
6339 done
6340 IFS="$ac_save_ifs"
040b1c5a
GK
6341fi
6342fi
72a7ab82 6343STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 6344if test -n "$STRIP_FOR_TARGET"; then
72a7ab82 6345 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 6346else
72a7ab82 6347 echo "$ac_t""no" 1>&6
040b1c5a
GK
6348fi
6349
e8b05380
PB
6350 fi
6351 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
6352 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
040b1c5a 6353set dummy ${ncn_progname}; ac_word=$2
72a7ab82 6354echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6355echo "configure:6356: checking for $ac_word" >&5
72a7ab82
AP
6356if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6357 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
6358else
6359 if test -n "$STRIP_FOR_TARGET"; then
6360 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6361else
72a7ab82
AP
6362 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6363 ac_dummy="$PATH"
6364 for ac_dir in $ac_dummy; do
6365 test -z "$ac_dir" && ac_dir=.
6366 if test -f $ac_dir/$ac_word; then
6367 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
6368 break
6369 fi
6370 done
6371 IFS="$ac_save_ifs"
040b1c5a
GK
6372fi
6373fi
72a7ab82 6374STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 6375if test -n "$STRIP_FOR_TARGET"; then
72a7ab82 6376 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 6377else
72a7ab82 6378 echo "$ac_t""no" 1>&6
040b1c5a 6379fi
72a7ab82 6380
e8b05380
PB
6381 fi
6382 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
6383 done
6384fi
6385
040b1c5a
GK
6386if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
6387 set dummy strip
6388 if test $build = $target ; then
6389 STRIP_FOR_TARGET="$2"
6390 else
6391 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6392 fi
6393fi
6394
e8b05380
PB
6395fi
6396
6397
6398
6399
6400if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6401 if test -n "$with_build_time_tools"; then
6402 echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6403echo "configure:6404: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5
6404 WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/WINDRES_FOR_TARGET
6405 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6406 echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
6407 elif test $build != $host && test $have_gcc_for_target = yes; then
6408 WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
6409 test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
6410 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6411 fi
6412fi
6413if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6414 # Extract the first word of "windres", so it can be a program name with args.
6415set dummy windres; ac_word=$2
6416echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6417echo "configure:6418: checking for $ac_word" >&5
6418if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6419 echo $ac_n "(cached) $ac_c" 1>&6
6420else
6421 case "$WINDRES_FOR_TARGET" in
6422 /*)
6423 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
6424 ;;
6425 ?:/*)
6426 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
6427 ;;
6428 *)
6429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6430 ac_dummy="$gcc_cv_tool_dirs"
6431 for ac_dir in $ac_dummy; do
6432 test -z "$ac_dir" && ac_dir=.
6433 if test -f $ac_dir/$ac_word; then
6434 ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word"
6435 break
6436 fi
6437 done
6438 IFS="$ac_save_ifs"
6439 ;;
6440esac
6441fi
6442WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
6443if test -n "$WINDRES_FOR_TARGET"; then
6444 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6445else
6446 echo "$ac_t""no" 1>&6
6447fi
6448
6449fi
6450if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6451 if test -n "$with_build_time_tools"; then
6452 for ncn_progname in windres; do
6453 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6454echo "configure:6455: checking for ${ncn_progname} in $with_build_time_tools" >&5
6455 if test -x $with_build_time_tools/WINDRES_FOR_TARGET; then
6456 ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/WINDRES_FOR_TARGET
6457 echo "$ac_t""yes" 1>&6
6458 break
6459 else
6460 echo "$ac_t""no" 1>&6
6461 fi
6462 done
6463fi
6464
6465if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
6466 for ncn_progname in windres; do
6467 if test -n "$ncn_target_tool_prefix"; then
6468 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
2693c0b0 6469set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 6470echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6471echo "configure:6472: checking for $ac_word" >&5
72a7ab82
AP
6472if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6473 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6474else
4de997d1
PB
6475 if test -n "$WINDRES_FOR_TARGET"; then
6476 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 6477else
72a7ab82
AP
6478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6479 ac_dummy="$PATH"
6480 for ac_dir in $ac_dummy; do
6481 test -z "$ac_dir" && ac_dir=.
6482 if test -f $ac_dir/$ac_word; then
6483 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6484 break
6485 fi
6486 done
6487 IFS="$ac_save_ifs"
ca9f4b81
AO
6488fi
6489fi
72a7ab82 6490WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
4de997d1 6491if test -n "$WINDRES_FOR_TARGET"; then
72a7ab82 6492 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 6493else
72a7ab82 6494 echo "$ac_t""no" 1>&6
ca9f4b81
AO
6495fi
6496
e8b05380
PB
6497 fi
6498 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
6499 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
2693c0b0 6500set dummy ${ncn_progname}; ac_word=$2
72a7ab82 6501echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8b05380 6502echo "configure:6503: checking for $ac_word" >&5
72a7ab82
AP
6503if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6504 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6505else
2693c0b0
PB
6506 if test -n "$WINDRES_FOR_TARGET"; then
6507 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 6508else
72a7ab82
AP
6509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6510 ac_dummy="$PATH"
6511 for ac_dir in $ac_dummy; do
6512 test -z "$ac_dir" && ac_dir=.
6513 if test -f $ac_dir/$ac_word; then
6514 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
6515 break
6516 fi
6517 done
6518 IFS="$ac_save_ifs"
ca9f4b81
AO
6519fi
6520fi
72a7ab82 6521WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
2693c0b0 6522if test -n "$WINDRES_FOR_TARGET"; then
72a7ab82 6523 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 6524else
72a7ab82 6525 echo "$ac_t""no" 1>&6
ca9f4b81 6526fi
72a7ab82 6527
e8b05380
PB
6528 fi
6529 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
6530 done
6531fi
6532
2693c0b0
PB
6533if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
6534 set dummy windres
6535 if test $build = $target ; then
6536 WINDRES_FOR_TARGET="$2"
ca9f4b81 6537 else
2693c0b0 6538 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 6539 fi
ca9f4b81
AO
6540fi
6541
e8b05380
PB
6542fi
6543
4977bab6 6544
2abefe3d
PB
6545RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
6546
6547echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
e8b05380 6548echo "configure:6549: checking where to find the target ar" >&5
2abefe3d 6549if test "x${build}" != "x${host}" ; then
e8b05380
PB
6550 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6551 # We already found the complete path
6552 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
6553 else
6554 # Canadian cross, just use what we found
6555 echo "$ac_t""pre-installed" 1>&6
6556 fi
2abefe3d
PB
6557else
6558 ok=yes
6559 case " ${configdirs} " in
6560 *" binutils "*) ;;
6561 *) ok=no ;;
6562 esac
6563
6564 if test $ok = yes; then
6565 # An in-tree tool is available and we can use it
6566 AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
6567 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6568 elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6569 # We already found the complete path
6570 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
2abefe3d
PB
6571 elif test "x$target" = "x$host"; then
6572 # We can use an host tool
6573 AR_FOR_TARGET='$(AR)'
6574 echo "$ac_t""host tool" 1>&6
6575 else
6576 # We need a cross tool
6577 echo "$ac_t""pre-installed" 1>&6
6578 fi
6579fi
6580echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
e8b05380 6581echo "configure:6582: checking where to find the target as" >&5
2abefe3d 6582if test "x${build}" != "x${host}" ; then
e8b05380
PB
6583 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6584 # We already found the complete path
6585 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
6586 else
6587 # Canadian cross, just use what we found
6588 echo "$ac_t""pre-installed" 1>&6
6589 fi
2abefe3d
PB
6590else
6591 ok=yes
6592 case " ${configdirs} " in
6593 *" gas "*) ;;
6594 *) ok=no ;;
6595 esac
6596
6597 if test $ok = yes; then
6598 # An in-tree tool is available and we can use it
6599 AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
6600 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6601 elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6602 # We already found the complete path
6603 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
2abefe3d
PB
6604 elif test "x$target" = "x$host"; then
6605 # We can use an host tool
6606 AS_FOR_TARGET='$(AS)'
6607 echo "$ac_t""host tool" 1>&6
6608 else
6609 # We need a cross tool
6610 echo "$ac_t""pre-installed" 1>&6
6611 fi
6612fi
6613echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
e8b05380 6614echo "configure:6615: checking where to find the target cc" >&5
2abefe3d 6615if test "x${build}" != "x${host}" ; then
e8b05380
PB
6616 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6617 # We already found the complete path
6618 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
6619 else
6620 # Canadian cross, just use what we found
6621 echo "$ac_t""pre-installed" 1>&6
6622 fi
2abefe3d
PB
6623else
6624 ok=yes
6625 case " ${configdirs} " in
6626 *" gcc "*) ;;
6627 *) ok=no ;;
6628 esac
6629
6630 if test $ok = yes; then
6631 # An in-tree tool is available and we can use it
6632 CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6633 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6634 elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6635 # We already found the complete path
6636 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
2abefe3d
PB
6637 elif test "x$target" = "x$host"; then
6638 # We can use an host tool
6639 CC_FOR_TARGET='$(CC)'
6640 echo "$ac_t""host tool" 1>&6
6641 else
6642 # We need a cross tool
6643 echo "$ac_t""pre-installed" 1>&6
6644 fi
6645fi
6646echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
e8b05380 6647echo "configure:6648: checking where to find the target c++" >&5
2abefe3d 6648if test "x${build}" != "x${host}" ; then
e8b05380
PB
6649 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6650 # We already found the complete path
6651 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
6652 else
6653 # Canadian cross, just use what we found
6654 echo "$ac_t""pre-installed" 1>&6
6655 fi
2abefe3d
PB
6656else
6657 ok=yes
6658 case " ${configdirs} " in
6659 *" gcc "*) ;;
6660 *) ok=no ;;
6661 esac
6662 case ,${enable_languages}, in
6663 *,c++,*) ;;
6664 *) ok=no ;;
6665 esac
6666 if test $ok = yes; then
6667 # An in-tree tool is available and we can use it
6668 CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
6669 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6670 elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6671 # We already found the complete path
6672 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
2abefe3d
PB
6673 elif test "x$target" = "x$host"; then
6674 # We can use an host tool
6675 CXX_FOR_TARGET='$(CXX)'
6676 echo "$ac_t""host tool" 1>&6
6677 else
6678 # We need a cross tool
6679 echo "$ac_t""pre-installed" 1>&6
6680 fi
6681fi
6682echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
e8b05380 6683echo "configure:6684: checking where to find the target c++ for libstdc++" >&5
2abefe3d 6684if test "x${build}" != "x${host}" ; then
e8b05380
PB
6685 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6686 # We already found the complete path
6687 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
6688 else
6689 # Canadian cross, just use what we found
6690 echo "$ac_t""pre-installed" 1>&6
6691 fi
2abefe3d
PB
6692else
6693 ok=yes
6694 case " ${configdirs} " in
6695 *" gcc "*) ;;
6696 *) ok=no ;;
6697 esac
6698 case ,${enable_languages}, in
6699 *,c++,*) ;;
6700 *) ok=no ;;
6701 esac
6702 if test $ok = yes; then
6703 # An in-tree tool is available and we can use it
6704 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'
6705 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6706 elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6707 # We already found the complete path
6708 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
2abefe3d
PB
6709 elif test "x$target" = "x$host"; then
6710 # We can use an host tool
6711 RAW_CXX_FOR_TARGET='$(CXX)'
6712 echo "$ac_t""host tool" 1>&6
6713 else
6714 # We need a cross tool
6715 echo "$ac_t""pre-installed" 1>&6
6716 fi
6717fi
6718echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
e8b05380 6719echo "configure:6720: checking where to find the target dlltool" >&5
2abefe3d 6720if test "x${build}" != "x${host}" ; then
e8b05380
PB
6721 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6722 # We already found the complete path
6723 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
6724 else
6725 # Canadian cross, just use what we found
6726 echo "$ac_t""pre-installed" 1>&6
6727 fi
2abefe3d
PB
6728else
6729 ok=yes
6730 case " ${configdirs} " in
6731 *" binutils "*) ;;
6732 *) ok=no ;;
6733 esac
6734
6735 if test $ok = yes; then
6736 # An in-tree tool is available and we can use it
6737 DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
6738 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6739 elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6740 # We already found the complete path
6741 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
2abefe3d
PB
6742 elif test "x$target" = "x$host"; then
6743 # We can use an host tool
6744 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
6745 echo "$ac_t""host tool" 1>&6
6746 else
6747 # We need a cross tool
6748 echo "$ac_t""pre-installed" 1>&6
6749 fi
6750fi
6751echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
e8b05380 6752echo "configure:6753: checking where to find the target gcc" >&5
2abefe3d 6753if test "x${build}" != "x${host}" ; then
e8b05380
PB
6754 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6755 # We already found the complete path
6756 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
6757 else
6758 # Canadian cross, just use what we found
6759 echo "$ac_t""pre-installed" 1>&6
6760 fi
2abefe3d
PB
6761else
6762 ok=yes
6763 case " ${configdirs} " in
6764 *" gcc "*) ;;
6765 *) ok=no ;;
6766 esac
6767
6768 if test $ok = yes; then
6769 # An in-tree tool is available and we can use it
6770 GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6771 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6772 elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6773 # We already found the complete path
6774 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
2abefe3d
PB
6775 elif test "x$target" = "x$host"; then
6776 # We can use an host tool
6777 GCC_FOR_TARGET='$()'
6778 echo "$ac_t""host tool" 1>&6
6779 else
6780 # We need a cross tool
6781 echo "$ac_t""pre-installed" 1>&6
6782 fi
6783fi
6784echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
e8b05380 6785echo "configure:6786: checking where to find the target gcj" >&5
2abefe3d 6786if test "x${build}" != "x${host}" ; then
e8b05380
PB
6787 if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6788 # We already found the complete path
6789 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
6790 else
6791 # Canadian cross, just use what we found
6792 echo "$ac_t""pre-installed" 1>&6
6793 fi
2abefe3d
PB
6794else
6795 ok=yes
6796 case " ${configdirs} " in
6797 *" gcc "*) ;;
6798 *) ok=no ;;
6799 esac
6800 case ,${enable_languages}, in
6801 *,java,*) ;;
6802 *) ok=no ;;
6803 esac
6804 if test $ok = yes; then
6805 # An in-tree tool is available and we can use it
6806 GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
6807 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6808 elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6809 # We already found the complete path
6810 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
2abefe3d
PB
6811 elif test "x$target" = "x$host"; then
6812 # We can use an host tool
6813 GCJ_FOR_TARGET='$(GCJ)'
6814 echo "$ac_t""host tool" 1>&6
6815 else
6816 # We need a cross tool
6817 echo "$ac_t""pre-installed" 1>&6
6818 fi
6819fi
6820echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
e8b05380 6821echo "configure:6822: checking where to find the target gfortran" >&5
2abefe3d 6822if test "x${build}" != "x${host}" ; then
e8b05380
PB
6823 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6824 # We already found the complete path
6825 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
6826 else
6827 # Canadian cross, just use what we found
6828 echo "$ac_t""pre-installed" 1>&6
6829 fi
2abefe3d
PB
6830else
6831 ok=yes
6832 case " ${configdirs} " in
6833 *" gcc "*) ;;
6834 *) ok=no ;;
6835 esac
6836 case ,${enable_languages}, in
6837 *,fortran,*) ;;
6838 *) ok=no ;;
6839 esac
6840 if test $ok = yes; then
6841 # An in-tree tool is available and we can use it
6842 GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
6843 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6844 elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6845 # We already found the complete path
6846 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
2abefe3d
PB
6847 elif test "x$target" = "x$host"; then
6848 # We can use an host tool
6849 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
6850 echo "$ac_t""host tool" 1>&6
6851 else
6852 # We need a cross tool
6853 echo "$ac_t""pre-installed" 1>&6
6854 fi
6855fi
6856echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
e8b05380 6857echo "configure:6858: checking where to find the target ld" >&5
2abefe3d 6858if test "x${build}" != "x${host}" ; then
e8b05380
PB
6859 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6860 # We already found the complete path
6861 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
6862 else
6863 # Canadian cross, just use what we found
6864 echo "$ac_t""pre-installed" 1>&6
6865 fi
2abefe3d
PB
6866else
6867 ok=yes
6868 case " ${configdirs} " in
6869 *" ld "*) ;;
6870 *) ok=no ;;
6871 esac
6872
6873 if test $ok = yes; then
6874 # An in-tree tool is available and we can use it
6875 LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
6876 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6877 elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6878 # We already found the complete path
6879 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
2abefe3d
PB
6880 elif test "x$target" = "x$host"; then
6881 # We can use an host tool
6882 LD_FOR_TARGET='$(LD)'
6883 echo "$ac_t""host tool" 1>&6
6884 else
6885 # We need a cross tool
6886 echo "$ac_t""pre-installed" 1>&6
6887 fi
6888fi
6889echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
e8b05380 6890echo "configure:6891: checking where to find the target lipo" >&5
2abefe3d 6891if test "x${build}" != "x${host}" ; then
e8b05380
PB
6892 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
6893 # We already found the complete path
6894 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
6895 else
6896 # Canadian cross, just use what we found
6897 echo "$ac_t""pre-installed" 1>&6
6898 fi
2abefe3d 6899else
e8b05380
PB
6900 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
6901 # We already found the complete path
6902 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
6903 elif test "x$target" = "x$host"; then
2abefe3d
PB
6904 # We can use an host tool
6905 LIPO_FOR_TARGET='$(LIPO)'
6906 echo "$ac_t""host tool" 1>&6
6907 else
6908 # We need a cross tool
6909 echo "$ac_t""pre-installed" 1>&6
6910 fi
6911fi
6912echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
e8b05380 6913echo "configure:6914: checking where to find the target nm" >&5
2abefe3d 6914if test "x${build}" != "x${host}" ; then
e8b05380
PB
6915 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
6916 # We already found the complete path
6917 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
6918 else
6919 # Canadian cross, just use what we found
6920 echo "$ac_t""pre-installed" 1>&6
6921 fi
2abefe3d
PB
6922else
6923 ok=yes
6924 case " ${configdirs} " in
6925 *" binutils "*) ;;
6926 *) ok=no ;;
6927 esac
6928
6929 if test $ok = yes; then
6930 # An in-tree tool is available and we can use it
6931 NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
6932 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6933 elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
6934 # We already found the complete path
6935 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
2abefe3d
PB
6936 elif test "x$target" = "x$host"; then
6937 # We can use an host tool
6938 NM_FOR_TARGET='$(NM)'
6939 echo "$ac_t""host tool" 1>&6
6940 else
6941 # We need a cross tool
6942 echo "$ac_t""pre-installed" 1>&6
6943 fi
6944fi
6945echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
e8b05380 6946echo "configure:6947: checking where to find the target objdump" >&5
2abefe3d 6947if test "x${build}" != "x${host}" ; then
e8b05380
PB
6948 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
6949 # We already found the complete path
6950 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
6951 else
6952 # Canadian cross, just use what we found
6953 echo "$ac_t""pre-installed" 1>&6
6954 fi
2abefe3d
PB
6955else
6956 ok=yes
6957 case " ${configdirs} " in
6958 *" binutils "*) ;;
6959 *) ok=no ;;
6960 esac
6961
6962 if test $ok = yes; then
6963 # An in-tree tool is available and we can use it
6964 OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
6965 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6966 elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
6967 # We already found the complete path
6968 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
2abefe3d
PB
6969 elif test "x$target" = "x$host"; then
6970 # We can use an host tool
6971 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
6972 echo "$ac_t""host tool" 1>&6
6973 else
6974 # We need a cross tool
6975 echo "$ac_t""pre-installed" 1>&6
6976 fi
6977fi
6978echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
e8b05380 6979echo "configure:6980: checking where to find the target ranlib" >&5
2abefe3d 6980if test "x${build}" != "x${host}" ; then
e8b05380
PB
6981 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
6982 # We already found the complete path
6983 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
6984 else
6985 # Canadian cross, just use what we found
6986 echo "$ac_t""pre-installed" 1>&6
6987 fi
2abefe3d
PB
6988else
6989 ok=yes
6990 case " ${configdirs} " in
6991 *" binutils "*) ;;
6992 *) ok=no ;;
6993 esac
6994
6995 if test $ok = yes; then
6996 # An in-tree tool is available and we can use it
6997 RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
6998 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6999 elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7000 # We already found the complete path
7001 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
2abefe3d
PB
7002 elif test "x$target" = "x$host"; then
7003 # We can use an host tool
7004 RANLIB_FOR_TARGET='$(RANLIB)'
7005 echo "$ac_t""host tool" 1>&6
7006 else
7007 # We need a cross tool
7008 echo "$ac_t""pre-installed" 1>&6
7009 fi
7010fi
7011echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
e8b05380 7012echo "configure:7013: checking where to find the target strip" >&5
2abefe3d 7013if test "x${build}" != "x${host}" ; then
e8b05380
PB
7014 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7015 # We already found the complete path
7016 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
7017 else
7018 # Canadian cross, just use what we found
7019 echo "$ac_t""pre-installed" 1>&6
7020 fi
2abefe3d
PB
7021else
7022 ok=yes
7023 case " ${configdirs} " in
7024 *" binutils "*) ;;
7025 *) ok=no ;;
7026 esac
7027
7028 if test $ok = yes; then
7029 # An in-tree tool is available and we can use it
7030 STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
7031 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7032 elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7033 # We already found the complete path
7034 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
2abefe3d
PB
7035 elif test "x$target" = "x$host"; then
7036 # We can use an host tool
7037 STRIP_FOR_TARGET='$(STRIP)'
7038 echo "$ac_t""host tool" 1>&6
7039 else
7040 # We need a cross tool
7041 echo "$ac_t""pre-installed" 1>&6
7042 fi
7043fi
7044echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
e8b05380 7045echo "configure:7046: checking where to find the target windres" >&5
2abefe3d 7046if test "x${build}" != "x${host}" ; then
e8b05380
PB
7047 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7048 # We already found the complete path
7049 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
7050 else
7051 # Canadian cross, just use what we found
7052 echo "$ac_t""pre-installed" 1>&6
7053 fi
2abefe3d
PB
7054else
7055 ok=yes
7056 case " ${configdirs} " in
7057 *" binutils "*) ;;
7058 *) ok=no ;;
7059 esac
7060
7061 if test $ok = yes; then
7062 # An in-tree tool is available and we can use it
7063 WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
7064 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7065 elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7066 # We already found the complete path
7067 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
2abefe3d
PB
7068 elif test "x$target" = "x$host"; then
7069 # We can use an host tool
7070 WINDRES_FOR_TARGET='$(WINDRES)'
7071 echo "$ac_t""host tool" 1>&6
7072 else
7073 # We need a cross tool
7074 echo "$ac_t""pre-installed" 1>&6
7075 fi
671aa708 7076fi
be912515
NN
7077
7078
7079
2abefe3d 7080
671aa708
NN
7081# Certain tools may need extra flags.
7082AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
7083RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
7084NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
7085
2abefe3d
PB
7086# When building target libraries, except in a Canadian cross, we use
7087# the same toolchain as the compiler we just built.
7088COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
7089COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
7090COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
7091if test $host = $build; then
7092 case " $configdirs " in
7093 *" gcc "*)
7094 COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
7095 COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
7096 COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
7097 ;;
7098 esac
7099fi
7100
7101
7102
7103
7104
72a7ab82 7105echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
e8b05380 7106echo "configure:7107: checking whether to enable maintainer-specific portions of Makefiles" >&5
ee03dc5e
AO
7107# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7108if test "${enable_maintainer_mode+set}" = set; then
7109 enableval="$enable_maintainer_mode"
7110 USE_MAINTAINER_MODE=$enableval
7111else
7112 USE_MAINTAINER_MODE=no
72a7ab82
AP
7113fi
7114
7115echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
ee03dc5e
AO
7116
7117
7118if test "$USE_MAINTAINER_MODE" = yes; then
7119 MAINTAINER_MODE_TRUE=
7120 MAINTAINER_MODE_FALSE='#'
7121else
7122 MAINTAINER_MODE_TRUE='#'
7123 MAINTAINER_MODE_FALSE=
72a7ab82 7124fi
ee03dc5e
AO
7125MAINT=$MAINTAINER_MODE_TRUE
7126
2805b53a
NN
7127# ---------------------
7128# GCC bootstrap support
7129# ---------------------
7130
7131# Stage specific cflags for build.
7132stage1_cflags="-g"
7133case $build in
7134 vax-*-*)
7135 case ${GCC} in
7136 yes) stage1_cflags="-g -Wa,-J" ;;
7137 *) stage1_cflags="-g -J" ;;
7138 esac ;;
7139 powerpc-*-darwin*)
7140 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
7141 # sources; use -no-cpp-precomp to get to GNU cpp.
7142 # Apple's GCC has bugs in designated initializer handling, so disable
7143 # that too.
7144 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
7145 ;;
7146esac
7147
7148
7149# Enable -Werror in bootstrap stage2 and later.
7150# Change the default to "no" on release branches.
7151# Check whether --enable-werror or --disable-werror was given.
7152if test "${enable_werror+set}" = set; then
7153 enableval="$enable_werror"
72a7ab82 7154 :
2805b53a
NN
7155else
7156 enable_werror=yes
72a7ab82
AP
7157fi
7158
09a9c095
NN
7159case ${enable_werror} in
7160 yes) stage2_werror_flag="--enable-werror-always" ;;
7161 *) stage2_werror_flag="" ;;
2805b53a
NN
7162esac
7163
7164
72a7ab82
AP
7165trap '' 1 2 15
7166cat > confcache <<\EOF
671aa708
NN
7167# This file is a shell script that caches the results of configure
7168# tests run on this system so they can be shared between configure
72a7ab82
AP
7169# scripts and configure runs. It is not useful on other systems.
7170# If it contains results you don't want to keep, you may remove or edit it.
671aa708 7171#
72a7ab82
AP
7172# By default, configure uses ./config.cache as the cache file,
7173# creating it if it does not exist already. You can give configure
7174# the --cache-file=FILE option to use a different cache file; that is
7175# what configure does when it calls configure scripts in
7176# subdirectories, so they share the cache.
7177# Giving --cache-file=/dev/null disables caching, for debugging configure.
7178# config.status only pays attention to the cache file if you give it the
7179# --recheck option to rerun configure.
671aa708 7180#
72a7ab82 7181EOF
671aa708
NN
7182# The following way of writing the cache mishandles newlines in values,
7183# but we know of no workaround that is simple, portable, and efficient.
7184# So, don't put newlines in cache variables' values.
7185# Ultrix sh set writes to stderr and can't be redirected directly,
7186# and sets the high bit in the cache file unless we assign to the vars.
72a7ab82
AP
7187(set) 2>&1 |
7188 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7189 *ac_space=\ *)
7190 # `set' does not quote correctly, so add quotes (double-quote substitution
7191 # turns \\\\ into \\, and sed turns \\ into \).
7192 sed -n \
7193 -e "s/'/'\\\\''/g" \
7194 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7195 ;;
7196 *)
7197 # `set' quotes correctly as required by POSIX, so do not add quotes.
7198 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7199 ;;
7200 esac >> confcache
7201if cmp -s $cache_file confcache; then
7202 :
7203else
671aa708 7204 if test -w $cache_file; then
72a7ab82
AP
7205 echo "updating cache $cache_file"
7206 cat confcache > $cache_file
671aa708
NN
7207 else
7208 echo "not updating unwritable cache $cache_file"
7209 fi
4977bab6 7210fi
671aa708 7211rm -f confcache
79c06341 7212
72a7ab82
AP
7213trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7214
671aa708
NN
7215test "x$prefix" = xNONE && prefix=$ac_default_prefix
7216# Let make expand exec_prefix.
7217test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4e77e8f1 7218
72a7ab82
AP
7219# Any assignment to VPATH causes Sun make to only execute
7220# the first set of double-colon rules, so remove it if not needed.
7221# If there is a colon in the path, we need to keep it.
671aa708 7222if test "x$srcdir" = x.; then
72a7ab82 7223 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
671aa708 7224fi
79c06341 7225
72a7ab82
AP
7226trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7227
671aa708
NN
7228# Transform confdefs.h into DEFS.
7229# Protect against shell expansion while executing Makefile rules.
7230# Protect against Makefile macro expansion.
e8b05380
PB
7231cat > conftest.defs <<\EOF
7232s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
7233s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
7234s%\[%\\&%g
7235s%\]%\\&%g
7236s%\$%$$%g
7237EOF
7238DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
7239rm -f conftest.defs
4977bab6 7240
6b65a26d 7241
72a7ab82 7242# Without the "./", some shells look in PATH for config.status.
6b65a26d 7243: ${CONFIG_STATUS=./config.status}
72a7ab82
AP
7244
7245echo creating $CONFIG_STATUS
7246rm -f $CONFIG_STATUS
7247cat > $CONFIG_STATUS <<EOF
7248#! /bin/sh
7249# Generated automatically by configure.
671aa708 7250# Run this file to recreate the current configuration.
72a7ab82
AP
7251# This directory was configured as follows,
7252# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7253#
7254# $0 $ac_configure_args
7255#
671aa708 7256# Compiler output produced by configure, useful for debugging
72a7ab82 7257# configure, is in ./config.log if it exists.
6b65a26d 7258
72a7ab82
AP
7259ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7260for ac_option
671aa708 7261do
72a7ab82 7262 case "\$ac_option" in
671aa708 7263 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
72a7ab82
AP
7264 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7265 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7266 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7267 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7268 exit 0 ;;
7269 -help | --help | --hel | --he | --h)
7270 echo "\$ac_cs_usage"; exit 0 ;;
7271 *) echo "\$ac_cs_usage"; exit 1 ;;
6b65a26d
CM
7272 esac
7273done
7274
72a7ab82
AP
7275ac_given_srcdir=$srcdir
7276ac_given_INSTALL="$INSTALL"
6b65a26d 7277
72a7ab82
AP
7278trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7279EOF
7280cat >> $CONFIG_STATUS <<EOF
6b65a26d 7281
72a7ab82
AP
7282# Protect against being on the right side of a sed subst in config.status.
7283sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7284 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7285$ac_vpsub
7286$extrasub
7287s%@SHELL@%$SHELL%g
7288s%@CFLAGS@%$CFLAGS%g
7289s%@CPPFLAGS@%$CPPFLAGS%g
7290s%@CXXFLAGS@%$CXXFLAGS%g
7291s%@FFLAGS@%$FFLAGS%g
7292s%@DEFS@%$DEFS%g
7293s%@LDFLAGS@%$LDFLAGS%g
7294s%@LIBS@%$LIBS%g
7295s%@exec_prefix@%$exec_prefix%g
7296s%@prefix@%$prefix%g
7297s%@program_transform_name@%$program_transform_name%g
7298s%@bindir@%$bindir%g
7299s%@sbindir@%$sbindir%g
7300s%@libexecdir@%$libexecdir%g
7301s%@datadir@%$datadir%g
7302s%@sysconfdir@%$sysconfdir%g
7303s%@sharedstatedir@%$sharedstatedir%g
7304s%@localstatedir@%$localstatedir%g
7305s%@libdir@%$libdir%g
7306s%@includedir@%$includedir%g
7307s%@oldincludedir@%$oldincludedir%g
7308s%@infodir@%$infodir%g
7309s%@mandir@%$mandir%g
7310s%@host@%$host%g
7311s%@host_alias@%$host_alias%g
7312s%@host_cpu@%$host_cpu%g
7313s%@host_vendor@%$host_vendor%g
7314s%@host_os@%$host_os%g
7315s%@target@%$target%g
7316s%@target_alias@%$target_alias%g
7317s%@target_cpu@%$target_cpu%g
7318s%@target_vendor@%$target_vendor%g
7319s%@target_os@%$target_os%g
7320s%@build@%$build%g
7321s%@build_alias@%$build_alias%g
7322s%@build_cpu@%$build_cpu%g
7323s%@build_vendor@%$build_vendor%g
7324s%@build_os@%$build_os%g
7325s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7326s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7327s%@INSTALL_DATA@%$INSTALL_DATA%g
7328s%@LN@%$LN%g
7329s%@LN_S@%$LN_S%g
7330s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
7331s%@build_subdir@%$build_subdir%g
7332s%@host_subdir@%$host_subdir%g
7333s%@target_subdir@%$target_subdir%g
7334s%@CC@%$CC%g
7335s%@GNATBIND@%$GNATBIND%g
7336s%@do_compare@%$do_compare%g
7337s%@gmplibs@%$gmplibs%g
7338s%@gmpinc@%$gmpinc%g
7339s%@stage1_languages@%$stage1_languages%g
7340s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
671aa708 7341/@serialization_dependencies@/r $serialization_dependencies
72a7ab82 7342s%@serialization_dependencies@%%g
671aa708 7343/@host_makefile_frag@/r $host_makefile_frag
72a7ab82 7344s%@host_makefile_frag@%%g
671aa708 7345/@target_makefile_frag@/r $target_makefile_frag
72a7ab82 7346s%@target_makefile_frag@%%g
671aa708 7347/@alphaieee_frag@/r $alphaieee_frag
72a7ab82 7348s%@alphaieee_frag@%%g
671aa708 7349/@ospace_frag@/r $ospace_frag
72a7ab82
AP
7350s%@ospace_frag@%%g
7351s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
7352s%@BUILD_PREFIX@%$BUILD_PREFIX%g
7353s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
7354s%@tooldir@%$tooldir%g
7355s%@build_tooldir@%$build_tooldir%g
ef9db8d5 7356s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
72a7ab82 7357s%@GDB_TK@%$GDB_TK%g
ef9db8d5 7358s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
72a7ab82
AP
7359s%@build_configargs@%$build_configargs%g
7360s%@build_configdirs@%$build_configdirs%g
7361s%@host_configargs@%$host_configargs%g
7362s%@configdirs@%$configdirs%g
7363s%@target_configargs@%$target_configargs%g
7364s%@target_configdirs@%$target_configdirs%g
7365s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7366s%@config_shell@%$config_shell%g
2abefe3d
PB
7367s%@YACC@%$YACC%g
7368s%@BISON@%$BISON%g
7369s%@M4@%$M4%g
7370s%@LEX@%$LEX%g
7371s%@FLEX@%$FLEX%g
7372s%@MAKEINFO@%$MAKEINFO%g
7373s%@EXPECT@%$EXPECT%g
7374s%@RUNTEST@%$RUNTEST%g
72a7ab82
AP
7375s%@AR@%$AR%g
7376s%@AS@%$AS%g
7377s%@DLLTOOL@%$DLLTOOL%g
7378s%@LD@%$LD%g
2abefe3d 7379s%@LIPO@%$LIPO%g
72a7ab82
AP
7380s%@NM@%$NM%g
7381s%@RANLIB@%$RANLIB%g
2abefe3d 7382s%@STRIP@%$STRIP%g
72a7ab82
AP
7383s%@WINDRES@%$WINDRES%g
7384s%@OBJCOPY@%$OBJCOPY%g
7385s%@OBJDUMP@%$OBJDUMP%g
7386s%@CXX@%$CXX%g
7387s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
72a7ab82
AP
7388s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
7389s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
72a7ab82
AP
7390s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
7391s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
7392s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
e8b05380
PB
7393s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
7394s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
7395s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
72a7ab82
AP
7396s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7397s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
7398s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
d739199a 7399s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
72a7ab82
AP
7400s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7401s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
7402s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
72a7ab82
AP
7403s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
7404s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
2abefe3d
PB
7405s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
7406s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
7407s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
72a7ab82
AP
7408s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7409s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7410s%@MAINT@%$MAINT%g
7411s%@stage1_cflags@%$stage1_cflags%g
72a7ab82
AP
7412s%@stage2_werror_flag@%$stage2_werror_flag%g
7413
671aa708 7414CEOF
72a7ab82 7415EOF
79c06341 7416
72a7ab82
AP
7417cat >> $CONFIG_STATUS <<\EOF
7418
7419# Split the substitutions into bite-sized pieces for seds with
7420# small command number limits, like on Digital OSF/1 and HP-UX.
7421ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7422ac_file=1 # Number of current file.
7423ac_beg=1 # First line for current file.
7424ac_end=$ac_max_sed_cmds # Line after last line for current file.
7425ac_more_lines=:
7426ac_sed_cmds=""
7427while $ac_more_lines; do
7428 if test $ac_beg -gt 1; then
7429 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7430 else
7431 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7432 fi
7433 if test ! -s conftest.s$ac_file; then
7434 ac_more_lines=false
7435 rm -f conftest.s$ac_file
7436 else
7437 if test -z "$ac_sed_cmds"; then
7438 ac_sed_cmds="sed -f conftest.s$ac_file"
671aa708 7439 else
72a7ab82 7440 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
671aa708 7441 fi
72a7ab82
AP
7442 ac_file=`expr $ac_file + 1`
7443 ac_beg=$ac_end
7444 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4977bab6 7445 fi
72a7ab82
AP
7446done
7447if test -z "$ac_sed_cmds"; then
7448 ac_sed_cmds=cat
7449fi
7450EOF
7451
7452cat >> $CONFIG_STATUS <<EOF
79c06341 7453
72a7ab82
AP
7454CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7455EOF
7456cat >> $CONFIG_STATUS <<\EOF
7457for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
671aa708 7458 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
72a7ab82
AP
7459 case "$ac_file" in
7460 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7461 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7462 *) ac_file_in="${ac_file}.in" ;;
671aa708 7463 esac
79c06341 7464
72a7ab82 7465 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6b65a26d 7466
72a7ab82
AP
7467 # Remove last slash and all that follows it. Not all systems have dirname.
7468 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7469 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7470 # The file is in a subdirectory.
7471 test ! -d "$ac_dir" && mkdir "$ac_dir"
7472 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7473 # A "../" for each directory in $ac_dir_suffix.
7474 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7475 else
7476 ac_dir_suffix= ac_dots=
7477 fi
79c06341 7478
72a7ab82
AP
7479 case "$ac_given_srcdir" in
7480 .) srcdir=.
7481 if test -z "$ac_dots"; then top_srcdir=.
7482 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7483 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
671aa708 7484 *) # Relative path.
72a7ab82
AP
7485 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7486 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7487 esac
79c06341 7488
72a7ab82
AP
7489 case "$ac_given_INSTALL" in
7490 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7491 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7492 esac
79c06341 7493
72a7ab82
AP
7494 echo creating "$ac_file"
7495 rm -f "$ac_file"
7496 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7497 case "$ac_file" in
7498 *Makefile*) ac_comsub="1i\\
7499# $configure_input" ;;
7500 *) ac_comsub= ;;
671aa708 7501 esac
79c06341 7502
72a7ab82
AP
7503 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7504 sed -e "$ac_comsub
7505s%@configure_input@%$configure_input%g
7506s%@srcdir@%$srcdir%g
7507s%@top_srcdir@%$top_srcdir%g
7508s%@INSTALL@%$INSTALL%g
7509" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7510fi; done
7511rm -f conftest.s*
79c06341 7512
72a7ab82
AP
7513EOF
7514cat >> $CONFIG_STATUS <<EOF
79c06341 7515
72a7ab82
AP
7516EOF
7517cat >> $CONFIG_STATUS <<\EOF
79c06341 7518
72a7ab82
AP
7519exit 0
7520EOF
671aa708 7521chmod +x $CONFIG_STATUS
72a7ab82
AP
7522rm -fr confdefs* $ac_clean_files
7523test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
79c06341 7524