OSDN Git Service

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