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