OSDN Git Service

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