OSDN Git Service

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