OSDN Git Service

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