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