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