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