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