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