* gas/cfi/cfi-common-6.s: Do not use |.
[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 ;;
790c0838 1195 powerpc-*-darwin* | i[3456789]86-*-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
77d7106f 1852echo "configure:1853: 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
77d7106f 1882echo "configure:1883: 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
77d7106f 1933echo "configure:1934: 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
77d7106f 1965echo "configure:1966: 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
77d7106f 1976#line 1977 "configure"
cac3d6c4
CM
1977#include "confdefs.h"
1978
1979main(){return(0);}
1980EOF
77d7106f 1981if { (eval echo configure:1982: \"$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
77d7106f 2007echo "configure:2008: 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
77d7106f 2012echo "configure:2013: 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
77d7106f 2021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2022: \"$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
77d7106f 2040echo "configure:2041: 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
77d7106f 2107echo "configure:2108: 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
77d7106f 2139echo "configure:2140: 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
77d7106f 2172echo "configure:2173: 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
77d7106f 2204echo "configure:2205: 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
77d7106f 2302echo "configure:2303: checking for correct version of gmp.h" >&5
cac3d6c4 2303cat > conftest.$ac_ext <<EOF
77d7106f 2304#line 2305 "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
77d7106f 2315if { (eval echo configure:2316: \"$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 2329 echo $ac_n "checking for correct version of mpfr.h""... $ac_c" 1>&6
77d7106f 2330echo "configure:2331: checking for correct version of mpfr.h" >&5
cac3d6c4 2331 cat > conftest.$ac_ext <<EOF
77d7106f 2332#line 2333 "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
77d7106f 2345if { (eval echo configure:2346: \"$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
77d7106f
AM
2867 spu-*-*)
2868 target_makefile_frag="config/mt-spu"
2869 ;;
2a3124ca 2870 *-*-netware*)
a0da8069
NN
2871 target_makefile_frag="config/mt-netware"
2872 ;;
3d6dfe0f
NN
2873 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2874 target_makefile_frag="config/mt-gnu"
a0da8069
NN
2875 ;;
2876 *-*-aix4.[3456789]* | *-*-aix[56789].*)
cac3d6c4 2877 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
a0da8069
NN
2878 # commands to handle both 32-bit and 64-bit objects. These flags are
2879 # harmless if we're using GNU nm or ar.
2880 extra_arflags_for_target=" -X32_64"
2881 extra_nmflags_for_target=" -B -X32_64"
2882 ;;
2883 *-*-darwin*)
2884 # ranlib from Darwin requires the -c flag to look at common symbols.
2885 extra_ranlibflags_for_target=" -c"
2886 ;;
2887 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2888 target_makefile_frag="config/mt-wince"
2889 ;;
2890esac
2891
2892alphaieee_frag=/dev/null
2893case $target in
2894 alpha*-*-*)
2895 # This just makes sure to use the -mieee option to build target libs.
2896 # This should probably be set individually by each library.
2897 alphaieee_frag="config/mt-alphaieee"
2898 ;;
2899esac
2900
2901# If --enable-target-optspace always use -Os instead of -O2 to build
2902# the target libraries, similarly if it is not specified, use -Os
2903# on selected platforms.
2904ospace_frag=/dev/null
2905case "${enable_target_optspace}:${target}" in
2906 yes:*)
2907 ospace_frag="config/mt-ospace"
2908 ;;
2909 :d30v-*)
2910 ospace_frag="config/mt-d30v"
2911 ;;
2912 :m32r-* | :d10v-* | :fr30-*)
2913 ospace_frag="config/mt-ospace"
2914 ;;
2915 no:* | :*)
2916 ;;
2917 *)
2918 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2919 ;;
2920esac
2921
a0da8069
NN
2922# Default to using --with-stabs for certain targets.
2923if test x${with_stabs} = x ; then
2924 case "${target}" in
e31d1ea3 2925 mips*-*-irix[56]*)
a0da8069
NN
2926 ;;
2927 mips*-*-* | alpha*-*-osf*)
2928 with_stabs=yes;
2929 extra_host_args="${extra_host_args} --with-stabs"
2930 ;;
2931 esac
2932fi
2933
2934# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2935# them automatically.
2936case "${host}" in
cac3d6c4 2937 hppa*64*-*-hpux11*)
a0da8069
NN
2938 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2939 ;;
2940esac
2941
a0da8069
NN
2942# Some systems (e.g., one of the i386-aix systems the gas testers are
2943# using) don't handle "\$" correctly, so don't use it here.
61fa5f72 2944tooldir='${exec_prefix}'/${target_alias}
a0da8069
NN
2945build_tooldir=${tooldir}
2946
a0da8069
NN
2947# Create a .gdbinit file which runs the one in srcdir
2948# and tells GDB to look there for source files.
2949
2950if test -r ${srcdir}/.gdbinit ; then
2951 case ${srcdir} in
2952 .) ;;
2953 *) cat > ./.gdbinit <<EOF
2954# ${NO_EDIT}
2955dir ${srcdir}
2956dir .
2957source ${srcdir}/.gdbinit
2958EOF
2959 ;;
2960 esac
2961fi
2962
a0da8069
NN
2963# Make sure that the compiler is able to generate an executable. If it
2964# can't, we are probably in trouble. We don't care whether we can run the
2965# executable--we might be using a cross compiler--we only care whether it
2966# can be created. At this point the main configure script has set CC.
2967we_are_ok=no
2968echo "int main () { return 0; }" > conftest.c
2969${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2970if test $? = 0 ; then
2971 if test -s conftest || test -s conftest.exe ; then
2972 we_are_ok=yes
2973 fi
cac3d6c4 2974fi
a0da8069
NN
2975case $we_are_ok in
2976 no)
2977 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2978 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2979 rm -f conftest*
2980 exit 1
2981 ;;
2982esac
2983rm -f conftest*
2984
2985# The Solaris /usr/ucb/cc compiler does not appear to work.
2986case "${host}" in
2987 sparc-sun-solaris2*)
2988 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2989 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2990 could_use=
2991 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2992 if test -d /opt/cygnus/bin ; then
2993 if test "$could_use" = "" ; then
2994 could_use="/opt/cygnus/bin"
2995 else
2996 could_use="$could_use or /opt/cygnus/bin"
2997 fi
2998 fi
2999 if test "$could_use" = "" ; then
3000 echo "Warning: compilation may fail because you're using"
3001 echo "/usr/ucb/cc. You should change your PATH or CC "
3002 echo "variable and rerun configure."
3003 else
3004 echo "Warning: compilation may fail because you're using"
3005 echo "/usr/ucb/cc, when you should use the C compiler from"
3006 echo "$could_use. You should change your"
3007 echo "PATH or CC variable and rerun configure."
3008 fi
3009 fi
3010 ;;
3011esac
3012
a0da8069
NN
3013case "${host}" in
3014 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
9a237d9e 3015 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
a0da8069
NN
3016 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
3017esac
3018
3019# Record target_configdirs and the configure arguments for target and
3020# build configuration in Makefile.
3021target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
6a9cf61e 3022build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
a0da8069 3023
a0da8069
NN
3024# Determine whether gdb needs tk/tcl or not.
3025# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
3026# and in that case we want gdb to be built without tk. Ugh!
3027# In fact I believe gdb is the *only* package directly dependent on tk,
3028# so we should be able to put the 'maybe's in unconditionally and
3029# leave out the maybe dependencies when enable_gdbtk is false. I'm not
3030# 100% sure that that's safe though.
c180f501 3031
675c6968 3032gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
a0da8069
NN
3033case "$enable_gdbtk" in
3034 no)
3035 GDB_TK="" ;;
c180f501
AC
3036 yes)
3037 GDB_TK="${gdb_tk}" ;;
a0da8069 3038 *)
c180f501
AC
3039 # Only add the dependency on gdbtk when GDBtk is part of the gdb
3040 # distro. Eventually someone will fix this and move Insight, nee
3041 # gdbtk to a separate directory.
3042 if test -d ${srcdir}/gdb/gdbtk ; then
3043 GDB_TK="${gdb_tk}"
3044 else
3045 GDB_TK=""
3046 fi
3047 ;;
a0da8069 3048esac
907be67c
DJ
3049CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
3050INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
a0da8069 3051
6bd3dfaa 3052# Strip out unwanted targets.
dd12c3a8
NN
3053
3054# While at that, we remove Makefiles if we were started for recursive
3055# configuration, so that the top-level Makefile reconfigures them,
3056# like we used to do when configure itself was recursive.
dd12c3a8 3057
6bd3dfaa
PB
3058# Loop over modules. $extrasub must be used with care, limiting as
3059# much as possible the usage of range addresses. That's because autoconf
3060# splits the sed script to overcome limits in the number of commands,
3061# and relying on carefully-timed sed passes may turn out to be very hard
3062# to maintain later. In this particular case, you just have to be careful
3063# not to nest @if/@endif pairs, because configure will not warn you at all.
dd12c3a8 3064
319cab08
PB
3065# Check whether --enable-bootstrap or --disable-bootstrap was given.
3066if test "${enable_bootstrap+set}" = set; then
3067 enableval="$enable_bootstrap"
cac3d6c4 3068 :
319cab08 3069else
9cb3fa6f 3070 enable_bootstrap=default
cac3d6c4
CM
3071fi
3072
319cab08 3073
9cb3fa6f
PB
3074# Issue errors and warnings for invalid/strange bootstrap combinations.
3075case "$configdirs" in
3076 *gcc*) have_compiler=yes ;;
3077 *) have_compiler=no ;;
3078esac
3079
3080case "$have_compiler:$host:$target:$enable_bootstrap" in
3081 *:*:*:no) ;;
3082
0aed8855 3083 # Default behavior. Enable bootstrap if we have a compiler
9cb3fa6f
PB
3084 # and we are in a native configuration.
3085 yes:$build:$build:default)
0aed8855 3086 enable_bootstrap=yes ;;
9cb3fa6f
PB
3087
3088 *:*:*:default)
3089 enable_bootstrap=no ;;
3090
3091 # We have a compiler and we are in a native configuration, bootstrap is ok
80911fe1 3092 yes:$build:$build:yes)
9cb3fa6f
PB
3093 ;;
3094
3095 # Other configurations, but we have a compiler. Assume the user knows
3096 # what he's doing.
80911fe1 3097 yes:*:*:yes)
cac3d6c4 3098 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
9cb3fa6f
PB
3099 ;;
3100
3101 # No compiler: if they passed --enable-bootstrap explicitly, fail
80911fe1 3102 no:*:*:yes)
cac3d6c4 3103 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
9cb3fa6f
PB
3104
3105 # Fail if wrong command line
3106 *)
cac3d6c4 3107 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
9cb3fa6f
PB
3108 ;;
3109esac
3110
3111# Adjust the toplevel makefile according to whether bootstrap was selected.
319cab08
PB
3112case "$enable_bootstrap" in
3113 yes)
498d4a71 3114 bootstrap_suffix=bootstrap ;;
319cab08 3115 no)
498d4a71 3116 bootstrap_suffix=no-bootstrap ;;
319cab08
PB
3117esac
3118
6a9cf61e 3119for module in ${build_configdirs} ; do
498d4a71
CF
3120 if test -z "${no_recursion}" \
3121 && test -f ${build_subdir}/${module}/Makefile; then
3122 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3123 rm -f ${build_subdir}/${module}/Makefile
3124 fi
3125 extrasub="$extrasub
3126/^@if build-$module\$/d
3127/^@endif build-$module\$/d
3128/^@if build-$module-$bootstrap_suffix\$/d
3129/^@endif build-$module-$bootstrap_suffix\$/d"
3130done
3131for module in ${configdirs} ; do
80911fe1
PB
3132 if test -z "${no_recursion}"; then
3133 for file in stage*-${module}/Makefile ${module}/Makefile; do
3134 if test -f ${file}; then
3135 echo 1>&2 "*** removing ${file} to force reconfigure"
3136 rm -f ${file}
3137 fi
3138 done
498d4a71
CF
3139 fi
3140 extrasub="$extrasub
3141/^@if $module\$/d
3142/^@endif $module\$/d
3143/^@if $module-$bootstrap_suffix\$/d
3144/^@endif $module-$bootstrap_suffix\$/d"
3145done
3146for module in ${target_configdirs} ; do
3147 if test -z "${no_recursion}" \
3148 && test -f ${target_subdir}/${module}/Makefile; then
3149 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3150 rm -f ${target_subdir}/${module}/Makefile
3151 fi
3152 extrasub="$extrasub
3153/^@if target-$module\$/d
3154/^@endif target-$module\$/d
3155/^@if target-$module-$bootstrap_suffix\$/d
3156/^@endif target-$module-$bootstrap_suffix\$/d"
3157done
3158
6bd3dfaa
PB
3159extrasub="$extrasub
3160/^@if /,/^@endif /d"
a0da8069
NN
3161
3162# Create the serialization dependencies. This uses a temporary file.
3163
e6bfb94a
AO
3164# Check whether --enable-serial-configure or --disable-serial-configure was given.
3165if test "${enable_serial_configure+set}" = set; then
3166 enableval="$enable_serial_configure"
cac3d6c4
CM
3167 :
3168fi
e6bfb94a
AO
3169
3170
1047cb91
DD
3171case ${enable_serial_configure} in
3172 yes)
3173 enable_serial_build_configure=yes
3174 enable_serial_host_configure=yes
3175 enable_serial_target_configure=yes
3176 ;;
3177esac
3178
a0da8069
NN
3179# These force 'configure's to be done one at a time, to avoid problems
3180# with contention over a shared config.cache.
3181rm -f serdep.tmp
e6bfb94a 3182echo '# serdep.tmp' > serdep.tmp
a0da8069 3183olditem=
1047cb91 3184test "x${enable_serial_build_configure}" = xyes &&
a0da8069
NN
3185for item in ${build_configdirs} ; do
3186 case ${olditem} in
3187 "") ;;
e6bfb94a 3188 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3189 esac
3190 olditem=${item}
3191done
3192olditem=
1047cb91 3193test "x${enable_serial_host_configure}" = xyes &&
a0da8069
NN
3194for item in ${configdirs} ; do
3195 case ${olditem} in
3196 "") ;;
e6bfb94a 3197 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3198 esac
3199 olditem=${item}
3200done
3201olditem=
1047cb91 3202test "x${enable_serial_target_configure}" = xyes &&
a0da8069
NN
3203for item in ${target_configdirs} ; do
3204 case ${olditem} in
3205 "") ;;
e6bfb94a 3206 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3207 esac
3208 olditem=${item}
3209done
3210serialization_dependencies=serdep.tmp
3211
3212
e6bfb94a
AO
3213# Base args. Strip norecursion, cache-file, srcdir, host, build,
3214# target and nonopt. These are the ones we might not want to pass
f27d4f92
DJ
3215# down to subconfigures. Also strip program-prefix, program-suffix,
3216# and program-transform-name, so that we can pass down a consistent
3217# program-transform-name. If autoconf has put single quotes around
3218# any of these arguments (because they contain shell metacharacters)
3219# then this will fail; in practice this only happens for
3220# --program-transform-name, so be sure to override --program-transform-name
3221# at the end of the argument list.
3222# These will be expanded by make, so quote '$'.
d2cc0e0d 3223cat <<\EOF_SED > conftestsed
54752a6b
NN
3224s/ --no[^ ]*/ /g
3225s/ --c[a-z-]*[= ][^ ]*//g
3226s/ --sr[a-z-]*[= ][^ ]*//g
3227s/ --ho[a-z-]*[= ][^ ]*//g
3228s/ --bu[a-z-]*[= ][^ ]*//g
3229s/ --t[a-z-]*[= ][^ ]*//g
3230s/ --program-[pst][a-z-]*[= ][^ ]*//g
3231s/ -cache-file[= ][^ ]*//g
3232s/ -srcdir[= ][^ ]*//g
3233s/ -host[= ][^ ]*//g
3234s/ -build[= ][^ ]*//g
3235s/ -target[= ][^ ]*//g
3236s/ -program-prefix[= ][^ ]*//g
3237s/ -program-suffix[= ][^ ]*//g
3238s/ -program-transform-name[= ][^ ]*//g
d2cc0e0d
GK
3239s/ [^' -][^ ]* / /
3240s/^ *//;s/ *$//
8ff944f6
DJ
3241s,\$,$$,g
3242EOF_SED
3243sed -f conftestsed <<EOF_SED > conftestsed.out
cac3d6c4 3244 ${ac_configure_args}
d2cc0e0d 3245EOF_SED
8ff944f6
DJ
3246baseargs=`cat conftestsed.out`
3247rm -f conftestsed conftestsed.out
a0da8069 3248
f27d4f92
DJ
3249# Add in --program-transform-name, after --program-prefix and
3250# --program-suffix have been applied to it. Autoconf has already
3251# doubled dollar signs and backslashes in program_transform_name; we want
3252# the backslashes un-doubled, and then the entire thing wrapped in single
cac3d6c4 3253# quotes, because this will be expanded first by make and then by the shell.
f27d4f92
DJ
3254# Also, because we want to override the logic in subdir configure scripts to
3255# choose program_transform_name, replace any s,x,x, with s,y,y,.
3256sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3257${program_transform_name}
3258EOF_SED
3259gcc_transform_name=`cat conftestsed.out`
3260rm -f conftestsed.out
3261baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3262
a0da8069
NN
3263# For the build-side libraries, we just need to pretend we're native,
3264# and not use the same cache file. Multilibs are neither needed nor
3265# desired.
69e57115 3266build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
a0da8069
NN
3267
3268# For host modules, accept cache file option, or specification as blank.
3269case "${cache_file}" in
3270"") # empty
3271 cache_file_option="" ;;
3272/* | [A-Za-z]:[\\/]* ) # absolute path
3273 cache_file_option="--cache-file=${cache_file}" ;;
3274*) # relative path
3275 cache_file_option="--cache-file=../${cache_file}" ;;
3276esac
3277
82252c06
NN
3278# Host dirs don't like to share a cache file either, horribly enough.
3279# This seems to be due to autoconf 2.5x stupidity.
bb5dca17 3280host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
a0da8069
NN
3281
3282target_configargs=${baseargs}
3283
3284# Passing a --with-cross-host argument lets the target libraries know
3285# whether they are being built with a cross-compiler or being built
3286# native. However, it would be better to use other mechanisms to make the
3287# sorts of decisions they want to make on this basis. Please consider
3288# this option to be deprecated. FIXME.
3289if test x${is_cross_compiler} = xyes ; then
3290 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3291fi
3292
3293# Default to --enable-multilib.
3294if test x${enable_multilib} = x ; then
3295 target_configargs="--enable-multilib ${target_configargs}"
3296fi
3297
3298# Pass --with-newlib if appropriate. Note that target_configdirs has
3299# changed from the earlier setting of with_newlib.
3300if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3301 target_configargs="--with-newlib ${target_configargs}"
3302fi
3303
95036d20
NN
3304# Different target subdirs use different values of certain variables
3305# (notably CXX). Worse, multilibs use *lots* of different values.
3306# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3307# it doesn't automatically accept command-line overrides of them.
3308# This means it's not safe for target subdirs to share a cache file,
3309# which is disgusting, but there you have it. Hopefully this can be
3310# fixed in future. It's still worthwhile to use a cache file for each
3311# directory. I think.
3312
ae380b45
MS
3313# Pass the appropriate --build, --host, --target and --cache-file arguments.
3314# We need to pass --target, as newer autoconf's requires consistency
3315# for target_alias and gcc doesn't manage it consistently.
3316target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
a0da8069 3317
a0da8069
NN
3318FLAGS_FOR_TARGET=
3319case " $target_configdirs " in
3320 *" newlib "*)
3321 case " $target_configargs " in
3322 *" --with-newlib "*)
3323 case "$target" in
3324 *-cygwin*)
564b43e5 3325 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
3326 esac
3327
3328 # If we're not building GCC, don't discard standard headers.
3329 if test -d ${srcdir}/gcc; then
3330 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3331
3332 if test "${build}" != "${host}"; then
3333 # On Canadian crosses, CC_FOR_TARGET will have already been set
3334 # by `configure', so we won't have an opportunity to add -Bgcc/
3335 # to it. This is right: we don't want to search that directory
3336 # for binaries, but we want the header files in there, so add
3337 # them explicitly.
b00612cc 3338 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
a0da8069
NN
3339
3340 # Someone might think of using the pre-installed headers on
3341 # Canadian crosses, in case the installed compiler is not fully
3342 # compatible with the compiler being built. In this case, it
3343 # would be better to flag an error than risking having
3344 # incompatible object files being constructed. We can't
3345 # guarantee that an error will be flagged, but let's hope the
3346 # compiler will do it, when presented with incompatible header
3347 # files.
3348 fi
3349 fi
3350
3351 case "${target}-${is_cross_compiler}" in
ec11bdc6 3352 i[3456789]86-*-linux*-no)
a0da8069
NN
3353 # Here host == target, so we don't need to build gcc,
3354 # so we don't want to discard standard headers.
3355 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3356 ;;
3357 *)
3358 # If we're building newlib, use its generic headers last, but search
3359 # for any libc-related directories first (so make it the last -B
3360 # switch).
3361 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3362 ;;
3363 esac
3364 ;;
3365 esac
3366 ;;
3367esac
45055374
CV
3368case "$target" in
3369*-mingw*)
3370 # Can't be handled as Cygwin above since Mingw does not use newlib.
3371 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' ;;
3372esac
a0da8069 3373
5fbad20a
DD
3374# Allow the user to override the flags for
3375# our build compiler if desired.
3376CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3377
a0da8069
NN
3378# On Canadian crosses, we'll be searching the right directories for
3379# the previously-installed cross compiler, so don't bother to add
3380# flags for directories within the install tree of the compiler
3381# being built; programs in there won't even run.
3382if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3383 # Search for pre-installed headers if nothing else fits.
bba45b8b 3384 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
3385fi
3386
3387if test "x${use_gnu_ld}" = x &&
3388 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3389 # Arrange for us to find uninstalled linker scripts.
b00612cc 3390 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
a0da8069
NN
3391fi
3392
a481dbb7
DD
3393# Search for other target-specific linker scripts and such.
3394case "${target}" in
3395 m32c-*-* )
3396 if test -d ${srcdir}/libgloss/m32c; then
3397 # This is for crt0.o
3398 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3399 # This is for r8c.ld
3400 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3401 # This is for libnosys.a
3402 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
3403 fi
3404 ;;
3405esac
3406
a0da8069 3407# Makefile fragments.
3e707e94
PB
3408for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3409do
3410 eval fragval=\$$frag
3411 if test $fragval != /dev/null; then
3412 eval $frag=${srcdir}/$fragval
3413 fi
3414done
a0da8069
NN
3415
3416
3417
3418
3419
3420# Miscellanea: directories, flags, etc.
3421
3422
3423
3424
3425
3426
3427
6a9cf61e 3428# Build module lists & subconfigure args.
a0da8069
NN
3429
3430
3431
be01d343
PB
3432# Host module lists & subconfigure args.
3433
3434
3435
3436# Target module lists & subconfigure args.
3437
3438
3439
3440# Build tools.
3441
3442
3443
3444# Generate default definitions for YACC, M4, LEX and other programs that run
3445# on the build machine. These are used if the Makefile can't locate these
3446# programs in objdir.
3447MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
3448
3449for ac_prog in 'bison -y' byacc yacc
3450do
3451# Extract the first word of "$ac_prog", so it can be a program name with args.
3452set dummy $ac_prog; ac_word=$2
3453echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3454echo "configure:3455: checking for $ac_word" >&5
be01d343
PB
3455if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3456 echo $ac_n "(cached) $ac_c" 1>&6
3457else
3458 if test -n "$YACC"; then
3459 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3460else
3461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3462 ac_dummy="$PATH"
3463 for ac_dir in $ac_dummy; do
3464 test -z "$ac_dir" && ac_dir=.
3465 if test -f $ac_dir/$ac_word; then
3466 ac_cv_prog_YACC="$ac_prog"
3467 break
3468 fi
3469 done
3470 IFS="$ac_save_ifs"
3471fi
3472fi
3473YACC="$ac_cv_prog_YACC"
3474if test -n "$YACC"; then
3475 echo "$ac_t""$YACC" 1>&6
3476else
3477 echo "$ac_t""no" 1>&6
3478fi
3479
3480test -n "$YACC" && break
3481done
3482test -n "$YACC" || YACC="$MISSING bison -y"
3483
3484case " $build_configdirs " in
3485 *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
3486 *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
3487esac
3488
3489for ac_prog in bison
3490do
3491# Extract the first word of "$ac_prog", so it can be a program name with args.
3492set dummy $ac_prog; ac_word=$2
3493echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3494echo "configure:3495: checking for $ac_word" >&5
be01d343
PB
3495if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3496 echo $ac_n "(cached) $ac_c" 1>&6
3497else
3498 if test -n "$BISON"; then
3499 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3500else
3501 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3502 ac_dummy="$PATH"
3503 for ac_dir in $ac_dummy; do
3504 test -z "$ac_dir" && ac_dir=.
3505 if test -f $ac_dir/$ac_word; then
3506 ac_cv_prog_BISON="$ac_prog"
3507 break
3508 fi
3509 done
3510 IFS="$ac_save_ifs"
3511fi
3512fi
3513BISON="$ac_cv_prog_BISON"
3514if test -n "$BISON"; then
3515 echo "$ac_t""$BISON" 1>&6
3516else
3517 echo "$ac_t""no" 1>&6
3518fi
3519
3520test -n "$BISON" && break
3521done
3522test -n "$BISON" || BISON="$MISSING bison"
3523
3524case " $build_configdirs " in
3525 *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
3526esac
3527
3528for ac_prog in gm4 gnum4 m4
3529do
3530# Extract the first word of "$ac_prog", so it can be a program name with args.
3531set dummy $ac_prog; ac_word=$2
3532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3533echo "configure:3534: checking for $ac_word" >&5
be01d343
PB
3534if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536else
3537 if test -n "$M4"; then
3538 ac_cv_prog_M4="$M4" # Let the user override the test.
3539else
3540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3541 ac_dummy="$PATH"
3542 for ac_dir in $ac_dummy; do
3543 test -z "$ac_dir" && ac_dir=.
3544 if test -f $ac_dir/$ac_word; then
3545 ac_cv_prog_M4="$ac_prog"
3546 break
3547 fi
3548 done
3549 IFS="$ac_save_ifs"
3550fi
3551fi
3552M4="$ac_cv_prog_M4"
3553if test -n "$M4"; then
3554 echo "$ac_t""$M4" 1>&6
3555else
3556 echo "$ac_t""no" 1>&6
3557fi
3558
3559test -n "$M4" && break
3560done
3561test -n "$M4" || M4="$MISSING m4"
3562
3563case " $build_configdirs " in
3564 *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
3565esac
3566
3567for ac_prog in flex lex
3568do
3569# Extract the first word of "$ac_prog", so it can be a program name with args.
3570set dummy $ac_prog; ac_word=$2
3571echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3572echo "configure:3573: checking for $ac_word" >&5
be01d343
PB
3573if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3574 echo $ac_n "(cached) $ac_c" 1>&6
3575else
3576 if test -n "$LEX"; then
3577 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3578else
3579 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3580 ac_dummy="$PATH"
3581 for ac_dir in $ac_dummy; do
3582 test -z "$ac_dir" && ac_dir=.
3583 if test -f $ac_dir/$ac_word; then
3584 ac_cv_prog_LEX="$ac_prog"
3585 break
3586 fi
3587 done
3588 IFS="$ac_save_ifs"
3589fi
3590fi
3591LEX="$ac_cv_prog_LEX"
3592if test -n "$LEX"; then
3593 echo "$ac_t""$LEX" 1>&6
3594else
3595 echo "$ac_t""no" 1>&6
3596fi
3597
3598test -n "$LEX" && break
3599done
3600test -n "$LEX" || LEX="$MISSING flex"
3601
3602case " $build_configdirs " in
3603 *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3604 *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
3605esac
3606
3607for ac_prog in flex
3608do
3609# Extract the first word of "$ac_prog", so it can be a program name with args.
3610set dummy $ac_prog; ac_word=$2
3611echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3612echo "configure:3613: checking for $ac_word" >&5
be01d343
PB
3613if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3614 echo $ac_n "(cached) $ac_c" 1>&6
3615else
3616 if test -n "$FLEX"; then
3617 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3618else
3619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3620 ac_dummy="$PATH"
3621 for ac_dir in $ac_dummy; do
3622 test -z "$ac_dir" && ac_dir=.
3623 if test -f $ac_dir/$ac_word; then
3624 ac_cv_prog_FLEX="$ac_prog"
3625 break
3626 fi
3627 done
3628 IFS="$ac_save_ifs"
3629fi
3630fi
3631FLEX="$ac_cv_prog_FLEX"
3632if test -n "$FLEX"; then
3633 echo "$ac_t""$FLEX" 1>&6
3634else
3635 echo "$ac_t""no" 1>&6
3636fi
3637
3638test -n "$FLEX" && break
3639done
3640test -n "$FLEX" || FLEX="$MISSING flex"
3641
3642case " $build_configdirs " in
3643 *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3644esac
3645
3646for ac_prog in makeinfo
3647do
3648# Extract the first word of "$ac_prog", so it can be a program name with args.
3649set dummy $ac_prog; ac_word=$2
3650echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3651echo "configure:3652: checking for $ac_word" >&5
be01d343
PB
3652if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3653 echo $ac_n "(cached) $ac_c" 1>&6
3654else
3655 if test -n "$MAKEINFO"; then
3656 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3657else
3658 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661 test -z "$ac_dir" && ac_dir=.
3662 if test -f $ac_dir/$ac_word; then
3663 ac_cv_prog_MAKEINFO="$ac_prog"
3664 break
3665 fi
3666 done
3667 IFS="$ac_save_ifs"
3668fi
3669fi
3670MAKEINFO="$ac_cv_prog_MAKEINFO"
3671if test -n "$MAKEINFO"; then
3672 echo "$ac_t""$MAKEINFO" 1>&6
3673else
3674 echo "$ac_t""no" 1>&6
3675fi
3676
3677test -n "$MAKEINFO" && break
3678done
3679test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3680
3681case " $build_configdirs " in
3682 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3683 *)
3684
a4ef73e9 3685 # For an installed makeinfo, we require it to be from texinfo 4.4 or
be01d343
PB
3686 # higher, else we use the "missing" dummy.
3687 if ${MAKEINFO} --version \
a4ef73e9 3688 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
be01d343
PB
3689 :
3690 else
3691 MAKEINFO="$MISSING makeinfo"
3692 fi
3693 ;;
3694
3695esac
a0da8069 3696
be01d343 3697# FIXME: expect and dejagnu may become build tools?
a0da8069 3698
be01d343
PB
3699for ac_prog in expect
3700do
3701# Extract the first word of "$ac_prog", so it can be a program name with args.
3702set dummy $ac_prog; ac_word=$2
3703echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3704echo "configure:3705: checking for $ac_word" >&5
be01d343
PB
3705if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3706 echo $ac_n "(cached) $ac_c" 1>&6
3707else
3708 if test -n "$EXPECT"; then
3709 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3710else
3711 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3712 ac_dummy="$PATH"
3713 for ac_dir in $ac_dummy; do
3714 test -z "$ac_dir" && ac_dir=.
3715 if test -f $ac_dir/$ac_word; then
3716 ac_cv_prog_EXPECT="$ac_prog"
3717 break
3718 fi
3719 done
3720 IFS="$ac_save_ifs"
3721fi
3722fi
3723EXPECT="$ac_cv_prog_EXPECT"
3724if test -n "$EXPECT"; then
3725 echo "$ac_t""$EXPECT" 1>&6
3726else
3727 echo "$ac_t""no" 1>&6
3728fi
a0da8069 3729
be01d343
PB
3730test -n "$EXPECT" && break
3731done
3732test -n "$EXPECT" || EXPECT="expect"
a0da8069 3733
be01d343
PB
3734case " $configdirs " in
3735 *" expect "*)
3736 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3737 ;;
3738esac
a0da8069 3739
be01d343
PB
3740for ac_prog in runtest
3741do
3742# Extract the first word of "$ac_prog", so it can be a program name with args.
3743set dummy $ac_prog; ac_word=$2
3744echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3745echo "configure:3746: checking for $ac_word" >&5
be01d343
PB
3746if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3747 echo $ac_n "(cached) $ac_c" 1>&6
3748else
3749 if test -n "$RUNTEST"; then
3750 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
3751else
3752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3753 ac_dummy="$PATH"
3754 for ac_dir in $ac_dummy; do
3755 test -z "$ac_dir" && ac_dir=.
3756 if test -f $ac_dir/$ac_word; then
3757 ac_cv_prog_RUNTEST="$ac_prog"
3758 break
3759 fi
3760 done
3761 IFS="$ac_save_ifs"
3762fi
3763fi
3764RUNTEST="$ac_cv_prog_RUNTEST"
3765if test -n "$RUNTEST"; then
3766 echo "$ac_t""$RUNTEST" 1>&6
3767else
3768 echo "$ac_t""no" 1>&6
3769fi
a0da8069 3770
be01d343
PB
3771test -n "$RUNTEST" && break
3772done
3773test -n "$RUNTEST" || RUNTEST="runtest"
a0da8069 3774
be01d343
PB
3775case " $configdirs " in
3776 *" dejagnu "*)
6b89cc21 3777 test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
be01d343
PB
3778 ;;
3779esac
a0da8069
NN
3780
3781
a0da8069 3782# Host tools.
859789af
AC
3783ncn_tool_prefix=
3784test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3785ncn_target_tool_prefix=
3786test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3787
05cbd757
PB
3788 for ncn_progname in ar; do
3789 if test -n "$ncn_tool_prefix"; then
3790 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3791set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3792echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3793echo "configure:3794: checking for $ac_word" >&5
cac3d6c4
CM
3794if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3795 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3796else
3797 if test -n "$AR"; then
3798 ac_cv_prog_AR="$AR" # Let the user override the test.
3799else
cac3d6c4
CM
3800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803 test -z "$ac_dir" && ac_dir=.
3804 if test -f $ac_dir/$ac_word; then
3805 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
3806 break
3807 fi
3808 done
3809 IFS="$ac_save_ifs"
859789af
AC
3810fi
3811fi
cac3d6c4 3812AR="$ac_cv_prog_AR"
859789af 3813if test -n "$AR"; then
cac3d6c4 3814 echo "$ac_t""$AR" 1>&6
859789af 3815else
cac3d6c4 3816 echo "$ac_t""no" 1>&6
859789af
AC
3817fi
3818
05cbd757
PB
3819 fi
3820 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3821 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3822set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3823echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3824echo "configure:3825: checking for $ac_word" >&5
cac3d6c4
CM
3825if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3826 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3827else
05cbd757
PB
3828 if test -n "$AR"; then
3829 ac_cv_prog_AR="$AR" # Let the user override the test.
859789af 3830else
cac3d6c4
CM
3831 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3832 ac_dummy="$PATH"
3833 for ac_dir in $ac_dummy; do
3834 test -z "$ac_dir" && ac_dir=.
3835 if test -f $ac_dir/$ac_word; then
3836 ac_cv_prog_AR="${ncn_progname}"
3837 break
3838 fi
3839 done
3840 IFS="$ac_save_ifs"
859789af
AC
3841fi
3842fi
cac3d6c4 3843AR="$ac_cv_prog_AR"
05cbd757 3844if test -n "$AR"; then
cac3d6c4 3845 echo "$ac_t""$AR" 1>&6
859789af 3846else
cac3d6c4 3847 echo "$ac_t""no" 1>&6
859789af 3848fi
cac3d6c4 3849
05cbd757
PB
3850 fi
3851 test -n "$ac_cv_prog_AR" && break
3852done
3853
3854if test -z "$ac_cv_prog_AR" ; then
3855 set dummy ar
3856 if test $build = $host ; then
3857 AR="$2"
859789af 3858 else
05cbd757 3859 AR="${ncn_tool_prefix}$2"
859789af 3860 fi
859789af
AC
3861fi
3862
05cbd757
PB
3863 for ncn_progname in as; do
3864 if test -n "$ncn_tool_prefix"; then
3865 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3866set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3867echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3868echo "configure:3869: checking for $ac_word" >&5
cac3d6c4
CM
3869if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3870 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3871else
3872 if test -n "$AS"; then
3873 ac_cv_prog_AS="$AS" # Let the user override the test.
3874else
cac3d6c4
CM
3875 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3876 ac_dummy="$PATH"
3877 for ac_dir in $ac_dummy; do
3878 test -z "$ac_dir" && ac_dir=.
3879 if test -f $ac_dir/$ac_word; then
3880 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
3881 break
3882 fi
3883 done
3884 IFS="$ac_save_ifs"
859789af
AC
3885fi
3886fi
cac3d6c4 3887AS="$ac_cv_prog_AS"
859789af 3888if test -n "$AS"; then
cac3d6c4 3889 echo "$ac_t""$AS" 1>&6
859789af 3890else
cac3d6c4 3891 echo "$ac_t""no" 1>&6
859789af
AC
3892fi
3893
05cbd757
PB
3894 fi
3895 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3896 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3897set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3898echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3899echo "configure:3900: checking for $ac_word" >&5
cac3d6c4
CM
3900if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3901 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3902else
05cbd757
PB
3903 if test -n "$AS"; then
3904 ac_cv_prog_AS="$AS" # Let the user override the test.
859789af 3905else
cac3d6c4
CM
3906 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3907 ac_dummy="$PATH"
3908 for ac_dir in $ac_dummy; do
3909 test -z "$ac_dir" && ac_dir=.
3910 if test -f $ac_dir/$ac_word; then
3911 ac_cv_prog_AS="${ncn_progname}"
3912 break
3913 fi
3914 done
3915 IFS="$ac_save_ifs"
859789af
AC
3916fi
3917fi
cac3d6c4 3918AS="$ac_cv_prog_AS"
05cbd757 3919if test -n "$AS"; then
cac3d6c4 3920 echo "$ac_t""$AS" 1>&6
859789af 3921else
cac3d6c4 3922 echo "$ac_t""no" 1>&6
859789af 3923fi
cac3d6c4 3924
05cbd757
PB
3925 fi
3926 test -n "$ac_cv_prog_AS" && break
3927done
3928
3929if test -z "$ac_cv_prog_AS" ; then
3930 set dummy as
3931 if test $build = $host ; then
3932 AS="$2"
859789af 3933 else
05cbd757 3934 AS="${ncn_tool_prefix}$2"
859789af 3935 fi
859789af
AC
3936fi
3937
05cbd757
PB
3938 for ncn_progname in dlltool; do
3939 if test -n "$ncn_tool_prefix"; then
3940 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3941set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3942echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3943echo "configure:3944: checking for $ac_word" >&5
cac3d6c4
CM
3944if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3945 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3946else
3947 if test -n "$DLLTOOL"; then
3948 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3949else
cac3d6c4
CM
3950 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3951 ac_dummy="$PATH"
3952 for ac_dir in $ac_dummy; do
3953 test -z "$ac_dir" && ac_dir=.
3954 if test -f $ac_dir/$ac_word; then
3955 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
3956 break
3957 fi
3958 done
3959 IFS="$ac_save_ifs"
859789af
AC
3960fi
3961fi
cac3d6c4 3962DLLTOOL="$ac_cv_prog_DLLTOOL"
859789af 3963if test -n "$DLLTOOL"; then
cac3d6c4 3964 echo "$ac_t""$DLLTOOL" 1>&6
859789af 3965else
cac3d6c4 3966 echo "$ac_t""no" 1>&6
859789af
AC
3967fi
3968
05cbd757
PB
3969 fi
3970 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3971 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3972set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3973echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 3974echo "configure:3975: checking for $ac_word" >&5
cac3d6c4
CM
3975if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3976 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3977else
05cbd757
PB
3978 if test -n "$DLLTOOL"; then
3979 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
859789af 3980else
cac3d6c4
CM
3981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3982 ac_dummy="$PATH"
3983 for ac_dir in $ac_dummy; do
3984 test -z "$ac_dir" && ac_dir=.
3985 if test -f $ac_dir/$ac_word; then
3986 ac_cv_prog_DLLTOOL="${ncn_progname}"
3987 break
3988 fi
3989 done
3990 IFS="$ac_save_ifs"
859789af
AC
3991fi
3992fi
cac3d6c4 3993DLLTOOL="$ac_cv_prog_DLLTOOL"
05cbd757 3994if test -n "$DLLTOOL"; then
cac3d6c4 3995 echo "$ac_t""$DLLTOOL" 1>&6
859789af 3996else
cac3d6c4 3997 echo "$ac_t""no" 1>&6
859789af 3998fi
cac3d6c4 3999
05cbd757
PB
4000 fi
4001 test -n "$ac_cv_prog_DLLTOOL" && break
4002done
4003
4004if test -z "$ac_cv_prog_DLLTOOL" ; then
4005 set dummy dlltool
4006 if test $build = $host ; then
4007 DLLTOOL="$2"
859789af 4008 else
05cbd757 4009 DLLTOOL="${ncn_tool_prefix}$2"
859789af 4010 fi
859789af
AC
4011fi
4012
05cbd757
PB
4013 for ncn_progname in ld; do
4014 if test -n "$ncn_tool_prefix"; then
4015 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4016set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4017echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4018echo "configure:4019: checking for $ac_word" >&5
cac3d6c4
CM
4019if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4020 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4021else
4022 if test -n "$LD"; then
4023 ac_cv_prog_LD="$LD" # Let the user override the test.
4024else
cac3d6c4
CM
4025 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4026 ac_dummy="$PATH"
4027 for ac_dir in $ac_dummy; do
4028 test -z "$ac_dir" && ac_dir=.
4029 if test -f $ac_dir/$ac_word; then
4030 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
4031 break
4032 fi
4033 done
4034 IFS="$ac_save_ifs"
859789af
AC
4035fi
4036fi
cac3d6c4 4037LD="$ac_cv_prog_LD"
859789af 4038if test -n "$LD"; then
cac3d6c4 4039 echo "$ac_t""$LD" 1>&6
859789af 4040else
cac3d6c4 4041 echo "$ac_t""no" 1>&6
859789af
AC
4042fi
4043
05cbd757
PB
4044 fi
4045 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
4046 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4047set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4048echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4049echo "configure:4050: checking for $ac_word" >&5
cac3d6c4
CM
4050if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4051 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4052else
05cbd757
PB
4053 if test -n "$LD"; then
4054 ac_cv_prog_LD="$LD" # Let the user override the test.
376a0e54 4055else
cac3d6c4
CM
4056 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4057 ac_dummy="$PATH"
4058 for ac_dir in $ac_dummy; do
4059 test -z "$ac_dir" && ac_dir=.
4060 if test -f $ac_dir/$ac_word; then
4061 ac_cv_prog_LD="${ncn_progname}"
4062 break
4063 fi
4064 done
4065 IFS="$ac_save_ifs"
859789af
AC
4066fi
4067fi
cac3d6c4 4068LD="$ac_cv_prog_LD"
05cbd757 4069if test -n "$LD"; then
cac3d6c4 4070 echo "$ac_t""$LD" 1>&6
859789af 4071else
cac3d6c4 4072 echo "$ac_t""no" 1>&6
859789af 4073fi
cac3d6c4 4074
05cbd757
PB
4075 fi
4076 test -n "$ac_cv_prog_LD" && break
4077done
4078
4079if test -z "$ac_cv_prog_LD" ; then
4080 set dummy ld
4081 if test $build = $host ; then
4082 LD="$2"
859789af 4083 else
05cbd757 4084 LD="${ncn_tool_prefix}$2"
859789af 4085 fi
859789af
AC
4086fi
4087
be01d343
PB
4088 for ncn_progname in lipo; do
4089 if test -n "$ncn_tool_prefix"; then
4090 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4091set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4092echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4093echo "configure:4094: checking for $ac_word" >&5
be01d343
PB
4094if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4095 echo $ac_n "(cached) $ac_c" 1>&6
4096else
4097 if test -n "$LIPO"; then
4098 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4099else
4100 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4101 ac_dummy="$PATH"
4102 for ac_dir in $ac_dummy; do
4103 test -z "$ac_dir" && ac_dir=.
4104 if test -f $ac_dir/$ac_word; then
4105 ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
4106 break
4107 fi
4108 done
4109 IFS="$ac_save_ifs"
4110fi
4111fi
4112LIPO="$ac_cv_prog_LIPO"
4113if test -n "$LIPO"; then
4114 echo "$ac_t""$LIPO" 1>&6
4115else
4116 echo "$ac_t""no" 1>&6
4117fi
4118
4119 fi
4120 if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
4121 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4122set dummy ${ncn_progname}; ac_word=$2
4123echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4124echo "configure:4125: checking for $ac_word" >&5
be01d343
PB
4125if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4126 echo $ac_n "(cached) $ac_c" 1>&6
4127else
4128 if test -n "$LIPO"; then
4129 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4130else
4131 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4132 ac_dummy="$PATH"
4133 for ac_dir in $ac_dummy; do
4134 test -z "$ac_dir" && ac_dir=.
4135 if test -f $ac_dir/$ac_word; then
4136 ac_cv_prog_LIPO="${ncn_progname}"
4137 break
4138 fi
4139 done
4140 IFS="$ac_save_ifs"
4141fi
4142fi
4143LIPO="$ac_cv_prog_LIPO"
4144if test -n "$LIPO"; then
4145 echo "$ac_t""$LIPO" 1>&6
4146else
4147 echo "$ac_t""no" 1>&6
4148fi
4149
4150 fi
4151 test -n "$ac_cv_prog_LIPO" && break
4152done
4153
4154if test -z "$ac_cv_prog_LIPO" ; then
4155 set dummy lipo
4156 if test $build = $host ; then
4157 LIPO="$2"
4158 else
4159 LIPO="${ncn_tool_prefix}$2"
4160 fi
4161fi
4162
05cbd757
PB
4163 for ncn_progname in nm; do
4164 if test -n "$ncn_tool_prefix"; then
4165 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4166set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4167echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4168echo "configure:4169: checking for $ac_word" >&5
cac3d6c4
CM
4169if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4170 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4171else
4172 if test -n "$NM"; then
4173 ac_cv_prog_NM="$NM" # Let the user override the test.
4174else
cac3d6c4
CM
4175 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4176 ac_dummy="$PATH"
4177 for ac_dir in $ac_dummy; do
4178 test -z "$ac_dir" && ac_dir=.
4179 if test -f $ac_dir/$ac_word; then
4180 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
4181 break
4182 fi
4183 done
4184 IFS="$ac_save_ifs"
859789af
AC
4185fi
4186fi
cac3d6c4 4187NM="$ac_cv_prog_NM"
859789af 4188if test -n "$NM"; then
cac3d6c4 4189 echo "$ac_t""$NM" 1>&6
859789af 4190else
cac3d6c4 4191 echo "$ac_t""no" 1>&6
859789af
AC
4192fi
4193
05cbd757
PB
4194 fi
4195 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
4196 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4197set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4198echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4199echo "configure:4200: checking for $ac_word" >&5
cac3d6c4
CM
4200if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4201 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4202else
05cbd757
PB
4203 if test -n "$NM"; then
4204 ac_cv_prog_NM="$NM" # Let the user override the test.
859789af 4205else
cac3d6c4
CM
4206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4207 ac_dummy="$PATH"
4208 for ac_dir in $ac_dummy; do
4209 test -z "$ac_dir" && ac_dir=.
4210 if test -f $ac_dir/$ac_word; then
4211 ac_cv_prog_NM="${ncn_progname}"
4212 break
4213 fi
4214 done
4215 IFS="$ac_save_ifs"
859789af
AC
4216fi
4217fi
cac3d6c4 4218NM="$ac_cv_prog_NM"
05cbd757 4219if test -n "$NM"; then
cac3d6c4 4220 echo "$ac_t""$NM" 1>&6
859789af 4221else
cac3d6c4 4222 echo "$ac_t""no" 1>&6
859789af 4223fi
cac3d6c4 4224
05cbd757
PB
4225 fi
4226 test -n "$ac_cv_prog_NM" && break
4227done
4228
4229if test -z "$ac_cv_prog_NM" ; then
4230 set dummy nm
4231 if test $build = $host ; then
4232 NM="$2"
859789af 4233 else
05cbd757 4234 NM="${ncn_tool_prefix}$2"
859789af 4235 fi
859789af
AC
4236fi
4237
05cbd757
PB
4238 for ncn_progname in ranlib; do
4239 if test -n "$ncn_tool_prefix"; then
4240 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4241set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4242echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4243echo "configure:4244: checking for $ac_word" >&5
cac3d6c4
CM
4244if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4245 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4246else
4247 if test -n "$RANLIB"; then
4248 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4249else
cac3d6c4
CM
4250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4251 ac_dummy="$PATH"
4252 for ac_dir in $ac_dummy; do
4253 test -z "$ac_dir" && ac_dir=.
4254 if test -f $ac_dir/$ac_word; then
4255 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
4256 break
4257 fi
4258 done
4259 IFS="$ac_save_ifs"
859789af
AC
4260fi
4261fi
cac3d6c4 4262RANLIB="$ac_cv_prog_RANLIB"
859789af 4263if test -n "$RANLIB"; then
cac3d6c4 4264 echo "$ac_t""$RANLIB" 1>&6
859789af 4265else
cac3d6c4 4266 echo "$ac_t""no" 1>&6
859789af
AC
4267fi
4268
05cbd757
PB
4269 fi
4270 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
4271 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4272set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4273echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4274echo "configure:4275: checking for $ac_word" >&5
cac3d6c4
CM
4275if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4276 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4277else
05cbd757
PB
4278 if test -n "$RANLIB"; then
4279 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
859789af 4280else
cac3d6c4
CM
4281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4282 ac_dummy="$PATH"
4283 for ac_dir in $ac_dummy; do
4284 test -z "$ac_dir" && ac_dir=.
4285 if test -f $ac_dir/$ac_word; then
4286 ac_cv_prog_RANLIB="${ncn_progname}"
4287 break
4288 fi
4289 done
4290 IFS="$ac_save_ifs"
859789af
AC
4291fi
4292fi
cac3d6c4 4293RANLIB="$ac_cv_prog_RANLIB"
05cbd757 4294if test -n "$RANLIB"; then
cac3d6c4 4295 echo "$ac_t""$RANLIB" 1>&6
859789af 4296else
cac3d6c4 4297 echo "$ac_t""no" 1>&6
859789af 4298fi
cac3d6c4 4299
859789af 4300 fi
05cbd757
PB
4301 test -n "$ac_cv_prog_RANLIB" && break
4302done
4303
4304if test -z "$ac_cv_prog_RANLIB" ; then
4305 RANLIB=":"
859789af
AC
4306fi
4307
be01d343
PB
4308 for ncn_progname in strip; do
4309 if test -n "$ncn_tool_prefix"; then
4310 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4311set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4312echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4313echo "configure:4314: checking for $ac_word" >&5
be01d343
PB
4314if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4315 echo $ac_n "(cached) $ac_c" 1>&6
4316else
4317 if test -n "$STRIP"; then
4318 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4319else
4320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4321 ac_dummy="$PATH"
4322 for ac_dir in $ac_dummy; do
4323 test -z "$ac_dir" && ac_dir=.
4324 if test -f $ac_dir/$ac_word; then
4325 ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
4326 break
4327 fi
4328 done
4329 IFS="$ac_save_ifs"
4330fi
4331fi
4332STRIP="$ac_cv_prog_STRIP"
4333if test -n "$STRIP"; then
4334 echo "$ac_t""$STRIP" 1>&6
4335else
4336 echo "$ac_t""no" 1>&6
4337fi
4338
4339 fi
4340 if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
4341 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4342set dummy ${ncn_progname}; ac_word=$2
4343echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4344echo "configure:4345: checking for $ac_word" >&5
be01d343
PB
4345if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4346 echo $ac_n "(cached) $ac_c" 1>&6
4347else
4348 if test -n "$STRIP"; then
4349 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4350else
4351 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354 test -z "$ac_dir" && ac_dir=.
4355 if test -f $ac_dir/$ac_word; then
4356 ac_cv_prog_STRIP="${ncn_progname}"
4357 break
4358 fi
4359 done
4360 IFS="$ac_save_ifs"
4361fi
4362fi
4363STRIP="$ac_cv_prog_STRIP"
4364if test -n "$STRIP"; then
4365 echo "$ac_t""$STRIP" 1>&6
4366else
4367 echo "$ac_t""no" 1>&6
4368fi
4369
4370 fi
4371 test -n "$ac_cv_prog_STRIP" && break
4372done
4373
4374if test -z "$ac_cv_prog_STRIP" ; then
4375 STRIP=":"
4376fi
4377
05cbd757
PB
4378 for ncn_progname in windres; do
4379 if test -n "$ncn_tool_prefix"; then
4380 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4381set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4382echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4383echo "configure:4384: checking for $ac_word" >&5
cac3d6c4
CM
4384if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4385 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4386else
4387 if test -n "$WINDRES"; then
4388 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4389else
cac3d6c4
CM
4390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4391 ac_dummy="$PATH"
4392 for ac_dir in $ac_dummy; do
4393 test -z "$ac_dir" && ac_dir=.
4394 if test -f $ac_dir/$ac_word; then
4395 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
4396 break
4397 fi
4398 done
4399 IFS="$ac_save_ifs"
859789af
AC
4400fi
4401fi
cac3d6c4 4402WINDRES="$ac_cv_prog_WINDRES"
859789af 4403if test -n "$WINDRES"; then
cac3d6c4 4404 echo "$ac_t""$WINDRES" 1>&6
859789af 4405else
cac3d6c4 4406 echo "$ac_t""no" 1>&6
859789af
AC
4407fi
4408
05cbd757
PB
4409 fi
4410 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
4411 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4412set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4413echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4414echo "configure:4415: checking for $ac_word" >&5
cac3d6c4
CM
4415if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4416 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4417else
05cbd757
PB
4418 if test -n "$WINDRES"; then
4419 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
859789af 4420else
cac3d6c4
CM
4421 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4422 ac_dummy="$PATH"
4423 for ac_dir in $ac_dummy; do
4424 test -z "$ac_dir" && ac_dir=.
4425 if test -f $ac_dir/$ac_word; then
4426 ac_cv_prog_WINDRES="${ncn_progname}"
4427 break
4428 fi
4429 done
4430 IFS="$ac_save_ifs"
859789af
AC
4431fi
4432fi
cac3d6c4 4433WINDRES="$ac_cv_prog_WINDRES"
05cbd757 4434if test -n "$WINDRES"; then
cac3d6c4 4435 echo "$ac_t""$WINDRES" 1>&6
859789af 4436else
cac3d6c4 4437 echo "$ac_t""no" 1>&6
859789af 4438fi
cac3d6c4 4439
05cbd757
PB
4440 fi
4441 test -n "$ac_cv_prog_WINDRES" && break
4442done
4443
4444if test -z "$ac_cv_prog_WINDRES" ; then
4445 set dummy windres
4446 if test $build = $host ; then
4447 WINDRES="$2"
859789af 4448 else
05cbd757 4449 WINDRES="${ncn_tool_prefix}$2"
859789af 4450 fi
859789af
AC
4451fi
4452
05cbd757
PB
4453 for ncn_progname in objcopy; do
4454 if test -n "$ncn_tool_prefix"; then
4455 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4456set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4457echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4458echo "configure:4459: checking for $ac_word" >&5
cac3d6c4
CM
4459if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4460 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4461else
4462 if test -n "$OBJCOPY"; then
4463 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4464else
cac3d6c4
CM
4465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4466 ac_dummy="$PATH"
4467 for ac_dir in $ac_dummy; do
4468 test -z "$ac_dir" && ac_dir=.
4469 if test -f $ac_dir/$ac_word; then
4470 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
4471 break
4472 fi
4473 done
4474 IFS="$ac_save_ifs"
859789af
AC
4475fi
4476fi
cac3d6c4 4477OBJCOPY="$ac_cv_prog_OBJCOPY"
859789af 4478if test -n "$OBJCOPY"; then
cac3d6c4 4479 echo "$ac_t""$OBJCOPY" 1>&6
859789af 4480else
cac3d6c4 4481 echo "$ac_t""no" 1>&6
859789af
AC
4482fi
4483
05cbd757
PB
4484 fi
4485 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4486 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4487set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4488echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4489echo "configure:4490: checking for $ac_word" >&5
cac3d6c4
CM
4490if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4491 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4492else
05cbd757
PB
4493 if test -n "$OBJCOPY"; then
4494 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
859789af 4495else
cac3d6c4
CM
4496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4497 ac_dummy="$PATH"
4498 for ac_dir in $ac_dummy; do
4499 test -z "$ac_dir" && ac_dir=.
4500 if test -f $ac_dir/$ac_word; then
4501 ac_cv_prog_OBJCOPY="${ncn_progname}"
4502 break
4503 fi
4504 done
4505 IFS="$ac_save_ifs"
859789af
AC
4506fi
4507fi
cac3d6c4 4508OBJCOPY="$ac_cv_prog_OBJCOPY"
05cbd757 4509if test -n "$OBJCOPY"; then
cac3d6c4 4510 echo "$ac_t""$OBJCOPY" 1>&6
859789af 4511else
cac3d6c4 4512 echo "$ac_t""no" 1>&6
859789af 4513fi
cac3d6c4 4514
05cbd757
PB
4515 fi
4516 test -n "$ac_cv_prog_OBJCOPY" && break
4517done
4518
4519if test -z "$ac_cv_prog_OBJCOPY" ; then
4520 set dummy objcopy
4521 if test $build = $host ; then
4522 OBJCOPY="$2"
859789af 4523 else
05cbd757 4524 OBJCOPY="${ncn_tool_prefix}$2"
859789af 4525 fi
859789af
AC
4526fi
4527
05cbd757
PB
4528 for ncn_progname in objdump; do
4529 if test -n "$ncn_tool_prefix"; then
4530 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4531set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4533echo "configure:4534: checking for $ac_word" >&5
cac3d6c4
CM
4534if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4535 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4536else
4537 if test -n "$OBJDUMP"; then
4538 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4539else
cac3d6c4
CM
4540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4541 ac_dummy="$PATH"
4542 for ac_dir in $ac_dummy; do
4543 test -z "$ac_dir" && ac_dir=.
4544 if test -f $ac_dir/$ac_word; then
4545 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
4546 break
4547 fi
4548 done
4549 IFS="$ac_save_ifs"
859789af
AC
4550fi
4551fi
cac3d6c4 4552OBJDUMP="$ac_cv_prog_OBJDUMP"
859789af 4553if test -n "$OBJDUMP"; then
cac3d6c4 4554 echo "$ac_t""$OBJDUMP" 1>&6
859789af 4555else
cac3d6c4 4556 echo "$ac_t""no" 1>&6
859789af
AC
4557fi
4558
05cbd757
PB
4559 fi
4560 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4561 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4562set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4563echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4564echo "configure:4565: checking for $ac_word" >&5
cac3d6c4
CM
4565if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4566 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4567else
05cbd757
PB
4568 if test -n "$OBJDUMP"; then
4569 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
859789af 4570else
cac3d6c4
CM
4571 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574 test -z "$ac_dir" && ac_dir=.
4575 if test -f $ac_dir/$ac_word; then
4576 ac_cv_prog_OBJDUMP="${ncn_progname}"
4577 break
4578 fi
4579 done
4580 IFS="$ac_save_ifs"
859789af
AC
4581fi
4582fi
cac3d6c4 4583OBJDUMP="$ac_cv_prog_OBJDUMP"
05cbd757 4584if test -n "$OBJDUMP"; then
cac3d6c4 4585 echo "$ac_t""$OBJDUMP" 1>&6
859789af 4586else
cac3d6c4 4587 echo "$ac_t""no" 1>&6
859789af 4588fi
cac3d6c4 4589
05cbd757
PB
4590 fi
4591 test -n "$ac_cv_prog_OBJDUMP" && break
4592done
4593
4594if test -z "$ac_cv_prog_OBJDUMP" ; then
4595 set dummy objdump
4596 if test $build = $host ; then
4597 OBJDUMP="$2"
859789af 4598 else
05cbd757 4599 OBJDUMP="${ncn_tool_prefix}$2"
859789af 4600 fi
859789af
AC
4601fi
4602
a0da8069
NN
4603
4604
4605
4606
4607
4608
be01d343 4609# Target tools.
2429c060
PB
4610# Check whether --with-build-time-tools or --without-build-time-tools was given.
4611if test "${with_build_time_tools+set}" = set; then
4612 withval="$with_build_time_tools"
4613 case x"$withval" in
4614 x/*) ;;
4615 *)
4616 with_build_time_tools=
4617 echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
4618 ;;
4619 esac
859789af 4620else
2429c060 4621 with_build_time_tools=
859789af
AC
4622fi
4623
859789af 4624
2429c060
PB
4625 if test -n "$with_build_time_tools"; then
4626 for ncn_progname in cc gcc; do
4627 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 4628echo "configure:4629: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4629 if test -x $with_build_time_tools/${ncn_progname}; then
4630 ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060 4631 echo "$ac_t""yes" 1>&6
cac3d6c4 4632 break
2429c060
PB
4633 else
4634 echo "$ac_t""no" 1>&6
cac3d6c4
CM
4635 fi
4636 done
55db4b87
PB
4637fi
4638
2429c060
PB
4639if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
4640 for ncn_progname in cc gcc; do
4641 if test -n "$ncn_target_tool_prefix"; then
4642 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4643set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4644echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4645echo "configure:4646: checking for $ac_word" >&5
cac3d6c4
CM
4646if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4648else
4649 if test -n "$CC_FOR_TARGET"; then
4650 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4651else
cac3d6c4
CM
4652 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4653 ac_dummy="$PATH"
4654 for ac_dir in $ac_dummy; do
4655 test -z "$ac_dir" && ac_dir=.
4656 if test -f $ac_dir/$ac_word; then
4657 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4658 break
4659 fi
4660 done
4661 IFS="$ac_save_ifs"
55db4b87
PB
4662fi
4663fi
cac3d6c4 4664CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
55db4b87 4665if test -n "$CC_FOR_TARGET"; then
cac3d6c4 4666 echo "$ac_t""$CC_FOR_TARGET" 1>&6
55db4b87 4667else
cac3d6c4 4668 echo "$ac_t""no" 1>&6
55db4b87
PB
4669fi
4670
2429c060
PB
4671 fi
4672 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4673 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4674set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4675echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4676echo "configure:4677: checking for $ac_word" >&5
cac3d6c4
CM
4677if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4678 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4679else
05cbd757
PB
4680 if test -n "$CC_FOR_TARGET"; then
4681 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
55db4b87 4682else
cac3d6c4
CM
4683 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4684 ac_dummy="$PATH"
4685 for ac_dir in $ac_dummy; do
4686 test -z "$ac_dir" && ac_dir=.
4687 if test -f $ac_dir/$ac_word; then
4688 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
4689 break
4690 fi
4691 done
4692 IFS="$ac_save_ifs"
55db4b87
PB
4693fi
4694fi
cac3d6c4 4695CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
05cbd757 4696if test -n "$CC_FOR_TARGET"; then
cac3d6c4 4697 echo "$ac_t""$CC_FOR_TARGET" 1>&6
55db4b87 4698else
cac3d6c4 4699 echo "$ac_t""no" 1>&6
55db4b87 4700fi
cac3d6c4 4701
2429c060
PB
4702 fi
4703 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4704 done
4705fi
4706
05cbd757
PB
4707if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4708 set dummy cc gcc
4709 if test $build = $target ; then
4710 CC_FOR_TARGET="$2"
55db4b87 4711 else
05cbd757 4712 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4713 fi
55db4b87
PB
4714fi
4715
2429c060
PB
4716 if test -n "$with_build_time_tools"; then
4717 for ncn_progname in c++ g++ cxx gxx; do
4718 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 4719echo "configure:4720: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4720 if test -x $with_build_time_tools/${ncn_progname}; then
4721 ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4722 echo "$ac_t""yes" 1>&6
4723 break
4724 else
4725 echo "$ac_t""no" 1>&6
4726 fi
4727 done
4728fi
4729
4730if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
4731 for ncn_progname in c++ g++ cxx gxx; do
4732 if test -n "$ncn_target_tool_prefix"; then
4733 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4734set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4736echo "configure:4737: checking for $ac_word" >&5
cac3d6c4
CM
4737if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4738 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4739else
4740 if test -n "$CXX_FOR_TARGET"; then
4741 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4742else
cac3d6c4
CM
4743 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4744 ac_dummy="$PATH"
4745 for ac_dir in $ac_dummy; do
4746 test -z "$ac_dir" && ac_dir=.
4747 if test -f $ac_dir/$ac_word; then
4748 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4749 break
4750 fi
4751 done
4752 IFS="$ac_save_ifs"
55db4b87
PB
4753fi
4754fi
cac3d6c4 4755CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
55db4b87 4756if test -n "$CXX_FOR_TARGET"; then
cac3d6c4 4757 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
55db4b87 4758else
cac3d6c4 4759 echo "$ac_t""no" 1>&6
55db4b87
PB
4760fi
4761
2429c060
PB
4762 fi
4763 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4764 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4765set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4766echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4767echo "configure:4768: checking for $ac_word" >&5
cac3d6c4
CM
4768if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4769 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4770else
05cbd757
PB
4771 if test -n "$CXX_FOR_TARGET"; then
4772 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
55db4b87 4773else
cac3d6c4
CM
4774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4775 ac_dummy="$PATH"
4776 for ac_dir in $ac_dummy; do
4777 test -z "$ac_dir" && ac_dir=.
4778 if test -f $ac_dir/$ac_word; then
4779 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
4780 break
4781 fi
4782 done
4783 IFS="$ac_save_ifs"
55db4b87
PB
4784fi
4785fi
cac3d6c4 4786CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
05cbd757 4787if test -n "$CXX_FOR_TARGET"; then
cac3d6c4 4788 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
55db4b87 4789else
cac3d6c4 4790 echo "$ac_t""no" 1>&6
55db4b87 4791fi
cac3d6c4 4792
2429c060
PB
4793 fi
4794 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4795 done
4796fi
4797
05cbd757
PB
4798if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4799 set dummy c++ g++ cxx gxx
4800 if test $build = $target ; then
4801 CXX_FOR_TARGET="$2"
55db4b87 4802 else
05cbd757 4803 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4804 fi
859789af
AC
4805fi
4806
2429c060
PB
4807 if test -n "$with_build_time_tools"; then
4808 for ncn_progname in gcc; do
4809 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 4810echo "configure:4811: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4811 if test -x $with_build_time_tools/${ncn_progname}; then
4812 ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4813 echo "$ac_t""yes" 1>&6
4814 break
4815 else
4816 echo "$ac_t""no" 1>&6
4817 fi
4818 done
4819fi
4820
4821if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
4822 for ncn_progname in gcc; do
4823 if test -n "$ncn_target_tool_prefix"; then
4824 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4825set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4827echo "configure:4828: checking for $ac_word" >&5
2429c060 4828if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 4829 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4830else
2429c060
PB
4831 if test -n "$GCC_FOR_TARGET"; then
4832 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
55db4b87 4833else
cac3d6c4
CM
4834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4835 ac_dummy="$PATH"
4836 for ac_dir in $ac_dummy; do
4837 test -z "$ac_dir" && ac_dir=.
4838 if test -f $ac_dir/$ac_word; then
4839 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4840 break
4841 fi
4842 done
4843 IFS="$ac_save_ifs"
55db4b87
PB
4844fi
4845fi
cac3d6c4 4846GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
55db4b87 4847if test -n "$GCC_FOR_TARGET"; then
cac3d6c4 4848 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
55db4b87 4849else
cac3d6c4 4850 echo "$ac_t""no" 1>&6
55db4b87
PB
4851fi
4852
2429c060
PB
4853 fi
4854 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4855 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4856set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4857echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4858echo "configure:4859: checking for $ac_word" >&5
cac3d6c4
CM
4859if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4860 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4861else
05cbd757
PB
4862 if test -n "$GCC_FOR_TARGET"; then
4863 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
55db4b87 4864else
cac3d6c4
CM
4865 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4866 ac_dummy="$PATH"
4867 for ac_dir in $ac_dummy; do
4868 test -z "$ac_dir" && ac_dir=.
4869 if test -f $ac_dir/$ac_word; then
4870 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
4871 break
4872 fi
4873 done
4874 IFS="$ac_save_ifs"
55db4b87
PB
4875fi
4876fi
cac3d6c4 4877GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
05cbd757 4878if test -n "$GCC_FOR_TARGET"; then
cac3d6c4 4879 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
55db4b87 4880else
cac3d6c4 4881 echo "$ac_t""no" 1>&6
55db4b87 4882fi
cac3d6c4 4883
2429c060
PB
4884 fi
4885 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4886 done
4887fi
4888
05cbd757
PB
4889if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4890 GCC_FOR_TARGET="${CC_FOR_TARGET}"
55db4b87
PB
4891fi
4892
2429c060
PB
4893 if test -n "$with_build_time_tools"; then
4894 for ncn_progname in gcj; do
4895 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 4896echo "configure:4897: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4897 if test -x $with_build_time_tools/${ncn_progname}; then
4898 ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4899 echo "$ac_t""yes" 1>&6
4900 break
4901 else
4902 echo "$ac_t""no" 1>&6
4903 fi
4904 done
4905fi
4906
4907if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
4908 for ncn_progname in gcj; do
4909 if test -n "$ncn_target_tool_prefix"; then
4910 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4911set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4912echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4913echo "configure:4914: checking for $ac_word" >&5
cac3d6c4
CM
4914if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4915 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4916else
4917 if test -n "$GCJ_FOR_TARGET"; then
4918 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4919else
cac3d6c4
CM
4920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4921 ac_dummy="$PATH"
4922 for ac_dir in $ac_dummy; do
4923 test -z "$ac_dir" && ac_dir=.
4924 if test -f $ac_dir/$ac_word; then
4925 ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4926 break
4927 fi
4928 done
4929 IFS="$ac_save_ifs"
55db4b87
PB
4930fi
4931fi
cac3d6c4 4932GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
55db4b87 4933if test -n "$GCJ_FOR_TARGET"; then
cac3d6c4 4934 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
55db4b87 4935else
cac3d6c4 4936 echo "$ac_t""no" 1>&6
55db4b87
PB
4937fi
4938
2429c060
PB
4939 fi
4940 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4941 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4942set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4943echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 4944echo "configure:4945: checking for $ac_word" >&5
cac3d6c4
CM
4945if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4946 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4947else
05cbd757
PB
4948 if test -n "$GCJ_FOR_TARGET"; then
4949 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
55db4b87 4950else
cac3d6c4
CM
4951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4952 ac_dummy="$PATH"
4953 for ac_dir in $ac_dummy; do
4954 test -z "$ac_dir" && ac_dir=.
4955 if test -f $ac_dir/$ac_word; then
4956 ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
4957 break
4958 fi
4959 done
4960 IFS="$ac_save_ifs"
55db4b87
PB
4961fi
4962fi
cac3d6c4 4963GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
05cbd757 4964if test -n "$GCJ_FOR_TARGET"; then
cac3d6c4 4965 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
55db4b87 4966else
cac3d6c4 4967 echo "$ac_t""no" 1>&6
55db4b87 4968fi
cac3d6c4 4969
2429c060
PB
4970 fi
4971 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4972 done
4973fi
4974
05cbd757
PB
4975if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4976 set dummy gcj
4977 if test $build = $target ; then
4978 GCJ_FOR_TARGET="$2"
55db4b87 4979 else
05cbd757 4980 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4981 fi
55db4b87
PB
4982fi
4983
2429c060
PB
4984 if test -n "$with_build_time_tools"; then
4985 for ncn_progname in gfortran; do
4986 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 4987echo "configure:4988: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4988 if test -x $with_build_time_tools/${ncn_progname}; then
4989 ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4990 echo "$ac_t""yes" 1>&6
4991 break
4992 else
4993 echo "$ac_t""no" 1>&6
4994 fi
4995 done
4996fi
4997
4998if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
4999 for ncn_progname in gfortran; do
5000 if test -n "$ncn_target_tool_prefix"; then
5001 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 5002set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 5003echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5004echo "configure:5005: checking for $ac_word" >&5
cac3d6c4
CM
5005if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5006 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
5007else
5008 if test -n "$GFORTRAN_FOR_TARGET"; then
5009 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5010else
cac3d6c4
CM
5011 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5012 ac_dummy="$PATH"
5013 for ac_dir in $ac_dummy; do
5014 test -z "$ac_dir" && ac_dir=.
5015 if test -f $ac_dir/$ac_word; then
5016 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5017 break
5018 fi
5019 done
5020 IFS="$ac_save_ifs"
55db4b87
PB
5021fi
5022fi
cac3d6c4 5023GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
55db4b87 5024if test -n "$GFORTRAN_FOR_TARGET"; then
cac3d6c4 5025 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
55db4b87 5026else
cac3d6c4 5027 echo "$ac_t""no" 1>&6
55db4b87
PB
5028fi
5029
2429c060
PB
5030 fi
5031 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
5032 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 5033set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 5034echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5035echo "configure:5036: checking for $ac_word" >&5
cac3d6c4
CM
5036if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5037 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 5038else
05cbd757
PB
5039 if test -n "$GFORTRAN_FOR_TARGET"; then
5040 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
55db4b87 5041else
cac3d6c4
CM
5042 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5043 ac_dummy="$PATH"
5044 for ac_dir in $ac_dummy; do
5045 test -z "$ac_dir" && ac_dir=.
5046 if test -f $ac_dir/$ac_word; then
5047 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5048 break
5049 fi
5050 done
5051 IFS="$ac_save_ifs"
55db4b87
PB
5052fi
5053fi
cac3d6c4 5054GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
05cbd757 5055if test -n "$GFORTRAN_FOR_TARGET"; then
cac3d6c4 5056 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
55db4b87 5057else
cac3d6c4 5058 echo "$ac_t""no" 1>&6
55db4b87 5059fi
cac3d6c4 5060
2429c060
PB
5061 fi
5062 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5063 done
5064fi
5065
05cbd757
PB
5066if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5067 set dummy gfortran
5068 if test $build = $target ; then
5069 GFORTRAN_FOR_TARGET="$2"
55db4b87 5070 else
05cbd757 5071 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 5072 fi
859789af
AC
5073fi
5074
2429c060
PB
5075
5076
5077# The user is always right.
5078if test "${PATH_SEPARATOR+set}" != set; then
5079 echo "#! /bin/sh" >conf$$.sh
5080 echo "exit 0" >>conf$$.sh
5081 chmod +x conf$$.sh
5082 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5083 PATH_SEPARATOR=';'
5084 else
5085 PATH_SEPARATOR=:
5086 fi
5087 rm -f conf$$.sh
5088fi
5089
5090
5091
5092if test "x$exec_prefix" = xNONE; then
5093 if test "x$prefix" = xNONE; then
5094 gcc_cv_tool_prefix=$ac_default_prefix
5095 else
5096 gcc_cv_tool_prefix=$prefix
5097 fi
859789af 5098else
2429c060
PB
5099 gcc_cv_tool_prefix=$exec_prefix
5100fi
5101
5102# If there is no compiler in the tree, use the PATH only. In any
5103# case, if there is no compiler in the tree nobody should use
5104# AS_FOR_TARGET and LD_FOR_TARGET.
5105if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
5106 gcc_version=`cat $srcdir/gcc/BASE-VER`
5107 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5108 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
5109 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5110 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
5111 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5112 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
859789af 5113else
2429c060 5114 gcc_cv_tool_dirs=
859789af 5115fi
2429c060
PB
5116
5117if test x$build = x$target && test -n "$md_exec_prefix"; then
5118 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
859789af 5119fi
2429c060
PB
5120
5121
5122
5123cat > conftest.c << \EOF
5124#ifdef __GNUC__
5125 gcc_yay;
5126#endif
5127EOF
5128if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
5129 have_gcc_for_target=yes
859789af 5130else
2429c060
PB
5131 GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
5132 have_gcc_for_target=no
859789af 5133fi
2429c060
PB
5134rm conftest.c
5135
5136
5137
859789af 5138
2429c060
PB
5139if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5140 if test -n "$with_build_time_tools"; then
3a35eeb3 5141 echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5142echo "configure:5143: checking for ar in $with_build_time_tools" >&5
3a35eeb3
PB
5143 if test -x $with_build_time_tools/ar; then
5144 AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
5145 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5146 echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
5147 else
5148 echo "$ac_t""no" 1>&6
5149 fi
2429c060
PB
5150 elif test $build != $host && test $have_gcc_for_target = yes; then
5151 AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
5152 test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
5153 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
05cbd757 5154 fi
2429c060
PB
5155fi
5156if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5157 # Extract the first word of "ar", so it can be a program name with args.
5158set dummy ar; ac_word=$2
cac3d6c4 5159echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5160echo "configure:5161: checking for $ac_word" >&5
2429c060 5161if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5162 echo $ac_n "(cached) $ac_c" 1>&6
859789af 5163else
2429c060
PB
5164 case "$AR_FOR_TARGET" in
5165 /*)
5166 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
5167 ;;
5168 ?:/*)
5169 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
5170 ;;
5171 *)
cac3d6c4 5172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2429c060
PB
5173 ac_dummy="$gcc_cv_tool_dirs"
5174 for ac_dir in $ac_dummy; do
cac3d6c4
CM
5175 test -z "$ac_dir" && ac_dir=.
5176 if test -f $ac_dir/$ac_word; then
2429c060 5177 ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
cac3d6c4
CM
5178 break
5179 fi
5180 done
5181 IFS="$ac_save_ifs"
2429c060
PB
5182 ;;
5183esac
859789af 5184fi
2429c060
PB
5185AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
5186if test -n "$AR_FOR_TARGET"; then
5187 echo "$ac_t""$AR_FOR_TARGET" 1>&6
859789af 5188else
cac3d6c4 5189 echo "$ac_t""no" 1>&6
859789af 5190fi
05cbd757 5191
2429c060
PB
5192fi
5193if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5194 if test -n "$with_build_time_tools"; then
5195 for ncn_progname in ar; do
5196 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5197echo "configure:5198: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5198 if test -x $with_build_time_tools/${ncn_progname}; then
5199 ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5200 echo "$ac_t""yes" 1>&6
5201 break
5202 else
5203 echo "$ac_t""no" 1>&6
5204 fi
5205 done
859789af
AC
5206fi
5207
2429c060
PB
5208if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
5209 for ncn_progname in ar; do
5210 if test -n "$ncn_target_tool_prefix"; then
5211 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 5212set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 5213echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5214echo "configure:5215: checking for $ac_word" >&5
2429c060 5215if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5216 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140 5217else
2429c060
PB
5218 if test -n "$AR_FOR_TARGET"; then
5219 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
7e0f7140 5220else
cac3d6c4
CM
5221 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5222 ac_dummy="$PATH"
5223 for ac_dir in $ac_dummy; do
5224 test -z "$ac_dir" && ac_dir=.
5225 if test -f $ac_dir/$ac_word; then
2429c060 5226 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
cac3d6c4
CM
5227 break
5228 fi
5229 done
5230 IFS="$ac_save_ifs"
7e0f7140
GK
5231fi
5232fi
2429c060
PB
5233AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5234if test -n "$AR_FOR_TARGET"; then
5235 echo "$ac_t""$AR_FOR_TARGET" 1>&6
7e0f7140 5236else
cac3d6c4 5237 echo "$ac_t""no" 1>&6
7e0f7140
GK
5238fi
5239
2429c060
PB
5240 fi
5241 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
5242 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
7e0f7140 5243set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 5244echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5245echo "configure:5246: checking for $ac_word" >&5
2429c060 5246if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5247 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140 5248else
2429c060
PB
5249 if test -n "$AR_FOR_TARGET"; then
5250 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
cac3d6c4
CM
5251else
5252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5253 ac_dummy="$PATH"
5254 for ac_dir in $ac_dummy; do
5255 test -z "$ac_dir" && ac_dir=.
5256 if test -f $ac_dir/$ac_word; then
2429c060 5257 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
cac3d6c4
CM
5258 break
5259 fi
5260 done
5261 IFS="$ac_save_ifs"
7e0f7140
GK
5262fi
5263fi
2429c060
PB
5264AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5265if test -n "$AR_FOR_TARGET"; then
5266 echo "$ac_t""$AR_FOR_TARGET" 1>&6
7e0f7140 5267else
cac3d6c4 5268 echo "$ac_t""no" 1>&6
7e0f7140 5269fi
cac3d6c4 5270
2429c060
PB
5271 fi
5272 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
5273 done
5274fi
5275
5276if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
5277 set dummy ar
7e0f7140 5278 if test $build = $target ; then
2429c060 5279 AR_FOR_TARGET="$2"
7e0f7140 5280 else
2429c060 5281 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
7e0f7140
GK
5282 fi
5283fi
5284
3a35eeb3
PB
5285else
5286 AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
2429c060
PB
5287fi
5288
5289
5290
5291
5292if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5293 if test -n "$with_build_time_tools"; then
3a35eeb3 5294 echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5295echo "configure:5296: checking for as in $with_build_time_tools" >&5
3a35eeb3
PB
5296 if test -x $with_build_time_tools/as; then
5297 AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
5298 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5299 echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
5300 else
5301 echo "$ac_t""no" 1>&6
5302 fi
2429c060
PB
5303 elif test $build != $host && test $have_gcc_for_target = yes; then
5304 AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
5305 test $AS_FOR_TARGET=as && AS_FOR_TARGET=
5306 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5307 fi
5308fi
5309if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5310 # Extract the first word of "as", so it can be a program name with args.
5311set dummy as; ac_word=$2
5312echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5313echo "configure:5314: checking for $ac_word" >&5
2429c060
PB
5314if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5316else
5317 case "$AS_FOR_TARGET" in
5318 /*)
5319 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
5320 ;;
5321 ?:/*)
5322 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
5323 ;;
5324 *)
5325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5326 ac_dummy="$gcc_cv_tool_dirs"
5327 for ac_dir in $ac_dummy; do
5328 test -z "$ac_dir" && ac_dir=.
5329 if test -f $ac_dir/$ac_word; then
5330 ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
5331 break
5332 fi
5333 done
5334 IFS="$ac_save_ifs"
5335 ;;
5336esac
5337fi
5338AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
5339if test -n "$AS_FOR_TARGET"; then
5340 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5341else
5342 echo "$ac_t""no" 1>&6
5343fi
5344
5345fi
5346if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5347 if test -n "$with_build_time_tools"; then
5348 for ncn_progname in as; do
5349 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5350echo "configure:5351: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5351 if test -x $with_build_time_tools/${ncn_progname}; then
5352 ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5353 echo "$ac_t""yes" 1>&6
5354 break
5355 else
5356 echo "$ac_t""no" 1>&6
5357 fi
5358 done
5359fi
5360
5361if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
5362 for ncn_progname in as; do
5363 if test -n "$ncn_target_tool_prefix"; then
5364 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5365set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5366echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5367echo "configure:5368: checking for $ac_word" >&5
2429c060
PB
5368if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5369 echo $ac_n "(cached) $ac_c" 1>&6
5370else
5371 if test -n "$AS_FOR_TARGET"; then
5372 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5373else
5374 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5375 ac_dummy="$PATH"
5376 for ac_dir in $ac_dummy; do
5377 test -z "$ac_dir" && ac_dir=.
5378 if test -f $ac_dir/$ac_word; then
5379 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5380 break
5381 fi
5382 done
5383 IFS="$ac_save_ifs"
5384fi
5385fi
5386AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5387if test -n "$AS_FOR_TARGET"; then
5388 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5389else
5390 echo "$ac_t""no" 1>&6
5391fi
5392
5393 fi
5394 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
5395 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5396set dummy ${ncn_progname}; ac_word=$2
5397echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5398echo "configure:5399: checking for $ac_word" >&5
2429c060
PB
5399if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5400 echo $ac_n "(cached) $ac_c" 1>&6
5401else
5402 if test -n "$AS_FOR_TARGET"; then
5403 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5404else
5405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5406 ac_dummy="$PATH"
5407 for ac_dir in $ac_dummy; do
5408 test -z "$ac_dir" && ac_dir=.
5409 if test -f $ac_dir/$ac_word; then
5410 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
5411 break
5412 fi
5413 done
5414 IFS="$ac_save_ifs"
5415fi
5416fi
5417AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5418if test -n "$AS_FOR_TARGET"; then
5419 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5420else
5421 echo "$ac_t""no" 1>&6
5422fi
5423
5424 fi
5425 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
5426 done
5427fi
5428
5429if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
5430 set dummy as
5431 if test $build = $target ; then
5432 AS_FOR_TARGET="$2"
5433 else
5434 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
5435 fi
5436fi
5437
3a35eeb3
PB
5438else
5439 AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
2429c060
PB
5440fi
5441
5442
5443
5444
5445if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5446 if test -n "$with_build_time_tools"; then
3a35eeb3 5447 echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5448echo "configure:5449: checking for dlltool in $with_build_time_tools" >&5
3a35eeb3
PB
5449 if test -x $with_build_time_tools/dlltool; then
5450 DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
5451 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5452 echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
5453 else
5454 echo "$ac_t""no" 1>&6
5455 fi
2429c060
PB
5456 elif test $build != $host && test $have_gcc_for_target = yes; then
5457 DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
5458 test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
5459 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5460 fi
5461fi
5462if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5463 # Extract the first word of "dlltool", so it can be a program name with args.
5464set dummy dlltool; ac_word=$2
5465echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5466echo "configure:5467: checking for $ac_word" >&5
2429c060
PB
5467if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5468 echo $ac_n "(cached) $ac_c" 1>&6
5469else
5470 case "$DLLTOOL_FOR_TARGET" in
5471 /*)
5472 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
5473 ;;
5474 ?:/*)
5475 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
5476 ;;
5477 *)
5478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5479 ac_dummy="$gcc_cv_tool_dirs"
5480 for ac_dir in $ac_dummy; do
5481 test -z "$ac_dir" && ac_dir=.
5482 if test -f $ac_dir/$ac_word; then
5483 ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word"
5484 break
5485 fi
5486 done
5487 IFS="$ac_save_ifs"
5488 ;;
5489esac
5490fi
5491DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
5492if test -n "$DLLTOOL_FOR_TARGET"; then
5493 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5494else
5495 echo "$ac_t""no" 1>&6
5496fi
5497
5498fi
5499if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5500 if test -n "$with_build_time_tools"; then
5501 for ncn_progname in dlltool; do
5502 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5503echo "configure:5504: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5504 if test -x $with_build_time_tools/${ncn_progname}; then
5505 ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5506 echo "$ac_t""yes" 1>&6
5507 break
5508 else
5509 echo "$ac_t""no" 1>&6
5510 fi
5511 done
5512fi
5513
5514if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
5515 for ncn_progname in dlltool; do
5516 if test -n "$ncn_target_tool_prefix"; then
5517 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5518set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5519echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5520echo "configure:5521: checking for $ac_word" >&5
2429c060
PB
5521if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5522 echo $ac_n "(cached) $ac_c" 1>&6
5523else
5524 if test -n "$DLLTOOL_FOR_TARGET"; then
5525 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5526else
5527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5528 ac_dummy="$PATH"
5529 for ac_dir in $ac_dummy; do
5530 test -z "$ac_dir" && ac_dir=.
5531 if test -f $ac_dir/$ac_word; then
5532 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5533 break
5534 fi
5535 done
5536 IFS="$ac_save_ifs"
5537fi
5538fi
5539DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5540if test -n "$DLLTOOL_FOR_TARGET"; then
5541 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5542else
5543 echo "$ac_t""no" 1>&6
5544fi
5545
5546 fi
5547 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
5548 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5549set dummy ${ncn_progname}; ac_word=$2
5550echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5551echo "configure:5552: checking for $ac_word" >&5
2429c060
PB
5552if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5553 echo $ac_n "(cached) $ac_c" 1>&6
5554else
5555 if test -n "$DLLTOOL_FOR_TARGET"; then
5556 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5557else
5558 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5559 ac_dummy="$PATH"
5560 for ac_dir in $ac_dummy; do
5561 test -z "$ac_dir" && ac_dir=.
5562 if test -f $ac_dir/$ac_word; then
5563 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
5564 break
5565 fi
5566 done
5567 IFS="$ac_save_ifs"
5568fi
5569fi
5570DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5571if test -n "$DLLTOOL_FOR_TARGET"; then
5572 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5573else
5574 echo "$ac_t""no" 1>&6
5575fi
5576
5577 fi
5578 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
5579 done
5580fi
5581
5582if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
5583 set dummy dlltool
5584 if test $build = $target ; then
5585 DLLTOOL_FOR_TARGET="$2"
5586 else
5587 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
5588 fi
5589fi
5590
3a35eeb3
PB
5591else
5592 DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
2429c060
PB
5593fi
5594
5595
5596
5597
5598if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5599 if test -n "$with_build_time_tools"; then
3a35eeb3 5600 echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5601echo "configure:5602: checking for ld in $with_build_time_tools" >&5
3a35eeb3
PB
5602 if test -x $with_build_time_tools/ld; then
5603 LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
5604 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5605 echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
5606 else
5607 echo "$ac_t""no" 1>&6
5608 fi
2429c060
PB
5609 elif test $build != $host && test $have_gcc_for_target = yes; then
5610 LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
5611 test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
5612 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5613 fi
5614fi
5615if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5616 # Extract the first word of "ld", so it can be a program name with args.
5617set dummy ld; ac_word=$2
5618echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5619echo "configure:5620: checking for $ac_word" >&5
2429c060
PB
5620if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5622else
5623 case "$LD_FOR_TARGET" in
5624 /*)
5625 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
5626 ;;
5627 ?:/*)
5628 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
5629 ;;
5630 *)
5631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5632 ac_dummy="$gcc_cv_tool_dirs"
5633 for ac_dir in $ac_dummy; do
5634 test -z "$ac_dir" && ac_dir=.
5635 if test -f $ac_dir/$ac_word; then
5636 ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
5637 break
5638 fi
5639 done
5640 IFS="$ac_save_ifs"
5641 ;;
5642esac
5643fi
5644LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
5645if test -n "$LD_FOR_TARGET"; then
5646 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5647else
5648 echo "$ac_t""no" 1>&6
5649fi
5650
5651fi
5652if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5653 if test -n "$with_build_time_tools"; then
5654 for ncn_progname in ld; do
5655 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5656echo "configure:5657: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5657 if test -x $with_build_time_tools/${ncn_progname}; then
5658 ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5659 echo "$ac_t""yes" 1>&6
5660 break
5661 else
5662 echo "$ac_t""no" 1>&6
5663 fi
5664 done
5665fi
5666
5667if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
5668 for ncn_progname in ld; do
5669 if test -n "$ncn_target_tool_prefix"; then
5670 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5671set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5673echo "configure:5674: checking for $ac_word" >&5
2429c060
PB
5674if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5675 echo $ac_n "(cached) $ac_c" 1>&6
5676else
5677 if test -n "$LD_FOR_TARGET"; then
5678 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5679else
5680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5681 ac_dummy="$PATH"
5682 for ac_dir in $ac_dummy; do
5683 test -z "$ac_dir" && ac_dir=.
5684 if test -f $ac_dir/$ac_word; then
5685 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5686 break
5687 fi
5688 done
5689 IFS="$ac_save_ifs"
5690fi
5691fi
5692LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5693if test -n "$LD_FOR_TARGET"; then
5694 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5695else
5696 echo "$ac_t""no" 1>&6
5697fi
5698
5699 fi
5700 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
5701 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5702set dummy ${ncn_progname}; ac_word=$2
5703echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5704echo "configure:5705: checking for $ac_word" >&5
2429c060
PB
5705if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5706 echo $ac_n "(cached) $ac_c" 1>&6
5707else
5708 if test -n "$LD_FOR_TARGET"; then
5709 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5710else
5711 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5712 ac_dummy="$PATH"
5713 for ac_dir in $ac_dummy; do
5714 test -z "$ac_dir" && ac_dir=.
5715 if test -f $ac_dir/$ac_word; then
5716 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5717 break
5718 fi
5719 done
5720 IFS="$ac_save_ifs"
5721fi
5722fi
5723LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5724if test -n "$LD_FOR_TARGET"; then
5725 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5726else
5727 echo "$ac_t""no" 1>&6
5728fi
5729
5730 fi
5731 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5732 done
5733fi
5734
5735if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
5736 set dummy ld
5737 if test $build = $target ; then
5738 LD_FOR_TARGET="$2"
5739 else
5740 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
5741 fi
5742fi
5743
3a35eeb3
PB
5744else
5745 LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
2429c060
PB
5746fi
5747
5748
5749
5750
5751if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5752 if test -n "$with_build_time_tools"; then
3a35eeb3 5753 echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5754echo "configure:5755: checking for lipo in $with_build_time_tools" >&5
3a35eeb3
PB
5755 if test -x $with_build_time_tools/lipo; then
5756 LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
5757 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5758 echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
5759 else
5760 echo "$ac_t""no" 1>&6
5761 fi
2429c060
PB
5762 elif test $build != $host && test $have_gcc_for_target = yes; then
5763 LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
5764 test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
5765 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5766 fi
5767fi
5768if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5769 # Extract the first word of "lipo", so it can be a program name with args.
5770set dummy lipo; ac_word=$2
5771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5772echo "configure:5773: checking for $ac_word" >&5
2429c060
PB
5773if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
5774 echo $ac_n "(cached) $ac_c" 1>&6
5775else
5776 case "$LIPO_FOR_TARGET" in
5777 /*)
5778 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
5779 ;;
5780 ?:/*)
5781 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
5782 ;;
5783 *)
5784 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5785 ac_dummy="$gcc_cv_tool_dirs"
5786 for ac_dir in $ac_dummy; do
5787 test -z "$ac_dir" && ac_dir=.
5788 if test -f $ac_dir/$ac_word; then
5789 ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word"
5790 break
5791 fi
5792 done
5793 IFS="$ac_save_ifs"
5794 ;;
5795esac
5796fi
5797LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
5798if test -n "$LIPO_FOR_TARGET"; then
5799 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5800else
5801 echo "$ac_t""no" 1>&6
5802fi
5803
5804fi
5805if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5806 if test -n "$with_build_time_tools"; then
5807 for ncn_progname in lipo; do
5808 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5809echo "configure:5810: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5810 if test -x $with_build_time_tools/${ncn_progname}; then
5811 ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5812 echo "$ac_t""yes" 1>&6
5813 break
5814 else
5815 echo "$ac_t""no" 1>&6
5816 fi
5817 done
5818fi
5819
5820if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
5821 for ncn_progname in lipo; do
5822 if test -n "$ncn_target_tool_prefix"; then
5823 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5824set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5825echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5826echo "configure:5827: checking for $ac_word" >&5
2429c060
PB
5827if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5828 echo $ac_n "(cached) $ac_c" 1>&6
5829else
5830 if test -n "$LIPO_FOR_TARGET"; then
5831 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5832else
5833 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5834 ac_dummy="$PATH"
5835 for ac_dir in $ac_dummy; do
5836 test -z "$ac_dir" && ac_dir=.
5837 if test -f $ac_dir/$ac_word; then
5838 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5839 break
5840 fi
5841 done
5842 IFS="$ac_save_ifs"
5843fi
5844fi
5845LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5846if test -n "$LIPO_FOR_TARGET"; then
5847 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5848else
5849 echo "$ac_t""no" 1>&6
5850fi
5851
5852 fi
5853 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
5854 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5855set dummy ${ncn_progname}; ac_word=$2
5856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5857echo "configure:5858: checking for $ac_word" >&5
2429c060
PB
5858if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5859 echo $ac_n "(cached) $ac_c" 1>&6
5860else
5861 if test -n "$LIPO_FOR_TARGET"; then
5862 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5863else
5864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5865 ac_dummy="$PATH"
5866 for ac_dir in $ac_dummy; do
5867 test -z "$ac_dir" && ac_dir=.
5868 if test -f $ac_dir/$ac_word; then
5869 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5870 break
5871 fi
5872 done
5873 IFS="$ac_save_ifs"
5874fi
5875fi
5876LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5877if test -n "$LIPO_FOR_TARGET"; then
5878 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5879else
5880 echo "$ac_t""no" 1>&6
5881fi
5882
5883 fi
5884 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5885 done
5886fi
5887
5888if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
5889 set dummy lipo
5890 if test $build = $target ; then
5891 LIPO_FOR_TARGET="$2"
5892 else
5893 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
5894 fi
5895fi
5896
3a35eeb3
PB
5897else
5898 LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
2429c060
PB
5899fi
5900
5901
5902
5903
5904if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5905 if test -n "$with_build_time_tools"; then
3a35eeb3 5906 echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5907echo "configure:5908: checking for nm in $with_build_time_tools" >&5
3a35eeb3
PB
5908 if test -x $with_build_time_tools/nm; then
5909 NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
5910 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5911 echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
5912 else
5913 echo "$ac_t""no" 1>&6
5914 fi
2429c060
PB
5915 elif test $build != $host && test $have_gcc_for_target = yes; then
5916 NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
5917 test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
5918 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5919 fi
5920fi
5921if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5922 # Extract the first word of "nm", so it can be a program name with args.
5923set dummy nm; ac_word=$2
5924echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5925echo "configure:5926: checking for $ac_word" >&5
2429c060
PB
5926if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
5927 echo $ac_n "(cached) $ac_c" 1>&6
5928else
5929 case "$NM_FOR_TARGET" in
5930 /*)
5931 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
5932 ;;
5933 ?:/*)
5934 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
5935 ;;
5936 *)
5937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5938 ac_dummy="$gcc_cv_tool_dirs"
5939 for ac_dir in $ac_dummy; do
5940 test -z "$ac_dir" && ac_dir=.
5941 if test -f $ac_dir/$ac_word; then
5942 ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
5943 break
5944 fi
5945 done
5946 IFS="$ac_save_ifs"
5947 ;;
5948esac
5949fi
5950NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
5951if test -n "$NM_FOR_TARGET"; then
5952 echo "$ac_t""$NM_FOR_TARGET" 1>&6
5953else
5954 echo "$ac_t""no" 1>&6
5955fi
5956
5957fi
5958if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5959 if test -n "$with_build_time_tools"; then
5960 for ncn_progname in nm; do
5961 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 5962echo "configure:5963: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5963 if test -x $with_build_time_tools/${ncn_progname}; then
5964 ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5965 echo "$ac_t""yes" 1>&6
5966 break
5967 else
5968 echo "$ac_t""no" 1>&6
5969 fi
5970 done
5971fi
5972
5973if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
5974 for ncn_progname in nm; do
5975 if test -n "$ncn_target_tool_prefix"; then
5976 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
7e0f7140 5977set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 5978echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 5979echo "configure:5980: checking for $ac_word" >&5
cac3d6c4
CM
5980if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5981 echo $ac_n "(cached) $ac_c" 1>&6
859789af 5982else
55db4b87
PB
5983 if test -n "$NM_FOR_TARGET"; then
5984 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af 5985else
cac3d6c4
CM
5986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5987 ac_dummy="$PATH"
5988 for ac_dir in $ac_dummy; do
5989 test -z "$ac_dir" && ac_dir=.
5990 if test -f $ac_dir/$ac_word; then
5991 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5992 break
5993 fi
5994 done
5995 IFS="$ac_save_ifs"
859789af
AC
5996fi
5997fi
cac3d6c4 5998NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
55db4b87 5999if test -n "$NM_FOR_TARGET"; then
cac3d6c4 6000 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af 6001else
cac3d6c4 6002 echo "$ac_t""no" 1>&6
859789af
AC
6003fi
6004
2429c060
PB
6005 fi
6006 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
6007 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6008set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6009echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6010echo "configure:6011: checking for $ac_word" >&5
cac3d6c4
CM
6011if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
6012 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6013else
05cbd757
PB
6014 if test -n "$NM_FOR_TARGET"; then
6015 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af 6016else
cac3d6c4
CM
6017 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6018 ac_dummy="$PATH"
6019 for ac_dir in $ac_dummy; do
6020 test -z "$ac_dir" && ac_dir=.
6021 if test -f $ac_dir/$ac_word; then
6022 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
6023 break
6024 fi
6025 done
6026 IFS="$ac_save_ifs"
859789af
AC
6027fi
6028fi
cac3d6c4 6029NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
05cbd757 6030if test -n "$NM_FOR_TARGET"; then
cac3d6c4 6031 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af 6032else
cac3d6c4 6033 echo "$ac_t""no" 1>&6
859789af 6034fi
cac3d6c4 6035
2429c060
PB
6036 fi
6037 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
6038 done
6039fi
6040
05cbd757
PB
6041if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
6042 set dummy nm
6043 if test $build = $target ; then
6044 NM_FOR_TARGET="$2"
859789af 6045 else
05cbd757 6046 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6047 fi
859789af
AC
6048fi
6049
3a35eeb3
PB
6050else
6051 NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
2429c060
PB
6052fi
6053
6054
6055
6056
6057if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6058 if test -n "$with_build_time_tools"; then
3a35eeb3 6059 echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6060echo "configure:6061: checking for objdump in $with_build_time_tools" >&5
3a35eeb3
PB
6061 if test -x $with_build_time_tools/objdump; then
6062 OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
6063 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6064 echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
6065 else
6066 echo "$ac_t""no" 1>&6
6067 fi
2429c060
PB
6068 elif test $build != $host && test $have_gcc_for_target = yes; then
6069 OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
6070 test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
6071 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6072 fi
6073fi
6074if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6075 # Extract the first word of "objdump", so it can be a program name with args.
6076set dummy objdump; ac_word=$2
6077echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6078echo "configure:6079: checking for $ac_word" >&5
2429c060
PB
6079if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6080 echo $ac_n "(cached) $ac_c" 1>&6
6081else
6082 case "$OBJDUMP_FOR_TARGET" in
6083 /*)
6084 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
6085 ;;
6086 ?:/*)
6087 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
6088 ;;
6089 *)
6090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6091 ac_dummy="$gcc_cv_tool_dirs"
6092 for ac_dir in $ac_dummy; do
6093 test -z "$ac_dir" && ac_dir=.
6094 if test -f $ac_dir/$ac_word; then
6095 ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word"
6096 break
6097 fi
6098 done
6099 IFS="$ac_save_ifs"
6100 ;;
6101esac
6102fi
6103OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
6104if test -n "$OBJDUMP_FOR_TARGET"; then
6105 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6106else
6107 echo "$ac_t""no" 1>&6
6108fi
6109
6110fi
6111if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6112 if test -n "$with_build_time_tools"; then
6113 for ncn_progname in objdump; do
6114 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6115echo "configure:6116: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6116 if test -x $with_build_time_tools/${ncn_progname}; then
6117 ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6118 echo "$ac_t""yes" 1>&6
6119 break
6120 else
6121 echo "$ac_t""no" 1>&6
6122 fi
6123 done
6124fi
6125
6126if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
6127 for ncn_progname in objdump; do
6128 if test -n "$ncn_target_tool_prefix"; then
6129 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 6130set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6131echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6132echo "configure:6133: checking for $ac_word" >&5
5ae72758
DJ
6133if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6134 echo $ac_n "(cached) $ac_c" 1>&6
6135else
6136 if test -n "$OBJDUMP_FOR_TARGET"; then
6137 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6138else
6139 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6140 ac_dummy="$PATH"
6141 for ac_dir in $ac_dummy; do
6142 test -z "$ac_dir" && ac_dir=.
6143 if test -f $ac_dir/$ac_word; then
6144 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6145 break
6146 fi
6147 done
6148 IFS="$ac_save_ifs"
6149fi
6150fi
6151OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6152if test -n "$OBJDUMP_FOR_TARGET"; then
6153 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6154else
6155 echo "$ac_t""no" 1>&6
6156fi
6157
2429c060
PB
6158 fi
6159 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
6160 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5ae72758
DJ
6161set dummy ${ncn_progname}; ac_word=$2
6162echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6163echo "configure:6164: checking for $ac_word" >&5
5ae72758
DJ
6164if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6165 echo $ac_n "(cached) $ac_c" 1>&6
6166else
6167 if test -n "$OBJDUMP_FOR_TARGET"; then
6168 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6169else
6170 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6171 ac_dummy="$PATH"
6172 for ac_dir in $ac_dummy; do
6173 test -z "$ac_dir" && ac_dir=.
6174 if test -f $ac_dir/$ac_word; then
6175 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
6176 break
6177 fi
6178 done
6179 IFS="$ac_save_ifs"
6180fi
6181fi
6182OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6183if test -n "$OBJDUMP_FOR_TARGET"; then
6184 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6185else
6186 echo "$ac_t""no" 1>&6
6187fi
6188
2429c060
PB
6189 fi
6190 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
6191 done
6192fi
6193
5ae72758
DJ
6194if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
6195 set dummy objdump
6196 if test $build = $target ; then
6197 OBJDUMP_FOR_TARGET="$2"
6198 else
6199 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6200 fi
6201fi
6202
3a35eeb3
PB
6203else
6204 OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
2429c060
PB
6205fi
6206
6207
6208
6209
6210if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6211 if test -n "$with_build_time_tools"; then
3a35eeb3 6212 echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6213echo "configure:6214: checking for ranlib in $with_build_time_tools" >&5
3a35eeb3
PB
6214 if test -x $with_build_time_tools/ranlib; then
6215 RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
6216 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6217 echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
6218 else
6219 echo "$ac_t""no" 1>&6
6220 fi
2429c060
PB
6221 elif test $build != $host && test $have_gcc_for_target = yes; then
6222 RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
6223 test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
6224 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6225 fi
6226fi
6227if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6228 # Extract the first word of "ranlib", so it can be a program name with args.
6229set dummy ranlib; ac_word=$2
6230echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6231echo "configure:6232: checking for $ac_word" >&5
2429c060
PB
6232if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6233 echo $ac_n "(cached) $ac_c" 1>&6
6234else
6235 case "$RANLIB_FOR_TARGET" in
6236 /*)
6237 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
6238 ;;
6239 ?:/*)
6240 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
6241 ;;
6242 *)
6243 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6244 ac_dummy="$gcc_cv_tool_dirs"
6245 for ac_dir in $ac_dummy; do
6246 test -z "$ac_dir" && ac_dir=.
6247 if test -f $ac_dir/$ac_word; then
6248 ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
6249 break
6250 fi
6251 done
6252 IFS="$ac_save_ifs"
6253 ;;
6254esac
6255fi
6256RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
6257if test -n "$RANLIB_FOR_TARGET"; then
6258 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6259else
6260 echo "$ac_t""no" 1>&6
6261fi
6262
6263fi
6264if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6265 if test -n "$with_build_time_tools"; then
6266 for ncn_progname in ranlib; do
6267 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6268echo "configure:6269: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6269 if test -x $with_build_time_tools/${ncn_progname}; then
6270 ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6271 echo "$ac_t""yes" 1>&6
6272 break
6273 else
6274 echo "$ac_t""no" 1>&6
6275 fi
6276 done
6277fi
6278
6279if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
6280 for ncn_progname in ranlib; do
6281 if test -n "$ncn_target_tool_prefix"; then
6282 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5ae72758
DJ
6283set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6284echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6285echo "configure:6286: checking for $ac_word" >&5
cac3d6c4
CM
6286if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6287 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6288else
55db4b87
PB
6289 if test -n "$RANLIB_FOR_TARGET"; then
6290 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af 6291else
cac3d6c4
CM
6292 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6293 ac_dummy="$PATH"
6294 for ac_dir in $ac_dummy; do
6295 test -z "$ac_dir" && ac_dir=.
6296 if test -f $ac_dir/$ac_word; then
6297 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6298 break
6299 fi
6300 done
6301 IFS="$ac_save_ifs"
859789af
AC
6302fi
6303fi
cac3d6c4 6304RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
55db4b87 6305if test -n "$RANLIB_FOR_TARGET"; then
cac3d6c4 6306 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af 6307else
cac3d6c4 6308 echo "$ac_t""no" 1>&6
859789af
AC
6309fi
6310
2429c060
PB
6311 fi
6312 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
6313 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6314set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6315echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6316echo "configure:6317: checking for $ac_word" >&5
cac3d6c4
CM
6317if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6318 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6319else
05cbd757
PB
6320 if test -n "$RANLIB_FOR_TARGET"; then
6321 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af 6322else
cac3d6c4
CM
6323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6324 ac_dummy="$PATH"
6325 for ac_dir in $ac_dummy; do
6326 test -z "$ac_dir" && ac_dir=.
6327 if test -f $ac_dir/$ac_word; then
6328 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
6329 break
6330 fi
6331 done
6332 IFS="$ac_save_ifs"
859789af
AC
6333fi
6334fi
cac3d6c4 6335RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
05cbd757 6336if test -n "$RANLIB_FOR_TARGET"; then
cac3d6c4 6337 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af 6338else
cac3d6c4 6339 echo "$ac_t""no" 1>&6
859789af 6340fi
cac3d6c4 6341
2429c060
PB
6342 fi
6343 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
6344 done
6345fi
6346
6347if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
6348 set dummy ranlib
6349 if test $build = $target ; then
6350 RANLIB_FOR_TARGET="$2"
6351 else
6352 RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6353 fi
2429c060 6354fi
05cbd757 6355
3a35eeb3
PB
6356else
6357 RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
859789af
AC
6358fi
6359
2429c060
PB
6360
6361
6362
6363if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6364 if test -n "$with_build_time_tools"; then
3a35eeb3 6365 echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6366echo "configure:6367: checking for strip in $with_build_time_tools" >&5
3a35eeb3
PB
6367 if test -x $with_build_time_tools/strip; then
6368 STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
6369 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6370 echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
6371 else
6372 echo "$ac_t""no" 1>&6
6373 fi
2429c060
PB
6374 elif test $build != $host && test $have_gcc_for_target = yes; then
6375 STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
6376 test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
6377 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6378 fi
6379fi
6380if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6381 # Extract the first word of "strip", so it can be a program name with args.
6382set dummy strip; ac_word=$2
6383echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6384echo "configure:6385: checking for $ac_word" >&5
2429c060
PB
6385if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
6386 echo $ac_n "(cached) $ac_c" 1>&6
6387else
6388 case "$STRIP_FOR_TARGET" in
6389 /*)
6390 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
6391 ;;
6392 ?:/*)
6393 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
6394 ;;
6395 *)
6396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6397 ac_dummy="$gcc_cv_tool_dirs"
6398 for ac_dir in $ac_dummy; do
6399 test -z "$ac_dir" && ac_dir=.
6400 if test -f $ac_dir/$ac_word; then
6401 ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
6402 break
6403 fi
6404 done
6405 IFS="$ac_save_ifs"
6406 ;;
6407esac
6408fi
6409STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
6410if test -n "$STRIP_FOR_TARGET"; then
6411 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6412else
6413 echo "$ac_t""no" 1>&6
6414fi
6415
6416fi
6417if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6418 if test -n "$with_build_time_tools"; then
6419 for ncn_progname in strip; do
6420 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6421echo "configure:6422: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6422 if test -x $with_build_time_tools/${ncn_progname}; then
6423 ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6424 echo "$ac_t""yes" 1>&6
6425 break
6426 else
6427 echo "$ac_t""no" 1>&6
6428 fi
6429 done
6430fi
6431
6432if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
6433 for ncn_progname in strip; do
6434 if test -n "$ncn_target_tool_prefix"; then
6435 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
7e0f7140 6436set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6437echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6438echo "configure:6439: checking for $ac_word" >&5
cac3d6c4
CM
6439if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6440 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140
GK
6441else
6442 if test -n "$STRIP_FOR_TARGET"; then
6443 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6444else
cac3d6c4
CM
6445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6446 ac_dummy="$PATH"
6447 for ac_dir in $ac_dummy; do
6448 test -z "$ac_dir" && ac_dir=.
6449 if test -f $ac_dir/$ac_word; then
6450 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6451 break
6452 fi
6453 done
6454 IFS="$ac_save_ifs"
7e0f7140
GK
6455fi
6456fi
cac3d6c4 6457STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
7e0f7140 6458if test -n "$STRIP_FOR_TARGET"; then
cac3d6c4 6459 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
7e0f7140 6460else
cac3d6c4 6461 echo "$ac_t""no" 1>&6
7e0f7140
GK
6462fi
6463
2429c060
PB
6464 fi
6465 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
6466 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
7e0f7140 6467set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6468echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6469echo "configure:6470: checking for $ac_word" >&5
cac3d6c4
CM
6470if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6471 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140
GK
6472else
6473 if test -n "$STRIP_FOR_TARGET"; then
6474 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6475else
cac3d6c4
CM
6476 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6477 ac_dummy="$PATH"
6478 for ac_dir in $ac_dummy; do
6479 test -z "$ac_dir" && ac_dir=.
6480 if test -f $ac_dir/$ac_word; then
6481 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
6482 break
6483 fi
6484 done
6485 IFS="$ac_save_ifs"
7e0f7140
GK
6486fi
6487fi
cac3d6c4 6488STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
7e0f7140 6489if test -n "$STRIP_FOR_TARGET"; then
cac3d6c4 6490 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
7e0f7140 6491else
cac3d6c4 6492 echo "$ac_t""no" 1>&6
7e0f7140 6493fi
cac3d6c4 6494
2429c060
PB
6495 fi
6496 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
6497 done
6498fi
6499
7e0f7140
GK
6500if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
6501 set dummy strip
6502 if test $build = $target ; then
6503 STRIP_FOR_TARGET="$2"
6504 else
6505 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6506 fi
6507fi
6508
3a35eeb3
PB
6509else
6510 STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
2429c060
PB
6511fi
6512
6513
6514
6515
6516if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6517 if test -n "$with_build_time_tools"; then
3a35eeb3 6518 echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6519echo "configure:6520: checking for windres in $with_build_time_tools" >&5
3a35eeb3
PB
6520 if test -x $with_build_time_tools/windres; then
6521 WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
6522 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6523 echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
6524 else
6525 echo "$ac_t""no" 1>&6
6526 fi
2429c060
PB
6527 elif test $build != $host && test $have_gcc_for_target = yes; then
6528 WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
6529 test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
6530 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6531 fi
6532fi
6533if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6534 # Extract the first word of "windres", so it can be a program name with args.
6535set dummy windres; ac_word=$2
6536echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6537echo "configure:6538: checking for $ac_word" >&5
2429c060
PB
6538if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6539 echo $ac_n "(cached) $ac_c" 1>&6
6540else
6541 case "$WINDRES_FOR_TARGET" in
6542 /*)
6543 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
6544 ;;
6545 ?:/*)
6546 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
6547 ;;
6548 *)
6549 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6550 ac_dummy="$gcc_cv_tool_dirs"
6551 for ac_dir in $ac_dummy; do
6552 test -z "$ac_dir" && ac_dir=.
6553 if test -f $ac_dir/$ac_word; then
6554 ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word"
6555 break
6556 fi
6557 done
6558 IFS="$ac_save_ifs"
6559 ;;
6560esac
6561fi
6562WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
6563if test -n "$WINDRES_FOR_TARGET"; then
6564 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6565else
6566 echo "$ac_t""no" 1>&6
6567fi
6568
6569fi
6570if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6571 if test -n "$with_build_time_tools"; then
6572 for ncn_progname in windres; do
6573 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
77d7106f 6574echo "configure:6575: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6575 if test -x $with_build_time_tools/${ncn_progname}; then
6576 ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6577 echo "$ac_t""yes" 1>&6
6578 break
6579 else
6580 echo "$ac_t""no" 1>&6
6581 fi
6582 done
6583fi
6584
6585if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
6586 for ncn_progname in windres; do
6587 if test -n "$ncn_target_tool_prefix"; then
6588 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 6589set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6591echo "configure:6592: checking for $ac_word" >&5
cac3d6c4
CM
6592if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6593 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6594else
55db4b87
PB
6595 if test -n "$WINDRES_FOR_TARGET"; then
6596 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af 6597else
cac3d6c4
CM
6598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6599 ac_dummy="$PATH"
6600 for ac_dir in $ac_dummy; do
6601 test -z "$ac_dir" && ac_dir=.
6602 if test -f $ac_dir/$ac_word; then
6603 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6604 break
6605 fi
6606 done
6607 IFS="$ac_save_ifs"
859789af
AC
6608fi
6609fi
cac3d6c4 6610WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
55db4b87 6611if test -n "$WINDRES_FOR_TARGET"; then
cac3d6c4 6612 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af 6613else
cac3d6c4 6614 echo "$ac_t""no" 1>&6
859789af
AC
6615fi
6616
2429c060
PB
6617 fi
6618 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
6619 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6620set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6621echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
77d7106f 6622echo "configure:6623: checking for $ac_word" >&5
cac3d6c4
CM
6623if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6624 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6625else
05cbd757
PB
6626 if test -n "$WINDRES_FOR_TARGET"; then
6627 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af 6628else
cac3d6c4
CM
6629 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6630 ac_dummy="$PATH"
6631 for ac_dir in $ac_dummy; do
6632 test -z "$ac_dir" && ac_dir=.
6633 if test -f $ac_dir/$ac_word; then
6634 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
6635 break
6636 fi
6637 done
6638 IFS="$ac_save_ifs"
859789af
AC
6639fi
6640fi
cac3d6c4 6641WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
05cbd757 6642if test -n "$WINDRES_FOR_TARGET"; then
cac3d6c4 6643 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af 6644else
cac3d6c4 6645 echo "$ac_t""no" 1>&6
859789af 6646fi
cac3d6c4 6647
2429c060
PB
6648 fi
6649 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
6650 done
6651fi
6652
05cbd757
PB
6653if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
6654 set dummy windres
6655 if test $build = $target ; then
6656 WINDRES_FOR_TARGET="$2"
859789af 6657 else
05cbd757 6658 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6659 fi
859789af
AC
6660fi
6661
3a35eeb3
PB
6662else
6663 WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
2429c060
PB
6664fi
6665
852e5f18 6666
be01d343
PB
6667RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
6668
6669echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
77d7106f 6670echo "configure:6671: checking where to find the target ar" >&5
be01d343 6671if test "x${build}" != "x${host}" ; then
2429c060
PB
6672 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6673 # We already found the complete path
6674 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
6675 else
6676 # Canadian cross, just use what we found
6677 echo "$ac_t""pre-installed" 1>&6
6678 fi
be01d343
PB
6679else
6680 ok=yes
6681 case " ${configdirs} " in
6682 *" binutils "*) ;;
6683 *) ok=no ;;
6684 esac
6685
6686 if test $ok = yes; then
6687 # An in-tree tool is available and we can use it
6688 AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
6689 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6690 elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6691 # We already found the complete path
6692 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
be01d343
PB
6693 elif test "x$target" = "x$host"; then
6694 # We can use an host tool
6695 AR_FOR_TARGET='$(AR)'
6696 echo "$ac_t""host tool" 1>&6
6697 else
6698 # We need a cross tool
6699 echo "$ac_t""pre-installed" 1>&6
6700 fi
6701fi
6702echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
77d7106f 6703echo "configure:6704: checking where to find the target as" >&5
be01d343 6704if test "x${build}" != "x${host}" ; then
2429c060
PB
6705 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6706 # We already found the complete path
6707 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
6708 else
6709 # Canadian cross, just use what we found
6710 echo "$ac_t""pre-installed" 1>&6
6711 fi
be01d343
PB
6712else
6713 ok=yes
6714 case " ${configdirs} " in
6715 *" gas "*) ;;
6716 *) ok=no ;;
6717 esac
6718
6719 if test $ok = yes; then
6720 # An in-tree tool is available and we can use it
6721 AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
6722 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6723 elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6724 # We already found the complete path
6725 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
be01d343
PB
6726 elif test "x$target" = "x$host"; then
6727 # We can use an host tool
6728 AS_FOR_TARGET='$(AS)'
6729 echo "$ac_t""host tool" 1>&6
6730 else
6731 # We need a cross tool
6732 echo "$ac_t""pre-installed" 1>&6
6733 fi
6734fi
6735echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
77d7106f 6736echo "configure:6737: checking where to find the target cc" >&5
be01d343 6737if test "x${build}" != "x${host}" ; then
2429c060
PB
6738 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6739 # We already found the complete path
6740 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
6741 else
6742 # Canadian cross, just use what we found
6743 echo "$ac_t""pre-installed" 1>&6
6744 fi
be01d343
PB
6745else
6746 ok=yes
6747 case " ${configdirs} " in
6748 *" gcc "*) ;;
6749 *) ok=no ;;
6750 esac
6751
6752 if test $ok = yes; then
6753 # An in-tree tool is available and we can use it
6754 CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6755 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6756 elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6757 # We already found the complete path
6758 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
be01d343
PB
6759 elif test "x$target" = "x$host"; then
6760 # We can use an host tool
6761 CC_FOR_TARGET='$(CC)'
6762 echo "$ac_t""host tool" 1>&6
6763 else
6764 # We need a cross tool
6765 echo "$ac_t""pre-installed" 1>&6
6766 fi
6767fi
6768echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
77d7106f 6769echo "configure:6770: checking where to find the target c++" >&5
be01d343 6770if test "x${build}" != "x${host}" ; then
2429c060
PB
6771 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6772 # We already found the complete path
6773 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
6774 else
6775 # Canadian cross, just use what we found
6776 echo "$ac_t""pre-installed" 1>&6
6777 fi
be01d343
PB
6778else
6779 ok=yes
6780 case " ${configdirs} " in
6781 *" gcc "*) ;;
6782 *) ok=no ;;
6783 esac
6784 case ,${enable_languages}, in
6785 *,c++,*) ;;
6786 *) ok=no ;;
6787 esac
6788 if test $ok = yes; then
6789 # An in-tree tool is available and we can use it
6790 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'
6791 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6792 elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6793 # We already found the complete path
6794 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
be01d343
PB
6795 elif test "x$target" = "x$host"; then
6796 # We can use an host tool
6797 CXX_FOR_TARGET='$(CXX)'
6798 echo "$ac_t""host tool" 1>&6
6799 else
6800 # We need a cross tool
6801 echo "$ac_t""pre-installed" 1>&6
6802 fi
6803fi
6804echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
77d7106f 6805echo "configure:6806: checking where to find the target c++ for libstdc++" >&5
be01d343 6806if test "x${build}" != "x${host}" ; then
2429c060
PB
6807 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6808 # We already found the complete path
6809 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
6810 else
6811 # Canadian cross, just use what we found
6812 echo "$ac_t""pre-installed" 1>&6
6813 fi
be01d343
PB
6814else
6815 ok=yes
6816 case " ${configdirs} " in
6817 *" gcc "*) ;;
6818 *) ok=no ;;
6819 esac
6820 case ,${enable_languages}, in
6821 *,c++,*) ;;
6822 *) ok=no ;;
6823 esac
6824 if test $ok = yes; then
6825 # An in-tree tool is available and we can use it
6826 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'
6827 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6828 elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6829 # We already found the complete path
6830 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
be01d343
PB
6831 elif test "x$target" = "x$host"; then
6832 # We can use an host tool
6833 RAW_CXX_FOR_TARGET='$(CXX)'
6834 echo "$ac_t""host tool" 1>&6
6835 else
6836 # We need a cross tool
6837 echo "$ac_t""pre-installed" 1>&6
6838 fi
6839fi
6840echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
77d7106f 6841echo "configure:6842: checking where to find the target dlltool" >&5
be01d343 6842if test "x${build}" != "x${host}" ; then
2429c060
PB
6843 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6844 # We already found the complete path
6845 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
6846 else
6847 # Canadian cross, just use what we found
6848 echo "$ac_t""pre-installed" 1>&6
6849 fi
be01d343
PB
6850else
6851 ok=yes
6852 case " ${configdirs} " in
6853 *" binutils "*) ;;
6854 *) ok=no ;;
6855 esac
6856
6857 if test $ok = yes; then
6858 # An in-tree tool is available and we can use it
6859 DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
6860 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6861 elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6862 # We already found the complete path
6863 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
be01d343
PB
6864 elif test "x$target" = "x$host"; then
6865 # We can use an host tool
6866 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
6867 echo "$ac_t""host tool" 1>&6
6868 else
6869 # We need a cross tool
6870 echo "$ac_t""pre-installed" 1>&6
6871 fi
6872fi
6873echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
77d7106f 6874echo "configure:6875: checking where to find the target gcc" >&5
be01d343 6875if test "x${build}" != "x${host}" ; then
2429c060
PB
6876 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6877 # We already found the complete path
6878 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
6879 else
6880 # Canadian cross, just use what we found
6881 echo "$ac_t""pre-installed" 1>&6
6882 fi
be01d343
PB
6883else
6884 ok=yes
6885 case " ${configdirs} " in
6886 *" gcc "*) ;;
6887 *) ok=no ;;
6888 esac
6889
6890 if test $ok = yes; then
6891 # An in-tree tool is available and we can use it
6892 GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6893 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6894 elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6895 # We already found the complete path
6896 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
be01d343
PB
6897 elif test "x$target" = "x$host"; then
6898 # We can use an host tool
6899 GCC_FOR_TARGET='$()'
6900 echo "$ac_t""host tool" 1>&6
6901 else
6902 # We need a cross tool
6903 echo "$ac_t""pre-installed" 1>&6
6904 fi
6905fi
6906echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
77d7106f 6907echo "configure:6908: checking where to find the target gcj" >&5
be01d343 6908if test "x${build}" != "x${host}" ; then
2429c060
PB
6909 if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6910 # We already found the complete path
6911 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
6912 else
6913 # Canadian cross, just use what we found
6914 echo "$ac_t""pre-installed" 1>&6
6915 fi
be01d343
PB
6916else
6917 ok=yes
6918 case " ${configdirs} " in
6919 *" gcc "*) ;;
6920 *) ok=no ;;
6921 esac
6922 case ,${enable_languages}, in
6923 *,java,*) ;;
6924 *) ok=no ;;
6925 esac
6926 if test $ok = yes; then
6927 # An in-tree tool is available and we can use it
6928 GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
6929 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6930 elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6931 # We already found the complete path
6932 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
be01d343
PB
6933 elif test "x$target" = "x$host"; then
6934 # We can use an host tool
6935 GCJ_FOR_TARGET='$(GCJ)'
6936 echo "$ac_t""host tool" 1>&6
6937 else
6938 # We need a cross tool
6939 echo "$ac_t""pre-installed" 1>&6
6940 fi
6941fi
6942echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
77d7106f 6943echo "configure:6944: checking where to find the target gfortran" >&5
be01d343 6944if test "x${build}" != "x${host}" ; then
2429c060
PB
6945 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6946 # We already found the complete path
6947 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
6948 else
6949 # Canadian cross, just use what we found
6950 echo "$ac_t""pre-installed" 1>&6
6951 fi
be01d343
PB
6952else
6953 ok=yes
6954 case " ${configdirs} " in
6955 *" gcc "*) ;;
6956 *) ok=no ;;
6957 esac
6958 case ,${enable_languages}, in
6959 *,fortran,*) ;;
6960 *) ok=no ;;
6961 esac
6962 if test $ok = yes; then
6963 # An in-tree tool is available and we can use it
6964 GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
6965 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6966 elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6967 # We already found the complete path
6968 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
be01d343
PB
6969 elif test "x$target" = "x$host"; then
6970 # We can use an host tool
6971 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
6972 echo "$ac_t""host tool" 1>&6
6973 else
6974 # We need a cross tool
6975 echo "$ac_t""pre-installed" 1>&6
6976 fi
6977fi
6978echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
77d7106f 6979echo "configure:6980: checking where to find the target ld" >&5
be01d343 6980if test "x${build}" != "x${host}" ; then
2429c060
PB
6981 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6982 # We already found the complete path
6983 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
6984 else
6985 # Canadian cross, just use what we found
6986 echo "$ac_t""pre-installed" 1>&6
6987 fi
be01d343
PB
6988else
6989 ok=yes
6990 case " ${configdirs} " in
6991 *" ld "*) ;;
6992 *) ok=no ;;
6993 esac
6994
6995 if test $ok = yes; then
6996 # An in-tree tool is available and we can use it
6997 LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
6998 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6999 elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
7000 # We already found the complete path
7001 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
be01d343
PB
7002 elif test "x$target" = "x$host"; then
7003 # We can use an host tool
7004 LD_FOR_TARGET='$(LD)'
7005 echo "$ac_t""host tool" 1>&6
7006 else
7007 # We need a cross tool
7008 echo "$ac_t""pre-installed" 1>&6
7009 fi
7010fi
7011echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
77d7106f 7012echo "configure:7013: checking where to find the target lipo" >&5
be01d343 7013if test "x${build}" != "x${host}" ; then
2429c060
PB
7014 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7015 # We already found the complete path
7016 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7017 else
7018 # Canadian cross, just use what we found
7019 echo "$ac_t""pre-installed" 1>&6
7020 fi
be01d343 7021else
2429c060
PB
7022 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7023 # We already found the complete path
7024 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7025 elif test "x$target" = "x$host"; then
be01d343
PB
7026 # We can use an host tool
7027 LIPO_FOR_TARGET='$(LIPO)'
7028 echo "$ac_t""host tool" 1>&6
7029 else
7030 # We need a cross tool
7031 echo "$ac_t""pre-installed" 1>&6
7032 fi
7033fi
7034echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
77d7106f 7035echo "configure:7036: checking where to find the target nm" >&5
be01d343 7036if test "x${build}" != "x${host}" ; then
2429c060
PB
7037 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7038 # We already found the complete path
7039 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
7040 else
7041 # Canadian cross, just use what we found
7042 echo "$ac_t""pre-installed" 1>&6
7043 fi
be01d343
PB
7044else
7045 ok=yes
7046 case " ${configdirs} " in
7047 *" binutils "*) ;;
7048 *) ok=no ;;
7049 esac
7050
7051 if test $ok = yes; then
7052 # An in-tree tool is available and we can use it
7053 NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
7054 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7055 elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7056 # We already found the complete path
7057 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
be01d343
PB
7058 elif test "x$target" = "x$host"; then
7059 # We can use an host tool
7060 NM_FOR_TARGET='$(NM)'
7061 echo "$ac_t""host tool" 1>&6
7062 else
7063 # We need a cross tool
7064 echo "$ac_t""pre-installed" 1>&6
7065 fi
7066fi
7067echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
77d7106f 7068echo "configure:7069: checking where to find the target objdump" >&5
be01d343 7069if test "x${build}" != "x${host}" ; then
2429c060
PB
7070 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7071 # We already found the complete path
7072 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
7073 else
7074 # Canadian cross, just use what we found
7075 echo "$ac_t""pre-installed" 1>&6
7076 fi
be01d343
PB
7077else
7078 ok=yes
7079 case " ${configdirs} " in
7080 *" binutils "*) ;;
7081 *) ok=no ;;
7082 esac
7083
7084 if test $ok = yes; then
7085 # An in-tree tool is available and we can use it
7086 OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
7087 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7088 elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7089 # We already found the complete path
7090 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
be01d343
PB
7091 elif test "x$target" = "x$host"; then
7092 # We can use an host tool
7093 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
7094 echo "$ac_t""host tool" 1>&6
7095 else
7096 # We need a cross tool
7097 echo "$ac_t""pre-installed" 1>&6
7098 fi
7099fi
7100echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
77d7106f 7101echo "configure:7102: checking where to find the target ranlib" >&5
be01d343 7102if test "x${build}" != "x${host}" ; then
2429c060
PB
7103 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7104 # We already found the complete path
7105 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
7106 else
7107 # Canadian cross, just use what we found
7108 echo "$ac_t""pre-installed" 1>&6
7109 fi
be01d343
PB
7110else
7111 ok=yes
7112 case " ${configdirs} " in
7113 *" binutils "*) ;;
7114 *) ok=no ;;
7115 esac
7116
7117 if test $ok = yes; then
7118 # An in-tree tool is available and we can use it
7119 RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
7120 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7121 elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7122 # We already found the complete path
7123 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
be01d343
PB
7124 elif test "x$target" = "x$host"; then
7125 # We can use an host tool
7126 RANLIB_FOR_TARGET='$(RANLIB)'
7127 echo "$ac_t""host tool" 1>&6
7128 else
7129 # We need a cross tool
7130 echo "$ac_t""pre-installed" 1>&6
7131 fi
7132fi
7133echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
77d7106f 7134echo "configure:7135: checking where to find the target strip" >&5
be01d343 7135if test "x${build}" != "x${host}" ; then
2429c060
PB
7136 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7137 # We already found the complete path
7138 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
7139 else
7140 # Canadian cross, just use what we found
7141 echo "$ac_t""pre-installed" 1>&6
7142 fi
be01d343
PB
7143else
7144 ok=yes
7145 case " ${configdirs} " in
7146 *" binutils "*) ;;
7147 *) ok=no ;;
7148 esac
7149
7150 if test $ok = yes; then
7151 # An in-tree tool is available and we can use it
7152 STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
7153 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7154 elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7155 # We already found the complete path
7156 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
be01d343
PB
7157 elif test "x$target" = "x$host"; then
7158 # We can use an host tool
7159 STRIP_FOR_TARGET='$(STRIP)'
7160 echo "$ac_t""host tool" 1>&6
7161 else
7162 # We need a cross tool
7163 echo "$ac_t""pre-installed" 1>&6
7164 fi
7165fi
7166echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
77d7106f 7167echo "configure:7168: checking where to find the target windres" >&5
be01d343 7168if test "x${build}" != "x${host}" ; then
2429c060
PB
7169 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7170 # We already found the complete path
7171 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
7172 else
7173 # Canadian cross, just use what we found
7174 echo "$ac_t""pre-installed" 1>&6
7175 fi
be01d343
PB
7176else
7177 ok=yes
7178 case " ${configdirs} " in
7179 *" binutils "*) ;;
7180 *) ok=no ;;
7181 esac
7182
7183 if test $ok = yes; then
7184 # An in-tree tool is available and we can use it
7185 WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
7186 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7187 elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7188 # We already found the complete path
7189 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
be01d343
PB
7190 elif test "x$target" = "x$host"; then
7191 # We can use an host tool
7192 WINDRES_FOR_TARGET='$(WINDRES)'
7193 echo "$ac_t""host tool" 1>&6
7194 else
7195 # We need a cross tool
7196 echo "$ac_t""pre-installed" 1>&6
7197 fi
a0da8069 7198fi
54752a6b
NN
7199
7200
7201
be01d343 7202
a0da8069
NN
7203# Certain tools may need extra flags.
7204AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
7205RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
7206NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
7207
be01d343
PB
7208# When building target libraries, except in a Canadian cross, we use
7209# the same toolchain as the compiler we just built.
7210COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
7211COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
7212COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
7213if test $host = $build; then
7214 case " $configdirs " in
7215 *" gcc "*)
7216 COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
7217 COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
7218 COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
7219 ;;
7220 esac
7221fi
7222
7223
7224
7225
7226
cac3d6c4 7227echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
77d7106f 7228echo "configure:7229: checking whether to enable maintainer-specific portions of Makefiles" >&5
3d5e36ae
AO
7229# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7230if test "${enable_maintainer_mode+set}" = set; then
7231 enableval="$enable_maintainer_mode"
7232 USE_MAINTAINER_MODE=$enableval
7233else
7234 USE_MAINTAINER_MODE=no
cac3d6c4
CM
7235fi
7236
7237echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
3d5e36ae
AO
7238
7239
7240if test "$USE_MAINTAINER_MODE" = yes; then
7241 MAINTAINER_MODE_TRUE=
7242 MAINTAINER_MODE_FALSE='#'
7243else
7244 MAINTAINER_MODE_TRUE='#'
7245 MAINTAINER_MODE_FALSE=
cac3d6c4 7246fi
3d5e36ae
AO
7247MAINT=$MAINTAINER_MODE_TRUE
7248
1d39f329
NN
7249# ---------------------
7250# GCC bootstrap support
7251# ---------------------
7252
7253# Stage specific cflags for build.
7254stage1_cflags="-g"
7255case $build in
7256 vax-*-*)
7257 case ${GCC} in
7258 yes) stage1_cflags="-g -Wa,-J" ;;
7259 *) stage1_cflags="-g -J" ;;
7260 esac ;;
7261 powerpc-*-darwin*)
7262 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
7263 # sources; use -no-cpp-precomp to get to GNU cpp.
7264 # Apple's GCC has bugs in designated initializer handling, so disable
7265 # that too.
7266 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
7267 ;;
7268esac
7269
1d89b610
PB
7270# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
7271if test "$GCC" = yes; then
7272 saved_CFLAGS="$CFLAGS"
7273
7274 # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
7275 CFLAGS="$CFLAGS -fkeep-inline-functions"
7276 echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
77d7106f 7277echo "configure:7278: checking whether -fkeep-inline-functions is supported" >&5
1d89b610 7278 cat > conftest.$ac_ext <<EOF
77d7106f 7279#line 7280 "configure"
1d89b610
PB
7280#include "confdefs.h"
7281
7282int main() {
7283
7284; return 0; }
7285EOF
77d7106f 7286if { (eval echo configure:7287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1d89b610
PB
7287 rm -rf conftest*
7288 echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
7289else
7290 echo "configure: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 rm -rf conftest*
7293 echo "$ac_t""no" 1>&6
7294fi
7295rm -f conftest*
7296
7297 CFLAGS="$saved_CFLAGS"
7298fi
7299
7300
1d39f329
NN
7301
7302# Enable -Werror in bootstrap stage2 and later.
7303# Change the default to "no" on release branches.
7304# Check whether --enable-werror or --disable-werror was given.
7305if test "${enable_werror+set}" = set; then
7306 enableval="$enable_werror"
cac3d6c4 7307 :
1d39f329
NN
7308else
7309 enable_werror=yes
cac3d6c4
CM
7310fi
7311
1a6f2dc7
NN
7312case ${enable_werror} in
7313 yes) stage2_werror_flag="--enable-werror-always" ;;
7314 *) stage2_werror_flag="" ;;
1d39f329
NN
7315esac
7316
7317
108a6f8e
CD
7318# Flags needed to enable html installing and building
7319# Check whether --with-datarootdir or --without-datarootdir was given.
7320if test "${with_datarootdir+set}" = set; then
7321 withval="$with_datarootdir"
7322 datarootdir="\${prefix}/${withval}"
7323else
7324 datarootdir="\${prefix}/share"
7325fi
7326
7327
7328# Check whether --with-docdir or --without-docdir was given.
7329if test "${with_docdir+set}" = set; then
7330 withval="$with_docdir"
7331 docdir="\${prefix}/${withval}"
7332else
7333 docdir="\${datarootdir}/doc"
7334fi
7335
7336
7337# Check whether --with-htmldir or --without-htmldir was given.
7338if test "${with_htmldir+set}" = set; then
7339 withval="$with_htmldir"
7340 htmldir="\${prefix}/${withval}"
7341else
7342 htmldir="\${docdir}"
7343fi
7344
7345
7346
7347
7348
7349
cac3d6c4
CM
7350trap '' 1 2 15
7351cat > confcache <<\EOF
a0da8069
NN
7352# This file is a shell script that caches the results of configure
7353# tests run on this system so they can be shared between configure
cac3d6c4
CM
7354# scripts and configure runs. It is not useful on other systems.
7355# If it contains results you don't want to keep, you may remove or edit it.
a0da8069 7356#
cac3d6c4
CM
7357# By default, configure uses ./config.cache as the cache file,
7358# creating it if it does not exist already. You can give configure
7359# the --cache-file=FILE option to use a different cache file; that is
7360# what configure does when it calls configure scripts in
7361# subdirectories, so they share the cache.
7362# Giving --cache-file=/dev/null disables caching, for debugging configure.
7363# config.status only pays attention to the cache file if you give it the
7364# --recheck option to rerun configure.
a0da8069 7365#
cac3d6c4 7366EOF
a0da8069
NN
7367# The following way of writing the cache mishandles newlines in values,
7368# but we know of no workaround that is simple, portable, and efficient.
7369# So, don't put newlines in cache variables' values.
7370# Ultrix sh set writes to stderr and can't be redirected directly,
7371# and sets the high bit in the cache file unless we assign to the vars.
cac3d6c4
CM
7372(set) 2>&1 |
7373 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7374 *ac_space=\ *)
7375 # `set' does not quote correctly, so add quotes (double-quote substitution
7376 # turns \\\\ into \\, and sed turns \\ into \).
7377 sed -n \
7378 -e "s/'/'\\\\''/g" \
7379 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7380 ;;
7381 *)
7382 # `set' quotes correctly as required by POSIX, so do not add quotes.
7383 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7384 ;;
7385 esac >> confcache
7386if cmp -s $cache_file confcache; then
7387 :
7388else
a0da8069 7389 if test -w $cache_file; then
cac3d6c4
CM
7390 echo "updating cache $cache_file"
7391 cat confcache > $cache_file
a0da8069
NN
7392 else
7393 echo "not updating unwritable cache $cache_file"
7394 fi
852e5f18 7395fi
a0da8069 7396rm -f confcache
852e5f18 7397
cac3d6c4
CM
7398trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7399
a0da8069
NN
7400test "x$prefix" = xNONE && prefix=$ac_default_prefix
7401# Let make expand exec_prefix.
7402test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
852e5f18 7403
cac3d6c4
CM
7404# Any assignment to VPATH causes Sun make to only execute
7405# the first set of double-colon rules, so remove it if not needed.
7406# If there is a colon in the path, we need to keep it.
a0da8069 7407if test "x$srcdir" = x.; then
cac3d6c4 7408 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
a0da8069 7409fi
252b5132 7410
cac3d6c4
CM
7411trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7412
a0da8069
NN
7413# Transform confdefs.h into DEFS.
7414# Protect against shell expansion while executing Makefile rules.
7415# Protect against Makefile macro expansion.
4f0ef2d8
CD
7416cat > conftest.defs <<\EOF
7417s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
7418s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
7419s%\[%\\&%g
7420s%\]%\\&%g
7421s%\$%$$%g
7422EOF
7423DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
7424rm -f conftest.defs
852e5f18 7425
376a0e54 7426
cac3d6c4 7427# Without the "./", some shells look in PATH for config.status.
376a0e54 7428: ${CONFIG_STATUS=./config.status}
cac3d6c4
CM
7429
7430echo creating $CONFIG_STATUS
7431rm -f $CONFIG_STATUS
7432cat > $CONFIG_STATUS <<EOF
7433#! /bin/sh
7434# Generated automatically by configure.
a0da8069 7435# Run this file to recreate the current configuration.
cac3d6c4
CM
7436# This directory was configured as follows,
7437# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7438#
7439# $0 $ac_configure_args
7440#
a0da8069 7441# Compiler output produced by configure, useful for debugging
cac3d6c4 7442# configure, is in ./config.log if it exists.
376a0e54 7443
cac3d6c4
CM
7444ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7445for ac_option
a0da8069 7446do
cac3d6c4 7447 case "\$ac_option" in
a0da8069 7448 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
cac3d6c4
CM
7449 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7450 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7451 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7452 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7453 exit 0 ;;
7454 -help | --help | --hel | --he | --h)
7455 echo "\$ac_cs_usage"; exit 0 ;;
7456 *) echo "\$ac_cs_usage"; exit 1 ;;
376a0e54
CM
7457 esac
7458done
7459
cac3d6c4
CM
7460ac_given_srcdir=$srcdir
7461ac_given_INSTALL="$INSTALL"
376a0e54 7462
cac3d6c4
CM
7463trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7464EOF
7465cat >> $CONFIG_STATUS <<EOF
376a0e54 7466
cac3d6c4
CM
7467# Protect against being on the right side of a sed subst in config.status.
7468sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7469 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7470$ac_vpsub
7471$extrasub
7472s%@SHELL@%$SHELL%g
7473s%@CFLAGS@%$CFLAGS%g
7474s%@CPPFLAGS@%$CPPFLAGS%g
7475s%@CXXFLAGS@%$CXXFLAGS%g
7476s%@FFLAGS@%$FFLAGS%g
7477s%@DEFS@%$DEFS%g
7478s%@LDFLAGS@%$LDFLAGS%g
7479s%@LIBS@%$LIBS%g
7480s%@exec_prefix@%$exec_prefix%g
7481s%@prefix@%$prefix%g
7482s%@program_transform_name@%$program_transform_name%g
7483s%@bindir@%$bindir%g
7484s%@sbindir@%$sbindir%g
7485s%@libexecdir@%$libexecdir%g
7486s%@datadir@%$datadir%g
7487s%@sysconfdir@%$sysconfdir%g
7488s%@sharedstatedir@%$sharedstatedir%g
7489s%@localstatedir@%$localstatedir%g
7490s%@libdir@%$libdir%g
7491s%@includedir@%$includedir%g
7492s%@oldincludedir@%$oldincludedir%g
7493s%@infodir@%$infodir%g
7494s%@mandir@%$mandir%g
7495s%@host@%$host%g
7496s%@host_alias@%$host_alias%g
7497s%@host_cpu@%$host_cpu%g
7498s%@host_vendor@%$host_vendor%g
7499s%@host_os@%$host_os%g
7500s%@target@%$target%g
7501s%@target_alias@%$target_alias%g
7502s%@target_cpu@%$target_cpu%g
7503s%@target_vendor@%$target_vendor%g
7504s%@target_os@%$target_os%g
7505s%@build@%$build%g
7506s%@build_alias@%$build_alias%g
7507s%@build_cpu@%$build_cpu%g
7508s%@build_vendor@%$build_vendor%g
7509s%@build_os@%$build_os%g
7510s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7511s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7512s%@INSTALL_DATA@%$INSTALL_DATA%g
7513s%@LN@%$LN%g
7514s%@LN_S@%$LN_S%g
7515s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
66a79c16 7516s%@build_libsubdir@%$build_libsubdir%g
cac3d6c4
CM
7517s%@build_subdir@%$build_subdir%g
7518s%@host_subdir@%$host_subdir%g
7519s%@target_subdir@%$target_subdir%g
7520s%@CC@%$CC%g
7521s%@GNATBIND@%$GNATBIND%g
7522s%@do_compare@%$do_compare%g
7523s%@gmplibs@%$gmplibs%g
7524s%@gmpinc@%$gmpinc%g
7525s%@stage1_languages@%$stage1_languages%g
7526s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
a0da8069 7527/@serialization_dependencies@/r $serialization_dependencies
cac3d6c4 7528s%@serialization_dependencies@%%g
a0da8069 7529/@host_makefile_frag@/r $host_makefile_frag
cac3d6c4 7530s%@host_makefile_frag@%%g
a0da8069 7531/@target_makefile_frag@/r $target_makefile_frag
cac3d6c4 7532s%@target_makefile_frag@%%g
a0da8069 7533/@alphaieee_frag@/r $alphaieee_frag
cac3d6c4 7534s%@alphaieee_frag@%%g
a0da8069 7535/@ospace_frag@/r $ospace_frag
cac3d6c4
CM
7536s%@ospace_frag@%%g
7537s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
cac3d6c4
CM
7538s%@tooldir@%$tooldir%g
7539s%@build_tooldir@%$build_tooldir%g
907be67c 7540s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
cac3d6c4 7541s%@GDB_TK@%$GDB_TK%g
907be67c 7542s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
cac3d6c4
CM
7543s%@build_configargs@%$build_configargs%g
7544s%@build_configdirs@%$build_configdirs%g
7545s%@host_configargs@%$host_configargs%g
7546s%@configdirs@%$configdirs%g
7547s%@target_configargs@%$target_configargs%g
cac3d6c4
CM
7548s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7549s%@config_shell@%$config_shell%g
be01d343
PB
7550s%@YACC@%$YACC%g
7551s%@BISON@%$BISON%g
7552s%@M4@%$M4%g
7553s%@LEX@%$LEX%g
7554s%@FLEX@%$FLEX%g
7555s%@MAKEINFO@%$MAKEINFO%g
7556s%@EXPECT@%$EXPECT%g
7557s%@RUNTEST@%$RUNTEST%g
cac3d6c4
CM
7558s%@AR@%$AR%g
7559s%@AS@%$AS%g
7560s%@DLLTOOL@%$DLLTOOL%g
7561s%@LD@%$LD%g
be01d343 7562s%@LIPO@%$LIPO%g
cac3d6c4
CM
7563s%@NM@%$NM%g
7564s%@RANLIB@%$RANLIB%g
be01d343 7565s%@STRIP@%$STRIP%g
cac3d6c4
CM
7566s%@WINDRES@%$WINDRES%g
7567s%@OBJCOPY@%$OBJCOPY%g
7568s%@OBJDUMP@%$OBJDUMP%g
7569s%@CXX@%$CXX%g
7570s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
cac3d6c4
CM
7571s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
7572s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
cac3d6c4
CM
7573s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
7574s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
7575s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
2429c060
PB
7576s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
7577s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
7578s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
cac3d6c4
CM
7579s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7580s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
7581s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
5ae72758 7582s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
cac3d6c4
CM
7583s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7584s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
7585s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
cac3d6c4
CM
7586s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
7587s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
be01d343
PB
7588s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
7589s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
7590s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
cac3d6c4
CM
7591s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7592s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7593s%@MAINT@%$MAINT%g
7594s%@stage1_cflags@%$stage1_cflags%g
cac3d6c4 7595s%@stage2_werror_flag@%$stage2_werror_flag%g
108a6f8e
CD
7596s%@datarootdir@%$datarootdir%g
7597s%@docdir@%$docdir%g
7598s%@htmldir@%$htmldir%g
cac3d6c4 7599
a0da8069 7600CEOF
cac3d6c4 7601EOF
252b5132 7602
cac3d6c4
CM
7603cat >> $CONFIG_STATUS <<\EOF
7604
7605# Split the substitutions into bite-sized pieces for seds with
7606# small command number limits, like on Digital OSF/1 and HP-UX.
7607ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7608ac_file=1 # Number of current file.
7609ac_beg=1 # First line for current file.
7610ac_end=$ac_max_sed_cmds # Line after last line for current file.
7611ac_more_lines=:
7612ac_sed_cmds=""
7613while $ac_more_lines; do
7614 if test $ac_beg -gt 1; then
7615 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7616 else
7617 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7618 fi
7619 if test ! -s conftest.s$ac_file; then
7620 ac_more_lines=false
7621 rm -f conftest.s$ac_file
7622 else
7623 if test -z "$ac_sed_cmds"; then
7624 ac_sed_cmds="sed -f conftest.s$ac_file"
a0da8069 7625 else
cac3d6c4 7626 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
a0da8069 7627 fi
cac3d6c4
CM
7628 ac_file=`expr $ac_file + 1`
7629 ac_beg=$ac_end
7630 ac_end=`expr $ac_end + $ac_max_sed_cmds`
852e5f18 7631 fi
cac3d6c4
CM
7632done
7633if test -z "$ac_sed_cmds"; then
7634 ac_sed_cmds=cat
7635fi
7636EOF
7637
7638cat >> $CONFIG_STATUS <<EOF
252b5132 7639
cac3d6c4
CM
7640CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7641EOF
7642cat >> $CONFIG_STATUS <<\EOF
7643for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
a0da8069 7644 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
cac3d6c4
CM
7645 case "$ac_file" in
7646 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7647 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7648 *) ac_file_in="${ac_file}.in" ;;
a0da8069 7649 esac
252b5132 7650
cac3d6c4 7651 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
376a0e54 7652
cac3d6c4
CM
7653 # Remove last slash and all that follows it. Not all systems have dirname.
7654 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7655 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7656 # The file is in a subdirectory.
7657 test ! -d "$ac_dir" && mkdir "$ac_dir"
7658 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7659 # A "../" for each directory in $ac_dir_suffix.
7660 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7661 else
7662 ac_dir_suffix= ac_dots=
7663 fi
252b5132 7664
cac3d6c4
CM
7665 case "$ac_given_srcdir" in
7666 .) srcdir=.
7667 if test -z "$ac_dots"; then top_srcdir=.
7668 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7669 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
a0da8069 7670 *) # Relative path.
cac3d6c4
CM
7671 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7672 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7673 esac
252b5132 7674
cac3d6c4
CM
7675 case "$ac_given_INSTALL" in
7676 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7677 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7678 esac
252b5132 7679
cac3d6c4
CM
7680 echo creating "$ac_file"
7681 rm -f "$ac_file"
7682 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7683 case "$ac_file" in
7684 *Makefile*) ac_comsub="1i\\
7685# $configure_input" ;;
7686 *) ac_comsub= ;;
a0da8069 7687 esac
252b5132 7688
cac3d6c4
CM
7689 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7690 sed -e "$ac_comsub
7691s%@configure_input@%$configure_input%g
7692s%@srcdir@%$srcdir%g
7693s%@top_srcdir@%$top_srcdir%g
7694s%@INSTALL@%$INSTALL%g
7695" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7696fi; done
7697rm -f conftest.s*
c148b4cb 7698
cac3d6c4
CM
7699EOF
7700cat >> $CONFIG_STATUS <<EOF
c148b4cb 7701
cac3d6c4
CM
7702EOF
7703cat >> $CONFIG_STATUS <<\EOF
c148b4cb 7704
cac3d6c4
CM
7705exit 0
7706EOF
c148b4cb 7707chmod +x $CONFIG_STATUS
cac3d6c4
CM
7708rm -fr confdefs* $ac_clean_files
7709test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
c148b4cb 7710
This page took 0.767497 seconds and 4 git commands to generate.