* configure.ac: Add case for Mingw as host.
[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"
a92834c8 1098 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
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
CM
1333 bfin-*-*)
1334 noconfigdirs="$noconfigdirs target-libgloss 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*)
a0da8069 1442 target_configdirs="$target_configdirs target-mingw"
54d1c879 1443 noconfigdirs="$noconfigdirs expect target-libgloss ${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.
ac0fa625 1449 if test -d "$srcdir/winsup"; then
b76d7de0 1450 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ac0fa625 1451 elif test -d "$srcdir/newlib"; then
b76d7de0
CV
1452 echo "Warning: winsup is missing so newlib can't be built."
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
NN
1554 ;;
1555 mips*-dec-bsd*)
54d1c879 1556 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
a0da8069
NN
1557 ;;
1558 mips*-*-bsd*)
54d1c879 1559 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
a0da8069
NN
1560 ;;
1561 mipstx39-*-*)
54d1c879 1562 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
bba45b8b 1563 ;;
1712ab83 1564 mips64*-*-linux*)
54d1c879 1565 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1712ab83 1566 ;;
a0da8069
NN
1567 mips*-*-linux*)
1568 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1569 ;;
1570 mips*-*-*)
54d1c879 1571 noconfigdirs="$noconfigdirs gprof ${libgcj}"
a0da8069
NN
1572 ;;
1573 romp-*-*)
54d1c879 1574 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
a0da8069 1575 ;;
dbf85af7 1576 sh-*-* | sh64-*-*)
a0da8069 1577 case "${host}" in
ec11bdc6
DD
1578 i[3456789]86-*-vsta) ;; # don't add gprof back in
1579 i[3456789]86-*-go32*) ;; # don't add gprof back in
1580 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
a0da8069
NN
1581 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1582 esac
54d1c879 1583 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069 1584 ;;
a0da8069 1585 sparc-*-elf*)
54d1c879 1586 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1587 ;;
1588 sparc64-*-elf*)
54d1c879 1589 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1590 ;;
1591 sparclite-*-*)
54d1c879 1592 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1593 ;;
1594 sparc-*-sunos4*)
54d1c879 1595 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1596 if test x${is_cross_compiler} != xno ; then
1597 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1598 else
1599 use_gnu_ld=no
1600 fi
1601 ;;
e3c770b1 1602 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
54d1c879 1603 noconfigdirs="$noconfigdirs ${libgcj}"
e3c770b1 1604 ;;
a0da8069
NN
1605 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1606 ;;
1607 v810-*-*)
54d1c879 1608 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
a0da8069
NN
1609 ;;
1610 v850-*-*)
54d1c879 1611 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069
NN
1612 ;;
1613 v850e-*-*)
54d1c879 1614 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069
NN
1615 ;;
1616 v850ea-*-*)
54d1c879 1617 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069
NN
1618 ;;
1619 vax-*-vms)
54d1c879 1620 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
a0da8069
NN
1621 ;;
1622 vax-*-*)
54d1c879 1623 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
a0da8069 1624 ;;
fbd1054d 1625 xtensa-*-*)
54d1c879 1626 noconfigdirs="$noconfigdirs ${libgcj}"
fbd1054d 1627 ;;
a0da8069 1628 ip2k-*-*)
54d1c879 1629 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
a0da8069 1630 ;;
de0b4a87 1631 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
a0da8069
NN
1632 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1633 ;;
1634 *-*-lynxos*)
54d1c879 1635 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
cac3d6c4 1636 ;;
a0da8069 1637 *-*-*)
54d1c879 1638 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1639 ;;
1640esac
252b5132 1641
a0da8069
NN
1642# If we aren't building newlib, then don't build libgloss, since libgloss
1643# depends upon some newlib header files.
1644case "${noconfigdirs}" in
1645 *target-libgloss*) ;;
1646 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1647esac
1648
a0da8069
NN
1649# Work in distributions that contain no compiler tools, like Autoconf.
1650tentative_cc=""
1651host_makefile_frag=/dev/null
1652if test -d ${srcdir}/config ; then
1653case "${host}" in
1654 m68k-hp-hpux*)
1655 # Avoid "too much defining" errors from HPUX compiler.
1656 tentative_cc="cc -Wp,-H256000"
1657 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1658 # If it's HP/UX ar, this should be harmless.
1659 RANLIB="ar ts"
1660 ;;
1661 m68k-apollo-sysv*)
1662 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1663 ;;
1664 m68k-apollo-bsd*)
1665 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1666 # chokes on bfd, the compiler won't let you assign integers to enums, and
1667 # other problems. Defining CC to gcc is a questionable way to say "don't use
1668 # the apollo compiler" (the preferred version of GCC could be called cc,
1669 # or whatever), but I'm not sure leaving CC as cc is any better...
1670 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1671 # Used to have BISON=yacc.
1672 tentative_cc=gcc
1673 ;;
1674 m88k-dg-dgux*)
1675 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
a0da8069
NN
1676 ;;
1677 m88k-harris-cxux*)
1678 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1679 tentative_cc="cc -Xa"
1680 host_makefile_frag="config/mh-cxux"
1681 ;;
1682 m88k-motorola-sysv*)
1683 ;;
1684 mips*-dec-ultrix*)
1685 tentative_cc="cc -Wf,-XNg1000"
1686 host_makefile_frag="config/mh-decstation"
1687 ;;
1688 mips*-nec-sysv4*)
1689 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1690 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1691 host_makefile_frag="config/mh-necv4"
1692 ;;
1693 mips*-sgi-irix4*)
1694 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1695 # environment. Also bump switch table size so that cp-parse will
1696 # compile. Bump string length limit so linker builds.
1697 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1698 ;;
1699 mips*-*-sysv4*)
1700 host_makefile_frag="config/mh-sysv4"
1701 ;;
1702 mips*-*-sysv*)
1703 # This is for a MIPS running RISC/os 4.52C.
1704
1705 # This is needed for GDB, but needs to be in the top-level make because
1706 # if a library is compiled with the bsd headers and gets linked with the
1707 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1708 # a different size).
1709 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1710 # known except to select the sysv environment. Could we use /proc instead?
1711 # These "sysv environments" and "bsd environments" often end up being a pain.
1712 #
1713 # This is not part of CFLAGS because perhaps not all C compilers have this
1714 # option.
1715 tentative_cc="cc -systype sysv"
1716 ;;
1717 i370-ibm-opened*)
1718 tentative_cc="c89"
1719 ;;
ec11bdc6 1720 i[3456789]86-*-sysv5*)
a0da8069
NN
1721 host_makefile_frag="config/mh-sysv5"
1722 ;;
ec11bdc6 1723 i[3456789]86-*-dgux*)
a0da8069
NN
1724 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1725 host_makefile_frag="config/mh-dgux386"
1726 ;;
ec11bdc6 1727 i[3456789]86-ncr-sysv4.3*)
a0da8069
NN
1728 # The MetaWare compiler will generate a copyright message unless you
1729 # turn it off by adding the -Hnocopyr flag.
1730 tentative_cc="cc -Hnocopyr"
1731 ;;
ec11bdc6 1732 i[3456789]86-ncr-sysv4*)
a0da8069
NN
1733 # for an NCR 3000 (i486/SVR4) system.
1734 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1735 # This compiler not only emits obnoxious copyright messages every time
1736 # you run it, but it chokes and dies on a whole bunch of GNU source
1737 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1738 tentative_cc="/usr/ccs/ATT/cc"
1739 host_makefile_frag="config/mh-ncr3000"
1740 ;;
ec11bdc6 1741 i[3456789]86-*-sco3.2v5*)
a0da8069 1742 ;;
ec11bdc6 1743 i[3456789]86-*-sco*)
a0da8069
NN
1744 # The native C compiler botches some simple uses of const. Unfortunately,
1745 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1746 tentative_cc="cc -Dconst="
1747 host_makefile_frag="config/mh-sco"
1748 ;;
ec11bdc6 1749 i[3456789]86-*-udk*)
a0da8069
NN
1750 host_makefile_frag="config/mh-sysv5"
1751 ;;
ec11bdc6 1752 i[3456789]86-*-solaris2*)
a0da8069
NN
1753 host_makefile_frag="config/mh-sysv4"
1754 ;;
ec11bdc6 1755 i[3456789]86-*-msdosdjgpp*)
a0da8069
NN
1756 host_makefile_frag="config/mh-djgpp"
1757 ;;
1758 *-cygwin*)
1759 host_makefile_frag="config/mh-cygwin"
1760 ;;
1761 *-mingw32*)
a0da8069
NN
1762 ;;
1763 *-interix*)
1764 host_makefile_frag="config/mh-interix"
1765 ;;
1766 vax-*-ultrix2*)
1767 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1768 tentative_cc=gcc
1769 ;;
1770 *-*-solaris2*)
1771 host_makefile_frag="config/mh-solaris"
1772 ;;
1773 m68k-sun-sunos*)
1774 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1775 # without overflowing the jump tables (-J says to use a 32 bit table)
1776 tentative_cc="cc -J"
1777 ;;
1778 *-hp-hpux*)
1779 tentative_cc="cc -Wp,-H256000"
1780 ;;
1781 *-*-hiux*)
1782 tentative_cc="cc -Wp,-H256000"
1783 ;;
1784 rs6000-*-lynxos*)
1785 # /bin/cc is less than useful for our purposes. Always use GCC
1786 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1787 host_makefile_frag="config/mh-lynxrs6k"
1788 ;;
0df3d27f
PB
1789 powerpc-*-darwin*)
1790 host_makefile_frag="config/mh-ppc-darwin"
1791 ;;
f6d183c0
PB
1792 powerpc-*-aix*)
1793 host_makefile_frag="config/mh-ppc-aix"
1794 ;;
1795 rs6000-*-aix*)
1796 host_makefile_frag="config/mh-ppc-aix"
1797 ;;
a0da8069
NN
1798 *-*-lynxos*)
1799 # /bin/cc is less than useful for our purposes. Always use GCC
1800 tentative_cc="/bin/gcc"
1801 ;;
1802 *-*-sysv4*)
1803 host_makefile_frag="config/mh-sysv4"
1804 ;;
fe69863c
DD
1805 # This is placed last to prevent interfering with the cases above.
1806 i[3456789]86-*-*)
1807 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1808 host_makefile_frag="config/mh-x86omitfp"
1809 ;;
a0da8069
NN
1810esac
1811fi
1812
9e07f89d
NN
1813# If we aren't going to be using gcc, see if we can extract a definition
1814# of CC from the fragment.
1815# Actually, use the 'pre-extracted' version above.
1816if test -z "${CC}" && test "${build}" = "${host}" ; then
1817 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1818 found=
1819 for dir in $PATH; do
1820 test -z "$dir" && dir=.
1821 if test -f $dir/gcc; then
1822 found=yes
1823 break
1824 fi
1825 done
1826 IFS="$save_ifs"
1827 if test -z "${found}" && test -n "${tentative_cc}" ; then
1828 CC=$tentative_cc
1829 fi
1830fi
1831
1832if test "${build}" != "${host}" ; then
1833 # If we are doing a Canadian Cross, in which the host and build systems
1834 # are not the same, we set reasonable default values for the tools.
1835
9e07f89d
NN
1836 CC=${CC-${host_alias}-gcc}
1837 CFLAGS=${CFLAGS-"-g -O2"}
1838 CXX=${CXX-${host_alias}-c++}
1839 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1840 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
9e07f89d
NN
1841
1842else
1843 # Set reasonable default values for some tools even if not Canadian.
1844 # Of course, these are different reasonable default values, originally
1845 # specified directly in the Makefile.
1846 # We don't export, so that autoconf can do its job.
1847 # Note that all these settings are above the fragment inclusion point
1848 # in Makefile.in, so can still be overridden by fragments.
1849 # This is all going to change when we autoconfiscate...
1850
9e07f89d 1851 CC_FOR_BUILD="\$(CC)"
6a9cf61e 1852 # Extract the first word of "gcc", so it can be a program name with args.
9e07f89d 1853set dummy gcc; ac_word=$2
cac3d6c4 1854echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 1855echo "configure:1856: checking for $ac_word" >&5
cac3d6c4
CM
1856if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1857 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d
NN
1858else
1859 if test -n "$CC"; then
1860 ac_cv_prog_CC="$CC" # Let the user override the test.
1861else
cac3d6c4
CM
1862 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1863 ac_dummy="$PATH"
1864 for ac_dir in $ac_dummy; do
1865 test -z "$ac_dir" && ac_dir=.
1866 if test -f $ac_dir/$ac_word; then
1867 ac_cv_prog_CC="gcc"
1868 break
1869 fi
1870 done
1871 IFS="$ac_save_ifs"
9e07f89d
NN
1872fi
1873fi
cac3d6c4 1874CC="$ac_cv_prog_CC"
9e07f89d 1875if test -n "$CC"; then
cac3d6c4 1876 echo "$ac_t""$CC" 1>&6
9e07f89d 1877else
cac3d6c4 1878 echo "$ac_t""no" 1>&6
9e07f89d
NN
1879fi
1880
1881if test -z "$CC"; then
1882 # Extract the first word of "cc", so it can be a program name with args.
1883set dummy cc; ac_word=$2
cac3d6c4 1884echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 1885echo "configure:1886: checking for $ac_word" >&5
cac3d6c4
CM
1886if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d
NN
1888else
1889 if test -n "$CC"; then
1890 ac_cv_prog_CC="$CC" # Let the user override the test.
1891else
cac3d6c4 1892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9e07f89d 1893 ac_prog_rejected=no
cac3d6c4
CM
1894 ac_dummy="$PATH"
1895 for ac_dir in $ac_dummy; do
1896 test -z "$ac_dir" && ac_dir=.
1897 if test -f $ac_dir/$ac_word; then
1898 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1899 ac_prog_rejected=yes
1900 continue
1901 fi
1902 ac_cv_prog_CC="cc"
1903 break
1904 fi
1905 done
1906 IFS="$ac_save_ifs"
9e07f89d
NN
1907if test $ac_prog_rejected = yes; then
1908 # We found a bogon in the path, so make sure we never use it.
1909 set dummy $ac_cv_prog_CC
1910 shift
cac3d6c4 1911 if test $# -gt 0; then
9e07f89d
NN
1912 # We chose a different compiler from the bogus one.
1913 # However, it has the same basename, so the bogon will be chosen
1914 # first if we set CC to just the basename; use the full file name.
1915 shift
cac3d6c4
CM
1916 set dummy "$ac_dir/$ac_word" "$@"
1917 shift
1918 ac_cv_prog_CC="$@"
9e07f89d
NN
1919 fi
1920fi
1921fi
1922fi
cac3d6c4 1923CC="$ac_cv_prog_CC"
9e07f89d 1924if test -n "$CC"; then
cac3d6c4 1925 echo "$ac_t""$CC" 1>&6
9e07f89d 1926else
cac3d6c4 1927 echo "$ac_t""no" 1>&6
9e07f89d
NN
1928fi
1929
cac3d6c4
CM
1930 if test -z "$CC"; then
1931 case "`uname -s`" in
1932 *win32* | *WIN32*)
1933 # Extract the first word of "cl", so it can be a program name with args.
1934set dummy cl; ac_word=$2
1935echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 1936echo "configure:1937: checking for $ac_word" >&5
cac3d6c4
CM
1937if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1938 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d
NN
1939else
1940 if test -n "$CC"; then
1941 ac_cv_prog_CC="$CC" # Let the user override the test.
1942else
cac3d6c4
CM
1943 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1944 ac_dummy="$PATH"
1945 for ac_dir in $ac_dummy; do
1946 test -z "$ac_dir" && ac_dir=.
1947 if test -f $ac_dir/$ac_word; then
1948 ac_cv_prog_CC="cl"
1949 break
1950 fi
1951 done
1952 IFS="$ac_save_ifs"
9e07f89d
NN
1953fi
1954fi
cac3d6c4 1955CC="$ac_cv_prog_CC"
9e07f89d 1956if test -n "$CC"; then
cac3d6c4 1957 echo "$ac_t""$CC" 1>&6
9e07f89d 1958else
cac3d6c4 1959 echo "$ac_t""no" 1>&6
9e07f89d 1960fi
cac3d6c4
CM
1961 ;;
1962 esac
376a0e54 1963 fi
cac3d6c4 1964 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
9e07f89d
NN
1965fi
1966
cac3d6c4 1967echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
66a79c16 1968echo "configure:1969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
9e07f89d 1969
cac3d6c4
CM
1970ac_ext=c
1971# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1972ac_cpp='$CPP $CPPFLAGS'
1973ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1974ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1975cross_compiling=$ac_cv_prog_cc_cross
1976
1977cat > conftest.$ac_ext << EOF
1978
66a79c16 1979#line 1980 "configure"
cac3d6c4
CM
1980#include "confdefs.h"
1981
1982main(){return(0);}
1983EOF
66a79c16 1984if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cac3d6c4
CM
1985 ac_cv_prog_cc_works=yes
1986 # If we can't run a trivial program, we are probably using a cross compiler.
1987 if (./conftest; exit) 2>/dev/null; then
1988 ac_cv_prog_cc_cross=no
376a0e54 1989 else
cac3d6c4 1990 ac_cv_prog_cc_cross=yes
376a0e54 1991 fi
cac3d6c4
CM
1992else
1993 echo "configure: failed program was:" >&5
1994 cat conftest.$ac_ext >&5
1995 ac_cv_prog_cc_works=no
9e07f89d 1996fi
cac3d6c4
CM
1997rm -fr conftest*
1998ac_ext=c
1999# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2000ac_cpp='$CPP $CPPFLAGS'
2001ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2002ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2003cross_compiling=$ac_cv_prog_cc_cross
2004
2005echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2006if test $ac_cv_prog_cc_works = no; then
2007 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2008fi
2009echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
66a79c16 2010echo "configure:2011: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
cac3d6c4
CM
2011echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2012cross_compiling=$ac_cv_prog_cc_cross
2013
2014echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
66a79c16 2015echo "configure:2016: checking whether we are using GNU C" >&5
cac3d6c4
CM
2016if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2017 echo $ac_n "(cached) $ac_c" 1>&6
2018else
2019 cat > conftest.c <<EOF
2020#ifdef __GNUC__
2021 yes;
2022#endif
2023EOF
66a79c16 2024if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
cac3d6c4 2025 ac_cv_prog_gcc=yes
376a0e54 2026else
cac3d6c4
CM
2027 ac_cv_prog_gcc=no
2028fi
2029fi
2030
2031echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2032
2033if test $ac_cv_prog_gcc = yes; then
2034 GCC=yes
9e07f89d 2035else
cac3d6c4
CM
2036 GCC=
2037fi
376a0e54 2038
cac3d6c4
CM
2039ac_test_CFLAGS="${CFLAGS+set}"
2040ac_save_CFLAGS="$CFLAGS"
2041CFLAGS=
2042echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
66a79c16 2043echo "configure:2044: checking whether ${CC-cc} accepts -g" >&5
cac3d6c4
CM
2044if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2045 echo $ac_n "(cached) $ac_c" 1>&6
2046else
2047 echo 'void f(){}' > conftest.c
2048if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
9e07f89d
NN
2049 ac_cv_prog_cc_g=yes
2050else
cac3d6c4 2051 ac_cv_prog_cc_g=no
9e07f89d 2052fi
cac3d6c4
CM
2053rm -f conftest*
2054
376a0e54 2055fi
cac3d6c4
CM
2056
2057echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
9e07f89d 2058if test "$ac_test_CFLAGS" = set; then
cac3d6c4 2059 CFLAGS="$ac_save_CFLAGS"
9e07f89d
NN
2060elif test $ac_cv_prog_cc_g = yes; then
2061 if test "$GCC" = yes; then
2062 CFLAGS="-g -O2"
2063 else
2064 CFLAGS="-g"
2065 fi
2066else
2067 if test "$GCC" = yes; then
2068 CFLAGS="-O2"
2069 else
2070 CFLAGS=
2071 fi
2072fi
2073
2074
6a9cf61e
PB
2075 # We must set the default linker to the linker used by gcc for the correct
2076 # operation of libtool. If LD is not defined and we are using gcc, try to
2077 # set the LD default to the ld used by gcc.
2078 if test -z "$LD"; then
2079 if test "$GCC" = yes; then
2080 case $build in
2081 *-*-mingw*)
2082 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2083 *)
2084 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2085 esac
2086 case $gcc_prog_ld in
2087 # Accept absolute paths.
2088 [\\/]* | [A-Za-z]:[\\/]*)
2089 LD="$gcc_prog_ld" ;;
2090 esac
2091 fi
2092 fi
2093
2094 CXX=${CXX-"c++"}
2095 CFLAGS=${CFLAGS-"-g"}
2096 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2097fi
2098
cac3d6c4
CM
2099if test $host != $build; then
2100 ac_tool_prefix=${host_alias}-
2101else
2102 ac_tool_prefix=
2103fi
6a9cf61e
PB
2104
2105
9e07f89d 2106
cac3d6c4 2107# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
9e07f89d 2108set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
cac3d6c4 2109echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 2110echo "configure:2111: checking for $ac_word" >&5
cac3d6c4
CM
2111if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2112 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d
NN
2113else
2114 if test -n "$GNATBIND"; then
2115 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2116else
cac3d6c4
CM
2117 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2118 ac_dummy="$PATH"
2119 for ac_dir in $ac_dummy; do
2120 test -z "$ac_dir" && ac_dir=.
2121 if test -f $ac_dir/$ac_word; then
2122 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2123 break
2124 fi
2125 done
2126 IFS="$ac_save_ifs"
9e07f89d
NN
2127fi
2128fi
cac3d6c4 2129GNATBIND="$ac_cv_prog_GNATBIND"
9e07f89d 2130if test -n "$GNATBIND"; then
cac3d6c4 2131 echo "$ac_t""$GNATBIND" 1>&6
9e07f89d 2132else
cac3d6c4 2133 echo "$ac_t""no" 1>&6
9e07f89d
NN
2134fi
2135
cac3d6c4 2136
9e07f89d 2137if test -z "$ac_cv_prog_GNATBIND"; then
cac3d6c4 2138if test -n "$ac_tool_prefix"; then
9e07f89d
NN
2139 # Extract the first word of "gnatbind", so it can be a program name with args.
2140set dummy gnatbind; ac_word=$2
cac3d6c4 2141echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 2142echo "configure:2143: checking for $ac_word" >&5
cac3d6c4
CM
2143if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2144 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d 2145else
cac3d6c4
CM
2146 if test -n "$GNATBIND"; then
2147 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
9e07f89d 2148else
cac3d6c4
CM
2149 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2150 ac_dummy="$PATH"
2151 for ac_dir in $ac_dummy; do
2152 test -z "$ac_dir" && ac_dir=.
2153 if test -f $ac_dir/$ac_word; then
2154 ac_cv_prog_GNATBIND="gnatbind"
2155 break
2156 fi
2157 done
2158 IFS="$ac_save_ifs"
2159 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
9e07f89d
NN
2160fi
2161fi
cac3d6c4
CM
2162GNATBIND="$ac_cv_prog_GNATBIND"
2163if test -n "$GNATBIND"; then
2164 echo "$ac_t""$GNATBIND" 1>&6
9e07f89d 2165else
cac3d6c4 2166 echo "$ac_t""no" 1>&6
9e07f89d
NN
2167fi
2168
2169else
cac3d6c4
CM
2170 GNATBIND="no"
2171fi
9e07f89d
NN
2172fi
2173
cac3d6c4 2174echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
66a79c16 2175echo "configure:2176: checking whether compiler driver understands Ada" >&5
cac3d6c4
CM
2176if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2177 echo $ac_n "(cached) $ac_c" 1>&6
9e07f89d
NN
2178else
2179 cat >conftest.adb <<EOF
2180procedure conftest is begin null; end conftest;
2181EOF
2182acx_cv_cc_gcc_supports_ada=no
2183# There is a bug in old released versions of GCC which causes the
2184# driver to exit successfully when the appropriate language module
2185# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2186# Therefore we must check for the error message as well as an
2187# unsuccessful exit.
b8908782
DD
2188# Other compilers, like HP Tru64 UNIX cc, exit successfully when
2189# given a .adb file, but produce no object file. So we must check
2190# if an object file was really produced to guard against this.
9e07f89d 2191errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
b8908782 2192if test x"$errors" = x && test -f conftest.$ac_objext; then
9e07f89d 2193 acx_cv_cc_gcc_supports_ada=yes
9e07f89d
NN
2194fi
2195rm -f conftest.*
2196fi
cac3d6c4
CM
2197
2198echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
9e07f89d 2199
b8908782 2200if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
9e07f89d
NN
2201 have_gnat=yes
2202else
2203 have_gnat=no
2204fi
2205
cac3d6c4 2206echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
66a79c16 2207echo "configure:2208: checking how to compare bootstrapped objects" >&5
cac3d6c4
CM
2208if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
b8908782
DD
2210else
2211 echo abfoo >t1
2212 echo cdfoo >t2
2213 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
4b1cb4fe
DD
2214 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2215 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2216 :
2217 else
2218 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2219 fi
2220 fi
b8908782
DD
2221 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2222 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
4b1cb4fe 2223 :
b8908782
DD
2224 else
2225 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2226 fi
2227 fi
2228 rm t1 t2
2229
2230fi
cac3d6c4
CM
2231
2232echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
b8908782
DD
2233do_compare="$gcc_cv_prog_cmp_skip"
2234
2235
9e07f89d 2236
11b04d1f 2237# Check for GMP and MPFR
4b1cb4fe
DD
2238gmplibs=
2239gmpinc=
2240have_gmp=yes
11b04d1f
DD
2241# Specify a location for mpfr
2242# check for this first so it ends up on the link line before gmp.
2243# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2244if test "${with_mpfr_dir+set}" = set; then
2245 withval="$with_mpfr_dir"
cac3d6c4
CM
2246 :
2247fi
11b04d1f
DD
2248
2249
2250if test "x$with_mpfr_dir" != x; then
c10e9ba7 2251 gmpinc="-I$with_mpfr_dir"
11b04d1f
DD
2252 gmplibs="$with_mpfr_dir/libmpfr.a"
2253else
2254 gmplibs="-lmpfr"
2255fi
2256
2257# Check whether --with-mpfr or --without-mpfr was given.
2258if test "${with_mpfr+set}" = set; then
2259 withval="$with_mpfr"
cac3d6c4
CM
2260 :
2261fi
11b04d1f
DD
2262
2263
2264if test "x$with_mpfr" != x; then
2265 gmplibs="-L$with_mpfr/lib $gmplibs"
2266 gmpinc="-I$with_mpfr/include"
2267fi
2268
4b1cb4fe
DD
2269# Specify a location for gmp
2270# Check whether --with-gmp-dir or --without-gmp-dir was given.
2271if test "${with_gmp_dir+set}" = set; then
2272 withval="$with_gmp_dir"
cac3d6c4
CM
2273 :
2274fi
4b1cb4fe
DD
2275
2276
11b04d1f
DD
2277if test "x$with_gmp_dir" != x; then
2278 gmpinc="$gmpinc -I$with_gmp_dir"
4b1cb4fe 2279 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
11b04d1f 2280 gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
4b1cb4fe 2281 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
11b04d1f 2282 gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
4b1cb4fe
DD
2283 fi
2284 # One of the later tests will catch the error if neither library is present.
11b04d1f
DD
2285else
2286 gmplibs="$gmplibs -lgmp"
4b1cb4fe
DD
2287fi
2288
2289# Check whether --with-gmp or --without-gmp was given.
2290if test "${with_gmp+set}" = set; then
2291 withval="$with_gmp"
cac3d6c4
CM
2292 :
2293fi
4b1cb4fe
DD
2294
2295
11b04d1f
DD
2296if test "x$with_gmp" != x; then
2297 gmplibs="-L$with_gmp/lib $gmplibs"
2298 gmpinc="-I$with_gmp/include $gmpinc"
4b1cb4fe
DD
2299fi
2300
2301saved_CFLAGS="$CFLAGS"
2302CFLAGS="$CFLAGS $gmpinc"
2303# Check GMP actually works
cac3d6c4 2304echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
66a79c16 2305echo "configure:2306: checking for correct version of gmp.h" >&5
cac3d6c4 2306cat > conftest.$ac_ext <<EOF
66a79c16 2307#line 2308 "configure"
cac3d6c4 2308#include "confdefs.h"
4b1cb4fe 2309#include "gmp.h"
cac3d6c4 2310int main() {
4b1cb4fe
DD
2311
2312#if __GNU_MP_VERSION < 3
2313choke me
2314#endif
2315
cac3d6c4
CM
2316; return 0; }
2317EOF
66a79c16 2318if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cac3d6c4
CM
2319 rm -rf conftest*
2320 echo "$ac_t""yes" 1>&6
2321else
2322 echo "configure: failed program was:" >&5
2323 cat conftest.$ac_ext >&5
2324 rm -rf conftest*
2325 echo "$ac_t""no" 1>&6; have_gmp=no
2326fi
2327rm -f conftest*
4b1cb4fe
DD
2328
2329if test x"$have_gmp" = xyes; then
cac3d6c4 2330 echo $ac_n "checking for MPFR""... $ac_c" 1>&6
66a79c16 2331echo "configure:2332: checking for MPFR" >&5
4b1cb4fe
DD
2332
2333 saved_LIBS="$LIBS"
2334 LIBS="$LIBS $gmplibs"
cac3d6c4 2335 cat > conftest.$ac_ext <<EOF
66a79c16 2336#line 2337 "configure"
cac3d6c4 2337#include "confdefs.h"
4b1cb4fe 2338#include <gmp.h>
11b04d1f 2339#include <mpfr.h>
cac3d6c4 2340int main() {
11b04d1f 2341mpfr_t n; mpfr_init(n);
cac3d6c4
CM
2342; return 0; }
2343EOF
66a79c16 2344if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cac3d6c4
CM
2345 rm -rf conftest*
2346 echo "$ac_t""yes" 1>&6
2347else
2348 echo "configure: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350 rm -rf conftest*
2351 echo "$ac_t""no" 1>&6; have_gmp=no
2352fi
2353rm -f conftest*
4b1cb4fe 2354 LIBS="$saved_LIBS"
4b1cb4fe 2355fi
8b01a5c2 2356CFLAGS="$saved_CFLAGS"
4b1cb4fe 2357
11b04d1f 2358# Flags needed for both GMP and/or MPFR
4b1cb4fe
DD
2359
2360
2361
947f426e 2362# By default, C is the only stage 1 language.
1d39f329
NN
2363stage1_languages=c
2364
2365
9e07f89d
NN
2366# Figure out what language subdirectories are present.
2367# Look if the user specified --enable-languages="..."; if not, use
2368# the environment variable $LANGUAGES if defined. $LANGUAGES might
2369# go away some day.
2370# NB: embedded tabs in this IF block -- do not untabify
2371if test -d ${srcdir}/gcc; then
2372 if test x"${enable_languages+set}" != xset; then
2373 if test x"${LANGUAGES+set}" = xset; then
2374 enable_languages="${LANGUAGES}"
2375 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2376 else
2377 enable_languages=all
2378 fi
2379 else
2380 if test x"${enable_languages}" = x ||
2381 test x"${enable_languages}" = xyes;
2382 then
2383 echo configure.in: --enable-languages needs at least one language argument 1>&2
2384 exit 1
2385 fi
2386 fi
2387 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2388
096f7d00
DE
2389 # 'f95' is the old name for the 'fortran' language. We issue a warning
2390 # and make the substitution.
2391 case ,${enable_languages}, in
2392 *,f95,*)
2393 echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
2394 enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
2395 ;;
2396 esac
2397
9e07f89d
NN
2398 # First scan to see if an enabled language requires some other language.
2399 # We assume that a given config-lang.in will list all the language
2400 # front ends it requires, even if some are required indirectly.
2401 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2402 case ${lang_frag} in
2403 ..) ;;
2404 # The odd quoting in the next line works around
2405 # an apparent bug in bash 1.12 on linux.
2406 ${srcdir}/gcc/[*]/config-lang.in) ;;
2407 *)
2408 # From the config-lang.in, get $language, $lang_requires
2409 language=
2410 lang_requires=
2411 . ${lang_frag}
2412 for other in ${lang_requires} ; do
2413 case ,${enable_languages}, in
2414 *,$other,*) ;;
2415 *,all,*) ;;
2416 *,$language,*)
2417 echo " \`$other' language required by \`$language'; enabling" 1>&2
2418 enable_languages="${enable_languages},${other}"
2419 ;;
2420 esac
2421 done
2422 ;;
2423 esac
2424 done
2425
2426 new_enable_languages=c
2427 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
9cb3fa6f 2428 potential_languages=c
9e07f89d
NN
2429
2430 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2431 case ${lang_frag} in
2432 ..) ;;
2433 # The odd quoting in the next line works around
2434 # an apparent bug in bash 1.12 on linux.
2435 ${srcdir}/gcc/[*]/config-lang.in) ;;
2436 *)
cac3d6c4 2437 # From the config-lang.in, get $language, $target_libs,
1d39f329 2438 # $lang_dirs, $boot_language, and $build_by_default
9e07f89d
NN
2439 language=
2440 target_libs=
2441 lang_dirs=
64ce424c 2442 subdir_requires=
1d39f329 2443 boot_language=
9e07f89d 2444 build_by_default=
9cb3fa6f 2445 need_gmp=
9e07f89d 2446 . ${lang_frag}
9cb3fa6f 2447 potential_languages="${potential_languages},${language}"
9e07f89d
NN
2448 # This is quite sensitive to the ordering of the case statement arms.
2449 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2450 *::*:*)
2451 echo "${lang_frag} doesn't set \$language." 1>&2
2452 exit 1
9cb3fa6f 2453 ;;
9e07f89d
NN
2454 *:ada:no:*)
2455 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2456 add_this_lang=no
2457 ;;
2458 *,${language},*:*:*:*)
2459 # Language was explicitly selected; include it.
2460 add_this_lang=yes
2461 ;;
2462 *,all,*:*:*:no)
2463 # 'all' was selected, but this is not a default language
9cb3fa6f 2464 # so do not include it.
9e07f89d 2465 add_this_lang=no
9cb3fa6f 2466 ;;
9e07f89d
NN
2467 *,all,*:*:*:*)
2468 # 'all' was selected and this is a default language; include it.
2469 add_this_lang=yes
2470 ;;
2471 *)
2472 add_this_lang=no
2473 ;;
2474 esac
4b1cb4fe 2475
64ce424c 2476 # Disable languages that need other directories if these aren't available.
1f3f1bbf 2477 for i in $subdir_requires; do
3d3adb43 2478 test -f "$srcdir/gcc/$i/config-lang.in" && continue
64ce424c
PB
2479 case ,${enable_languages}, in
2480 *,${language},*)
2481 # Specifically requested language; tell them.
2482 { echo "configure: error: The gcc/$i directory contains parts of $language but is missing" 1>&2; exit 1; }
2483 ;;
2484 *)
2485 # Silently disable.
2486 add_this_lang=no
2487 ;;
2488 esac
2489 done
2490
9cb3fa6f
PB
2491 # Disable languages that need GMP if it isn't available.
2492 case ,${enable_languages},:${have_gmp}:${need_gmp} in
2493 *,${language},*:no:yes)
2494 # Specifically requested language; tell them.
cac3d6c4 2495 { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
9cb3fa6f
PB
2496 ;;
2497 *:no:yes)
2498 # Silently disable.
2499 add_this_lang=no
2500 ;;
2501 esac
59f7ec45
HPN
2502
2503 # Disable a language that is unsupported by the target.
2504 case " $unsupported_languages " in
2505 *" $language "*)
2506 add_this_lang=no
2507 ;;
2508 esac
2509
4b1cb4fe 2510 case $add_this_lang in
9e07f89d
NN
2511 no)
2512 # Remove language-dependent dirs.
1d39f329
NN
2513 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2514 ;;
9e07f89d
NN
2515 *)
2516 new_enable_languages="$new_enable_languages,$language"
1d39f329
NN
2517 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2518 case ${boot_language} in
2519 yes)
4fa63067
NN
2520 # Add to (comma-separated) list of stage 1 languages.
2521 stage1_languages="${stage1_languages},${language}"
1d39f329
NN
2522 ;;
2523 esac
2524 ;;
9e07f89d
NN
2525 esac
2526 ;;
2527 esac
2528 done
2529
4b0ac75d 2530 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
9e07f89d 2531 if test "x$missing_languages" != x; then
cac3d6c4 2532 { echo "configure: error:
27258dd4 2533The following requested languages could not be built: ${missing_languages}
cac3d6c4 2534Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
9e07f89d
NN
2535 fi
2536
2537 if test "x$new_enable_languages" != "x$enable_languages"; then
2538 echo The following languages will be built: ${new_enable_languages}
2539 fi
2540 enable_languages="$new_enable_languages"
2e70b094 2541 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
9e07f89d
NN
2542fi
2543
a6df5a19
PB
2544# Handle --disable-<component> generically.
2545for dir in $configdirs $build_configdirs $target_configdirs ; do
2546 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
2547 if eval test x\${enable_${dirname}} "=" xno ; then
2548 noconfigdirs="$noconfigdirs $dir"
2549 fi
2550done
2551
4f0ef2d8
CD
2552# Check for Boehm's garbage collector
2553# Check whether --enable-objc-gc or --disable-objc-gc was given.
2554if test "${enable_objc_gc+set}" = set; then
2555 enableval="$enable_objc_gc"
2556 case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
2557 *,objc,*:*:yes:*target-boehm-gc*)
2558 { echo "configure: error: Boehm's garbage collector was requested yet not supported in this configuration" 1>&2; exit 1; }
2559 ;;
2560esac
2561fi
2562
2563
2564# Make sure we only build Boehm's garbage collector if required.
d42c4017
DA
2565case ,${enable_languages},:${enable_objc_gc} in
2566 *,objc,*:yes)
4f0ef2d8
CD
2567 # Keep target-boehm-gc if requested for Objective-C.
2568 ;;
4f0ef2d8 2569 *)
d42c4017
DA
2570 # Otherwise remove target-boehm-gc depending on target-libjava.
2571 if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
2572 noconfigdirs="$noconfigdirs target-boehm-gc"
2573 fi
4f0ef2d8
CD
2574 ;;
2575esac
2576
caeba88f
AL
2577# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2578# $build_configdirs and $target_configdirs.
9e07f89d
NN
2579# If we have the source for $noconfigdirs entries, add them to $notsupp.
2580
2581notsupp=""
2582for dir in . $skipdirs $noconfigdirs ; do
caeba88f 2583 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
9e07f89d
NN
2584 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2585 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2586 if test -r $srcdir/$dirname/configure ; then
2587 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2588 true
2589 else
2590 notsupp="$notsupp $dir"
2591 fi
2592 fi
2593 fi
caeba88f
AL
2594 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2595 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2596 if test -r $srcdir/$dirname/configure ; then
2597 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2598 true
2599 else
2600 notsupp="$notsupp $dir"
2601 fi
2602 fi
2603 fi
9e07f89d
NN
2604 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2605 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2606 if test -r $srcdir/$dirname/configure ; then
2607 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2608 true
2609 else
2610 notsupp="$notsupp $dir"
2611 fi
2612 fi
2613 fi
2614done
2615
2616# Sometimes the tools are distributed with libiberty but with no other
2617# libraries. In that case, we don't want to build target-libiberty.
2618if test -n "${target_configdirs}" ; then
2619 others=
2620 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2621 if test "$i" != "libiberty" ; then
2622 if test -r $srcdir/$i/configure ; then
2623 others=yes;
2624 break;
2625 fi
2626 fi
2627 done
2628 if test -z "${others}" ; then
2629 target_configdirs=
2630 fi
2631fi
2632
2633# Quietly strip out all directories which aren't configurable in this tree.
2634# This relies on all configurable subdirectories being autoconfiscated, which
2635# is now the case.
6a9cf61e
PB
2636build_configdirs_all="$build_configdirs"
2637build_configdirs=
2638for i in ${build_configdirs_all} ; do
cac3d6c4 2639 j=`echo $i | sed -e s/build-//g`
6a9cf61e
PB
2640 if test -f ${srcdir}/$j/configure ; then
2641 build_configdirs="${build_configdirs} $i"
2642 fi
2643done
2644
9e07f89d
NN
2645configdirs_all="$configdirs"
2646configdirs=
2647for i in ${configdirs_all} ; do
2648 if test -f ${srcdir}/$i/configure ; then
2649 configdirs="${configdirs} $i"
2650 fi
2651done
6a9cf61e 2652
9e07f89d
NN
2653target_configdirs_all="$target_configdirs"
2654target_configdirs=
2655for i in ${target_configdirs_all} ; do
cac3d6c4 2656 j=`echo $i | sed -e s/target-//g`
9e07f89d
NN
2657 if test -f ${srcdir}/$j/configure ; then
2658 target_configdirs="${target_configdirs} $i"
2659 fi
2660done
2661
2662# Produce a warning message for the subdirs we can't configure.
2663# This isn't especially interesting in the Cygnus tree, but in the individual
2664# FSF releases, it's important to let people know when their machine isn't
2665# supported by the one or two programs in a package.
2666
2667if test -n "${notsupp}" && test -z "${norecursion}" ; then
2668 # If $appdirs is non-empty, at least one of those directories must still
2669 # be configured, or we error out. (E.g., if the gas release supports a
2670 # specified target in some subdirs but not the gas subdir, we shouldn't
2671 # pretend that all is well.)
2672 if test -n "$appdirs" ; then
2673 for dir in $appdirs ; do
2674 if test -r $dir/Makefile.in ; then
2675 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2676 appdirs=""
2677 break
2678 fi
6a9cf61e 2679 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
9e07f89d
NN
2680 appdirs=""
2681 break
2682 fi
2683 fi
2684 done
2685 if test -n "$appdirs" ; then
2686 echo "*** This configuration is not supported by this package." 1>&2
2687 exit 1
2688 fi
2689 fi
2690 # Okay, some application will build, or we don't care to check. Still
2691 # notify of subdirs not getting built.
2692 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2693 echo " ${notsupp}" 1>&2
2694 echo " (Any other directories should still work fine.)" 1>&2
2695fi
2696
2697case "$host" in
2698 *msdosdjgpp*)
2699 enable_gdbtk=no ;;
2700esac
2701
2702copy_dirs=
2703
a19b6204
MM
2704# Check whether --with-build-sysroot or --without-build-sysroot was given.
2705if test "${with_build_sysroot+set}" = set; then
2706 withval="$with_build_sysroot"
2707 if test x"$withval" != x ; then
2708 SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
2709 fi
2710else
2711 SYSROOT_CFLAGS_FOR_TARGET=
cac3d6c4
CM
2712fi
2713
a19b6204
MM
2714
2715
9e07f89d
NN
2716# Handle --with-headers=XXX. If the value is not "yes", the contents of
2717# the named directory are copied to $(tooldir)/sys-include.
2718if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2719 if test x${is_cross_compiler} = xno ; then
2720 echo 1>&2 '***' --with-headers is only supported when cross compiling
2721 exit 1
2722 fi
2723 if test x"${with_headers}" != xyes ; then
2724 case "${exec_prefixoption}" in
2725 "") x=${prefix} ;;
2726 *) x=${exec_prefix} ;;
2727 esac
2728 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2729 fi
2730fi
2731
2732# Handle --with-libs=XXX. If the value is not "yes", the contents of
2733# the name directories are copied to $(tooldir)/lib. Multiple directories
2734# are permitted.
2735if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2736 if test x${is_cross_compiler} = xno ; then
2737 echo 1>&2 '***' --with-libs is only supported when cross compiling
2738 exit 1
2739 fi
2740 if test x"${with_libs}" != xyes ; then
2741 # Copy the libraries in reverse order, so that files in the first named
2742 # library override files in subsequent libraries.
2743 case "${exec_prefixoption}" in
2744 "") x=${prefix} ;;
2745 *) x=${exec_prefix} ;;
2746 esac
2747 for l in ${with_libs}; do
2748 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2749 done
2750 fi
2751fi
2752
2429c060
PB
2753# Set with_gnu_as and with_gnu_ld as appropriate.
2754#
2755# This is done by determining whether or not the appropriate directory
2756# is available, and by checking whether or not specific configurations
2757# have requested that this magic not happen.
2758#
2759# The command line options always override the explicit settings in
2760# configure.in, and the settings in configure.in override this magic.
2761#
2762# If the default for a toolchain is to use GNU as and ld, and you don't
2763# want to do that, then you should use the --without-gnu-as and
2764# --without-gnu-ld options for the configure script.
2765
2766if test x${use_gnu_as} = x &&
2767 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2768 with_gnu_as=yes
2769 extra_host_args="$extra_host_args --with-gnu-as"
2770fi
2771
2772if test x${use_gnu_ld} = x &&
2773 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2774 with_gnu_ld=yes
2775 extra_host_args="$extra_host_args --with-gnu-ld"
2776fi
2777
2778# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2779# can detect this case.
2780
2781if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2782 with_newlib=yes
2783 extra_host_args="$extra_host_args --with-newlib"
2784fi
2785
9e07f89d
NN
2786# Handle ${copy_dirs}
2787set fnord ${copy_dirs}
2788shift
2789while test $# != 0 ; do
2790 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2791 :
2792 else
2793 echo Copying $1 to $2
2794
2795 # Use the install script to create the directory and all required
2796 # parent directories.
2797 if test -d $2 ; then
2798 :
2799 else
2800 echo >config.temp
2801 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2802 fi
2803
2804 # Copy the directory, assuming we have tar.
2805 # FIXME: Should we use B in the second tar? Not all systems support it.
2806 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2807
2808 # It is the responsibility of the user to correctly adjust all
2809 # symlinks. If somebody can figure out how to handle them correctly
2810 # here, feel free to add the code.
2811
2812 echo $1 > $2/COPIED
2813 fi
2814 shift; shift
2815done
2816
2429c060
PB
2817# Determine a target-dependent exec_prefix that the installed
2818# gcc will search in. Keep this list sorted by triplet, with
2819# the *-*-osname triplets last.
2820md_exec_prefix=
2821case "${target}" in
2822 alpha*-*-*vms*)
2823 md_exec_prefix=/gnu/lib/gcc-lib
2824 ;;
2825 i3456786-pc-msdosdjgpp*)
2826 md_exec_prefix=/dev/env/DJDIR/bin
2827 ;;
2828 i3456786-*-sco3.2v5*)
2829 if test $with_gnu_as = yes; then
2830 md_exec_prefix=/usr/gnu/bin
2831 else
2832 md_exec_prefix=/usr/ccs/bin/elf
2833 fi
2834 ;;
2835
2836 mn10300-*-* | \
2837 powerpc-*-chorusos* | \
2838 powerpc*-*-eabi* | \
2839 powerpc*-*-sysv* | \
2840 powerpc*-*-kaos* | \
2841 s390x-ibm-tpf*)
2842 md_exec_prefix=/usr/ccs/bin
2843 ;;
2844 sparc64-*-elf*)
2845 ;;
2846 v850*-*-*)
2847 md_exec_prefix=/usr/ccs/bin
2848 ;;
2849 xtensa-*-elf*)
2850 ;;
2851
2852 *-*-beos* | \
2853 *-*-elf* | \
2854 *-*-hpux* | \
2855 *-*-netware* | \
2856 *-*-nto-qnx* | \
2857 *-*-rtems* | \
2858 *-*-solaris2* | \
2859 *-*-sysv45* | \
2860 *-*-vxworks* | \
2861 *-wrs-windiss)
2862 md_exec_prefix=/usr/ccs/bin
2863 ;;
2864esac
2865
a0da8069
NN
2866extra_arflags_for_target=
2867extra_nmflags_for_target=
2868extra_ranlibflags_for_target=
2869target_makefile_frag=/dev/null
2870case "${target}" in
2a3124ca 2871 *-*-netware*)
a0da8069
NN
2872 target_makefile_frag="config/mt-netware"
2873 ;;
3d6dfe0f
NN
2874 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2875 target_makefile_frag="config/mt-gnu"
a0da8069
NN
2876 ;;
2877 *-*-aix4.[3456789]* | *-*-aix[56789].*)
cac3d6c4 2878 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
a0da8069
NN
2879 # commands to handle both 32-bit and 64-bit objects. These flags are
2880 # harmless if we're using GNU nm or ar.
2881 extra_arflags_for_target=" -X32_64"
2882 extra_nmflags_for_target=" -B -X32_64"
2883 ;;
2884 *-*-darwin*)
2885 # ranlib from Darwin requires the -c flag to look at common symbols.
2886 extra_ranlibflags_for_target=" -c"
2887 ;;
2888 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2889 target_makefile_frag="config/mt-wince"
2890 ;;
2891esac
2892
2893alphaieee_frag=/dev/null
2894case $target in
2895 alpha*-*-*)
2896 # This just makes sure to use the -mieee option to build target libs.
2897 # This should probably be set individually by each library.
2898 alphaieee_frag="config/mt-alphaieee"
2899 ;;
2900esac
2901
2902# If --enable-target-optspace always use -Os instead of -O2 to build
2903# the target libraries, similarly if it is not specified, use -Os
2904# on selected platforms.
2905ospace_frag=/dev/null
2906case "${enable_target_optspace}:${target}" in
2907 yes:*)
2908 ospace_frag="config/mt-ospace"
2909 ;;
2910 :d30v-*)
2911 ospace_frag="config/mt-d30v"
2912 ;;
2913 :m32r-* | :d10v-* | :fr30-*)
2914 ospace_frag="config/mt-ospace"
2915 ;;
2916 no:* | :*)
2917 ;;
2918 *)
2919 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2920 ;;
2921esac
2922
a0da8069
NN
2923# Default to using --with-stabs for certain targets.
2924if test x${with_stabs} = x ; then
2925 case "${target}" in
e31d1ea3 2926 mips*-*-irix[56]*)
a0da8069
NN
2927 ;;
2928 mips*-*-* | alpha*-*-osf*)
2929 with_stabs=yes;
2930 extra_host_args="${extra_host_args} --with-stabs"
2931 ;;
2932 esac
2933fi
2934
2935# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2936# them automatically.
2937case "${host}" in
cac3d6c4 2938 hppa*64*-*-hpux11*)
a0da8069
NN
2939 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2940 ;;
2941esac
2942
a0da8069
NN
2943# Some systems (e.g., one of the i386-aix systems the gas testers are
2944# using) don't handle "\$" correctly, so don't use it here.
61fa5f72 2945tooldir='${exec_prefix}'/${target_alias}
a0da8069
NN
2946build_tooldir=${tooldir}
2947
a0da8069
NN
2948# Create a .gdbinit file which runs the one in srcdir
2949# and tells GDB to look there for source files.
2950
2951if test -r ${srcdir}/.gdbinit ; then
2952 case ${srcdir} in
2953 .) ;;
2954 *) cat > ./.gdbinit <<EOF
2955# ${NO_EDIT}
2956dir ${srcdir}
2957dir .
2958source ${srcdir}/.gdbinit
2959EOF
2960 ;;
2961 esac
2962fi
2963
a0da8069
NN
2964# Make sure that the compiler is able to generate an executable. If it
2965# can't, we are probably in trouble. We don't care whether we can run the
2966# executable--we might be using a cross compiler--we only care whether it
2967# can be created. At this point the main configure script has set CC.
2968we_are_ok=no
2969echo "int main () { return 0; }" > conftest.c
2970${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2971if test $? = 0 ; then
2972 if test -s conftest || test -s conftest.exe ; then
2973 we_are_ok=yes
2974 fi
cac3d6c4 2975fi
a0da8069
NN
2976case $we_are_ok in
2977 no)
2978 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2979 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2980 rm -f conftest*
2981 exit 1
2982 ;;
2983esac
2984rm -f conftest*
2985
2986# The Solaris /usr/ucb/cc compiler does not appear to work.
2987case "${host}" in
2988 sparc-sun-solaris2*)
2989 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2990 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2991 could_use=
2992 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2993 if test -d /opt/cygnus/bin ; then
2994 if test "$could_use" = "" ; then
2995 could_use="/opt/cygnus/bin"
2996 else
2997 could_use="$could_use or /opt/cygnus/bin"
2998 fi
2999 fi
3000 if test "$could_use" = "" ; then
3001 echo "Warning: compilation may fail because you're using"
3002 echo "/usr/ucb/cc. You should change your PATH or CC "
3003 echo "variable and rerun configure."
3004 else
3005 echo "Warning: compilation may fail because you're using"
3006 echo "/usr/ucb/cc, when you should use the C compiler from"
3007 echo "$could_use. You should change your"
3008 echo "PATH or CC variable and rerun configure."
3009 fi
3010 fi
3011 ;;
3012esac
3013
a0da8069
NN
3014case "${host}" in
3015 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
9a237d9e 3016 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
a0da8069
NN
3017 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
3018esac
3019
3020# Record target_configdirs and the configure arguments for target and
3021# build configuration in Makefile.
3022target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
6a9cf61e 3023build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
a0da8069 3024
a0da8069
NN
3025# Determine whether gdb needs tk/tcl or not.
3026# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
3027# and in that case we want gdb to be built without tk. Ugh!
3028# In fact I believe gdb is the *only* package directly dependent on tk,
3029# so we should be able to put the 'maybe's in unconditionally and
3030# leave out the maybe dependencies when enable_gdbtk is false. I'm not
3031# 100% sure that that's safe though.
c180f501 3032
675c6968 3033gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
a0da8069
NN
3034case "$enable_gdbtk" in
3035 no)
3036 GDB_TK="" ;;
c180f501
AC
3037 yes)
3038 GDB_TK="${gdb_tk}" ;;
a0da8069 3039 *)
c180f501
AC
3040 # Only add the dependency on gdbtk when GDBtk is part of the gdb
3041 # distro. Eventually someone will fix this and move Insight, nee
3042 # gdbtk to a separate directory.
3043 if test -d ${srcdir}/gdb/gdbtk ; then
3044 GDB_TK="${gdb_tk}"
3045 else
3046 GDB_TK=""
3047 fi
3048 ;;
a0da8069 3049esac
907be67c
DJ
3050CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
3051INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
a0da8069 3052
6bd3dfaa 3053# Strip out unwanted targets.
dd12c3a8
NN
3054
3055# While at that, we remove Makefiles if we were started for recursive
3056# configuration, so that the top-level Makefile reconfigures them,
3057# like we used to do when configure itself was recursive.
dd12c3a8 3058
6bd3dfaa
PB
3059# Loop over modules. $extrasub must be used with care, limiting as
3060# much as possible the usage of range addresses. That's because autoconf
3061# splits the sed script to overcome limits in the number of commands,
3062# and relying on carefully-timed sed passes may turn out to be very hard
3063# to maintain later. In this particular case, you just have to be careful
3064# not to nest @if/@endif pairs, because configure will not warn you at all.
dd12c3a8 3065
319cab08
PB
3066# Check whether --enable-bootstrap or --disable-bootstrap was given.
3067if test "${enable_bootstrap+set}" = set; then
3068 enableval="$enable_bootstrap"
cac3d6c4 3069 :
319cab08 3070else
9cb3fa6f 3071 enable_bootstrap=default
cac3d6c4
CM
3072fi
3073
319cab08 3074
9cb3fa6f
PB
3075# Issue errors and warnings for invalid/strange bootstrap combinations.
3076case "$configdirs" in
3077 *gcc*) have_compiler=yes ;;
3078 *) have_compiler=no ;;
3079esac
3080
3081case "$have_compiler:$host:$target:$enable_bootstrap" in
3082 *:*:*:no) ;;
3083
0aed8855 3084 # Default behavior. Enable bootstrap if we have a compiler
9cb3fa6f
PB
3085 # and we are in a native configuration.
3086 yes:$build:$build:default)
0aed8855 3087 enable_bootstrap=yes ;;
9cb3fa6f
PB
3088
3089 *:*:*:default)
3090 enable_bootstrap=no ;;
3091
3092 # We have a compiler and we are in a native configuration, bootstrap is ok
80911fe1 3093 yes:$build:$build:yes)
9cb3fa6f
PB
3094 ;;
3095
3096 # Other configurations, but we have a compiler. Assume the user knows
3097 # what he's doing.
80911fe1 3098 yes:*:*:yes)
cac3d6c4 3099 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
9cb3fa6f
PB
3100 ;;
3101
3102 # No compiler: if they passed --enable-bootstrap explicitly, fail
80911fe1 3103 no:*:*:yes)
cac3d6c4 3104 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
9cb3fa6f
PB
3105
3106 # Fail if wrong command line
3107 *)
cac3d6c4 3108 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
9cb3fa6f
PB
3109 ;;
3110esac
3111
3112# Adjust the toplevel makefile according to whether bootstrap was selected.
319cab08
PB
3113case "$enable_bootstrap" in
3114 yes)
498d4a71 3115 bootstrap_suffix=bootstrap ;;
319cab08 3116 no)
498d4a71 3117 bootstrap_suffix=no-bootstrap ;;
319cab08
PB
3118esac
3119
6a9cf61e 3120for module in ${build_configdirs} ; do
498d4a71
CF
3121 if test -z "${no_recursion}" \
3122 && test -f ${build_subdir}/${module}/Makefile; then
3123 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3124 rm -f ${build_subdir}/${module}/Makefile
3125 fi
3126 extrasub="$extrasub
3127/^@if build-$module\$/d
3128/^@endif build-$module\$/d
3129/^@if build-$module-$bootstrap_suffix\$/d
3130/^@endif build-$module-$bootstrap_suffix\$/d"
3131done
3132for module in ${configdirs} ; do
80911fe1
PB
3133 if test -z "${no_recursion}"; then
3134 for file in stage*-${module}/Makefile ${module}/Makefile; do
3135 if test -f ${file}; then
3136 echo 1>&2 "*** removing ${file} to force reconfigure"
3137 rm -f ${file}
3138 fi
3139 done
498d4a71
CF
3140 fi
3141 extrasub="$extrasub
3142/^@if $module\$/d
3143/^@endif $module\$/d
3144/^@if $module-$bootstrap_suffix\$/d
3145/^@endif $module-$bootstrap_suffix\$/d"
3146done
3147for module in ${target_configdirs} ; do
3148 if test -z "${no_recursion}" \
3149 && test -f ${target_subdir}/${module}/Makefile; then
3150 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3151 rm -f ${target_subdir}/${module}/Makefile
3152 fi
3153 extrasub="$extrasub
3154/^@if target-$module\$/d
3155/^@endif target-$module\$/d
3156/^@if target-$module-$bootstrap_suffix\$/d
3157/^@endif target-$module-$bootstrap_suffix\$/d"
3158done
3159
6bd3dfaa
PB
3160extrasub="$extrasub
3161/^@if /,/^@endif /d"
a0da8069
NN
3162
3163# Create the serialization dependencies. This uses a temporary file.
3164
e6bfb94a
AO
3165# Check whether --enable-serial-configure or --disable-serial-configure was given.
3166if test "${enable_serial_configure+set}" = set; then
3167 enableval="$enable_serial_configure"
cac3d6c4
CM
3168 :
3169fi
e6bfb94a
AO
3170
3171
1047cb91
DD
3172case ${enable_serial_configure} in
3173 yes)
3174 enable_serial_build_configure=yes
3175 enable_serial_host_configure=yes
3176 enable_serial_target_configure=yes
3177 ;;
3178esac
3179
a0da8069
NN
3180# These force 'configure's to be done one at a time, to avoid problems
3181# with contention over a shared config.cache.
3182rm -f serdep.tmp
e6bfb94a 3183echo '# serdep.tmp' > serdep.tmp
a0da8069 3184olditem=
1047cb91 3185test "x${enable_serial_build_configure}" = xyes &&
a0da8069
NN
3186for item in ${build_configdirs} ; do
3187 case ${olditem} in
3188 "") ;;
e6bfb94a 3189 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3190 esac
3191 olditem=${item}
3192done
3193olditem=
1047cb91 3194test "x${enable_serial_host_configure}" = xyes &&
a0da8069
NN
3195for item in ${configdirs} ; do
3196 case ${olditem} in
3197 "") ;;
e6bfb94a 3198 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3199 esac
3200 olditem=${item}
3201done
3202olditem=
1047cb91 3203test "x${enable_serial_target_configure}" = xyes &&
a0da8069
NN
3204for item in ${target_configdirs} ; do
3205 case ${olditem} in
3206 "") ;;
e6bfb94a 3207 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3208 esac
3209 olditem=${item}
3210done
3211serialization_dependencies=serdep.tmp
3212
3213
e6bfb94a
AO
3214# Base args. Strip norecursion, cache-file, srcdir, host, build,
3215# target and nonopt. These are the ones we might not want to pass
f27d4f92
DJ
3216# down to subconfigures. Also strip program-prefix, program-suffix,
3217# and program-transform-name, so that we can pass down a consistent
3218# program-transform-name. If autoconf has put single quotes around
3219# any of these arguments (because they contain shell metacharacters)
3220# then this will fail; in practice this only happens for
3221# --program-transform-name, so be sure to override --program-transform-name
3222# at the end of the argument list.
3223# These will be expanded by make, so quote '$'.
d2cc0e0d 3224cat <<\EOF_SED > conftestsed
54752a6b
NN
3225s/ --no[^ ]*/ /g
3226s/ --c[a-z-]*[= ][^ ]*//g
3227s/ --sr[a-z-]*[= ][^ ]*//g
3228s/ --ho[a-z-]*[= ][^ ]*//g
3229s/ --bu[a-z-]*[= ][^ ]*//g
3230s/ --t[a-z-]*[= ][^ ]*//g
3231s/ --program-[pst][a-z-]*[= ][^ ]*//g
3232s/ -cache-file[= ][^ ]*//g
3233s/ -srcdir[= ][^ ]*//g
3234s/ -host[= ][^ ]*//g
3235s/ -build[= ][^ ]*//g
3236s/ -target[= ][^ ]*//g
3237s/ -program-prefix[= ][^ ]*//g
3238s/ -program-suffix[= ][^ ]*//g
3239s/ -program-transform-name[= ][^ ]*//g
d2cc0e0d
GK
3240s/ [^' -][^ ]* / /
3241s/^ *//;s/ *$//
8ff944f6
DJ
3242s,\$,$$,g
3243EOF_SED
3244sed -f conftestsed <<EOF_SED > conftestsed.out
cac3d6c4 3245 ${ac_configure_args}
d2cc0e0d 3246EOF_SED
8ff944f6
DJ
3247baseargs=`cat conftestsed.out`
3248rm -f conftestsed conftestsed.out
a0da8069 3249
f27d4f92
DJ
3250# Add in --program-transform-name, after --program-prefix and
3251# --program-suffix have been applied to it. Autoconf has already
3252# doubled dollar signs and backslashes in program_transform_name; we want
3253# the backslashes un-doubled, and then the entire thing wrapped in single
cac3d6c4 3254# quotes, because this will be expanded first by make and then by the shell.
f27d4f92
DJ
3255# Also, because we want to override the logic in subdir configure scripts to
3256# choose program_transform_name, replace any s,x,x, with s,y,y,.
3257sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3258${program_transform_name}
3259EOF_SED
3260gcc_transform_name=`cat conftestsed.out`
3261rm -f conftestsed.out
3262baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3263
a0da8069
NN
3264# For the build-side libraries, we just need to pretend we're native,
3265# and not use the same cache file. Multilibs are neither needed nor
3266# desired.
69e57115 3267build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
a0da8069
NN
3268
3269# For host modules, accept cache file option, or specification as blank.
3270case "${cache_file}" in
3271"") # empty
3272 cache_file_option="" ;;
3273/* | [A-Za-z]:[\\/]* ) # absolute path
3274 cache_file_option="--cache-file=${cache_file}" ;;
3275*) # relative path
3276 cache_file_option="--cache-file=../${cache_file}" ;;
3277esac
3278
82252c06
NN
3279# Host dirs don't like to share a cache file either, horribly enough.
3280# This seems to be due to autoconf 2.5x stupidity.
bb5dca17 3281host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
a0da8069
NN
3282
3283target_configargs=${baseargs}
3284
3285# Passing a --with-cross-host argument lets the target libraries know
3286# whether they are being built with a cross-compiler or being built
3287# native. However, it would be better to use other mechanisms to make the
3288# sorts of decisions they want to make on this basis. Please consider
3289# this option to be deprecated. FIXME.
3290if test x${is_cross_compiler} = xyes ; then
3291 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3292fi
3293
3294# Default to --enable-multilib.
3295if test x${enable_multilib} = x ; then
3296 target_configargs="--enable-multilib ${target_configargs}"
3297fi
3298
3299# Pass --with-newlib if appropriate. Note that target_configdirs has
3300# changed from the earlier setting of with_newlib.
3301if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3302 target_configargs="--with-newlib ${target_configargs}"
3303fi
3304
95036d20
NN
3305# Different target subdirs use different values of certain variables
3306# (notably CXX). Worse, multilibs use *lots* of different values.
3307# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3308# it doesn't automatically accept command-line overrides of them.
3309# This means it's not safe for target subdirs to share a cache file,
3310# which is disgusting, but there you have it. Hopefully this can be
3311# fixed in future. It's still worthwhile to use a cache file for each
3312# directory. I think.
3313
ae380b45
MS
3314# Pass the appropriate --build, --host, --target and --cache-file arguments.
3315# We need to pass --target, as newer autoconf's requires consistency
3316# for target_alias and gcc doesn't manage it consistently.
3317target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
a0da8069 3318
a0da8069
NN
3319FLAGS_FOR_TARGET=
3320case " $target_configdirs " in
3321 *" newlib "*)
3322 case " $target_configargs " in
3323 *" --with-newlib "*)
3324 case "$target" in
3325 *-cygwin*)
564b43e5 3326 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
3327 esac
3328
3329 # If we're not building GCC, don't discard standard headers.
3330 if test -d ${srcdir}/gcc; then
3331 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3332
3333 if test "${build}" != "${host}"; then
3334 # On Canadian crosses, CC_FOR_TARGET will have already been set
3335 # by `configure', so we won't have an opportunity to add -Bgcc/
3336 # to it. This is right: we don't want to search that directory
3337 # for binaries, but we want the header files in there, so add
3338 # them explicitly.
b00612cc 3339 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
a0da8069
NN
3340
3341 # Someone might think of using the pre-installed headers on
3342 # Canadian crosses, in case the installed compiler is not fully
3343 # compatible with the compiler being built. In this case, it
3344 # would be better to flag an error than risking having
3345 # incompatible object files being constructed. We can't
3346 # guarantee that an error will be flagged, but let's hope the
3347 # compiler will do it, when presented with incompatible header
3348 # files.
3349 fi
3350 fi
3351
3352 case "${target}-${is_cross_compiler}" in
ec11bdc6 3353 i[3456789]86-*-linux*-no)
a0da8069
NN
3354 # Here host == target, so we don't need to build gcc,
3355 # so we don't want to discard standard headers.
3356 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3357 ;;
3358 *)
3359 # If we're building newlib, use its generic headers last, but search
3360 # for any libc-related directories first (so make it the last -B
3361 # switch).
3362 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3363 ;;
3364 esac
3365 ;;
3366 esac
3367 ;;
3368esac
3369
5fbad20a
DD
3370# Allow the user to override the flags for
3371# our build compiler if desired.
3372CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3373
a0da8069
NN
3374# On Canadian crosses, we'll be searching the right directories for
3375# the previously-installed cross compiler, so don't bother to add
3376# flags for directories within the install tree of the compiler
3377# being built; programs in there won't even run.
3378if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3379 # Search for pre-installed headers if nothing else fits.
bba45b8b 3380 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
3381fi
3382
3383if test "x${use_gnu_ld}" = x &&
3384 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3385 # Arrange for us to find uninstalled linker scripts.
b00612cc 3386 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
a0da8069
NN
3387fi
3388
a481dbb7
DD
3389# Search for other target-specific linker scripts and such.
3390case "${target}" in
3391 m32c-*-* )
3392 if test -d ${srcdir}/libgloss/m32c; then
3393 # This is for crt0.o
3394 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3395 # This is for r8c.ld
3396 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3397 # This is for libnosys.a
3398 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
3399 fi
3400 ;;
3401esac
3402
a0da8069 3403# Makefile fragments.
3e707e94
PB
3404for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3405do
3406 eval fragval=\$$frag
3407 if test $fragval != /dev/null; then
3408 eval $frag=${srcdir}/$fragval
3409 fi
3410done
a0da8069
NN
3411
3412
3413
3414
3415
3416# Miscellanea: directories, flags, etc.
3417
3418
3419
3420
3421
3422
3423
6a9cf61e 3424# Build module lists & subconfigure args.
a0da8069
NN
3425
3426
3427
be01d343
PB
3428# Host module lists & subconfigure args.
3429
3430
3431
3432# Target module lists & subconfigure args.
3433
3434
3435
3436# Build tools.
3437
3438
3439
3440# Generate default definitions for YACC, M4, LEX and other programs that run
3441# on the build machine. These are used if the Makefile can't locate these
3442# programs in objdir.
3443MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
3444
3445for ac_prog in 'bison -y' byacc yacc
3446do
3447# Extract the first word of "$ac_prog", so it can be a program name with args.
3448set dummy $ac_prog; ac_word=$2
3449echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3450echo "configure:3451: checking for $ac_word" >&5
be01d343
PB
3451if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3452 echo $ac_n "(cached) $ac_c" 1>&6
3453else
3454 if test -n "$YACC"; then
3455 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3456else
3457 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3458 ac_dummy="$PATH"
3459 for ac_dir in $ac_dummy; do
3460 test -z "$ac_dir" && ac_dir=.
3461 if test -f $ac_dir/$ac_word; then
3462 ac_cv_prog_YACC="$ac_prog"
3463 break
3464 fi
3465 done
3466 IFS="$ac_save_ifs"
3467fi
3468fi
3469YACC="$ac_cv_prog_YACC"
3470if test -n "$YACC"; then
3471 echo "$ac_t""$YACC" 1>&6
3472else
3473 echo "$ac_t""no" 1>&6
3474fi
3475
3476test -n "$YACC" && break
3477done
3478test -n "$YACC" || YACC="$MISSING bison -y"
3479
3480case " $build_configdirs " in
3481 *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
3482 *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
3483esac
3484
3485for ac_prog in bison
3486do
3487# Extract the first word of "$ac_prog", so it can be a program name with args.
3488set dummy $ac_prog; ac_word=$2
3489echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3490echo "configure:3491: checking for $ac_word" >&5
be01d343
PB
3491if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3492 echo $ac_n "(cached) $ac_c" 1>&6
3493else
3494 if test -n "$BISON"; then
3495 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3496else
3497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3498 ac_dummy="$PATH"
3499 for ac_dir in $ac_dummy; do
3500 test -z "$ac_dir" && ac_dir=.
3501 if test -f $ac_dir/$ac_word; then
3502 ac_cv_prog_BISON="$ac_prog"
3503 break
3504 fi
3505 done
3506 IFS="$ac_save_ifs"
3507fi
3508fi
3509BISON="$ac_cv_prog_BISON"
3510if test -n "$BISON"; then
3511 echo "$ac_t""$BISON" 1>&6
3512else
3513 echo "$ac_t""no" 1>&6
3514fi
3515
3516test -n "$BISON" && break
3517done
3518test -n "$BISON" || BISON="$MISSING bison"
3519
3520case " $build_configdirs " in
3521 *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
3522esac
3523
3524for ac_prog in gm4 gnum4 m4
3525do
3526# Extract the first word of "$ac_prog", so it can be a program name with args.
3527set dummy $ac_prog; ac_word=$2
3528echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3529echo "configure:3530: checking for $ac_word" >&5
be01d343
PB
3530if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3531 echo $ac_n "(cached) $ac_c" 1>&6
3532else
3533 if test -n "$M4"; then
3534 ac_cv_prog_M4="$M4" # Let the user override the test.
3535else
3536 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539 test -z "$ac_dir" && ac_dir=.
3540 if test -f $ac_dir/$ac_word; then
3541 ac_cv_prog_M4="$ac_prog"
3542 break
3543 fi
3544 done
3545 IFS="$ac_save_ifs"
3546fi
3547fi
3548M4="$ac_cv_prog_M4"
3549if test -n "$M4"; then
3550 echo "$ac_t""$M4" 1>&6
3551else
3552 echo "$ac_t""no" 1>&6
3553fi
3554
3555test -n "$M4" && break
3556done
3557test -n "$M4" || M4="$MISSING m4"
3558
3559case " $build_configdirs " in
3560 *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
3561esac
3562
3563for ac_prog in flex lex
3564do
3565# Extract the first word of "$ac_prog", so it can be a program name with args.
3566set dummy $ac_prog; ac_word=$2
3567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3568echo "configure:3569: checking for $ac_word" >&5
be01d343
PB
3569if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3570 echo $ac_n "(cached) $ac_c" 1>&6
3571else
3572 if test -n "$LEX"; then
3573 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3574else
3575 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3576 ac_dummy="$PATH"
3577 for ac_dir in $ac_dummy; do
3578 test -z "$ac_dir" && ac_dir=.
3579 if test -f $ac_dir/$ac_word; then
3580 ac_cv_prog_LEX="$ac_prog"
3581 break
3582 fi
3583 done
3584 IFS="$ac_save_ifs"
3585fi
3586fi
3587LEX="$ac_cv_prog_LEX"
3588if test -n "$LEX"; then
3589 echo "$ac_t""$LEX" 1>&6
3590else
3591 echo "$ac_t""no" 1>&6
3592fi
3593
3594test -n "$LEX" && break
3595done
3596test -n "$LEX" || LEX="$MISSING flex"
3597
3598case " $build_configdirs " in
3599 *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3600 *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
3601esac
3602
3603for ac_prog in flex
3604do
3605# Extract the first word of "$ac_prog", so it can be a program name with args.
3606set dummy $ac_prog; ac_word=$2
3607echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3608echo "configure:3609: checking for $ac_word" >&5
be01d343
PB
3609if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3610 echo $ac_n "(cached) $ac_c" 1>&6
3611else
3612 if test -n "$FLEX"; then
3613 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3614else
3615 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618 test -z "$ac_dir" && ac_dir=.
3619 if test -f $ac_dir/$ac_word; then
3620 ac_cv_prog_FLEX="$ac_prog"
3621 break
3622 fi
3623 done
3624 IFS="$ac_save_ifs"
3625fi
3626fi
3627FLEX="$ac_cv_prog_FLEX"
3628if test -n "$FLEX"; then
3629 echo "$ac_t""$FLEX" 1>&6
3630else
3631 echo "$ac_t""no" 1>&6
3632fi
3633
3634test -n "$FLEX" && break
3635done
3636test -n "$FLEX" || FLEX="$MISSING flex"
3637
3638case " $build_configdirs " in
3639 *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3640esac
3641
3642for ac_prog in makeinfo
3643do
3644# Extract the first word of "$ac_prog", so it can be a program name with args.
3645set dummy $ac_prog; ac_word=$2
3646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3647echo "configure:3648: checking for $ac_word" >&5
be01d343
PB
3648if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3649 echo $ac_n "(cached) $ac_c" 1>&6
3650else
3651 if test -n "$MAKEINFO"; then
3652 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3653else
3654 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 if test -f $ac_dir/$ac_word; then
3659 ac_cv_prog_MAKEINFO="$ac_prog"
3660 break
3661 fi
3662 done
3663 IFS="$ac_save_ifs"
3664fi
3665fi
3666MAKEINFO="$ac_cv_prog_MAKEINFO"
3667if test -n "$MAKEINFO"; then
3668 echo "$ac_t""$MAKEINFO" 1>&6
3669else
3670 echo "$ac_t""no" 1>&6
3671fi
3672
3673test -n "$MAKEINFO" && break
3674done
3675test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3676
3677case " $build_configdirs " in
3678 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3679 *)
3680
a4ef73e9 3681 # For an installed makeinfo, we require it to be from texinfo 4.4 or
be01d343
PB
3682 # higher, else we use the "missing" dummy.
3683 if ${MAKEINFO} --version \
a4ef73e9 3684 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
be01d343
PB
3685 :
3686 else
3687 MAKEINFO="$MISSING makeinfo"
3688 fi
3689 ;;
3690
3691esac
a0da8069 3692
be01d343 3693# FIXME: expect and dejagnu may become build tools?
a0da8069 3694
be01d343
PB
3695for ac_prog in expect
3696do
3697# Extract the first word of "$ac_prog", so it can be a program name with args.
3698set dummy $ac_prog; ac_word=$2
3699echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3700echo "configure:3701: checking for $ac_word" >&5
be01d343
PB
3701if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3702 echo $ac_n "(cached) $ac_c" 1>&6
3703else
3704 if test -n "$EXPECT"; then
3705 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3706else
3707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3708 ac_dummy="$PATH"
3709 for ac_dir in $ac_dummy; do
3710 test -z "$ac_dir" && ac_dir=.
3711 if test -f $ac_dir/$ac_word; then
3712 ac_cv_prog_EXPECT="$ac_prog"
3713 break
3714 fi
3715 done
3716 IFS="$ac_save_ifs"
3717fi
3718fi
3719EXPECT="$ac_cv_prog_EXPECT"
3720if test -n "$EXPECT"; then
3721 echo "$ac_t""$EXPECT" 1>&6
3722else
3723 echo "$ac_t""no" 1>&6
3724fi
a0da8069 3725
be01d343
PB
3726test -n "$EXPECT" && break
3727done
3728test -n "$EXPECT" || EXPECT="expect"
a0da8069 3729
be01d343
PB
3730case " $configdirs " in
3731 *" expect "*)
3732 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3733 ;;
3734esac
a0da8069 3735
be01d343
PB
3736for ac_prog in runtest
3737do
3738# Extract the first word of "$ac_prog", so it can be a program name with args.
3739set dummy $ac_prog; ac_word=$2
3740echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3741echo "configure:3742: checking for $ac_word" >&5
be01d343
PB
3742if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3743 echo $ac_n "(cached) $ac_c" 1>&6
3744else
3745 if test -n "$RUNTEST"; then
3746 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
3747else
3748 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3749 ac_dummy="$PATH"
3750 for ac_dir in $ac_dummy; do
3751 test -z "$ac_dir" && ac_dir=.
3752 if test -f $ac_dir/$ac_word; then
3753 ac_cv_prog_RUNTEST="$ac_prog"
3754 break
3755 fi
3756 done
3757 IFS="$ac_save_ifs"
3758fi
3759fi
3760RUNTEST="$ac_cv_prog_RUNTEST"
3761if test -n "$RUNTEST"; then
3762 echo "$ac_t""$RUNTEST" 1>&6
3763else
3764 echo "$ac_t""no" 1>&6
3765fi
a0da8069 3766
be01d343
PB
3767test -n "$RUNTEST" && break
3768done
3769test -n "$RUNTEST" || RUNTEST="runtest"
a0da8069 3770
be01d343
PB
3771case " $configdirs " in
3772 *" dejagnu "*)
3773 test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
3774 ;;
3775esac
a0da8069
NN
3776
3777
a0da8069 3778# Host tools.
859789af
AC
3779ncn_tool_prefix=
3780test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3781ncn_target_tool_prefix=
3782test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3783
05cbd757
PB
3784 for ncn_progname in ar; do
3785 if test -n "$ncn_tool_prefix"; then
3786 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3787set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3788echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3789echo "configure:3790: checking for $ac_word" >&5
cac3d6c4
CM
3790if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3791 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3792else
3793 if test -n "$AR"; then
3794 ac_cv_prog_AR="$AR" # Let the user override the test.
3795else
cac3d6c4
CM
3796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3797 ac_dummy="$PATH"
3798 for ac_dir in $ac_dummy; do
3799 test -z "$ac_dir" && ac_dir=.
3800 if test -f $ac_dir/$ac_word; then
3801 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
3802 break
3803 fi
3804 done
3805 IFS="$ac_save_ifs"
859789af
AC
3806fi
3807fi
cac3d6c4 3808AR="$ac_cv_prog_AR"
859789af 3809if test -n "$AR"; then
cac3d6c4 3810 echo "$ac_t""$AR" 1>&6
859789af 3811else
cac3d6c4 3812 echo "$ac_t""no" 1>&6
859789af
AC
3813fi
3814
05cbd757
PB
3815 fi
3816 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3817 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3818set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3819echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3820echo "configure:3821: checking for $ac_word" >&5
cac3d6c4
CM
3821if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3822 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3823else
05cbd757
PB
3824 if test -n "$AR"; then
3825 ac_cv_prog_AR="$AR" # Let the user override the test.
859789af 3826else
cac3d6c4
CM
3827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3828 ac_dummy="$PATH"
3829 for ac_dir in $ac_dummy; do
3830 test -z "$ac_dir" && ac_dir=.
3831 if test -f $ac_dir/$ac_word; then
3832 ac_cv_prog_AR="${ncn_progname}"
3833 break
3834 fi
3835 done
3836 IFS="$ac_save_ifs"
859789af
AC
3837fi
3838fi
cac3d6c4 3839AR="$ac_cv_prog_AR"
05cbd757 3840if test -n "$AR"; then
cac3d6c4 3841 echo "$ac_t""$AR" 1>&6
859789af 3842else
cac3d6c4 3843 echo "$ac_t""no" 1>&6
859789af 3844fi
cac3d6c4 3845
05cbd757
PB
3846 fi
3847 test -n "$ac_cv_prog_AR" && break
3848done
3849
3850if test -z "$ac_cv_prog_AR" ; then
3851 set dummy ar
3852 if test $build = $host ; then
3853 AR="$2"
859789af 3854 else
05cbd757 3855 AR="${ncn_tool_prefix}$2"
859789af 3856 fi
859789af
AC
3857fi
3858
05cbd757
PB
3859 for ncn_progname in as; do
3860 if test -n "$ncn_tool_prefix"; then
3861 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3862set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3863echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3864echo "configure:3865: checking for $ac_word" >&5
cac3d6c4
CM
3865if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3866 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3867else
3868 if test -n "$AS"; then
3869 ac_cv_prog_AS="$AS" # Let the user override the test.
3870else
cac3d6c4
CM
3871 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3872 ac_dummy="$PATH"
3873 for ac_dir in $ac_dummy; do
3874 test -z "$ac_dir" && ac_dir=.
3875 if test -f $ac_dir/$ac_word; then
3876 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
3877 break
3878 fi
3879 done
3880 IFS="$ac_save_ifs"
859789af
AC
3881fi
3882fi
cac3d6c4 3883AS="$ac_cv_prog_AS"
859789af 3884if test -n "$AS"; then
cac3d6c4 3885 echo "$ac_t""$AS" 1>&6
859789af 3886else
cac3d6c4 3887 echo "$ac_t""no" 1>&6
859789af
AC
3888fi
3889
05cbd757
PB
3890 fi
3891 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3892 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3893set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3894echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3895echo "configure:3896: checking for $ac_word" >&5
cac3d6c4
CM
3896if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3898else
05cbd757
PB
3899 if test -n "$AS"; then
3900 ac_cv_prog_AS="$AS" # Let the user override the test.
859789af 3901else
cac3d6c4
CM
3902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3903 ac_dummy="$PATH"
3904 for ac_dir in $ac_dummy; do
3905 test -z "$ac_dir" && ac_dir=.
3906 if test -f $ac_dir/$ac_word; then
3907 ac_cv_prog_AS="${ncn_progname}"
3908 break
3909 fi
3910 done
3911 IFS="$ac_save_ifs"
859789af
AC
3912fi
3913fi
cac3d6c4 3914AS="$ac_cv_prog_AS"
05cbd757 3915if test -n "$AS"; then
cac3d6c4 3916 echo "$ac_t""$AS" 1>&6
859789af 3917else
cac3d6c4 3918 echo "$ac_t""no" 1>&6
859789af 3919fi
cac3d6c4 3920
05cbd757
PB
3921 fi
3922 test -n "$ac_cv_prog_AS" && break
3923done
3924
3925if test -z "$ac_cv_prog_AS" ; then
3926 set dummy as
3927 if test $build = $host ; then
3928 AS="$2"
859789af 3929 else
05cbd757 3930 AS="${ncn_tool_prefix}$2"
859789af 3931 fi
859789af
AC
3932fi
3933
05cbd757
PB
3934 for ncn_progname in dlltool; do
3935 if test -n "$ncn_tool_prefix"; then
3936 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3937set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 3938echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3939echo "configure:3940: checking for $ac_word" >&5
cac3d6c4
CM
3940if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3941 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
3942else
3943 if test -n "$DLLTOOL"; then
3944 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3945else
cac3d6c4
CM
3946 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3947 ac_dummy="$PATH"
3948 for ac_dir in $ac_dummy; do
3949 test -z "$ac_dir" && ac_dir=.
3950 if test -f $ac_dir/$ac_word; then
3951 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
3952 break
3953 fi
3954 done
3955 IFS="$ac_save_ifs"
859789af
AC
3956fi
3957fi
cac3d6c4 3958DLLTOOL="$ac_cv_prog_DLLTOOL"
859789af 3959if test -n "$DLLTOOL"; then
cac3d6c4 3960 echo "$ac_t""$DLLTOOL" 1>&6
859789af 3961else
cac3d6c4 3962 echo "$ac_t""no" 1>&6
859789af
AC
3963fi
3964
05cbd757
PB
3965 fi
3966 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3967 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3968set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 3969echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 3970echo "configure:3971: checking for $ac_word" >&5
cac3d6c4
CM
3971if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3972 echo $ac_n "(cached) $ac_c" 1>&6
859789af 3973else
05cbd757
PB
3974 if test -n "$DLLTOOL"; then
3975 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
859789af 3976else
cac3d6c4
CM
3977 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3978 ac_dummy="$PATH"
3979 for ac_dir in $ac_dummy; do
3980 test -z "$ac_dir" && ac_dir=.
3981 if test -f $ac_dir/$ac_word; then
3982 ac_cv_prog_DLLTOOL="${ncn_progname}"
3983 break
3984 fi
3985 done
3986 IFS="$ac_save_ifs"
859789af
AC
3987fi
3988fi
cac3d6c4 3989DLLTOOL="$ac_cv_prog_DLLTOOL"
05cbd757 3990if test -n "$DLLTOOL"; then
cac3d6c4 3991 echo "$ac_t""$DLLTOOL" 1>&6
859789af 3992else
cac3d6c4 3993 echo "$ac_t""no" 1>&6
859789af 3994fi
cac3d6c4 3995
05cbd757
PB
3996 fi
3997 test -n "$ac_cv_prog_DLLTOOL" && break
3998done
3999
4000if test -z "$ac_cv_prog_DLLTOOL" ; then
4001 set dummy dlltool
4002 if test $build = $host ; then
4003 DLLTOOL="$2"
859789af 4004 else
05cbd757 4005 DLLTOOL="${ncn_tool_prefix}$2"
859789af 4006 fi
859789af
AC
4007fi
4008
05cbd757
PB
4009 for ncn_progname in ld; do
4010 if test -n "$ncn_tool_prefix"; then
4011 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4012set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4013echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4014echo "configure:4015: checking for $ac_word" >&5
cac3d6c4
CM
4015if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4016 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4017else
4018 if test -n "$LD"; then
4019 ac_cv_prog_LD="$LD" # Let the user override the test.
4020else
cac3d6c4
CM
4021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4022 ac_dummy="$PATH"
4023 for ac_dir in $ac_dummy; do
4024 test -z "$ac_dir" && ac_dir=.
4025 if test -f $ac_dir/$ac_word; then
4026 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
4027 break
4028 fi
4029 done
4030 IFS="$ac_save_ifs"
859789af
AC
4031fi
4032fi
cac3d6c4 4033LD="$ac_cv_prog_LD"
859789af 4034if test -n "$LD"; then
cac3d6c4 4035 echo "$ac_t""$LD" 1>&6
859789af 4036else
cac3d6c4 4037 echo "$ac_t""no" 1>&6
859789af
AC
4038fi
4039
05cbd757
PB
4040 fi
4041 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
4042 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4043set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4044echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4045echo "configure:4046: checking for $ac_word" >&5
cac3d6c4
CM
4046if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4047 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4048else
05cbd757
PB
4049 if test -n "$LD"; then
4050 ac_cv_prog_LD="$LD" # Let the user override the test.
376a0e54 4051else
cac3d6c4
CM
4052 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055 test -z "$ac_dir" && ac_dir=.
4056 if test -f $ac_dir/$ac_word; then
4057 ac_cv_prog_LD="${ncn_progname}"
4058 break
4059 fi
4060 done
4061 IFS="$ac_save_ifs"
859789af
AC
4062fi
4063fi
cac3d6c4 4064LD="$ac_cv_prog_LD"
05cbd757 4065if test -n "$LD"; then
cac3d6c4 4066 echo "$ac_t""$LD" 1>&6
859789af 4067else
cac3d6c4 4068 echo "$ac_t""no" 1>&6
859789af 4069fi
cac3d6c4 4070
05cbd757
PB
4071 fi
4072 test -n "$ac_cv_prog_LD" && break
4073done
4074
4075if test -z "$ac_cv_prog_LD" ; then
4076 set dummy ld
4077 if test $build = $host ; then
4078 LD="$2"
859789af 4079 else
05cbd757 4080 LD="${ncn_tool_prefix}$2"
859789af 4081 fi
859789af
AC
4082fi
4083
be01d343
PB
4084 for ncn_progname in lipo; do
4085 if test -n "$ncn_tool_prefix"; then
4086 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4087set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4089echo "configure:4090: checking for $ac_word" >&5
be01d343
PB
4090if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4091 echo $ac_n "(cached) $ac_c" 1>&6
4092else
4093 if test -n "$LIPO"; then
4094 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4095else
4096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4097 ac_dummy="$PATH"
4098 for ac_dir in $ac_dummy; do
4099 test -z "$ac_dir" && ac_dir=.
4100 if test -f $ac_dir/$ac_word; then
4101 ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
4102 break
4103 fi
4104 done
4105 IFS="$ac_save_ifs"
4106fi
4107fi
4108LIPO="$ac_cv_prog_LIPO"
4109if test -n "$LIPO"; then
4110 echo "$ac_t""$LIPO" 1>&6
4111else
4112 echo "$ac_t""no" 1>&6
4113fi
4114
4115 fi
4116 if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
4117 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4118set dummy ${ncn_progname}; ac_word=$2
4119echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4120echo "configure:4121: checking for $ac_word" >&5
be01d343
PB
4121if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4122 echo $ac_n "(cached) $ac_c" 1>&6
4123else
4124 if test -n "$LIPO"; then
4125 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4126else
4127 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4128 ac_dummy="$PATH"
4129 for ac_dir in $ac_dummy; do
4130 test -z "$ac_dir" && ac_dir=.
4131 if test -f $ac_dir/$ac_word; then
4132 ac_cv_prog_LIPO="${ncn_progname}"
4133 break
4134 fi
4135 done
4136 IFS="$ac_save_ifs"
4137fi
4138fi
4139LIPO="$ac_cv_prog_LIPO"
4140if test -n "$LIPO"; then
4141 echo "$ac_t""$LIPO" 1>&6
4142else
4143 echo "$ac_t""no" 1>&6
4144fi
4145
4146 fi
4147 test -n "$ac_cv_prog_LIPO" && break
4148done
4149
4150if test -z "$ac_cv_prog_LIPO" ; then
4151 set dummy lipo
4152 if test $build = $host ; then
4153 LIPO="$2"
4154 else
4155 LIPO="${ncn_tool_prefix}$2"
4156 fi
4157fi
4158
05cbd757
PB
4159 for ncn_progname in nm; do
4160 if test -n "$ncn_tool_prefix"; then
4161 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4162set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4163echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4164echo "configure:4165: checking for $ac_word" >&5
cac3d6c4
CM
4165if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4166 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4167else
4168 if test -n "$NM"; then
4169 ac_cv_prog_NM="$NM" # Let the user override the test.
4170else
cac3d6c4
CM
4171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4172 ac_dummy="$PATH"
4173 for ac_dir in $ac_dummy; do
4174 test -z "$ac_dir" && ac_dir=.
4175 if test -f $ac_dir/$ac_word; then
4176 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
4177 break
4178 fi
4179 done
4180 IFS="$ac_save_ifs"
859789af
AC
4181fi
4182fi
cac3d6c4 4183NM="$ac_cv_prog_NM"
859789af 4184if test -n "$NM"; then
cac3d6c4 4185 echo "$ac_t""$NM" 1>&6
859789af 4186else
cac3d6c4 4187 echo "$ac_t""no" 1>&6
859789af
AC
4188fi
4189
05cbd757
PB
4190 fi
4191 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
4192 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4193set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4194echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4195echo "configure:4196: checking for $ac_word" >&5
cac3d6c4
CM
4196if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4197 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4198else
05cbd757
PB
4199 if test -n "$NM"; then
4200 ac_cv_prog_NM="$NM" # Let the user override the test.
859789af 4201else
cac3d6c4
CM
4202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4203 ac_dummy="$PATH"
4204 for ac_dir in $ac_dummy; do
4205 test -z "$ac_dir" && ac_dir=.
4206 if test -f $ac_dir/$ac_word; then
4207 ac_cv_prog_NM="${ncn_progname}"
4208 break
4209 fi
4210 done
4211 IFS="$ac_save_ifs"
859789af
AC
4212fi
4213fi
cac3d6c4 4214NM="$ac_cv_prog_NM"
05cbd757 4215if test -n "$NM"; then
cac3d6c4 4216 echo "$ac_t""$NM" 1>&6
859789af 4217else
cac3d6c4 4218 echo "$ac_t""no" 1>&6
859789af 4219fi
cac3d6c4 4220
05cbd757
PB
4221 fi
4222 test -n "$ac_cv_prog_NM" && break
4223done
4224
4225if test -z "$ac_cv_prog_NM" ; then
4226 set dummy nm
4227 if test $build = $host ; then
4228 NM="$2"
859789af 4229 else
05cbd757 4230 NM="${ncn_tool_prefix}$2"
859789af 4231 fi
859789af
AC
4232fi
4233
05cbd757
PB
4234 for ncn_progname in ranlib; do
4235 if test -n "$ncn_tool_prefix"; then
4236 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4237set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4238echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4239echo "configure:4240: checking for $ac_word" >&5
cac3d6c4
CM
4240if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4241 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4242else
4243 if test -n "$RANLIB"; then
4244 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4245else
cac3d6c4
CM
4246 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4247 ac_dummy="$PATH"
4248 for ac_dir in $ac_dummy; do
4249 test -z "$ac_dir" && ac_dir=.
4250 if test -f $ac_dir/$ac_word; then
4251 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
4252 break
4253 fi
4254 done
4255 IFS="$ac_save_ifs"
859789af
AC
4256fi
4257fi
cac3d6c4 4258RANLIB="$ac_cv_prog_RANLIB"
859789af 4259if test -n "$RANLIB"; then
cac3d6c4 4260 echo "$ac_t""$RANLIB" 1>&6
859789af 4261else
cac3d6c4 4262 echo "$ac_t""no" 1>&6
859789af
AC
4263fi
4264
05cbd757
PB
4265 fi
4266 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
4267 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4268set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4269echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4270echo "configure:4271: checking for $ac_word" >&5
cac3d6c4
CM
4271if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4272 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4273else
05cbd757
PB
4274 if test -n "$RANLIB"; then
4275 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
859789af 4276else
cac3d6c4
CM
4277 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280 test -z "$ac_dir" && ac_dir=.
4281 if test -f $ac_dir/$ac_word; then
4282 ac_cv_prog_RANLIB="${ncn_progname}"
4283 break
4284 fi
4285 done
4286 IFS="$ac_save_ifs"
859789af
AC
4287fi
4288fi
cac3d6c4 4289RANLIB="$ac_cv_prog_RANLIB"
05cbd757 4290if test -n "$RANLIB"; then
cac3d6c4 4291 echo "$ac_t""$RANLIB" 1>&6
859789af 4292else
cac3d6c4 4293 echo "$ac_t""no" 1>&6
859789af 4294fi
cac3d6c4 4295
859789af 4296 fi
05cbd757
PB
4297 test -n "$ac_cv_prog_RANLIB" && break
4298done
4299
4300if test -z "$ac_cv_prog_RANLIB" ; then
4301 RANLIB=":"
859789af
AC
4302fi
4303
be01d343
PB
4304 for ncn_progname in strip; do
4305 if test -n "$ncn_tool_prefix"; then
4306 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4307set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4308echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4309echo "configure:4310: checking for $ac_word" >&5
be01d343
PB
4310if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4311 echo $ac_n "(cached) $ac_c" 1>&6
4312else
4313 if test -n "$STRIP"; then
4314 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4315else
4316 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4317 ac_dummy="$PATH"
4318 for ac_dir in $ac_dummy; do
4319 test -z "$ac_dir" && ac_dir=.
4320 if test -f $ac_dir/$ac_word; then
4321 ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
4322 break
4323 fi
4324 done
4325 IFS="$ac_save_ifs"
4326fi
4327fi
4328STRIP="$ac_cv_prog_STRIP"
4329if test -n "$STRIP"; then
4330 echo "$ac_t""$STRIP" 1>&6
4331else
4332 echo "$ac_t""no" 1>&6
4333fi
4334
4335 fi
4336 if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
4337 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4338set dummy ${ncn_progname}; ac_word=$2
4339echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4340echo "configure:4341: checking for $ac_word" >&5
be01d343
PB
4341if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344 if test -n "$STRIP"; then
4345 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4346else
4347 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4348 ac_dummy="$PATH"
4349 for ac_dir in $ac_dummy; do
4350 test -z "$ac_dir" && ac_dir=.
4351 if test -f $ac_dir/$ac_word; then
4352 ac_cv_prog_STRIP="${ncn_progname}"
4353 break
4354 fi
4355 done
4356 IFS="$ac_save_ifs"
4357fi
4358fi
4359STRIP="$ac_cv_prog_STRIP"
4360if test -n "$STRIP"; then
4361 echo "$ac_t""$STRIP" 1>&6
4362else
4363 echo "$ac_t""no" 1>&6
4364fi
4365
4366 fi
4367 test -n "$ac_cv_prog_STRIP" && break
4368done
4369
4370if test -z "$ac_cv_prog_STRIP" ; then
4371 STRIP=":"
4372fi
4373
05cbd757
PB
4374 for ncn_progname in windres; do
4375 if test -n "$ncn_tool_prefix"; then
4376 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4377set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4378echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4379echo "configure:4380: checking for $ac_word" >&5
cac3d6c4
CM
4380if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4381 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4382else
4383 if test -n "$WINDRES"; then
4384 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4385else
cac3d6c4
CM
4386 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389 test -z "$ac_dir" && ac_dir=.
4390 if test -f $ac_dir/$ac_word; then
4391 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
4392 break
4393 fi
4394 done
4395 IFS="$ac_save_ifs"
859789af
AC
4396fi
4397fi
cac3d6c4 4398WINDRES="$ac_cv_prog_WINDRES"
859789af 4399if test -n "$WINDRES"; then
cac3d6c4 4400 echo "$ac_t""$WINDRES" 1>&6
859789af 4401else
cac3d6c4 4402 echo "$ac_t""no" 1>&6
859789af
AC
4403fi
4404
05cbd757
PB
4405 fi
4406 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
4407 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4408set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4409echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4410echo "configure:4411: checking for $ac_word" >&5
cac3d6c4
CM
4411if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4412 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4413else
05cbd757
PB
4414 if test -n "$WINDRES"; then
4415 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
859789af 4416else
cac3d6c4
CM
4417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4418 ac_dummy="$PATH"
4419 for ac_dir in $ac_dummy; do
4420 test -z "$ac_dir" && ac_dir=.
4421 if test -f $ac_dir/$ac_word; then
4422 ac_cv_prog_WINDRES="${ncn_progname}"
4423 break
4424 fi
4425 done
4426 IFS="$ac_save_ifs"
859789af
AC
4427fi
4428fi
cac3d6c4 4429WINDRES="$ac_cv_prog_WINDRES"
05cbd757 4430if test -n "$WINDRES"; then
cac3d6c4 4431 echo "$ac_t""$WINDRES" 1>&6
859789af 4432else
cac3d6c4 4433 echo "$ac_t""no" 1>&6
859789af 4434fi
cac3d6c4 4435
05cbd757
PB
4436 fi
4437 test -n "$ac_cv_prog_WINDRES" && break
4438done
4439
4440if test -z "$ac_cv_prog_WINDRES" ; then
4441 set dummy windres
4442 if test $build = $host ; then
4443 WINDRES="$2"
859789af 4444 else
05cbd757 4445 WINDRES="${ncn_tool_prefix}$2"
859789af 4446 fi
859789af
AC
4447fi
4448
05cbd757
PB
4449 for ncn_progname in objcopy; do
4450 if test -n "$ncn_tool_prefix"; then
4451 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4452set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4453echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4454echo "configure:4455: checking for $ac_word" >&5
cac3d6c4
CM
4455if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4456 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4457else
4458 if test -n "$OBJCOPY"; then
4459 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4460else
cac3d6c4
CM
4461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4462 ac_dummy="$PATH"
4463 for ac_dir in $ac_dummy; do
4464 test -z "$ac_dir" && ac_dir=.
4465 if test -f $ac_dir/$ac_word; then
4466 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
4467 break
4468 fi
4469 done
4470 IFS="$ac_save_ifs"
859789af
AC
4471fi
4472fi
cac3d6c4 4473OBJCOPY="$ac_cv_prog_OBJCOPY"
859789af 4474if test -n "$OBJCOPY"; then
cac3d6c4 4475 echo "$ac_t""$OBJCOPY" 1>&6
859789af 4476else
cac3d6c4 4477 echo "$ac_t""no" 1>&6
859789af
AC
4478fi
4479
05cbd757
PB
4480 fi
4481 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4482 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4483set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4484echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4485echo "configure:4486: checking for $ac_word" >&5
cac3d6c4
CM
4486if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4487 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4488else
05cbd757
PB
4489 if test -n "$OBJCOPY"; then
4490 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
859789af 4491else
cac3d6c4
CM
4492 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4493 ac_dummy="$PATH"
4494 for ac_dir in $ac_dummy; do
4495 test -z "$ac_dir" && ac_dir=.
4496 if test -f $ac_dir/$ac_word; then
4497 ac_cv_prog_OBJCOPY="${ncn_progname}"
4498 break
4499 fi
4500 done
4501 IFS="$ac_save_ifs"
859789af
AC
4502fi
4503fi
cac3d6c4 4504OBJCOPY="$ac_cv_prog_OBJCOPY"
05cbd757 4505if test -n "$OBJCOPY"; then
cac3d6c4 4506 echo "$ac_t""$OBJCOPY" 1>&6
859789af 4507else
cac3d6c4 4508 echo "$ac_t""no" 1>&6
859789af 4509fi
cac3d6c4 4510
05cbd757
PB
4511 fi
4512 test -n "$ac_cv_prog_OBJCOPY" && break
4513done
4514
4515if test -z "$ac_cv_prog_OBJCOPY" ; then
4516 set dummy objcopy
4517 if test $build = $host ; then
4518 OBJCOPY="$2"
859789af 4519 else
05cbd757 4520 OBJCOPY="${ncn_tool_prefix}$2"
859789af 4521 fi
859789af
AC
4522fi
4523
05cbd757
PB
4524 for ncn_progname in objdump; do
4525 if test -n "$ncn_tool_prefix"; then
4526 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4527set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4528echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4529echo "configure:4530: checking for $ac_word" >&5
cac3d6c4
CM
4530if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
859789af
AC
4532else
4533 if test -n "$OBJDUMP"; then
4534 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4535else
cac3d6c4
CM
4536 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539 test -z "$ac_dir" && ac_dir=.
4540 if test -f $ac_dir/$ac_word; then
4541 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
4542 break
4543 fi
4544 done
4545 IFS="$ac_save_ifs"
859789af
AC
4546fi
4547fi
cac3d6c4 4548OBJDUMP="$ac_cv_prog_OBJDUMP"
859789af 4549if test -n "$OBJDUMP"; then
cac3d6c4 4550 echo "$ac_t""$OBJDUMP" 1>&6
859789af 4551else
cac3d6c4 4552 echo "$ac_t""no" 1>&6
859789af
AC
4553fi
4554
05cbd757
PB
4555 fi
4556 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4557 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4558set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4559echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4560echo "configure:4561: checking for $ac_word" >&5
cac3d6c4
CM
4561if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4562 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4563else
05cbd757
PB
4564 if test -n "$OBJDUMP"; then
4565 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
859789af 4566else
cac3d6c4
CM
4567 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4568 ac_dummy="$PATH"
4569 for ac_dir in $ac_dummy; do
4570 test -z "$ac_dir" && ac_dir=.
4571 if test -f $ac_dir/$ac_word; then
4572 ac_cv_prog_OBJDUMP="${ncn_progname}"
4573 break
4574 fi
4575 done
4576 IFS="$ac_save_ifs"
859789af
AC
4577fi
4578fi
cac3d6c4 4579OBJDUMP="$ac_cv_prog_OBJDUMP"
05cbd757 4580if test -n "$OBJDUMP"; then
cac3d6c4 4581 echo "$ac_t""$OBJDUMP" 1>&6
859789af 4582else
cac3d6c4 4583 echo "$ac_t""no" 1>&6
859789af 4584fi
cac3d6c4 4585
05cbd757
PB
4586 fi
4587 test -n "$ac_cv_prog_OBJDUMP" && break
4588done
4589
4590if test -z "$ac_cv_prog_OBJDUMP" ; then
4591 set dummy objdump
4592 if test $build = $host ; then
4593 OBJDUMP="$2"
859789af 4594 else
05cbd757 4595 OBJDUMP="${ncn_tool_prefix}$2"
859789af 4596 fi
859789af
AC
4597fi
4598
a0da8069
NN
4599
4600
4601
4602
4603
4604
be01d343 4605# Target tools.
2429c060
PB
4606# Check whether --with-build-time-tools or --without-build-time-tools was given.
4607if test "${with_build_time_tools+set}" = set; then
4608 withval="$with_build_time_tools"
4609 case x"$withval" in
4610 x/*) ;;
4611 *)
4612 with_build_time_tools=
4613 echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
4614 ;;
4615 esac
859789af 4616else
2429c060 4617 with_build_time_tools=
859789af
AC
4618fi
4619
859789af 4620
2429c060
PB
4621 if test -n "$with_build_time_tools"; then
4622 for ncn_progname in cc gcc; do
4623 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 4624echo "configure:4625: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4625 if test -x $with_build_time_tools/${ncn_progname}; then
4626 ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060 4627 echo "$ac_t""yes" 1>&6
cac3d6c4 4628 break
2429c060
PB
4629 else
4630 echo "$ac_t""no" 1>&6
cac3d6c4
CM
4631 fi
4632 done
55db4b87
PB
4633fi
4634
2429c060
PB
4635if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
4636 for ncn_progname in cc gcc; do
4637 if test -n "$ncn_target_tool_prefix"; then
4638 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4639set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4641echo "configure:4642: checking for $ac_word" >&5
cac3d6c4
CM
4642if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4643 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4644else
4645 if test -n "$CC_FOR_TARGET"; then
4646 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4647else
cac3d6c4
CM
4648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4649 ac_dummy="$PATH"
4650 for ac_dir in $ac_dummy; do
4651 test -z "$ac_dir" && ac_dir=.
4652 if test -f $ac_dir/$ac_word; then
4653 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4654 break
4655 fi
4656 done
4657 IFS="$ac_save_ifs"
55db4b87
PB
4658fi
4659fi
cac3d6c4 4660CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
55db4b87 4661if test -n "$CC_FOR_TARGET"; then
cac3d6c4 4662 echo "$ac_t""$CC_FOR_TARGET" 1>&6
55db4b87 4663else
cac3d6c4 4664 echo "$ac_t""no" 1>&6
55db4b87
PB
4665fi
4666
2429c060
PB
4667 fi
4668 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4669 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4670set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4671echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4672echo "configure:4673: checking for $ac_word" >&5
cac3d6c4
CM
4673if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4674 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4675else
05cbd757
PB
4676 if test -n "$CC_FOR_TARGET"; then
4677 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
55db4b87 4678else
cac3d6c4
CM
4679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4680 ac_dummy="$PATH"
4681 for ac_dir in $ac_dummy; do
4682 test -z "$ac_dir" && ac_dir=.
4683 if test -f $ac_dir/$ac_word; then
4684 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
4685 break
4686 fi
4687 done
4688 IFS="$ac_save_ifs"
55db4b87
PB
4689fi
4690fi
cac3d6c4 4691CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
05cbd757 4692if test -n "$CC_FOR_TARGET"; then
cac3d6c4 4693 echo "$ac_t""$CC_FOR_TARGET" 1>&6
55db4b87 4694else
cac3d6c4 4695 echo "$ac_t""no" 1>&6
55db4b87 4696fi
cac3d6c4 4697
2429c060
PB
4698 fi
4699 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4700 done
4701fi
4702
05cbd757
PB
4703if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4704 set dummy cc gcc
4705 if test $build = $target ; then
4706 CC_FOR_TARGET="$2"
55db4b87 4707 else
05cbd757 4708 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4709 fi
55db4b87
PB
4710fi
4711
2429c060
PB
4712 if test -n "$with_build_time_tools"; then
4713 for ncn_progname in c++ g++ cxx gxx; do
4714 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 4715echo "configure:4716: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4716 if test -x $with_build_time_tools/${ncn_progname}; then
4717 ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4718 echo "$ac_t""yes" 1>&6
4719 break
4720 else
4721 echo "$ac_t""no" 1>&6
4722 fi
4723 done
4724fi
4725
4726if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
4727 for ncn_progname in c++ g++ cxx gxx; do
4728 if test -n "$ncn_target_tool_prefix"; then
4729 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4730set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4731echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4732echo "configure:4733: checking for $ac_word" >&5
cac3d6c4
CM
4733if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4734 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4735else
4736 if test -n "$CXX_FOR_TARGET"; then
4737 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4738else
cac3d6c4
CM
4739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4740 ac_dummy="$PATH"
4741 for ac_dir in $ac_dummy; do
4742 test -z "$ac_dir" && ac_dir=.
4743 if test -f $ac_dir/$ac_word; then
4744 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4745 break
4746 fi
4747 done
4748 IFS="$ac_save_ifs"
55db4b87
PB
4749fi
4750fi
cac3d6c4 4751CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
55db4b87 4752if test -n "$CXX_FOR_TARGET"; then
cac3d6c4 4753 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
55db4b87 4754else
cac3d6c4 4755 echo "$ac_t""no" 1>&6
55db4b87
PB
4756fi
4757
2429c060
PB
4758 fi
4759 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4760 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4761set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4763echo "configure:4764: checking for $ac_word" >&5
cac3d6c4
CM
4764if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4766else
05cbd757
PB
4767 if test -n "$CXX_FOR_TARGET"; then
4768 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
55db4b87 4769else
cac3d6c4
CM
4770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4771 ac_dummy="$PATH"
4772 for ac_dir in $ac_dummy; do
4773 test -z "$ac_dir" && ac_dir=.
4774 if test -f $ac_dir/$ac_word; then
4775 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
4776 break
4777 fi
4778 done
4779 IFS="$ac_save_ifs"
55db4b87
PB
4780fi
4781fi
cac3d6c4 4782CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
05cbd757 4783if test -n "$CXX_FOR_TARGET"; then
cac3d6c4 4784 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
55db4b87 4785else
cac3d6c4 4786 echo "$ac_t""no" 1>&6
55db4b87 4787fi
cac3d6c4 4788
2429c060
PB
4789 fi
4790 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4791 done
4792fi
4793
05cbd757
PB
4794if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4795 set dummy c++ g++ cxx gxx
4796 if test $build = $target ; then
4797 CXX_FOR_TARGET="$2"
55db4b87 4798 else
05cbd757 4799 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4800 fi
859789af
AC
4801fi
4802
2429c060
PB
4803 if test -n "$with_build_time_tools"; then
4804 for ncn_progname in gcc; do
4805 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 4806echo "configure:4807: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4807 if test -x $with_build_time_tools/${ncn_progname}; then
4808 ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4809 echo "$ac_t""yes" 1>&6
4810 break
4811 else
4812 echo "$ac_t""no" 1>&6
4813 fi
4814 done
4815fi
4816
4817if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
4818 for ncn_progname in gcc; do
4819 if test -n "$ncn_target_tool_prefix"; then
4820 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4821set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4823echo "configure:4824: checking for $ac_word" >&5
2429c060 4824if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 4825 echo $ac_n "(cached) $ac_c" 1>&6
859789af 4826else
2429c060
PB
4827 if test -n "$GCC_FOR_TARGET"; then
4828 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
55db4b87 4829else
cac3d6c4
CM
4830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4831 ac_dummy="$PATH"
4832 for ac_dir in $ac_dummy; do
4833 test -z "$ac_dir" && ac_dir=.
4834 if test -f $ac_dir/$ac_word; then
4835 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4836 break
4837 fi
4838 done
4839 IFS="$ac_save_ifs"
55db4b87
PB
4840fi
4841fi
cac3d6c4 4842GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
55db4b87 4843if test -n "$GCC_FOR_TARGET"; then
cac3d6c4 4844 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
55db4b87 4845else
cac3d6c4 4846 echo "$ac_t""no" 1>&6
55db4b87
PB
4847fi
4848
2429c060
PB
4849 fi
4850 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4851 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4852set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4853echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4854echo "configure:4855: checking for $ac_word" >&5
cac3d6c4
CM
4855if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4857else
05cbd757
PB
4858 if test -n "$GCC_FOR_TARGET"; then
4859 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
55db4b87 4860else
cac3d6c4
CM
4861 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864 test -z "$ac_dir" && ac_dir=.
4865 if test -f $ac_dir/$ac_word; then
4866 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
4867 break
4868 fi
4869 done
4870 IFS="$ac_save_ifs"
55db4b87
PB
4871fi
4872fi
cac3d6c4 4873GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
05cbd757 4874if test -n "$GCC_FOR_TARGET"; then
cac3d6c4 4875 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
55db4b87 4876else
cac3d6c4 4877 echo "$ac_t""no" 1>&6
55db4b87 4878fi
cac3d6c4 4879
2429c060
PB
4880 fi
4881 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4882 done
4883fi
4884
05cbd757
PB
4885if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4886 GCC_FOR_TARGET="${CC_FOR_TARGET}"
55db4b87
PB
4887fi
4888
2429c060
PB
4889 if test -n "$with_build_time_tools"; then
4890 for ncn_progname in gcj; do
4891 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 4892echo "configure:4893: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4893 if test -x $with_build_time_tools/${ncn_progname}; then
4894 ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4895 echo "$ac_t""yes" 1>&6
4896 break
4897 else
4898 echo "$ac_t""no" 1>&6
4899 fi
4900 done
4901fi
4902
4903if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
4904 for ncn_progname in gcj; do
4905 if test -n "$ncn_target_tool_prefix"; then
4906 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4907set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4908echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4909echo "configure:4910: checking for $ac_word" >&5
cac3d6c4
CM
4910if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4911 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
4912else
4913 if test -n "$GCJ_FOR_TARGET"; then
4914 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4915else
cac3d6c4
CM
4916 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4917 ac_dummy="$PATH"
4918 for ac_dir in $ac_dummy; do
4919 test -z "$ac_dir" && ac_dir=.
4920 if test -f $ac_dir/$ac_word; then
4921 ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4922 break
4923 fi
4924 done
4925 IFS="$ac_save_ifs"
55db4b87
PB
4926fi
4927fi
cac3d6c4 4928GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
55db4b87 4929if test -n "$GCJ_FOR_TARGET"; then
cac3d6c4 4930 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
55db4b87 4931else
cac3d6c4 4932 echo "$ac_t""no" 1>&6
55db4b87
PB
4933fi
4934
2429c060
PB
4935 fi
4936 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4937 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 4938set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 4939echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 4940echo "configure:4941: checking for $ac_word" >&5
cac3d6c4
CM
4941if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4942 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 4943else
05cbd757
PB
4944 if test -n "$GCJ_FOR_TARGET"; then
4945 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
55db4b87 4946else
cac3d6c4
CM
4947 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4948 ac_dummy="$PATH"
4949 for ac_dir in $ac_dummy; do
4950 test -z "$ac_dir" && ac_dir=.
4951 if test -f $ac_dir/$ac_word; then
4952 ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
4953 break
4954 fi
4955 done
4956 IFS="$ac_save_ifs"
55db4b87
PB
4957fi
4958fi
cac3d6c4 4959GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
05cbd757 4960if test -n "$GCJ_FOR_TARGET"; then
cac3d6c4 4961 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
55db4b87 4962else
cac3d6c4 4963 echo "$ac_t""no" 1>&6
55db4b87 4964fi
cac3d6c4 4965
2429c060
PB
4966 fi
4967 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4968 done
4969fi
4970
05cbd757
PB
4971if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4972 set dummy gcj
4973 if test $build = $target ; then
4974 GCJ_FOR_TARGET="$2"
55db4b87 4975 else
05cbd757 4976 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4977 fi
55db4b87
PB
4978fi
4979
2429c060
PB
4980 if test -n "$with_build_time_tools"; then
4981 for ncn_progname in gfortran; do
4982 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 4983echo "configure:4984: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
4984 if test -x $with_build_time_tools/${ncn_progname}; then
4985 ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
4986 echo "$ac_t""yes" 1>&6
4987 break
4988 else
4989 echo "$ac_t""no" 1>&6
4990 fi
4991 done
4992fi
4993
4994if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
4995 for ncn_progname in gfortran; do
4996 if test -n "$ncn_target_tool_prefix"; then
4997 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 4998set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 4999echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5000echo "configure:5001: checking for $ac_word" >&5
cac3d6c4
CM
5001if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5002 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87
PB
5003else
5004 if test -n "$GFORTRAN_FOR_TARGET"; then
5005 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5006else
cac3d6c4
CM
5007 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5008 ac_dummy="$PATH"
5009 for ac_dir in $ac_dummy; do
5010 test -z "$ac_dir" && ac_dir=.
5011 if test -f $ac_dir/$ac_word; then
5012 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5013 break
5014 fi
5015 done
5016 IFS="$ac_save_ifs"
55db4b87
PB
5017fi
5018fi
cac3d6c4 5019GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
55db4b87 5020if test -n "$GFORTRAN_FOR_TARGET"; then
cac3d6c4 5021 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
55db4b87 5022else
cac3d6c4 5023 echo "$ac_t""no" 1>&6
55db4b87
PB
5024fi
5025
2429c060
PB
5026 fi
5027 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
5028 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 5029set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 5030echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5031echo "configure:5032: checking for $ac_word" >&5
cac3d6c4
CM
5032if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
55db4b87 5034else
05cbd757
PB
5035 if test -n "$GFORTRAN_FOR_TARGET"; then
5036 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
55db4b87 5037else
cac3d6c4
CM
5038 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5039 ac_dummy="$PATH"
5040 for ac_dir in $ac_dummy; do
5041 test -z "$ac_dir" && ac_dir=.
5042 if test -f $ac_dir/$ac_word; then
5043 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5044 break
5045 fi
5046 done
5047 IFS="$ac_save_ifs"
55db4b87
PB
5048fi
5049fi
cac3d6c4 5050GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
05cbd757 5051if test -n "$GFORTRAN_FOR_TARGET"; then
cac3d6c4 5052 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
55db4b87 5053else
cac3d6c4 5054 echo "$ac_t""no" 1>&6
55db4b87 5055fi
cac3d6c4 5056
2429c060
PB
5057 fi
5058 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5059 done
5060fi
5061
05cbd757
PB
5062if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5063 set dummy gfortran
5064 if test $build = $target ; then
5065 GFORTRAN_FOR_TARGET="$2"
55db4b87 5066 else
05cbd757 5067 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 5068 fi
859789af
AC
5069fi
5070
2429c060
PB
5071
5072
5073# The user is always right.
5074if test "${PATH_SEPARATOR+set}" != set; then
5075 echo "#! /bin/sh" >conf$$.sh
5076 echo "exit 0" >>conf$$.sh
5077 chmod +x conf$$.sh
5078 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5079 PATH_SEPARATOR=';'
5080 else
5081 PATH_SEPARATOR=:
5082 fi
5083 rm -f conf$$.sh
5084fi
5085
5086
5087
5088if test "x$exec_prefix" = xNONE; then
5089 if test "x$prefix" = xNONE; then
5090 gcc_cv_tool_prefix=$ac_default_prefix
5091 else
5092 gcc_cv_tool_prefix=$prefix
5093 fi
859789af 5094else
2429c060
PB
5095 gcc_cv_tool_prefix=$exec_prefix
5096fi
5097
5098# If there is no compiler in the tree, use the PATH only. In any
5099# case, if there is no compiler in the tree nobody should use
5100# AS_FOR_TARGET and LD_FOR_TARGET.
5101if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
5102 gcc_version=`cat $srcdir/gcc/BASE-VER`
5103 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5104 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
5105 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5106 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
5107 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5108 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
859789af 5109else
2429c060 5110 gcc_cv_tool_dirs=
859789af 5111fi
2429c060
PB
5112
5113if test x$build = x$target && test -n "$md_exec_prefix"; then
5114 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
859789af 5115fi
2429c060
PB
5116
5117
5118
5119cat > conftest.c << \EOF
5120#ifdef __GNUC__
5121 gcc_yay;
5122#endif
5123EOF
5124if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
5125 have_gcc_for_target=yes
859789af 5126else
2429c060
PB
5127 GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
5128 have_gcc_for_target=no
859789af 5129fi
2429c060
PB
5130rm conftest.c
5131
5132
5133
859789af 5134
2429c060
PB
5135if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5136 if test -n "$with_build_time_tools"; then
3a35eeb3 5137 echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5138echo "configure:5139: checking for ar in $with_build_time_tools" >&5
3a35eeb3
PB
5139 if test -x $with_build_time_tools/ar; then
5140 AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
5141 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5142 echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
5143 else
5144 echo "$ac_t""no" 1>&6
5145 fi
2429c060
PB
5146 elif test $build != $host && test $have_gcc_for_target = yes; then
5147 AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
5148 test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
5149 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
05cbd757 5150 fi
2429c060
PB
5151fi
5152if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5153 # Extract the first word of "ar", so it can be a program name with args.
5154set dummy ar; ac_word=$2
cac3d6c4 5155echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5156echo "configure:5157: checking for $ac_word" >&5
2429c060 5157if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5158 echo $ac_n "(cached) $ac_c" 1>&6
859789af 5159else
2429c060
PB
5160 case "$AR_FOR_TARGET" in
5161 /*)
5162 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
5163 ;;
5164 ?:/*)
5165 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
5166 ;;
5167 *)
cac3d6c4 5168 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2429c060
PB
5169 ac_dummy="$gcc_cv_tool_dirs"
5170 for ac_dir in $ac_dummy; do
cac3d6c4
CM
5171 test -z "$ac_dir" && ac_dir=.
5172 if test -f $ac_dir/$ac_word; then
2429c060 5173 ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
cac3d6c4
CM
5174 break
5175 fi
5176 done
5177 IFS="$ac_save_ifs"
2429c060
PB
5178 ;;
5179esac
859789af 5180fi
2429c060
PB
5181AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
5182if test -n "$AR_FOR_TARGET"; then
5183 echo "$ac_t""$AR_FOR_TARGET" 1>&6
859789af 5184else
cac3d6c4 5185 echo "$ac_t""no" 1>&6
859789af 5186fi
05cbd757 5187
2429c060
PB
5188fi
5189if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5190 if test -n "$with_build_time_tools"; then
5191 for ncn_progname in ar; do
5192 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5193echo "configure:5194: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5194 if test -x $with_build_time_tools/${ncn_progname}; then
5195 ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5196 echo "$ac_t""yes" 1>&6
5197 break
5198 else
5199 echo "$ac_t""no" 1>&6
5200 fi
5201 done
859789af
AC
5202fi
5203
2429c060
PB
5204if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
5205 for ncn_progname in ar; do
5206 if test -n "$ncn_target_tool_prefix"; then
5207 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 5208set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 5209echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5210echo "configure:5211: checking for $ac_word" >&5
2429c060 5211if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5212 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140 5213else
2429c060
PB
5214 if test -n "$AR_FOR_TARGET"; then
5215 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
7e0f7140 5216else
cac3d6c4
CM
5217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5218 ac_dummy="$PATH"
5219 for ac_dir in $ac_dummy; do
5220 test -z "$ac_dir" && ac_dir=.
5221 if test -f $ac_dir/$ac_word; then
2429c060 5222 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
cac3d6c4
CM
5223 break
5224 fi
5225 done
5226 IFS="$ac_save_ifs"
7e0f7140
GK
5227fi
5228fi
2429c060
PB
5229AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5230if test -n "$AR_FOR_TARGET"; then
5231 echo "$ac_t""$AR_FOR_TARGET" 1>&6
7e0f7140 5232else
cac3d6c4 5233 echo "$ac_t""no" 1>&6
7e0f7140
GK
5234fi
5235
2429c060
PB
5236 fi
5237 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
5238 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
7e0f7140 5239set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 5240echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5241echo "configure:5242: checking for $ac_word" >&5
2429c060 5242if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
cac3d6c4 5243 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140 5244else
2429c060
PB
5245 if test -n "$AR_FOR_TARGET"; then
5246 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
cac3d6c4
CM
5247else
5248 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5249 ac_dummy="$PATH"
5250 for ac_dir in $ac_dummy; do
5251 test -z "$ac_dir" && ac_dir=.
5252 if test -f $ac_dir/$ac_word; then
2429c060 5253 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
cac3d6c4
CM
5254 break
5255 fi
5256 done
5257 IFS="$ac_save_ifs"
7e0f7140
GK
5258fi
5259fi
2429c060
PB
5260AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5261if test -n "$AR_FOR_TARGET"; then
5262 echo "$ac_t""$AR_FOR_TARGET" 1>&6
7e0f7140 5263else
cac3d6c4 5264 echo "$ac_t""no" 1>&6
7e0f7140 5265fi
cac3d6c4 5266
2429c060
PB
5267 fi
5268 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
5269 done
5270fi
5271
5272if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
5273 set dummy ar
7e0f7140 5274 if test $build = $target ; then
2429c060 5275 AR_FOR_TARGET="$2"
7e0f7140 5276 else
2429c060 5277 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
7e0f7140
GK
5278 fi
5279fi
5280
3a35eeb3
PB
5281else
5282 AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
2429c060
PB
5283fi
5284
5285
5286
5287
5288if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5289 if test -n "$with_build_time_tools"; then
3a35eeb3 5290 echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5291echo "configure:5292: checking for as in $with_build_time_tools" >&5
3a35eeb3
PB
5292 if test -x $with_build_time_tools/as; then
5293 AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
5294 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5295 echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
5296 else
5297 echo "$ac_t""no" 1>&6
5298 fi
2429c060
PB
5299 elif test $build != $host && test $have_gcc_for_target = yes; then
5300 AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
5301 test $AS_FOR_TARGET=as && AS_FOR_TARGET=
5302 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5303 fi
5304fi
5305if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5306 # Extract the first word of "as", so it can be a program name with args.
5307set dummy as; ac_word=$2
5308echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5309echo "configure:5310: checking for $ac_word" >&5
2429c060
PB
5310if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
5311 echo $ac_n "(cached) $ac_c" 1>&6
5312else
5313 case "$AS_FOR_TARGET" in
5314 /*)
5315 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
5316 ;;
5317 ?:/*)
5318 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
5319 ;;
5320 *)
5321 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5322 ac_dummy="$gcc_cv_tool_dirs"
5323 for ac_dir in $ac_dummy; do
5324 test -z "$ac_dir" && ac_dir=.
5325 if test -f $ac_dir/$ac_word; then
5326 ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
5327 break
5328 fi
5329 done
5330 IFS="$ac_save_ifs"
5331 ;;
5332esac
5333fi
5334AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
5335if test -n "$AS_FOR_TARGET"; then
5336 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5337else
5338 echo "$ac_t""no" 1>&6
5339fi
5340
5341fi
5342if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5343 if test -n "$with_build_time_tools"; then
5344 for ncn_progname in as; do
5345 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5346echo "configure:5347: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5347 if test -x $with_build_time_tools/${ncn_progname}; then
5348 ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5349 echo "$ac_t""yes" 1>&6
5350 break
5351 else
5352 echo "$ac_t""no" 1>&6
5353 fi
5354 done
5355fi
5356
5357if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
5358 for ncn_progname in as; do
5359 if test -n "$ncn_target_tool_prefix"; then
5360 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5361set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5362echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5363echo "configure:5364: checking for $ac_word" >&5
2429c060
PB
5364if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5365 echo $ac_n "(cached) $ac_c" 1>&6
5366else
5367 if test -n "$AS_FOR_TARGET"; then
5368 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5369else
5370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5371 ac_dummy="$PATH"
5372 for ac_dir in $ac_dummy; do
5373 test -z "$ac_dir" && ac_dir=.
5374 if test -f $ac_dir/$ac_word; then
5375 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5376 break
5377 fi
5378 done
5379 IFS="$ac_save_ifs"
5380fi
5381fi
5382AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5383if test -n "$AS_FOR_TARGET"; then
5384 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5385else
5386 echo "$ac_t""no" 1>&6
5387fi
5388
5389 fi
5390 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
5391 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5392set dummy ${ncn_progname}; ac_word=$2
5393echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5394echo "configure:5395: checking for $ac_word" >&5
2429c060
PB
5395if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5396 echo $ac_n "(cached) $ac_c" 1>&6
5397else
5398 if test -n "$AS_FOR_TARGET"; then
5399 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5400else
5401 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5402 ac_dummy="$PATH"
5403 for ac_dir in $ac_dummy; do
5404 test -z "$ac_dir" && ac_dir=.
5405 if test -f $ac_dir/$ac_word; then
5406 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
5407 break
5408 fi
5409 done
5410 IFS="$ac_save_ifs"
5411fi
5412fi
5413AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5414if test -n "$AS_FOR_TARGET"; then
5415 echo "$ac_t""$AS_FOR_TARGET" 1>&6
5416else
5417 echo "$ac_t""no" 1>&6
5418fi
5419
5420 fi
5421 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
5422 done
5423fi
5424
5425if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
5426 set dummy as
5427 if test $build = $target ; then
5428 AS_FOR_TARGET="$2"
5429 else
5430 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
5431 fi
5432fi
5433
3a35eeb3
PB
5434else
5435 AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
2429c060
PB
5436fi
5437
5438
5439
5440
5441if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5442 if test -n "$with_build_time_tools"; then
3a35eeb3 5443 echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5444echo "configure:5445: checking for dlltool in $with_build_time_tools" >&5
3a35eeb3
PB
5445 if test -x $with_build_time_tools/dlltool; then
5446 DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
5447 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5448 echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
5449 else
5450 echo "$ac_t""no" 1>&6
5451 fi
2429c060
PB
5452 elif test $build != $host && test $have_gcc_for_target = yes; then
5453 DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
5454 test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
5455 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5456 fi
5457fi
5458if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5459 # Extract the first word of "dlltool", so it can be a program name with args.
5460set dummy dlltool; ac_word=$2
5461echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5462echo "configure:5463: checking for $ac_word" >&5
2429c060
PB
5463if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5464 echo $ac_n "(cached) $ac_c" 1>&6
5465else
5466 case "$DLLTOOL_FOR_TARGET" in
5467 /*)
5468 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
5469 ;;
5470 ?:/*)
5471 ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
5472 ;;
5473 *)
5474 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5475 ac_dummy="$gcc_cv_tool_dirs"
5476 for ac_dir in $ac_dummy; do
5477 test -z "$ac_dir" && ac_dir=.
5478 if test -f $ac_dir/$ac_word; then
5479 ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word"
5480 break
5481 fi
5482 done
5483 IFS="$ac_save_ifs"
5484 ;;
5485esac
5486fi
5487DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
5488if test -n "$DLLTOOL_FOR_TARGET"; then
5489 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5490else
5491 echo "$ac_t""no" 1>&6
5492fi
5493
5494fi
5495if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5496 if test -n "$with_build_time_tools"; then
5497 for ncn_progname in dlltool; do
5498 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5499echo "configure:5500: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5500 if test -x $with_build_time_tools/${ncn_progname}; then
5501 ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5502 echo "$ac_t""yes" 1>&6
5503 break
5504 else
5505 echo "$ac_t""no" 1>&6
5506 fi
5507 done
5508fi
5509
5510if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
5511 for ncn_progname in dlltool; do
5512 if test -n "$ncn_target_tool_prefix"; then
5513 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5514set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5515echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5516echo "configure:5517: checking for $ac_word" >&5
2429c060
PB
5517if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5518 echo $ac_n "(cached) $ac_c" 1>&6
5519else
5520 if test -n "$DLLTOOL_FOR_TARGET"; then
5521 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5522else
5523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5524 ac_dummy="$PATH"
5525 for ac_dir in $ac_dummy; do
5526 test -z "$ac_dir" && ac_dir=.
5527 if test -f $ac_dir/$ac_word; then
5528 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5529 break
5530 fi
5531 done
5532 IFS="$ac_save_ifs"
5533fi
5534fi
5535DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5536if test -n "$DLLTOOL_FOR_TARGET"; then
5537 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5538else
5539 echo "$ac_t""no" 1>&6
5540fi
5541
5542 fi
5543 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
5544 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5545set dummy ${ncn_progname}; ac_word=$2
5546echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5547echo "configure:5548: checking for $ac_word" >&5
2429c060
PB
5548if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5549 echo $ac_n "(cached) $ac_c" 1>&6
5550else
5551 if test -n "$DLLTOOL_FOR_TARGET"; then
5552 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5553else
5554 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5555 ac_dummy="$PATH"
5556 for ac_dir in $ac_dummy; do
5557 test -z "$ac_dir" && ac_dir=.
5558 if test -f $ac_dir/$ac_word; then
5559 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
5560 break
5561 fi
5562 done
5563 IFS="$ac_save_ifs"
5564fi
5565fi
5566DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5567if test -n "$DLLTOOL_FOR_TARGET"; then
5568 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5569else
5570 echo "$ac_t""no" 1>&6
5571fi
5572
5573 fi
5574 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
5575 done
5576fi
5577
5578if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
5579 set dummy dlltool
5580 if test $build = $target ; then
5581 DLLTOOL_FOR_TARGET="$2"
5582 else
5583 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
5584 fi
5585fi
5586
3a35eeb3
PB
5587else
5588 DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
2429c060
PB
5589fi
5590
5591
5592
5593
5594if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5595 if test -n "$with_build_time_tools"; then
3a35eeb3 5596 echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5597echo "configure:5598: checking for ld in $with_build_time_tools" >&5
3a35eeb3
PB
5598 if test -x $with_build_time_tools/ld; then
5599 LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
5600 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5601 echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
5602 else
5603 echo "$ac_t""no" 1>&6
5604 fi
2429c060
PB
5605 elif test $build != $host && test $have_gcc_for_target = yes; then
5606 LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
5607 test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
5608 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5609 fi
5610fi
5611if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5612 # Extract the first word of "ld", so it can be a program name with args.
5613set dummy ld; ac_word=$2
5614echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5615echo "configure:5616: checking for $ac_word" >&5
2429c060
PB
5616if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
5617 echo $ac_n "(cached) $ac_c" 1>&6
5618else
5619 case "$LD_FOR_TARGET" in
5620 /*)
5621 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
5622 ;;
5623 ?:/*)
5624 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
5625 ;;
5626 *)
5627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5628 ac_dummy="$gcc_cv_tool_dirs"
5629 for ac_dir in $ac_dummy; do
5630 test -z "$ac_dir" && ac_dir=.
5631 if test -f $ac_dir/$ac_word; then
5632 ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
5633 break
5634 fi
5635 done
5636 IFS="$ac_save_ifs"
5637 ;;
5638esac
5639fi
5640LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
5641if test -n "$LD_FOR_TARGET"; then
5642 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5643else
5644 echo "$ac_t""no" 1>&6
5645fi
5646
5647fi
5648if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5649 if test -n "$with_build_time_tools"; then
5650 for ncn_progname in ld; do
5651 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5652echo "configure:5653: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5653 if test -x $with_build_time_tools/${ncn_progname}; then
5654 ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5655 echo "$ac_t""yes" 1>&6
5656 break
5657 else
5658 echo "$ac_t""no" 1>&6
5659 fi
5660 done
5661fi
5662
5663if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
5664 for ncn_progname in ld; do
5665 if test -n "$ncn_target_tool_prefix"; then
5666 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5667set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5668echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5669echo "configure:5670: checking for $ac_word" >&5
2429c060
PB
5670if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5671 echo $ac_n "(cached) $ac_c" 1>&6
5672else
5673 if test -n "$LD_FOR_TARGET"; then
5674 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5675else
5676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5677 ac_dummy="$PATH"
5678 for ac_dir in $ac_dummy; do
5679 test -z "$ac_dir" && ac_dir=.
5680 if test -f $ac_dir/$ac_word; then
5681 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5682 break
5683 fi
5684 done
5685 IFS="$ac_save_ifs"
5686fi
5687fi
5688LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5689if test -n "$LD_FOR_TARGET"; then
5690 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5691else
5692 echo "$ac_t""no" 1>&6
5693fi
5694
5695 fi
5696 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
5697 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5698set dummy ${ncn_progname}; ac_word=$2
5699echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5700echo "configure:5701: checking for $ac_word" >&5
2429c060
PB
5701if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5702 echo $ac_n "(cached) $ac_c" 1>&6
5703else
5704 if test -n "$LD_FOR_TARGET"; then
5705 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5706else
5707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5708 ac_dummy="$PATH"
5709 for ac_dir in $ac_dummy; do
5710 test -z "$ac_dir" && ac_dir=.
5711 if test -f $ac_dir/$ac_word; then
5712 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5713 break
5714 fi
5715 done
5716 IFS="$ac_save_ifs"
5717fi
5718fi
5719LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5720if test -n "$LD_FOR_TARGET"; then
5721 echo "$ac_t""$LD_FOR_TARGET" 1>&6
5722else
5723 echo "$ac_t""no" 1>&6
5724fi
5725
5726 fi
5727 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5728 done
5729fi
5730
5731if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
5732 set dummy ld
5733 if test $build = $target ; then
5734 LD_FOR_TARGET="$2"
5735 else
5736 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
5737 fi
5738fi
5739
3a35eeb3
PB
5740else
5741 LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
2429c060
PB
5742fi
5743
5744
5745
5746
5747if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5748 if test -n "$with_build_time_tools"; then
3a35eeb3 5749 echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5750echo "configure:5751: checking for lipo in $with_build_time_tools" >&5
3a35eeb3
PB
5751 if test -x $with_build_time_tools/lipo; then
5752 LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
5753 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5754 echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
5755 else
5756 echo "$ac_t""no" 1>&6
5757 fi
2429c060
PB
5758 elif test $build != $host && test $have_gcc_for_target = yes; then
5759 LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
5760 test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
5761 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5762 fi
5763fi
5764if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5765 # Extract the first word of "lipo", so it can be a program name with args.
5766set dummy lipo; ac_word=$2
5767echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5768echo "configure:5769: checking for $ac_word" >&5
2429c060
PB
5769if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
5770 echo $ac_n "(cached) $ac_c" 1>&6
5771else
5772 case "$LIPO_FOR_TARGET" in
5773 /*)
5774 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
5775 ;;
5776 ?:/*)
5777 ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
5778 ;;
5779 *)
5780 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5781 ac_dummy="$gcc_cv_tool_dirs"
5782 for ac_dir in $ac_dummy; do
5783 test -z "$ac_dir" && ac_dir=.
5784 if test -f $ac_dir/$ac_word; then
5785 ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word"
5786 break
5787 fi
5788 done
5789 IFS="$ac_save_ifs"
5790 ;;
5791esac
5792fi
5793LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
5794if test -n "$LIPO_FOR_TARGET"; then
5795 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5796else
5797 echo "$ac_t""no" 1>&6
5798fi
5799
5800fi
5801if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5802 if test -n "$with_build_time_tools"; then
5803 for ncn_progname in lipo; do
5804 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5805echo "configure:5806: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5806 if test -x $with_build_time_tools/${ncn_progname}; then
5807 ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5808 echo "$ac_t""yes" 1>&6
5809 break
5810 else
5811 echo "$ac_t""no" 1>&6
5812 fi
5813 done
5814fi
5815
5816if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
5817 for ncn_progname in lipo; do
5818 if test -n "$ncn_target_tool_prefix"; then
5819 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5820set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5821echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5822echo "configure:5823: checking for $ac_word" >&5
2429c060
PB
5823if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5824 echo $ac_n "(cached) $ac_c" 1>&6
5825else
5826 if test -n "$LIPO_FOR_TARGET"; then
5827 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5828else
5829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5830 ac_dummy="$PATH"
5831 for ac_dir in $ac_dummy; do
5832 test -z "$ac_dir" && ac_dir=.
5833 if test -f $ac_dir/$ac_word; then
5834 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5835 break
5836 fi
5837 done
5838 IFS="$ac_save_ifs"
5839fi
5840fi
5841LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5842if test -n "$LIPO_FOR_TARGET"; then
5843 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5844else
5845 echo "$ac_t""no" 1>&6
5846fi
5847
5848 fi
5849 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
5850 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5851set dummy ${ncn_progname}; ac_word=$2
5852echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5853echo "configure:5854: checking for $ac_word" >&5
2429c060
PB
5854if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5855 echo $ac_n "(cached) $ac_c" 1>&6
5856else
5857 if test -n "$LIPO_FOR_TARGET"; then
5858 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5859else
5860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5861 ac_dummy="$PATH"
5862 for ac_dir in $ac_dummy; do
5863 test -z "$ac_dir" && ac_dir=.
5864 if test -f $ac_dir/$ac_word; then
5865 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5866 break
5867 fi
5868 done
5869 IFS="$ac_save_ifs"
5870fi
5871fi
5872LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5873if test -n "$LIPO_FOR_TARGET"; then
5874 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5875else
5876 echo "$ac_t""no" 1>&6
5877fi
5878
5879 fi
5880 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5881 done
5882fi
5883
5884if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
5885 set dummy lipo
5886 if test $build = $target ; then
5887 LIPO_FOR_TARGET="$2"
5888 else
5889 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
5890 fi
5891fi
5892
3a35eeb3
PB
5893else
5894 LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
2429c060
PB
5895fi
5896
5897
5898
5899
5900if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5901 if test -n "$with_build_time_tools"; then
3a35eeb3 5902 echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5903echo "configure:5904: checking for nm in $with_build_time_tools" >&5
3a35eeb3
PB
5904 if test -x $with_build_time_tools/nm; then
5905 NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
5906 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5907 echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
5908 else
5909 echo "$ac_t""no" 1>&6
5910 fi
2429c060
PB
5911 elif test $build != $host && test $have_gcc_for_target = yes; then
5912 NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
5913 test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
5914 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5915 fi
5916fi
5917if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5918 # Extract the first word of "nm", so it can be a program name with args.
5919set dummy nm; ac_word=$2
5920echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5921echo "configure:5922: checking for $ac_word" >&5
2429c060
PB
5922if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
5923 echo $ac_n "(cached) $ac_c" 1>&6
5924else
5925 case "$NM_FOR_TARGET" in
5926 /*)
5927 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
5928 ;;
5929 ?:/*)
5930 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
5931 ;;
5932 *)
5933 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5934 ac_dummy="$gcc_cv_tool_dirs"
5935 for ac_dir in $ac_dummy; do
5936 test -z "$ac_dir" && ac_dir=.
5937 if test -f $ac_dir/$ac_word; then
5938 ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
5939 break
5940 fi
5941 done
5942 IFS="$ac_save_ifs"
5943 ;;
5944esac
5945fi
5946NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
5947if test -n "$NM_FOR_TARGET"; then
5948 echo "$ac_t""$NM_FOR_TARGET" 1>&6
5949else
5950 echo "$ac_t""no" 1>&6
5951fi
5952
5953fi
5954if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5955 if test -n "$with_build_time_tools"; then
5956 for ncn_progname in nm; do
5957 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 5958echo "configure:5959: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
5959 if test -x $with_build_time_tools/${ncn_progname}; then
5960 ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
5961 echo "$ac_t""yes" 1>&6
5962 break
5963 else
5964 echo "$ac_t""no" 1>&6
5965 fi
5966 done
5967fi
5968
5969if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
5970 for ncn_progname in nm; do
5971 if test -n "$ncn_target_tool_prefix"; then
5972 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
7e0f7140 5973set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 5974echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 5975echo "configure:5976: checking for $ac_word" >&5
cac3d6c4
CM
5976if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5977 echo $ac_n "(cached) $ac_c" 1>&6
859789af 5978else
55db4b87
PB
5979 if test -n "$NM_FOR_TARGET"; then
5980 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af 5981else
cac3d6c4
CM
5982 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5983 ac_dummy="$PATH"
5984 for ac_dir in $ac_dummy; do
5985 test -z "$ac_dir" && ac_dir=.
5986 if test -f $ac_dir/$ac_word; then
5987 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5988 break
5989 fi
5990 done
5991 IFS="$ac_save_ifs"
859789af
AC
5992fi
5993fi
cac3d6c4 5994NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
55db4b87 5995if test -n "$NM_FOR_TARGET"; then
cac3d6c4 5996 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af 5997else
cac3d6c4 5998 echo "$ac_t""no" 1>&6
859789af
AC
5999fi
6000
2429c060
PB
6001 fi
6002 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
6003 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6004set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6005echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6006echo "configure:6007: checking for $ac_word" >&5
cac3d6c4
CM
6007if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
6008 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6009else
05cbd757
PB
6010 if test -n "$NM_FOR_TARGET"; then
6011 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af 6012else
cac3d6c4
CM
6013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6014 ac_dummy="$PATH"
6015 for ac_dir in $ac_dummy; do
6016 test -z "$ac_dir" && ac_dir=.
6017 if test -f $ac_dir/$ac_word; then
6018 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
6019 break
6020 fi
6021 done
6022 IFS="$ac_save_ifs"
859789af
AC
6023fi
6024fi
cac3d6c4 6025NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
05cbd757 6026if test -n "$NM_FOR_TARGET"; then
cac3d6c4 6027 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af 6028else
cac3d6c4 6029 echo "$ac_t""no" 1>&6
859789af 6030fi
cac3d6c4 6031
2429c060
PB
6032 fi
6033 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
6034 done
6035fi
6036
05cbd757
PB
6037if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
6038 set dummy nm
6039 if test $build = $target ; then
6040 NM_FOR_TARGET="$2"
859789af 6041 else
05cbd757 6042 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6043 fi
859789af
AC
6044fi
6045
3a35eeb3
PB
6046else
6047 NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
2429c060
PB
6048fi
6049
6050
6051
6052
6053if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6054 if test -n "$with_build_time_tools"; then
3a35eeb3 6055 echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6056echo "configure:6057: checking for objdump in $with_build_time_tools" >&5
3a35eeb3
PB
6057 if test -x $with_build_time_tools/objdump; then
6058 OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
6059 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6060 echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
6061 else
6062 echo "$ac_t""no" 1>&6
6063 fi
2429c060
PB
6064 elif test $build != $host && test $have_gcc_for_target = yes; then
6065 OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
6066 test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
6067 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6068 fi
6069fi
6070if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6071 # Extract the first word of "objdump", so it can be a program name with args.
6072set dummy objdump; ac_word=$2
6073echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6074echo "configure:6075: checking for $ac_word" >&5
2429c060
PB
6075if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6076 echo $ac_n "(cached) $ac_c" 1>&6
6077else
6078 case "$OBJDUMP_FOR_TARGET" in
6079 /*)
6080 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
6081 ;;
6082 ?:/*)
6083 ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
6084 ;;
6085 *)
6086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6087 ac_dummy="$gcc_cv_tool_dirs"
6088 for ac_dir in $ac_dummy; do
6089 test -z "$ac_dir" && ac_dir=.
6090 if test -f $ac_dir/$ac_word; then
6091 ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word"
6092 break
6093 fi
6094 done
6095 IFS="$ac_save_ifs"
6096 ;;
6097esac
6098fi
6099OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
6100if test -n "$OBJDUMP_FOR_TARGET"; then
6101 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6102else
6103 echo "$ac_t""no" 1>&6
6104fi
6105
6106fi
6107if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6108 if test -n "$with_build_time_tools"; then
6109 for ncn_progname in objdump; do
6110 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6111echo "configure:6112: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6112 if test -x $with_build_time_tools/${ncn_progname}; then
6113 ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6114 echo "$ac_t""yes" 1>&6
6115 break
6116 else
6117 echo "$ac_t""no" 1>&6
6118 fi
6119 done
6120fi
6121
6122if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
6123 for ncn_progname in objdump; do
6124 if test -n "$ncn_target_tool_prefix"; then
6125 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 6126set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6127echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6128echo "configure:6129: checking for $ac_word" >&5
5ae72758
DJ
6129if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6130 echo $ac_n "(cached) $ac_c" 1>&6
6131else
6132 if test -n "$OBJDUMP_FOR_TARGET"; then
6133 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6134else
6135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6136 ac_dummy="$PATH"
6137 for ac_dir in $ac_dummy; do
6138 test -z "$ac_dir" && ac_dir=.
6139 if test -f $ac_dir/$ac_word; then
6140 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6141 break
6142 fi
6143 done
6144 IFS="$ac_save_ifs"
6145fi
6146fi
6147OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6148if test -n "$OBJDUMP_FOR_TARGET"; then
6149 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6150else
6151 echo "$ac_t""no" 1>&6
6152fi
6153
2429c060
PB
6154 fi
6155 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
6156 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5ae72758
DJ
6157set dummy ${ncn_progname}; ac_word=$2
6158echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6159echo "configure:6160: checking for $ac_word" >&5
5ae72758
DJ
6160if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6161 echo $ac_n "(cached) $ac_c" 1>&6
6162else
6163 if test -n "$OBJDUMP_FOR_TARGET"; then
6164 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6165else
6166 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6167 ac_dummy="$PATH"
6168 for ac_dir in $ac_dummy; do
6169 test -z "$ac_dir" && ac_dir=.
6170 if test -f $ac_dir/$ac_word; then
6171 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
6172 break
6173 fi
6174 done
6175 IFS="$ac_save_ifs"
6176fi
6177fi
6178OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6179if test -n "$OBJDUMP_FOR_TARGET"; then
6180 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6181else
6182 echo "$ac_t""no" 1>&6
6183fi
6184
2429c060
PB
6185 fi
6186 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
6187 done
6188fi
6189
5ae72758
DJ
6190if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
6191 set dummy objdump
6192 if test $build = $target ; then
6193 OBJDUMP_FOR_TARGET="$2"
6194 else
6195 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6196 fi
6197fi
6198
3a35eeb3
PB
6199else
6200 OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
2429c060
PB
6201fi
6202
6203
6204
6205
6206if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6207 if test -n "$with_build_time_tools"; then
3a35eeb3 6208 echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6209echo "configure:6210: checking for ranlib in $with_build_time_tools" >&5
3a35eeb3
PB
6210 if test -x $with_build_time_tools/ranlib; then
6211 RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
6212 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6213 echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
6214 else
6215 echo "$ac_t""no" 1>&6
6216 fi
2429c060
PB
6217 elif test $build != $host && test $have_gcc_for_target = yes; then
6218 RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
6219 test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
6220 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6221 fi
6222fi
6223if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6224 # Extract the first word of "ranlib", so it can be a program name with args.
6225set dummy ranlib; ac_word=$2
6226echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6227echo "configure:6228: checking for $ac_word" >&5
2429c060
PB
6228if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6229 echo $ac_n "(cached) $ac_c" 1>&6
6230else
6231 case "$RANLIB_FOR_TARGET" in
6232 /*)
6233 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
6234 ;;
6235 ?:/*)
6236 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
6237 ;;
6238 *)
6239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6240 ac_dummy="$gcc_cv_tool_dirs"
6241 for ac_dir in $ac_dummy; do
6242 test -z "$ac_dir" && ac_dir=.
6243 if test -f $ac_dir/$ac_word; then
6244 ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
6245 break
6246 fi
6247 done
6248 IFS="$ac_save_ifs"
6249 ;;
6250esac
6251fi
6252RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
6253if test -n "$RANLIB_FOR_TARGET"; then
6254 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6255else
6256 echo "$ac_t""no" 1>&6
6257fi
6258
6259fi
6260if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6261 if test -n "$with_build_time_tools"; then
6262 for ncn_progname in ranlib; do
6263 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6264echo "configure:6265: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6265 if test -x $with_build_time_tools/${ncn_progname}; then
6266 ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6267 echo "$ac_t""yes" 1>&6
6268 break
6269 else
6270 echo "$ac_t""no" 1>&6
6271 fi
6272 done
6273fi
6274
6275if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
6276 for ncn_progname in ranlib; do
6277 if test -n "$ncn_target_tool_prefix"; then
6278 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5ae72758
DJ
6279set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6280echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6281echo "configure:6282: checking for $ac_word" >&5
cac3d6c4
CM
6282if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6283 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6284else
55db4b87
PB
6285 if test -n "$RANLIB_FOR_TARGET"; then
6286 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af 6287else
cac3d6c4
CM
6288 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6289 ac_dummy="$PATH"
6290 for ac_dir in $ac_dummy; do
6291 test -z "$ac_dir" && ac_dir=.
6292 if test -f $ac_dir/$ac_word; then
6293 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6294 break
6295 fi
6296 done
6297 IFS="$ac_save_ifs"
859789af
AC
6298fi
6299fi
cac3d6c4 6300RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
55db4b87 6301if test -n "$RANLIB_FOR_TARGET"; then
cac3d6c4 6302 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af 6303else
cac3d6c4 6304 echo "$ac_t""no" 1>&6
859789af
AC
6305fi
6306
2429c060
PB
6307 fi
6308 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
6309 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6310set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6311echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6312echo "configure:6313: checking for $ac_word" >&5
cac3d6c4
CM
6313if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6314 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6315else
05cbd757
PB
6316 if test -n "$RANLIB_FOR_TARGET"; then
6317 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af 6318else
cac3d6c4
CM
6319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6320 ac_dummy="$PATH"
6321 for ac_dir in $ac_dummy; do
6322 test -z "$ac_dir" && ac_dir=.
6323 if test -f $ac_dir/$ac_word; then
6324 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
6325 break
6326 fi
6327 done
6328 IFS="$ac_save_ifs"
859789af
AC
6329fi
6330fi
cac3d6c4 6331RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
05cbd757 6332if test -n "$RANLIB_FOR_TARGET"; then
cac3d6c4 6333 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af 6334else
cac3d6c4 6335 echo "$ac_t""no" 1>&6
859789af 6336fi
cac3d6c4 6337
2429c060
PB
6338 fi
6339 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
6340 done
6341fi
6342
6343if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
6344 set dummy ranlib
6345 if test $build = $target ; then
6346 RANLIB_FOR_TARGET="$2"
6347 else
6348 RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6349 fi
2429c060 6350fi
05cbd757 6351
3a35eeb3
PB
6352else
6353 RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
859789af
AC
6354fi
6355
2429c060
PB
6356
6357
6358
6359if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6360 if test -n "$with_build_time_tools"; then
3a35eeb3 6361 echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6362echo "configure:6363: checking for strip in $with_build_time_tools" >&5
3a35eeb3
PB
6363 if test -x $with_build_time_tools/strip; then
6364 STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
6365 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6366 echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
6367 else
6368 echo "$ac_t""no" 1>&6
6369 fi
2429c060
PB
6370 elif test $build != $host && test $have_gcc_for_target = yes; then
6371 STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
6372 test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
6373 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6374 fi
6375fi
6376if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6377 # Extract the first word of "strip", so it can be a program name with args.
6378set dummy strip; ac_word=$2
6379echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6380echo "configure:6381: checking for $ac_word" >&5
2429c060
PB
6381if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
6382 echo $ac_n "(cached) $ac_c" 1>&6
6383else
6384 case "$STRIP_FOR_TARGET" in
6385 /*)
6386 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
6387 ;;
6388 ?:/*)
6389 ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
6390 ;;
6391 *)
6392 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6393 ac_dummy="$gcc_cv_tool_dirs"
6394 for ac_dir in $ac_dummy; do
6395 test -z "$ac_dir" && ac_dir=.
6396 if test -f $ac_dir/$ac_word; then
6397 ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
6398 break
6399 fi
6400 done
6401 IFS="$ac_save_ifs"
6402 ;;
6403esac
6404fi
6405STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
6406if test -n "$STRIP_FOR_TARGET"; then
6407 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6408else
6409 echo "$ac_t""no" 1>&6
6410fi
6411
6412fi
6413if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6414 if test -n "$with_build_time_tools"; then
6415 for ncn_progname in strip; do
6416 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6417echo "configure:6418: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6418 if test -x $with_build_time_tools/${ncn_progname}; then
6419 ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6420 echo "$ac_t""yes" 1>&6
6421 break
6422 else
6423 echo "$ac_t""no" 1>&6
6424 fi
6425 done
6426fi
6427
6428if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
6429 for ncn_progname in strip; do
6430 if test -n "$ncn_target_tool_prefix"; then
6431 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
7e0f7140 6432set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6433echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6434echo "configure:6435: checking for $ac_word" >&5
cac3d6c4
CM
6435if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6436 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140
GK
6437else
6438 if test -n "$STRIP_FOR_TARGET"; then
6439 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6440else
cac3d6c4
CM
6441 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6442 ac_dummy="$PATH"
6443 for ac_dir in $ac_dummy; do
6444 test -z "$ac_dir" && ac_dir=.
6445 if test -f $ac_dir/$ac_word; then
6446 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6447 break
6448 fi
6449 done
6450 IFS="$ac_save_ifs"
7e0f7140
GK
6451fi
6452fi
cac3d6c4 6453STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
7e0f7140 6454if test -n "$STRIP_FOR_TARGET"; then
cac3d6c4 6455 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
7e0f7140 6456else
cac3d6c4 6457 echo "$ac_t""no" 1>&6
7e0f7140
GK
6458fi
6459
2429c060
PB
6460 fi
6461 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
6462 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
7e0f7140 6463set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6464echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6465echo "configure:6466: checking for $ac_word" >&5
cac3d6c4
CM
6466if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6467 echo $ac_n "(cached) $ac_c" 1>&6
7e0f7140
GK
6468else
6469 if test -n "$STRIP_FOR_TARGET"; then
6470 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6471else
cac3d6c4
CM
6472 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6473 ac_dummy="$PATH"
6474 for ac_dir in $ac_dummy; do
6475 test -z "$ac_dir" && ac_dir=.
6476 if test -f $ac_dir/$ac_word; then
6477 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
6478 break
6479 fi
6480 done
6481 IFS="$ac_save_ifs"
7e0f7140
GK
6482fi
6483fi
cac3d6c4 6484STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
7e0f7140 6485if test -n "$STRIP_FOR_TARGET"; then
cac3d6c4 6486 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
7e0f7140 6487else
cac3d6c4 6488 echo "$ac_t""no" 1>&6
7e0f7140 6489fi
cac3d6c4 6490
2429c060
PB
6491 fi
6492 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
6493 done
6494fi
6495
7e0f7140
GK
6496if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
6497 set dummy strip
6498 if test $build = $target ; then
6499 STRIP_FOR_TARGET="$2"
6500 else
6501 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6502 fi
6503fi
6504
3a35eeb3
PB
6505else
6506 STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
2429c060
PB
6507fi
6508
6509
6510
6511
6512if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6513 if test -n "$with_build_time_tools"; then
3a35eeb3 6514 echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6515echo "configure:6516: checking for windres in $with_build_time_tools" >&5
3a35eeb3
PB
6516 if test -x $with_build_time_tools/windres; then
6517 WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
6518 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6519 echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
6520 else
6521 echo "$ac_t""no" 1>&6
6522 fi
2429c060
PB
6523 elif test $build != $host && test $have_gcc_for_target = yes; then
6524 WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
6525 test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
6526 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6527 fi
6528fi
6529if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6530 # Extract the first word of "windres", so it can be a program name with args.
6531set dummy windres; ac_word=$2
6532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6533echo "configure:6534: checking for $ac_word" >&5
2429c060
PB
6534if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6535 echo $ac_n "(cached) $ac_c" 1>&6
6536else
6537 case "$WINDRES_FOR_TARGET" in
6538 /*)
6539 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
6540 ;;
6541 ?:/*)
6542 ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
6543 ;;
6544 *)
6545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6546 ac_dummy="$gcc_cv_tool_dirs"
6547 for ac_dir in $ac_dummy; do
6548 test -z "$ac_dir" && ac_dir=.
6549 if test -f $ac_dir/$ac_word; then
6550 ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word"
6551 break
6552 fi
6553 done
6554 IFS="$ac_save_ifs"
6555 ;;
6556esac
6557fi
6558WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
6559if test -n "$WINDRES_FOR_TARGET"; then
6560 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6561else
6562 echo "$ac_t""no" 1>&6
6563fi
6564
6565fi
6566if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6567 if test -n "$with_build_time_tools"; then
6568 for ncn_progname in windres; do
6569 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
66a79c16 6570echo "configure:6571: checking for ${ncn_progname} in $with_build_time_tools" >&5
3a35eeb3
PB
6571 if test -x $with_build_time_tools/${ncn_progname}; then
6572 ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
2429c060
PB
6573 echo "$ac_t""yes" 1>&6
6574 break
6575 else
6576 echo "$ac_t""no" 1>&6
6577 fi
6578 done
6579fi
6580
6581if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
6582 for ncn_progname in windres; do
6583 if test -n "$ncn_target_tool_prefix"; then
6584 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
05cbd757 6585set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
cac3d6c4 6586echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6587echo "configure:6588: checking for $ac_word" >&5
cac3d6c4
CM
6588if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6589 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6590else
55db4b87
PB
6591 if test -n "$WINDRES_FOR_TARGET"; then
6592 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af 6593else
cac3d6c4
CM
6594 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6595 ac_dummy="$PATH"
6596 for ac_dir in $ac_dummy; do
6597 test -z "$ac_dir" && ac_dir=.
6598 if test -f $ac_dir/$ac_word; then
6599 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6600 break
6601 fi
6602 done
6603 IFS="$ac_save_ifs"
859789af
AC
6604fi
6605fi
cac3d6c4 6606WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
55db4b87 6607if test -n "$WINDRES_FOR_TARGET"; then
cac3d6c4 6608 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af 6609else
cac3d6c4 6610 echo "$ac_t""no" 1>&6
859789af
AC
6611fi
6612
2429c060
PB
6613 fi
6614 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
6615 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
05cbd757 6616set dummy ${ncn_progname}; ac_word=$2
cac3d6c4 6617echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
66a79c16 6618echo "configure:6619: checking for $ac_word" >&5
cac3d6c4
CM
6619if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6620 echo $ac_n "(cached) $ac_c" 1>&6
859789af 6621else
05cbd757
PB
6622 if test -n "$WINDRES_FOR_TARGET"; then
6623 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af 6624else
cac3d6c4
CM
6625 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6626 ac_dummy="$PATH"
6627 for ac_dir in $ac_dummy; do
6628 test -z "$ac_dir" && ac_dir=.
6629 if test -f $ac_dir/$ac_word; then
6630 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
6631 break
6632 fi
6633 done
6634 IFS="$ac_save_ifs"
859789af
AC
6635fi
6636fi
cac3d6c4 6637WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
05cbd757 6638if test -n "$WINDRES_FOR_TARGET"; then
cac3d6c4 6639 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af 6640else
cac3d6c4 6641 echo "$ac_t""no" 1>&6
859789af 6642fi
cac3d6c4 6643
2429c060
PB
6644 fi
6645 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
6646 done
6647fi
6648
05cbd757
PB
6649if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
6650 set dummy windres
6651 if test $build = $target ; then
6652 WINDRES_FOR_TARGET="$2"
859789af 6653 else
05cbd757 6654 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 6655 fi
859789af
AC
6656fi
6657
3a35eeb3
PB
6658else
6659 WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
2429c060
PB
6660fi
6661
852e5f18 6662
be01d343
PB
6663RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
6664
6665echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
66a79c16 6666echo "configure:6667: checking where to find the target ar" >&5
be01d343 6667if test "x${build}" != "x${host}" ; then
2429c060
PB
6668 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6669 # We already found the complete path
6670 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
6671 else
6672 # Canadian cross, just use what we found
6673 echo "$ac_t""pre-installed" 1>&6
6674 fi
be01d343
PB
6675else
6676 ok=yes
6677 case " ${configdirs} " in
6678 *" binutils "*) ;;
6679 *) ok=no ;;
6680 esac
6681
6682 if test $ok = yes; then
6683 # An in-tree tool is available and we can use it
6684 AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
6685 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6686 elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6687 # We already found the complete path
6688 echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
be01d343
PB
6689 elif test "x$target" = "x$host"; then
6690 # We can use an host tool
6691 AR_FOR_TARGET='$(AR)'
6692 echo "$ac_t""host tool" 1>&6
6693 else
6694 # We need a cross tool
6695 echo "$ac_t""pre-installed" 1>&6
6696 fi
6697fi
6698echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
66a79c16 6699echo "configure:6700: checking where to find the target as" >&5
be01d343 6700if test "x${build}" != "x${host}" ; then
2429c060
PB
6701 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6702 # We already found the complete path
6703 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
6704 else
6705 # Canadian cross, just use what we found
6706 echo "$ac_t""pre-installed" 1>&6
6707 fi
be01d343
PB
6708else
6709 ok=yes
6710 case " ${configdirs} " in
6711 *" gas "*) ;;
6712 *) ok=no ;;
6713 esac
6714
6715 if test $ok = yes; then
6716 # An in-tree tool is available and we can use it
6717 AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
6718 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6719 elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6720 # We already found the complete path
6721 echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
be01d343
PB
6722 elif test "x$target" = "x$host"; then
6723 # We can use an host tool
6724 AS_FOR_TARGET='$(AS)'
6725 echo "$ac_t""host tool" 1>&6
6726 else
6727 # We need a cross tool
6728 echo "$ac_t""pre-installed" 1>&6
6729 fi
6730fi
6731echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
66a79c16 6732echo "configure:6733: checking where to find the target cc" >&5
be01d343 6733if test "x${build}" != "x${host}" ; then
2429c060
PB
6734 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6735 # We already found the complete path
6736 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
6737 else
6738 # Canadian cross, just use what we found
6739 echo "$ac_t""pre-installed" 1>&6
6740 fi
be01d343
PB
6741else
6742 ok=yes
6743 case " ${configdirs} " in
6744 *" gcc "*) ;;
6745 *) ok=no ;;
6746 esac
6747
6748 if test $ok = yes; then
6749 # An in-tree tool is available and we can use it
6750 CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6751 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6752 elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6753 # We already found the complete path
6754 echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
be01d343
PB
6755 elif test "x$target" = "x$host"; then
6756 # We can use an host tool
6757 CC_FOR_TARGET='$(CC)'
6758 echo "$ac_t""host tool" 1>&6
6759 else
6760 # We need a cross tool
6761 echo "$ac_t""pre-installed" 1>&6
6762 fi
6763fi
6764echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
66a79c16 6765echo "configure:6766: checking where to find the target c++" >&5
be01d343 6766if test "x${build}" != "x${host}" ; then
2429c060
PB
6767 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6768 # We already found the complete path
6769 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
6770 else
6771 # Canadian cross, just use what we found
6772 echo "$ac_t""pre-installed" 1>&6
6773 fi
be01d343
PB
6774else
6775 ok=yes
6776 case " ${configdirs} " in
6777 *" gcc "*) ;;
6778 *) ok=no ;;
6779 esac
6780 case ,${enable_languages}, in
6781 *,c++,*) ;;
6782 *) ok=no ;;
6783 esac
6784 if test $ok = yes; then
6785 # An in-tree tool is available and we can use it
6786 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'
6787 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6788 elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6789 # We already found the complete path
6790 echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
be01d343
PB
6791 elif test "x$target" = "x$host"; then
6792 # We can use an host tool
6793 CXX_FOR_TARGET='$(CXX)'
6794 echo "$ac_t""host tool" 1>&6
6795 else
6796 # We need a cross tool
6797 echo "$ac_t""pre-installed" 1>&6
6798 fi
6799fi
6800echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
66a79c16 6801echo "configure:6802: checking where to find the target c++ for libstdc++" >&5
be01d343 6802if test "x${build}" != "x${host}" ; then
2429c060
PB
6803 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6804 # We already found the complete path
6805 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
6806 else
6807 # Canadian cross, just use what we found
6808 echo "$ac_t""pre-installed" 1>&6
6809 fi
be01d343
PB
6810else
6811 ok=yes
6812 case " ${configdirs} " in
6813 *" gcc "*) ;;
6814 *) ok=no ;;
6815 esac
6816 case ,${enable_languages}, in
6817 *,c++,*) ;;
6818 *) ok=no ;;
6819 esac
6820 if test $ok = yes; then
6821 # An in-tree tool is available and we can use it
6822 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'
6823 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6824 elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6825 # We already found the complete path
6826 echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
be01d343
PB
6827 elif test "x$target" = "x$host"; then
6828 # We can use an host tool
6829 RAW_CXX_FOR_TARGET='$(CXX)'
6830 echo "$ac_t""host tool" 1>&6
6831 else
6832 # We need a cross tool
6833 echo "$ac_t""pre-installed" 1>&6
6834 fi
6835fi
6836echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
66a79c16 6837echo "configure:6838: checking where to find the target dlltool" >&5
be01d343 6838if test "x${build}" != "x${host}" ; then
2429c060
PB
6839 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6840 # We already found the complete path
6841 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
6842 else
6843 # Canadian cross, just use what we found
6844 echo "$ac_t""pre-installed" 1>&6
6845 fi
be01d343
PB
6846else
6847 ok=yes
6848 case " ${configdirs} " in
6849 *" binutils "*) ;;
6850 *) ok=no ;;
6851 esac
6852
6853 if test $ok = yes; then
6854 # An in-tree tool is available and we can use it
6855 DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
6856 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6857 elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6858 # We already found the complete path
6859 echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
be01d343
PB
6860 elif test "x$target" = "x$host"; then
6861 # We can use an host tool
6862 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
6863 echo "$ac_t""host tool" 1>&6
6864 else
6865 # We need a cross tool
6866 echo "$ac_t""pre-installed" 1>&6
6867 fi
6868fi
6869echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
66a79c16 6870echo "configure:6871: checking where to find the target gcc" >&5
be01d343 6871if test "x${build}" != "x${host}" ; then
2429c060
PB
6872 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6873 # We already found the complete path
6874 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
6875 else
6876 # Canadian cross, just use what we found
6877 echo "$ac_t""pre-installed" 1>&6
6878 fi
be01d343
PB
6879else
6880 ok=yes
6881 case " ${configdirs} " in
6882 *" gcc "*) ;;
6883 *) ok=no ;;
6884 esac
6885
6886 if test $ok = yes; then
6887 # An in-tree tool is available and we can use it
6888 GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6889 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6890 elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6891 # We already found the complete path
6892 echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
be01d343
PB
6893 elif test "x$target" = "x$host"; then
6894 # We can use an host tool
6895 GCC_FOR_TARGET='$()'
6896 echo "$ac_t""host tool" 1>&6
6897 else
6898 # We need a cross tool
6899 echo "$ac_t""pre-installed" 1>&6
6900 fi
6901fi
6902echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
66a79c16 6903echo "configure:6904: checking where to find the target gcj" >&5
be01d343 6904if test "x${build}" != "x${host}" ; then
2429c060
PB
6905 if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6906 # We already found the complete path
6907 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
6908 else
6909 # Canadian cross, just use what we found
6910 echo "$ac_t""pre-installed" 1>&6
6911 fi
be01d343
PB
6912else
6913 ok=yes
6914 case " ${configdirs} " in
6915 *" gcc "*) ;;
6916 *) ok=no ;;
6917 esac
6918 case ,${enable_languages}, in
6919 *,java,*) ;;
6920 *) ok=no ;;
6921 esac
6922 if test $ok = yes; then
6923 # An in-tree tool is available and we can use it
6924 GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
6925 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6926 elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6927 # We already found the complete path
6928 echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
be01d343
PB
6929 elif test "x$target" = "x$host"; then
6930 # We can use an host tool
6931 GCJ_FOR_TARGET='$(GCJ)'
6932 echo "$ac_t""host tool" 1>&6
6933 else
6934 # We need a cross tool
6935 echo "$ac_t""pre-installed" 1>&6
6936 fi
6937fi
6938echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
66a79c16 6939echo "configure:6940: checking where to find the target gfortran" >&5
be01d343 6940if test "x${build}" != "x${host}" ; then
2429c060
PB
6941 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6942 # We already found the complete path
6943 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
6944 else
6945 # Canadian cross, just use what we found
6946 echo "$ac_t""pre-installed" 1>&6
6947 fi
be01d343
PB
6948else
6949 ok=yes
6950 case " ${configdirs} " in
6951 *" gcc "*) ;;
6952 *) ok=no ;;
6953 esac
6954 case ,${enable_languages}, in
6955 *,fortran,*) ;;
6956 *) ok=no ;;
6957 esac
6958 if test $ok = yes; then
6959 # An in-tree tool is available and we can use it
6960 GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
6961 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6962 elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6963 # We already found the complete path
6964 echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
be01d343
PB
6965 elif test "x$target" = "x$host"; then
6966 # We can use an host tool
6967 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
6968 echo "$ac_t""host tool" 1>&6
6969 else
6970 # We need a cross tool
6971 echo "$ac_t""pre-installed" 1>&6
6972 fi
6973fi
6974echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
66a79c16 6975echo "configure:6976: checking where to find the target ld" >&5
be01d343 6976if test "x${build}" != "x${host}" ; then
2429c060
PB
6977 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6978 # We already found the complete path
6979 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
6980 else
6981 # Canadian cross, just use what we found
6982 echo "$ac_t""pre-installed" 1>&6
6983 fi
be01d343
PB
6984else
6985 ok=yes
6986 case " ${configdirs} " in
6987 *" ld "*) ;;
6988 *) ok=no ;;
6989 esac
6990
6991 if test $ok = yes; then
6992 # An in-tree tool is available and we can use it
6993 LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
6994 echo "$ac_t""just compiled" 1>&6
2429c060
PB
6995 elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6996 # We already found the complete path
6997 echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
be01d343
PB
6998 elif test "x$target" = "x$host"; then
6999 # We can use an host tool
7000 LD_FOR_TARGET='$(LD)'
7001 echo "$ac_t""host tool" 1>&6
7002 else
7003 # We need a cross tool
7004 echo "$ac_t""pre-installed" 1>&6
7005 fi
7006fi
7007echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
66a79c16 7008echo "configure:7009: checking where to find the target lipo" >&5
be01d343 7009if test "x${build}" != "x${host}" ; then
2429c060
PB
7010 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7011 # We already found the complete path
7012 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7013 else
7014 # Canadian cross, just use what we found
7015 echo "$ac_t""pre-installed" 1>&6
7016 fi
be01d343 7017else
2429c060
PB
7018 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7019 # We already found the complete path
7020 echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7021 elif test "x$target" = "x$host"; then
be01d343
PB
7022 # We can use an host tool
7023 LIPO_FOR_TARGET='$(LIPO)'
7024 echo "$ac_t""host tool" 1>&6
7025 else
7026 # We need a cross tool
7027 echo "$ac_t""pre-installed" 1>&6
7028 fi
7029fi
7030echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
66a79c16 7031echo "configure:7032: checking where to find the target nm" >&5
be01d343 7032if test "x${build}" != "x${host}" ; then
2429c060
PB
7033 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7034 # We already found the complete path
7035 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
7036 else
7037 # Canadian cross, just use what we found
7038 echo "$ac_t""pre-installed" 1>&6
7039 fi
be01d343
PB
7040else
7041 ok=yes
7042 case " ${configdirs} " in
7043 *" binutils "*) ;;
7044 *) ok=no ;;
7045 esac
7046
7047 if test $ok = yes; then
7048 # An in-tree tool is available and we can use it
7049 NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
7050 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7051 elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7052 # We already found the complete path
7053 echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
be01d343
PB
7054 elif test "x$target" = "x$host"; then
7055 # We can use an host tool
7056 NM_FOR_TARGET='$(NM)'
7057 echo "$ac_t""host tool" 1>&6
7058 else
7059 # We need a cross tool
7060 echo "$ac_t""pre-installed" 1>&6
7061 fi
7062fi
7063echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
66a79c16 7064echo "configure:7065: checking where to find the target objdump" >&5
be01d343 7065if test "x${build}" != "x${host}" ; then
2429c060
PB
7066 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7067 # We already found the complete path
7068 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
7069 else
7070 # Canadian cross, just use what we found
7071 echo "$ac_t""pre-installed" 1>&6
7072 fi
be01d343
PB
7073else
7074 ok=yes
7075 case " ${configdirs} " in
7076 *" binutils "*) ;;
7077 *) ok=no ;;
7078 esac
7079
7080 if test $ok = yes; then
7081 # An in-tree tool is available and we can use it
7082 OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
7083 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7084 elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7085 # We already found the complete path
7086 echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
be01d343
PB
7087 elif test "x$target" = "x$host"; then
7088 # We can use an host tool
7089 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
7090 echo "$ac_t""host tool" 1>&6
7091 else
7092 # We need a cross tool
7093 echo "$ac_t""pre-installed" 1>&6
7094 fi
7095fi
7096echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
66a79c16 7097echo "configure:7098: checking where to find the target ranlib" >&5
be01d343 7098if test "x${build}" != "x${host}" ; then
2429c060
PB
7099 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7100 # We already found the complete path
7101 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
7102 else
7103 # Canadian cross, just use what we found
7104 echo "$ac_t""pre-installed" 1>&6
7105 fi
be01d343
PB
7106else
7107 ok=yes
7108 case " ${configdirs} " in
7109 *" binutils "*) ;;
7110 *) ok=no ;;
7111 esac
7112
7113 if test $ok = yes; then
7114 # An in-tree tool is available and we can use it
7115 RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
7116 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7117 elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7118 # We already found the complete path
7119 echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
be01d343
PB
7120 elif test "x$target" = "x$host"; then
7121 # We can use an host tool
7122 RANLIB_FOR_TARGET='$(RANLIB)'
7123 echo "$ac_t""host tool" 1>&6
7124 else
7125 # We need a cross tool
7126 echo "$ac_t""pre-installed" 1>&6
7127 fi
7128fi
7129echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
66a79c16 7130echo "configure:7131: checking where to find the target strip" >&5
be01d343 7131if test "x${build}" != "x${host}" ; then
2429c060
PB
7132 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7133 # We already found the complete path
7134 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
7135 else
7136 # Canadian cross, just use what we found
7137 echo "$ac_t""pre-installed" 1>&6
7138 fi
be01d343
PB
7139else
7140 ok=yes
7141 case " ${configdirs} " in
7142 *" binutils "*) ;;
7143 *) ok=no ;;
7144 esac
7145
7146 if test $ok = yes; then
7147 # An in-tree tool is available and we can use it
7148 STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
7149 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7150 elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7151 # We already found the complete path
7152 echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
be01d343
PB
7153 elif test "x$target" = "x$host"; then
7154 # We can use an host tool
7155 STRIP_FOR_TARGET='$(STRIP)'
7156 echo "$ac_t""host tool" 1>&6
7157 else
7158 # We need a cross tool
7159 echo "$ac_t""pre-installed" 1>&6
7160 fi
7161fi
7162echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
66a79c16 7163echo "configure:7164: checking where to find the target windres" >&5
be01d343 7164if test "x${build}" != "x${host}" ; then
2429c060
PB
7165 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7166 # We already found the complete path
7167 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
7168 else
7169 # Canadian cross, just use what we found
7170 echo "$ac_t""pre-installed" 1>&6
7171 fi
be01d343
PB
7172else
7173 ok=yes
7174 case " ${configdirs} " in
7175 *" binutils "*) ;;
7176 *) ok=no ;;
7177 esac
7178
7179 if test $ok = yes; then
7180 # An in-tree tool is available and we can use it
7181 WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
7182 echo "$ac_t""just compiled" 1>&6
2429c060
PB
7183 elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7184 # We already found the complete path
7185 echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
be01d343
PB
7186 elif test "x$target" = "x$host"; then
7187 # We can use an host tool
7188 WINDRES_FOR_TARGET='$(WINDRES)'
7189 echo "$ac_t""host tool" 1>&6
7190 else
7191 # We need a cross tool
7192 echo "$ac_t""pre-installed" 1>&6
7193 fi
a0da8069 7194fi
54752a6b
NN
7195
7196
7197
be01d343 7198
a0da8069
NN
7199# Certain tools may need extra flags.
7200AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
7201RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
7202NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
7203
be01d343
PB
7204# When building target libraries, except in a Canadian cross, we use
7205# the same toolchain as the compiler we just built.
7206COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
7207COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
7208COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
7209if test $host = $build; then
7210 case " $configdirs " in
7211 *" gcc "*)
7212 COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
7213 COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
7214 COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
7215 ;;
7216 esac
7217fi
7218
7219
7220
7221
7222
cac3d6c4 7223echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
66a79c16 7224echo "configure:7225: checking whether to enable maintainer-specific portions of Makefiles" >&5
3d5e36ae
AO
7225# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7226if test "${enable_maintainer_mode+set}" = set; then
7227 enableval="$enable_maintainer_mode"
7228 USE_MAINTAINER_MODE=$enableval
7229else
7230 USE_MAINTAINER_MODE=no
cac3d6c4
CM
7231fi
7232
7233echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
3d5e36ae
AO
7234
7235
7236if test "$USE_MAINTAINER_MODE" = yes; then
7237 MAINTAINER_MODE_TRUE=
7238 MAINTAINER_MODE_FALSE='#'
7239else
7240 MAINTAINER_MODE_TRUE='#'
7241 MAINTAINER_MODE_FALSE=
cac3d6c4 7242fi
3d5e36ae
AO
7243MAINT=$MAINTAINER_MODE_TRUE
7244
1d39f329
NN
7245# ---------------------
7246# GCC bootstrap support
7247# ---------------------
7248
7249# Stage specific cflags for build.
7250stage1_cflags="-g"
7251case $build in
7252 vax-*-*)
7253 case ${GCC} in
7254 yes) stage1_cflags="-g -Wa,-J" ;;
7255 *) stage1_cflags="-g -J" ;;
7256 esac ;;
7257 powerpc-*-darwin*)
7258 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
7259 # sources; use -no-cpp-precomp to get to GNU cpp.
7260 # Apple's GCC has bugs in designated initializer handling, so disable
7261 # that too.
7262 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
7263 ;;
7264esac
7265
1d89b610
PB
7266# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
7267if test "$GCC" = yes; then
7268 saved_CFLAGS="$CFLAGS"
7269
7270 # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
7271 CFLAGS="$CFLAGS -fkeep-inline-functions"
7272 echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
7273echo "configure:7274: checking whether -fkeep-inline-functions is supported" >&5
7274 cat > conftest.$ac_ext <<EOF
7275#line 7276 "configure"
7276#include "confdefs.h"
7277
7278int main() {
7279
7280; return 0; }
7281EOF
7282if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7283 rm -rf conftest*
7284 echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
7285else
7286 echo "configure: failed program was:" >&5
7287 cat conftest.$ac_ext >&5
7288 rm -rf conftest*
7289 echo "$ac_t""no" 1>&6
7290fi
7291rm -f conftest*
7292
7293 CFLAGS="$saved_CFLAGS"
7294fi
7295
7296
1d39f329
NN
7297
7298# Enable -Werror in bootstrap stage2 and later.
7299# Change the default to "no" on release branches.
7300# Check whether --enable-werror or --disable-werror was given.
7301if test "${enable_werror+set}" = set; then
7302 enableval="$enable_werror"
cac3d6c4 7303 :
1d39f329
NN
7304else
7305 enable_werror=yes
cac3d6c4
CM
7306fi
7307
1a6f2dc7
NN
7308case ${enable_werror} in
7309 yes) stage2_werror_flag="--enable-werror-always" ;;
7310 *) stage2_werror_flag="" ;;
1d39f329
NN
7311esac
7312
7313
108a6f8e
CD
7314# Flags needed to enable html installing and building
7315# Check whether --with-datarootdir or --without-datarootdir was given.
7316if test "${with_datarootdir+set}" = set; then
7317 withval="$with_datarootdir"
7318 datarootdir="\${prefix}/${withval}"
7319else
7320 datarootdir="\${prefix}/share"
7321fi
7322
7323
7324# Check whether --with-docdir or --without-docdir was given.
7325if test "${with_docdir+set}" = set; then
7326 withval="$with_docdir"
7327 docdir="\${prefix}/${withval}"
7328else
7329 docdir="\${datarootdir}/doc"
7330fi
7331
7332
7333# Check whether --with-htmldir or --without-htmldir was given.
7334if test "${with_htmldir+set}" = set; then
7335 withval="$with_htmldir"
7336 htmldir="\${prefix}/${withval}"
7337else
7338 htmldir="\${docdir}"
7339fi
7340
7341
7342
7343
7344
7345
cac3d6c4
CM
7346trap '' 1 2 15
7347cat > confcache <<\EOF
a0da8069
NN
7348# This file is a shell script that caches the results of configure
7349# tests run on this system so they can be shared between configure
cac3d6c4
CM
7350# scripts and configure runs. It is not useful on other systems.
7351# If it contains results you don't want to keep, you may remove or edit it.
a0da8069 7352#
cac3d6c4
CM
7353# By default, configure uses ./config.cache as the cache file,
7354# creating it if it does not exist already. You can give configure
7355# the --cache-file=FILE option to use a different cache file; that is
7356# what configure does when it calls configure scripts in
7357# subdirectories, so they share the cache.
7358# Giving --cache-file=/dev/null disables caching, for debugging configure.
7359# config.status only pays attention to the cache file if you give it the
7360# --recheck option to rerun configure.
a0da8069 7361#
cac3d6c4 7362EOF
a0da8069
NN
7363# The following way of writing the cache mishandles newlines in values,
7364# but we know of no workaround that is simple, portable, and efficient.
7365# So, don't put newlines in cache variables' values.
7366# Ultrix sh set writes to stderr and can't be redirected directly,
7367# and sets the high bit in the cache file unless we assign to the vars.
cac3d6c4
CM
7368(set) 2>&1 |
7369 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7370 *ac_space=\ *)
7371 # `set' does not quote correctly, so add quotes (double-quote substitution
7372 # turns \\\\ into \\, and sed turns \\ into \).
7373 sed -n \
7374 -e "s/'/'\\\\''/g" \
7375 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7376 ;;
7377 *)
7378 # `set' quotes correctly as required by POSIX, so do not add quotes.
7379 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7380 ;;
7381 esac >> confcache
7382if cmp -s $cache_file confcache; then
7383 :
7384else
a0da8069 7385 if test -w $cache_file; then
cac3d6c4
CM
7386 echo "updating cache $cache_file"
7387 cat confcache > $cache_file
a0da8069
NN
7388 else
7389 echo "not updating unwritable cache $cache_file"
7390 fi
852e5f18 7391fi
a0da8069 7392rm -f confcache
852e5f18 7393
cac3d6c4
CM
7394trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7395
a0da8069
NN
7396test "x$prefix" = xNONE && prefix=$ac_default_prefix
7397# Let make expand exec_prefix.
7398test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
852e5f18 7399
cac3d6c4
CM
7400# Any assignment to VPATH causes Sun make to only execute
7401# the first set of double-colon rules, so remove it if not needed.
7402# If there is a colon in the path, we need to keep it.
a0da8069 7403if test "x$srcdir" = x.; then
cac3d6c4 7404 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
a0da8069 7405fi
252b5132 7406
cac3d6c4
CM
7407trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7408
a0da8069
NN
7409# Transform confdefs.h into DEFS.
7410# Protect against shell expansion while executing Makefile rules.
7411# Protect against Makefile macro expansion.
4f0ef2d8
CD
7412cat > conftest.defs <<\EOF
7413s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
7414s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
7415s%\[%\\&%g
7416s%\]%\\&%g
7417s%\$%$$%g
7418EOF
7419DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
7420rm -f conftest.defs
852e5f18 7421
376a0e54 7422
cac3d6c4 7423# Without the "./", some shells look in PATH for config.status.
376a0e54 7424: ${CONFIG_STATUS=./config.status}
cac3d6c4
CM
7425
7426echo creating $CONFIG_STATUS
7427rm -f $CONFIG_STATUS
7428cat > $CONFIG_STATUS <<EOF
7429#! /bin/sh
7430# Generated automatically by configure.
a0da8069 7431# Run this file to recreate the current configuration.
cac3d6c4
CM
7432# This directory was configured as follows,
7433# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7434#
7435# $0 $ac_configure_args
7436#
a0da8069 7437# Compiler output produced by configure, useful for debugging
cac3d6c4 7438# configure, is in ./config.log if it exists.
376a0e54 7439
cac3d6c4
CM
7440ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7441for ac_option
a0da8069 7442do
cac3d6c4 7443 case "\$ac_option" in
a0da8069 7444 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
cac3d6c4
CM
7445 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7446 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7447 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7448 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7449 exit 0 ;;
7450 -help | --help | --hel | --he | --h)
7451 echo "\$ac_cs_usage"; exit 0 ;;
7452 *) echo "\$ac_cs_usage"; exit 1 ;;
376a0e54
CM
7453 esac
7454done
7455
cac3d6c4
CM
7456ac_given_srcdir=$srcdir
7457ac_given_INSTALL="$INSTALL"
376a0e54 7458
cac3d6c4
CM
7459trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7460EOF
7461cat >> $CONFIG_STATUS <<EOF
376a0e54 7462
cac3d6c4
CM
7463# Protect against being on the right side of a sed subst in config.status.
7464sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7465 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7466$ac_vpsub
7467$extrasub
7468s%@SHELL@%$SHELL%g
7469s%@CFLAGS@%$CFLAGS%g
7470s%@CPPFLAGS@%$CPPFLAGS%g
7471s%@CXXFLAGS@%$CXXFLAGS%g
7472s%@FFLAGS@%$FFLAGS%g
7473s%@DEFS@%$DEFS%g
7474s%@LDFLAGS@%$LDFLAGS%g
7475s%@LIBS@%$LIBS%g
7476s%@exec_prefix@%$exec_prefix%g
7477s%@prefix@%$prefix%g
7478s%@program_transform_name@%$program_transform_name%g
7479s%@bindir@%$bindir%g
7480s%@sbindir@%$sbindir%g
7481s%@libexecdir@%$libexecdir%g
7482s%@datadir@%$datadir%g
7483s%@sysconfdir@%$sysconfdir%g
7484s%@sharedstatedir@%$sharedstatedir%g
7485s%@localstatedir@%$localstatedir%g
7486s%@libdir@%$libdir%g
7487s%@includedir@%$includedir%g
7488s%@oldincludedir@%$oldincludedir%g
7489s%@infodir@%$infodir%g
7490s%@mandir@%$mandir%g
7491s%@host@%$host%g
7492s%@host_alias@%$host_alias%g
7493s%@host_cpu@%$host_cpu%g
7494s%@host_vendor@%$host_vendor%g
7495s%@host_os@%$host_os%g
7496s%@target@%$target%g
7497s%@target_alias@%$target_alias%g
7498s%@target_cpu@%$target_cpu%g
7499s%@target_vendor@%$target_vendor%g
7500s%@target_os@%$target_os%g
7501s%@build@%$build%g
7502s%@build_alias@%$build_alias%g
7503s%@build_cpu@%$build_cpu%g
7504s%@build_vendor@%$build_vendor%g
7505s%@build_os@%$build_os%g
7506s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7507s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7508s%@INSTALL_DATA@%$INSTALL_DATA%g
7509s%@LN@%$LN%g
7510s%@LN_S@%$LN_S%g
7511s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
66a79c16 7512s%@build_libsubdir@%$build_libsubdir%g
cac3d6c4
CM
7513s%@build_subdir@%$build_subdir%g
7514s%@host_subdir@%$host_subdir%g
7515s%@target_subdir@%$target_subdir%g
7516s%@CC@%$CC%g
7517s%@GNATBIND@%$GNATBIND%g
7518s%@do_compare@%$do_compare%g
7519s%@gmplibs@%$gmplibs%g
7520s%@gmpinc@%$gmpinc%g
7521s%@stage1_languages@%$stage1_languages%g
7522s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
a0da8069 7523/@serialization_dependencies@/r $serialization_dependencies
cac3d6c4 7524s%@serialization_dependencies@%%g
a0da8069 7525/@host_makefile_frag@/r $host_makefile_frag
cac3d6c4 7526s%@host_makefile_frag@%%g
a0da8069 7527/@target_makefile_frag@/r $target_makefile_frag
cac3d6c4 7528s%@target_makefile_frag@%%g
a0da8069 7529/@alphaieee_frag@/r $alphaieee_frag
cac3d6c4 7530s%@alphaieee_frag@%%g
a0da8069 7531/@ospace_frag@/r $ospace_frag
cac3d6c4
CM
7532s%@ospace_frag@%%g
7533s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
cac3d6c4
CM
7534s%@tooldir@%$tooldir%g
7535s%@build_tooldir@%$build_tooldir%g
907be67c 7536s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
cac3d6c4 7537s%@GDB_TK@%$GDB_TK%g
907be67c 7538s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
cac3d6c4
CM
7539s%@build_configargs@%$build_configargs%g
7540s%@build_configdirs@%$build_configdirs%g
7541s%@host_configargs@%$host_configargs%g
7542s%@configdirs@%$configdirs%g
7543s%@target_configargs@%$target_configargs%g
cac3d6c4
CM
7544s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7545s%@config_shell@%$config_shell%g
be01d343
PB
7546s%@YACC@%$YACC%g
7547s%@BISON@%$BISON%g
7548s%@M4@%$M4%g
7549s%@LEX@%$LEX%g
7550s%@FLEX@%$FLEX%g
7551s%@MAKEINFO@%$MAKEINFO%g
7552s%@EXPECT@%$EXPECT%g
7553s%@RUNTEST@%$RUNTEST%g
cac3d6c4
CM
7554s%@AR@%$AR%g
7555s%@AS@%$AS%g
7556s%@DLLTOOL@%$DLLTOOL%g
7557s%@LD@%$LD%g
be01d343 7558s%@LIPO@%$LIPO%g
cac3d6c4
CM
7559s%@NM@%$NM%g
7560s%@RANLIB@%$RANLIB%g
be01d343 7561s%@STRIP@%$STRIP%g
cac3d6c4
CM
7562s%@WINDRES@%$WINDRES%g
7563s%@OBJCOPY@%$OBJCOPY%g
7564s%@OBJDUMP@%$OBJDUMP%g
7565s%@CXX@%$CXX%g
7566s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
cac3d6c4
CM
7567s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
7568s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
cac3d6c4
CM
7569s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
7570s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
7571s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
2429c060
PB
7572s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
7573s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
7574s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
cac3d6c4
CM
7575s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7576s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
7577s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
5ae72758 7578s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
cac3d6c4
CM
7579s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7580s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
7581s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
cac3d6c4
CM
7582s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
7583s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
be01d343
PB
7584s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
7585s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
7586s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
cac3d6c4
CM
7587s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7588s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7589s%@MAINT@%$MAINT%g
7590s%@stage1_cflags@%$stage1_cflags%g
cac3d6c4 7591s%@stage2_werror_flag@%$stage2_werror_flag%g
108a6f8e
CD
7592s%@datarootdir@%$datarootdir%g
7593s%@docdir@%$docdir%g
7594s%@htmldir@%$htmldir%g
cac3d6c4 7595
a0da8069 7596CEOF
cac3d6c4 7597EOF
252b5132 7598
cac3d6c4
CM
7599cat >> $CONFIG_STATUS <<\EOF
7600
7601# Split the substitutions into bite-sized pieces for seds with
7602# small command number limits, like on Digital OSF/1 and HP-UX.
7603ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7604ac_file=1 # Number of current file.
7605ac_beg=1 # First line for current file.
7606ac_end=$ac_max_sed_cmds # Line after last line for current file.
7607ac_more_lines=:
7608ac_sed_cmds=""
7609while $ac_more_lines; do
7610 if test $ac_beg -gt 1; then
7611 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7612 else
7613 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7614 fi
7615 if test ! -s conftest.s$ac_file; then
7616 ac_more_lines=false
7617 rm -f conftest.s$ac_file
7618 else
7619 if test -z "$ac_sed_cmds"; then
7620 ac_sed_cmds="sed -f conftest.s$ac_file"
a0da8069 7621 else
cac3d6c4 7622 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
a0da8069 7623 fi
cac3d6c4
CM
7624 ac_file=`expr $ac_file + 1`
7625 ac_beg=$ac_end
7626 ac_end=`expr $ac_end + $ac_max_sed_cmds`
852e5f18 7627 fi
cac3d6c4
CM
7628done
7629if test -z "$ac_sed_cmds"; then
7630 ac_sed_cmds=cat
7631fi
7632EOF
7633
7634cat >> $CONFIG_STATUS <<EOF
252b5132 7635
cac3d6c4
CM
7636CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7637EOF
7638cat >> $CONFIG_STATUS <<\EOF
7639for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
a0da8069 7640 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
cac3d6c4
CM
7641 case "$ac_file" in
7642 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7643 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7644 *) ac_file_in="${ac_file}.in" ;;
a0da8069 7645 esac
252b5132 7646
cac3d6c4 7647 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
376a0e54 7648
cac3d6c4
CM
7649 # Remove last slash and all that follows it. Not all systems have dirname.
7650 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7651 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7652 # The file is in a subdirectory.
7653 test ! -d "$ac_dir" && mkdir "$ac_dir"
7654 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7655 # A "../" for each directory in $ac_dir_suffix.
7656 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7657 else
7658 ac_dir_suffix= ac_dots=
7659 fi
252b5132 7660
cac3d6c4
CM
7661 case "$ac_given_srcdir" in
7662 .) srcdir=.
7663 if test -z "$ac_dots"; then top_srcdir=.
7664 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7665 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
a0da8069 7666 *) # Relative path.
cac3d6c4
CM
7667 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7668 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7669 esac
252b5132 7670
cac3d6c4
CM
7671 case "$ac_given_INSTALL" in
7672 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7673 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7674 esac
252b5132 7675
cac3d6c4
CM
7676 echo creating "$ac_file"
7677 rm -f "$ac_file"
7678 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7679 case "$ac_file" in
7680 *Makefile*) ac_comsub="1i\\
7681# $configure_input" ;;
7682 *) ac_comsub= ;;
a0da8069 7683 esac
252b5132 7684
cac3d6c4
CM
7685 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7686 sed -e "$ac_comsub
7687s%@configure_input@%$configure_input%g
7688s%@srcdir@%$srcdir%g
7689s%@top_srcdir@%$top_srcdir%g
7690s%@INSTALL@%$INSTALL%g
7691" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7692fi; done
7693rm -f conftest.s*
c148b4cb 7694
cac3d6c4
CM
7695EOF
7696cat >> $CONFIG_STATUS <<EOF
c148b4cb 7697
cac3d6c4
CM
7698EOF
7699cat >> $CONFIG_STATUS <<\EOF
c148b4cb 7700
cac3d6c4
CM
7701exit 0
7702EOF
c148b4cb 7703chmod +x $CONFIG_STATUS
cac3d6c4
CM
7704rm -fr confdefs* $ac_clean_files
7705test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
c148b4cb 7706
This page took 0.770628 seconds and 4 git commands to generate.