]> gcc.gnu.org Git - gcc.git/blame - configure
configure.in: Reorganize recognition of languages.
[gcc.git] / configure
CommitLineData
671aa708 1#! /bin/sh
af71363e 2
671aa708 3# Guess values for system-dependent variables and create Makefiles.
af71363e
AS
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
671aa708
NN
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
0b0dc272 9
af71363e
AS
10# Defaults:
11ac_help=
671aa708 12ac_default_prefix=/usr/local
af71363e
AS
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-build-libsubdir=[DIR] Directory where to find libraries for build system"
16ac_help="$ac_help
17 --enable-libada Builds libada directory"
18ac_help="$ac_help
19 --enable-libssp Builds libssp directory"
20ac_help="$ac_help
21 --with-mpfr-dir=PATH This option has been REMOVED"
22ac_help="$ac_help
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"
26ac_help="$ac_help
27 --with-mpfr-include=PATH
28 Specify directory for installed MPFR include files"
29ac_help="$ac_help
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"
e1888513
PB
41ac_help="$ac_help
42 --enable-stage1-languages[=all] choose additional languages to build during
43 stage1. Mostly useful for compiler development."
af71363e
AS
44ac_help="$ac_help
45 --enable-objc-gc enable the use of Boehm's garbage collector with
46 the GNU Objective-C runtime."
47ac_help="$ac_help
48 --with-build-sysroot=sysroot
49 use sysroot as the system root during the build"
50ac_help="$ac_help
51 --enable-bootstrap Enable bootstrapping [yes if native build]"
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"
57ac_help="$ac_help
58 --with-build-time-tools=path
59 use given path to find target tools during the build"
60ac_help="$ac_help
61 --enable-maintainer-mode enable make rules and dependencies not useful
62 (and sometimes confusing) to the casual installer"
63ac_help="$ac_help
64 --enable-stage1-checking[=all] choose additional checking for stage1
65 of the compiler."
66ac_help="$ac_help
67 --enable-werror enable -Werror in bootstrap stage2 and later"
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."
671aa708
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.
af71363e
AS
78build=NONE
79cache_file=./config.cache
671aa708 80exec_prefix=NONE
af71363e 81host=NONE
671aa708 82no_create=
af71363e 83nonopt=NONE
671aa708
NN
84no_recursion=
85prefix=NONE
86program_prefix=NONE
87program_suffix=NONE
88program_transform_name=s,x,x,
89silent=
90site=
91srcdir=
af71363e 92target=NONE
671aa708
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'
79c06341 108
af71363e
AS
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
671aa708
NN
116ac_prev=
117for ac_option
118do
af71363e 119
671aa708
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
79c06341 126
af71363e
AS
127 case "$ac_option" in
128 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
129 *) ac_optarg= ;;
130 esac
671aa708
NN
131
132 # Accept the important Cygnus configure options, so we can diagnose typos.
133
af71363e 134 case "$ac_option" in
671aa708
NN
135
136 -bindir | --bindir | --bindi | --bind | --bin | --bi)
137 ac_prev=bindir ;;
138 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
af71363e 139 bindir="$ac_optarg" ;;
671aa708
NN
140
141 -build | --build | --buil | --bui | --bu)
af71363e 142 ac_prev=build ;;
671aa708 143 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
af71363e 144 build="$ac_optarg" ;;
671aa708
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=*)
af71363e 151 cache_file="$ac_optarg" ;;
671aa708
NN
152
153 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
154 ac_prev=datadir ;;
155 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
156 | --da=*)
af71363e 157 datadir="$ac_optarg" ;;
671aa708
NN
158
159 -disable-* | --disable-*)
af71363e 160 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
671aa708 161 # Reject names that are not valid shell variable names.
af71363e
AS
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" ;;
671aa708
NN
167
168 -enable-* | --enable-*)
af71363e 169 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
671aa708 170 # Reject names that are not valid shell variable names.
af71363e
AS
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 *=*) ;;
671aa708
NN
177 *) ac_optarg=yes ;;
178 esac
af71363e 179 eval "enable_${ac_feature}='$ac_optarg'" ;;
671aa708
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=*)
af71363e 188 exec_prefix="$ac_optarg" ;;
671aa708
NN
189
190 -gas | --gas | --ga | --g)
191 # Obsolete; use --with-gas.
192 with_gas=yes ;;
193
af71363e
AS
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 ;;
671aa708
NN
248
249 -host | --host | --hos | --ho)
af71363e 250 ac_prev=host ;;
671aa708 251 -host=* | --host=* | --hos=* | --ho=*)
af71363e 252 host="$ac_optarg" ;;
671aa708
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=*)
af71363e 259 includedir="$ac_optarg" ;;
671aa708
NN
260
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
262 ac_prev=infodir ;;
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
af71363e 264 infodir="$ac_optarg" ;;
671aa708
NN
265
266 -libdir | --libdir | --libdi | --libd)
267 ac_prev=libdir ;;
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
af71363e 269 libdir="$ac_optarg" ;;
671aa708
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=*)
af71363e 276 libexecdir="$ac_optarg" ;;
671aa708
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=*)
af71363e 285 localstatedir="$ac_optarg" ;;
671aa708
NN
286
287 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
288 ac_prev=mandir ;;
289 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
af71363e 290 mandir="$ac_optarg" ;;
671aa708
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 \
af71363e 297 | --no-cr | --no-c)
671aa708
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=*)
af71363e 311 oldincludedir="$ac_optarg" ;;
671aa708
NN
312
313 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
314 ac_prev=prefix ;;
315 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
af71363e 316 prefix="$ac_optarg" ;;
671aa708
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=*)
af71363e 323 program_prefix="$ac_optarg" ;;
671aa708
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=*)
af71363e 330 program_suffix="$ac_optarg" ;;
671aa708
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=*)
af71363e 347 program_transform_name="$ac_optarg" ;;
671aa708
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=*)
af71363e 357 sbindir="$ac_optarg" ;;
671aa708
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=*)
af71363e 368 sharedstatedir="$ac_optarg" ;;
671aa708
NN
369
370 -site | --site | --sit)
371 ac_prev=site ;;
372 -site=* | --site=* | --sit=*)
af71363e 373 site="$ac_optarg" ;;
671aa708
NN
374
375 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
376 ac_prev=srcdir ;;
377 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
af71363e 378 srcdir="$ac_optarg" ;;
671aa708
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=*)
af71363e 385 sysconfdir="$ac_optarg" ;;
671aa708
NN
386
387 -target | --target | --targe | --targ | --tar | --ta | --t)
af71363e 388 ac_prev=target ;;
671aa708 389 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
af71363e 390 target="$ac_optarg" ;;
671aa708
NN
391
392 -v | -verbose | --verbose | --verbos | --verbo | --verb)
393 verbose=yes ;;
394
af71363e
AS
395 -version | --version | --versio | --versi | --vers)
396 echo "configure generated by autoconf version 2.13"
397 exit 0 ;;
671aa708
NN
398
399 -with-* | --with-*)
af71363e 400 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
671aa708 401 # Reject names that are not valid shell variable names.
af71363e
AS
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
671aa708 405 ac_package=`echo $ac_package| sed 's/-/_/g'`
af71363e
AS
406 case "$ac_option" in
407 *=*) ;;
671aa708
NN
408 *) ac_optarg=yes ;;
409 esac
af71363e 410 eval "with_${ac_package}='$ac_optarg'" ;;
671aa708
NN
411
412 -without-* | --without-*)
af71363e 413 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
671aa708 414 # Reject names that are not valid shell variable names.
af71363e
AS
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" ;;
671aa708
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=*)
af71363e 430 x_includes="$ac_optarg" ;;
671aa708
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=*)
af71363e 437 x_libraries="$ac_optarg" ;;
671aa708 438
af71363e 439 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
671aa708
NN
440 ;;
441
442 *)
af71363e
AS
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"
671aa708
NN
450 ;;
451
452 esac
453done
454
455if test -n "$ac_prev"; then
af71363e 456 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fb0103e5 457fi
671aa708 458
af71363e
AS
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
fb0103e5 480
af71363e
AS
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
671aa708 485do
af71363e
AS
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" ;;
671aa708
NN
494 esac
495done
496
af71363e
AS
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
0b0dc272 506
af71363e
AS
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
671aa708 511
af71363e
AS
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
671aa708
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.
af71363e
AS
520 ac_prog=$0
521 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
522 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
671aa708
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
af71363e 532 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
671aa708 533 else
af71363e
AS
534 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
535 fi
0b0dc272 536fi
af71363e 537srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
0b0dc272 538
671aa708 539# Prefer explicitly selected file to automatically selected ones.
bba5e0ca
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"
671aa708
NN
545 fi
546fi
547for ac_site_file in $CONFIG_SITE; do
548 if test -r "$ac_site_file"; then
af71363e 549 echo "loading site script $ac_site_file"
671aa708
NN
550 . "$ac_site_file"
551 fi
552done
553
554if test -r "$cache_file"; then
af71363e
AS
555 echo "loading cache $cache_file"
556 . $cache_file
671aa708 557else
af71363e
AS
558 echo "creating cache $cache_file"
559 > $cache_file
671aa708
NN
560fi
561
562ac_ext=c
af71363e 563# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
671aa708 564ac_cpp='$CPP $CPPFLAGS'
af71363e
AS
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
671aa708
NN
582
583
d02c69be 584
671aa708 585ac_aux_dir=
4c4a5bbc 586for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
671aa708
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
af71363e 598 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
671aa708 599fi
af71363e
AS
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.
671aa708
NN
603
604
af71363e
AS
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.
671aa708
NN
617
618# The aliases save the names the user supplied, while $host etc.
619# will get canonicalized.
af71363e
AS
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
e1888513 632echo "configure:633: checking host system type" >&5
af71363e
AS
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
e1888513 653echo "configure:654: checking target system type" >&5
af71363e
AS
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
e1888513 671echo "configure:672: checking build system type" >&5
af71363e
AS
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" &&
671aa708
NN
689 test "$program_prefix$program_suffix$program_transform_name" = \
690 NONENONEs,x,x, &&
691 program_prefix=${target_alias}-
af71363e
AS
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
671aa708 703test "$program_prefix" != NONE &&
af71363e 704 program_transform_name="s,^,${program_prefix},; $program_transform_name"
671aa708
NN
705# Use a double $ so make ignores it.
706test "$program_suffix" != NONE &&
af71363e
AS
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,"
671aa708
NN
711
712
775956d0
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.
af71363e 725echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
e1888513 726echo "configure:727: checking for a BSD compatible install" >&5
775956d0 727if test -z "$INSTALL"; then
af71363e
AS
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
775956d0 742 if test $ac_prog = install &&
af71363e 743 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
775956d0
NN
744 # AIX install. It has an incompatible calling convention.
745 :
746 else
af71363e
AS
747 ac_cv_path_install="$ac_dir/$ac_prog -c"
748 break 2
775956d0
NN
749 fi
750 fi
751 done
af71363e
AS
752 ;;
753 esac
754 done
755 IFS="$ac_save_IFS"
775956d0
NN
756
757fi
758 if test "${ac_cv_path_install+set}" = set; then
af71363e 759 INSTALL="$ac_cv_path_install"
775956d0
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.
af71363e 765 INSTALL="$ac_install_sh"
775956d0
NN
766 fi
767fi
af71363e 768echo "$ac_t""$INSTALL" 1>&6
775956d0
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
af71363e 774test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
775956d0
NN
775
776test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
777
af71363e 778echo $ac_n "checking whether ln works""... $ac_c" 1>&6
e1888513 779echo "configure:780: checking whether ln works" >&5
af71363e
AS
780if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
781 echo $ac_n "(cached) $ac_c" 1>&6
ad6717df
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"
af71363e 796 echo "$ac_t""no, using $LN" 1>&6
ad6717df
PB
797else
798 LN="$acx_cv_prog_LN"
af71363e 799 echo "$ac_t""yes" 1>&6
ad6717df
PB
800fi
801
af71363e 802echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
e1888513 803echo "configure:804: checking whether ln -s works" >&5
af71363e
AS
804if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
805 echo $ac_n "(cached) $ac_c" 1>&6
fb0103e5 806else
af71363e
AS
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
819else
820 echo "$ac_t""no" 1>&6
148907ea
PB
821fi
822
775956d0 823
79c06341 824### we might need to use some other shell than /bin/sh for running subshells
79c06341
JL
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*)
671aa708
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
79c06341
JL
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
79c06341
JL
858progname=$0
859# if PWD already has a value, it is probably wrong.
671aa708 860if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
79c06341 861
b348267b 862# Export original configure arguments for use by sub-configures. These
eeae7b41
DJ
863# will be expanded by make, so quote '$'.
864tmp="$progname $@"
865sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
866$tmp
b348267b 867EOF_SED
eeae7b41
DJ
868TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
869rm -f conftestsed.out
3dfabf63 870
cc1e60ea 871
671aa708 872moveifchange=${srcdir}/move-if-change
79c06341 873
ee6a22df
L
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
671aa708
NN
882# Set srcdir to "." if that's what it is.
883# This is important for multilib support.
884pwd=`${PWDCMD-pwd}`
671aa708
NN
885if test "${pwd}" = "${srcpwd}" ; then
886 srcdir=.
79c06341
JL
887fi
888
671aa708 889topsrcdir=$srcpwd
5d4a5ee6 890
671aa708 891extra_host_args=
afabd8e6 892
671aa708
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.
79c06341 896
af71363e 897# Subdirs will be configured in the order listed in build_configdirs,
671aa708 898# configdirs, or target_configdirs; see the serialization section below.
79c06341 899
af71363e
AS
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
671aa708 902# the Makefile, whether or not it's implicitly specified here.
79c06341 903
671aa708
NN
904# Double entries in build_configdirs, configdirs, or target_configdirs may
905# cause circular dependencies and break everything horribly.
79c06341 906
23f6b2f9
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
71b5d516 913build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
23f6b2f9 914
671aa708
NN
915# these libraries are used by various programs built for the host environment
916#
a4b6c45a 917host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
671aa708 918
671aa708
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.
5395b47b 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"
671aa708
NN
925
926# libgcj represents the runtime libraries only used by gcj.
927libgcj="target-libffi \
671aa708
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#
4dbda6f0 935target_libraries="target-libiberty \
671aa708
NN
936 target-libgloss \
937 target-newlib \
cb543528 938 target-libstdc++-v3 \
6de9cd9a 939 target-libmudflap \
77008252 940 target-libssp \
6de9cd9a 941 target-libgfortran \
7cd0cf9c 942 target-boehm-gc \
77d187bc 943 ${libgcj} \
d9cdb878 944 target-libobjc \
953ff289
DN
945 target-libada \
946 target-libgomp"
671aa708 947
4dbda6f0
NN
948# these tools are built using the target libraries, and are intended to
949# run only in the target environment
671aa708 950#
4dbda6f0 951# note: any program that *uses* libraries that are in the "target_libraries"
671aa708
NN
952# list belongs in this list. those programs are also very likely
953# candidates for the "native_only" list which follows
954#
97286f7f 955target_tools="target-examples target-groff target-gperf target-rda"
79c06341 956
671aa708 957################################################################################
79c06341 958
671aa708
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.
671aa708 964configdirs=`echo ${host_libs} ${host_tools}`
4dbda6f0 965target_configdirs=`echo ${target_libraries} ${target_tools}`
71b5d516 966build_configdirs=`echo ${build_libs} ${build_tools}`
8b87bb96 967
671aa708 968################################################################################
79c06341 969
671aa708 970srcname="gnu development package"
79c06341 971
671aa708
NN
972# This gets set non-empty for some net releases of packages.
973appdirs=""
79c06341 974
671aa708
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
79c06341 979else
671aa708 980 is_cross_compiler=yes
af71363e 981fi
79c06341 982
b4acb5ef 983# Find the build and target subdir names.
8b87bb96
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
af71363e 999
2e9e6f68
DJ
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.
8b87bb96 1010build_subdir="build-${build_noncanonical}"
2e9e6f68
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"
af71363e
AS
1017fi
1018
215c351a
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
8b87bb96
NN
1026# No prefix.
1027target_subdir=${target_noncanonical}
af71363e 1028
79c06341 1029
671aa708
NN
1030# Skipdirs are removed silently.
1031skipdirs=
1032# Noconfigdirs are removed loudly.
1033noconfigdirs=""
79c06341 1034
671aa708
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"
79c06341
JL
1040fi
1041
671aa708
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"
79c06341
JL
1047fi
1048
af71363e 1049# some tools are so dependent upon X11 that if we're not building with X,
671aa708 1050# it's not even worth trying to configure, much less build, that tool.
79c06341 1051
671aa708
NN
1052case ${with_x} in
1053 yes | "") ;; # the default value for this tree is that X11 is available
1054 no)
b4f96efe 1055 skipdirs="${skipdirs} tk itcl libgui"
671aa708 1056 # We won't be able to build gdbtk without X.
af71363e 1057 enable_gdbtk=no
671aa708
NN
1058 ;;
1059 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1060esac
79c06341 1061
671aa708 1062# Some tools are only suitable for building in a "native" situation.
af71363e 1063# Remove these if host!=target.
9e299237 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"
79c06341 1065
671aa708
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
79c06341 1074
671aa708
NN
1075# If both --with-headers and --with-libs are specified, default to
1076# --without-newlib.
ee6a22df
L
1077if test x"${with_headers}" != x && test x"${with_headers}" != xno \
1078 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
671aa708
NN
1079 if test x"${with_newlib}" = x ; then
1080 with_newlib=no
1081 fi
79c06341
JL
1082fi
1083
671aa708
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
79c06341 1089
671aa708 1090# Configure extra directories which are host specific
79c06341 1091
671aa708
NN
1092case "${host}" in
1093 *-cygwin*)
1094 configdirs="$configdirs libtermcap" ;;
1095esac
79c06341 1096
4fab7234
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
af71363e 1101# Remove more programs from consideration, based on the host or
671aa708
NN
1102# target this usually means that a port of the program doesn't
1103# exist yet.
ec8d6ddc 1104
671aa708
NN
1105case "${host}" in
1106 hppa*64*-*-*)
1107 noconfigdirs="$noconfigdirs byacc"
1108 ;;
f2a0e225 1109 i[3456789]86-*-vsta)
b4f96efe 1110 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
671aa708 1111 ;;
f2a0e225 1112 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
b4f96efe 1113 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
3aa83176 1114 ;;
f2a0e225 1115 i[3456789]86-*-mingw32*)
b4f96efe 1116 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
b91f0a41 1117 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
3aa83176 1118 ;;
f2a0e225 1119 i[3456789]86-*-beos*)
b4f96efe 1120 noconfigdirs="$noconfigdirs tk itcl libgui gdb"
3aa83176 1121 ;;
671aa708 1122 *-*-cygwin*)
a22c2d8d 1123 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
671aa708
NN
1124 ;;
1125 *-*-netbsd*)
a22c2d8d 1126 noconfigdirs="$noconfigdirs rcs"
671aa708
NN
1127 ;;
1128 ppc*-*-pe)
b4f96efe 1129 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
671aa708
NN
1130 ;;
1131 powerpc-*-beos*)
b4f96efe 1132 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
671aa708 1133 ;;
671aa708 1134esac
ec8d6ddc 1135
6de9cd9a 1136
d9cdb878
AC
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
af71363e
AS
1143fi
1144
d9cdb878 1145if test "${ENABLE_LIBADA}" != "yes" ; then
5395b47b 1146 noconfigdirs="$noconfigdirs gnattools"
d9cdb878
AC
1147fi
1148
ef0087a7
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
af71363e
AS
1155fi
1156
ef0087a7 1157
671aa708
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
ec8d6ddc 1173
6de9cd9a 1174
27079765
AH
1175# Disable libmudflap on some systems.
1176if test x$enable_libmudflap = x ; then
dfcada9a 1177 case "${target}" in
670cbfcf 1178 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
98a5bb3b 1179 # Enable libmudflap by default in GNU and friends.
dfcada9a 1180 ;;
a3e8d8b4
LR
1181 *-*-freebsd*)
1182 # Enable libmudflap by default in FreeBSD.
1183 ;;
dfcada9a
MM
1184 *)
1185 # Disable it by default everywhere else.
1186 noconfigdirs="$noconfigdirs target-libmudflap"
1187 ;;
1188 esac
27079765 1189fi
6de9cd9a 1190
27079765
AH
1191# Disable libgomp on non POSIX hosted systems.
1192if test x$enable_libgomp = x ; then
953ff289
DN
1193 # Enable libgomp by default on hosted POSIX systems.
1194 case "${target}" in
670cbfcf 1195 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
953ff289
DN
1196 ;;
1197 *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
1198 ;;
04879af3 1199 *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
953ff289 1200 ;;
cac90078 1201 *-*-darwin* | *-*-aix*)
953ff289
DN
1202 ;;
1203 *)
1204 noconfigdirs="$noconfigdirs target-libgomp"
1205 ;;
1206 esac
27079765 1207fi
953ff289 1208
6de9cd9a 1209
671aa708
NN
1210case "${target}" in
1211 *-*-chorusos)
cb253473 1212 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
671aa708 1213 ;;
42c1cd8a 1214 powerpc-*-darwin* | i[3456789]86-*-darwin*)
55eb837d 1215 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
9c8f9ec2 1216 noconfigdirs="$noconfigdirs sim target-rda"
940cde4d 1217 ;;
42c1cd8a
AT
1218 *-*-darwin*)
1219 noconfigdirs="$noconfigdirs ld gas gdb gprof"
1220 noconfigdirs="$noconfigdirs sim target-rda"
1221 noconfigdirs="$noconfigdirs ${libgcj}"
1222 ;;
671aa708 1223 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
cb253473 1224 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
671aa708 1225 ;;
c3f84f61 1226 *-*-freebsd*)
6de9cd9a
DN
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 *)
cb253473 1238 noconfigdirs="$noconfigdirs ${libgcj}"
6de9cd9a
DN
1239 ;;
1240 esac
1241 ;;
ef4e7569
US
1242 *-*-kaos*)
1243 # Remove unsupported stuff on all kaOS configurations.
cb253473 1244 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
ef4e7569
US
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 ;;
671aa708
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*) ;;
0590b963 1256 arm*-*-netbsdelf*) ;;
671aa708 1257 *)
cb253473 1258 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1259 ;;
1260 esac
1261 ;;
61fec9ff 1262 *-*-netware*)
cb253473 1263 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
671aa708
NN
1264 ;;
1265 *-*-rtems*)
cb253473 1266 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1267 ;;
a8ba31f2
EC
1268 # The tpf target doesn't support gdb yet.
1269 *-*-tpf*)
cb253473 1270 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
a8ba31f2 1271 ;;
5785c0ed 1272 *-*-uclinux*)
cb253473 1273 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
5785c0ed 1274 ;;
671aa708 1275 *-*-vxworks*)
cb253473 1276 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
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*)
cb253473 1285 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
671aa708
NN
1286 ;;
1287 alpha*-*-linux*)
1288 # newlib is not 64 bit ready
1289 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1290 ;;
671aa708
NN
1291 alpha*-*-*)
1292 # newlib is not 64 bit ready
cb253473 1293 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
671aa708 1294 ;;
33952f6f 1295 am33_2.0-*-linux*)
cb253473 1296 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
33952f6f 1297 ;;
671aa708 1298 sh-*-linux*)
cb253473 1299 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
af71363e 1300 ;;
671aa708 1301 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
cb253473 1302 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1303 noconfigdirs="$noconfigdirs target-examples"
1304 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
b4f96efe 1305 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
671aa708
NN
1306 noconfigdirs="$noconfigdirs expect dejagnu"
1307 # the C++ libraries don't build on top of CE's C libraries
cb543528 1308 noconfigdirs="$noconfigdirs target-libstdc++-v3"
671aa708
NN
1309 noconfigdirs="$noconfigdirs target-newlib"
1310 case "${host}" in
1311 *-*-cygwin*) ;; # keep gdb and readline
aa9c3ab4 1312 *) noconfigdirs="$noconfigdirs gdb readline"
671aa708
NN
1313 ;;
1314 esac
1315 ;;
1316 arc-*-*)
cb253473 1317 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1318 ;;
ee6a22df 1319 arm-semi-aof )
ee6a22df 1320 ;;
671aa708 1321 arm-*-coff | strongarm-*-coff | xscale-*-coff)
cb253473 1322 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708 1323 ;;
b3f8d95d 1324 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
671aa708
NN
1325 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1326 ;;
077fc835
KH
1327 arm*-*-linux-gnueabi)
1328 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1329 noconfigdirs="$noconfigdirs target-libjava target-libobjc"
1330 ;;
972974fc 1331 arm*-*-symbianelf*)
cb253473 1332 noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
972974fc 1333 ;;
671aa708 1334 arm-*-pe*)
cb253473 1335 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1336 ;;
671aa708 1337 thumb-*-coff)
cb253473 1338 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1339 ;;
1340 thumb-*-elf)
cb253473 1341 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1342 ;;
671aa708 1343 thumb-*-pe)
cb253473 1344 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1345 ;;
1346 arm-*-riscix*)
cb253473 1347 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
671aa708
NN
1348 ;;
1349 avr-*-*)
cb253473 1350 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1351 ;;
6b65a26d 1352 bfin-*-*)
8b3c6c5a 1353 noconfigdirs="$noconfigdirs gdb"
61efc800 1354 if test x${is_cross_compiler} != xno ; then
6b65a26d
CM
1355 target_configdirs="${target_configdirs} target-bsp target-cygmon"
1356 fi
1357 ;;
671aa708 1358 c4x-*-* | tic4x-*-*)
cb253473 1359 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1360 ;;
1361 c54x*-*-* | tic54x-*-*)
cb253473 1362 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
671aa708 1363 ;;
40d64b5a 1364 cris-*-* | crisv32-*-*)
4fab7234 1365 unsupported_languages="$unsupported_languages java"
40d64b5a 1366 case "${target}" in
c2e0d3a9 1367 *-*-aout)
7f26dfa3 1368 unsupported_languages="$unsupported_languages fortran"
4fab7234 1369 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
c2e0d3a9 1370 *-*-elf)
7f26dfa3 1371 unsupported_languages="$unsupported_languages fortran"
789ec619 1372 noconfigdirs="$noconfigdirs target-boehm-gc";;
c2e0d3a9 1373 *-*-linux*)
789ec619 1374 noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
40d64b5a 1375 *)
7f26dfa3 1376 unsupported_languages="$unsupported_languages fortran"
cb253473 1377 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
40d64b5a 1378 esac
671aa708 1379 ;;
25b656e7 1380 crx-*-*)
cb253473 1381 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
25b656e7 1382 ;;
671aa708 1383 d10v-*-*)
cb253473 1384 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1385 ;;
1386 d30v-*-*)
cb253473 1387 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1388 ;;
1389 fr30-*-elf*)
cb253473 1390 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1391 ;;
1392 frv-*-*)
cb253473 1393 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1394 ;;
1395 h8300*-*-*)
cb253473 1396 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1397 ;;
1398 h8500-*-*)
cb253473 1399 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1400 ;;
ee6a22df 1401 hppa1.1-*-osf* | hppa1.1-*-bsd* )
ee6a22df 1402 ;;
671aa708
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 ;;
3e732ba0
JDA
1409 parisc*-*-linux* | hppa*-*-linux*)
1410 ;;
671aa708 1411 hppa*-*-*elf* | \
671aa708
NN
1412 hppa*-*-lites* | \
1413 hppa*-*-openbsd* | \
1414 hppa*64*-*-*)
cb253473 1415 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708 1416 ;;
2a332582
JDA
1417 hppa*-hp-hpux11*)
1418 noconfigdirs="$noconfigdirs ld shellutils"
1419 ;;
671aa708
NN
1420 hppa*-*-*)
1421 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1422 # build on HP-UX 10.20.
cb253473 1423 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
671aa708 1424 ;;
fb87ad5d 1425 i960-*-*)
cb253473 1426 noconfigdirs="$noconfigdirs ${libgcj} gdb"
fb87ad5d 1427 ;;
671aa708
NN
1428 ia64*-*-elf*)
1429 # No gdb support yet.
b4f96efe 1430 noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
671aa708
NN
1431 ;;
1432 ia64*-**-hpux*)
1433 # No gdb or ld support yet.
cb253473 1434 noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
671aa708 1435 ;;
ee6a22df 1436 i370-*-opened*)
ee6a22df 1437 ;;
f2a0e225 1438 i[3456789]86-*-coff | i[3456789]86-*-elf)
cb253473 1439 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708 1440 ;;
f2a0e225 1441 i[3456789]86-*-linux*)
671aa708
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*)
cb253473 1446 noconfigdirs="$noconfigdirs ${libgcj}";;
671aa708
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
3aa83176 1452 noconfigdirs="$noconfigdirs target-newlib"
671aa708
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 ;;
f2a0e225 1460 i[3456789]86-*-mingw32*)
b91f0a41
CV
1461 target_configdirs="$target_configdirs target-winsup"
1462 noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
af71363e 1463 ;;
671aa708
NN
1464 *-*-cygwin*)
1465 target_configdirs="$target_configdirs target-libtermcap target-winsup"
cb253473 1466 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
801e2270 1467 # always build newlib if winsup directory is present.
b91f0a41 1468 if test -d "$srcdir/winsup/cygwin"; then
801e2270 1469 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ee6a22df 1470 elif test -d "$srcdir/newlib"; then
b91f0a41 1471 echo "Warning: winsup/cygwin is missing so newlib can't be built."
801e2270 1472 fi
af71363e 1473 ;;
ee6a22df
L
1474 i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1475 i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
ee6a22df 1476 ;;
f2a0e225 1477 i[3456789]86-*-pe)
cb253473 1478 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1479 ;;
f2a0e225 1480 i[3456789]86-*-sco3.2v5*)
671aa708
NN
1481 # The linker does not yet know about weak symbols in COFF,
1482 # and is not configured to handle mixed ELF and COFF.
cb253473 1483 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
671aa708 1484 ;;
f2a0e225 1485 i[3456789]86-*-sco*)
cb253473 1486 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708 1487 ;;
f2a0e225 1488 i[3456789]86-*-solaris2*)
671aa708
NN
1489 noconfigdirs="$noconfigdirs target-libgloss"
1490 ;;
f2a0e225 1491 i[3456789]86-*-sysv4*)
cb253473 1492 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1493 ;;
f2a0e225 1494 i[3456789]86-*-beos*)
cb253473 1495 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
3aa83176 1496 ;;
d1f8db0c
PB
1497 i[3456789]86-*-rdos*)
1498 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1499 ;;
fb87ad5d 1500 m32r-*-*)
cb253473 1501 noconfigdirs="$noconfigdirs ${libgcj}"
fb87ad5d 1502 ;;
671aa708 1503 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
cb253473 1504 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1505 ;;
1506 m68k-*-elf*)
cb253473 1507 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1508 ;;
1509 m68k-*-coff*)
cb253473 1510 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
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-*-*)
4fab7234 1518 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
7f26dfa3 1519 unsupported_languages="$unsupported_languages fortran java"
671aa708
NN
1520 ;;
1521 mn10200-*-*)
cb253473 1522 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1523 ;;
1524 mn10300-*-*)
cb253473 1525 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708 1526 ;;
ab34901f 1527 mt-*-*)
79dd769c
AH
1528 noconfigdirs="$noconfigdirs sim"
1529 ;;
671aa708
NN
1530 powerpc-*-aix*)
1531 # copied from rs6000-*-* entry
cb253473 1532 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1533 ;;
1534 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1535 target_configdirs="$target_configdirs target-winsup"
cb253473 1536 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
671aa708
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*)
cb253473 1542 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
671aa708
NN
1543 ;;
1544 powerpc-*-beos*)
cb253473 1545 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
671aa708 1546 ;;
671aa708 1547 powerpc-*-eabi)
cb253473 1548 noconfigdirs="$noconfigdirs ${libgcj}"
ee6a22df
L
1549 ;;
1550 powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
671aa708 1551 ;;
671aa708 1552 rs6000-*-lynxos*)
cb253473 1553 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
671aa708
NN
1554 ;;
1555 rs6000-*-aix*)
cb253473 1556 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1557 ;;
1558 rs6000-*-*)
cb253473 1559 noconfigdirs="$noconfigdirs gprof ${libgcj}"
671aa708
NN
1560 ;;
1561 m68k-apollo-*)
cb253473 1562 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
671aa708
NN
1563 ;;
1564 mips*-*-irix5*)
cb253473 1565 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1566 ;;
1567 mips*-*-irix6*)
671aa708
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>
cb253473 1572 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708 1573 ;;
671aa708 1574 mips*-*-bsd*)
cb253473 1575 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708 1576 ;;
d0fe5ad3 1577 mips64*-*-linux*)
1ee4c5a0 1578 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
d0fe5ad3 1579 ;;
671aa708
NN
1580 mips*-*-linux*)
1581 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1582 ;;
1583 mips*-*-*)
cb253473 1584 noconfigdirs="$noconfigdirs gprof ${libgcj}"
671aa708
NN
1585 ;;
1586 romp-*-*)
cb253473 1587 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
671aa708 1588 ;;
669f01d8 1589 sh-*-* | sh64-*-*)
671aa708 1590 case "${host}" in
f2a0e225
KC
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
671aa708
NN
1594 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1595 esac
cb253473 1596 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1597 ;;
671aa708 1598 sparc-*-elf*)
cb253473 1599 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1600 ;;
1601 sparc64-*-elf*)
cb253473 1602 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1603 ;;
1604 sparclite-*-*)
cb253473 1605 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1606 ;;
1607 sparc-*-sunos4*)
cb253473 1608 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
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 ;;
bba5e0ca 1615 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
cb253473 1616 noconfigdirs="$noconfigdirs ${libgcj}"
bba5e0ca 1617 ;;
671aa708
NN
1618 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1619 ;;
85d9c13c 1620 spu-*-*)
ea6f5c57 1621 skipdirs="target-libssp"
85d9c13c 1622 ;;
671aa708 1623 v810-*-*)
cb253473 1624 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
671aa708
NN
1625 ;;
1626 v850-*-*)
cb253473 1627 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1628 ;;
1629 v850e-*-*)
cb253473 1630 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1631 ;;
1632 v850ea-*-*)
cb253473 1633 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1634 ;;
1635 vax-*-vms)
cb253473 1636 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
671aa708
NN
1637 ;;
1638 vax-*-*)
cb253473 1639 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
671aa708 1640 ;;
0d4f1b4e 1641 xtensa-*-*)
cb253473 1642 noconfigdirs="$noconfigdirs ${libgcj}"
0d4f1b4e 1643 ;;
671aa708 1644 ip2k-*-*)
cb253473 1645 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1646 ;;
c3f84f61 1647 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
671aa708
NN
1648 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1649 ;;
1650 *-*-lynxos*)
cb253473 1651 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
af71363e 1652 ;;
671aa708 1653 *-*-*)
cb253473 1654 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1655 ;;
1656esac
79c06341 1657
671aa708
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
671aa708
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"
671aa708
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 ;;
f2a0e225 1736 i[3456789]86-*-sysv5*)
671aa708
NN
1737 host_makefile_frag="config/mh-sysv5"
1738 ;;
f2a0e225 1739 i[3456789]86-*-dgux*)
671aa708
NN
1740 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1741 host_makefile_frag="config/mh-dgux386"
1742 ;;
f2a0e225 1743 i[3456789]86-ncr-sysv4.3*)
671aa708
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 ;;
f2a0e225 1748 i[3456789]86-ncr-sysv4*)
671aa708
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 ;;
f2a0e225 1757 i[3456789]86-*-sco3.2v5*)
671aa708 1758 ;;
f2a0e225 1759 i[3456789]86-*-sco*)
671aa708
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 ;;
f2a0e225 1765 i[3456789]86-*-udk*)
671aa708
NN
1766 host_makefile_frag="config/mh-sysv5"
1767 ;;
f2a0e225 1768 i[3456789]86-*-solaris2*)
671aa708
NN
1769 host_makefile_frag="config/mh-sysv4"
1770 ;;
f2a0e225 1771 i[3456789]86-*-msdosdjgpp*)
671aa708
NN
1772 host_makefile_frag="config/mh-djgpp"
1773 ;;
1774 *-cygwin*)
1775 host_makefile_frag="config/mh-cygwin"
1776 ;;
1777 *-mingw32*)
671aa708
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 ;;
45f366ab 1805 powerpc-*-darwin*)
be8fff81
RB
1806 host_makefile_frag="config/mh-ppc-darwin"
1807 ;;
d19bca38
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 ;;
671aa708
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 ;;
95c53c62
RS
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 ;;
671aa708
NN
1826esac
1827fi
1828
55ffb5ed
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
55ffb5ed
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}
55ffb5ed
NN
1857
1858else
fb0103e5
RG
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...
a4b9e93e 1866
fb0103e5
RG
1867 CC_FOR_BUILD="\$(CC)"
1868 # Extract the first word of "gcc", so it can be a program name with args.
1869set dummy gcc; ac_word=$2
af71363e 1870echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 1871echo "configure:1872: checking for $ac_word" >&5
af71363e
AS
1872if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1873 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1874else
1875 if test -n "$CC"; then
1876 ac_cv_prog_CC="$CC" # Let the user override the test.
1877else
af71363e
AS
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"
0b0dc272 1888fi
0b0dc272 1889fi
af71363e
AS
1890CC="$ac_cv_prog_CC"
1891if test -n "$CC"; then
1892 echo "$ac_t""$CC" 1>&6
0b0dc272 1893else
af71363e 1894 echo "$ac_t""no" 1>&6
0b0dc272
AM
1895fi
1896
55ffb5ed
NN
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
af71363e 1900echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 1901echo "configure:1902: checking for $ac_word" >&5
af71363e
AS
1902if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1904else
1905 if test -n "$CC"; then
1906 ac_cv_prog_CC="$CC" # Let the user override the test.
1907else
af71363e 1908 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
0b0dc272 1909 ac_prog_rejected=no
af71363e
AS
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"
55ffb5ed
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
af71363e 1927 if test $# -gt 0; then
55ffb5ed
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
af71363e
AS
1932 set dummy "$ac_dir/$ac_word" "$@"
1933 shift
1934 ac_cv_prog_CC="$@"
55ffb5ed
NN
1935 fi
1936fi
1937fi
1938fi
af71363e 1939CC="$ac_cv_prog_CC"
55ffb5ed 1940if test -n "$CC"; then
af71363e 1941 echo "$ac_t""$CC" 1>&6
55ffb5ed 1942else
af71363e 1943 echo "$ac_t""no" 1>&6
55ffb5ed
NN
1944fi
1945
af71363e
AS
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
e1888513 1952echo "configure:1953: checking for $ac_word" >&5
af71363e
AS
1953if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1954 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1955else
1956 if test -n "$CC"; then
1957 ac_cv_prog_CC="$CC" # Let the user override the test.
1958else
af71363e
AS
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"
55ffb5ed
NN
1969fi
1970fi
af71363e 1971CC="$ac_cv_prog_CC"
55ffb5ed 1972if test -n "$CC"; then
af71363e 1973 echo "$ac_t""$CC" 1>&6
a4b9e93e 1974else
af71363e 1975 echo "$ac_t""no" 1>&6
55ffb5ed 1976fi
af71363e
AS
1977 ;;
1978 esac
0b0dc272 1979 fi
af71363e 1980 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fb0103e5 1981fi
af71363e
AS
1982
1983echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
e1888513 1984echo "configure:1985: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
af71363e
AS
1985
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
e1888513 1995#line 1996 "configure"
af71363e
AS
1996#include "confdefs.h"
1997
1998main(){return(0);}
1999EOF
e1888513 2000if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
af71363e
AS
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
2005 else
2006 ac_cv_prog_cc_cross=yes
2007 fi
55ffb5ed 2008else
af71363e
AS
2009 echo "configure: failed program was:" >&5
2010 cat conftest.$ac_ext >&5
2011 ac_cv_prog_cc_works=no
fb0103e5 2012fi
af71363e
AS
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
a4b9e93e 2020
af71363e
AS
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
e1888513 2026echo "configure:2027: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
af71363e
AS
2027echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2028cross_compiling=$ac_cv_prog_cc_cross
0b0dc272 2029
af71363e 2030echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
e1888513 2031echo "configure:2032: checking whether we are using GNU C" >&5
af71363e
AS
2032if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2033 echo $ac_n "(cached) $ac_c" 1>&6
0b0dc272 2034else
af71363e
AS
2035 cat > conftest.c <<EOF
2036#ifdef __GNUC__
2037 yes;
2038#endif
2039EOF
e1888513 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
af71363e 2041 ac_cv_prog_gcc=yes
0b0dc272 2042else
af71363e
AS
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
fb0103e5 2051else
af71363e
AS
2052 GCC=
2053fi
0b0dc272 2054
af71363e
AS
2055ac_test_CFLAGS="${CFLAGS+set}"
2056ac_save_CFLAGS="$CFLAGS"
2057CFLAGS=
2058echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
e1888513 2059echo "configure:2060: checking whether ${CC-cc} accepts -g" >&5
af71363e
AS
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
55ffb5ed
NN
2065 ac_cv_prog_cc_g=yes
2066else
af71363e 2067 ac_cv_prog_cc_g=no
a4b9e93e 2068fi
af71363e
AS
2069rm -f conftest*
2070
0b0dc272 2071fi
af71363e
AS
2072
2073echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
55ffb5ed 2074if test "$ac_test_CFLAGS" = set; then
af71363e 2075 CFLAGS="$ac_save_CFLAGS"
55ffb5ed
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
23f6b2f9
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
af71363e
AS
2115if test $host != $build; then
2116 ac_tool_prefix=${host_alias}-
2117else
2118 ac_tool_prefix=
2119fi
23f6b2f9
PB
2120
2121
55ffb5ed 2122
af71363e 2123# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
55ffb5ed 2124set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
af71363e 2125echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 2126echo "configure:2127: checking for $ac_word" >&5
af71363e
AS
2127if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2128 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
2129else
2130 if test -n "$GNATBIND"; then
2131 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2132else
af71363e
AS
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"
55ffb5ed
NN
2143fi
2144fi
af71363e 2145GNATBIND="$ac_cv_prog_GNATBIND"
55ffb5ed 2146if test -n "$GNATBIND"; then
af71363e 2147 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2148else
af71363e 2149 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2150fi
2151
af71363e 2152
55ffb5ed 2153if test -z "$ac_cv_prog_GNATBIND"; then
af71363e 2154if test -n "$ac_tool_prefix"; then
55ffb5ed
NN
2155 # Extract the first word of "gnatbind", so it can be a program name with args.
2156set dummy gnatbind; ac_word=$2
af71363e 2157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 2158echo "configure:2159: checking for $ac_word" >&5
af71363e
AS
2159if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2160 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed 2161else
af71363e
AS
2162 if test -n "$GNATBIND"; then
2163 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
55ffb5ed 2164else
af71363e
AS
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"
55ffb5ed
NN
2176fi
2177fi
af71363e
AS
2178GNATBIND="$ac_cv_prog_GNATBIND"
2179if test -n "$GNATBIND"; then
2180 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2181else
af71363e 2182 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2183fi
2184
2185else
af71363e
AS
2186 GNATBIND="no"
2187fi
55ffb5ed
NN
2188fi
2189
af71363e 2190echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
e1888513 2191echo "configure:2192: checking whether compiler driver understands Ada" >&5
af71363e
AS
2192if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
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.
1db673ca
RO
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.
55ffb5ed 2207errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
1db673ca 2208if test x"$errors" = x && test -f conftest.$ac_objext; then
55ffb5ed 2209 acx_cv_cc_gcc_supports_ada=yes
55ffb5ed
NN
2210fi
2211rm -f conftest.*
2212fi
af71363e
AS
2213
2214echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
55ffb5ed 2215
1db673ca 2216if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
55ffb5ed
NN
2217 have_gnat=yes
2218else
2219 have_gnat=no
2220fi
2221
af71363e 2222echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
e1888513 2223echo "configure:2224: checking how to compare bootstrapped objects" >&5
af71363e
AS
2224if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
a76494aa
PB
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'
6cf1ac42
PB
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
a76494aa
PB
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
6cf1ac42 2239 :
a76494aa
PB
2240 else
2241 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2242 fi
2243 fi
2244 rm t1 t2
2245
2246fi
af71363e
AS
2247
2248echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
a76494aa
PB
2249do_compare="$gcc_cv_prog_cmp_skip"
2250
2251
55ffb5ed 2252
bebf829d 2253# Check for GMP and MPFR
8a877c9c 2254gmplibs="-lmpfr"
6de9cd9a
DN
2255gmpinc=
2256have_gmp=yes
bebf829d
PB
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"
af71363e
AS
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; }
2264fi
bebf829d
PB
2265
2266
bebf829d
PB
2267# Check whether --with-mpfr or --without-mpfr was given.
2268if test "${with_mpfr+set}" = set; then
2269 withval="$with_mpfr"
af71363e
AS
2270 :
2271fi
bebf829d 2272
8a877c9c
KG
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"
af71363e
AS
2276 :
2277fi
8a877c9c
KG
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"
af71363e
AS
2282 :
2283fi
8a877c9c 2284
bebf829d
PB
2285
2286if test "x$with_mpfr" != x; then
2287 gmplibs="-L$with_mpfr/lib $gmplibs"
2288 gmpinc="-I$with_mpfr/include"
2289fi
8a877c9c
KG
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
bebf829d 2296
6de9cd9a
DN
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"
af71363e
AS
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; }
2303fi
6de9cd9a 2304
6de9cd9a 2305
af71363e 2306gmplibs="$gmplibs -lgmp"
0b0dc272 2307
6de9cd9a
DN
2308# Check whether --with-gmp or --without-gmp was given.
2309if test "${with_gmp+set}" = set; then
2310 withval="$with_gmp"
af71363e
AS
2311 :
2312fi
6de9cd9a 2313
8a877c9c
KG
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"
af71363e
AS
2317 :
2318fi
8a877c9c
KG
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"
af71363e
AS
2323 :
2324fi
8a877c9c
KG
2325
2326
6de9cd9a 2327
bebf829d
PB
2328if test "x$with_gmp" != x; then
2329 gmplibs="-L$with_gmp/lib $gmplibs"
2330 gmpinc="-I$with_gmp/include $gmpinc"
6de9cd9a 2331fi
8a877c9c
KG
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
6de9cd9a
DN
2338
2339saved_CFLAGS="$CFLAGS"
2340CFLAGS="$CFLAGS $gmpinc"
2341# Check GMP actually works
af71363e 2342echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
e1888513 2343echo "configure:2344: checking for correct version of gmp.h" >&5
af71363e 2344cat > conftest.$ac_ext <<EOF
e1888513 2345#line 2346 "configure"
af71363e 2346#include "confdefs.h"
6de9cd9a 2347#include "gmp.h"
af71363e 2348int main() {
6de9cd9a 2349
e48d66a9 2350#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
6de9cd9a
DN
2351choke me
2352#endif
2353
af71363e
AS
2354; return 0; }
2355EOF
e1888513 2356if { (eval echo configure:2357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
af71363e
AS
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*
6de9cd9a
DN
2366
2367if test x"$have_gmp" = xyes; then
70ec446f
KG
2368 saved_LIBS="$LIBS"
2369 LIBS="$LIBS $gmplibs"
a3993f33 2370 echo $ac_n "checking for correct version of mpfr.h""... $ac_c" 1>&6
e1888513 2371echo "configure:2372: checking for correct version of mpfr.h" >&5
af71363e 2372 cat > conftest.$ac_ext <<EOF
e1888513 2373#line 2374 "configure"
af71363e 2374#include "confdefs.h"
70ec446f 2375#include <gmp.h>
e48d66a9 2376#include <mpfr.h>
af71363e 2377int main() {
e48d66a9 2378
a3993f33 2379#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
e48d66a9
SK
2380 choke me
2381#endif
70ec446f 2382 mpfr_t n; mpfr_init(n);
e48d66a9 2383
af71363e
AS
2384; return 0; }
2385EOF
e1888513 2386if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a3993f33
KG
2387 rm -rf conftest*
2388 cat > conftest.$ac_ext <<EOF
e1888513 2389#line 2390 "configure"
a3993f33
KG
2390#include "confdefs.h"
2391#include <gmp.h>
2392#include <mpfr.h>
2393int main() {
2394
2395#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
2396 choke me
2397#endif
2398 mpfr_t n; mpfr_init(n);
2399
2400; return 0; }
2401EOF
e1888513 2402if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
af71363e
AS
2403 rm -rf conftest*
2404 echo "$ac_t""yes" 1>&6
a3993f33
KG
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*
af71363e
AS
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*
6de9cd9a 2419 LIBS="$saved_LIBS"
6de9cd9a 2420fi
ed606bc0 2421CFLAGS="$saved_CFLAGS"
6de9cd9a 2422
dffb147d 2423if test -d ${srcdir}/gcc && test x$have_gmp != xyes; then
af71363e 2424 { echo "configure: error: Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
ca558912
KG
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/.
dbee1fb3
KG
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.
af71363e 2431They may be located in separate packages." 1>&2; exit 1; }
70ec446f
KG
2432fi
2433
bebf829d 2434# Flags needed for both GMP and/or MPFR
6de9cd9a
DN
2435
2436
2437
1e0f07d3 2438# By default, C is the only stage 1 language.
e1888513 2439stage1_languages=,c,
2805b53a 2440
55ffb5ed
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
7f26dfa3
FXC
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
55ffb5ed
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
e1888513 2501 new_enable_languages=,c,
55ffb5ed 2502 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
e1888513 2503 potential_languages=,c,
55ffb5ed
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 *)
af71363e 2512 # From the config-lang.in, get $language, $target_libs,
2805b53a 2513 # $lang_dirs, $boot_language, and $build_by_default
55ffb5ed
NN
2514 language=
2515 target_libs=
2516 lang_dirs=
1546bb64 2517 subdir_requires=
e1888513
PB
2518 boot_language=no
2519 build_by_default=yes
55ffb5ed 2520 . ${lang_frag}
e1888513
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},*)
55ffb5ed
NN
2528 # Language was explicitly selected; include it.
2529 add_this_lang=yes
2530 ;;
e1888513
PB
2531 *,all,*)
2532 # 'all' was selected, select it if it is a default language
2533 add_this_lang=${build_by_default}
55ffb5ed
NN
2534 ;;
2535 *)
2536 add_this_lang=no
2537 ;;
2538 esac
6de9cd9a 2539
1546bb64 2540 # Disable languages that need other directories if these aren't available.
95695ad3 2541 for i in $subdir_requires; do
b6348cb3 2542 test -f "$srcdir/gcc/$i/config-lang.in" && continue
1546bb64
PB
2543 case ,${enable_languages}, in
2544 *,${language},*)
2545 # Specifically requested language; tell them.
af71363e 2546 { echo "configure: error: The gcc/$i directory contains parts of $language but is missing" 1>&2; exit 1; }
1546bb64
PB
2547 ;;
2548 *)
2549 # Silently disable.
e1888513 2550 add_this_lang=unsupported
1546bb64
PB
2551 ;;
2552 esac
2553 done
2554
e1888513
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
4fab7234
HPN
2567 # Disable a language that is unsupported by the target.
2568 case " $unsupported_languages " in
2569 *" $language "*)
e1888513 2570 add_this_lang=unsupported
4fab7234
HPN
2571 ;;
2572 esac
2573
6de9cd9a 2574 case $add_this_lang in
e1888513 2575 unsupported)
55ffb5ed 2576 # Remove language-dependent dirs.
2805b53a
NN
2577 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2578 ;;
e1888513
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},"
2805b53a
NN
2587 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2588 case ${boot_language} in
2589 yes)
340de83f 2590 # Add to (comma-separated) list of stage 1 languages.
e1888513 2591 stage1_languages="${stage1_languages}${language},"
2805b53a
NN
2592 ;;
2593 esac
2594 ;;
55ffb5ed
NN
2595 esac
2596 ;;
2597 esac
2598 done
2599
e1888513
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/,$//"`
79b4b7d2 2636 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
e1888513
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
55ffb5ed 2640 if test "x$missing_languages" != x; then
af71363e 2641 { echo "configure: error:
0cf085e4 2642The following requested languages could not be built: ${missing_languages}
e1888513 2643Supported languages are: ${potential_languages}" 1>&2; exit 1; }
55ffb5ed 2644 fi
55ffb5ed
NN
2645 if test "x$new_enable_languages" != "x$enable_languages"; then
2646 echo The following languages will be built: ${new_enable_languages}
e1888513 2647 enable_languages="$new_enable_languages"
55ffb5ed 2648 fi
e1888513
PB
2649
2650
6bbec498 2651 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
55ffb5ed
NN
2652fi
2653
27079765
AH
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
7cd0cf9c
DA
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*)
af71363e 2668 { echo "configure: error: Boehm's garbage collector was requested yet not supported in this configuration" 1>&2; exit 1; }
7cd0cf9c
DA
2669 ;;
2670esac
af71363e
AS
2671fi
2672
7cd0cf9c
DA
2673
2674# Make sure we only build Boehm's garbage collector if required.
2a79fd67
DA
2675case ,${enable_languages},:${enable_objc_gc} in
2676 *,objc,*:yes)
7cd0cf9c
DA
2677 # Keep target-boehm-gc if requested for Objective-C.
2678 ;;
7cd0cf9c 2679 *)
2a79fd67
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
7cd0cf9c
DA
2684 ;;
2685esac
2686
ee6a22df
L
2687# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2688# $build_configdirs and $target_configdirs.
55ffb5ed
NN
2689# If we have the source for $noconfigdirs entries, add them to $notsupp.
2690
2691notsupp=""
2692for dir in . $skipdirs $noconfigdirs ; do
ee6a22df 2693 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
55ffb5ed
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
ee6a22df
L
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
55ffb5ed
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.
23f6b2f9
PB
2746build_configdirs_all="$build_configdirs"
2747build_configdirs=
2748for i in ${build_configdirs_all} ; do
af71363e 2749 j=`echo $i | sed -e s/build-//g`
23f6b2f9
PB
2750 if test -f ${srcdir}/$j/configure ; then
2751 build_configdirs="${build_configdirs} $i"
2752 fi
2753done
2754
55ffb5ed
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
23f6b2f9 2762
55ffb5ed
NN
2763target_configdirs_all="$target_configdirs"
2764target_configdirs=
2765for i in ${target_configdirs_all} ; do
af71363e 2766 j=`echo $i | sed -e s/target-//g`
55ffb5ed
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
23f6b2f9 2789 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
55ffb5ed
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
526635cb
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=
af71363e
AS
2822fi
2823
526635cb
MM
2824
2825
55ffb5ed
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
e8b05380
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.
af71363e
AS
2868#
2869# The command line options always override the explicit settings in
e8b05380
PB
2870# configure.in, and the settings in configure.in override this magic.
2871#
af71363e 2872# If the default for a toolchain is to use GNU as and ld, and you don't
e8b05380
PB
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
55ffb5ed
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
e8b05380
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
671aa708
NN
2976extra_arflags_for_target=
2977extra_nmflags_for_target=
2978extra_ranlibflags_for_target=
2979target_makefile_frag=/dev/null
2980case "${target}" in
58e24147
AM
2981 spu-*-*)
2982 target_makefile_frag="config/mt-spu"
2983 ;;
61fec9ff 2984 *-*-netware*)
671aa708
NN
2985 target_makefile_frag="config/mt-netware"
2986 ;;
98a5bb3b
RM
2987 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2988 target_makefile_frag="config/mt-gnu"
671aa708
NN
2989 ;;
2990 *-*-aix4.[3456789]* | *-*-aix[56789].*)
af71363e 2991 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
671aa708
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
671aa708
NN
3036# Default to using --with-stabs for certain targets.
3037if test x${with_stabs} = x ; then
3038 case "${target}" in
89a95129 3039 mips*-*-irix[56]*)
671aa708
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
af71363e 3051 hppa*64*-*-hpux11*)
671aa708
NN
3052 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
3053 ;;
3054esac
3055
671aa708
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.
df445104 3058tooldir='${exec_prefix}'/${target_alias}
671aa708
NN
3059build_tooldir=${tooldir}
3060
671aa708
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
671aa708
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
af71363e 3088fi
671aa708
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
671aa708
NN
3127case "${host}" in
3128 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
256f7136 3129 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
671aa708
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'`
23f6b2f9 3136build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
671aa708 3137
671aa708
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.
e914a571 3145
b4f96efe 3146gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
671aa708
NN
3147case "$enable_gdbtk" in
3148 no)
3149 GDB_TK="" ;;
e914a571
AC
3150 yes)
3151 GDB_TK="${gdb_tk}" ;;
671aa708 3152 *)
e914a571
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 ;;
671aa708 3162esac
ef9db8d5
DJ
3163CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
3164INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
671aa708 3165
60975492 3166# Strip out unwanted targets.
8b87bb96
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.
8b87bb96 3171
60975492
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.
8b87bb96 3178
f516a7da
PB
3179# Check whether --enable-bootstrap or --disable-bootstrap was given.
3180if test "${enable_bootstrap+set}" = set; then
3181 enableval="$enable_bootstrap"
af71363e 3182 :
f516a7da 3183else
ce521a9c 3184 enable_bootstrap=default
af71363e
AS
3185fi
3186
f516a7da 3187
ce521a9c
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
1ca26cd2 3197 # Default behavior. Enable bootstrap if we have a compiler
ce521a9c
PB
3198 # and we are in a native configuration.
3199 yes:$build:$build:default)
1ca26cd2 3200 enable_bootstrap=yes ;;
ce521a9c
PB
3201
3202 *:*:*:default)
3203 enable_bootstrap=no ;;
3204
3205 # We have a compiler and we are in a native configuration, bootstrap is ok
2d309510 3206 yes:$build:$build:yes)
ce521a9c
PB
3207 ;;
3208
3209 # Other configurations, but we have a compiler. Assume the user knows
3210 # what he's doing.
2d309510 3211 yes:*:*:yes)
af71363e 3212 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
ce521a9c
PB
3213 ;;
3214
3215 # No compiler: if they passed --enable-bootstrap explicitly, fail
2d309510 3216 no:*:*:yes)
af71363e 3217 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
ce521a9c
PB
3218
3219 # Fail if wrong command line
3220 *)
af71363e 3221 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
ce521a9c
PB
3222 ;;
3223esac
3224
3225# Adjust the toplevel makefile according to whether bootstrap was selected.
f516a7da
PB
3226case "$enable_bootstrap" in
3227 yes)
5607edfd 3228 bootstrap_suffix=bootstrap ;;
f516a7da 3229 no)
5607edfd 3230 bootstrap_suffix=no-bootstrap ;;
f516a7da
PB
3231esac
3232
23f6b2f9 3233for module in ${build_configdirs} ; do
5607edfd
PB
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
a6fbc1e2 3246 if test -z "${no_recursion}"; then
f063a9ed 3247 for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
a6fbc1e2
AS
3248 if test -f ${file}; then
3249 echo 1>&2 "*** removing ${file} to force reconfigure"
3250 rm -f ${file}
3251 fi
3252 done
5607edfd
PB
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
60975492
PB
3273extrasub="$extrasub
3274/^@if /,/^@endif /d"
671aa708
NN
3275
3276# Create the serialization dependencies. This uses a temporary file.
3277
ade82b16
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"
af71363e
AS
3281 :
3282fi
ade82b16
AO
3283
3284
bf1d3e81
NN
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
671aa708
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
ade82b16 3296echo '# serdep.tmp' > serdep.tmp
671aa708 3297olditem=
bf1d3e81 3298test "x${enable_serial_build_configure}" = xyes &&
671aa708
NN
3299for item in ${build_configdirs} ; do
3300 case ${olditem} in
3301 "") ;;
ade82b16 3302 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
671aa708
NN
3303 esac
3304 olditem=${item}
3305done
3306olditem=
bf1d3e81 3307test "x${enable_serial_host_configure}" = xyes &&
671aa708
NN
3308for item in ${configdirs} ; do
3309 case ${olditem} in
3310 "") ;;
ade82b16 3311 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
671aa708
NN
3312 esac
3313 olditem=${item}
3314done
3315olditem=
bf1d3e81 3316test "x${enable_serial_target_configure}" = xyes &&
671aa708
NN
3317for item in ${target_configdirs} ; do
3318 case ${olditem} in
3319 "") ;;
ade82b16 3320 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
671aa708
NN
3321 esac
3322 olditem=${item}
3323done
3324serialization_dependencies=serdep.tmp
3325
3326
ade82b16
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
43bb47c2
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 '$'.
b348267b 3337cat <<\EOF_SED > conftestsed
9104315a
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
b348267b
GK
3353s/ [^' -][^ ]* / /
3354s/^ *//;s/ *$//
eeae7b41
DJ
3355s,\$,$$,g
3356EOF_SED
3357sed -f conftestsed <<EOF_SED > conftestsed.out
af71363e 3358 ${ac_configure_args}
b348267b 3359EOF_SED
eeae7b41
DJ
3360baseargs=`cat conftestsed.out`
3361rm -f conftestsed conftestsed.out
671aa708 3362
43bb47c2
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
af71363e 3367# quotes, because this will be expanded first by make and then by the shell.
43bb47c2
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
671aa708
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.
556f03c4 3380build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
671aa708
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
09438bde
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.
2b6c260d 3394host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
671aa708
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
6b9eb62c
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
bebcd931
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}"
671aa708 3431
671aa708
NN
3432FLAGS_FOR_TARGET=
3433case " $target_configdirs " in
3434 *" newlib "*)
3435 case " $target_configargs " in
3436 *" --with-newlib "*)
3437 case "$target" in
3438 *-cygwin*)
aa8f1f57 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' ;;
671aa708
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.
215c351a 3452 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
671aa708
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
f2a0e225 3466 i[3456789]86-*-linux*-no)
671aa708
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
b91f0a41
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
671aa708 3487
6691a79e
ME
3488# Allow the user to override the flags for
3489# our build compiler if desired.
3490CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3491
671aa708
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.
9124bc53 3498 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
671aa708
NN
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.
215c351a 3504 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
671aa708
NN
3505fi
3506
e88a2c09
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
671aa708 3521# Makefile fragments.
7b61653a
PE
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
671aa708
NN
3529
3530
3531
3532
3533
3534# Miscellanea: directories, flags, etc.
3535
3536
3537
3538
3539
3540
3541
23f6b2f9 3542# Build module lists & subconfigure args.
671aa708
NN
3543
3544
3545
2abefe3d
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
af71363e 3565# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3566set dummy $ac_prog; ac_word=$2
af71363e 3567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3568echo "configure:3569: checking for $ac_word" >&5
af71363e
AS
3569if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3570 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3571else
3572 if test -n "$YACC"; then
3573 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3574else
af71363e
AS
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"
2abefe3d
PB
3585fi
3586fi
af71363e 3587YACC="$ac_cv_prog_YACC"
2abefe3d 3588if test -n "$YACC"; then
af71363e 3589 echo "$ac_t""$YACC" 1>&6
2abefe3d 3590else
af71363e 3591 echo "$ac_t""no" 1>&6
2abefe3d
PB
3592fi
3593
af71363e 3594test -n "$YACC" && break
2abefe3d
PB
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
af71363e 3605# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3606set dummy $ac_prog; ac_word=$2
af71363e 3607echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3608echo "configure:3609: checking for $ac_word" >&5
af71363e
AS
3609if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3610 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3611else
3612 if test -n "$BISON"; then
3613 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3614else
af71363e
AS
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"
2abefe3d
PB
3625fi
3626fi
af71363e 3627BISON="$ac_cv_prog_BISON"
2abefe3d 3628if test -n "$BISON"; then
af71363e 3629 echo "$ac_t""$BISON" 1>&6
2abefe3d 3630else
af71363e 3631 echo "$ac_t""no" 1>&6
2abefe3d
PB
3632fi
3633
af71363e 3634test -n "$BISON" && break
2abefe3d
PB
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
af71363e 3644# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3645set dummy $ac_prog; ac_word=$2
af71363e 3646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3647echo "configure:3648: checking for $ac_word" >&5
af71363e
AS
3648if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3649 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3650else
3651 if test -n "$M4"; then
3652 ac_cv_prog_M4="$M4" # Let the user override the test.
3653else
af71363e
AS
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"
2abefe3d
PB
3664fi
3665fi
af71363e 3666M4="$ac_cv_prog_M4"
2abefe3d 3667if test -n "$M4"; then
af71363e 3668 echo "$ac_t""$M4" 1>&6
2abefe3d 3669else
af71363e 3670 echo "$ac_t""no" 1>&6
2abefe3d
PB
3671fi
3672
af71363e 3673test -n "$M4" && break
2abefe3d
PB
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
af71363e 3683# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3684set dummy $ac_prog; ac_word=$2
af71363e 3685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3686echo "configure:3687: checking for $ac_word" >&5
af71363e
AS
3687if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3688 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3689else
3690 if test -n "$LEX"; then
3691 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3692else
af71363e
AS
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"
2abefe3d
PB
3703fi
3704fi
af71363e 3705LEX="$ac_cv_prog_LEX"
2abefe3d 3706if test -n "$LEX"; then
af71363e 3707 echo "$ac_t""$LEX" 1>&6
2abefe3d 3708else
af71363e 3709 echo "$ac_t""no" 1>&6
2abefe3d
PB
3710fi
3711
af71363e 3712test -n "$LEX" && break
2abefe3d
PB
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
af71363e 3723# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3724set dummy $ac_prog; ac_word=$2
af71363e 3725echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3726echo "configure:3727: checking for $ac_word" >&5
af71363e
AS
3727if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3728 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3729else
3730 if test -n "$FLEX"; then
3731 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3732else
af71363e
AS
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"
2abefe3d
PB
3743fi
3744fi
af71363e 3745FLEX="$ac_cv_prog_FLEX"
2abefe3d 3746if test -n "$FLEX"; then
af71363e 3747 echo "$ac_t""$FLEX" 1>&6
2abefe3d 3748else
af71363e 3749 echo "$ac_t""no" 1>&6
2abefe3d
PB
3750fi
3751
af71363e 3752test -n "$FLEX" && break
2abefe3d
PB
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
af71363e 3762# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3763set dummy $ac_prog; ac_word=$2
af71363e 3764echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3765echo "configure:3766: checking for $ac_word" >&5
af71363e
AS
3766if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3767 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3768else
3769 if test -n "$MAKEINFO"; then
3770 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3771else
af71363e
AS
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"
2abefe3d
PB
3782fi
3783fi
af71363e 3784MAKEINFO="$ac_cv_prog_MAKEINFO"
2abefe3d 3785if test -n "$MAKEINFO"; then
af71363e 3786 echo "$ac_t""$MAKEINFO" 1>&6
2abefe3d 3787else
af71363e 3788 echo "$ac_t""no" 1>&6
2abefe3d
PB
3789fi
3790
af71363e 3791test -n "$MAKEINFO" && break
2abefe3d
PB
3792done
3793test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3794
3795case " $build_configdirs " in
3796 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3797 *)
3798
27b6c940 3799 # For an installed makeinfo, we require it to be from texinfo 4.4 or
2abefe3d
PB
3800 # higher, else we use the "missing" dummy.
3801 if ${MAKEINFO} --version \
27b6c940 3802 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
2abefe3d
PB
3803 :
3804 else
3805 MAKEINFO="$MISSING makeinfo"
3806 fi
3807 ;;
3808
3809esac
671aa708 3810
2abefe3d 3811# FIXME: expect and dejagnu may become build tools?
671aa708 3812
2abefe3d
PB
3813for ac_prog in expect
3814do
af71363e 3815# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3816set dummy $ac_prog; ac_word=$2
af71363e 3817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3818echo "configure:3819: checking for $ac_word" >&5
af71363e
AS
3819if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3820 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3821else
3822 if test -n "$EXPECT"; then
3823 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3824else
af71363e
AS
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"
2abefe3d
PB
3835fi
3836fi
af71363e 3837EXPECT="$ac_cv_prog_EXPECT"
2abefe3d 3838if test -n "$EXPECT"; then
af71363e 3839 echo "$ac_t""$EXPECT" 1>&6
2abefe3d 3840else
af71363e 3841 echo "$ac_t""no" 1>&6
2abefe3d 3842fi
671aa708 3843
af71363e 3844test -n "$EXPECT" && break
2abefe3d
PB
3845done
3846test -n "$EXPECT" || EXPECT="expect"
671aa708 3847
2abefe3d
PB
3848case " $configdirs " in
3849 *" expect "*)
3850 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3851 ;;
3852esac
671aa708 3853
2abefe3d
PB
3854for ac_prog in runtest
3855do
af71363e 3856# Extract the first word of "$ac_prog", so it can be a program name with args.
2abefe3d 3857set dummy $ac_prog; ac_word=$2
af71363e 3858echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3859echo "configure:3860: checking for $ac_word" >&5
af71363e
AS
3860if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3861 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
3862else
3863 if test -n "$RUNTEST"; then
3864 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
fb0103e5 3865else
af71363e
AS
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"
2abefe3d
PB
3876fi
3877fi
af71363e 3878RUNTEST="$ac_cv_prog_RUNTEST"
2abefe3d 3879if test -n "$RUNTEST"; then
af71363e 3880 echo "$ac_t""$RUNTEST" 1>&6
2abefe3d 3881else
af71363e 3882 echo "$ac_t""no" 1>&6
2abefe3d 3883fi
671aa708 3884
af71363e 3885test -n "$RUNTEST" && break
2abefe3d
PB
3886done
3887test -n "$RUNTEST" || RUNTEST="runtest"
671aa708 3888
2abefe3d
PB
3889case " $configdirs " in
3890 *" dejagnu "*)
c394e891 3891 test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
2abefe3d
PB
3892 ;;
3893esac
671aa708
NN
3894
3895
671aa708 3896# Host tools.
ca9f4b81
AO
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
2693c0b0
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
af71363e 3906echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3907echo "configure:3908: checking for $ac_word" >&5
af71363e
AS
3908if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3909 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3910else
3911 if test -n "$AR"; then
3912 ac_cv_prog_AR="$AR" # Let the user override the test.
3913else
af71363e
AS
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"
ca9f4b81
AO
3924fi
3925fi
af71363e 3926AR="$ac_cv_prog_AR"
ca9f4b81 3927if test -n "$AR"; then
af71363e 3928 echo "$ac_t""$AR" 1>&6
ca9f4b81 3929else
af71363e 3930 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3931fi
3932
2693c0b0
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
af71363e 3937echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3938echo "configure:3939: checking for $ac_word" >&5
af71363e
AS
3939if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3940 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3941else
2693c0b0 3942 if test -n "$AR"; then
af71363e
AS
3943 ac_cv_prog_AR="$AR" # Let the user override the test.
3944else
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"
ca9f4b81
AO
3955fi
3956fi
af71363e 3957AR="$ac_cv_prog_AR"
2693c0b0 3958if test -n "$AR"; then
af71363e 3959 echo "$ac_t""$AR" 1>&6
ca9f4b81 3960else
af71363e 3961 echo "$ac_t""no" 1>&6
ca9f4b81 3962fi
af71363e 3963
2693c0b0
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"
ca9f4b81 3972 else
2693c0b0 3973 AR="${ncn_tool_prefix}$2"
ca9f4b81 3974 fi
ca9f4b81
AO
3975fi
3976
2693c0b0
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
af71363e 3981echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 3982echo "configure:3983: checking for $ac_word" >&5
af71363e
AS
3983if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3984 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3985else
3986 if test -n "$AS"; then
3987 ac_cv_prog_AS="$AS" # Let the user override the test.
0b0dc272 3988else
af71363e
AS
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"
ca9f4b81
AO
3999fi
4000fi
af71363e 4001AS="$ac_cv_prog_AS"
ca9f4b81 4002if test -n "$AS"; then
af71363e 4003 echo "$ac_t""$AS" 1>&6
ca9f4b81 4004else
af71363e 4005 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4006fi
4007
2693c0b0
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
af71363e 4012echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4013echo "configure:4014: checking for $ac_word" >&5
af71363e
AS
4014if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
4015 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4016else
2693c0b0
PB
4017 if test -n "$AS"; then
4018 ac_cv_prog_AS="$AS" # Let the user override the test.
ca9f4b81 4019else
af71363e
AS
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"
ca9f4b81
AO
4030fi
4031fi
af71363e 4032AS="$ac_cv_prog_AS"
2693c0b0 4033if test -n "$AS"; then
af71363e 4034 echo "$ac_t""$AS" 1>&6
ca9f4b81 4035else
af71363e 4036 echo "$ac_t""no" 1>&6
ca9f4b81 4037fi
af71363e 4038
2693c0b0
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"
ca9f4b81 4047 else
2693c0b0 4048 AS="${ncn_tool_prefix}$2"
ca9f4b81 4049 fi
ca9f4b81
AO
4050fi
4051
2693c0b0
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
af71363e 4056echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4057echo "configure:4058: checking for $ac_word" >&5
af71363e
AS
4058if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
4059 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4060else
4061 if test -n "$DLLTOOL"; then
4062 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4063else
af71363e
AS
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"
ca9f4b81
AO
4074fi
4075fi
af71363e 4076DLLTOOL="$ac_cv_prog_DLLTOOL"
ca9f4b81 4077if test -n "$DLLTOOL"; then
af71363e 4078 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 4079else
af71363e 4080 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4081fi
4082
2693c0b0
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
af71363e 4087echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4088echo "configure:4089: checking for $ac_word" >&5
af71363e
AS
4089if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4091else
2693c0b0
PB
4092 if test -n "$DLLTOOL"; then
4093 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
ca9f4b81 4094else
af71363e
AS
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"
ca9f4b81
AO
4105fi
4106fi
af71363e 4107DLLTOOL="$ac_cv_prog_DLLTOOL"
2693c0b0 4108if test -n "$DLLTOOL"; then
af71363e 4109 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 4110else
af71363e 4111 echo "$ac_t""no" 1>&6
ca9f4b81 4112fi
af71363e 4113
2693c0b0
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"
ca9f4b81 4122 else
2693c0b0 4123 DLLTOOL="${ncn_tool_prefix}$2"
ca9f4b81 4124 fi
ca9f4b81
AO
4125fi
4126
2693c0b0
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
af71363e 4131echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4132echo "configure:4133: checking for $ac_word" >&5
af71363e
AS
4133if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4134 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4135else
4136 if test -n "$LD"; then
4137 ac_cv_prog_LD="$LD" # Let the user override the test.
4138else
af71363e
AS
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"
ca9f4b81
AO
4149fi
4150fi
af71363e 4151LD="$ac_cv_prog_LD"
ca9f4b81 4152if test -n "$LD"; then
af71363e 4153 echo "$ac_t""$LD" 1>&6
ca9f4b81 4154else
af71363e 4155 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4156fi
4157
2693c0b0
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
af71363e 4162echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4163echo "configure:4164: checking for $ac_word" >&5
af71363e
AS
4164if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4165 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4166else
2693c0b0
PB
4167 if test -n "$LD"; then
4168 ac_cv_prog_LD="$LD" # Let the user override the test.
6b65a26d 4169else
af71363e
AS
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"
ca9f4b81
AO
4180fi
4181fi
af71363e 4182LD="$ac_cv_prog_LD"
2693c0b0 4183if test -n "$LD"; then
af71363e 4184 echo "$ac_t""$LD" 1>&6
ca9f4b81 4185else
af71363e 4186 echo "$ac_t""no" 1>&6
ca9f4b81 4187fi
af71363e 4188
2693c0b0
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"
ca9f4b81 4197 else
2693c0b0 4198 LD="${ncn_tool_prefix}$2"
ca9f4b81 4199 fi
ca9f4b81
AO
4200fi
4201
2abefe3d
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
af71363e 4206echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4207echo "configure:4208: checking for $ac_word" >&5
af71363e
AS
4208if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4209 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
4210else
4211 if test -n "$LIPO"; then
4212 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4213else
af71363e
AS
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"
2abefe3d
PB
4224fi
4225fi
af71363e 4226LIPO="$ac_cv_prog_LIPO"
2abefe3d 4227if test -n "$LIPO"; then
af71363e 4228 echo "$ac_t""$LIPO" 1>&6
2abefe3d 4229else
af71363e 4230 echo "$ac_t""no" 1>&6
2abefe3d
PB
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
af71363e 4237echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4238echo "configure:4239: checking for $ac_word" >&5
af71363e
AS
4239if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4240 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
4241else
4242 if test -n "$LIPO"; then
4243 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4244else
af71363e
AS
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"
2abefe3d
PB
4255fi
4256fi
af71363e 4257LIPO="$ac_cv_prog_LIPO"
2abefe3d 4258if test -n "$LIPO"; then
af71363e 4259 echo "$ac_t""$LIPO" 1>&6
2abefe3d 4260else
af71363e 4261 echo "$ac_t""no" 1>&6
2abefe3d 4262fi
af71363e 4263
2abefe3d
PB
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
2693c0b0
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
af71363e 4281echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4282echo "configure:4283: checking for $ac_word" >&5
af71363e
AS
4283if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4284 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4285else
4286 if test -n "$NM"; then
4287 ac_cv_prog_NM="$NM" # Let the user override the test.
4288else
af71363e
AS
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"
ca9f4b81
AO
4299fi
4300fi
af71363e 4301NM="$ac_cv_prog_NM"
ca9f4b81 4302if test -n "$NM"; then
af71363e 4303 echo "$ac_t""$NM" 1>&6
ca9f4b81 4304else
af71363e 4305 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4306fi
4307
2693c0b0
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
af71363e 4312echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4313echo "configure:4314: checking for $ac_word" >&5
af71363e
AS
4314if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4315 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4316else
2693c0b0
PB
4317 if test -n "$NM"; then
4318 ac_cv_prog_NM="$NM" # Let the user override the test.
ca9f4b81 4319else
af71363e
AS
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"
ca9f4b81
AO
4330fi
4331fi
af71363e 4332NM="$ac_cv_prog_NM"
2693c0b0 4333if test -n "$NM"; then
af71363e 4334 echo "$ac_t""$NM" 1>&6
ca9f4b81 4335else
af71363e 4336 echo "$ac_t""no" 1>&6
ca9f4b81 4337fi
af71363e 4338
2693c0b0
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"
ca9f4b81 4347 else
2693c0b0 4348 NM="${ncn_tool_prefix}$2"
ca9f4b81 4349 fi
ca9f4b81
AO
4350fi
4351
2693c0b0
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
af71363e 4356echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4357echo "configure:4358: checking for $ac_word" >&5
af71363e
AS
4358if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4359 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4360else
4361 if test -n "$RANLIB"; then
4362 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4363else
af71363e
AS
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"
ca9f4b81
AO
4374fi
4375fi
af71363e 4376RANLIB="$ac_cv_prog_RANLIB"
ca9f4b81 4377if test -n "$RANLIB"; then
af71363e 4378 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4379else
af71363e 4380 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4381fi
4382
2693c0b0
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
af71363e 4387echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4388echo "configure:4389: checking for $ac_word" >&5
af71363e
AS
4389if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4390 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4391else
2693c0b0
PB
4392 if test -n "$RANLIB"; then
4393 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
ca9f4b81 4394else
af71363e
AS
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"
ca9f4b81
AO
4405fi
4406fi
af71363e 4407RANLIB="$ac_cv_prog_RANLIB"
2693c0b0 4408if test -n "$RANLIB"; then
af71363e 4409 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4410else
af71363e 4411 echo "$ac_t""no" 1>&6
ca9f4b81 4412fi
af71363e 4413
ca9f4b81 4414 fi
2693c0b0
PB
4415 test -n "$ac_cv_prog_RANLIB" && break
4416done
4417
4418if test -z "$ac_cv_prog_RANLIB" ; then
4419 RANLIB=":"
ca9f4b81
AO
4420fi
4421
2abefe3d
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
af71363e 4426echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4427echo "configure:4428: checking for $ac_word" >&5
af71363e
AS
4428if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
4430else
4431 if test -n "$STRIP"; then
4432 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4433else
af71363e
AS
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"
2abefe3d
PB
4444fi
4445fi
af71363e 4446STRIP="$ac_cv_prog_STRIP"
2abefe3d 4447if test -n "$STRIP"; then
af71363e 4448 echo "$ac_t""$STRIP" 1>&6
2abefe3d 4449else
af71363e 4450 echo "$ac_t""no" 1>&6
2abefe3d
PB
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
af71363e 4457echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4458echo "configure:4459: checking for $ac_word" >&5
af71363e
AS
4459if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4460 echo $ac_n "(cached) $ac_c" 1>&6
2abefe3d
PB
4461else
4462 if test -n "$STRIP"; then
4463 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4464else
af71363e
AS
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"
2abefe3d
PB
4475fi
4476fi
af71363e 4477STRIP="$ac_cv_prog_STRIP"
2abefe3d 4478if test -n "$STRIP"; then
af71363e 4479 echo "$ac_t""$STRIP" 1>&6
2abefe3d 4480else
af71363e 4481 echo "$ac_t""no" 1>&6
2abefe3d 4482fi
af71363e 4483
2abefe3d
PB
4484 fi
4485 test -n "$ac_cv_prog_STRIP" && break
4486done
4487
4488if test -z "$ac_cv_prog_STRIP" ; then
4489 STRIP=":"
4490fi
4491
2693c0b0
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
af71363e 4496echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4497echo "configure:4498: checking for $ac_word" >&5
af71363e
AS
4498if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4499 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4500else
4501 if test -n "$WINDRES"; then
4502 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4503else
af71363e
AS
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"
ca9f4b81
AO
4514fi
4515fi
af71363e 4516WINDRES="$ac_cv_prog_WINDRES"
ca9f4b81 4517if test -n "$WINDRES"; then
af71363e 4518 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4519else
af71363e 4520 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4521fi
4522
2693c0b0
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
af71363e 4527echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4528echo "configure:4529: checking for $ac_word" >&5
af71363e
AS
4529if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4530 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4531else
2693c0b0
PB
4532 if test -n "$WINDRES"; then
4533 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
ca9f4b81 4534else
af71363e
AS
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"
ca9f4b81
AO
4545fi
4546fi
af71363e 4547WINDRES="$ac_cv_prog_WINDRES"
2693c0b0 4548if test -n "$WINDRES"; then
af71363e 4549 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4550else
af71363e 4551 echo "$ac_t""no" 1>&6
ca9f4b81 4552fi
af71363e 4553
2693c0b0
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"
ca9f4b81 4562 else
2693c0b0 4563 WINDRES="${ncn_tool_prefix}$2"
ca9f4b81 4564 fi
ca9f4b81
AO
4565fi
4566
2693c0b0
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
af71363e 4571echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4572echo "configure:4573: checking for $ac_word" >&5
af71363e
AS
4573if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4575else
4576 if test -n "$OBJCOPY"; then
4577 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4578else
af71363e
AS
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"
ca9f4b81
AO
4589fi
4590fi
af71363e 4591OBJCOPY="$ac_cv_prog_OBJCOPY"
ca9f4b81 4592if test -n "$OBJCOPY"; then
af71363e 4593 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4594else
af71363e 4595 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4596fi
4597
2693c0b0
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
af71363e 4602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4603echo "configure:4604: checking for $ac_word" >&5
af71363e
AS
4604if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4605 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4606else
2693c0b0
PB
4607 if test -n "$OBJCOPY"; then
4608 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
ca9f4b81 4609else
af71363e
AS
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"
ca9f4b81
AO
4620fi
4621fi
af71363e 4622OBJCOPY="$ac_cv_prog_OBJCOPY"
2693c0b0 4623if test -n "$OBJCOPY"; then
af71363e 4624 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4625else
af71363e 4626 echo "$ac_t""no" 1>&6
ca9f4b81 4627fi
af71363e 4628
2693c0b0
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"
ca9f4b81 4637 else
2693c0b0 4638 OBJCOPY="${ncn_tool_prefix}$2"
ca9f4b81 4639 fi
ca9f4b81
AO
4640fi
4641
2693c0b0
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
af71363e 4646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4647echo "configure:4648: checking for $ac_word" >&5
af71363e
AS
4648if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4649 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4650else
4651 if test -n "$OBJDUMP"; then
4652 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4653else
af71363e
AS
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"
ca9f4b81
AO
4664fi
4665fi
af71363e 4666OBJDUMP="$ac_cv_prog_OBJDUMP"
ca9f4b81 4667if test -n "$OBJDUMP"; then
af71363e 4668 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4669else
af71363e 4670 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4671fi
4672
2693c0b0
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
af71363e 4677echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4678echo "configure:4679: checking for $ac_word" >&5
af71363e
AS
4679if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4680 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4681else
2693c0b0
PB
4682 if test -n "$OBJDUMP"; then
4683 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
ca9f4b81 4684else
af71363e
AS
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"
ca9f4b81
AO
4695fi
4696fi
af71363e 4697OBJDUMP="$ac_cv_prog_OBJDUMP"
2693c0b0 4698if test -n "$OBJDUMP"; then
af71363e 4699 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4700else
af71363e 4701 echo "$ac_t""no" 1>&6
ca9f4b81 4702fi
af71363e 4703
2693c0b0
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"
ca9f4b81 4712 else
2693c0b0 4713 OBJDUMP="${ncn_tool_prefix}$2"
ca9f4b81 4714 fi
ca9f4b81
AO
4715fi
4716
671aa708
NN
4717
4718
4719
4720
4721
4722
2abefe3d 4723# Target tools.
e8b05380
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=
af71363e 4731 echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
e8b05380
PB
4732 ;;
4733 esac
ca9f4b81 4734else
e8b05380 4735 with_build_time_tools=
af71363e
AS
4736fi
4737
ca9f4b81 4738
e8b05380
PB
4739 if test -n "$with_build_time_tools"; then
4740 for ncn_progname in cc gcc; do
af71363e 4741 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 4742echo "configure:4743: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 4745 echo "$ac_t""yes" 1>&6
72a7ab82 4746 break
e8b05380 4747 else
af71363e 4748 echo "$ac_t""no" 1>&6
72a7ab82
AP
4749 fi
4750 done
4de997d1
PB
4751fi
4752
e8b05380
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.
2693c0b0 4757set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 4758echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4759echo "configure:4760: checking for $ac_word" >&5
af71363e
AS
4760if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4761 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
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
af71363e
AS
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"
4de997d1
PB
4776fi
4777fi
af71363e 4778CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4de997d1 4779if test -n "$CC_FOR_TARGET"; then
af71363e 4780 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4781else
af71363e 4782 echo "$ac_t""no" 1>&6
4de997d1
PB
4783fi
4784
e8b05380
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.
2693c0b0 4788set dummy ${ncn_progname}; ac_word=$2
af71363e 4789echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4790echo "configure:4791: checking for $ac_word" >&5
af71363e
AS
4791if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4792 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4793else
2693c0b0
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.
4de997d1 4796else
af71363e
AS
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"
4de997d1
PB
4807fi
4808fi
af71363e 4809CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
2693c0b0 4810if test -n "$CC_FOR_TARGET"; then
af71363e 4811 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4812else
af71363e 4813 echo "$ac_t""no" 1>&6
4de997d1 4814fi
af71363e 4815
e8b05380
PB
4816 fi
4817 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4818 done
4819fi
af71363e 4820
2693c0b0
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"
4de997d1 4825 else
2693c0b0 4826 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4827 fi
4de997d1
PB
4828fi
4829
e8b05380
PB
4830 if test -n "$with_build_time_tools"; then
4831 for ncn_progname in c++ g++ cxx gxx; do
af71363e 4832 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 4833echo "configure:4834: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 4836 echo "$ac_t""yes" 1>&6
e8b05380
PB
4837 break
4838 else
af71363e 4839 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 4848set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 4849echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4850echo "configure:4851: checking for $ac_word" >&5
af71363e
AS
4851if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4852 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
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
af71363e
AS
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"
4de997d1
PB
4867fi
4868fi
af71363e 4869CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4de997d1 4870if test -n "$CXX_FOR_TARGET"; then
af71363e 4871 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4872else
af71363e 4873 echo "$ac_t""no" 1>&6
4de997d1
PB
4874fi
4875
e8b05380
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.
2693c0b0 4879set dummy ${ncn_progname}; ac_word=$2
af71363e 4880echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4881echo "configure:4882: checking for $ac_word" >&5
af71363e
AS
4882if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4883 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4884else
2693c0b0
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.
4de997d1 4887else
af71363e
AS
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"
4de997d1
PB
4898fi
4899fi
af71363e 4900CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
2693c0b0 4901if test -n "$CXX_FOR_TARGET"; then
af71363e 4902 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4903else
af71363e 4904 echo "$ac_t""no" 1>&6
4de997d1 4905fi
af71363e 4906
e8b05380
PB
4907 fi
4908 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4909 done
4910fi
af71363e 4911
2693c0b0
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"
4de997d1 4916 else
2693c0b0 4917 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4918 fi
ca9f4b81
AO
4919fi
4920
e8b05380
PB
4921 if test -n "$with_build_time_tools"; then
4922 for ncn_progname in gcc; do
af71363e 4923 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 4924echo "configure:4925: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 4927 echo "$ac_t""yes" 1>&6
e8b05380
PB
4928 break
4929 else
af71363e 4930 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 4939set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 4940echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4941echo "configure:4942: checking for $ac_word" >&5
af71363e
AS
4942if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4943 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4944else
e8b05380
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.
ca9f4b81 4947else
af71363e
AS
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"
ca9f4b81
AO
4958fi
4959fi
af71363e 4960GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
e8b05380 4961if test -n "$GCC_FOR_TARGET"; then
af71363e 4962 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
ca9f4b81 4963else
af71363e 4964 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4965fi
4966
e8b05380
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.
2693c0b0 4970set dummy ${ncn_progname}; ac_word=$2
af71363e 4971echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 4972echo "configure:4973: checking for $ac_word" >&5
af71363e
AS
4973if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4974 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4975else
e8b05380
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.
ca9f4b81 4978else
af71363e
AS
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"
ca9f4b81
AO
4989fi
4990fi
af71363e 4991GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
e8b05380 4992if test -n "$GCC_FOR_TARGET"; then
af71363e 4993 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
ca9f4b81 4994else
af71363e 4995 echo "$ac_t""no" 1>&6
ca9f4b81 4996fi
af71363e 4997
e8b05380
PB
4998 fi
4999 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
5000 done
5001fi
af71363e 5002
e8b05380
PB
5003if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
5004 GCC_FOR_TARGET="${CC_FOR_TARGET}"
5005fi
5006
5007 if test -n "$with_build_time_tools"; then
5008 for ncn_progname in gcj; do
af71363e 5009 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5010echo "configure:5011: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5013 echo "$ac_t""yes" 1>&6
e8b05380
PB
5014 break
5015 else
af71363e 5016 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
5025set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 5026echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5027echo "configure:5028: checking for $ac_word" >&5
af71363e
AS
5028if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
5029 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 5030else
fb0103e5
RG
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
af71363e
AS
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"
e8b05380
PB
5044fi
5045fi
af71363e 5046GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
e8b05380 5047if test -n "$GCJ_FOR_TARGET"; then
af71363e 5048 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
e8b05380 5049else
af71363e 5050 echo "$ac_t""no" 1>&6
e8b05380
PB
5051fi
5052
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.
5056set dummy ${ncn_progname}; ac_word=$2
af71363e 5057echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5058echo "configure:5059: checking for $ac_word" >&5
af71363e
AS
5059if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
5060 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380
PB
5061else
5062 if test -n "$GCJ_FOR_TARGET"; then
5063 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
5064else
af71363e
AS
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"
e8b05380
PB
5075fi
5076fi
af71363e 5077GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
e8b05380 5078if test -n "$GCJ_FOR_TARGET"; then
af71363e 5079 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
e8b05380 5080else
af71363e 5081 echo "$ac_t""no" 1>&6
e8b05380 5082fi
af71363e 5083
e8b05380
PB
5084 fi
5085 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
5086 done
5087fi
af71363e 5088
e8b05380
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"
5093 else
5094 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
2693c0b0 5095 fi
e8b05380 5096fi
2693c0b0 5097
e8b05380
PB
5098 if test -n "$with_build_time_tools"; then
5099 for ncn_progname in gfortran; do
af71363e 5100 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5101echo "configure:5102: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5104 echo "$ac_t""yes" 1>&6
e8b05380
PB
5105 break
5106 else
af71363e 5107 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
5116set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 5117echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5118echo "configure:5119: checking for $ac_word" >&5
af71363e
AS
5119if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5120 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380
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
af71363e
AS
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"
e8b05380
PB
5135fi
5136fi
af71363e 5137GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
e8b05380 5138if test -n "$GFORTRAN_FOR_TARGET"; then
af71363e 5139 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
e8b05380 5140else
af71363e 5141 echo "$ac_t""no" 1>&6
e8b05380
PB
5142fi
5143
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.
5147set dummy ${ncn_progname}; ac_word=$2
af71363e 5148echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5149echo "configure:5150: checking for $ac_word" >&5
af71363e
AS
5150if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5151 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380
PB
5152else
5153 if test -n "$GFORTRAN_FOR_TARGET"; then
5154 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5155else
af71363e
AS
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"
e8b05380
PB
5166fi
5167fi
af71363e 5168GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
e8b05380 5169if test -n "$GFORTRAN_FOR_TARGET"; then
af71363e 5170 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
e8b05380 5171else
af71363e 5172 echo "$ac_t""no" 1>&6
e8b05380 5173fi
af71363e 5174
e8b05380
PB
5175 fi
5176 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5177 done
5178fi
af71363e 5179
e8b05380
PB
5180if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5181 set dummy gfortran
2693c0b0 5182 if test $build = $target ; then
e8b05380 5183 GFORTRAN_FOR_TARGET="$2"
ca9f4b81 5184 else
e8b05380
PB
5185 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
5186 fi
5187fi
5188
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
af71363e 5199 PATH_SEPARATOR=:
ca9f4b81 5200 fi
e8b05380
PB
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
5212else
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"
5227else
5228 gcc_cv_tool_dirs=
5229fi
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"
5233fi
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
5244else
5245 GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
5246 have_gcc_for_target=no
5247fi
5248rm conftest.c
5249
5250
5251
5252
5253if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5254 if test -n "$with_build_time_tools"; then
af71363e 5255 echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5256echo "configure:5257: checking for ar in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 5260 echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
d1f8db0c 5261 else
af71363e 5262 echo "$ac_t""no" 1>&6
d1f8db0c 5263 fi
e8b05380
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
5268 fi
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
af71363e 5273echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5274echo "configure:5275: checking for $ac_word" >&5
af71363e
AS
5275if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
5276 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 5277else
af71363e
AS
5278 case "$AR_FOR_TARGET" in
5279 /*)
e8b05380
PB
5280 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
5281 ;;
af71363e
AS
5282 ?:/*)
5283 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
5284 ;;
e8b05380 5285 *)
af71363e
AS
5286 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5287 ac_dummy="$gcc_cv_tool_dirs"
5288 for ac_dir in $ac_dummy; do
5289 test -z "$ac_dir" && ac_dir=.
5290 if test -f $ac_dir/$ac_word; then
5291 ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
5292 break
5293 fi
5294 done
5295 IFS="$ac_save_ifs"
e8b05380
PB
5296 ;;
5297esac
5298fi
af71363e 5299AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
e8b05380 5300if test -n "$AR_FOR_TARGET"; then
af71363e 5301 echo "$ac_t""$AR_FOR_TARGET" 1>&6
e8b05380 5302else
af71363e 5303 echo "$ac_t""no" 1>&6
4de997d1
PB
5304fi
5305
e8b05380
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
af71363e 5310 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5311echo "configure:5312: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5314 echo "$ac_t""yes" 1>&6
e8b05380
PB
5315 break
5316 else
af71363e 5317 echo "$ac_t""no" 1>&6
e8b05380
PB
5318 fi
5319 done
5320fi
5321
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.
2693c0b0 5326set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 5327echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5328echo "configure:5329: checking for $ac_word" >&5
af71363e
AS
5329if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
5330 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5331else
e8b05380
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.
4de997d1 5334else
af71363e
AS
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
5340 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5341 break
5342 fi
5343 done
5344 IFS="$ac_save_ifs"
4de997d1
PB
5345fi
5346fi
af71363e 5347AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
e8b05380 5348if test -n "$AR_FOR_TARGET"; then
af71363e 5349 echo "$ac_t""$AR_FOR_TARGET" 1>&6
4de997d1 5350else
af71363e 5351 echo "$ac_t""no" 1>&6
4de997d1
PB
5352fi
5353
e8b05380
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.
5357set dummy ${ncn_progname}; ac_word=$2
af71363e 5358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5359echo "configure:5360: checking for $ac_word" >&5
af71363e
AS
5360if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
5361 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380
PB
5362else
5363 if test -n "$AR_FOR_TARGET"; then
5364 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
5365else
af71363e
AS
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
5371 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
5372 break
5373 fi
5374 done
5375 IFS="$ac_save_ifs"
e8b05380
PB
5376fi
5377fi
af71363e 5378AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
e8b05380 5379if test -n "$AR_FOR_TARGET"; then
af71363e 5380 echo "$ac_t""$AR_FOR_TARGET" 1>&6
e8b05380 5381else
af71363e 5382 echo "$ac_t""no" 1>&6
e8b05380 5383fi
af71363e 5384
e8b05380
PB
5385 fi
5386 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
5387 done
5388fi
af71363e 5389
e8b05380
PB
5390if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
5391 set dummy ar
5392 if test $build = $target ; then
5393 AR_FOR_TARGET="$2"
5394 else
5395 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
2693c0b0 5396 fi
e8b05380
PB
5397fi
5398
d1f8db0c
PB
5399else
5400 AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
e8b05380
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
af71363e 5408 echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5409echo "configure:5410: checking for as in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 5413 echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
d1f8db0c 5414 else
af71363e 5415 echo "$ac_t""no" 1>&6
d1f8db0c 5416 fi
e8b05380
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
af71363e 5426echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5427echo "configure:5428: checking for $ac_word" >&5
af71363e
AS
5428if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
5429 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 5430else
af71363e
AS
5431 case "$AS_FOR_TARGET" in
5432 /*)
e8b05380
PB
5433 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
5434 ;;
af71363e
AS
5435 ?:/*)
5436 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
5437 ;;
e8b05380 5438 *)
af71363e
AS
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"
e8b05380
PB
5449 ;;
5450esac
5451fi
af71363e 5452AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
e8b05380 5453if test -n "$AS_FOR_TARGET"; then
af71363e 5454 echo "$ac_t""$AS_FOR_TARGET" 1>&6
e8b05380 5455else
af71363e 5456 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 5463 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5464echo "configure:5465: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5467 echo "$ac_t""yes" 1>&6
e8b05380
PB
5468 break
5469 else
af71363e 5470 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 5480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5481echo "configure:5482: checking for $ac_word" >&5
af71363e
AS
5482if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5483 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380
PB
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
af71363e
AS
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"
e8b05380
PB
5498fi
5499fi
af71363e 5500AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
e8b05380 5501if test -n "$AS_FOR_TARGET"; then
af71363e 5502 echo "$ac_t""$AS_FOR_TARGET" 1>&6
e8b05380 5503else
af71363e 5504 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 5510set dummy ${ncn_progname}; ac_word=$2
af71363e 5511echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5512echo "configure:5513: checking for $ac_word" >&5
af71363e
AS
5513if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5514 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5515else
e8b05380
PB
5516 if test -n "$AS_FOR_TARGET"; then
5517 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
4de997d1 5518else
af71363e
AS
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"
4de997d1
PB
5529fi
5530fi
af71363e 5531AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
e8b05380 5532if test -n "$AS_FOR_TARGET"; then
af71363e 5533 echo "$ac_t""$AS_FOR_TARGET" 1>&6
4de997d1 5534else
af71363e 5535 echo "$ac_t""no" 1>&6
4de997d1 5536fi
af71363e 5537
e8b05380
PB
5538 fi
5539 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
5540 done
5541fi
af71363e 5542
e8b05380
PB
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"
4de997d1 5549 fi
e8b05380 5550fi
2693c0b0 5551
d1f8db0c
PB
5552else
5553 AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
4de997d1
PB
5554fi
5555
e8b05380
PB
5556
5557
5558
5559if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5560 if test -n "$with_build_time_tools"; then
af71363e 5561 echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5562echo "configure:5563: checking for dlltool in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 5566 echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
d1f8db0c 5567 else
af71363e 5568 echo "$ac_t""no" 1>&6
d1f8db0c 5569 fi
e8b05380
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
af71363e 5579echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5580echo "configure:5581: checking for $ac_word" >&5
af71363e
AS
5581if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5582 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5583else
af71363e
AS
5584 case "$DLLTOOL_FOR_TARGET" in
5585 /*)
e8b05380
PB
5586 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
5587 ;;
af71363e
AS
5588 ?:/*)
5589 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
5590 ;;
e8b05380 5591 *)
af71363e
AS
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"
e8b05380
PB
5602 ;;
5603esac
4de997d1 5604fi
af71363e 5605DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
e8b05380 5606if test -n "$DLLTOOL_FOR_TARGET"; then
af71363e 5607 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5608else
af71363e 5609 echo "$ac_t""no" 1>&6
4de997d1
PB
5610fi
5611
e8b05380
PB
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
af71363e 5616 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5617echo "configure:5618: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5620 echo "$ac_t""yes" 1>&6
e8b05380
PB
5621 break
5622 else
af71363e 5623 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 5633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5634echo "configure:5635: checking for $ac_word" >&5
af71363e
AS
5635if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5637else
e8b05380
PB
5638 if test -n "$DLLTOOL_FOR_TARGET"; then
5639 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 5640else
af71363e
AS
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"
4de997d1
PB
5651fi
5652fi
af71363e 5653DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
e8b05380 5654if test -n "$DLLTOOL_FOR_TARGET"; then
af71363e 5655 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5656else
af71363e 5657 echo "$ac_t""no" 1>&6
4de997d1 5658fi
4de997d1 5659
e8b05380
PB
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
af71363e 5664echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5665echo "configure:5666: checking for $ac_word" >&5
af71363e
AS
5666if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5667 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5668else
e8b05380
PB
5669 if test -n "$DLLTOOL_FOR_TARGET"; then
5670 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
4de997d1 5671else
af71363e
AS
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"
4de997d1
PB
5682fi
5683fi
af71363e 5684DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
e8b05380 5685if test -n "$DLLTOOL_FOR_TARGET"; then
af71363e 5686 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
4de997d1 5687else
af71363e 5688 echo "$ac_t""no" 1>&6
4de997d1 5689fi
af71363e 5690
e8b05380
PB
5691 fi
5692 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
5693 done
5694fi
af71363e 5695
e8b05380
PB
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
d1f8db0c
PB
5705else
5706 DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
e8b05380
PB
5707fi
5708
4de997d1 5709
e8b05380
PB
5710
5711
5712if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5713 if test -n "$with_build_time_tools"; then
af71363e 5714 echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5715echo "configure:5716: checking for ld in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 5719 echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
d1f8db0c 5720 else
af71363e 5721 echo "$ac_t""no" 1>&6
d1f8db0c 5722 fi
e8b05380
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
2693c0b0 5727 fi
e8b05380
PB
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
af71363e 5732echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5733echo "configure:5734: checking for $ac_word" >&5
af71363e
AS
5734if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5736else
af71363e
AS
5737 case "$LD_FOR_TARGET" in
5738 /*)
e8b05380
PB
5739 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
5740 ;;
af71363e
AS
5741 ?:/*)
5742 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
5743 ;;
e8b05380 5744 *)
af71363e
AS
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"
e8b05380
PB
5755 ;;
5756esac
4de997d1 5757fi
af71363e 5758LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
e8b05380 5759if test -n "$LD_FOR_TARGET"; then
af71363e 5760 echo "$ac_t""$LD_FOR_TARGET" 1>&6
4de997d1 5761else
af71363e 5762 echo "$ac_t""no" 1>&6
4de997d1 5763fi
2693c0b0 5764
e8b05380
PB
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
af71363e 5769 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5770echo "configure:5771: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5773 echo "$ac_t""yes" 1>&6
e8b05380
PB
5774 break
5775 else
af71363e 5776 echo "$ac_t""no" 1>&6
e8b05380
PB
5777 fi
5778 done
ca9f4b81
AO
5779fi
5780
e8b05380
PB
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.
2693c0b0 5785set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 5786echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5787echo "configure:5788: checking for $ac_word" >&5
af71363e
AS
5788if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5789 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5790else
4de997d1
PB
5791 if test -n "$LD_FOR_TARGET"; then
5792 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5793else
af71363e
AS
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"
ca9f4b81
AO
5804fi
5805fi
af71363e 5806LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
4de997d1 5807if test -n "$LD_FOR_TARGET"; then
af71363e 5808 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5809else
af71363e 5810 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5811fi
5812
e8b05380
PB
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.
2693c0b0 5816set dummy ${ncn_progname}; ac_word=$2
af71363e 5817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5818echo "configure:5819: checking for $ac_word" >&5
af71363e
AS
5819if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5820 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5821else
2693c0b0
PB
5822 if test -n "$LD_FOR_TARGET"; then
5823 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5824else
af71363e
AS
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"
ca9f4b81
AO
5835fi
5836fi
af71363e 5837LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
2693c0b0 5838if test -n "$LD_FOR_TARGET"; then
af71363e 5839 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5840else
af71363e 5841 echo "$ac_t""no" 1>&6
ca9f4b81 5842fi
af71363e 5843
e8b05380
PB
5844 fi
5845 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5846 done
5847fi
af71363e 5848
2693c0b0
PB
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"
ca9f4b81 5853 else
2693c0b0 5854 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5855 fi
ca9f4b81
AO
5856fi
5857
d1f8db0c
PB
5858else
5859 LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
e8b05380
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
af71363e 5867 echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5868echo "configure:5869: checking for lipo in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 5872 echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
d1f8db0c 5873 else
af71363e 5874 echo "$ac_t""no" 1>&6
d1f8db0c 5875 fi
e8b05380
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
af71363e 5885echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5886echo "configure:5887: checking for $ac_word" >&5
af71363e
AS
5887if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
5888 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 5889else
af71363e
AS
5890 case "$LIPO_FOR_TARGET" in
5891 /*)
e8b05380
PB
5892 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
5893 ;;
af71363e
AS
5894 ?:/*)
5895 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
5896 ;;
e8b05380 5897 *)
af71363e
AS
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"
e8b05380
PB
5908 ;;
5909esac
5910fi
af71363e 5911LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
e8b05380 5912if test -n "$LIPO_FOR_TARGET"; then
af71363e 5913 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
e8b05380 5914else
af71363e 5915 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 5922 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 5923echo "configure:5924: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 5926 echo "$ac_t""yes" 1>&6
e8b05380
PB
5927 break
5928 else
af71363e 5929 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 5938set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 5939echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5940echo "configure:5941: checking for $ac_word" >&5
af71363e
AS
5941if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5942 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
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
af71363e
AS
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"
040b1c5a
GK
5957fi
5958fi
af71363e 5959LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5960if test -n "$LIPO_FOR_TARGET"; then
af71363e 5961 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5962else
af71363e 5963 echo "$ac_t""no" 1>&6
040b1c5a
GK
5964fi
5965
e8b05380
PB
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.
040b1c5a 5969set dummy ${ncn_progname}; ac_word=$2
af71363e 5970echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 5971echo "configure:5972: checking for $ac_word" >&5
af71363e
AS
5972if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5973 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5974else
5975 if test -n "$LIPO_FOR_TARGET"; then
72a7ab82
AP
5976 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5977else
af71363e
AS
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"
040b1c5a
GK
5988fi
5989fi
af71363e 5990LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5991if test -n "$LIPO_FOR_TARGET"; then
af71363e 5992 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5993else
af71363e 5994 echo "$ac_t""no" 1>&6
040b1c5a 5995fi
af71363e 5996
e8b05380
PB
5997 fi
5998 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5999 done
6000fi
af71363e 6001
040b1c5a
GK
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
d1f8db0c
PB
6011else
6012 LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
e8b05380
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
af71363e 6020 echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6021echo "configure:6022: checking for nm in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 6025 echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
d1f8db0c 6026 else
af71363e 6027 echo "$ac_t""no" 1>&6
d1f8db0c 6028 fi
e8b05380
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
af71363e 6038echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6039echo "configure:6040: checking for $ac_word" >&5
af71363e
AS
6040if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
6041 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 6042else
af71363e
AS
6043 case "$NM_FOR_TARGET" in
6044 /*)
e8b05380
PB
6045 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
6046 ;;
af71363e
AS
6047 ?:/*)
6048 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
6049 ;;
e8b05380 6050 *)
af71363e
AS
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"
e8b05380
PB
6061 ;;
6062esac
6063fi
af71363e 6064NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
e8b05380 6065if test -n "$NM_FOR_TARGET"; then
af71363e 6066 echo "$ac_t""$NM_FOR_TARGET" 1>&6
e8b05380 6067else
af71363e 6068 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 6075 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6076echo "configure:6077: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 6079 echo "$ac_t""yes" 1>&6
e8b05380
PB
6080 break
6081 else
af71363e 6082 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
040b1c5a 6091set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 6092echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6093echo "configure:6094: checking for $ac_word" >&5
af71363e
AS
6094if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
6095 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6096else
4de997d1
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.
ca9f4b81 6099else
af71363e
AS
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"
ca9f4b81
AO
6110fi
6111fi
af71363e 6112NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
4de997d1 6113if test -n "$NM_FOR_TARGET"; then
af71363e 6114 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 6115else
af71363e 6116 echo "$ac_t""no" 1>&6
ca9f4b81
AO
6117fi
6118
e8b05380
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.
2693c0b0 6122set dummy ${ncn_progname}; ac_word=$2
af71363e 6123echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6124echo "configure:6125: checking for $ac_word" >&5
af71363e
AS
6125if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
6126 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6127else
2693c0b0
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.
ca9f4b81 6130else
af71363e
AS
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"
ca9f4b81
AO
6141fi
6142fi
af71363e 6143NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
2693c0b0 6144if test -n "$NM_FOR_TARGET"; then
af71363e 6145 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 6146else
af71363e 6147 echo "$ac_t""no" 1>&6
ca9f4b81 6148fi
af71363e 6149
e8b05380
PB
6150 fi
6151 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
6152 done
6153fi
af71363e 6154
2693c0b0
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"
ca9f4b81 6159 else
2693c0b0 6160 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 6161 fi
ca9f4b81
AO
6162fi
6163
d1f8db0c
PB
6164else
6165 NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
e8b05380
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
af71363e 6173 echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6174echo "configure:6175: checking for objdump in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 6178 echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
d1f8db0c 6179 else
af71363e 6180 echo "$ac_t""no" 1>&6
d1f8db0c 6181 fi
e8b05380
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
af71363e 6191echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6192echo "configure:6193: checking for $ac_word" >&5
af71363e
AS
6193if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6194 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 6195else
af71363e
AS
6196 case "$OBJDUMP_FOR_TARGET" in
6197 /*)
e8b05380
PB
6198 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
6199 ;;
af71363e
AS
6200 ?:/*)
6201 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
6202 ;;
e8b05380 6203 *)
af71363e
AS
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"
e8b05380
PB
6214 ;;
6215esac
6216fi
af71363e 6217OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
e8b05380 6218if test -n "$OBJDUMP_FOR_TARGET"; then
af71363e 6219 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
e8b05380 6220else
af71363e 6221 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 6228 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6229echo "configure:6230: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 6232 echo "$ac_t""yes" 1>&6
e8b05380
PB
6233 break
6234 else
af71363e 6235 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 6244set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 6245echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6246echo "configure:6247: checking for $ac_word" >&5
af71363e
AS
6247if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6248 echo $ac_n "(cached) $ac_c" 1>&6
d739199a
DJ
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
af71363e
AS
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"
d739199a
DJ
6263fi
6264fi
af71363e 6265OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
d739199a 6266if test -n "$OBJDUMP_FOR_TARGET"; then
af71363e 6267 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
d739199a 6268else
af71363e 6269 echo "$ac_t""no" 1>&6
d739199a
DJ
6270fi
6271
e8b05380
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.
d739199a 6275set dummy ${ncn_progname}; ac_word=$2
af71363e 6276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6277echo "configure:6278: checking for $ac_word" >&5
af71363e
AS
6278if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6279 echo $ac_n "(cached) $ac_c" 1>&6
d739199a
DJ
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
af71363e
AS
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"
d739199a
DJ
6294fi
6295fi
af71363e 6296OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
d739199a 6297if test -n "$OBJDUMP_FOR_TARGET"; then
af71363e 6298 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
d739199a 6299else
af71363e 6300 echo "$ac_t""no" 1>&6
d739199a 6301fi
af71363e 6302
e8b05380
PB
6303 fi
6304 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
6305 done
6306fi
af71363e 6307
d739199a
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
d1f8db0c
PB
6317else
6318 OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
e8b05380
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
af71363e 6326 echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6327echo "configure:6328: checking for ranlib in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 6331 echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
d1f8db0c 6332 else
af71363e 6333 echo "$ac_t""no" 1>&6
d1f8db0c 6334 fi
e8b05380
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
af71363e 6344echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6345echo "configure:6346: checking for $ac_word" >&5
af71363e
AS
6346if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6347 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 6348else
af71363e
AS
6349 case "$RANLIB_FOR_TARGET" in
6350 /*)
e8b05380
PB
6351 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
6352 ;;
af71363e
AS
6353 ?:/*)
6354 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
6355 ;;
e8b05380 6356 *)
af71363e
AS
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"
e8b05380
PB
6367 ;;
6368esac
6369fi
af71363e 6370RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
e8b05380 6371if test -n "$RANLIB_FOR_TARGET"; then
af71363e 6372 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
e8b05380 6373else
af71363e 6374 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 6381 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6382echo "configure:6383: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 6385 echo "$ac_t""yes" 1>&6
e8b05380
PB
6386 break
6387 else
af71363e 6388 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
d739199a 6397set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 6398echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6399echo "configure:6400: checking for $ac_word" >&5
af71363e
AS
6400if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6401 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6402else
4de997d1
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.
ca9f4b81 6405else
af71363e
AS
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"
ca9f4b81
AO
6416fi
6417fi
af71363e 6418RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
4de997d1 6419if test -n "$RANLIB_FOR_TARGET"; then
af71363e 6420 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 6421else
af71363e 6422 echo "$ac_t""no" 1>&6
ca9f4b81
AO
6423fi
6424
e8b05380
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.
2693c0b0 6428set dummy ${ncn_progname}; ac_word=$2
af71363e 6429echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6430echo "configure:6431: checking for $ac_word" >&5
af71363e
AS
6431if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6432 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6433else
2693c0b0
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.
ca9f4b81 6436else
af71363e
AS
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"
ca9f4b81
AO
6447fi
6448fi
af71363e 6449RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
2693c0b0 6450if test -n "$RANLIB_FOR_TARGET"; then
af71363e 6451 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 6452else
af71363e 6453 echo "$ac_t""no" 1>&6
ca9f4b81 6454fi
af71363e 6455
e8b05380
PB
6456 fi
6457 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
6458 done
6459fi
af71363e 6460
e8b05380
PB
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"
ca9f4b81 6467 fi
e8b05380 6468fi
2693c0b0 6469
d1f8db0c
PB
6470else
6471 RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
ca9f4b81
AO
6472fi
6473
e8b05380
PB
6474
6475
6476
6477if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6478 if test -n "$with_build_time_tools"; then
af71363e 6479 echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6480echo "configure:6481: checking for strip in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 6484 echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
d1f8db0c 6485 else
af71363e 6486 echo "$ac_t""no" 1>&6
d1f8db0c 6487 fi
e8b05380
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
af71363e 6497echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6498echo "configure:6499: checking for $ac_word" >&5
af71363e
AS
6499if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
6500 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 6501else
af71363e
AS
6502 case "$STRIP_FOR_TARGET" in
6503 /*)
e8b05380
PB
6504 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
6505 ;;
af71363e
AS
6506 ?:/*)
6507 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
6508 ;;
e8b05380 6509 *)
af71363e
AS
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"
e8b05380
PB
6520 ;;
6521esac
6522fi
af71363e 6523STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
e8b05380 6524if test -n "$STRIP_FOR_TARGET"; then
af71363e 6525 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
e8b05380 6526else
af71363e 6527 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 6534 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6535echo "configure:6536: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 6538 echo "$ac_t""yes" 1>&6
e8b05380
PB
6539 break
6540 else
af71363e 6541 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
040b1c5a 6550set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 6551echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6552echo "configure:6553: checking for $ac_word" >&5
af71363e
AS
6553if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
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
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"
040b1c5a
GK
6569fi
6570fi
af71363e 6571STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 6572if test -n "$STRIP_FOR_TARGET"; then
af71363e 6573 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 6574else
af71363e 6575 echo "$ac_t""no" 1>&6
040b1c5a
GK
6576fi
6577
e8b05380
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.
040b1c5a 6581set dummy ${ncn_progname}; ac_word=$2
af71363e 6582echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6583echo "configure:6584: checking for $ac_word" >&5
af71363e
AS
6584if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6585 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
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
af71363e
AS
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"
040b1c5a
GK
6600fi
6601fi
af71363e 6602STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 6603if test -n "$STRIP_FOR_TARGET"; then
af71363e 6604 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 6605else
af71363e 6606 echo "$ac_t""no" 1>&6
040b1c5a 6607fi
af71363e 6608
e8b05380
PB
6609 fi
6610 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
6611 done
6612fi
af71363e 6613
040b1c5a
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
d1f8db0c
PB
6623else
6624 STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
e8b05380
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
af71363e 6632 echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6633echo "configure:6634: checking for windres in $with_build_time_tools" >&5
d1f8db0c
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
af71363e 6637 echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
d1f8db0c 6638 else
af71363e 6639 echo "$ac_t""no" 1>&6
d1f8db0c 6640 fi
e8b05380
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
af71363e 6650echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6651echo "configure:6652: checking for $ac_word" >&5
af71363e
AS
6652if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6653 echo $ac_n "(cached) $ac_c" 1>&6
e8b05380 6654else
af71363e
AS
6655 case "$WINDRES_FOR_TARGET" in
6656 /*)
e8b05380
PB
6657 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
6658 ;;
af71363e
AS
6659 ?:/*)
6660 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
6661 ;;
e8b05380 6662 *)
af71363e
AS
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"
e8b05380
PB
6673 ;;
6674esac
6675fi
af71363e 6676WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
e8b05380 6677if test -n "$WINDRES_FOR_TARGET"; then
af71363e 6678 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
e8b05380 6679else
af71363e 6680 echo "$ac_t""no" 1>&6
e8b05380
PB
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
af71363e 6687 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
e1888513 6688echo "configure:6689: checking for ${ncn_progname} in $with_build_time_tools" >&5
d1f8db0c
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}
af71363e 6691 echo "$ac_t""yes" 1>&6
e8b05380
PB
6692 break
6693 else
af71363e 6694 echo "$ac_t""no" 1>&6
e8b05380
PB
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.
2693c0b0 6703set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
af71363e 6704echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6705echo "configure:6706: checking for $ac_word" >&5
af71363e
AS
6706if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6707 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6708else
4de997d1
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.
ca9f4b81 6711else
af71363e
AS
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"
ca9f4b81
AO
6722fi
6723fi
af71363e 6724WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
4de997d1 6725if test -n "$WINDRES_FOR_TARGET"; then
af71363e 6726 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 6727else
af71363e 6728 echo "$ac_t""no" 1>&6
ca9f4b81
AO
6729fi
6730
e8b05380
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.
2693c0b0 6734set dummy ${ncn_progname}; ac_word=$2
af71363e 6735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e1888513 6736echo "configure:6737: checking for $ac_word" >&5
af71363e
AS
6737if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6738 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 6739else
2693c0b0
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.
ca9f4b81 6742else
af71363e
AS
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"
ca9f4b81
AO
6753fi
6754fi
af71363e 6755WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
2693c0b0 6756if test -n "$WINDRES_FOR_TARGET"; then
af71363e 6757 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 6758else
af71363e 6759 echo "$ac_t""no" 1>&6
ca9f4b81 6760fi
af71363e 6761
e8b05380
PB
6762 fi
6763 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
6764 done
6765fi
af71363e 6766
2693c0b0
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"
ca9f4b81 6771 else
2693c0b0 6772 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 6773 fi
ca9f4b81
AO
6774fi
6775
d1f8db0c
PB
6776else
6777 WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
e8b05380
PB
6778fi
6779
4977bab6 6780
2abefe3d
PB
6781RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
6782
af71363e 6783echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
e1888513 6784echo "configure:6785: checking where to find the target ar" >&5
2abefe3d 6785if test "x${build}" != "x${host}" ; then
e8b05380
PB
6786 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6787 # We already found the complete path
af71363e 6788 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
e8b05380
PB
6789 else
6790 # Canadian cross, just use what we found
af71363e 6791 echo "$ac_t""pre-installed" 1>&6
e8b05380 6792 fi
2abefe3d
PB
6793else
6794 ok=yes
6795 case " ${configdirs} " in
6796 *" binutils "*) ;;
6797 *) ok=no ;;
6798 esac
af71363e 6799
2abefe3d
PB
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'
af71363e 6803 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6804 elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6805 # We already found the complete path
af71363e 6806 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
2abefe3d
PB
6807 elif test "x$target" = "x$host"; then
6808 # We can use an host tool
6809 AR_FOR_TARGET='$(AR)'
af71363e 6810 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6811 else
6812 # We need a cross tool
af71363e 6813 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6814 fi
6815fi
0b0dc272 6816
af71363e 6817echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
e1888513 6818echo "configure:6819: checking where to find the target as" >&5
2abefe3d 6819if test "x${build}" != "x${host}" ; then
e8b05380
PB
6820 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6821 # We already found the complete path
af71363e 6822 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
e8b05380
PB
6823 else
6824 # Canadian cross, just use what we found
af71363e 6825 echo "$ac_t""pre-installed" 1>&6
e8b05380 6826 fi
2abefe3d
PB
6827else
6828 ok=yes
6829 case " ${configdirs} " in
6830 *" gas "*) ;;
6831 *) ok=no ;;
6832 esac
af71363e 6833
2abefe3d
PB
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'
af71363e 6837 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6838 elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6839 # We already found the complete path
af71363e 6840 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
2abefe3d
PB
6841 elif test "x$target" = "x$host"; then
6842 # We can use an host tool
6843 AS_FOR_TARGET='$(AS)'
af71363e 6844 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6845 else
6846 # We need a cross tool
af71363e 6847 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6848 fi
6849fi
0b0dc272 6850
af71363e 6851echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
e1888513 6852echo "configure:6853: checking where to find the target cc" >&5
2abefe3d 6853if test "x${build}" != "x${host}" ; then
e8b05380
PB
6854 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6855 # We already found the complete path
af71363e 6856 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
e8b05380
PB
6857 else
6858 # Canadian cross, just use what we found
af71363e 6859 echo "$ac_t""pre-installed" 1>&6
e8b05380 6860 fi
2abefe3d
PB
6861else
6862 ok=yes
6863 case " ${configdirs} " in
6864 *" gcc "*) ;;
6865 *) ok=no ;;
6866 esac
af71363e 6867
2abefe3d
PB
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/'
af71363e 6871 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6872 elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6873 # We already found the complete path
af71363e 6874 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
2abefe3d
PB
6875 elif test "x$target" = "x$host"; then
6876 # We can use an host tool
6877 CC_FOR_TARGET='$(CC)'
af71363e 6878 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6879 else
6880 # We need a cross tool
af71363e 6881 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6882 fi
6883fi
0b0dc272 6884
af71363e 6885echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
e1888513 6886echo "configure:6887: checking where to find the target c++" >&5
2abefe3d 6887if test "x${build}" != "x${host}" ; then
e8b05380
PB
6888 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6889 # We already found the complete path
af71363e 6890 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
e8b05380
PB
6891 else
6892 # Canadian cross, just use what we found
af71363e 6893 echo "$ac_t""pre-installed" 1>&6
e8b05380 6894 fi
2abefe3d
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'
af71363e 6908 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6909 elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6910 # We already found the complete path
af71363e 6911 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
2abefe3d
PB
6912 elif test "x$target" = "x$host"; then
6913 # We can use an host tool
6914 CXX_FOR_TARGET='$(CXX)'
af71363e 6915 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6916 else
6917 # We need a cross tool
af71363e 6918 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6919 fi
6920fi
0b0dc272 6921
af71363e 6922echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
e1888513 6923echo "configure:6924: checking where to find the target c++ for libstdc++" >&5
2abefe3d 6924if test "x${build}" != "x${host}" ; then
e8b05380
PB
6925 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6926 # We already found the complete path
af71363e 6927 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
e8b05380
PB
6928 else
6929 # Canadian cross, just use what we found
af71363e 6930 echo "$ac_t""pre-installed" 1>&6
e8b05380 6931 fi
2abefe3d
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'
af71363e 6945 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6946 elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6947 # We already found the complete path
af71363e 6948 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
2abefe3d
PB
6949 elif test "x$target" = "x$host"; then
6950 # We can use an host tool
6951 RAW_CXX_FOR_TARGET='$(CXX)'
af71363e 6952 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6953 else
6954 # We need a cross tool
af71363e 6955 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6956 fi
6957fi
0b0dc272 6958
af71363e 6959echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
e1888513 6960echo "configure:6961: checking where to find the target dlltool" >&5
2abefe3d 6961if test "x${build}" != "x${host}" ; then
e8b05380
PB
6962 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6963 # We already found the complete path
af71363e 6964 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
e8b05380
PB
6965 else
6966 # Canadian cross, just use what we found
af71363e 6967 echo "$ac_t""pre-installed" 1>&6
e8b05380 6968 fi
2abefe3d
PB
6969else
6970 ok=yes
6971 case " ${configdirs} " in
6972 *" binutils "*) ;;
6973 *) ok=no ;;
6974 esac
af71363e 6975
2abefe3d
PB
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'
af71363e 6979 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
6980 elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6981 # We already found the complete path
af71363e 6982 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
2abefe3d
PB
6983 elif test "x$target" = "x$host"; then
6984 # We can use an host tool
6985 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
af71363e 6986 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
6987 else
6988 # We need a cross tool
af71363e 6989 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
6990 fi
6991fi
0b0dc272 6992
af71363e 6993echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
e1888513 6994echo "configure:6995: checking where to find the target gcc" >&5
2abefe3d 6995if test "x${build}" != "x${host}" ; then
e8b05380
PB
6996 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6997 # We already found the complete path
af71363e 6998 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
e8b05380
PB
6999 else
7000 # Canadian cross, just use what we found
af71363e 7001 echo "$ac_t""pre-installed" 1>&6
e8b05380 7002 fi
2abefe3d
PB
7003else
7004 ok=yes
7005 case " ${configdirs} " in
7006 *" gcc "*) ;;
7007 *) ok=no ;;
7008 esac
af71363e 7009
2abefe3d
PB
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/'
af71363e 7013 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7014 elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
7015 # We already found the complete path
af71363e 7016 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
2abefe3d
PB
7017 elif test "x$target" = "x$host"; then
7018 # We can use an host tool
7019 GCC_FOR_TARGET='$()'
af71363e 7020 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7021 else
7022 # We need a cross tool
af71363e 7023 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7024 fi
7025fi
0b0dc272 7026
af71363e 7027echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
e1888513 7028echo "configure:7029: checking where to find the target gcj" >&5
2abefe3d 7029if test "x${build}" != "x${host}" ; then
e8b05380
PB
7030 if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
7031 # We already found the complete path
af71363e 7032 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
e8b05380
PB
7033 else
7034 # Canadian cross, just use what we found
af71363e 7035 echo "$ac_t""pre-installed" 1>&6
e8b05380 7036 fi
2abefe3d
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/'
af71363e 7050 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7051 elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
7052 # We already found the complete path
af71363e 7053 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
2abefe3d
PB
7054 elif test "x$target" = "x$host"; then
7055 # We can use an host tool
7056 GCJ_FOR_TARGET='$(GCJ)'
af71363e 7057 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7058 else
7059 # We need a cross tool
af71363e 7060 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7061 fi
7062fi
0b0dc272 7063
af71363e 7064echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
e1888513 7065echo "configure:7066: checking where to find the target gfortran" >&5
2abefe3d 7066if test "x${build}" != "x${host}" ; then
e8b05380
PB
7067 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
7068 # We already found the complete path
af71363e 7069 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
e8b05380
PB
7070 else
7071 # Canadian cross, just use what we found
af71363e 7072 echo "$ac_t""pre-installed" 1>&6
e8b05380 7073 fi
2abefe3d
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/'
af71363e 7087 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7088 elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
7089 # We already found the complete path
af71363e 7090 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
2abefe3d
PB
7091 elif test "x$target" = "x$host"; then
7092 # We can use an host tool
7093 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
af71363e 7094 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7095 else
7096 # We need a cross tool
af71363e 7097 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7098 fi
7099fi
0b0dc272 7100
af71363e 7101echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
e1888513 7102echo "configure:7103: checking where to find the target ld" >&5
2abefe3d 7103if test "x${build}" != "x${host}" ; then
e8b05380
PB
7104 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
7105 # We already found the complete path
af71363e 7106 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
e8b05380
PB
7107 else
7108 # Canadian cross, just use what we found
af71363e 7109 echo "$ac_t""pre-installed" 1>&6
e8b05380 7110 fi
2abefe3d
PB
7111else
7112 ok=yes
7113 case " ${configdirs} " in
7114 *" ld "*) ;;
7115 *) ok=no ;;
7116 esac
af71363e 7117
2abefe3d
PB
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'
af71363e 7121 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7122 elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
7123 # We already found the complete path
af71363e 7124 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
2abefe3d
PB
7125 elif test "x$target" = "x$host"; then
7126 # We can use an host tool
7127 LD_FOR_TARGET='$(LD)'
af71363e 7128 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7129 else
7130 # We need a cross tool
af71363e 7131 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7132 fi
7133fi
0b0dc272 7134
af71363e 7135echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
e1888513 7136echo "configure:7137: checking where to find the target lipo" >&5
2abefe3d 7137if test "x${build}" != "x${host}" ; then
e8b05380
PB
7138 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7139 # We already found the complete path
af71363e 7140 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
e8b05380
PB
7141 else
7142 # Canadian cross, just use what we found
af71363e 7143 echo "$ac_t""pre-installed" 1>&6
e8b05380 7144 fi
2abefe3d 7145else
e8b05380
PB
7146 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7147 # We already found the complete path
af71363e 7148 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
e8b05380 7149 elif test "x$target" = "x$host"; then
2abefe3d
PB
7150 # We can use an host tool
7151 LIPO_FOR_TARGET='$(LIPO)'
af71363e 7152 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7153 else
7154 # We need a cross tool
af71363e 7155 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7156 fi
7157fi
0b0dc272 7158
af71363e 7159echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
e1888513 7160echo "configure:7161: checking where to find the target nm" >&5
2abefe3d 7161if test "x${build}" != "x${host}" ; then
e8b05380
PB
7162 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7163 # We already found the complete path
af71363e 7164 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
e8b05380
PB
7165 else
7166 # Canadian cross, just use what we found
af71363e 7167 echo "$ac_t""pre-installed" 1>&6
e8b05380 7168 fi
2abefe3d
PB
7169else
7170 ok=yes
7171 case " ${configdirs} " in
7172 *" binutils "*) ;;
7173 *) ok=no ;;
7174 esac
af71363e 7175
2abefe3d
PB
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'
af71363e 7179 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7180 elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7181 # We already found the complete path
af71363e 7182 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
2abefe3d
PB
7183 elif test "x$target" = "x$host"; then
7184 # We can use an host tool
7185 NM_FOR_TARGET='$(NM)'
af71363e 7186 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7187 else
7188 # We need a cross tool
af71363e 7189 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7190 fi
7191fi
0b0dc272 7192
af71363e 7193echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
e1888513 7194echo "configure:7195: checking where to find the target objdump" >&5
2abefe3d 7195if test "x${build}" != "x${host}" ; then
e8b05380
PB
7196 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7197 # We already found the complete path
af71363e 7198 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
e8b05380
PB
7199 else
7200 # Canadian cross, just use what we found
af71363e 7201 echo "$ac_t""pre-installed" 1>&6
e8b05380 7202 fi
2abefe3d
PB
7203else
7204 ok=yes
7205 case " ${configdirs} " in
7206 *" binutils "*) ;;
7207 *) ok=no ;;
7208 esac
af71363e 7209
2abefe3d
PB
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'
af71363e 7213 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7214 elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7215 # We already found the complete path
af71363e 7216 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
2abefe3d
PB
7217 elif test "x$target" = "x$host"; then
7218 # We can use an host tool
7219 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
af71363e 7220 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7221 else
7222 # We need a cross tool
af71363e 7223 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7224 fi
7225fi
0b0dc272 7226
af71363e 7227echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
e1888513 7228echo "configure:7229: checking where to find the target ranlib" >&5
2abefe3d 7229if test "x${build}" != "x${host}" ; then
e8b05380
PB
7230 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7231 # We already found the complete path
af71363e 7232 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
e8b05380
PB
7233 else
7234 # Canadian cross, just use what we found
af71363e 7235 echo "$ac_t""pre-installed" 1>&6
e8b05380 7236 fi
2abefe3d
PB
7237else
7238 ok=yes
7239 case " ${configdirs} " in
7240 *" binutils "*) ;;
7241 *) ok=no ;;
7242 esac
af71363e 7243
2abefe3d
PB
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'
af71363e 7247 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7248 elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7249 # We already found the complete path
af71363e 7250 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
2abefe3d
PB
7251 elif test "x$target" = "x$host"; then
7252 # We can use an host tool
7253 RANLIB_FOR_TARGET='$(RANLIB)'
af71363e 7254 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7255 else
7256 # We need a cross tool
af71363e 7257 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7258 fi
7259fi
0b0dc272 7260
af71363e 7261echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
e1888513 7262echo "configure:7263: checking where to find the target strip" >&5
2abefe3d 7263if test "x${build}" != "x${host}" ; then
e8b05380
PB
7264 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7265 # We already found the complete path
af71363e 7266 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
e8b05380
PB
7267 else
7268 # Canadian cross, just use what we found
af71363e 7269 echo "$ac_t""pre-installed" 1>&6
e8b05380 7270 fi
2abefe3d
PB
7271else
7272 ok=yes
7273 case " ${configdirs} " in
7274 *" binutils "*) ;;
7275 *) ok=no ;;
7276 esac
af71363e 7277
2abefe3d
PB
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'
af71363e 7281 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7282 elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7283 # We already found the complete path
af71363e 7284 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
2abefe3d
PB
7285 elif test "x$target" = "x$host"; then
7286 # We can use an host tool
7287 STRIP_FOR_TARGET='$(STRIP)'
af71363e 7288 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7289 else
7290 # We need a cross tool
af71363e 7291 echo "$ac_t""pre-installed" 1>&6
2abefe3d
PB
7292 fi
7293fi
0b0dc272 7294
af71363e 7295echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
e1888513 7296echo "configure:7297: checking where to find the target windres" >&5
2abefe3d 7297if test "x${build}" != "x${host}" ; then
e8b05380
PB
7298 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7299 # We already found the complete path
af71363e 7300 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
e8b05380
PB
7301 else
7302 # Canadian cross, just use what we found
af71363e 7303 echo "$ac_t""pre-installed" 1>&6
e8b05380 7304 fi
2abefe3d
PB
7305else
7306 ok=yes
7307 case " ${configdirs} " in
7308 *" binutils "*) ;;
7309 *) ok=no ;;
7310 esac
af71363e 7311
2abefe3d
PB
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'
af71363e 7315 echo "$ac_t""just compiled" 1>&6
e8b05380
PB
7316 elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7317 # We already found the complete path
af71363e 7318 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
2abefe3d
PB
7319 elif test "x$target" = "x$host"; then
7320 # We can use an host tool
7321 WINDRES_FOR_TARGET='$(WINDRES)'
af71363e 7322 echo "$ac_t""host tool" 1>&6
2abefe3d
PB
7323 else
7324 # We need a cross tool
af71363e 7325 echo "$ac_t""pre-installed" 1>&6
2abefe3d 7326 fi
671aa708 7327fi
be912515
NN
7328
7329
7330
2abefe3d 7331
0b0dc272 7332
671aa708
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
2abefe3d
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
af71363e 7357echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
e1888513 7358echo "configure:7359: checking whether to enable maintainer-specific portions of Makefiles" >&5
ee03dc5e
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
af71363e
AS
7365fi
7366
7367echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
ee03dc5e
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=
af71363e 7376fi
ee03dc5e
AO
7377MAINT=$MAINTAINER_MODE_TRUE
7378
2805b53a
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 ;;
2805b53a
NN
7391esac
7392
0b50988a
EB
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"
af71363e 7399 echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
e1888513 7400echo "configure:7401: checking whether -fkeep-inline-functions is supported" >&5
af71363e 7401 cat > conftest.$ac_ext <<EOF
e1888513 7402#line 7403 "configure"
af71363e
AS
7403#include "confdefs.h"
7404
7405int main() {
7406
7407; return 0; }
7408EOF
e1888513 7409if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
af71363e
AS
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*
0b50988a
EB
7419
7420 CFLAGS="$saved_CFLAGS"
7421fi
7422
7423
2805b53a 7424
8efea775
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
af71363e
AS
7436fi
7437
8efea775
PB
7438
7439
2805b53a
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"
af71363e 7445 :
2805b53a
NN
7446else
7447 enable_werror=yes
af71363e
AS
7448fi
7449
09a9c095
NN
7450case ${enable_werror} in
7451 yes) stage2_werror_flag="--enable-werror-always" ;;
7452 *) stage2_werror_flag="" ;;
2805b53a
NN
7453esac
7454
7455
32845532
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"
af71363e 7463fi
32845532
CD
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"
af71363e 7472fi
32845532
CD
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}"
af71363e
AS
7481fi
7482
32845532
CD
7483
7484
7485
7486
7487
af71363e
AS
7488trap '' 1 2 15
7489cat > confcache <<\EOF
671aa708
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
af71363e
AS
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.
671aa708 7494#
af71363e
AS
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.
671aa708 7503#
af71363e 7504EOF
671aa708
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.
af71363e
AS
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
671aa708 7527 if test -w $cache_file; then
af71363e
AS
7528 echo "updating cache $cache_file"
7529 cat confcache > $cache_file
671aa708
NN
7530 else
7531 echo "not updating unwritable cache $cache_file"
7532 fi
4977bab6 7533fi
671aa708 7534rm -f confcache
79c06341 7535
af71363e
AS
7536trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7537
671aa708
NN
7538test "x$prefix" = xNONE && prefix=$ac_default_prefix
7539# Let make expand exec_prefix.
7540test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4e77e8f1 7541
af71363e
AS
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.
671aa708 7545if test "x$srcdir" = x.; then
af71363e 7546 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
671aa708 7547fi
79c06341 7548
af71363e
AS
7549trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7550
671aa708
NN
7551# Transform confdefs.h into DEFS.
7552# Protect against shell expansion while executing Makefile rules.
7553# Protect against Makefile macro expansion.
a3993f33
KG
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
fb0103e5 7563
0b0dc272 7564
af71363e 7565# Without the "./", some shells look in PATH for config.status.
0b0dc272 7566: ${CONFIG_STATUS=./config.status}
af71363e
AS
7567
7568echo creating $CONFIG_STATUS
7569rm -f $CONFIG_STATUS
7570cat > $CONFIG_STATUS <<EOF
7571#! /bin/sh
7572# Generated automatically by configure.
671aa708 7573# Run this file to recreate the current configuration.
af71363e
AS
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#
671aa708 7579# Compiler output produced by configure, useful for debugging
af71363e 7580# configure, is in ./config.log if it exists.
0b0dc272 7581
af71363e
AS
7582ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7583for ac_option
a4b9e93e 7584do
af71363e 7585 case "\$ac_option" in
671aa708 7586 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
af71363e
AS
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 ;;
0b0dc272
AM
7595 esac
7596done
7597
af71363e
AS
7598ac_given_srcdir=$srcdir
7599ac_given_INSTALL="$INSTALL"
0b0dc272 7600
af71363e
AS
7601trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7602EOF
7603cat >> $CONFIG_STATUS <<EOF
0b0dc272 7604
af71363e
AS
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
7654s%@build_libsubdir@%$build_libsubdir%g
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
671aa708 7665/@serialization_dependencies@/r $serialization_dependencies
af71363e 7666s%@serialization_dependencies@%%g
671aa708 7667/@host_makefile_frag@/r $host_makefile_frag
af71363e 7668s%@host_makefile_frag@%%g
671aa708 7669/@target_makefile_frag@/r $target_makefile_frag
af71363e 7670s%@target_makefile_frag@%%g
671aa708 7671/@alphaieee_frag@/r $alphaieee_frag
af71363e 7672s%@alphaieee_frag@%%g
671aa708 7673/@ospace_frag@/r $ospace_frag
af71363e
AS
7674s%@ospace_frag@%%g
7675s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
7676s%@tooldir@%$tooldir%g
7677s%@build_tooldir@%$build_tooldir%g
7678s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
7679s%@GDB_TK@%$GDB_TK%g
7680s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
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
7686s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7687s%@config_shell@%$config_shell%g
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
7696s%@AR@%$AR%g
7697s%@AS@%$AS%g
7698s%@DLLTOOL@%$DLLTOOL%g
7699s%@LD@%$LD%g
7700s%@LIPO@%$LIPO%g
7701s%@NM@%$NM%g
7702s%@RANLIB@%$RANLIB%g
7703s%@STRIP@%$STRIP%g
7704s%@WINDRES@%$WINDRES%g
7705s%@OBJCOPY@%$OBJCOPY%g
7706s%@OBJDUMP@%$OBJDUMP%g
7707s%@CXX@%$CXX%g
7708s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
7709s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
7710s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
7711s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
7712s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
7713s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
7714s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
7715s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
7716s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
7717s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7718s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
7719s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
7720s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
7721s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7722s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
7723s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
7724s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
7725s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
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
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
7733s%@stage1_checking@%$stage1_checking%g
7734s%@stage2_werror_flag@%$stage2_werror_flag%g
7735s%@datarootdir@%$datarootdir%g
7736s%@docdir@%$docdir%g
7737s%@htmldir@%$htmldir%g
7738
671aa708 7739CEOF
af71363e 7740EOF
79c06341 7741
af71363e
AS
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"
671aa708 7764 else
af71363e 7765 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
671aa708 7766 fi
af71363e
AS
7767 ac_file=`expr $ac_file + 1`
7768 ac_beg=$ac_end
7769 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4977bab6 7770 fi
af71363e
AS
7771done
7772if test -z "$ac_sed_cmds"; then
7773 ac_sed_cmds=cat
7774fi
7775EOF
79c06341 7776
af71363e
AS
7777cat >> $CONFIG_STATUS <<EOF
7778
7779CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7780EOF
7781cat >> $CONFIG_STATUS <<\EOF
7782for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
671aa708 7783 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
af71363e
AS
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" ;;
671aa708 7788 esac
79c06341 7789
af71363e 7790 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
0b0dc272 7791
af71363e
AS
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
0b0dc272 7803
af71363e
AS
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" ;;
671aa708 7809 *) # Relative path.
af71363e
AS
7810 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7811 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7812 esac
a4b9e93e 7813
af71363e
AS
7814 case "$ac_given_INSTALL" in
7815 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7816 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7817 esac
0b0dc272 7818
af71363e
AS
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= ;;
671aa708 7826 esac
79c06341 7827
af71363e
AS
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*
79c06341 7837
af71363e
AS
7838EOF
7839cat >> $CONFIG_STATUS <<EOF
79c06341 7840
af71363e
AS
7841EOF
7842cat >> $CONFIG_STATUS <<\EOF
79c06341 7843
af71363e
AS
7844exit 0
7845EOF
671aa708 7846chmod +x $CONFIG_STATUS
af71363e
AS
7847rm -fr confdefs* $ac_clean_files
7848test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
79c06341 7849
This page took 2.113384 seconds and 5 git commands to generate.