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