OSDN Git Service

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