OSDN Git Service

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