]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - configure
2005-10-03 H.J. Lu <hongjiu.lu@intel.com>
[thirdparty/binutils-gdb.git] / configure
CommitLineData
a0da8069 1#! /bin/sh
252b5132 2
a0da8069
NN
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
a2592b1b
DD
14ac_help="$ac_help
15 --enable-libada Builds libada directory"
5f128533
KH
16ac_help="$ac_help
17 --enable-libssp Builds libssp directory"
11b04d1f
DD
18ac_help="$ac_help
19 --with-mpfr-dir=PATH Specify source directory for MPFR library"
20ac_help="$ac_help
21 --with-mpfr=PATH Specify directory for installed MPFR library"
4b1cb4fe
DD
22ac_help="$ac_help
23 --with-gmp-dir=PATH Specify source directory for GMP library"
24ac_help="$ac_help
25 --with-gmp=PATH Specify directory for installed GMP library"
a19b6204
MM
26ac_help="$ac_help
27 --with-build-sysroot=sysroot
28 use sysroot as the system root during the build"
319cab08 29ac_help="$ac_help
9cb3fa6f 30 --enable-bootstrap[=lean] Enable bootstrapping [no]"
e6bfb94a 31ac_help="$ac_help
1047cb91
DD
32 --enable-serial-[{host,target,build}-]configure
33 Force sequential configuration of
e6bfb94a 34 sub-packages for the host, target or build
1047cb91 35 machine, or all sub-packages"
3d5e36ae
AO
36ac_help="$ac_help
37 --enable-maintainer-mode enable make rules and dependencies not useful
38 (and sometimes confusing) to the casual installer"
1d39f329
NN
39ac_help="$ac_help
40 --enable-werror enable -Werror in bootstrap stage2 and later"
a0da8069
NN
41
42# Initialize some variables set by options.
43# The variables have the same names as the options, with
44# dashes changed to underlines.
45build=NONE
46cache_file=./config.cache
47exec_prefix=NONE
48host=NONE
49no_create=
50nonopt=NONE
51no_recursion=
52prefix=NONE
53program_prefix=NONE
54program_suffix=NONE
55program_transform_name=s,x,x,
56silent=
57site=
58srcdir=
59target=NONE
60verbose=
61x_includes=NONE
62x_libraries=NONE
63bindir='${exec_prefix}/bin'
64sbindir='${exec_prefix}/sbin'
65libexecdir='${exec_prefix}/libexec'
66datadir='${prefix}/share'
67sysconfdir='${prefix}/etc'
68sharedstatedir='${prefix}/com'
69localstatedir='${prefix}/var'
70libdir='${exec_prefix}/lib'
71includedir='${prefix}/include'
72oldincludedir='/usr/include'
73infodir='${prefix}/info'
74mandir='${prefix}/man'
252b5132 75
a0da8069
NN
76# Initialize some other variables.
77subdirs=
78MFLAGS= MAKEFLAGS=
79SHELL=${CONFIG_SHELL-/bin/sh}
80# Maximum number of lines to put in a shell here document.
81ac_max_here_lines=12
252b5132 82
a0da8069
NN
83ac_prev=
84for ac_option
85do
252b5132 86
a0da8069
NN
87 # If the previous option needs an argument, assign it.
88 if test -n "$ac_prev"; then
89 eval "$ac_prev=\$ac_option"
90 ac_prev=
91 continue
92 fi
252b5132 93
a0da8069
NN
94 case "$ac_option" in
95 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
96 *) ac_optarg= ;;
97 esac
98
99 # Accept the important Cygnus configure options, so we can diagnose typos.
100
101 case "$ac_option" in
102
103 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 ac_prev=bindir ;;
105 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
106 bindir="$ac_optarg" ;;
107
108 -build | --build | --buil | --bui | --bu)
109 ac_prev=build ;;
110 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
111 build="$ac_optarg" ;;
112
113 -cache-file | --cache-file | --cache-fil | --cache-fi \
114 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
115 ac_prev=cache_file ;;
116 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
117 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
118 cache_file="$ac_optarg" ;;
119
120 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 ac_prev=datadir ;;
122 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 | --da=*)
124 datadir="$ac_optarg" ;;
125
126 -disable-* | --disable-*)
127 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
128 # Reject names that are not valid shell variable names.
129 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
130 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 fi
132 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133 eval "enable_${ac_feature}=no" ;;
134
135 -enable-* | --enable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
137 # Reject names that are not valid shell variable names.
138 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 case "$ac_option" in
143 *=*) ;;
144 *) ac_optarg=yes ;;
145 esac
146 eval "enable_${ac_feature}='$ac_optarg'" ;;
147
148 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
149 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
150 | --exec | --exe | --ex)
151 ac_prev=exec_prefix ;;
152 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
153 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
154 | --exec=* | --exe=* | --ex=*)
155 exec_prefix="$ac_optarg" ;;
156
157 -gas | --gas | --ga | --g)
158 # Obsolete; use --with-gas.
159 with_gas=yes ;;
160
161 -help | --help | --hel | --he)
162 # Omit some internal or obsolete options to make the list less imposing.
163 # This message is too long to be a string in the A/UX 3.1 sh.
164 cat << EOF
165Usage: configure [options] [host]
166Options: [defaults in brackets after descriptions]
167Configuration:
168 --cache-file=FILE cache test results in FILE
169 --help print this message
170 --no-create do not create output files
171 --quiet, --silent do not print \`checking...' messages
172 --version print the version of autoconf that created configure
173Directory and file names:
174 --prefix=PREFIX install architecture-independent files in PREFIX
175 [$ac_default_prefix]
176 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
177 [same as prefix]
178 --bindir=DIR user executables in DIR [EPREFIX/bin]
179 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
180 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
181 --datadir=DIR read-only architecture-independent data in DIR
182 [PREFIX/share]
183 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
184 --sharedstatedir=DIR modifiable architecture-independent data in DIR
185 [PREFIX/com]
186 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
187 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
188 --includedir=DIR C header files in DIR [PREFIX/include]
189 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
190 --infodir=DIR info documentation in DIR [PREFIX/info]
191 --mandir=DIR man documentation in DIR [PREFIX/man]
192 --srcdir=DIR find the sources in DIR [configure dir or ..]
193 --program-prefix=PREFIX prepend PREFIX to installed program names
194 --program-suffix=SUFFIX append SUFFIX to installed program names
195 --program-transform-name=PROGRAM
196 run sed PROGRAM on installed program names
197EOF
198 cat << EOF
199Host type:
200 --build=BUILD configure for building on BUILD [BUILD=HOST]
201 --host=HOST configure for HOST [guessed]
202 --target=TARGET configure for TARGET [TARGET=HOST]
203Features and packages:
204 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
205 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
206 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
207 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
208 --x-includes=DIR X include files are in DIR
209 --x-libraries=DIR X library files are in DIR
210EOF
211 if test -n "$ac_help"; then
212 echo "--enable and --with options recognized:$ac_help"
213 fi
214 exit 0 ;;
215
216 -host | --host | --hos | --ho)
217 ac_prev=host ;;
218 -host=* | --host=* | --hos=* | --ho=*)
219 host="$ac_optarg" ;;
220
221 -includedir | --includedir | --includedi | --included | --include \
222 | --includ | --inclu | --incl | --inc)
223 ac_prev=includedir ;;
224 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
225 | --includ=* | --inclu=* | --incl=* | --inc=*)
226 includedir="$ac_optarg" ;;
227
228 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 ac_prev=infodir ;;
230 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
231 infodir="$ac_optarg" ;;
232
233 -libdir | --libdir | --libdi | --libd)
234 ac_prev=libdir ;;
235 -libdir=* | --libdir=* | --libdi=* | --libd=*)
236 libdir="$ac_optarg" ;;
237
238 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
239 | --libexe | --libex | --libe)
240 ac_prev=libexecdir ;;
241 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
242 | --libexe=* | --libex=* | --libe=*)
243 libexecdir="$ac_optarg" ;;
244
245 -localstatedir | --localstatedir | --localstatedi | --localstated \
246 | --localstate | --localstat | --localsta | --localst \
247 | --locals | --local | --loca | --loc | --lo)
248 ac_prev=localstatedir ;;
249 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
250 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
251 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
252 localstatedir="$ac_optarg" ;;
253
254 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 ac_prev=mandir ;;
256 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
257 mandir="$ac_optarg" ;;
258
259 -nfp | --nfp | --nf)
260 # Obsolete; use --without-fp.
261 with_fp=no ;;
262
263 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264 | --no-cr | --no-c)
265 no_create=yes ;;
266
267 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
269 no_recursion=yes ;;
270
271 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
272 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
273 | --oldin | --oldi | --old | --ol | --o)
274 ac_prev=oldincludedir ;;
275 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
276 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
277 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
278 oldincludedir="$ac_optarg" ;;
279
280 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 ac_prev=prefix ;;
282 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
283 prefix="$ac_optarg" ;;
284
285 -program-prefix | --program-prefix | --program-prefi | --program-pref \
286 | --program-pre | --program-pr | --program-p)
287 ac_prev=program_prefix ;;
288 -program-prefix=* | --program-prefix=* | --program-prefi=* \
289 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
290 program_prefix="$ac_optarg" ;;
291
292 -program-suffix | --program-suffix | --program-suffi | --program-suff \
293 | --program-suf | --program-su | --program-s)
294 ac_prev=program_suffix ;;
295 -program-suffix=* | --program-suffix=* | --program-suffi=* \
296 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
297 program_suffix="$ac_optarg" ;;
298
299 -program-transform-name | --program-transform-name \
300 | --program-transform-nam | --program-transform-na \
301 | --program-transform-n | --program-transform- \
302 | --program-transform | --program-transfor \
303 | --program-transfo | --program-transf \
304 | --program-trans | --program-tran \
305 | --progr-tra | --program-tr | --program-t)
306 ac_prev=program_transform_name ;;
307 -program-transform-name=* | --program-transform-name=* \
308 | --program-transform-nam=* | --program-transform-na=* \
309 | --program-transform-n=* | --program-transform-=* \
310 | --program-transform=* | --program-transfor=* \
311 | --program-transfo=* | --program-transf=* \
312 | --program-trans=* | --program-tran=* \
313 | --progr-tra=* | --program-tr=* | --program-t=*)
314 program_transform_name="$ac_optarg" ;;
315
316 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
317 | -silent | --silent | --silen | --sile | --sil)
318 silent=yes ;;
319
320 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 ac_prev=sbindir ;;
322 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 | --sbi=* | --sb=*)
324 sbindir="$ac_optarg" ;;
325
326 -sharedstatedir | --sharedstatedir | --sharedstatedi \
327 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
328 | --sharedst | --shareds | --shared | --share | --shar \
329 | --sha | --sh)
330 ac_prev=sharedstatedir ;;
331 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
332 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
333 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 | --sha=* | --sh=*)
335 sharedstatedir="$ac_optarg" ;;
336
337 -site | --site | --sit)
338 ac_prev=site ;;
339 -site=* | --site=* | --sit=*)
340 site="$ac_optarg" ;;
341
342 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 ac_prev=srcdir ;;
344 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
345 srcdir="$ac_optarg" ;;
346
347 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
348 | --syscon | --sysco | --sysc | --sys | --sy)
349 ac_prev=sysconfdir ;;
350 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
351 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
352 sysconfdir="$ac_optarg" ;;
353
354 -target | --target | --targe | --targ | --tar | --ta | --t)
355 ac_prev=target ;;
356 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
357 target="$ac_optarg" ;;
358
359 -v | -verbose | --verbose | --verbos | --verbo | --verb)
360 verbose=yes ;;
361
362 -version | --version | --versio | --versi | --vers)
363 echo "configure generated by autoconf version 2.13"
364 exit 0 ;;
365
366 -with-* | --with-*)
367 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
368 # Reject names that are not valid shell variable names.
369 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 fi
372 ac_package=`echo $ac_package| sed 's/-/_/g'`
373 case "$ac_option" in
374 *=*) ;;
375 *) ac_optarg=yes ;;
376 esac
377 eval "with_${ac_package}='$ac_optarg'" ;;
378
379 -without-* | --without-*)
380 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
381 # Reject names that are not valid shell variable names.
382 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
383 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
384 fi
385 ac_package=`echo $ac_package| sed 's/-/_/g'`
386 eval "with_${ac_package}=no" ;;
387
388 --x)
389 # Obsolete; use --with-x.
390 with_x=yes ;;
391
392 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
393 | --x-incl | --x-inc | --x-in | --x-i)
394 ac_prev=x_includes ;;
395 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
396 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
397 x_includes="$ac_optarg" ;;
398
399 -x-libraries | --x-libraries | --x-librarie | --x-librari \
400 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
401 ac_prev=x_libraries ;;
402 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
403 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
404 x_libraries="$ac_optarg" ;;
405
406 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
407 ;;
408
409 *)
410 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
411 echo "configure: warning: $ac_option: invalid host type" 1>&2
412 fi
413 if test "x$nonopt" != xNONE; then
414 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
415 fi
416 nonopt="$ac_option"
417 ;;
418
419 esac
420done
421
422if test -n "$ac_prev"; then
423 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
424fi
425
426trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427
428# File descriptor usage:
429# 0 standard input
430# 1 file creation
431# 2 errors and warnings
432# 3 some systems may open it to /dev/tty
433# 4 used on the Kubota Titan
434# 6 checking for... messages and results
435# 5 compiler messages saved in config.log
436if test "$silent" = yes; then
437 exec 6>/dev/null
438else
439 exec 6>&1
440fi
441exec 5>./config.log
442
443echo "\
444This file contains any messages produced by compilers while
445running configure, to aid debugging if configure makes a mistake.
446" 1>&5
447
448# Strip out --no-create and --no-recursion so they do not pile up.
449# Also quote any args containing shell metacharacters.
450ac_configure_args=
451for ac_arg
452do
453 case "$ac_arg" in
454 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
455 | --no-cr | --no-c) ;;
456 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
457 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
458 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
459 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
460 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
461 esac
462done
463
464# NLS nuisances.
465# Only set these to C if already set. These must not be set unconditionally
466# because not all systems understand e.g. LANG=C (notably SCO).
467# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
468# Non-C LC_CTYPE values break the ctype check.
469if test "${LANG+set}" = set; then LANG=C; export LANG; fi
470if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
471if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
472if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
473
474# confdefs.h avoids OS command line length limits that DEFS can exceed.
475rm -rf conftest* confdefs.h
476# AIX cpp loses on an empty file, so make sure it contains at least a newline.
477echo > confdefs.h
478
479# A filename unique to this package, relative to the directory that
480# configure is in, which we can look for to find out if srcdir is correct.
481ac_unique_file=move-if-change
482
483# Find the source files, if location was not specified.
484if test -z "$srcdir"; then
485 ac_srcdir_defaulted=yes
486 # Try the directory containing this script, then its parent.
487 ac_prog=$0
488 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
489 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
490 srcdir=$ac_confdir
491 if test ! -r $srcdir/$ac_unique_file; then
492 srcdir=..
493 fi
494else
495 ac_srcdir_defaulted=no
496fi
497if test ! -r $srcdir/$ac_unique_file; then
498 if test "$ac_srcdir_defaulted" = yes; then
499 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
500 else
501 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
502 fi
503fi
504srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
505
506# Prefer explicitly selected file to automatically selected ones.
e3c770b1
EB
507if test -z "$CONFIG_SITE"; then
508 if test "x$prefix" != xNONE; then
509 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
510 else
511 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
a0da8069
NN
512 fi
513fi
514for ac_site_file in $CONFIG_SITE; do
515 if test -r "$ac_site_file"; then
516 echo "loading site script $ac_site_file"
517 . "$ac_site_file"
518 fi
519done
520
521if test -r "$cache_file"; then
522 echo "loading cache $cache_file"
523 . $cache_file
524else
525 echo "creating cache $cache_file"
526 > $cache_file
527fi
528
529ac_ext=c
530# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
531ac_cpp='$CPP $CPPFLAGS'
532ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
533ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
534cross_compiling=$ac_cv_prog_cc_cross
535
536ac_exeext=
537ac_objext=o
538if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='
542' ac_t=' '
543 else
544 ac_n=-n ac_c= ac_t=
545 fi
546else
547 ac_n= ac_c='\c' ac_t=
548fi
549
550
75778ec4 551
a0da8069 552ac_aux_dir=
315b3b02 553for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
a0da8069
NN
554 if test -f $ac_dir/install-sh; then
555 ac_aux_dir=$ac_dir
556 ac_install_sh="$ac_aux_dir/install-sh -c"
557 break
558 elif test -f $ac_dir/install.sh; then
559 ac_aux_dir=$ac_dir
560 ac_install_sh="$ac_aux_dir/install.sh -c"
561 break
562 fi
563done
564if test -z "$ac_aux_dir"; then
565 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
566fi
567ac_config_guess=$ac_aux_dir/config.guess
568ac_config_sub=$ac_aux_dir/config.sub
569ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
570
571
572# Do some error checking and defaulting for the host and target type.
573# The inputs are:
574# configure --host=HOST --target=TARGET --build=BUILD NONOPT
252b5132 575#
a0da8069
NN
576# The rules are:
577# 1. You are not allowed to specify --host, --target, and nonopt at the
578# same time.
579# 2. Host defaults to nonopt.
580# 3. If nonopt is not specified, then host defaults to the current host,
581# as determined by config.guess.
582# 4. Target and build default to nonopt.
583# 5. If nonopt is not specified, then target and build default to host.
584
585# The aliases save the names the user supplied, while $host etc.
586# will get canonicalized.
587case $host---$target---$nonopt in
588NONE---*---* | *---NONE---* | *---*---NONE) ;;
589*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
590esac
591
592
593# Make sure we can run config.sub.
594if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
595else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
596fi
597
598echo $ac_n "checking host system type""... $ac_c" 1>&6
a19b6204 599echo "configure:600: checking host system type" >&5
a0da8069
NN
600
601host_alias=$host
602case "$host_alias" in
603NONE)
604 case $nonopt in
605 NONE)
606 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
607 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
608 fi ;;
609 *) host_alias=$nonopt ;;
610 esac ;;
611esac
612
613host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
614host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
615host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
616host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
617echo "$ac_t""$host" 1>&6
618
619echo $ac_n "checking target system type""... $ac_c" 1>&6
a19b6204 620echo "configure:621: checking target system type" >&5
a0da8069
NN
621
622target_alias=$target
623case "$target_alias" in
624NONE)
625 case $nonopt in
626 NONE) target_alias=$host_alias ;;
627 *) target_alias=$nonopt ;;
628 esac ;;
629esac
630
631target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
632target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
633target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
634target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
635echo "$ac_t""$target" 1>&6
636
637echo $ac_n "checking build system type""... $ac_c" 1>&6
a19b6204 638echo "configure:639: checking build system type" >&5
a0da8069
NN
639
640build_alias=$build
641case "$build_alias" in
642NONE)
643 case $nonopt in
644 NONE) build_alias=$host_alias ;;
645 *) build_alias=$nonopt ;;
646 esac ;;
647esac
648
649build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
650build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
651build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
652build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
653echo "$ac_t""$build" 1>&6
654
655test "$host_alias" != "$target_alias" &&
656 test "$program_prefix$program_suffix$program_transform_name" = \
657 NONENONEs,x,x, &&
658 program_prefix=${target_alias}-
659
660if test "$program_transform_name" = s,x,x,; then
661 program_transform_name=
662else
663 # Double any \ or $. echo might interpret backslashes.
664 cat <<\EOF_SED > conftestsed
665s,\\,\\\\,g; s,\$,$$,g
666EOF_SED
667 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
668 rm -f conftestsed
669fi
670test "$program_prefix" != NONE &&
671 program_transform_name="s,^,${program_prefix},; $program_transform_name"
672# Use a double $ so make ignores it.
673test "$program_suffix" != NONE &&
674 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
675
676# sed with no file args requires a program.
677test "$program_transform_name" = "" && program_transform_name="s,x,x,"
678
679
e5c3f801
NN
680# Get 'install' or 'install-sh' and its variants.
681# Find a good install program. We prefer a C program (faster),
682# so one script is as good as another. But avoid the broken or
683# incompatible versions:
684# SysV /etc/install, /usr/sbin/install
685# SunOS /usr/etc/install
686# IRIX /sbin/install
687# AIX /bin/install
688# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
689# AFS /usr/afsws/bin/install, which mishandles nonexistent args
690# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
691# ./install, which can be erroneously created by make from ./install.sh.
692echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
a19b6204 693echo "configure:694: checking for a BSD compatible install" >&5
e5c3f801
NN
694if test -z "$INSTALL"; then
695if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
696 echo $ac_n "(cached) $ac_c" 1>&6
697else
698 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
699 for ac_dir in $PATH; do
700 # Account for people who put trailing slashes in PATH elements.
701 case "$ac_dir/" in
702 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
703 *)
704 # OSF1 and SCO ODT 3.0 have their own names for install.
705 # Don't use installbsd from OSF since it installs stuff as root
706 # by default.
707 for ac_prog in ginstall scoinst install; do
708 if test -f $ac_dir/$ac_prog; then
709 if test $ac_prog = install &&
710 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
711 # AIX install. It has an incompatible calling convention.
712 :
713 else
714 ac_cv_path_install="$ac_dir/$ac_prog -c"
715 break 2
716 fi
717 fi
718 done
719 ;;
720 esac
721 done
722 IFS="$ac_save_IFS"
723
724fi
725 if test "${ac_cv_path_install+set}" = set; then
726 INSTALL="$ac_cv_path_install"
727 else
728 # As a last resort, use the slow shell script. We don't cache a
729 # path for INSTALL within a source directory, because that will
730 # break other packages using the cache if that directory is
731 # removed, or if the path is relative.
732 INSTALL="$ac_install_sh"
733 fi
734fi
735echo "$ac_t""$INSTALL" 1>&6
736
737# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
738# It thinks the first close brace ends the variable substitution.
739test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
740
741test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
742
743test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
744
656fdd47 745echo $ac_n "checking whether ln works""... $ac_c" 1>&6
a19b6204 746echo "configure:747: checking whether ln works" >&5
656fdd47
PB
747if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
748 echo $ac_n "(cached) $ac_c" 1>&6
749else
750 rm -f conftestdata_t
751echo >conftestdata_f
752if ln conftestdata_f conftestdata_t 2>/dev/null
753then
754 acx_cv_prog_LN=ln
755else
756 acx_cv_prog_LN=no
757fi
758rm -f conftestdata_f conftestdata_t
759
760fi
761if test $acx_cv_prog_LN = no; then
762 LN="cp"
763 echo "$ac_t""no, using $LN" 1>&6
764else
765 LN="$acx_cv_prog_LN"
766 echo "$ac_t""yes" 1>&6
767fi
768
dfdffa2c 769echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
a19b6204 770echo "configure:771: checking whether ln -s works" >&5
dfdffa2c
PB
771if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 rm -f conftestdata
775if ln -s X conftestdata 2>/dev/null
776then
777 rm -f conftestdata
778 ac_cv_prog_LN_S="ln -s"
779else
780 ac_cv_prog_LN_S=ln
781fi
782fi
783LN_S="$ac_cv_prog_LN_S"
784if test "$ac_cv_prog_LN_S" = "ln -s"; then
785 echo "$ac_t""yes" 1>&6
786else
787 echo "$ac_t""no" 1>&6
788fi
789
e5c3f801 790
252b5132 791### we might need to use some other shell than /bin/sh for running subshells
252b5132
RH
792### If we are on Windows, search for the shell. This will permit people
793### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
794### without also having to set CONFIG_SHELL. This code will work when
795### using bash, which sets OSTYPE.
796case "${OSTYPE}" in
797*win32*)
a0da8069
NN
798 if test x${CONFIG_SHELL} = x ; then
799 if test ! -f /bin/sh ; then
800 if test x${SHELL} != x && test -f ${SHELL} ; then
252b5132
RH
801 CONFIG_SHELL=${SHELL}
802 export CONFIG_SHELL
803 else
804 for prog in sh sh.exe bash bash.exe; do
805 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
806 for dir in $PATH; do
807 test -z "$dir" && dir=.
808 if test -f $dir/$prog; then
809 CONFIG_SHELL=$dir/$prog
810 export CONFIG_SHELL
811 break
812 fi
813 done
814 IFS="$save_ifs"
815 test -n "${CONFIG_SHELL}" && break
816 done
817 fi
818 fi
819 fi
820 ;;
821esac
822
823config_shell=${CONFIG_SHELL-/bin/sh}
824
252b5132
RH
825progname=$0
826# if PWD already has a value, it is probably wrong.
a0da8069 827if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
252b5132 828
d2cc0e0d 829# Export original configure arguments for use by sub-configures. These
8ff944f6
DJ
830# will be expanded by make, so quote '$'.
831tmp="$progname $@"
832sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
833$tmp
d2cc0e0d 834EOF_SED
8ff944f6
DJ
835TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
836rm -f conftestsed.out
586c0873 837
75205f78 838
a0da8069 839moveifchange=${srcdir}/move-if-change
252b5132 840
0fdbe983
DJ
841srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
842
843# We pass INSTALL explicitly to sub-makes. Make sure that it is not
844# a relative path.
845if test "$INSTALL" = "${srcdir}/install-sh -c"; then
846 INSTALL="${srcpwd}/install-sh -c"
847fi
848
a0da8069
NN
849# Set srcdir to "." if that's what it is.
850# This is important for multilib support.
851pwd=`${PWDCMD-pwd}`
a0da8069
NN
852if test "${pwd}" = "${srcpwd}" ; then
853 srcdir=.
252b5132
RH
854fi
855
a0da8069 856topsrcdir=$srcpwd
252b5132 857
a0da8069 858extra_host_args=
afefada0 859
a0da8069
NN
860### To add a new directory to the tree, first choose whether it is a target
861### or a host dependent tool. Then put it into the appropriate list
862### (library or tools, host or target), doing a dependency sort.
252b5132 863
a0da8069
NN
864# Subdirs will be configured in the order listed in build_configdirs,
865# configdirs, or target_configdirs; see the serialization section below.
252b5132 866
a0da8069
NN
867# Dependency sorting is only needed when *configuration* must be done in
868# a particular order. In all cases a dependency should be specified in
869# the Makefile, whether or not it's implicitly specified here.
252b5132 870
a0da8069
NN
871# Double entries in build_configdirs, configdirs, or target_configdirs may
872# cause circular dependencies and break everything horribly.
252b5132 873
6a9cf61e
PB
874# these library is used by various programs built for the build
875# environment
876#
877build_libs="build-libiberty"
878
879# these tools are built for the build environment
ee025550 880build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
6a9cf61e 881
a0da8069
NN
882# these libraries are used by various programs built for the host environment
883#
be75bbe1 884host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp"
a0da8069 885
a0da8069
NN
886# these tools are built for the host environment
887# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
888# know that we are building the simulator.
889# binutils, gas and ld appear in that order because it makes sense to run
890# "make check" in that particular order.
b00612cc 891host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
a0da8069
NN
892
893# libgcj represents the runtime libraries only used by gcj.
894libgcj="target-libffi \
895 target-boehm-gc \
896 target-zlib \
897 target-qthreads \
898 target-libjava"
899
900# these libraries are built for the target environment, and are built after
901# the host libraries and the host tools (which may be a cross compiler)
902#
9c14acb8 903target_libraries="target-libiberty \
a0da8069
NN
904 target-libgloss \
905 target-newlib \
b9459e83 906 target-libstdc++-v3 \
4b1cb4fe 907 target-libmudflap \
bb780410 908 target-libssp \
4b1cb4fe 909 target-libgfortran \
83326456 910 ${libgcj} \
a2592b1b
DD
911 target-libobjc \
912 target-libada"
a0da8069 913
9c14acb8
NN
914# these tools are built using the target libraries, and are intended to
915# run only in the target environment
a0da8069 916#
9c14acb8 917# note: any program that *uses* libraries that are in the "target_libraries"
a0da8069
NN
918# list belongs in this list. those programs are also very likely
919# candidates for the "native_only" list which follows
920#
a3dd767d 921target_tools="target-examples target-groff target-gperf target-rda"
252b5132 922
a0da8069 923################################################################################
252b5132 924
a0da8069
NN
925## All tools belong in one of the four categories, and are assigned above
926## We assign ${configdirs} this way to remove all embedded newlines. This
927## is important because configure will choke if they ever get through.
928## ${configdirs} is directories we build using the host tools.
929## ${target_configdirs} is directories we build using the target tools.
a0da8069 930configdirs=`echo ${host_libs} ${host_tools}`
9c14acb8 931target_configdirs=`echo ${target_libraries} ${target_tools}`
ee025550 932build_configdirs=`echo ${build_libs} ${build_tools}`
dd12c3a8 933
a0da8069 934################################################################################
252b5132 935
a0da8069 936srcname="gnu development package"
252b5132 937
a0da8069
NN
938# This gets set non-empty for some net releases of packages.
939appdirs=""
252b5132 940
a0da8069
NN
941# Define is_cross_compiler to save on calls to 'test'.
942is_cross_compiler=
943if test x"${host}" = x"${target}" ; then
944 is_cross_compiler=no
252b5132 945else
a0da8069
NN
946 is_cross_compiler=yes
947fi
252b5132 948
9175bfc0 949# Find the build and target subdir names.
dd12c3a8
NN
950 case ${build_alias} in
951 "") build_noncanonical=${build} ;;
952 *) build_noncanonical=${build_alias} ;;
953esac
954
955 case ${host_alias} in
956 "") host_noncanonical=${build_noncanonical} ;;
957 *) host_noncanonical=${host_alias} ;;
958esac
959
960 case ${target_alias} in
961 "") target_noncanonical=${host_noncanonical} ;;
962 *) target_noncanonical=${target_alias} ;;
963esac
964
965 # Prefix 'build-' so this never conflicts with target_subdir.
966build_subdir="build-${build_noncanonical}"
b00612cc
PB
967# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
968if ( test $srcdir = . && test -d gcc ) \
969 || test -d $srcdir/../host-${host_noncanonical}; then
970 host_subdir="host-${host_noncanonical}"
971else
972 host_subdir=.
973fi
dd12c3a8
NN
974# No prefix.
975target_subdir=${target_noncanonical}
976
252b5132 977
a0da8069
NN
978# Skipdirs are removed silently.
979skipdirs=
980# Noconfigdirs are removed loudly.
981noconfigdirs=""
252b5132 982
a0da8069
NN
983use_gnu_ld=
984# Make sure we don't let GNU ld be added if we didn't want it.
985if test x$with_gnu_ld = xno ; then
986 use_gnu_ld=no
987 noconfigdirs="$noconfigdirs ld"
252b5132
RH
988fi
989
a0da8069
NN
990use_gnu_as=
991# Make sure we don't let GNU as be added if we didn't want it.
992if test x$with_gnu_as = xno ; then
993 use_gnu_as=no
994 noconfigdirs="$noconfigdirs gas"
252b5132
RH
995fi
996
a0da8069
NN
997# some tools are so dependent upon X11 that if we're not building with X,
998# it's not even worth trying to configure, much less build, that tool.
252b5132 999
a0da8069
NN
1000case ${with_x} in
1001 yes | "") ;; # the default value for this tree is that X11 is available
1002 no)
675c6968 1003 skipdirs="${skipdirs} tk itcl libgui"
a0da8069
NN
1004 # We won't be able to build gdbtk without X.
1005 enable_gdbtk=no
1006 ;;
1007 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1008esac
252b5132 1009
a0da8069
NN
1010# Some tools are only suitable for building in a "native" situation.
1011# Remove these if host!=target.
91f0e695 1012native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
252b5132 1013
a0da8069
NN
1014# Similarly, some are only suitable for cross toolchains.
1015# Remove these if host=target.
1016cross_only="target-libgloss target-newlib target-opcodes"
1017
1018case $is_cross_compiler in
1019 no) skipdirs="${skipdirs} ${cross_only}" ;;
1020 yes) skipdirs="${skipdirs} ${native_only}" ;;
1021esac
252b5132 1022
a0da8069
NN
1023# If both --with-headers and --with-libs are specified, default to
1024# --without-newlib.
32be62b5
RS
1025if test x"${with_headers}" != x && test x"${with_headers}" != xno \
1026 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
a0da8069
NN
1027 if test x"${with_newlib}" = x ; then
1028 with_newlib=no
1029 fi
252b5132
RH
1030fi
1031
a0da8069
NN
1032# Recognize --with-newlib/--without-newlib.
1033case ${with_newlib} in
1034 no) skipdirs="${skipdirs} target-newlib" ;;
1035 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1036esac
252b5132 1037
a0da8069 1038# Configure extra directories which are host specific
252b5132 1039
a0da8069
NN
1040case "${host}" in
1041 *-cygwin*)
1042 configdirs="$configdirs libtermcap" ;;
1043esac
252b5132 1044
59f7ec45
HPN
1045# A target can indicate whether a language isn't supported for some reason.
1046# Only spaces may be used in this macro; not newlines or tabs.
1047unsupported_languages=
1048
a0da8069
NN
1049# Remove more programs from consideration, based on the host or
1050# target this usually means that a port of the program doesn't
1051# exist yet.
252b5132 1052
a0da8069
NN
1053case "${host}" in
1054 hppa*64*-*-*)
1055 noconfigdirs="$noconfigdirs byacc"
1056 ;;
ec11bdc6 1057 i[3456789]86-*-vsta)
675c6968 1058 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
a0da8069 1059 ;;
ec11bdc6 1060 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
675c6968 1061 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
bba45b8b 1062 ;;
ec11bdc6 1063 i[3456789]86-*-mingw32*)
675c6968 1064 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
a92834c8 1065 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
bba45b8b 1066 ;;
ec11bdc6 1067 i[3456789]86-*-beos*)
675c6968 1068 noconfigdirs="$noconfigdirs tk itcl libgui gdb"
bba45b8b 1069 ;;
a0da8069 1070 *-*-cygwin*)
a92834c8 1071 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
a0da8069
NN
1072 ;;
1073 *-*-netbsd*)
a92834c8 1074 noconfigdirs="$noconfigdirs rcs"
a0da8069
NN
1075 ;;
1076 ppc*-*-pe)
675c6968 1077 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
a0da8069
NN
1078 ;;
1079 powerpc-*-beos*)
675c6968 1080 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
a0da8069 1081 ;;
a0da8069 1082esac
252b5132 1083
4b1cb4fe 1084
a2592b1b
DD
1085# Check whether --enable-libada or --disable-libada was given.
1086if test "${enable_libada+set}" = set; then
1087 enableval="$enable_libada"
1088 ENABLE_LIBADA=$enableval
1089else
1090 ENABLE_LIBADA=yes
1091fi
1092
a2592b1b
DD
1093if test "${ENABLE_LIBADA}" != "yes" ; then
1094 noconfigdirs="$noconfigdirs target-libada"
b00612cc 1095 noconfigdirs="$noconfigdirs gnattools"
a2592b1b
DD
1096fi
1097
5f128533
KH
1098# Check whether --enable-libssp or --disable-libssp was given.
1099if test "${enable_libssp+set}" = set; then
1100 enableval="$enable_libssp"
1101 ENABLE_LIBSSP=$enableval
1102else
1103 ENABLE_LIBSSP=yes
1104fi
1105
1106if test "${ENABLE_LIBSSP}" != "yes" ; then
bb780410 1107 noconfigdirs="$noconfigdirs target-libssp"
5f128533
KH
1108fi
1109
a0da8069
NN
1110# Save it here so that, even in case of --enable-libgcj, if the Java
1111# front-end isn't enabled, we still get libgcj disabled.
1112libgcj_saved=$libgcj
1113case $enable_libgcj in
1114yes)
1115 # If we reset it here, it won't get added to noconfigdirs in the
1116 # target-specific build rules, so it will be forcibly enabled
1117 # (unless the Java language itself isn't enabled).
1118 libgcj=
1119 ;;
1120no)
1121 # Make sure we get it printed in the list of not supported target libs.
1122 noconfigdirs="$noconfigdirs ${libgcj}"
1123 ;;
1124esac
252b5132 1125
4b1cb4fe
DD
1126
1127# Allow --disable-libmudflap to exclude target-libmudflap
1128case $enable_libmudflap in
3e707e94 1129yes)
4b1cb4fe
DD
1130 ;;
1131no)
1132 noconfigdirs="$noconfigdirs target-libmudflap"
1133 ;;
3e707e94
PB
1134"")
1135 case "${target}" in
3d6dfe0f
NN
1136 *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
1137 # Enable libmudflap by default in GNU and friends.
3e707e94
PB
1138 ;;
1139 *-*-freebsd*)
1140 # Enable libmudflap by default in FreeBSD.
1141 ;;
1142 *)
1143 # Disable it by default everywhere else.
1144 noconfigdirs="$noconfigdirs target-libmudflap"
1145 ;;
1146 esac
4b1cb4fe
DD
1147esac
1148
1149
a0da8069
NN
1150case "${target}" in
1151 *-*-chorusos)
1152 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1153 ;;
04d1ab34 1154 powerpc-*-darwin*)
b3f16a9b 1155 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
4e3fc8e5 1156 noconfigdirs="$noconfigdirs sim target-rda"
b3f16a9b 1157 ;;
04d1ab34 1158 *-*-darwin*)
d320aacb 1159 noconfigdirs="$noconfigdirs ld gas gdb gprof"
4e3fc8e5 1160 noconfigdirs="$noconfigdirs sim target-rda"
fe69863c 1161 noconfigdirs="$noconfigdirs ${libgcj}"
04d1ab34 1162 ;;
a0da8069
NN
1163 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1164 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1165 ;;
de0b4a87 1166 *-*-freebsd*)
4b1cb4fe
DD
1167 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1168 if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1169 && test -f /usr/local/include/gmp.h; then
1170 with_gmp=/usr/local
1171 fi
1172
1173 # Skip some stuff that's unsupported on some FreeBSD configurations.
1174 case "${target}" in
1175 i*86-*-*) ;;
1176 alpha*-*-*) ;;
1177 *)
1178 noconfigdirs="$noconfigdirs ${libgcj}"
1179 ;;
1180 esac
1181 ;;
f8a495c8
NC
1182 *-*-kaos*)
1183 # Remove unsupported stuff on all kaOS configurations.
80b200a1 1184 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
f8a495c8
NC
1185 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1186 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1187 noconfigdirs="$noconfigdirs target-libgloss"
1188 ;;
a0da8069
NN
1189 *-*-netbsd*)
1190 # Skip some stuff on all NetBSD configurations.
1191 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1192
1193 # Skip some stuff that's unsupported on some NetBSD configurations.
1194 case "${target}" in
1195 i*86-*-netbsdelf*) ;;
5b474aa8 1196 arm*-*-netbsdelf*) ;;
a0da8069
NN
1197 *)
1198 noconfigdirs="$noconfigdirs ${libgcj}"
1199 ;;
1200 esac
1201 ;;
2a3124ca
RH
1202 *-*-netware*)
1203 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
a0da8069
NN
1204 ;;
1205 *-*-rtems*)
1206 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069 1207 ;;
1587117a
EC
1208 # The tpf target doesn't support gdb yet.
1209 *-*-tpf*)
1210 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
1211 ;;
c1968181
DD
1212 *-*-uclinux*)
1213 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1214 ;;
a0da8069 1215 *-*-vxworks*)
6dd2fda9 1216 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
a0da8069 1217 ;;
49f58d10
JB
1218 m32c-*-*)
1219 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1220 ;;
a0da8069
NN
1221 alpha*-dec-osf*)
1222 # ld works, but does not support shared libraries.
1223 # newlib is not 64 bit ready. I'm not sure about fileutils.
1224 # gas doesn't generate exception information.
1225 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1226 ;;
1227 alpha*-*-*vms*)
69e57115 1228 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
a0da8069
NN
1229 ;;
1230 alpha*-*-linux*)
1231 # newlib is not 64 bit ready
1232 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1233 ;;
a0da8069
NN
1234 alpha*-*-*)
1235 # newlib is not 64 bit ready
1236 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1237 ;;
4a18bd6b
AO
1238 am33_2.0-*-linux*)
1239 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1240 ;;
a0da8069
NN
1241 sh-*-linux*)
1242 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1243 ;;
1244 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1245 noconfigdirs="$noconfigdirs ${libgcj}"
1246 noconfigdirs="$noconfigdirs target-examples"
1247 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
675c6968 1248 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
a0da8069
NN
1249 noconfigdirs="$noconfigdirs expect dejagnu"
1250 # the C++ libraries don't build on top of CE's C libraries
b9459e83 1251 noconfigdirs="$noconfigdirs target-libstdc++-v3"
a0da8069
NN
1252 noconfigdirs="$noconfigdirs target-newlib"
1253 case "${host}" in
1254 *-*-cygwin*) ;; # keep gdb and readline
b9459e83 1255 *) noconfigdirs="$noconfigdirs gdb readline"
a0da8069
NN
1256 ;;
1257 esac
1258 ;;
1259 arc-*-*)
1260 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1261 ;;
caeba88f 1262 arm-semi-aof )
caeba88f 1263 ;;
a0da8069
NN
1264 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1265 noconfigdirs="$noconfigdirs ${libgcj}"
1266 ;;
11b04d1f 1267 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
a0da8069
NN
1268 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1269 ;;
df4a6958
MM
1270 arm*-*-symbianelf*)
1271 noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
1272 ;;
a0da8069
NN
1273 arm-*-pe*)
1274 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1275 ;;
a0da8069
NN
1276 thumb-*-coff)
1277 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1278 ;;
1279 thumb-*-elf)
1280 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1281 ;;
a0da8069
NN
1282 thumb-*-pe)
1283 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1284 ;;
1285 arm-*-riscix*)
1286 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1287 ;;
1288 avr-*-*)
69e57115 1289 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
a0da8069
NN
1290 ;;
1291 c4x-*-* | tic4x-*-*)
b9459e83 1292 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
a0da8069
NN
1293 ;;
1294 c54x*-*-* | tic54x-*-*)
b9459e83 1295 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
a0da8069 1296 ;;
c7e66c6d 1297 cris-*-* | crisv32-*-*)
59f7ec45 1298 unsupported_languages="$unsupported_languages java"
c7e66c6d 1299 case "${target}" in
2faa2958 1300 *-*-aout)
096f7d00 1301 unsupported_languages="$unsupported_languages fortran"
59f7ec45 1302 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
2faa2958 1303 *-*-elf)
096f7d00 1304 unsupported_languages="$unsupported_languages fortran"
5e818318 1305 noconfigdirs="$noconfigdirs target-boehm-gc";;
2faa2958 1306 *-*-linux*)
5e818318 1307 noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
c7e66c6d 1308 *)
096f7d00 1309 unsupported_languages="$unsupported_languages fortran"
c7e66c6d
HPN
1310 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
1311 esac
a0da8069 1312 ;;
3e707e94 1313 crx-*-*)
0490e016 1314 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
3e707e94 1315 ;;
a0da8069 1316 d10v-*-*)
b9459e83 1317 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
a0da8069
NN
1318 ;;
1319 d30v-*-*)
b07c2aad 1320 noconfigdirs="$noconfigdirs ${libgcj} gdb"
a0da8069
NN
1321 ;;
1322 fr30-*-elf*)
b07c2aad 1323 noconfigdirs="$noconfigdirs ${libgcj} gdb"
a0da8069
NN
1324 ;;
1325 frv-*-*)
1326 noconfigdirs="$noconfigdirs ${libgcj}"
1327 ;;
1328 h8300*-*-*)
80b200a1 1329 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
a0da8069
NN
1330 ;;
1331 h8500-*-*)
80b200a1 1332 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
a0da8069 1333 ;;
caeba88f 1334 hppa1.1-*-osf* | hppa1.1-*-bsd* )
caeba88f 1335 ;;
a0da8069
NN
1336 hppa*64*-*-linux* | parisc*64*-*-linux*)
1337 # In this case, it's because the hppa64-linux target is for
1338 # the kernel only at this point and has no libc, and thus no
1339 # headers, crt*.o, etc., all of which are needed by these.
1340 noconfigdirs="$noconfigdirs target-zlib"
1341 ;;
5dcac624
DA
1342 parisc*-*-linux* | hppa*-*-linux*)
1343 ;;
a0da8069 1344 hppa*-*-*elf* | \
a0da8069
NN
1345 hppa*-*-lites* | \
1346 hppa*-*-openbsd* | \
1347 hppa*64*-*-*)
1348 noconfigdirs="$noconfigdirs ${libgcj}"
a0da8069
NN
1349 ;;
1350 hppa*-*-*)
1351 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1352 # build on HP-UX 10.20.
1353 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1354 ;;
b07c2aad
HPN
1355 i960-*-*)
1356 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1357 ;;
a0da8069
NN
1358 ia64*-*-elf*)
1359 # No gdb support yet.
675c6968 1360 noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
a0da8069
NN
1361 ;;
1362 ia64*-**-hpux*)
1363 # No gdb or ld support yet.
675c6968 1364 noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
a0da8069 1365 ;;
caeba88f 1366 i370-*-opened*)
caeba88f 1367 ;;
ec11bdc6 1368 i[3456789]86-*-coff | i[3456789]86-*-elf)
a0da8069
NN
1369 noconfigdirs="$noconfigdirs ${libgcj}"
1370 ;;
ec11bdc6 1371 i[3456789]86-*-linux*)
a0da8069
NN
1372 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1373 # not build java stuff by default.
1374 case "${target}" in
1375 *-*-*libc1*)
1376 noconfigdirs="$noconfigdirs ${libgcj}";;
1377 esac
1378
1379 # This section makes it possible to build newlib natively on linux.
1380 # If we are using a cross compiler then don't configure newlib.
1381 if test x${is_cross_compiler} != xno ; then
bba45b8b 1382 noconfigdirs="$noconfigdirs target-newlib"
a0da8069
NN
1383 fi
1384 noconfigdirs="$noconfigdirs target-libgloss"
1385 # If we are not using a cross compiler, do configure newlib.
1386 # Note however, that newlib will only be configured in this situation
1387 # if the --with-newlib option has been given, because otherwise
1388 # 'target-newlib' will appear in skipdirs.
1389 ;;
ec11bdc6 1390 i[3456789]86-*-mingw32*)
a0da8069 1391 target_configdirs="$target_configdirs target-mingw"
69e57115 1392 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
a0da8069
NN
1393
1394 # Can't build gdb for mingw32 if not native.
1395 case "${host}" in
ec11bdc6 1396 i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
675c6968 1397 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
a0da8069
NN
1398 ;;
1399 esac
1400 ;;
1401 *-*-cygwin*)
1402 target_configdirs="$target_configdirs target-libtermcap target-winsup"
69e57115 1403 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
b76d7de0 1404 # always build newlib if winsup directory is present.
ac0fa625 1405 if test -d "$srcdir/winsup"; then
b76d7de0 1406 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ac0fa625 1407 elif test -d "$srcdir/newlib"; then
b76d7de0
CV
1408 echo "Warning: winsup is missing so newlib can't be built."
1409 fi
a0da8069
NN
1410
1411 # Can't build gdb for Cygwin if not native.
1412 case "${host}" in
1413 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
675c6968 1414 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
a0da8069
NN
1415 ;;
1416 esac
1417 ;;
caeba88f
AL
1418 i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1419 i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
caeba88f 1420 ;;
ec11bdc6 1421 i[3456789]86-*-pe)
69e57115 1422 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
a0da8069 1423 ;;
ec11bdc6 1424 i[3456789]86-*-sco3.2v5*)
a0da8069
NN
1425 # The linker does not yet know about weak symbols in COFF,
1426 # and is not configured to handle mixed ELF and COFF.
1427 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1428 ;;
ec11bdc6 1429 i[3456789]86-*-sco*)
a0da8069
NN
1430 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1431 ;;
ec11bdc6 1432 i[3456789]86-*-solaris2*)
a0da8069
NN
1433 noconfigdirs="$noconfigdirs target-libgloss"
1434 ;;
ec11bdc6 1435 i[3456789]86-*-sysv4*)
a0da8069
NN
1436 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1437 ;;
ec11bdc6 1438 i[3456789]86-*-beos*)
bba45b8b
NN
1439 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1440 ;;
b07c2aad 1441 m32r-*-*)
970f29af 1442 noconfigdirs="$noconfigdirs ${libgcj}"
b07c2aad 1443 ;;
a0da8069 1444 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
b9459e83 1445 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
a0da8069
NN
1446 ;;
1447 m68k-*-elf*)
1448 noconfigdirs="$noconfigdirs ${libgcj}"
1449 ;;
1450 m68k-*-coff*)
1451 noconfigdirs="$noconfigdirs ${libgcj}"
1452 ;;
1453 mcore-*-pe*)
1454 # The EPOC C++ environment does not support exceptions or rtti,
1455 # and so building libstdc++-v3 tends not to always work.
1456 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1457 ;;
1458 mmix-*-*)
59f7ec45 1459 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
096f7d00 1460 unsupported_languages="$unsupported_languages fortran java"
a0da8069
NN
1461 ;;
1462 mn10200-*-*)
1463 noconfigdirs="$noconfigdirs ${libgcj}"
1464 ;;
1465 mn10300-*-*)
1466 noconfigdirs="$noconfigdirs ${libgcj}"
1467 ;;
cdb9b172
AH
1468 ms1-*-*)
1469 noconfigdirs="$noconfigdirs sim"
1470 ;;
a0da8069
NN
1471 powerpc-*-aix*)
1472 # copied from rs6000-*-* entry
096f7d00 1473 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
a0da8069
NN
1474 ;;
1475 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1476 target_configdirs="$target_configdirs target-winsup"
675c6968 1477 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
a0da8069
NN
1478 # always build newlib.
1479 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1480 ;;
1481 # This is temporary until we can link against shared libraries
1482 powerpcle-*-solaris*)
675c6968 1483 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
a0da8069
NN
1484 ;;
1485 powerpc-*-beos*)
1486 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1487 ;;
a0da8069 1488 powerpc-*-eabi)
69e57115 1489 noconfigdirs="$noconfigdirs ${libgcj}"
caeba88f
AL
1490 ;;
1491 powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
a0da8069 1492 ;;
a0da8069
NN
1493 rs6000-*-lynxos*)
1494 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1495 ;;
1496 rs6000-*-aix*)
096f7d00 1497 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
a0da8069
NN
1498 ;;
1499 rs6000-*-*)
1500 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1501 ;;
1502 m68k-apollo-*)
1503 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1504 ;;
1505 mips*-*-irix5*)
0f260896 1506 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
a0da8069
NN
1507 ;;
1508 mips*-*-irix6*)
a0da8069
NN
1509 # Linking libjava exceeds command-line length limits on at least
1510 # IRIX 6.2, but not on IRIX 6.5.
1511 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1512 # <oldham@codesourcery.com>
aa236487 1513 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
a0da8069
NN
1514 ;;
1515 mips*-dec-bsd*)
1516 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1517 ;;
1518 mips*-*-bsd*)
1519 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1520 ;;
1521 mipstx39-*-*)
1522 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
bba45b8b 1523 ;;
1712ab83
RS
1524 mips64*-*-linux*)
1525 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1526 ;;
a0da8069
NN
1527 mips*-*-linux*)
1528 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1529 ;;
1530 mips*-*-*)
1531 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1532 ;;
1533 romp-*-*)
1534 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1535 ;;
dbf85af7 1536 sh-*-* | sh64-*-*)
a0da8069 1537 case "${host}" in
ec11bdc6
DD
1538 i[3456789]86-*-vsta) ;; # don't add gprof back in
1539 i[3456789]86-*-go32*) ;; # don't add gprof back in
1540 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
a0da8069
NN
1541 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1542 esac
1543 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1544 ;;
a0da8069
NN
1545 sparc-*-elf*)
1546 noconfigdirs="$noconfigdirs ${libgcj}"
1547 ;;
1548 sparc64-*-elf*)
1549 noconfigdirs="$noconfigdirs ${libgcj}"
1550 ;;
1551 sparclite-*-*)
1552 noconfigdirs="$noconfigdirs ${libgcj}"
1553 ;;
1554 sparc-*-sunos4*)
1555 noconfigdirs="$noconfigdirs ${libgcj}"
1556 if test x${is_cross_compiler} != xno ; then
1557 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1558 else
1559 use_gnu_ld=no
1560 fi
1561 ;;
e3c770b1
EB
1562 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1563 noconfigdirs="$noconfigdirs ${libgcj}"
1564 ;;
a0da8069
NN
1565 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1566 ;;
1567 v810-*-*)
b9459e83 1568 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
a0da8069
NN
1569 ;;
1570 v850-*-*)
1571 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1572 ;;
1573 v850e-*-*)
1574 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1575 ;;
1576 v850ea-*-*)
1577 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1578 ;;
1579 vax-*-vms)
1580 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1581 ;;
1582 vax-*-*)
1583 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1584 ;;
fbd1054d
BW
1585 xtensa-*-*)
1586 noconfigdirs="$noconfigdirs ${libgcj}"
1587 ;;
a0da8069 1588 ip2k-*-*)
b9459e83 1589 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
a0da8069 1590 ;;
de0b4a87 1591 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
a0da8069
NN
1592 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1593 ;;
1594 *-*-lynxos*)
1595 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1596 ;;
1597 *-*-*)
1598 noconfigdirs="$noconfigdirs ${libgcj}"
1599 ;;
1600esac
252b5132 1601
a0da8069
NN
1602# If we aren't building newlib, then don't build libgloss, since libgloss
1603# depends upon some newlib header files.
1604case "${noconfigdirs}" in
1605 *target-libgloss*) ;;
1606 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1607esac
1608
a0da8069
NN
1609# Work in distributions that contain no compiler tools, like Autoconf.
1610tentative_cc=""
1611host_makefile_frag=/dev/null
1612if test -d ${srcdir}/config ; then
1613case "${host}" in
1614 m68k-hp-hpux*)
1615 # Avoid "too much defining" errors from HPUX compiler.
1616 tentative_cc="cc -Wp,-H256000"
1617 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1618 # If it's HP/UX ar, this should be harmless.
1619 RANLIB="ar ts"
1620 ;;
1621 m68k-apollo-sysv*)
1622 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1623 ;;
1624 m68k-apollo-bsd*)
1625 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1626 # chokes on bfd, the compiler won't let you assign integers to enums, and
1627 # other problems. Defining CC to gcc is a questionable way to say "don't use
1628 # the apollo compiler" (the preferred version of GCC could be called cc,
1629 # or whatever), but I'm not sure leaving CC as cc is any better...
1630 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1631 # Used to have BISON=yacc.
1632 tentative_cc=gcc
1633 ;;
1634 m88k-dg-dgux*)
1635 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
a0da8069
NN
1636 ;;
1637 m88k-harris-cxux*)
1638 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1639 tentative_cc="cc -Xa"
1640 host_makefile_frag="config/mh-cxux"
1641 ;;
1642 m88k-motorola-sysv*)
1643 ;;
1644 mips*-dec-ultrix*)
1645 tentative_cc="cc -Wf,-XNg1000"
1646 host_makefile_frag="config/mh-decstation"
1647 ;;
1648 mips*-nec-sysv4*)
1649 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1650 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1651 host_makefile_frag="config/mh-necv4"
1652 ;;
1653 mips*-sgi-irix4*)
1654 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1655 # environment. Also bump switch table size so that cp-parse will
1656 # compile. Bump string length limit so linker builds.
1657 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1658 ;;
1659 mips*-*-sysv4*)
1660 host_makefile_frag="config/mh-sysv4"
1661 ;;
1662 mips*-*-sysv*)
1663 # This is for a MIPS running RISC/os 4.52C.
1664
1665 # This is needed for GDB, but needs to be in the top-level make because
1666 # if a library is compiled with the bsd headers and gets linked with the
1667 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1668 # a different size).
1669 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1670 # known except to select the sysv environment. Could we use /proc instead?
1671 # These "sysv environments" and "bsd environments" often end up being a pain.
1672 #
1673 # This is not part of CFLAGS because perhaps not all C compilers have this
1674 # option.
1675 tentative_cc="cc -systype sysv"
1676 ;;
1677 i370-ibm-opened*)
1678 tentative_cc="c89"
1679 ;;
ec11bdc6 1680 i[3456789]86-*-sysv5*)
a0da8069
NN
1681 host_makefile_frag="config/mh-sysv5"
1682 ;;
ec11bdc6 1683 i[3456789]86-*-dgux*)
a0da8069
NN
1684 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1685 host_makefile_frag="config/mh-dgux386"
1686 ;;
ec11bdc6 1687 i[3456789]86-ncr-sysv4.3*)
a0da8069
NN
1688 # The MetaWare compiler will generate a copyright message unless you
1689 # turn it off by adding the -Hnocopyr flag.
1690 tentative_cc="cc -Hnocopyr"
1691 ;;
ec11bdc6 1692 i[3456789]86-ncr-sysv4*)
a0da8069
NN
1693 # for an NCR 3000 (i486/SVR4) system.
1694 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1695 # This compiler not only emits obnoxious copyright messages every time
1696 # you run it, but it chokes and dies on a whole bunch of GNU source
1697 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1698 tentative_cc="/usr/ccs/ATT/cc"
1699 host_makefile_frag="config/mh-ncr3000"
1700 ;;
ec11bdc6 1701 i[3456789]86-*-sco3.2v5*)
a0da8069 1702 ;;
ec11bdc6 1703 i[3456789]86-*-sco*)
a0da8069
NN
1704 # The native C compiler botches some simple uses of const. Unfortunately,
1705 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1706 tentative_cc="cc -Dconst="
1707 host_makefile_frag="config/mh-sco"
1708 ;;
ec11bdc6 1709 i[3456789]86-*-udk*)
a0da8069
NN
1710 host_makefile_frag="config/mh-sysv5"
1711 ;;
ec11bdc6 1712 i[3456789]86-*-solaris2*)
a0da8069
NN
1713 host_makefile_frag="config/mh-sysv4"
1714 ;;
ec11bdc6 1715 i[3456789]86-*-msdosdjgpp*)
a0da8069
NN
1716 host_makefile_frag="config/mh-djgpp"
1717 ;;
1718 *-cygwin*)
1719 host_makefile_frag="config/mh-cygwin"
1720 ;;
1721 *-mingw32*)
a0da8069
NN
1722 ;;
1723 *-interix*)
1724 host_makefile_frag="config/mh-interix"
1725 ;;
1726 vax-*-ultrix2*)
1727 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1728 tentative_cc=gcc
1729 ;;
1730 *-*-solaris2*)
1731 host_makefile_frag="config/mh-solaris"
1732 ;;
1733 m68k-sun-sunos*)
1734 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1735 # without overflowing the jump tables (-J says to use a 32 bit table)
1736 tentative_cc="cc -J"
1737 ;;
1738 *-hp-hpux*)
1739 tentative_cc="cc -Wp,-H256000"
1740 ;;
1741 *-*-hiux*)
1742 tentative_cc="cc -Wp,-H256000"
1743 ;;
1744 rs6000-*-lynxos*)
1745 # /bin/cc is less than useful for our purposes. Always use GCC
1746 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1747 host_makefile_frag="config/mh-lynxrs6k"
1748 ;;
0df3d27f
PB
1749 powerpc-*-darwin*)
1750 host_makefile_frag="config/mh-ppc-darwin"
1751 ;;
a0da8069
NN
1752 *-*-lynxos*)
1753 # /bin/cc is less than useful for our purposes. Always use GCC
1754 tentative_cc="/bin/gcc"
1755 ;;
1756 *-*-sysv4*)
1757 host_makefile_frag="config/mh-sysv4"
1758 ;;
fe69863c
DD
1759 # This is placed last to prevent interfering with the cases above.
1760 i[3456789]86-*-*)
1761 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1762 host_makefile_frag="config/mh-x86omitfp"
1763 ;;
a0da8069
NN
1764esac
1765fi
1766
9e07f89d
NN
1767# If we aren't going to be using gcc, see if we can extract a definition
1768# of CC from the fragment.
1769# Actually, use the 'pre-extracted' version above.
1770if test -z "${CC}" && test "${build}" = "${host}" ; then
1771 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1772 found=
1773 for dir in $PATH; do
1774 test -z "$dir" && dir=.
1775 if test -f $dir/gcc; then
1776 found=yes
1777 break
1778 fi
1779 done
1780 IFS="$save_ifs"
1781 if test -z "${found}" && test -n "${tentative_cc}" ; then
1782 CC=$tentative_cc
1783 fi
1784fi
1785
1786if test "${build}" != "${host}" ; then
1787 # If we are doing a Canadian Cross, in which the host and build systems
1788 # are not the same, we set reasonable default values for the tools.
1789
9e07f89d
NN
1790 CC=${CC-${host_alias}-gcc}
1791 CFLAGS=${CFLAGS-"-g -O2"}
1792 CXX=${CXX-${host_alias}-c++}
1793 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1794 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
9e07f89d
NN
1795 BUILD_PREFIX=${build_alias}-
1796 BUILD_PREFIX_1=${build_alias}-
9e07f89d
NN
1797
1798else
1799 # Set reasonable default values for some tools even if not Canadian.
1800 # Of course, these are different reasonable default values, originally
1801 # specified directly in the Makefile.
1802 # We don't export, so that autoconf can do its job.
1803 # Note that all these settings are above the fragment inclusion point
1804 # in Makefile.in, so can still be overridden by fragments.
1805 # This is all going to change when we autoconfiscate...
1806
9e07f89d 1807 CC_FOR_BUILD="\$(CC)"
9e07f89d
NN
1808 BUILD_PREFIX=
1809 BUILD_PREFIX_1=loser-
9e07f89d 1810
6a9cf61e 1811 # Extract the first word of "gcc", so it can be a program name with args.
9e07f89d
NN
1812set dummy gcc; ac_word=$2
1813echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
55db4b87 1814echo "configure:1815: checking for $ac_word" >&5
9e07f89d
NN
1815if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1817else
1818 if test -n "$CC"; then
1819 ac_cv_prog_CC="$CC" # Let the user override the test.
1820else
1821 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1822 ac_dummy="$PATH"
1823 for ac_dir in $ac_dummy; do
1824 test -z "$ac_dir" && ac_dir=.
1825 if test -f $ac_dir/$ac_word; then
1826 ac_cv_prog_CC="gcc"
1827 break
1828 fi
1829 done
1830 IFS="$ac_save_ifs"
1831fi
1832fi
1833CC="$ac_cv_prog_CC"
1834if test -n "$CC"; then
1835 echo "$ac_t""$CC" 1>&6
1836else
1837 echo "$ac_t""no" 1>&6
1838fi
1839
1840if test -z "$CC"; then
1841 # Extract the first word of "cc", so it can be a program name with args.
1842set dummy cc; ac_word=$2
1843echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
55db4b87 1844echo "configure:1845: checking for $ac_word" >&5
9e07f89d
NN
1845if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1847else
1848 if test -n "$CC"; then
1849 ac_cv_prog_CC="$CC" # Let the user override the test.
1850else
1851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1852 ac_prog_rejected=no
1853 ac_dummy="$PATH"
1854 for ac_dir in $ac_dummy; do
1855 test -z "$ac_dir" && ac_dir=.
1856 if test -f $ac_dir/$ac_word; then
1857 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1858 ac_prog_rejected=yes
1859 continue
1860 fi
1861 ac_cv_prog_CC="cc"
1862 break
1863 fi
1864 done
1865 IFS="$ac_save_ifs"
1866if test $ac_prog_rejected = yes; then
1867 # We found a bogon in the path, so make sure we never use it.
1868 set dummy $ac_cv_prog_CC
1869 shift
1870 if test $# -gt 0; then
1871 # We chose a different compiler from the bogus one.
1872 # However, it has the same basename, so the bogon will be chosen
1873 # first if we set CC to just the basename; use the full file name.
1874 shift
1875 set dummy "$ac_dir/$ac_word" "$@"
1876 shift
1877 ac_cv_prog_CC="$@"
1878 fi
1879fi
1880fi
1881fi
1882CC="$ac_cv_prog_CC"
1883if test -n "$CC"; then
1884 echo "$ac_t""$CC" 1>&6
1885else
1886 echo "$ac_t""no" 1>&6
1887fi
1888
1889 if test -z "$CC"; then
1890 case "`uname -s`" in
1891 *win32* | *WIN32*)
1892 # Extract the first word of "cl", so it can be a program name with args.
1893set dummy cl; ac_word=$2
1894echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
55db4b87 1895echo "configure:1896: checking for $ac_word" >&5
9e07f89d
NN
1896if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1897 echo $ac_n "(cached) $ac_c" 1>&6
1898else
1899 if test -n "$CC"; then
1900 ac_cv_prog_CC="$CC" # Let the user override the test.
1901else
1902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1903 ac_dummy="$PATH"
1904 for ac_dir in $ac_dummy; do
1905 test -z "$ac_dir" && ac_dir=.
1906 if test -f $ac_dir/$ac_word; then
1907 ac_cv_prog_CC="cl"
1908 break
1909 fi
1910 done
1911 IFS="$ac_save_ifs"
1912fi
1913fi
1914CC="$ac_cv_prog_CC"
1915if test -n "$CC"; then
1916 echo "$ac_t""$CC" 1>&6
1917else
1918 echo "$ac_t""no" 1>&6
1919fi
1920 ;;
1921 esac
1922 fi
1923 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1924fi
1925
1926echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
55db4b87 1927echo "configure:1928: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
9e07f89d
NN
1928
1929ac_ext=c
1930# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1931ac_cpp='$CPP $CPPFLAGS'
1932ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1933ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1934cross_compiling=$ac_cv_prog_cc_cross
1935
1936cat > conftest.$ac_ext << EOF
1937
55db4b87 1938#line 1939 "configure"
9e07f89d
NN
1939#include "confdefs.h"
1940
1941main(){return(0);}
1942EOF
55db4b87 1943if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9e07f89d
NN
1944 ac_cv_prog_cc_works=yes
1945 # If we can't run a trivial program, we are probably using a cross compiler.
1946 if (./conftest; exit) 2>/dev/null; then
1947 ac_cv_prog_cc_cross=no
1948 else
1949 ac_cv_prog_cc_cross=yes
1950 fi
1951else
1952 echo "configure: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 ac_cv_prog_cc_works=no
1955fi
1956rm -fr conftest*
1957ac_ext=c
1958# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1959ac_cpp='$CPP $CPPFLAGS'
1960ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1961ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1962cross_compiling=$ac_cv_prog_cc_cross
1963
1964echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1965if test $ac_cv_prog_cc_works = no; then
1966 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1967fi
1968echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
55db4b87 1969echo "configure:1970: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
9e07f89d
NN
1970echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1971cross_compiling=$ac_cv_prog_cc_cross
1972
1973echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
55db4b87 1974echo "configure:1975: checking whether we are using GNU C" >&5
9e07f89d
NN
1975if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1976 echo $ac_n "(cached) $ac_c" 1>&6
1977else
1978 cat > conftest.c <<EOF
1979#ifdef __GNUC__
1980 yes;
1981#endif
1982EOF
55db4b87 1983if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
9e07f89d
NN
1984 ac_cv_prog_gcc=yes
1985else
1986 ac_cv_prog_gcc=no
1987fi
1988fi
1989
1990echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1991
1992if test $ac_cv_prog_gcc = yes; then
1993 GCC=yes
1994else
1995 GCC=
1996fi
1997
1998ac_test_CFLAGS="${CFLAGS+set}"
1999ac_save_CFLAGS="$CFLAGS"
2000CFLAGS=
2001echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
55db4b87 2002echo "configure:2003: checking whether ${CC-cc} accepts -g" >&5
9e07f89d
NN
2003if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2004 echo $ac_n "(cached) $ac_c" 1>&6
2005else
2006 echo 'void f(){}' > conftest.c
2007if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2008 ac_cv_prog_cc_g=yes
2009else
2010 ac_cv_prog_cc_g=no
2011fi
2012rm -f conftest*
2013
2014fi
2015
2016echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2017if test "$ac_test_CFLAGS" = set; then
2018 CFLAGS="$ac_save_CFLAGS"
2019elif test $ac_cv_prog_cc_g = yes; then
2020 if test "$GCC" = yes; then
2021 CFLAGS="-g -O2"
2022 else
2023 CFLAGS="-g"
2024 fi
2025else
2026 if test "$GCC" = yes; then
2027 CFLAGS="-O2"
2028 else
2029 CFLAGS=
2030 fi
2031fi
2032
2033
6a9cf61e
PB
2034 # We must set the default linker to the linker used by gcc for the correct
2035 # operation of libtool. If LD is not defined and we are using gcc, try to
2036 # set the LD default to the ld used by gcc.
2037 if test -z "$LD"; then
2038 if test "$GCC" = yes; then
2039 case $build in
2040 *-*-mingw*)
2041 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2042 *)
2043 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2044 esac
2045 case $gcc_prog_ld in
2046 # Accept absolute paths.
2047 [\\/]* | [A-Za-z]:[\\/]*)
2048 LD="$gcc_prog_ld" ;;
2049 esac
2050 fi
2051 fi
2052
2053 CXX=${CXX-"c++"}
2054 CFLAGS=${CFLAGS-"-g"}
2055 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2056fi
2057
2058if test $host != $build; then
2059 ac_tool_prefix=${host_alias}-
2060else
2061 ac_tool_prefix=
2062fi
2063
2064
9e07f89d
NN
2065
2066# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
2067set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
2068echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
55db4b87 2069echo "configure:2070: checking for $ac_word" >&5
9e07f89d
NN
2070if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2071 echo $ac_n "(cached) $ac_c" 1>&6
2072else
2073 if test -n "$GNATBIND"; then
2074 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2075else
2076 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2077 ac_dummy="$PATH"
2078 for ac_dir in $ac_dummy; do
2079 test -z "$ac_dir" && ac_dir=.
2080 if test -f $ac_dir/$ac_word; then
2081 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2082 break
2083 fi
2084 done
2085 IFS="$ac_save_ifs"
2086fi
2087fi
2088GNATBIND="$ac_cv_prog_GNATBIND"
2089if test -n "$GNATBIND"; then
2090 echo "$ac_t""$GNATBIND" 1>&6
2091else
2092 echo "$ac_t""no" 1>&6
2093fi
2094
2095
2096if test -z "$ac_cv_prog_GNATBIND"; then
2097if test -n "$ac_tool_prefix"; then
2098 # Extract the first word of "gnatbind", so it can be a program name with args.
2099set dummy gnatbind; ac_word=$2
2100echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
55db4b87 2101echo "configure:2102: checking for $ac_word" >&5
9e07f89d
NN
2102if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104else
2105 if test -n "$GNATBIND"; then
2106 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2107else
2108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2109 ac_dummy="$PATH"
2110 for ac_dir in $ac_dummy; do
2111 test -z "$ac_dir" && ac_dir=.
2112 if test -f $ac_dir/$ac_word; then
2113 ac_cv_prog_GNATBIND="gnatbind"
2114 break
2115 fi
2116 done
2117 IFS="$ac_save_ifs"
2118 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
2119fi
2120fi
2121GNATBIND="$ac_cv_prog_GNATBIND"
2122if test -n "$GNATBIND"; then
2123 echo "$ac_t""$GNATBIND" 1>&6
2124else
2125 echo "$ac_t""no" 1>&6
2126fi
2127
2128else
2129 GNATBIND="no"
2130fi
2131fi
2132
2133echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
55db4b87 2134echo "configure:2135: checking whether compiler driver understands Ada" >&5
9e07f89d
NN
2135if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137else
2138 cat >conftest.adb <<EOF
2139procedure conftest is begin null; end conftest;
2140EOF
2141acx_cv_cc_gcc_supports_ada=no
2142# There is a bug in old released versions of GCC which causes the
2143# driver to exit successfully when the appropriate language module
2144# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2145# Therefore we must check for the error message as well as an
2146# unsuccessful exit.
b8908782
DD
2147# Other compilers, like HP Tru64 UNIX cc, exit successfully when
2148# given a .adb file, but produce no object file. So we must check
2149# if an object file was really produced to guard against this.
9e07f89d 2150errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
b8908782 2151if test x"$errors" = x && test -f conftest.$ac_objext; then
9e07f89d 2152 acx_cv_cc_gcc_supports_ada=yes
9e07f89d
NN
2153fi
2154rm -f conftest.*
2155fi
2156
2157echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
2158
b8908782 2159if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
9e07f89d
NN
2160 have_gnat=yes
2161else
2162 have_gnat=no
2163fi
2164
b8908782 2165echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
55db4b87 2166echo "configure:2167: checking how to compare bootstrapped objects" >&5
b8908782
DD
2167if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2169else
2170 echo abfoo >t1
2171 echo cdfoo >t2
2172 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
4b1cb4fe
DD
2173 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2174 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2175 :
2176 else
2177 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2178 fi
2179 fi
b8908782
DD
2180 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2181 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
4b1cb4fe 2182 :
b8908782
DD
2183 else
2184 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2185 fi
2186 fi
2187 rm t1 t2
2188
2189fi
2190
2191echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2192do_compare="$gcc_cv_prog_cmp_skip"
2193
2194
9e07f89d 2195
11b04d1f 2196# Check for GMP and MPFR
4b1cb4fe
DD
2197gmplibs=
2198gmpinc=
2199have_gmp=yes
11b04d1f
DD
2200# Specify a location for mpfr
2201# check for this first so it ends up on the link line before gmp.
2202# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2203if test "${with_mpfr_dir+set}" = set; then
2204 withval="$with_mpfr_dir"
2205 :
2206fi
2207
2208
2209if test "x$with_mpfr_dir" != x; then
c10e9ba7 2210 gmpinc="-I$with_mpfr_dir"
11b04d1f
DD
2211 gmplibs="$with_mpfr_dir/libmpfr.a"
2212else
2213 gmplibs="-lmpfr"
2214fi
2215
2216# Check whether --with-mpfr or --without-mpfr was given.
2217if test "${with_mpfr+set}" = set; then
2218 withval="$with_mpfr"
2219 :
2220fi
2221
2222
2223if test "x$with_mpfr" != x; then
2224 gmplibs="-L$with_mpfr/lib $gmplibs"
2225 gmpinc="-I$with_mpfr/include"
2226fi
2227
4b1cb4fe
DD
2228# Specify a location for gmp
2229# Check whether --with-gmp-dir or --without-gmp-dir was given.
2230if test "${with_gmp_dir+set}" = set; then
2231 withval="$with_gmp_dir"
2232 :
2233fi
2234
2235
11b04d1f
DD
2236if test "x$with_gmp_dir" != x; then
2237 gmpinc="$gmpinc -I$with_gmp_dir"
4b1cb4fe 2238 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
11b04d1f 2239 gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
4b1cb4fe 2240 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
11b04d1f 2241 gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
4b1cb4fe
DD
2242 fi
2243 # One of the later tests will catch the error if neither library is present.
11b04d1f
DD
2244else
2245 gmplibs="$gmplibs -lgmp"
4b1cb4fe
DD
2246fi
2247
2248# Check whether --with-gmp or --without-gmp was given.
2249if test "${with_gmp+set}" = set; then
2250 withval="$with_gmp"
2251 :
2252fi
2253
2254
11b04d1f
DD
2255if test "x$with_gmp" != x; then
2256 gmplibs="-L$with_gmp/lib $gmplibs"
2257 gmpinc="-I$with_gmp/include $gmpinc"
4b1cb4fe
DD
2258fi
2259
2260saved_CFLAGS="$CFLAGS"
2261CFLAGS="$CFLAGS $gmpinc"
2262# Check GMP actually works
2263echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
55db4b87 2264echo "configure:2265: checking for correct version of gmp.h" >&5
4b1cb4fe 2265cat > conftest.$ac_ext <<EOF
55db4b87 2266#line 2267 "configure"
4b1cb4fe
DD
2267#include "confdefs.h"
2268#include "gmp.h"
2269int main() {
2270
2271#if __GNU_MP_VERSION < 3
2272choke me
2273#endif
2274
2275; return 0; }
2276EOF
55db4b87 2277if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4b1cb4fe
DD
2278 rm -rf conftest*
2279 echo "$ac_t""yes" 1>&6
2280else
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283 rm -rf conftest*
2284 echo "$ac_t""no" 1>&6; have_gmp=no
2285fi
2286rm -f conftest*
2287
2288if test x"$have_gmp" = xyes; then
11b04d1f 2289 echo $ac_n "checking for MPFR""... $ac_c" 1>&6
55db4b87 2290echo "configure:2291: checking for MPFR" >&5
4b1cb4fe
DD
2291
2292 saved_LIBS="$LIBS"
2293 LIBS="$LIBS $gmplibs"
2294 cat > conftest.$ac_ext <<EOF
55db4b87 2295#line 2296 "configure"
4b1cb4fe
DD
2296#include "confdefs.h"
2297#include <gmp.h>
11b04d1f 2298#include <mpfr.h>
4b1cb4fe 2299int main() {
11b04d1f 2300mpfr_t n; mpfr_init(n);
4b1cb4fe
DD
2301; return 0; }
2302EOF
55db4b87 2303if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4b1cb4fe
DD
2304 rm -rf conftest*
2305 echo "$ac_t""yes" 1>&6
2306else
2307 echo "configure: failed program was:" >&5
2308 cat conftest.$ac_ext >&5
2309 rm -rf conftest*
2310 echo "$ac_t""no" 1>&6; have_gmp=no
2311fi
2312rm -f conftest*
2313 LIBS="$saved_LIBS"
2314 CFLAGS="$saved_CFLAGS"
2315fi
2316
11b04d1f 2317# Flags needed for both GMP and/or MPFR
4b1cb4fe
DD
2318
2319
2320
947f426e 2321# By default, C is the only stage 1 language.
1d39f329
NN
2322stage1_languages=c
2323
2324
9e07f89d
NN
2325# Figure out what language subdirectories are present.
2326# Look if the user specified --enable-languages="..."; if not, use
2327# the environment variable $LANGUAGES if defined. $LANGUAGES might
2328# go away some day.
2329# NB: embedded tabs in this IF block -- do not untabify
2330if test -d ${srcdir}/gcc; then
2331 if test x"${enable_languages+set}" != xset; then
2332 if test x"${LANGUAGES+set}" = xset; then
2333 enable_languages="${LANGUAGES}"
2334 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2335 else
2336 enable_languages=all
2337 fi
2338 else
2339 if test x"${enable_languages}" = x ||
2340 test x"${enable_languages}" = xyes;
2341 then
2342 echo configure.in: --enable-languages needs at least one language argument 1>&2
2343 exit 1
2344 fi
2345 fi
2346 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2347
096f7d00
DE
2348 # 'f95' is the old name for the 'fortran' language. We issue a warning
2349 # and make the substitution.
2350 case ,${enable_languages}, in
2351 *,f95,*)
2352 echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
2353 enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
2354 ;;
2355 esac
2356
9e07f89d
NN
2357 # First scan to see if an enabled language requires some other language.
2358 # We assume that a given config-lang.in will list all the language
2359 # front ends it requires, even if some are required indirectly.
2360 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2361 case ${lang_frag} in
2362 ..) ;;
2363 # The odd quoting in the next line works around
2364 # an apparent bug in bash 1.12 on linux.
2365 ${srcdir}/gcc/[*]/config-lang.in) ;;
2366 *)
2367 # From the config-lang.in, get $language, $lang_requires
2368 language=
2369 lang_requires=
2370 . ${lang_frag}
2371 for other in ${lang_requires} ; do
2372 case ,${enable_languages}, in
2373 *,$other,*) ;;
2374 *,all,*) ;;
2375 *,$language,*)
2376 echo " \`$other' language required by \`$language'; enabling" 1>&2
2377 enable_languages="${enable_languages},${other}"
2378 ;;
2379 esac
2380 done
2381 ;;
2382 esac
2383 done
2384
2385 new_enable_languages=c
2386 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
9cb3fa6f 2387 potential_languages=c
9e07f89d
NN
2388
2389 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2390 case ${lang_frag} in
2391 ..) ;;
2392 # The odd quoting in the next line works around
2393 # an apparent bug in bash 1.12 on linux.
2394 ${srcdir}/gcc/[*]/config-lang.in) ;;
2395 *)
2396 # From the config-lang.in, get $language, $target_libs,
1d39f329 2397 # $lang_dirs, $boot_language, and $build_by_default
9e07f89d
NN
2398 language=
2399 target_libs=
2400 lang_dirs=
1d39f329 2401 boot_language=
9e07f89d 2402 build_by_default=
9cb3fa6f 2403 need_gmp=
9e07f89d 2404 . ${lang_frag}
9cb3fa6f 2405 potential_languages="${potential_languages},${language}"
9e07f89d
NN
2406 # This is quite sensitive to the ordering of the case statement arms.
2407 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2408 *::*:*)
2409 echo "${lang_frag} doesn't set \$language." 1>&2
2410 exit 1
9cb3fa6f 2411 ;;
9e07f89d
NN
2412 *:ada:no:*)
2413 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2414 add_this_lang=no
2415 ;;
2416 *,${language},*:*:*:*)
2417 # Language was explicitly selected; include it.
2418 add_this_lang=yes
2419 ;;
2420 *,all,*:*:*:no)
2421 # 'all' was selected, but this is not a default language
9cb3fa6f 2422 # so do not include it.
9e07f89d 2423 add_this_lang=no
9cb3fa6f 2424 ;;
9e07f89d
NN
2425 *,all,*:*:*:*)
2426 # 'all' was selected and this is a default language; include it.
2427 add_this_lang=yes
2428 ;;
2429 *)
2430 add_this_lang=no
2431 ;;
2432 esac
4b1cb4fe 2433
9cb3fa6f
PB
2434 # Disable languages that need GMP if it isn't available.
2435 case ,${enable_languages},:${have_gmp}:${need_gmp} in
2436 *,${language},*:no:yes)
2437 # Specifically requested language; tell them.
2438 { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
2439 ;;
2440 *:no:yes)
2441 # Silently disable.
2442 add_this_lang=no
2443 ;;
2444 esac
59f7ec45
HPN
2445
2446 # Disable a language that is unsupported by the target.
2447 case " $unsupported_languages " in
2448 *" $language "*)
2449 add_this_lang=no
2450 ;;
2451 esac
2452
4b1cb4fe 2453 case $add_this_lang in
9e07f89d
NN
2454 no)
2455 # Remove language-dependent dirs.
1d39f329
NN
2456 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2457 ;;
9e07f89d
NN
2458 *)
2459 new_enable_languages="$new_enable_languages,$language"
1d39f329
NN
2460 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2461 case ${boot_language} in
2462 yes)
4fa63067
NN
2463 # Add to (comma-separated) list of stage 1 languages.
2464 stage1_languages="${stage1_languages},${language}"
1d39f329
NN
2465 ;;
2466 esac
2467 ;;
9e07f89d
NN
2468 esac
2469 ;;
2470 esac
2471 done
2472
4b0ac75d 2473 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
9e07f89d
NN
2474 if test "x$missing_languages" != x; then
2475 { echo "configure: error:
27258dd4
PB
2476The following requested languages could not be built: ${missing_languages}
2477Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
9e07f89d
NN
2478 fi
2479
2480 if test "x$new_enable_languages" != "x$enable_languages"; then
2481 echo The following languages will be built: ${new_enable_languages}
2482 fi
2483 enable_languages="$new_enable_languages"
2e70b094 2484 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
9e07f89d
NN
2485fi
2486
caeba88f
AL
2487# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2488# $build_configdirs and $target_configdirs.
9e07f89d
NN
2489# If we have the source for $noconfigdirs entries, add them to $notsupp.
2490
2491notsupp=""
2492for dir in . $skipdirs $noconfigdirs ; do
caeba88f 2493 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
9e07f89d
NN
2494 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2495 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2496 if test -r $srcdir/$dirname/configure ; then
2497 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2498 true
2499 else
2500 notsupp="$notsupp $dir"
2501 fi
2502 fi
2503 fi
caeba88f
AL
2504 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2505 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2506 if test -r $srcdir/$dirname/configure ; then
2507 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2508 true
2509 else
2510 notsupp="$notsupp $dir"
2511 fi
2512 fi
2513 fi
9e07f89d
NN
2514 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2515 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2516 if test -r $srcdir/$dirname/configure ; then
2517 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2518 true
2519 else
2520 notsupp="$notsupp $dir"
2521 fi
2522 fi
2523 fi
2524done
2525
2526# Sometimes the tools are distributed with libiberty but with no other
2527# libraries. In that case, we don't want to build target-libiberty.
2528if test -n "${target_configdirs}" ; then
2529 others=
2530 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2531 if test "$i" != "libiberty" ; then
2532 if test -r $srcdir/$i/configure ; then
2533 others=yes;
2534 break;
2535 fi
2536 fi
2537 done
2538 if test -z "${others}" ; then
2539 target_configdirs=
2540 fi
2541fi
2542
2543# Quietly strip out all directories which aren't configurable in this tree.
2544# This relies on all configurable subdirectories being autoconfiscated, which
2545# is now the case.
6a9cf61e
PB
2546build_configdirs_all="$build_configdirs"
2547build_configdirs=
2548for i in ${build_configdirs_all} ; do
2549 j=`echo $i | sed -e s/build-//g`
2550 if test -f ${srcdir}/$j/configure ; then
2551 build_configdirs="${build_configdirs} $i"
2552 fi
2553done
2554
9e07f89d
NN
2555configdirs_all="$configdirs"
2556configdirs=
2557for i in ${configdirs_all} ; do
2558 if test -f ${srcdir}/$i/configure ; then
2559 configdirs="${configdirs} $i"
2560 fi
2561done
6a9cf61e 2562
9e07f89d
NN
2563target_configdirs_all="$target_configdirs"
2564target_configdirs=
2565for i in ${target_configdirs_all} ; do
2566 j=`echo $i | sed -e s/target-//g`
2567 if test -f ${srcdir}/$j/configure ; then
2568 target_configdirs="${target_configdirs} $i"
2569 fi
2570done
2571
2572# Produce a warning message for the subdirs we can't configure.
2573# This isn't especially interesting in the Cygnus tree, but in the individual
2574# FSF releases, it's important to let people know when their machine isn't
2575# supported by the one or two programs in a package.
2576
2577if test -n "${notsupp}" && test -z "${norecursion}" ; then
2578 # If $appdirs is non-empty, at least one of those directories must still
2579 # be configured, or we error out. (E.g., if the gas release supports a
2580 # specified target in some subdirs but not the gas subdir, we shouldn't
2581 # pretend that all is well.)
2582 if test -n "$appdirs" ; then
2583 for dir in $appdirs ; do
2584 if test -r $dir/Makefile.in ; then
2585 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2586 appdirs=""
2587 break
2588 fi
6a9cf61e 2589 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
9e07f89d
NN
2590 appdirs=""
2591 break
2592 fi
2593 fi
2594 done
2595 if test -n "$appdirs" ; then
2596 echo "*** This configuration is not supported by this package." 1>&2
2597 exit 1
2598 fi
2599 fi
2600 # Okay, some application will build, or we don't care to check. Still
2601 # notify of subdirs not getting built.
2602 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2603 echo " ${notsupp}" 1>&2
2604 echo " (Any other directories should still work fine.)" 1>&2
2605fi
2606
2607case "$host" in
2608 *msdosdjgpp*)
2609 enable_gdbtk=no ;;
2610esac
2611
2612copy_dirs=
2613
a19b6204
MM
2614# Check whether --with-build-sysroot or --without-build-sysroot was given.
2615if test "${with_build_sysroot+set}" = set; then
2616 withval="$with_build_sysroot"
2617 if test x"$withval" != x ; then
2618 SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
2619 fi
2620else
2621 SYSROOT_CFLAGS_FOR_TARGET=
2622fi
2623
2624
2625
9e07f89d
NN
2626# Handle --with-headers=XXX. If the value is not "yes", the contents of
2627# the named directory are copied to $(tooldir)/sys-include.
2628if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2629 if test x${is_cross_compiler} = xno ; then
2630 echo 1>&2 '***' --with-headers is only supported when cross compiling
2631 exit 1
2632 fi
2633 if test x"${with_headers}" != xyes ; then
2634 case "${exec_prefixoption}" in
2635 "") x=${prefix} ;;
2636 *) x=${exec_prefix} ;;
2637 esac
2638 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2639 fi
2640fi
2641
2642# Handle --with-libs=XXX. If the value is not "yes", the contents of
2643# the name directories are copied to $(tooldir)/lib. Multiple directories
2644# are permitted.
2645if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2646 if test x${is_cross_compiler} = xno ; then
2647 echo 1>&2 '***' --with-libs is only supported when cross compiling
2648 exit 1
2649 fi
2650 if test x"${with_libs}" != xyes ; then
2651 # Copy the libraries in reverse order, so that files in the first named
2652 # library override files in subsequent libraries.
2653 case "${exec_prefixoption}" in
2654 "") x=${prefix} ;;
2655 *) x=${exec_prefix} ;;
2656 esac
2657 for l in ${with_libs}; do
2658 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2659 done
2660 fi
2661fi
2662
2663# Handle ${copy_dirs}
2664set fnord ${copy_dirs}
2665shift
2666while test $# != 0 ; do
2667 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2668 :
2669 else
2670 echo Copying $1 to $2
2671
2672 # Use the install script to create the directory and all required
2673 # parent directories.
2674 if test -d $2 ; then
2675 :
2676 else
2677 echo >config.temp
2678 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2679 fi
2680
2681 # Copy the directory, assuming we have tar.
2682 # FIXME: Should we use B in the second tar? Not all systems support it.
2683 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2684
2685 # It is the responsibility of the user to correctly adjust all
2686 # symlinks. If somebody can figure out how to handle them correctly
2687 # here, feel free to add the code.
2688
2689 echo $1 > $2/COPIED
2690 fi
2691 shift; shift
2692done
2693
a0da8069
NN
2694extra_arflags_for_target=
2695extra_nmflags_for_target=
2696extra_ranlibflags_for_target=
2697target_makefile_frag=/dev/null
2698case "${target}" in
2a3124ca 2699 *-*-netware*)
a0da8069
NN
2700 target_makefile_frag="config/mt-netware"
2701 ;;
3d6dfe0f
NN
2702 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2703 target_makefile_frag="config/mt-gnu"
a0da8069
NN
2704 ;;
2705 *-*-aix4.[3456789]* | *-*-aix[56789].*)
2706 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
2707 # commands to handle both 32-bit and 64-bit objects. These flags are
2708 # harmless if we're using GNU nm or ar.
2709 extra_arflags_for_target=" -X32_64"
2710 extra_nmflags_for_target=" -B -X32_64"
2711 ;;
2712 *-*-darwin*)
2713 # ranlib from Darwin requires the -c flag to look at common symbols.
2714 extra_ranlibflags_for_target=" -c"
2715 ;;
2716 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2717 target_makefile_frag="config/mt-wince"
2718 ;;
2719esac
2720
2721alphaieee_frag=/dev/null
2722case $target in
2723 alpha*-*-*)
2724 # This just makes sure to use the -mieee option to build target libs.
2725 # This should probably be set individually by each library.
2726 alphaieee_frag="config/mt-alphaieee"
2727 ;;
2728esac
2729
2730# If --enable-target-optspace always use -Os instead of -O2 to build
2731# the target libraries, similarly if it is not specified, use -Os
2732# on selected platforms.
2733ospace_frag=/dev/null
2734case "${enable_target_optspace}:${target}" in
2735 yes:*)
2736 ospace_frag="config/mt-ospace"
2737 ;;
2738 :d30v-*)
2739 ospace_frag="config/mt-d30v"
2740 ;;
2741 :m32r-* | :d10v-* | :fr30-*)
2742 ospace_frag="config/mt-ospace"
2743 ;;
2744 no:* | :*)
2745 ;;
2746 *)
2747 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2748 ;;
2749esac
2750
2751# Set with_gnu_as and with_gnu_ld as appropriate.
2752#
2753# This is done by determining whether or not the appropriate directory
2754# is available, and by checking whether or not specific configurations
2755# have requested that this magic not happen.
2756#
2757# The command line options always override the explicit settings in
2758# configure.in, and the settings in configure.in override this magic.
2759#
2760# If the default for a toolchain is to use GNU as and ld, and you don't
2761# want to do that, then you should use the --without-gnu-as and
2762# --without-gnu-ld options for the configure script.
2763
2764if test x${use_gnu_as} = x &&
2765 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2766 with_gnu_as=yes
2767 extra_host_args="$extra_host_args --with-gnu-as"
2768fi
2769
2770if test x${use_gnu_ld} = x &&
2771 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2772 with_gnu_ld=yes
2773 extra_host_args="$extra_host_args --with-gnu-ld"
2774fi
2775
2776# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2777# can detect this case.
2778
2779if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2780 with_newlib=yes
2781 extra_host_args="$extra_host_args --with-newlib"
2782fi
2783
a0da8069
NN
2784# Default to using --with-stabs for certain targets.
2785if test x${with_stabs} = x ; then
2786 case "${target}" in
e31d1ea3 2787 mips*-*-irix[56]*)
a0da8069
NN
2788 ;;
2789 mips*-*-* | alpha*-*-osf*)
2790 with_stabs=yes;
2791 extra_host_args="${extra_host_args} --with-stabs"
2792 ;;
2793 esac
2794fi
2795
2796# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2797# them automatically.
2798case "${host}" in
2799 hppa*64*-*-hpux11*)
2800 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2801 ;;
2802esac
2803
a0da8069
NN
2804# Some systems (e.g., one of the i386-aix systems the gas testers are
2805# using) don't handle "\$" correctly, so don't use it here.
61fa5f72 2806tooldir='${exec_prefix}'/${target_alias}
a0da8069
NN
2807build_tooldir=${tooldir}
2808
6a9cf61e
PB
2809# Generate default definitions for YACC, M4, LEX and other programs that run
2810# on the build machine. These are used if the Makefile can't locate these
2811# programs in objdir.
947f426e 2812MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
6a9cf61e
PB
2813for ac_prog in bison
2814do
2815# Extract the first word of "$ac_prog", so it can be a program name with args.
2816set dummy $ac_prog; ac_word=$2
2817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2818echo "configure:2819: checking for $ac_word" >&5
6a9cf61e
PB
2819if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
2821else
2822 if test -n "$CONFIGURED_BISON"; then
2823 ac_cv_prog_CONFIGURED_BISON="$CONFIGURED_BISON" # Let the user override the test.
2824else
2825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2826 ac_dummy="$PATH"
2827 for ac_dir in $ac_dummy; do
2828 test -z "$ac_dir" && ac_dir=.
2829 if test -f $ac_dir/$ac_word; then
2830 ac_cv_prog_CONFIGURED_BISON="$ac_prog"
2831 break
2832 fi
2833 done
2834 IFS="$ac_save_ifs"
2835fi
2836fi
2837CONFIGURED_BISON="$ac_cv_prog_CONFIGURED_BISON"
2838if test -n "$CONFIGURED_BISON"; then
2839 echo "$ac_t""$CONFIGURED_BISON" 1>&6
2840else
2841 echo "$ac_t""no" 1>&6
2842fi
2843
2844test -n "$CONFIGURED_BISON" && break
2845done
2846test -n "$CONFIGURED_BISON" || CONFIGURED_BISON="$MISSING bison"
2847
947f426e 2848for ac_prog in 'bison -y' byacc yacc
a0da8069 2849do
947f426e
NN
2850# Extract the first word of "$ac_prog", so it can be a program name with args.
2851set dummy $ac_prog; ac_word=$2
2852echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2853echo "configure:2854: checking for $ac_word" >&5
6a9cf61e 2854if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
947f426e
NN
2855 echo $ac_n "(cached) $ac_c" 1>&6
2856else
6a9cf61e
PB
2857 if test -n "$CONFIGURED_YACC"; then
2858 ac_cv_prog_CONFIGURED_YACC="$CONFIGURED_YACC" # Let the user override the test.
947f426e
NN
2859else
2860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2861 ac_dummy="$PATH"
2862 for ac_dir in $ac_dummy; do
2863 test -z "$ac_dir" && ac_dir=.
2864 if test -f $ac_dir/$ac_word; then
6a9cf61e 2865 ac_cv_prog_CONFIGURED_YACC="$ac_prog"
a0da8069
NN
2866 break
2867 fi
2868 done
947f426e
NN
2869 IFS="$ac_save_ifs"
2870fi
2871fi
6a9cf61e
PB
2872CONFIGURED_YACC="$ac_cv_prog_CONFIGURED_YACC"
2873if test -n "$CONFIGURED_YACC"; then
2874 echo "$ac_t""$CONFIGURED_YACC" 1>&6
947f426e
NN
2875else
2876 echo "$ac_t""no" 1>&6
2877fi
a0da8069 2878
6a9cf61e 2879test -n "$CONFIGURED_YACC" && break
a0da8069 2880done
6a9cf61e 2881test -n "$CONFIGURED_YACC" || CONFIGURED_YACC="$MISSING bison -y"
a0da8069 2882
947f426e 2883for ac_prog in gm4 gnum4 m4
a0da8069 2884do
947f426e
NN
2885# Extract the first word of "$ac_prog", so it can be a program name with args.
2886set dummy $ac_prog; ac_word=$2
2887echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2888echo "configure:2889: checking for $ac_word" >&5
6a9cf61e
PB
2889if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
2890 echo $ac_n "(cached) $ac_c" 1>&6
2891else
2892 if test -n "$CONFIGURED_M4"; then
2893 ac_cv_prog_CONFIGURED_M4="$CONFIGURED_M4" # Let the user override the test.
2894else
2895 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2896 ac_dummy="$PATH"
2897 for ac_dir in $ac_dummy; do
2898 test -z "$ac_dir" && ac_dir=.
2899 if test -f $ac_dir/$ac_word; then
2900 ac_cv_prog_CONFIGURED_M4="$ac_prog"
2901 break
2902 fi
2903 done
2904 IFS="$ac_save_ifs"
2905fi
2906fi
2907CONFIGURED_M4="$ac_cv_prog_CONFIGURED_M4"
2908if test -n "$CONFIGURED_M4"; then
2909 echo "$ac_t""$CONFIGURED_M4" 1>&6
2910else
2911 echo "$ac_t""no" 1>&6
2912fi
2913
2914test -n "$CONFIGURED_M4" && break
2915done
2916test -n "$CONFIGURED_M4" || CONFIGURED_M4="$MISSING m4"
2917
2918for ac_prog in flex
2919do
2920# Extract the first word of "$ac_prog", so it can be a program name with args.
2921set dummy $ac_prog; ac_word=$2
2922echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2923echo "configure:2924: checking for $ac_word" >&5
6a9cf61e 2924if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
947f426e
NN
2925 echo $ac_n "(cached) $ac_c" 1>&6
2926else
6a9cf61e
PB
2927 if test -n "$CONFIGURED_FLEX"; then
2928 ac_cv_prog_CONFIGURED_FLEX="$CONFIGURED_FLEX" # Let the user override the test.
947f426e
NN
2929else
2930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2931 ac_dummy="$PATH"
2932 for ac_dir in $ac_dummy; do
2933 test -z "$ac_dir" && ac_dir=.
2934 if test -f $ac_dir/$ac_word; then
6a9cf61e 2935 ac_cv_prog_CONFIGURED_FLEX="$ac_prog"
a0da8069
NN
2936 break
2937 fi
2938 done
947f426e
NN
2939 IFS="$ac_save_ifs"
2940fi
2941fi
6a9cf61e
PB
2942CONFIGURED_FLEX="$ac_cv_prog_CONFIGURED_FLEX"
2943if test -n "$CONFIGURED_FLEX"; then
2944 echo "$ac_t""$CONFIGURED_FLEX" 1>&6
947f426e
NN
2945else
2946 echo "$ac_t""no" 1>&6
2947fi
a0da8069 2948
6a9cf61e 2949test -n "$CONFIGURED_FLEX" && break
a0da8069 2950done
6a9cf61e 2951test -n "$CONFIGURED_FLEX" || CONFIGURED_FLEX="$MISSING flex"
a0da8069 2952
947f426e 2953for ac_prog in flex lex
a0da8069 2954do
947f426e
NN
2955# Extract the first word of "$ac_prog", so it can be a program name with args.
2956set dummy $ac_prog; ac_word=$2
2957echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2958echo "configure:2959: checking for $ac_word" >&5
6a9cf61e 2959if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
947f426e
NN
2960 echo $ac_n "(cached) $ac_c" 1>&6
2961else
6a9cf61e
PB
2962 if test -n "$CONFIGURED_LEX"; then
2963 ac_cv_prog_CONFIGURED_LEX="$CONFIGURED_LEX" # Let the user override the test.
947f426e
NN
2964else
2965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2966 ac_dummy="$PATH"
2967 for ac_dir in $ac_dummy; do
2968 test -z "$ac_dir" && ac_dir=.
2969 if test -f $ac_dir/$ac_word; then
6a9cf61e 2970 ac_cv_prog_CONFIGURED_LEX="$ac_prog"
a0da8069
NN
2971 break
2972 fi
2973 done
947f426e
NN
2974 IFS="$ac_save_ifs"
2975fi
2976fi
6a9cf61e
PB
2977CONFIGURED_LEX="$ac_cv_prog_CONFIGURED_LEX"
2978if test -n "$CONFIGURED_LEX"; then
2979 echo "$ac_t""$CONFIGURED_LEX" 1>&6
947f426e
NN
2980else
2981 echo "$ac_t""no" 1>&6
2982fi
a0da8069 2983
6a9cf61e 2984test -n "$CONFIGURED_LEX" && break
a0da8069 2985done
6a9cf61e
PB
2986test -n "$CONFIGURED_LEX" || CONFIGURED_LEX="$MISSING flex"
2987
2988for ac_prog in makeinfo
2989do
2990# Extract the first word of "$ac_prog", so it can be a program name with args.
2991set dummy $ac_prog; ac_word=$2
2992echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 2993echo "configure:2994: checking for $ac_word" >&5
6a9cf61e
PB
2994if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
2995 echo $ac_n "(cached) $ac_c" 1>&6
2996else
2997 if test -n "$CONFIGURED_MAKEINFO"; then
2998 ac_cv_prog_CONFIGURED_MAKEINFO="$CONFIGURED_MAKEINFO" # Let the user override the test.
2999else
3000 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3001 ac_dummy="$PATH"
3002 for ac_dir in $ac_dummy; do
3003 test -z "$ac_dir" && ac_dir=.
3004 if test -f $ac_dir/$ac_word; then
3005 ac_cv_prog_CONFIGURED_MAKEINFO="$ac_prog"
3006 break
3007 fi
3008 done
3009 IFS="$ac_save_ifs"
3010fi
3011fi
3012CONFIGURED_MAKEINFO="$ac_cv_prog_CONFIGURED_MAKEINFO"
3013if test -n "$CONFIGURED_MAKEINFO"; then
3014 echo "$ac_t""$CONFIGURED_MAKEINFO" 1>&6
3015else
3016 echo "$ac_t""no" 1>&6
3017fi
3018
3019test -n "$CONFIGURED_MAKEINFO" && break
3020done
3021test -n "$CONFIGURED_MAKEINFO" || CONFIGURED_MAKEINFO="$MISSING makeinfo"
947f426e 3022
a0da8069 3023
a0da8069
NN
3024# Create a .gdbinit file which runs the one in srcdir
3025# and tells GDB to look there for source files.
3026
3027if test -r ${srcdir}/.gdbinit ; then
3028 case ${srcdir} in
3029 .) ;;
3030 *) cat > ./.gdbinit <<EOF
3031# ${NO_EDIT}
3032dir ${srcdir}
3033dir .
3034source ${srcdir}/.gdbinit
3035EOF
3036 ;;
3037 esac
3038fi
3039
a0da8069
NN
3040# Make sure that the compiler is able to generate an executable. If it
3041# can't, we are probably in trouble. We don't care whether we can run the
3042# executable--we might be using a cross compiler--we only care whether it
3043# can be created. At this point the main configure script has set CC.
3044we_are_ok=no
3045echo "int main () { return 0; }" > conftest.c
3046${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
3047if test $? = 0 ; then
3048 if test -s conftest || test -s conftest.exe ; then
3049 we_are_ok=yes
3050 fi
3051fi
3052case $we_are_ok in
3053 no)
3054 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
3055 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
3056 rm -f conftest*
3057 exit 1
3058 ;;
3059esac
3060rm -f conftest*
3061
3062# The Solaris /usr/ucb/cc compiler does not appear to work.
3063case "${host}" in
3064 sparc-sun-solaris2*)
3065 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
3066 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
3067 could_use=
3068 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
3069 if test -d /opt/cygnus/bin ; then
3070 if test "$could_use" = "" ; then
3071 could_use="/opt/cygnus/bin"
3072 else
3073 could_use="$could_use or /opt/cygnus/bin"
3074 fi
3075 fi
3076 if test "$could_use" = "" ; then
3077 echo "Warning: compilation may fail because you're using"
3078 echo "/usr/ucb/cc. You should change your PATH or CC "
3079 echo "variable and rerun configure."
3080 else
3081 echo "Warning: compilation may fail because you're using"
3082 echo "/usr/ucb/cc, when you should use the C compiler from"
3083 echo "$could_use. You should change your"
3084 echo "PATH or CC variable and rerun configure."
3085 fi
3086 fi
3087 ;;
3088esac
3089
a0da8069
NN
3090case "${host}" in
3091 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
9a237d9e 3092 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
a0da8069
NN
3093 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
3094esac
3095
3096# Record target_configdirs and the configure arguments for target and
3097# build configuration in Makefile.
3098target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
6a9cf61e 3099build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
a0da8069 3100
a0da8069
NN
3101# Determine whether gdb needs tk/tcl or not.
3102# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
3103# and in that case we want gdb to be built without tk. Ugh!
3104# In fact I believe gdb is the *only* package directly dependent on tk,
3105# so we should be able to put the 'maybe's in unconditionally and
3106# leave out the maybe dependencies when enable_gdbtk is false. I'm not
3107# 100% sure that that's safe though.
c180f501 3108
675c6968 3109gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
a0da8069
NN
3110case "$enable_gdbtk" in
3111 no)
3112 GDB_TK="" ;;
c180f501
AC
3113 yes)
3114 GDB_TK="${gdb_tk}" ;;
a0da8069 3115 *)
c180f501
AC
3116 # Only add the dependency on gdbtk when GDBtk is part of the gdb
3117 # distro. Eventually someone will fix this and move Insight, nee
3118 # gdbtk to a separate directory.
3119 if test -d ${srcdir}/gdb/gdbtk ; then
3120 GDB_TK="${gdb_tk}"
3121 else
3122 GDB_TK=""
3123 fi
3124 ;;
a0da8069
NN
3125esac
3126
6bd3dfaa 3127# Strip out unwanted targets.
dd12c3a8
NN
3128
3129# While at that, we remove Makefiles if we were started for recursive
3130# configuration, so that the top-level Makefile reconfigures them,
3131# like we used to do when configure itself was recursive.
dd12c3a8 3132
6bd3dfaa
PB
3133# Loop over modules. $extrasub must be used with care, limiting as
3134# much as possible the usage of range addresses. That's because autoconf
3135# splits the sed script to overcome limits in the number of commands,
3136# and relying on carefully-timed sed passes may turn out to be very hard
3137# to maintain later. In this particular case, you just have to be careful
3138# not to nest @if/@endif pairs, because configure will not warn you at all.
dd12c3a8 3139
319cab08
PB
3140# Check whether --enable-bootstrap or --disable-bootstrap was given.
3141if test "${enable_bootstrap+set}" = set; then
3142 enableval="$enable_bootstrap"
3143 :
3144else
9cb3fa6f 3145 enable_bootstrap=default
319cab08
PB
3146fi
3147
319cab08 3148
9cb3fa6f
PB
3149# Issue errors and warnings for invalid/strange bootstrap combinations.
3150case "$configdirs" in
3151 *gcc*) have_compiler=yes ;;
3152 *) have_compiler=no ;;
3153esac
3154
3155case "$have_compiler:$host:$target:$enable_bootstrap" in
3156 *:*:*:no) ;;
3157
3158 # Default behavior. (We'll) enable bootstrap if we have a compiler
3159 # and we are in a native configuration.
3160 yes:$build:$build:default)
3161 # This will become 'yes'
3162 enable_bootstrap=no ;;
3163
3164 *:*:*:default)
3165 enable_bootstrap=no ;;
3166
3167 # We have a compiler and we are in a native configuration, bootstrap is ok
3168 yes:$build:$build:yes | yes:$build:$build:lean)
3169 ;;
3170
3171 # Other configurations, but we have a compiler. Assume the user knows
3172 # what he's doing.
3173 yes:*:*:yes | yes:*:*:lean)
3174 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
3175 ;;
3176
3177 # No compiler: if they passed --enable-bootstrap explicitly, fail
3178 no:*:*:yes | no:*:*:lean)
3179 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
3180
3181 # Fail if wrong command line
3182 *)
3183 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
3184 ;;
3185esac
3186
3187# Adjust the toplevel makefile according to whether bootstrap was selected.
319cab08
PB
3188case "$enable_bootstrap" in
3189 yes)
9cb3fa6f
PB
3190 bootstrap_lean='#'
3191 default_target=bootstrap
3192 bootstrap_suffix=bootstrap ;;
3193 lean)
3194 bootstrap_lean=''
f5f8a794 3195 default_target=bootstrap
498d4a71 3196 bootstrap_suffix=bootstrap ;;
319cab08
PB
3197 no)
3198 default_target=all
498d4a71 3199 bootstrap_suffix=no-bootstrap ;;
319cab08
PB
3200esac
3201
3202
9cb3fa6f 3203
6a9cf61e 3204for module in ${build_configdirs} ; do
498d4a71
CF
3205 if test -z "${no_recursion}" \
3206 && test -f ${build_subdir}/${module}/Makefile; then
3207 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3208 rm -f ${build_subdir}/${module}/Makefile
3209 fi
3210 extrasub="$extrasub
3211/^@if build-$module\$/d
3212/^@endif build-$module\$/d
3213/^@if build-$module-$bootstrap_suffix\$/d
3214/^@endif build-$module-$bootstrap_suffix\$/d"
3215done
3216for module in ${configdirs} ; do
3217 if test -z "${no_recursion}" \
3218 && test -f ${module}/Makefile; then
3219 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
3220 rm -f ${module}/Makefile
3221 fi
3222 extrasub="$extrasub
3223/^@if $module\$/d
3224/^@endif $module\$/d
3225/^@if $module-$bootstrap_suffix\$/d
3226/^@endif $module-$bootstrap_suffix\$/d"
3227done
3228for module in ${target_configdirs} ; do
3229 if test -z "${no_recursion}" \
3230 && test -f ${target_subdir}/${module}/Makefile; then
3231 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3232 rm -f ${target_subdir}/${module}/Makefile
3233 fi
3234 extrasub="$extrasub
3235/^@if target-$module\$/d
3236/^@endif target-$module\$/d
3237/^@if target-$module-$bootstrap_suffix\$/d
3238/^@endif target-$module-$bootstrap_suffix\$/d"
3239done
3240
6bd3dfaa
PB
3241extrasub="$extrasub
3242/^@if /,/^@endif /d"
a0da8069
NN
3243
3244# Create the serialization dependencies. This uses a temporary file.
3245
e6bfb94a
AO
3246# Check whether --enable-serial-configure or --disable-serial-configure was given.
3247if test "${enable_serial_configure+set}" = set; then
3248 enableval="$enable_serial_configure"
3249 :
3250fi
3251
3252
1047cb91
DD
3253case ${enable_serial_configure} in
3254 yes)
3255 enable_serial_build_configure=yes
3256 enable_serial_host_configure=yes
3257 enable_serial_target_configure=yes
3258 ;;
3259esac
3260
a0da8069
NN
3261# These force 'configure's to be done one at a time, to avoid problems
3262# with contention over a shared config.cache.
3263rm -f serdep.tmp
e6bfb94a 3264echo '# serdep.tmp' > serdep.tmp
a0da8069 3265olditem=
1047cb91 3266test "x${enable_serial_build_configure}" = xyes &&
a0da8069
NN
3267for item in ${build_configdirs} ; do
3268 case ${olditem} in
3269 "") ;;
e6bfb94a 3270 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3271 esac
3272 olditem=${item}
3273done
3274olditem=
1047cb91 3275test "x${enable_serial_host_configure}" = xyes &&
a0da8069
NN
3276for item in ${configdirs} ; do
3277 case ${olditem} in
3278 "") ;;
e6bfb94a 3279 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3280 esac
3281 olditem=${item}
3282done
3283olditem=
1047cb91 3284test "x${enable_serial_target_configure}" = xyes &&
a0da8069
NN
3285for item in ${target_configdirs} ; do
3286 case ${olditem} in
3287 "") ;;
e6bfb94a 3288 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
a0da8069
NN
3289 esac
3290 olditem=${item}
3291done
3292serialization_dependencies=serdep.tmp
3293
3294
e6bfb94a
AO
3295# Base args. Strip norecursion, cache-file, srcdir, host, build,
3296# target and nonopt. These are the ones we might not want to pass
f27d4f92
DJ
3297# down to subconfigures. Also strip program-prefix, program-suffix,
3298# and program-transform-name, so that we can pass down a consistent
3299# program-transform-name. If autoconf has put single quotes around
3300# any of these arguments (because they contain shell metacharacters)
3301# then this will fail; in practice this only happens for
3302# --program-transform-name, so be sure to override --program-transform-name
3303# at the end of the argument list.
3304# These will be expanded by make, so quote '$'.
d2cc0e0d 3305cat <<\EOF_SED > conftestsed
54752a6b
NN
3306s/ --no[^ ]*/ /g
3307s/ --c[a-z-]*[= ][^ ]*//g
3308s/ --sr[a-z-]*[= ][^ ]*//g
3309s/ --ho[a-z-]*[= ][^ ]*//g
3310s/ --bu[a-z-]*[= ][^ ]*//g
3311s/ --t[a-z-]*[= ][^ ]*//g
3312s/ --program-[pst][a-z-]*[= ][^ ]*//g
3313s/ -cache-file[= ][^ ]*//g
3314s/ -srcdir[= ][^ ]*//g
3315s/ -host[= ][^ ]*//g
3316s/ -build[= ][^ ]*//g
3317s/ -target[= ][^ ]*//g
3318s/ -program-prefix[= ][^ ]*//g
3319s/ -program-suffix[= ][^ ]*//g
3320s/ -program-transform-name[= ][^ ]*//g
d2cc0e0d
GK
3321s/ [^' -][^ ]* / /
3322s/^ *//;s/ *$//
8ff944f6
DJ
3323s,\$,$$,g
3324EOF_SED
3325sed -f conftestsed <<EOF_SED > conftestsed.out
3326 ${ac_configure_args}
d2cc0e0d 3327EOF_SED
8ff944f6
DJ
3328baseargs=`cat conftestsed.out`
3329rm -f conftestsed conftestsed.out
a0da8069 3330
f27d4f92
DJ
3331# Add in --program-transform-name, after --program-prefix and
3332# --program-suffix have been applied to it. Autoconf has already
3333# doubled dollar signs and backslashes in program_transform_name; we want
3334# the backslashes un-doubled, and then the entire thing wrapped in single
3335# quotes, because this will be expanded first by make and then by the shell.
3336# Also, because we want to override the logic in subdir configure scripts to
3337# choose program_transform_name, replace any s,x,x, with s,y,y,.
3338sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3339${program_transform_name}
3340EOF_SED
3341gcc_transform_name=`cat conftestsed.out`
3342rm -f conftestsed.out
3343baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3344
a0da8069
NN
3345# For the build-side libraries, we just need to pretend we're native,
3346# and not use the same cache file. Multilibs are neither needed nor
3347# desired.
69e57115 3348build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
a0da8069
NN
3349
3350# For host modules, accept cache file option, or specification as blank.
3351case "${cache_file}" in
3352"") # empty
3353 cache_file_option="" ;;
3354/* | [A-Za-z]:[\\/]* ) # absolute path
3355 cache_file_option="--cache-file=${cache_file}" ;;
3356*) # relative path
3357 cache_file_option="--cache-file=../${cache_file}" ;;
3358esac
3359
82252c06
NN
3360# Host dirs don't like to share a cache file either, horribly enough.
3361# This seems to be due to autoconf 2.5x stupidity.
bb5dca17 3362host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
a0da8069
NN
3363
3364target_configargs=${baseargs}
3365
3366# Passing a --with-cross-host argument lets the target libraries know
3367# whether they are being built with a cross-compiler or being built
3368# native. However, it would be better to use other mechanisms to make the
3369# sorts of decisions they want to make on this basis. Please consider
3370# this option to be deprecated. FIXME.
3371if test x${is_cross_compiler} = xyes ; then
3372 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3373fi
3374
3375# Default to --enable-multilib.
3376if test x${enable_multilib} = x ; then
3377 target_configargs="--enable-multilib ${target_configargs}"
3378fi
3379
3380# Pass --with-newlib if appropriate. Note that target_configdirs has
3381# changed from the earlier setting of with_newlib.
3382if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3383 target_configargs="--with-newlib ${target_configargs}"
3384fi
3385
95036d20
NN
3386# Different target subdirs use different values of certain variables
3387# (notably CXX). Worse, multilibs use *lots* of different values.
3388# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3389# it doesn't automatically accept command-line overrides of them.
3390# This means it's not safe for target subdirs to share a cache file,
3391# which is disgusting, but there you have it. Hopefully this can be
3392# fixed in future. It's still worthwhile to use a cache file for each
3393# directory. I think.
3394
ae380b45
MS
3395# Pass the appropriate --build, --host, --target and --cache-file arguments.
3396# We need to pass --target, as newer autoconf's requires consistency
3397# for target_alias and gcc doesn't manage it consistently.
3398target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
a0da8069 3399
a0da8069
NN
3400FLAGS_FOR_TARGET=
3401case " $target_configdirs " in
3402 *" newlib "*)
3403 case " $target_configargs " in
3404 *" --with-newlib "*)
3405 case "$target" in
3406 *-cygwin*)
564b43e5 3407 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include' ;;
a0da8069
NN
3408 esac
3409
3410 # If we're not building GCC, don't discard standard headers.
3411 if test -d ${srcdir}/gcc; then
3412 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3413
3414 if test "${build}" != "${host}"; then
3415 # On Canadian crosses, CC_FOR_TARGET will have already been set
3416 # by `configure', so we won't have an opportunity to add -Bgcc/
3417 # to it. This is right: we don't want to search that directory
3418 # for binaries, but we want the header files in there, so add
3419 # them explicitly.
b00612cc 3420 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
a0da8069
NN
3421
3422 # Someone might think of using the pre-installed headers on
3423 # Canadian crosses, in case the installed compiler is not fully
3424 # compatible with the compiler being built. In this case, it
3425 # would be better to flag an error than risking having
3426 # incompatible object files being constructed. We can't
3427 # guarantee that an error will be flagged, but let's hope the
3428 # compiler will do it, when presented with incompatible header
3429 # files.
3430 fi
3431 fi
3432
3433 case "${target}-${is_cross_compiler}" in
ec11bdc6 3434 i[3456789]86-*-linux*-no)
a0da8069
NN
3435 # Here host == target, so we don't need to build gcc,
3436 # so we don't want to discard standard headers.
3437 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3438 ;;
3439 *)
3440 # If we're building newlib, use its generic headers last, but search
3441 # for any libc-related directories first (so make it the last -B
3442 # switch).
3443 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3444 ;;
3445 esac
3446 ;;
3447 esac
3448 ;;
3449esac
3450
5fbad20a
DD
3451# Allow the user to override the flags for
3452# our build compiler if desired.
3453CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3454
a0da8069
NN
3455# On Canadian crosses, we'll be searching the right directories for
3456# the previously-installed cross compiler, so don't bother to add
3457# flags for directories within the install tree of the compiler
3458# being built; programs in there won't even run.
3459if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3460 # Search for pre-installed headers if nothing else fits.
bba45b8b 3461 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
a0da8069
NN
3462fi
3463
3464if test "x${use_gnu_ld}" = x &&
3465 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3466 # Arrange for us to find uninstalled linker scripts.
b00612cc 3467 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
a0da8069
NN
3468fi
3469
a0da8069 3470# Makefile fragments.
3e707e94
PB
3471for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3472do
3473 eval fragval=\$$frag
3474 if test $fragval != /dev/null; then
3475 eval $frag=${srcdir}/$fragval
3476 fi
3477done
a0da8069
NN
3478
3479
3480
3481
3482
3483# Miscellanea: directories, flags, etc.
3484
3485
3486
3487
3488
3489
3490
6a9cf61e 3491# Build module lists & subconfigure args.
a0da8069
NN
3492
3493
3494
a0da8069
NN
3495# Host module lists & subconfigure args.
3496
3497
3498
a0da8069
NN
3499# Target module lists & subconfigure args.
3500
3501
3502
a0da8069
NN
3503# Build tools.
3504
3505
3506
a0da8069 3507# Host tools.
859789af
AC
3508ncn_tool_prefix=
3509test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3510ncn_target_tool_prefix=
3511test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3512
05cbd757
PB
3513 for ncn_progname in ar; do
3514 if test -n "$ncn_tool_prefix"; then
3515 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3516set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3517echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3518echo "configure:3519: checking for $ac_word" >&5
859789af
AC
3519if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3520 echo $ac_n "(cached) $ac_c" 1>&6
3521else
3522 if test -n "$AR"; then
3523 ac_cv_prog_AR="$AR" # Let the user override the test.
3524else
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
05cbd757 3530 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3531 break
3532 fi
3533 done
3534 IFS="$ac_save_ifs"
3535fi
3536fi
3537AR="$ac_cv_prog_AR"
3538if test -n "$AR"; then
3539 echo "$ac_t""$AR" 1>&6
3540else
3541 echo "$ac_t""no" 1>&6
3542fi
3543
05cbd757
PB
3544 fi
3545 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3546 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3547set dummy ${ncn_progname}; ac_word=$2
859789af 3548echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3549echo "configure:3550: checking for $ac_word" >&5
05cbd757 3550if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
859789af
AC
3551 echo $ac_n "(cached) $ac_c" 1>&6
3552else
05cbd757
PB
3553 if test -n "$AR"; then
3554 ac_cv_prog_AR="$AR" # Let the user override the test.
859789af
AC
3555else
3556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3557 ac_dummy="$PATH"
3558 for ac_dir in $ac_dummy; do
3559 test -z "$ac_dir" && ac_dir=.
3560 if test -f $ac_dir/$ac_word; then
05cbd757 3561 ac_cv_prog_AR="${ncn_progname}"
859789af
AC
3562 break
3563 fi
3564 done
3565 IFS="$ac_save_ifs"
859789af
AC
3566fi
3567fi
05cbd757
PB
3568AR="$ac_cv_prog_AR"
3569if test -n "$AR"; then
3570 echo "$ac_t""$AR" 1>&6
859789af
AC
3571else
3572 echo "$ac_t""no" 1>&6
3573fi
3574
05cbd757
PB
3575 fi
3576 test -n "$ac_cv_prog_AR" && break
3577done
3578
3579if test -z "$ac_cv_prog_AR" ; then
3580 set dummy ar
3581 if test $build = $host ; then
3582 AR="$2"
859789af 3583 else
05cbd757 3584 AR="${ncn_tool_prefix}$2"
859789af 3585 fi
859789af
AC
3586fi
3587
05cbd757
PB
3588 for ncn_progname in as; do
3589 if test -n "$ncn_tool_prefix"; then
3590 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3591set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3592echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3593echo "configure:3594: checking for $ac_word" >&5
859789af
AC
3594if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
3596else
3597 if test -n "$AS"; then
3598 ac_cv_prog_AS="$AS" # Let the user override the test.
3599else
3600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3601 ac_dummy="$PATH"
3602 for ac_dir in $ac_dummy; do
3603 test -z "$ac_dir" && ac_dir=.
3604 if test -f $ac_dir/$ac_word; then
05cbd757 3605 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3606 break
3607 fi
3608 done
3609 IFS="$ac_save_ifs"
3610fi
3611fi
3612AS="$ac_cv_prog_AS"
3613if test -n "$AS"; then
3614 echo "$ac_t""$AS" 1>&6
3615else
3616 echo "$ac_t""no" 1>&6
3617fi
3618
05cbd757
PB
3619 fi
3620 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3621 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3622set dummy ${ncn_progname}; ac_word=$2
859789af 3623echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3624echo "configure:3625: checking for $ac_word" >&5
05cbd757 3625if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
859789af
AC
3626 echo $ac_n "(cached) $ac_c" 1>&6
3627else
05cbd757
PB
3628 if test -n "$AS"; then
3629 ac_cv_prog_AS="$AS" # Let the user override the test.
859789af
AC
3630else
3631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3632 ac_dummy="$PATH"
3633 for ac_dir in $ac_dummy; do
3634 test -z "$ac_dir" && ac_dir=.
3635 if test -f $ac_dir/$ac_word; then
05cbd757 3636 ac_cv_prog_AS="${ncn_progname}"
859789af
AC
3637 break
3638 fi
3639 done
3640 IFS="$ac_save_ifs"
859789af
AC
3641fi
3642fi
05cbd757
PB
3643AS="$ac_cv_prog_AS"
3644if test -n "$AS"; then
3645 echo "$ac_t""$AS" 1>&6
859789af
AC
3646else
3647 echo "$ac_t""no" 1>&6
3648fi
3649
05cbd757
PB
3650 fi
3651 test -n "$ac_cv_prog_AS" && break
3652done
3653
3654if test -z "$ac_cv_prog_AS" ; then
3655 set dummy as
3656 if test $build = $host ; then
3657 AS="$2"
859789af 3658 else
05cbd757 3659 AS="${ncn_tool_prefix}$2"
859789af 3660 fi
859789af
AC
3661fi
3662
05cbd757
PB
3663 for ncn_progname in dlltool; do
3664 if test -n "$ncn_tool_prefix"; then
3665 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3666set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3667echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3668echo "configure:3669: checking for $ac_word" >&5
859789af
AC
3669if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3670 echo $ac_n "(cached) $ac_c" 1>&6
3671else
3672 if test -n "$DLLTOOL"; then
3673 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3674else
3675 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3676 ac_dummy="$PATH"
3677 for ac_dir in $ac_dummy; do
3678 test -z "$ac_dir" && ac_dir=.
3679 if test -f $ac_dir/$ac_word; then
05cbd757 3680 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3681 break
3682 fi
3683 done
3684 IFS="$ac_save_ifs"
3685fi
3686fi
3687DLLTOOL="$ac_cv_prog_DLLTOOL"
3688if test -n "$DLLTOOL"; then
3689 echo "$ac_t""$DLLTOOL" 1>&6
3690else
3691 echo "$ac_t""no" 1>&6
3692fi
3693
05cbd757
PB
3694 fi
3695 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3696 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3697set dummy ${ncn_progname}; ac_word=$2
859789af 3698echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3699echo "configure:3700: checking for $ac_word" >&5
05cbd757 3700if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
859789af
AC
3701 echo $ac_n "(cached) $ac_c" 1>&6
3702else
05cbd757
PB
3703 if test -n "$DLLTOOL"; then
3704 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
859789af
AC
3705else
3706 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3707 ac_dummy="$PATH"
3708 for ac_dir in $ac_dummy; do
3709 test -z "$ac_dir" && ac_dir=.
3710 if test -f $ac_dir/$ac_word; then
05cbd757 3711 ac_cv_prog_DLLTOOL="${ncn_progname}"
859789af
AC
3712 break
3713 fi
3714 done
3715 IFS="$ac_save_ifs"
859789af
AC
3716fi
3717fi
05cbd757
PB
3718DLLTOOL="$ac_cv_prog_DLLTOOL"
3719if test -n "$DLLTOOL"; then
3720 echo "$ac_t""$DLLTOOL" 1>&6
859789af
AC
3721else
3722 echo "$ac_t""no" 1>&6
3723fi
3724
05cbd757
PB
3725 fi
3726 test -n "$ac_cv_prog_DLLTOOL" && break
3727done
3728
3729if test -z "$ac_cv_prog_DLLTOOL" ; then
3730 set dummy dlltool
3731 if test $build = $host ; then
3732 DLLTOOL="$2"
859789af 3733 else
05cbd757 3734 DLLTOOL="${ncn_tool_prefix}$2"
859789af 3735 fi
859789af
AC
3736fi
3737
05cbd757
PB
3738 for ncn_progname in ld; do
3739 if test -n "$ncn_tool_prefix"; then
3740 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3741set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3743echo "configure:3744: checking for $ac_word" >&5
859789af
AC
3744if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3745 echo $ac_n "(cached) $ac_c" 1>&6
3746else
3747 if test -n "$LD"; then
3748 ac_cv_prog_LD="$LD" # Let the user override the test.
3749else
3750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3751 ac_dummy="$PATH"
3752 for ac_dir in $ac_dummy; do
3753 test -z "$ac_dir" && ac_dir=.
3754 if test -f $ac_dir/$ac_word; then
05cbd757 3755 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3756 break
3757 fi
3758 done
3759 IFS="$ac_save_ifs"
3760fi
3761fi
3762LD="$ac_cv_prog_LD"
3763if test -n "$LD"; then
3764 echo "$ac_t""$LD" 1>&6
3765else
3766 echo "$ac_t""no" 1>&6
3767fi
3768
05cbd757
PB
3769 fi
3770 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
3771 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3772set dummy ${ncn_progname}; ac_word=$2
859789af 3773echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3774echo "configure:3775: checking for $ac_word" >&5
05cbd757 3775if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
859789af
AC
3776 echo $ac_n "(cached) $ac_c" 1>&6
3777else
05cbd757
PB
3778 if test -n "$LD"; then
3779 ac_cv_prog_LD="$LD" # Let the user override the test.
859789af
AC
3780else
3781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3782 ac_dummy="$PATH"
3783 for ac_dir in $ac_dummy; do
3784 test -z "$ac_dir" && ac_dir=.
3785 if test -f $ac_dir/$ac_word; then
05cbd757 3786 ac_cv_prog_LD="${ncn_progname}"
859789af
AC
3787 break
3788 fi
3789 done
3790 IFS="$ac_save_ifs"
859789af
AC
3791fi
3792fi
05cbd757
PB
3793LD="$ac_cv_prog_LD"
3794if test -n "$LD"; then
3795 echo "$ac_t""$LD" 1>&6
859789af
AC
3796else
3797 echo "$ac_t""no" 1>&6
3798fi
3799
05cbd757
PB
3800 fi
3801 test -n "$ac_cv_prog_LD" && break
3802done
3803
3804if test -z "$ac_cv_prog_LD" ; then
3805 set dummy ld
3806 if test $build = $host ; then
3807 LD="$2"
859789af 3808 else
05cbd757 3809 LD="${ncn_tool_prefix}$2"
859789af 3810 fi
859789af
AC
3811fi
3812
05cbd757
PB
3813 for ncn_progname in nm; do
3814 if test -n "$ncn_tool_prefix"; then
3815 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3816set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3818echo "configure:3819: checking for $ac_word" >&5
859789af
AC
3819if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
3820 echo $ac_n "(cached) $ac_c" 1>&6
3821else
3822 if test -n "$NM"; then
3823 ac_cv_prog_NM="$NM" # Let the user override the test.
3824else
3825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3826 ac_dummy="$PATH"
3827 for ac_dir in $ac_dummy; do
3828 test -z "$ac_dir" && ac_dir=.
3829 if test -f $ac_dir/$ac_word; then
05cbd757 3830 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3831 break
3832 fi
3833 done
3834 IFS="$ac_save_ifs"
3835fi
3836fi
3837NM="$ac_cv_prog_NM"
3838if test -n "$NM"; then
3839 echo "$ac_t""$NM" 1>&6
3840else
3841 echo "$ac_t""no" 1>&6
3842fi
3843
05cbd757
PB
3844 fi
3845 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
3846 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3847set dummy ${ncn_progname}; ac_word=$2
859789af 3848echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3849echo "configure:3850: checking for $ac_word" >&5
05cbd757 3850if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
859789af
AC
3851 echo $ac_n "(cached) $ac_c" 1>&6
3852else
05cbd757
PB
3853 if test -n "$NM"; then
3854 ac_cv_prog_NM="$NM" # Let the user override the test.
859789af
AC
3855else
3856 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3857 ac_dummy="$PATH"
3858 for ac_dir in $ac_dummy; do
3859 test -z "$ac_dir" && ac_dir=.
3860 if test -f $ac_dir/$ac_word; then
05cbd757 3861 ac_cv_prog_NM="${ncn_progname}"
859789af
AC
3862 break
3863 fi
3864 done
3865 IFS="$ac_save_ifs"
859789af
AC
3866fi
3867fi
05cbd757
PB
3868NM="$ac_cv_prog_NM"
3869if test -n "$NM"; then
3870 echo "$ac_t""$NM" 1>&6
859789af
AC
3871else
3872 echo "$ac_t""no" 1>&6
3873fi
3874
05cbd757
PB
3875 fi
3876 test -n "$ac_cv_prog_NM" && break
3877done
3878
3879if test -z "$ac_cv_prog_NM" ; then
3880 set dummy nm
3881 if test $build = $host ; then
3882 NM="$2"
859789af 3883 else
05cbd757 3884 NM="${ncn_tool_prefix}$2"
859789af 3885 fi
859789af
AC
3886fi
3887
05cbd757
PB
3888 for ncn_progname in ranlib; do
3889 if test -n "$ncn_tool_prefix"; then
3890 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3891set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3892echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3893echo "configure:3894: checking for $ac_word" >&5
859789af
AC
3894if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896else
3897 if test -n "$RANLIB"; then
3898 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3899else
3900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3901 ac_dummy="$PATH"
3902 for ac_dir in $ac_dummy; do
3903 test -z "$ac_dir" && ac_dir=.
3904 if test -f $ac_dir/$ac_word; then
05cbd757 3905 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3906 break
3907 fi
3908 done
3909 IFS="$ac_save_ifs"
3910fi
3911fi
3912RANLIB="$ac_cv_prog_RANLIB"
3913if test -n "$RANLIB"; then
3914 echo "$ac_t""$RANLIB" 1>&6
3915else
3916 echo "$ac_t""no" 1>&6
3917fi
3918
05cbd757
PB
3919 fi
3920 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
3921 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3922set dummy ${ncn_progname}; ac_word=$2
859789af 3923echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3924echo "configure:3925: checking for $ac_word" >&5
05cbd757 3925if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
859789af
AC
3926 echo $ac_n "(cached) $ac_c" 1>&6
3927else
05cbd757
PB
3928 if test -n "$RANLIB"; then
3929 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
859789af
AC
3930else
3931 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3932 ac_dummy="$PATH"
3933 for ac_dir in $ac_dummy; do
3934 test -z "$ac_dir" && ac_dir=.
3935 if test -f $ac_dir/$ac_word; then
05cbd757 3936 ac_cv_prog_RANLIB="${ncn_progname}"
859789af
AC
3937 break
3938 fi
3939 done
3940 IFS="$ac_save_ifs"
859789af
AC
3941fi
3942fi
05cbd757
PB
3943RANLIB="$ac_cv_prog_RANLIB"
3944if test -n "$RANLIB"; then
3945 echo "$ac_t""$RANLIB" 1>&6
859789af
AC
3946else
3947 echo "$ac_t""no" 1>&6
3948fi
3949
859789af 3950 fi
05cbd757
PB
3951 test -n "$ac_cv_prog_RANLIB" && break
3952done
3953
3954if test -z "$ac_cv_prog_RANLIB" ; then
3955 RANLIB=":"
859789af
AC
3956fi
3957
05cbd757
PB
3958 for ncn_progname in windres; do
3959 if test -n "$ncn_tool_prefix"; then
3960 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3961set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 3962echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3963echo "configure:3964: checking for $ac_word" >&5
859789af
AC
3964if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3965 echo $ac_n "(cached) $ac_c" 1>&6
3966else
3967 if test -n "$WINDRES"; then
3968 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3969else
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
05cbd757 3975 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
3976 break
3977 fi
3978 done
3979 IFS="$ac_save_ifs"
3980fi
3981fi
3982WINDRES="$ac_cv_prog_WINDRES"
3983if test -n "$WINDRES"; then
3984 echo "$ac_t""$WINDRES" 1>&6
3985else
3986 echo "$ac_t""no" 1>&6
3987fi
3988
05cbd757
PB
3989 fi
3990 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
3991 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3992set dummy ${ncn_progname}; ac_word=$2
859789af 3993echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 3994echo "configure:3995: checking for $ac_word" >&5
05cbd757 3995if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
859789af
AC
3996 echo $ac_n "(cached) $ac_c" 1>&6
3997else
05cbd757
PB
3998 if test -n "$WINDRES"; then
3999 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
859789af
AC
4000else
4001 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4002 ac_dummy="$PATH"
4003 for ac_dir in $ac_dummy; do
4004 test -z "$ac_dir" && ac_dir=.
4005 if test -f $ac_dir/$ac_word; then
05cbd757 4006 ac_cv_prog_WINDRES="${ncn_progname}"
859789af
AC
4007 break
4008 fi
4009 done
4010 IFS="$ac_save_ifs"
859789af
AC
4011fi
4012fi
05cbd757
PB
4013WINDRES="$ac_cv_prog_WINDRES"
4014if test -n "$WINDRES"; then
4015 echo "$ac_t""$WINDRES" 1>&6
859789af
AC
4016else
4017 echo "$ac_t""no" 1>&6
4018fi
4019
05cbd757
PB
4020 fi
4021 test -n "$ac_cv_prog_WINDRES" && break
4022done
4023
4024if test -z "$ac_cv_prog_WINDRES" ; then
4025 set dummy windres
4026 if test $build = $host ; then
4027 WINDRES="$2"
859789af 4028 else
05cbd757 4029 WINDRES="${ncn_tool_prefix}$2"
859789af 4030 fi
859789af
AC
4031fi
4032
05cbd757
PB
4033 for ncn_progname in objcopy; do
4034 if test -n "$ncn_tool_prefix"; then
4035 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4036set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4037echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4038echo "configure:4039: checking for $ac_word" >&5
859789af
AC
4039if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 if test -n "$OBJCOPY"; then
4043 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4044else
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
05cbd757 4050 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
4051 break
4052 fi
4053 done
4054 IFS="$ac_save_ifs"
4055fi
4056fi
4057OBJCOPY="$ac_cv_prog_OBJCOPY"
4058if test -n "$OBJCOPY"; then
4059 echo "$ac_t""$OBJCOPY" 1>&6
4060else
4061 echo "$ac_t""no" 1>&6
4062fi
4063
05cbd757
PB
4064 fi
4065 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4066 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4067set dummy ${ncn_progname}; ac_word=$2
859789af 4068echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4069echo "configure:4070: checking for $ac_word" >&5
05cbd757 4070if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
859789af
AC
4071 echo $ac_n "(cached) $ac_c" 1>&6
4072else
05cbd757
PB
4073 if test -n "$OBJCOPY"; then
4074 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
859789af
AC
4075else
4076 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4077 ac_dummy="$PATH"
4078 for ac_dir in $ac_dummy; do
4079 test -z "$ac_dir" && ac_dir=.
4080 if test -f $ac_dir/$ac_word; then
05cbd757 4081 ac_cv_prog_OBJCOPY="${ncn_progname}"
859789af
AC
4082 break
4083 fi
4084 done
4085 IFS="$ac_save_ifs"
859789af
AC
4086fi
4087fi
05cbd757
PB
4088OBJCOPY="$ac_cv_prog_OBJCOPY"
4089if test -n "$OBJCOPY"; then
4090 echo "$ac_t""$OBJCOPY" 1>&6
859789af
AC
4091else
4092 echo "$ac_t""no" 1>&6
4093fi
4094
05cbd757
PB
4095 fi
4096 test -n "$ac_cv_prog_OBJCOPY" && break
4097done
4098
4099if test -z "$ac_cv_prog_OBJCOPY" ; then
4100 set dummy objcopy
4101 if test $build = $host ; then
4102 OBJCOPY="$2"
859789af 4103 else
05cbd757 4104 OBJCOPY="${ncn_tool_prefix}$2"
859789af 4105 fi
859789af
AC
4106fi
4107
05cbd757
PB
4108 for ncn_progname in objdump; do
4109 if test -n "$ncn_tool_prefix"; then
4110 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4111set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4112echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4113echo "configure:4114: checking for $ac_word" >&5
859789af
AC
4114if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4115 echo $ac_n "(cached) $ac_c" 1>&6
4116else
4117 if test -n "$OBJDUMP"; then
4118 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4119else
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
05cbd757 4125 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
859789af
AC
4126 break
4127 fi
4128 done
4129 IFS="$ac_save_ifs"
4130fi
4131fi
4132OBJDUMP="$ac_cv_prog_OBJDUMP"
4133if test -n "$OBJDUMP"; then
4134 echo "$ac_t""$OBJDUMP" 1>&6
4135else
4136 echo "$ac_t""no" 1>&6
4137fi
4138
05cbd757
PB
4139 fi
4140 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4141 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4142set dummy ${ncn_progname}; ac_word=$2
859789af 4143echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4144echo "configure:4145: checking for $ac_word" >&5
05cbd757 4145if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
859789af
AC
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147else
05cbd757
PB
4148 if test -n "$OBJDUMP"; then
4149 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
859789af
AC
4150else
4151 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154 test -z "$ac_dir" && ac_dir=.
4155 if test -f $ac_dir/$ac_word; then
05cbd757 4156 ac_cv_prog_OBJDUMP="${ncn_progname}"
859789af
AC
4157 break
4158 fi
4159 done
4160 IFS="$ac_save_ifs"
859789af
AC
4161fi
4162fi
05cbd757
PB
4163OBJDUMP="$ac_cv_prog_OBJDUMP"
4164if test -n "$OBJDUMP"; then
4165 echo "$ac_t""$OBJDUMP" 1>&6
859789af
AC
4166else
4167 echo "$ac_t""no" 1>&6
4168fi
4169
05cbd757
PB
4170 fi
4171 test -n "$ac_cv_prog_OBJDUMP" && break
4172done
4173
4174if test -z "$ac_cv_prog_OBJDUMP" ; then
4175 set dummy objdump
4176 if test $build = $host ; then
4177 OBJDUMP="$2"
859789af 4178 else
05cbd757 4179 OBJDUMP="${ncn_tool_prefix}$2"
859789af 4180 fi
859789af
AC
4181fi
4182
a0da8069
NN
4183
4184
4185
4186
4187
4188
55db4b87
PB
4189# Target tools. Do the tests using the names they may have passed in
4190# the environment, then move it to CONFIGURED_*_FOR_TARGET.
05cbd757
PB
4191 for ncn_progname in ar; do
4192 if test -n "$ncn_target_tool_prefix"; then
4193 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4194set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4195echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4196echo "configure:4197: checking for $ac_word" >&5
55db4b87 4197if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4198 echo $ac_n "(cached) $ac_c" 1>&6
4199else
55db4b87
PB
4200 if test -n "$AR_FOR_TARGET"; then
4201 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
859789af
AC
4202else
4203 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4204 ac_dummy="$PATH"
4205 for ac_dir in $ac_dummy; do
4206 test -z "$ac_dir" && ac_dir=.
4207 if test -f $ac_dir/$ac_word; then
05cbd757 4208 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
4209 break
4210 fi
4211 done
4212 IFS="$ac_save_ifs"
4213fi
4214fi
55db4b87
PB
4215AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
4216if test -n "$AR_FOR_TARGET"; then
4217 echo "$ac_t""$AR_FOR_TARGET" 1>&6
859789af
AC
4218else
4219 echo "$ac_t""no" 1>&6
4220fi
4221
05cbd757
PB
4222 fi
4223 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
4224 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4225set dummy ${ncn_progname}; ac_word=$2
859789af 4226echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4227echo "configure:4228: checking for $ac_word" >&5
05cbd757 4228if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4229 echo $ac_n "(cached) $ac_c" 1>&6
4230else
05cbd757
PB
4231 if test -n "$AR_FOR_TARGET"; then
4232 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
859789af
AC
4233else
4234 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237 test -z "$ac_dir" && ac_dir=.
4238 if test -f $ac_dir/$ac_word; then
05cbd757 4239 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
859789af
AC
4240 break
4241 fi
4242 done
4243 IFS="$ac_save_ifs"
859789af
AC
4244fi
4245fi
05cbd757
PB
4246AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
4247if test -n "$AR_FOR_TARGET"; then
4248 echo "$ac_t""$AR_FOR_TARGET" 1>&6
859789af
AC
4249else
4250 echo "$ac_t""no" 1>&6
4251fi
4252
05cbd757
PB
4253 fi
4254 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
4255done
4256
4257if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
4258 set dummy ar
4259 if test $build = $target ; then
4260 AR_FOR_TARGET="$2"
859789af 4261 else
05cbd757 4262 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 4263 fi
859789af
AC
4264fi
4265
05cbd757
PB
4266 for ncn_progname in as; do
4267 if test -n "$ncn_target_tool_prefix"; then
4268 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4269set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4270echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4271echo "configure:4272: checking for $ac_word" >&5
55db4b87 4272if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4273 echo $ac_n "(cached) $ac_c" 1>&6
4274else
55db4b87
PB
4275 if test -n "$AS_FOR_TARGET"; then
4276 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
859789af
AC
4277else
4278 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4279 ac_dummy="$PATH"
4280 for ac_dir in $ac_dummy; do
4281 test -z "$ac_dir" && ac_dir=.
4282 if test -f $ac_dir/$ac_word; then
05cbd757 4283 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
4284 break
4285 fi
4286 done
4287 IFS="$ac_save_ifs"
4288fi
4289fi
55db4b87
PB
4290AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
4291if test -n "$AS_FOR_TARGET"; then
4292 echo "$ac_t""$AS_FOR_TARGET" 1>&6
859789af
AC
4293else
4294 echo "$ac_t""no" 1>&6
4295fi
4296
05cbd757
PB
4297 fi
4298 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
4299 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4300set dummy ${ncn_progname}; ac_word=$2
859789af 4301echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4302echo "configure:4303: checking for $ac_word" >&5
05cbd757 4303if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4304 echo $ac_n "(cached) $ac_c" 1>&6
4305else
05cbd757
PB
4306 if test -n "$AS_FOR_TARGET"; then
4307 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
859789af
AC
4308else
4309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4310 ac_dummy="$PATH"
4311 for ac_dir in $ac_dummy; do
4312 test -z "$ac_dir" && ac_dir=.
4313 if test -f $ac_dir/$ac_word; then
05cbd757 4314 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
859789af
AC
4315 break
4316 fi
4317 done
4318 IFS="$ac_save_ifs"
859789af
AC
4319fi
4320fi
05cbd757
PB
4321AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
4322if test -n "$AS_FOR_TARGET"; then
4323 echo "$ac_t""$AS_FOR_TARGET" 1>&6
859789af
AC
4324else
4325 echo "$ac_t""no" 1>&6
4326fi
4327
05cbd757
PB
4328 fi
4329 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
4330done
4331
4332if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
4333 set dummy as
4334 if test $build = $target ; then
4335 AS_FOR_TARGET="$2"
859789af 4336 else
05cbd757 4337 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 4338 fi
55db4b87
PB
4339fi
4340
05cbd757
PB
4341 for ncn_progname in cc gcc; do
4342 if test -n "$ncn_target_tool_prefix"; then
4343 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4344set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
55db4b87 4345echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4346echo "configure:4347: checking for $ac_word" >&5
55db4b87
PB
4347if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4348 echo $ac_n "(cached) $ac_c" 1>&6
4349else
4350 if test -n "$CC_FOR_TARGET"; then
4351 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4352else
4353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4354 ac_dummy="$PATH"
4355 for ac_dir in $ac_dummy; do
4356 test -z "$ac_dir" && ac_dir=.
4357 if test -f $ac_dir/$ac_word; then
05cbd757 4358 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
55db4b87
PB
4359 break
4360 fi
4361 done
4362 IFS="$ac_save_ifs"
4363fi
4364fi
4365CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4366if test -n "$CC_FOR_TARGET"; then
4367 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4368else
4369 echo "$ac_t""no" 1>&6
4370fi
4371
05cbd757
PB
4372 fi
4373 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4374 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4375set dummy ${ncn_progname}; ac_word=$2
55db4b87 4376echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4377echo "configure:4378: checking for $ac_word" >&5
05cbd757 4378if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
55db4b87
PB
4379 echo $ac_n "(cached) $ac_c" 1>&6
4380else
05cbd757
PB
4381 if test -n "$CC_FOR_TARGET"; then
4382 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
55db4b87
PB
4383else
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
05cbd757 4389 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
55db4b87
PB
4390 break
4391 fi
4392 done
4393 IFS="$ac_save_ifs"
55db4b87
PB
4394fi
4395fi
05cbd757
PB
4396CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4397if test -n "$CC_FOR_TARGET"; then
4398 echo "$ac_t""$CC_FOR_TARGET" 1>&6
55db4b87
PB
4399else
4400 echo "$ac_t""no" 1>&6
4401fi
4402
05cbd757
PB
4403 fi
4404 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4405done
4406
4407if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4408 set dummy cc gcc
4409 if test $build = $target ; then
4410 CC_FOR_TARGET="$2"
55db4b87 4411 else
05cbd757 4412 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4413 fi
55db4b87
PB
4414fi
4415
05cbd757
PB
4416 for ncn_progname in c++ g++ cxx gxx; do
4417 if test -n "$ncn_target_tool_prefix"; then
4418 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4419set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
55db4b87 4420echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4421echo "configure:4422: checking for $ac_word" >&5
55db4b87
PB
4422if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4423 echo $ac_n "(cached) $ac_c" 1>&6
4424else
4425 if test -n "$CXX_FOR_TARGET"; then
4426 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4427else
4428 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4429 ac_dummy="$PATH"
4430 for ac_dir in $ac_dummy; do
4431 test -z "$ac_dir" && ac_dir=.
4432 if test -f $ac_dir/$ac_word; then
05cbd757 4433 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
55db4b87
PB
4434 break
4435 fi
4436 done
4437 IFS="$ac_save_ifs"
4438fi
4439fi
4440CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4441if test -n "$CXX_FOR_TARGET"; then
4442 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4443else
4444 echo "$ac_t""no" 1>&6
4445fi
4446
05cbd757
PB
4447 fi
4448 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4449 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4450set dummy ${ncn_progname}; ac_word=$2
55db4b87 4451echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4452echo "configure:4453: checking for $ac_word" >&5
05cbd757 4453if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
55db4b87
PB
4454 echo $ac_n "(cached) $ac_c" 1>&6
4455else
05cbd757
PB
4456 if test -n "$CXX_FOR_TARGET"; then
4457 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
55db4b87
PB
4458else
4459 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4460 ac_dummy="$PATH"
4461 for ac_dir in $ac_dummy; do
4462 test -z "$ac_dir" && ac_dir=.
4463 if test -f $ac_dir/$ac_word; then
05cbd757 4464 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
55db4b87
PB
4465 break
4466 fi
4467 done
4468 IFS="$ac_save_ifs"
55db4b87
PB
4469fi
4470fi
05cbd757
PB
4471CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4472if test -n "$CXX_FOR_TARGET"; then
4473 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
55db4b87
PB
4474else
4475 echo "$ac_t""no" 1>&6
4476fi
4477
05cbd757
PB
4478 fi
4479 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4480done
4481
4482if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4483 set dummy c++ g++ cxx gxx
4484 if test $build = $target ; then
4485 CXX_FOR_TARGET="$2"
55db4b87 4486 else
05cbd757 4487 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4488 fi
859789af
AC
4489fi
4490
05cbd757
PB
4491 for ncn_progname in dlltool; do
4492 if test -n "$ncn_target_tool_prefix"; then
4493 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4494set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4495echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4496echo "configure:4497: checking for $ac_word" >&5
55db4b87 4497if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4498 echo $ac_n "(cached) $ac_c" 1>&6
4499else
55db4b87
PB
4500 if test -n "$DLLTOOL_FOR_TARGET"; then
4501 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
859789af
AC
4502else
4503 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4504 ac_dummy="$PATH"
4505 for ac_dir in $ac_dummy; do
4506 test -z "$ac_dir" && ac_dir=.
4507 if test -f $ac_dir/$ac_word; then
05cbd757 4508 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
4509 break
4510 fi
4511 done
4512 IFS="$ac_save_ifs"
4513fi
4514fi
55db4b87
PB
4515DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
4516if test -n "$DLLTOOL_FOR_TARGET"; then
4517 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
859789af
AC
4518else
4519 echo "$ac_t""no" 1>&6
4520fi
4521
05cbd757
PB
4522 fi
4523 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
4524 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4525set dummy ${ncn_progname}; ac_word=$2
859789af 4526echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4527echo "configure:4528: checking for $ac_word" >&5
05cbd757 4528if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4529 echo $ac_n "(cached) $ac_c" 1>&6
4530else
05cbd757
PB
4531 if test -n "$DLLTOOL_FOR_TARGET"; then
4532 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
859789af
AC
4533else
4534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4535 ac_dummy="$PATH"
4536 for ac_dir in $ac_dummy; do
4537 test -z "$ac_dir" && ac_dir=.
4538 if test -f $ac_dir/$ac_word; then
05cbd757 4539 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
859789af
AC
4540 break
4541 fi
4542 done
4543 IFS="$ac_save_ifs"
859789af
AC
4544fi
4545fi
05cbd757
PB
4546DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
4547if test -n "$DLLTOOL_FOR_TARGET"; then
4548 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
859789af
AC
4549else
4550 echo "$ac_t""no" 1>&6
4551fi
4552
05cbd757
PB
4553 fi
4554 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
4555done
4556
4557if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
4558 set dummy dlltool
4559 if test $build = $target ; then
4560 DLLTOOL_FOR_TARGET="$2"
859789af 4561 else
05cbd757 4562 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 4563 fi
55db4b87
PB
4564fi
4565
05cbd757
PB
4566 for ncn_progname in gcc; do
4567 if test -n "$ncn_target_tool_prefix"; then
4568 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4569set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
55db4b87 4570echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4571echo "configure:4572: checking for $ac_word" >&5
55db4b87
PB
4572if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4574else
4575 if test -n "$GCC_FOR_TARGET"; then
4576 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
4577else
4578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4579 ac_dummy="$PATH"
4580 for ac_dir in $ac_dummy; do
4581 test -z "$ac_dir" && ac_dir=.
4582 if test -f $ac_dir/$ac_word; then
05cbd757 4583 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
55db4b87
PB
4584 break
4585 fi
4586 done
4587 IFS="$ac_save_ifs"
4588fi
4589fi
4590GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4591if test -n "$GCC_FOR_TARGET"; then
4592 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
4593else
4594 echo "$ac_t""no" 1>&6
4595fi
4596
05cbd757
PB
4597 fi
4598 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4599 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4600set dummy ${ncn_progname}; ac_word=$2
55db4b87 4601echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4602echo "configure:4603: checking for $ac_word" >&5
05cbd757 4603if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
55db4b87
PB
4604 echo $ac_n "(cached) $ac_c" 1>&6
4605else
05cbd757
PB
4606 if test -n "$GCC_FOR_TARGET"; then
4607 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
55db4b87
PB
4608else
4609 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4610 ac_dummy="$PATH"
4611 for ac_dir in $ac_dummy; do
4612 test -z "$ac_dir" && ac_dir=.
4613 if test -f $ac_dir/$ac_word; then
05cbd757 4614 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
55db4b87
PB
4615 break
4616 fi
4617 done
4618 IFS="$ac_save_ifs"
55db4b87
PB
4619fi
4620fi
05cbd757
PB
4621GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4622if test -n "$GCC_FOR_TARGET"; then
4623 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
55db4b87
PB
4624else
4625 echo "$ac_t""no" 1>&6
4626fi
4627
55db4b87 4628 fi
05cbd757
PB
4629 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4630done
4631
4632if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4633 GCC_FOR_TARGET="${CC_FOR_TARGET}"
55db4b87
PB
4634fi
4635
05cbd757
PB
4636 for ncn_progname in gcj; do
4637 if test -n "$ncn_target_tool_prefix"; then
4638 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4639set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
55db4b87 4640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4641echo "configure:4642: checking for $ac_word" >&5
55db4b87
PB
4642if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4643 echo $ac_n "(cached) $ac_c" 1>&6
4644else
4645 if test -n "$GCJ_FOR_TARGET"; then
4646 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4647else
4648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4649 ac_dummy="$PATH"
4650 for ac_dir in $ac_dummy; do
4651 test -z "$ac_dir" && ac_dir=.
4652 if test -f $ac_dir/$ac_word; then
05cbd757 4653 ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
55db4b87
PB
4654 break
4655 fi
4656 done
4657 IFS="$ac_save_ifs"
4658fi
4659fi
4660GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4661if test -n "$GCJ_FOR_TARGET"; then
4662 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4663else
4664 echo "$ac_t""no" 1>&6
4665fi
4666
05cbd757
PB
4667 fi
4668 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4669 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4670set dummy ${ncn_progname}; ac_word=$2
55db4b87 4671echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4672echo "configure:4673: checking for $ac_word" >&5
05cbd757 4673if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
55db4b87
PB
4674 echo $ac_n "(cached) $ac_c" 1>&6
4675else
05cbd757
PB
4676 if test -n "$GCJ_FOR_TARGET"; then
4677 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
55db4b87
PB
4678else
4679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4680 ac_dummy="$PATH"
4681 for ac_dir in $ac_dummy; do
4682 test -z "$ac_dir" && ac_dir=.
4683 if test -f $ac_dir/$ac_word; then
05cbd757 4684 ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
55db4b87
PB
4685 break
4686 fi
4687 done
4688 IFS="$ac_save_ifs"
55db4b87
PB
4689fi
4690fi
05cbd757
PB
4691GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4692if test -n "$GCJ_FOR_TARGET"; then
4693 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
55db4b87
PB
4694else
4695 echo "$ac_t""no" 1>&6
4696fi
4697
05cbd757
PB
4698 fi
4699 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4700done
4701
4702if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4703 set dummy gcj
4704 if test $build = $target ; then
4705 GCJ_FOR_TARGET="$2"
55db4b87 4706 else
05cbd757 4707 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4708 fi
55db4b87
PB
4709fi
4710
05cbd757
PB
4711 for ncn_progname in gfortran; do
4712 if test -n "$ncn_target_tool_prefix"; then
4713 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4714set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
55db4b87 4715echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4716echo "configure:4717: checking for $ac_word" >&5
55db4b87
PB
4717if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
4718 echo $ac_n "(cached) $ac_c" 1>&6
4719else
4720 if test -n "$GFORTRAN_FOR_TARGET"; then
4721 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
4722else
4723 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4724 ac_dummy="$PATH"
4725 for ac_dir in $ac_dummy; do
4726 test -z "$ac_dir" && ac_dir=.
4727 if test -f $ac_dir/$ac_word; then
05cbd757 4728 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
55db4b87
PB
4729 break
4730 fi
4731 done
4732 IFS="$ac_save_ifs"
4733fi
4734fi
4735GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
4736if test -n "$GFORTRAN_FOR_TARGET"; then
4737 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
4738else
4739 echo "$ac_t""no" 1>&6
4740fi
4741
05cbd757
PB
4742 fi
4743 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
4744 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4745set dummy ${ncn_progname}; ac_word=$2
55db4b87 4746echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4747echo "configure:4748: checking for $ac_word" >&5
05cbd757 4748if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
55db4b87
PB
4749 echo $ac_n "(cached) $ac_c" 1>&6
4750else
05cbd757
PB
4751 if test -n "$GFORTRAN_FOR_TARGET"; then
4752 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
55db4b87
PB
4753else
4754 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4755 ac_dummy="$PATH"
4756 for ac_dir in $ac_dummy; do
4757 test -z "$ac_dir" && ac_dir=.
4758 if test -f $ac_dir/$ac_word; then
05cbd757 4759 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
55db4b87
PB
4760 break
4761 fi
4762 done
4763 IFS="$ac_save_ifs"
55db4b87
PB
4764fi
4765fi
05cbd757
PB
4766GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
4767if test -n "$GFORTRAN_FOR_TARGET"; then
4768 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
55db4b87
PB
4769else
4770 echo "$ac_t""no" 1>&6
4771fi
4772
05cbd757
PB
4773 fi
4774 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
4775done
4776
4777if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
4778 set dummy gfortran
4779 if test $build = $target ; then
4780 GFORTRAN_FOR_TARGET="$2"
55db4b87 4781 else
05cbd757 4782 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
55db4b87 4783 fi
859789af
AC
4784fi
4785
05cbd757
PB
4786 for ncn_progname in ld; do
4787 if test -n "$ncn_target_tool_prefix"; then
4788 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4789set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4790echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4791echo "configure:4792: checking for $ac_word" >&5
55db4b87 4792if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4793 echo $ac_n "(cached) $ac_c" 1>&6
4794else
55db4b87
PB
4795 if test -n "$LD_FOR_TARGET"; then
4796 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
859789af
AC
4797else
4798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4799 ac_dummy="$PATH"
4800 for ac_dir in $ac_dummy; do
4801 test -z "$ac_dir" && ac_dir=.
4802 if test -f $ac_dir/$ac_word; then
05cbd757 4803 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
4804 break
4805 fi
4806 done
4807 IFS="$ac_save_ifs"
4808fi
4809fi
55db4b87
PB
4810LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
4811if test -n "$LD_FOR_TARGET"; then
4812 echo "$ac_t""$LD_FOR_TARGET" 1>&6
859789af
AC
4813else
4814 echo "$ac_t""no" 1>&6
4815fi
4816
05cbd757
PB
4817 fi
4818 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
4819 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4820set dummy ${ncn_progname}; ac_word=$2
859789af 4821echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4822echo "configure:4823: checking for $ac_word" >&5
05cbd757 4823if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4824 echo $ac_n "(cached) $ac_c" 1>&6
4825else
05cbd757
PB
4826 if test -n "$LD_FOR_TARGET"; then
4827 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
859789af
AC
4828else
4829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4830 ac_dummy="$PATH"
4831 for ac_dir in $ac_dummy; do
4832 test -z "$ac_dir" && ac_dir=.
4833 if test -f $ac_dir/$ac_word; then
05cbd757 4834 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
859789af
AC
4835 break
4836 fi
4837 done
4838 IFS="$ac_save_ifs"
859789af
AC
4839fi
4840fi
05cbd757
PB
4841LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
4842if test -n "$LD_FOR_TARGET"; then
4843 echo "$ac_t""$LD_FOR_TARGET" 1>&6
859789af
AC
4844else
4845 echo "$ac_t""no" 1>&6
4846fi
4847
05cbd757
PB
4848 fi
4849 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
4850done
4851
4852if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
4853 set dummy ld
4854 if test $build = $target ; then
4855 LD_FOR_TARGET="$2"
859789af 4856 else
05cbd757 4857 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 4858 fi
859789af
AC
4859fi
4860
7e0f7140 4861 for ncn_progname in lipo; do
05cbd757
PB
4862 if test -n "$ncn_target_tool_prefix"; then
4863 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4864set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 4865echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
096f7d00 4866echo "configure:4867: checking for $ac_word" >&5
7e0f7140
GK
4867if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
4868 echo $ac_n "(cached) $ac_c" 1>&6
4869else
4870 if test -n "$LIPO_FOR_TARGET"; then
4871 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
4872else
4873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4874 ac_dummy="$PATH"
4875 for ac_dir in $ac_dummy; do
4876 test -z "$ac_dir" && ac_dir=.
4877 if test -f $ac_dir/$ac_word; then
4878 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4879 break
4880 fi
4881 done
4882 IFS="$ac_save_ifs"
4883fi
4884fi
4885LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
4886if test -n "$LIPO_FOR_TARGET"; then
4887 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
4888else
4889 echo "$ac_t""no" 1>&6
4890fi
4891
4892 fi
4893 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
4894 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4895set dummy ${ncn_progname}; ac_word=$2
4896echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4897echo "configure:4898: checking for $ac_word" >&5
4898if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
4899 echo $ac_n "(cached) $ac_c" 1>&6
4900else
4901 if test -n "$LIPO_FOR_TARGET"; then
4902 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
4903else
4904 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4905 ac_dummy="$PATH"
4906 for ac_dir in $ac_dummy; do
4907 test -z "$ac_dir" && ac_dir=.
4908 if test -f $ac_dir/$ac_word; then
4909 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
4910 break
4911 fi
4912 done
4913 IFS="$ac_save_ifs"
4914fi
4915fi
4916LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
4917if test -n "$LIPO_FOR_TARGET"; then
4918 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
4919else
4920 echo "$ac_t""no" 1>&6
4921fi
4922
4923 fi
4924 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
4925done
4926
4927if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
4928 set dummy lipo
4929 if test $build = $target ; then
4930 LIPO_FOR_TARGET="$2"
4931 else
4932 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
4933 fi
4934fi
4935
4936 for ncn_progname in nm; do
4937 if test -n "$ncn_target_tool_prefix"; then
4938 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4939set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4940echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4941echo "configure:4942: checking for $ac_word" >&5
55db4b87 4942if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4943 echo $ac_n "(cached) $ac_c" 1>&6
4944else
55db4b87
PB
4945 if test -n "$NM_FOR_TARGET"; then
4946 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af
AC
4947else
4948 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4949 ac_dummy="$PATH"
4950 for ac_dir in $ac_dummy; do
4951 test -z "$ac_dir" && ac_dir=.
4952 if test -f $ac_dir/$ac_word; then
05cbd757 4953 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
4954 break
4955 fi
4956 done
4957 IFS="$ac_save_ifs"
4958fi
4959fi
55db4b87
PB
4960NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
4961if test -n "$NM_FOR_TARGET"; then
4962 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af
AC
4963else
4964 echo "$ac_t""no" 1>&6
4965fi
4966
05cbd757
PB
4967 fi
4968 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
4969 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4970set dummy ${ncn_progname}; ac_word=$2
859789af 4971echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7e0f7140 4972echo "configure:4973: checking for $ac_word" >&5
05cbd757 4973if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
4974 echo $ac_n "(cached) $ac_c" 1>&6
4975else
05cbd757
PB
4976 if test -n "$NM_FOR_TARGET"; then
4977 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
859789af
AC
4978else
4979 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4980 ac_dummy="$PATH"
4981 for ac_dir in $ac_dummy; do
4982 test -z "$ac_dir" && ac_dir=.
4983 if test -f $ac_dir/$ac_word; then
05cbd757 4984 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
859789af
AC
4985 break
4986 fi
4987 done
4988 IFS="$ac_save_ifs"
859789af
AC
4989fi
4990fi
05cbd757
PB
4991NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
4992if test -n "$NM_FOR_TARGET"; then
4993 echo "$ac_t""$NM_FOR_TARGET" 1>&6
859789af
AC
4994else
4995 echo "$ac_t""no" 1>&6
4996fi
4997
05cbd757
PB
4998 fi
4999 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
5000done
5001
5002if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
5003 set dummy nm
5004 if test $build = $target ; then
5005 NM_FOR_TARGET="$2"
859789af 5006 else
05cbd757 5007 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 5008 fi
859789af
AC
5009fi
5010
05cbd757
PB
5011 for ncn_progname in ranlib; do
5012 if test -n "$ncn_target_tool_prefix"; then
5013 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5014set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 5015echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7e0f7140 5016echo "configure:5017: checking for $ac_word" >&5
55db4b87 5017if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
5018 echo $ac_n "(cached) $ac_c" 1>&6
5019else
55db4b87
PB
5020 if test -n "$RANLIB_FOR_TARGET"; then
5021 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af
AC
5022else
5023 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5024 ac_dummy="$PATH"
5025 for ac_dir in $ac_dummy; do
5026 test -z "$ac_dir" && ac_dir=.
5027 if test -f $ac_dir/$ac_word; then
05cbd757 5028 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
5029 break
5030 fi
5031 done
5032 IFS="$ac_save_ifs"
5033fi
5034fi
55db4b87
PB
5035RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
5036if test -n "$RANLIB_FOR_TARGET"; then
5037 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af
AC
5038else
5039 echo "$ac_t""no" 1>&6
5040fi
5041
05cbd757
PB
5042 fi
5043 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
5044 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5045set dummy ${ncn_progname}; ac_word=$2
859789af 5046echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7e0f7140 5047echo "configure:5048: checking for $ac_word" >&5
05cbd757 5048if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
5049 echo $ac_n "(cached) $ac_c" 1>&6
5050else
05cbd757
PB
5051 if test -n "$RANLIB_FOR_TARGET"; then
5052 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
859789af
AC
5053else
5054 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5055 ac_dummy="$PATH"
5056 for ac_dir in $ac_dummy; do
5057 test -z "$ac_dir" && ac_dir=.
5058 if test -f $ac_dir/$ac_word; then
05cbd757 5059 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
859789af
AC
5060 break
5061 fi
5062 done
5063 IFS="$ac_save_ifs"
859789af
AC
5064fi
5065fi
05cbd757
PB
5066RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
5067if test -n "$RANLIB_FOR_TARGET"; then
5068 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
859789af
AC
5069else
5070 echo "$ac_t""no" 1>&6
5071fi
5072
859789af 5073 fi
05cbd757
PB
5074 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
5075done
5076
5077if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
5078 RANLIB_FOR_TARGET=":"
859789af
AC
5079fi
5080
7e0f7140
GK
5081 for ncn_progname in strip; do
5082 if test -n "$ncn_target_tool_prefix"; then
5083 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5084set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5085echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5086echo "configure:5087: checking for $ac_word" >&5
5087if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
5088 echo $ac_n "(cached) $ac_c" 1>&6
5089else
5090 if test -n "$STRIP_FOR_TARGET"; then
5091 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
5092else
5093 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5094 ac_dummy="$PATH"
5095 for ac_dir in $ac_dummy; do
5096 test -z "$ac_dir" && ac_dir=.
5097 if test -f $ac_dir/$ac_word; then
5098 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5099 break
5100 fi
5101 done
5102 IFS="$ac_save_ifs"
5103fi
5104fi
5105STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
5106if test -n "$STRIP_FOR_TARGET"; then
5107 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
5108else
5109 echo "$ac_t""no" 1>&6
5110fi
5111
5112 fi
5113 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
5114 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5115set dummy ${ncn_progname}; ac_word=$2
5116echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5117echo "configure:5118: checking for $ac_word" >&5
5118if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120else
5121 if test -n "$STRIP_FOR_TARGET"; then
5122 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
5123else
5124 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5125 ac_dummy="$PATH"
5126 for ac_dir in $ac_dummy; do
5127 test -z "$ac_dir" && ac_dir=.
5128 if test -f $ac_dir/$ac_word; then
5129 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
5130 break
5131 fi
5132 done
5133 IFS="$ac_save_ifs"
5134fi
5135fi
5136STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
5137if test -n "$STRIP_FOR_TARGET"; then
5138 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
5139else
5140 echo "$ac_t""no" 1>&6
5141fi
5142
5143 fi
5144 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
5145done
5146
5147if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
5148 set dummy strip
5149 if test $build = $target ; then
5150 STRIP_FOR_TARGET="$2"
5151 else
5152 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
5153 fi
5154fi
5155
05cbd757
PB
5156 for ncn_progname in windres; do
5157 if test -n "$ncn_target_tool_prefix"; then
5158 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5159set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
859789af 5160echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7e0f7140 5161echo "configure:5162: checking for $ac_word" >&5
55db4b87 5162if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
5163 echo $ac_n "(cached) $ac_c" 1>&6
5164else
55db4b87
PB
5165 if test -n "$WINDRES_FOR_TARGET"; then
5166 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af
AC
5167else
5168 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5169 ac_dummy="$PATH"
5170 for ac_dir in $ac_dummy; do
5171 test -z "$ac_dir" && ac_dir=.
5172 if test -f $ac_dir/$ac_word; then
05cbd757 5173 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
859789af
AC
5174 break
5175 fi
5176 done
5177 IFS="$ac_save_ifs"
5178fi
5179fi
55db4b87
PB
5180WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
5181if test -n "$WINDRES_FOR_TARGET"; then
5182 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af
AC
5183else
5184 echo "$ac_t""no" 1>&6
5185fi
5186
05cbd757
PB
5187 fi
5188 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
5189 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5190set dummy ${ncn_progname}; ac_word=$2
859789af 5191echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7e0f7140 5192echo "configure:5193: checking for $ac_word" >&5
05cbd757 5193if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
859789af
AC
5194 echo $ac_n "(cached) $ac_c" 1>&6
5195else
05cbd757
PB
5196 if test -n "$WINDRES_FOR_TARGET"; then
5197 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
859789af
AC
5198else
5199 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5200 ac_dummy="$PATH"
5201 for ac_dir in $ac_dummy; do
5202 test -z "$ac_dir" && ac_dir=.
5203 if test -f $ac_dir/$ac_word; then
05cbd757 5204 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
859789af
AC
5205 break
5206 fi
5207 done
5208 IFS="$ac_save_ifs"
859789af
AC
5209fi
5210fi
05cbd757
PB
5211WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
5212if test -n "$WINDRES_FOR_TARGET"; then
5213 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
859789af
AC
5214else
5215 echo "$ac_t""no" 1>&6
5216fi
5217
05cbd757
PB
5218 fi
5219 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
5220done
5221
5222if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
5223 set dummy windres
5224 if test $build = $target ; then
5225 WINDRES_FOR_TARGET="$2"
859789af 5226 else
05cbd757 5227 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
859789af 5228 fi
859789af
AC
5229fi
5230
852e5f18 5231
55db4b87
PB
5232CONFIGURED_AR_FOR_TARGET="$AR_FOR_TARGET"
5233CONFIGURED_AS_FOR_TARGET="$AS_FOR_TARGET"
5234CONFIGURED_CC_FOR_TARGET="$CC_FOR_TARGET"
5235CONFIGURED_CXX_FOR_TARGET="$CXX_FOR_TARGET"
5236CONFIGURED_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET"
5237CONFIGURED_GCC_FOR_TARGET="$GCC_FOR_TARGET"
5238CONFIGURED_GCJ_FOR_TARGET="$GCJ_FOR_TARGET"
5239CONFIGURED_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET"
5240CONFIGURED_LD_FOR_TARGET="$LD_FOR_TARGET"
7e0f7140 5241CONFIGURED_LIPO_FOR_TARGET="$LIPO_FOR_TARGET"
55db4b87
PB
5242CONFIGURED_NM_FOR_TARGET="$NM_FOR_TARGET"
5243CONFIGURED_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET"
7e0f7140 5244CONFIGURED_STRIP_FOR_TARGET="$STRIP_FOR_TARGET"
55db4b87 5245CONFIGURED_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET"
252b5132 5246
a0da8069 5247
4b1cb4fe 5248
a0da8069
NN
5249# Fix up target tools.
5250if test "x${build}" = "x${host}" ; then
5251 # In this case, the newly built tools can and should be used,
5252 # so we override the results of the autoconf tests.
5253 # This should really only happen when the tools are actually being built,
5254 # but that's a further refinement. The new build scheme, where
5255 # tools are built into a structure paralleling where they're installed,
5256 # should also eliminate all of this cleanly.
5257 AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
5258 AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
55db4b87
PB
5259 CC_FOR_TARGET="\$(USUAL_CC_FOR_TARGET)"
5260 CXX_FOR_TARGET="\$(USUAL_CXX_FOR_TARGET)"
5261 RAW_CXX_FOR_TARGET="\$(USUAL_RAW_CXX_FOR_TARGET)"
a0da8069 5262 DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
55db4b87
PB
5263 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
5264 GCJ_FOR_TARGET="\$(USUAL_GCJ_FOR_TARGET)"
5265 GFORTRAN_FOR_TARGET="\$(USUAL_GFORTRAN_FOR_TARGET)"
a0da8069 5266 LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
7e0f7140 5267 LIPO_FOR_TARGET="\$(USUAL_LIPO_FOR_TARGET)"
a0da8069
NN
5268 NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
5269 RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
7e0f7140 5270 STRIP_FOR_TARGET="\$(USUAL_STRIP_FOR_TARGET)"
a0da8069 5271 WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
54752a6b
NN
5272else
5273 # Just use the ones we found.
5274 AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
5275 AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
55db4b87
PB
5276 CC_FOR_TARGET="\$(CONFIGURED_CC_FOR_TARGET)"
5277 CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)"
5278 RAW_CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)"
54752a6b 5279 DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
55db4b87
PB
5280 GCC_FOR_TARGET="\$(CONFIGURED_GCC_FOR_TARGET)"
5281 GCJ_FOR_TARGET="\$(CONFIGURED_GCJ_FOR_TARGET)"
5282 GFORTRAN_FOR_TARGET="\$(CONFIGURED_GFORTRAN_FOR_TARGET)"
54752a6b 5283 LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
7e0f7140 5284 LIPO_FOR_TARGET="\$(CONFIGURED_LIPO_FOR_TARGET)"
54752a6b
NN
5285 NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
5286 RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
7e0f7140 5287 STRIP_FOR_TARGET="\$(CONFIGURED_STRIP_FOR_TARGET)"
54752a6b 5288 WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"
a0da8069 5289fi
54752a6b
NN
5290
5291
5292
a0da8069
NN
5293# Certain tools may need extra flags.
5294AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
5295RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
5296NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
5297
3d5e36ae 5298echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7e0f7140 5299echo "configure:5300: checking whether to enable maintainer-specific portions of Makefiles" >&5
3d5e36ae
AO
5300# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
5301if test "${enable_maintainer_mode+set}" = set; then
5302 enableval="$enable_maintainer_mode"
5303 USE_MAINTAINER_MODE=$enableval
5304else
5305 USE_MAINTAINER_MODE=no
5306fi
5307
5308echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
5309
5310
5311if test "$USE_MAINTAINER_MODE" = yes; then
5312 MAINTAINER_MODE_TRUE=
5313 MAINTAINER_MODE_FALSE='#'
5314else
5315 MAINTAINER_MODE_TRUE='#'
5316 MAINTAINER_MODE_FALSE=
5317fi
5318MAINT=$MAINTAINER_MODE_TRUE
5319
1d39f329
NN
5320# ---------------------
5321# GCC bootstrap support
5322# ---------------------
5323
5324# Stage specific cflags for build.
5325stage1_cflags="-g"
5326case $build in
5327 vax-*-*)
5328 case ${GCC} in
5329 yes) stage1_cflags="-g -Wa,-J" ;;
5330 *) stage1_cflags="-g -J" ;;
5331 esac ;;
5332 powerpc-*-darwin*)
5333 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
5334 # sources; use -no-cpp-precomp to get to GNU cpp.
5335 # Apple's GCC has bugs in designated initializer handling, so disable
5336 # that too.
5337 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
5338 ;;
5339esac
5340
5341
dfdffa2c 5342# It makes debugging easier if we create as symlinks the stage directories
9cb3fa6f 5343# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
dfdffa2c
PB
5344# possible, however, we can resort to mv.
5345echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
7e0f7140 5346echo "configure:5347: checking if symbolic links between directories work" >&5
dfdffa2c
PB
5347if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
5348 echo $ac_n "(cached) $ac_c" 1>&6
5349else
5350 if test "${LN_S}" = "ln -s" \
5351 && mkdir confdir.s1 \
5352 && ln -s confdir.s1 confdir.s2 \
5353 && echo timestamp1 > confdir.s1/conftest.1 \
5354 && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \
5355 && echo timestamp2 > confdir.s2/conftest.2 \
5356 && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \
5357 && rm -f confdir.s2; then
5358 gcc_cv_prog_ln_s_dir=yes
5359else
b00612cc 5360 gcc_cv_prog_ln_s_dir=no
dfdffa2c
PB
5361fi
5362rm -rf confdir.s1 confdir.s2
5363fi
5364
5365echo "$ac_t""$gcc_cv_prog_ln_s_dir" 1>&6
5366
5367case ${gcc_cv_prog_ln_s_dir} in
5368 yes)
5369 CREATE_LINK_TO_DIR='ln -s $$1 $$2'
5370 UNDO_LINK_TO_DIR='rm -f $$1' ;;
5371 *)
5372 CREATE_LINK_TO_DIR='mv $$1 $$2'
5373 UNDO_LINK_TO_DIR='mv $$1 $$2' ;;
5374esac
5375
5376
5377
1d39f329
NN
5378# Enable -Werror in bootstrap stage2 and later.
5379# Change the default to "no" on release branches.
5380# Check whether --enable-werror or --disable-werror was given.
5381if test "${enable_werror+set}" = set; then
5382 enableval="$enable_werror"
5383 :
5384else
5385 enable_werror=yes
5386fi
5387
1a6f2dc7
NN
5388case ${enable_werror} in
5389 yes) stage2_werror_flag="--enable-werror-always" ;;
5390 *) stage2_werror_flag="" ;;
1d39f329
NN
5391esac
5392
5393
a0da8069
NN
5394trap '' 1 2 15
5395cat > confcache <<\EOF
5396# This file is a shell script that caches the results of configure
5397# tests run on this system so they can be shared between configure
5398# scripts and configure runs. It is not useful on other systems.
5399# If it contains results you don't want to keep, you may remove or edit it.
5400#
5401# By default, configure uses ./config.cache as the cache file,
5402# creating it if it does not exist already. You can give configure
5403# the --cache-file=FILE option to use a different cache file; that is
5404# what configure does when it calls configure scripts in
5405# subdirectories, so they share the cache.
5406# Giving --cache-file=/dev/null disables caching, for debugging configure.
5407# config.status only pays attention to the cache file if you give it the
5408# --recheck option to rerun configure.
5409#
252b5132 5410EOF
a0da8069
NN
5411# The following way of writing the cache mishandles newlines in values,
5412# but we know of no workaround that is simple, portable, and efficient.
5413# So, don't put newlines in cache variables' values.
5414# Ultrix sh set writes to stderr and can't be redirected directly,
5415# and sets the high bit in the cache file unless we assign to the vars.
5416(set) 2>&1 |
5417 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5418 *ac_space=\ *)
5419 # `set' does not quote correctly, so add quotes (double-quote substitution
5420 # turns \\\\ into \\, and sed turns \\ into \).
5421 sed -n \
5422 -e "s/'/'\\\\''/g" \
5423 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
852e5f18 5424 ;;
a0da8069
NN
5425 *)
5426 # `set' quotes correctly as required by POSIX, so do not add quotes.
5427 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5428 ;;
5429 esac >> confcache
5430if cmp -s $cache_file confcache; then
5431 :
5432else
5433 if test -w $cache_file; then
5434 echo "updating cache $cache_file"
5435 cat confcache > $cache_file
5436 else
5437 echo "not updating unwritable cache $cache_file"
5438 fi
852e5f18 5439fi
a0da8069 5440rm -f confcache
852e5f18 5441
a0da8069 5442trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
852e5f18 5443
a0da8069
NN
5444test "x$prefix" = xNONE && prefix=$ac_default_prefix
5445# Let make expand exec_prefix.
5446test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
852e5f18 5447
a0da8069
NN
5448# Any assignment to VPATH causes Sun make to only execute
5449# the first set of double-colon rules, so remove it if not needed.
5450# If there is a colon in the path, we need to keep it.
5451if test "x$srcdir" = x.; then
5452 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5453fi
252b5132 5454
a0da8069
NN
5455trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5456
5457# Transform confdefs.h into DEFS.
5458# Protect against shell expansion while executing Makefile rules.
5459# Protect against Makefile macro expansion.
55db4b87
PB
5460cat > conftest.defs <<\EOF
5461s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
5462s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
5463s%\[%\\&%g
5464s%\]%\\&%g
5465s%\$%$$%g
5466EOF
5467DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
5468rm -f conftest.defs
852e5f18 5469
852e5f18 5470
a0da8069
NN
5471# Without the "./", some shells look in PATH for config.status.
5472: ${CONFIG_STATUS=./config.status}
852e5f18 5473
a0da8069
NN
5474echo creating $CONFIG_STATUS
5475rm -f $CONFIG_STATUS
5476cat > $CONFIG_STATUS <<EOF
5477#! /bin/sh
5478# Generated automatically by configure.
5479# Run this file to recreate the current configuration.
5480# This directory was configured as follows,
5481# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5482#
5483# $0 $ac_configure_args
5484#
5485# Compiler output produced by configure, useful for debugging
5486# configure, is in ./config.log if it exists.
852e5f18 5487
a0da8069
NN
5488ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5489for ac_option
5490do
5491 case "\$ac_option" in
5492 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5493 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5494 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5495 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5496 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5497 exit 0 ;;
5498 -help | --help | --hel | --he | --h)
5499 echo "\$ac_cs_usage"; exit 0 ;;
5500 *) echo "\$ac_cs_usage"; exit 1 ;;
852e5f18 5501 esac
a0da8069 5502done
852e5f18 5503
a0da8069 5504ac_given_srcdir=$srcdir
e5c3f801 5505ac_given_INSTALL="$INSTALL"
852e5f18 5506
a0da8069
NN
5507trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5508EOF
5509cat >> $CONFIG_STATUS <<EOF
5510
5511# Protect against being on the right side of a sed subst in config.status.
5512sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5513 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5514$ac_vpsub
5515$extrasub
5516s%@SHELL@%$SHELL%g
5517s%@CFLAGS@%$CFLAGS%g
5518s%@CPPFLAGS@%$CPPFLAGS%g
5519s%@CXXFLAGS@%$CXXFLAGS%g
5520s%@FFLAGS@%$FFLAGS%g
5521s%@DEFS@%$DEFS%g
5522s%@LDFLAGS@%$LDFLAGS%g
5523s%@LIBS@%$LIBS%g
5524s%@exec_prefix@%$exec_prefix%g
5525s%@prefix@%$prefix%g
5526s%@program_transform_name@%$program_transform_name%g
5527s%@bindir@%$bindir%g
5528s%@sbindir@%$sbindir%g
5529s%@libexecdir@%$libexecdir%g
5530s%@datadir@%$datadir%g
5531s%@sysconfdir@%$sysconfdir%g
5532s%@sharedstatedir@%$sharedstatedir%g
5533s%@localstatedir@%$localstatedir%g
5534s%@libdir@%$libdir%g
5535s%@includedir@%$includedir%g
5536s%@oldincludedir@%$oldincludedir%g
5537s%@infodir@%$infodir%g
5538s%@mandir@%$mandir%g
5539s%@host@%$host%g
5540s%@host_alias@%$host_alias%g
5541s%@host_cpu@%$host_cpu%g
5542s%@host_vendor@%$host_vendor%g
5543s%@host_os@%$host_os%g
5544s%@target@%$target%g
5545s%@target_alias@%$target_alias%g
5546s%@target_cpu@%$target_cpu%g
5547s%@target_vendor@%$target_vendor%g
5548s%@target_os@%$target_os%g
5549s%@build@%$build%g
5550s%@build_alias@%$build_alias%g
5551s%@build_cpu@%$build_cpu%g
5552s%@build_vendor@%$build_vendor%g
5553s%@build_os@%$build_os%g
e5c3f801
NN
5554s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5555s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5556s%@INSTALL_DATA@%$INSTALL_DATA%g
656fdd47 5557s%@LN@%$LN%g
dfdffa2c 5558s%@LN_S@%$LN_S%g
586c0873 5559s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
dd12c3a8
NN
5560s%@build_subdir@%$build_subdir%g
5561s%@host_subdir@%$host_subdir%g
5562s%@target_subdir@%$target_subdir%g
9e07f89d
NN
5563s%@CC@%$CC%g
5564s%@GNATBIND@%$GNATBIND%g
b8908782 5565s%@do_compare@%$do_compare%g
4b1cb4fe
DD
5566s%@gmplibs@%$gmplibs%g
5567s%@gmpinc@%$gmpinc%g
1d39f329 5568s%@stage1_languages@%$stage1_languages%g
a19b6204 5569s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
6a9cf61e
PB
5570s%@CONFIGURED_BISON@%$CONFIGURED_BISON%g
5571s%@CONFIGURED_YACC@%$CONFIGURED_YACC%g
5572s%@CONFIGURED_M4@%$CONFIGURED_M4%g
5573s%@CONFIGURED_FLEX@%$CONFIGURED_FLEX%g
5574s%@CONFIGURED_LEX@%$CONFIGURED_LEX%g
5575s%@CONFIGURED_MAKEINFO@%$CONFIGURED_MAKEINFO%g
9cb3fa6f 5576s%@bootstrap_lean@%$bootstrap_lean%g
319cab08 5577s%@default_target@%$default_target%g
a0da8069
NN
5578/@serialization_dependencies@/r $serialization_dependencies
5579s%@serialization_dependencies@%%g
5580/@host_makefile_frag@/r $host_makefile_frag
5581s%@host_makefile_frag@%%g
5582/@target_makefile_frag@/r $target_makefile_frag
5583s%@target_makefile_frag@%%g
5584/@alphaieee_frag@/r $alphaieee_frag
5585s%@alphaieee_frag@%%g
5586/@ospace_frag@/r $ospace_frag
5587s%@ospace_frag@%%g
a0da8069
NN
5588s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
5589s%@BUILD_PREFIX@%$BUILD_PREFIX%g
5590s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
a0da8069
NN
5591s%@tooldir@%$tooldir%g
5592s%@build_tooldir@%$build_tooldir%g
5593s%@GDB_TK@%$GDB_TK%g
a0da8069 5594s%@build_configargs@%$build_configargs%g
6a9cf61e 5595s%@build_configdirs@%$build_configdirs%g
a0da8069
NN
5596s%@host_configargs@%$host_configargs%g
5597s%@configdirs@%$configdirs%g
a0da8069
NN
5598s%@target_configargs@%$target_configargs%g
5599s%@target_configdirs@%$target_configdirs%g
a0da8069 5600s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
a0da8069 5601s%@config_shell@%$config_shell%g
859789af 5602s%@AR@%$AR%g
859789af 5603s%@AS@%$AS%g
859789af 5604s%@DLLTOOL@%$DLLTOOL%g
859789af 5605s%@LD@%$LD%g
859789af 5606s%@NM@%$NM%g
859789af 5607s%@RANLIB@%$RANLIB%g
859789af 5608s%@WINDRES@%$WINDRES%g
859789af 5609s%@OBJCOPY@%$OBJCOPY%g
859789af 5610s%@OBJDUMP@%$OBJDUMP%g
a0da8069 5611s%@CXX@%$CXX%g
5fbad20a 5612s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
55db4b87 5613s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
55db4b87 5614s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
55db4b87 5615s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
55db4b87 5616s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
55db4b87 5617s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
55db4b87 5618s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
55db4b87 5619s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
55db4b87 5620s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
55db4b87 5621s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7e0f7140 5622s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
55db4b87 5623s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
55db4b87 5624s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7e0f7140 5625s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
55db4b87 5626s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
54752a6b 5627s%@CONFIGURED_AR_FOR_TARGET@%$CONFIGURED_AR_FOR_TARGET%g
54752a6b 5628s%@CONFIGURED_AS_FOR_TARGET@%$CONFIGURED_AS_FOR_TARGET%g
55db4b87
PB
5629s%@CONFIGURED_CC_FOR_TARGET@%$CONFIGURED_CC_FOR_TARGET%g
5630s%@CONFIGURED_CXX_FOR_TARGET@%$CONFIGURED_CXX_FOR_TARGET%g
54752a6b 5631s%@CONFIGURED_DLLTOOL_FOR_TARGET@%$CONFIGURED_DLLTOOL_FOR_TARGET%g
55db4b87
PB
5632s%@CONFIGURED_GCC_FOR_TARGET@%$CONFIGURED_GCC_FOR_TARGET%g
5633s%@CONFIGURED_GCJ_FOR_TARGET@%$CONFIGURED_GCJ_FOR_TARGET%g
5634s%@CONFIGURED_GFORTRAN_FOR_TARGET@%$CONFIGURED_GFORTRAN_FOR_TARGET%g
54752a6b 5635s%@CONFIGURED_LD_FOR_TARGET@%$CONFIGURED_LD_FOR_TARGET%g
7e0f7140 5636s%@CONFIGURED_LIPO_FOR_TARGET@%$CONFIGURED_LIPO_FOR_TARGET%g
54752a6b 5637s%@CONFIGURED_NM_FOR_TARGET@%$CONFIGURED_NM_FOR_TARGET%g
54752a6b 5638s%@CONFIGURED_RANLIB_FOR_TARGET@%$CONFIGURED_RANLIB_FOR_TARGET%g
7e0f7140 5639s%@CONFIGURED_STRIP_FOR_TARGET@%$CONFIGURED_STRIP_FOR_TARGET%g
54752a6b 5640s%@CONFIGURED_WINDRES_FOR_TARGET@%$CONFIGURED_WINDRES_FOR_TARGET%g
a0da8069 5641s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
a0da8069 5642s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
3d5e36ae
AO
5643s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5644s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5645s%@MAINT@%$MAINT%g
1d39f329 5646s%@stage1_cflags@%$stage1_cflags%g
dfdffa2c
PB
5647s%@CREATE_LINK_TO_DIR@%$CREATE_LINK_TO_DIR%g
5648s%@UNDO_LINK_TO_DIR@%$UNDO_LINK_TO_DIR%g
1a6f2dc7 5649s%@stage2_werror_flag@%$stage2_werror_flag%g
a0da8069
NN
5650
5651CEOF
5652EOF
252b5132 5653
a0da8069
NN
5654cat >> $CONFIG_STATUS <<\EOF
5655
5656# Split the substitutions into bite-sized pieces for seds with
5657# small command number limits, like on Digital OSF/1 and HP-UX.
5658ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5659ac_file=1 # Number of current file.
5660ac_beg=1 # First line for current file.
5661ac_end=$ac_max_sed_cmds # Line after last line for current file.
5662ac_more_lines=:
5663ac_sed_cmds=""
5664while $ac_more_lines; do
5665 if test $ac_beg -gt 1; then
5666 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5667 else
5668 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
852e5f18 5669 fi
a0da8069
NN
5670 if test ! -s conftest.s$ac_file; then
5671 ac_more_lines=false
5672 rm -f conftest.s$ac_file
5673 else
5674 if test -z "$ac_sed_cmds"; then
5675 ac_sed_cmds="sed -f conftest.s$ac_file"
5676 else
5677 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5678 fi
5679 ac_file=`expr $ac_file + 1`
5680 ac_beg=$ac_end
5681 ac_end=`expr $ac_end + $ac_max_sed_cmds`
852e5f18 5682 fi
a0da8069
NN
5683done
5684if test -z "$ac_sed_cmds"; then
5685 ac_sed_cmds=cat
852e5f18 5686fi
a0da8069 5687EOF
252b5132 5688
a0da8069 5689cat >> $CONFIG_STATUS <<EOF
252b5132 5690
a0da8069
NN
5691CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5692EOF
5693cat >> $CONFIG_STATUS <<\EOF
5694for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5695 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5696 case "$ac_file" in
5697 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5698 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5699 *) ac_file_in="${ac_file}.in" ;;
5700 esac
252b5132 5701
a0da8069 5702 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
252b5132 5703
a0da8069
NN
5704 # Remove last slash and all that follows it. Not all systems have dirname.
5705 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5706 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5707 # The file is in a subdirectory.
5708 test ! -d "$ac_dir" && mkdir "$ac_dir"
5709 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5710 # A "../" for each directory in $ac_dir_suffix.
5711 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5712 else
5713 ac_dir_suffix= ac_dots=
5714 fi
252b5132 5715
a0da8069
NN
5716 case "$ac_given_srcdir" in
5717 .) srcdir=.
5718 if test -z "$ac_dots"; then top_srcdir=.
5719 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5720 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5721 *) # Relative path.
5722 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5723 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5724 esac
252b5132 5725
e5c3f801
NN
5726 case "$ac_given_INSTALL" in
5727 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5728 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5729 esac
252b5132 5730
a0da8069
NN
5731 echo creating "$ac_file"
5732 rm -f "$ac_file"
5733 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5734 case "$ac_file" in
5735 *Makefile*) ac_comsub="1i\\
5736# $configure_input" ;;
5737 *) ac_comsub= ;;
5738 esac
252b5132 5739
c148b4cb
CV
5740 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5741 sed -e "$ac_comsub
5742s%@configure_input@%$configure_input%g
5743s%@srcdir@%$srcdir%g
5744s%@top_srcdir@%$top_srcdir%g
5745s%@INSTALL@%$INSTALL%g
5746" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5747fi; done
5748rm -f conftest.s*
5749
5750EOF
5751cat >> $CONFIG_STATUS <<EOF
5752
5753EOF
5754cat >> $CONFIG_STATUS <<\EOF
5755
5756exit 0
5757EOF
5758chmod +x $CONFIG_STATUS
5759rm -fr confdefs* $ac_clean_files
5760test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5761