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