OSDN Git Service

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