OSDN Git Service

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