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