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