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