OSDN Git Service

2006-06-06 David Ayers <d.ayers@inode.at>
[pf3gnuchains/gcc-fork.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-libada        Builds libada directory"
16 ac_help="$ac_help
17   --enable-libssp        Builds libssp directory"
18 ac_help="$ac_help
19   --with-datarootdir   Use datarootdir as the data root directory."
20 ac_help="$ac_help
21   --with-docdir        Install documentation in this directory."
22 ac_help="$ac_help
23   --with-htmldir       Install html in this directory."
24 ac_help="$ac_help
25   --with-mpfr-dir=PATH    Specify source directory for MPFR library"
26 ac_help="$ac_help
27   --with-mpfr=PATH        Specify directory for installed MPFR library"
28 ac_help="$ac_help
29   --with-gmp-dir=PATH     Specify source directory for GMP library"
30 ac_help="$ac_help
31   --with-gmp=PATH         Specify directory for installed GMP library"
32 ac_help="$ac_help
33   --enable-objc-gc       enable the use of Boehm's garbage collector with
34                           the GNU Objective-C runtime."
35 ac_help="$ac_help
36   --with-build-sysroot=sysroot
37                           use sysroot as the system root during the build"
38 ac_help="$ac_help
39   --enable-bootstrap           Enable bootstrapping [yes if native build]"
40 ac_help="$ac_help
41   --enable-serial-[{host,target,build}-]configure
42                           Force sequential configuration of
43                           sub-packages for the host, target or build
44                           machine, or all sub-packages"
45 ac_help="$ac_help
46   --with-build-time-tools=path
47                           use given path to find target tools during the build"
48 ac_help="$ac_help
49   --enable-maintainer-mode enable make rules and dependencies not useful
50                           (and sometimes confusing) to the casual installer"
51 ac_help="$ac_help
52   --enable-werror         enable -Werror in bootstrap stage2 and later"
53
54 # Initialize some variables set by options.
55 # The variables have the same names as the options, with
56 # dashes changed to underlines.
57 build=NONE
58 cache_file=./config.cache
59 exec_prefix=NONE
60 host=NONE
61 no_create=
62 nonopt=NONE
63 no_recursion=
64 prefix=NONE
65 program_prefix=NONE
66 program_suffix=NONE
67 program_transform_name=s,x,x,
68 silent=
69 site=
70 srcdir=
71 target=NONE
72 verbose=
73 x_includes=NONE
74 x_libraries=NONE
75 bindir='${exec_prefix}/bin'
76 sbindir='${exec_prefix}/sbin'
77 libexecdir='${exec_prefix}/libexec'
78 datadir='${prefix}/share'
79 sysconfdir='${prefix}/etc'
80 sharedstatedir='${prefix}/com'
81 localstatedir='${prefix}/var'
82 libdir='${exec_prefix}/lib'
83 includedir='${prefix}/include'
84 oldincludedir='/usr/include'
85 infodir='${prefix}/info'
86 mandir='${prefix}/man'
87
88 # Initialize some other variables.
89 subdirs=
90 MFLAGS= MAKEFLAGS=
91 SHELL=${CONFIG_SHELL-/bin/sh}
92 # Maximum number of lines to put in a shell here document.
93 ac_max_here_lines=12
94
95 ac_prev=
96 for ac_option
97 do
98
99   # If the previous option needs an argument, assign it.
100   if test -n "$ac_prev"; then
101     eval "$ac_prev=\$ac_option"
102     ac_prev=
103     continue
104   fi
105
106   case "$ac_option" in
107   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
108   *) ac_optarg= ;;
109   esac
110
111   # Accept the important Cygnus configure options, so we can diagnose typos.
112
113   case "$ac_option" in
114
115   -bindir | --bindir | --bindi | --bind | --bin | --bi)
116     ac_prev=bindir ;;
117   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
118     bindir="$ac_optarg" ;;
119
120   -build | --build | --buil | --bui | --bu)
121     ac_prev=build ;;
122   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
123     build="$ac_optarg" ;;
124
125   -cache-file | --cache-file | --cache-fil | --cache-fi \
126   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
127     ac_prev=cache_file ;;
128   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
129   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
130     cache_file="$ac_optarg" ;;
131
132   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
133     ac_prev=datadir ;;
134   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
135   | --da=*)
136     datadir="$ac_optarg" ;;
137
138   -disable-* | --disable-*)
139     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
140     # Reject names that are not valid shell variable names.
141     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
142       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143     fi
144     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145     eval "enable_${ac_feature}=no" ;;
146
147   -enable-* | --enable-*)
148     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
149     # Reject names that are not valid shell variable names.
150     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
151       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152     fi
153     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154     case "$ac_option" in
155       *=*) ;;
156       *) ac_optarg=yes ;;
157     esac
158     eval "enable_${ac_feature}='$ac_optarg'" ;;
159
160   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
161   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
162   | --exec | --exe | --ex)
163     ac_prev=exec_prefix ;;
164   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
165   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
166   | --exec=* | --exe=* | --ex=*)
167     exec_prefix="$ac_optarg" ;;
168
169   -gas | --gas | --ga | --g)
170     # Obsolete; use --with-gas.
171     with_gas=yes ;;
172
173   -help | --help | --hel | --he)
174     # Omit some internal or obsolete options to make the list less imposing.
175     # This message is too long to be a string in the A/UX 3.1 sh.
176     cat << EOF
177 Usage: configure [options] [host]
178 Options: [defaults in brackets after descriptions]
179 Configuration:
180   --cache-file=FILE       cache test results in FILE
181   --help                  print this message
182   --no-create             do not create output files
183   --quiet, --silent       do not print \`checking...' messages
184   --version               print the version of autoconf that created configure
185 Directory and file names:
186   --prefix=PREFIX         install architecture-independent files in PREFIX
187                           [$ac_default_prefix]
188   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
189                           [same as prefix]
190   --bindir=DIR            user executables in DIR [EPREFIX/bin]
191   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
192   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
193   --datadir=DIR           read-only architecture-independent data in DIR
194                           [PREFIX/share]
195   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
196   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
197                           [PREFIX/com]
198   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
199   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
200   --includedir=DIR        C header files in DIR [PREFIX/include]
201   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
202   --infodir=DIR           info documentation in DIR [PREFIX/info]
203   --mandir=DIR            man documentation in DIR [PREFIX/man]
204   --srcdir=DIR            find the sources in DIR [configure dir or ..]
205   --program-prefix=PREFIX prepend PREFIX to installed program names
206   --program-suffix=SUFFIX append SUFFIX to installed program names
207   --program-transform-name=PROGRAM
208                           run sed PROGRAM on installed program names
209 EOF
210     cat << EOF
211 Host type:
212   --build=BUILD           configure for building on BUILD [BUILD=HOST]
213   --host=HOST             configure for HOST [guessed]
214   --target=TARGET         configure for TARGET [TARGET=HOST]
215 Features and packages:
216   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
217   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
218   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
219   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
220   --x-includes=DIR        X include files are in DIR
221   --x-libraries=DIR       X library files are in DIR
222 EOF
223     if test -n "$ac_help"; then
224       echo "--enable and --with options recognized:$ac_help"
225     fi
226     exit 0 ;;
227
228   -host | --host | --hos | --ho)
229     ac_prev=host ;;
230   -host=* | --host=* | --hos=* | --ho=*)
231     host="$ac_optarg" ;;
232
233   -includedir | --includedir | --includedi | --included | --include \
234   | --includ | --inclu | --incl | --inc)
235     ac_prev=includedir ;;
236   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
237   | --includ=* | --inclu=* | --incl=* | --inc=*)
238     includedir="$ac_optarg" ;;
239
240   -infodir | --infodir | --infodi | --infod | --info | --inf)
241     ac_prev=infodir ;;
242   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
243     infodir="$ac_optarg" ;;
244
245   -libdir | --libdir | --libdi | --libd)
246     ac_prev=libdir ;;
247   -libdir=* | --libdir=* | --libdi=* | --libd=*)
248     libdir="$ac_optarg" ;;
249
250   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
251   | --libexe | --libex | --libe)
252     ac_prev=libexecdir ;;
253   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
254   | --libexe=* | --libex=* | --libe=*)
255     libexecdir="$ac_optarg" ;;
256
257   -localstatedir | --localstatedir | --localstatedi | --localstated \
258   | --localstate | --localstat | --localsta | --localst \
259   | --locals | --local | --loca | --loc | --lo)
260     ac_prev=localstatedir ;;
261   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
262   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
263   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
264     localstatedir="$ac_optarg" ;;
265
266   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
267     ac_prev=mandir ;;
268   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
269     mandir="$ac_optarg" ;;
270
271   -nfp | --nfp | --nf)
272     # Obsolete; use --without-fp.
273     with_fp=no ;;
274
275   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
276   | --no-cr | --no-c)
277     no_create=yes ;;
278
279   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
280   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
281     no_recursion=yes ;;
282
283   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
284   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
285   | --oldin | --oldi | --old | --ol | --o)
286     ac_prev=oldincludedir ;;
287   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
288   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
289   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
290     oldincludedir="$ac_optarg" ;;
291
292   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
293     ac_prev=prefix ;;
294   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
295     prefix="$ac_optarg" ;;
296
297   -program-prefix | --program-prefix | --program-prefi | --program-pref \
298   | --program-pre | --program-pr | --program-p)
299     ac_prev=program_prefix ;;
300   -program-prefix=* | --program-prefix=* | --program-prefi=* \
301   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
302     program_prefix="$ac_optarg" ;;
303
304   -program-suffix | --program-suffix | --program-suffi | --program-suff \
305   | --program-suf | --program-su | --program-s)
306     ac_prev=program_suffix ;;
307   -program-suffix=* | --program-suffix=* | --program-suffi=* \
308   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
309     program_suffix="$ac_optarg" ;;
310
311   -program-transform-name | --program-transform-name \
312   | --program-transform-nam | --program-transform-na \
313   | --program-transform-n | --program-transform- \
314   | --program-transform | --program-transfor \
315   | --program-transfo | --program-transf \
316   | --program-trans | --program-tran \
317   | --progr-tra | --program-tr | --program-t)
318     ac_prev=program_transform_name ;;
319   -program-transform-name=* | --program-transform-name=* \
320   | --program-transform-nam=* | --program-transform-na=* \
321   | --program-transform-n=* | --program-transform-=* \
322   | --program-transform=* | --program-transfor=* \
323   | --program-transfo=* | --program-transf=* \
324   | --program-trans=* | --program-tran=* \
325   | --progr-tra=* | --program-tr=* | --program-t=*)
326     program_transform_name="$ac_optarg" ;;
327
328   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
329   | -silent | --silent | --silen | --sile | --sil)
330     silent=yes ;;
331
332   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
333     ac_prev=sbindir ;;
334   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
335   | --sbi=* | --sb=*)
336     sbindir="$ac_optarg" ;;
337
338   -sharedstatedir | --sharedstatedir | --sharedstatedi \
339   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
340   | --sharedst | --shareds | --shared | --share | --shar \
341   | --sha | --sh)
342     ac_prev=sharedstatedir ;;
343   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
344   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
345   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
346   | --sha=* | --sh=*)
347     sharedstatedir="$ac_optarg" ;;
348
349   -site | --site | --sit)
350     ac_prev=site ;;
351   -site=* | --site=* | --sit=*)
352     site="$ac_optarg" ;;
353
354   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
355     ac_prev=srcdir ;;
356   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
357     srcdir="$ac_optarg" ;;
358
359   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
360   | --syscon | --sysco | --sysc | --sys | --sy)
361     ac_prev=sysconfdir ;;
362   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
363   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
364     sysconfdir="$ac_optarg" ;;
365
366   -target | --target | --targe | --targ | --tar | --ta | --t)
367     ac_prev=target ;;
368   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
369     target="$ac_optarg" ;;
370
371   -v | -verbose | --verbose | --verbos | --verbo | --verb)
372     verbose=yes ;;
373
374   -version | --version | --versio | --versi | --vers)
375     echo "configure generated by autoconf version 2.13"
376     exit 0 ;;
377
378   -with-* | --with-*)
379     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
380     # Reject names that are not valid shell variable names.
381     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
382       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
383     fi
384     ac_package=`echo $ac_package| sed 's/-/_/g'`
385     case "$ac_option" in
386       *=*) ;;
387       *) ac_optarg=yes ;;
388     esac
389     eval "with_${ac_package}='$ac_optarg'" ;;
390
391   -without-* | --without-*)
392     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
393     # Reject names that are not valid shell variable names.
394     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
395       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
396     fi
397     ac_package=`echo $ac_package| sed 's/-/_/g'`
398     eval "with_${ac_package}=no" ;;
399
400   --x)
401     # Obsolete; use --with-x.
402     with_x=yes ;;
403
404   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
405   | --x-incl | --x-inc | --x-in | --x-i)
406     ac_prev=x_includes ;;
407   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
408   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
409     x_includes="$ac_optarg" ;;
410
411   -x-libraries | --x-libraries | --x-librarie | --x-librari \
412   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
413     ac_prev=x_libraries ;;
414   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
415   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
416     x_libraries="$ac_optarg" ;;
417
418   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
419     ;;
420
421   *)
422     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
423       echo "configure: warning: $ac_option: invalid host type" 1>&2
424     fi
425     if test "x$nonopt" != xNONE; then
426       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
427     fi
428     nonopt="$ac_option"
429     ;;
430
431   esac
432 done
433
434 if test -n "$ac_prev"; then
435   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
436 fi
437
438 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
439
440 # File descriptor usage:
441 # 0 standard input
442 # 1 file creation
443 # 2 errors and warnings
444 # 3 some systems may open it to /dev/tty
445 # 4 used on the Kubota Titan
446 # 6 checking for... messages and results
447 # 5 compiler messages saved in config.log
448 if test "$silent" = yes; then
449   exec 6>/dev/null
450 else
451   exec 6>&1
452 fi
453 exec 5>./config.log
454
455 echo "\
456 This file contains any messages produced by compilers while
457 running configure, to aid debugging if configure makes a mistake.
458 " 1>&5
459
460 # Strip out --no-create and --no-recursion so they do not pile up.
461 # Also quote any args containing shell metacharacters.
462 ac_configure_args=
463 for ac_arg
464 do
465   case "$ac_arg" in
466   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
467   | --no-cr | --no-c) ;;
468   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
469   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
470   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
471   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
472   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
473   esac
474 done
475
476 # NLS nuisances.
477 # Only set these to C if already set.  These must not be set unconditionally
478 # because not all systems understand e.g. LANG=C (notably SCO).
479 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
480 # Non-C LC_CTYPE values break the ctype check.
481 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
482 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
483 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
484 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
485
486 # confdefs.h avoids OS command line length limits that DEFS can exceed.
487 rm -rf conftest* confdefs.h
488 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
489 echo > confdefs.h
490
491 # A filename unique to this package, relative to the directory that
492 # configure is in, which we can look for to find out if srcdir is correct.
493 ac_unique_file=move-if-change
494
495 # Find the source files, if location was not specified.
496 if test -z "$srcdir"; then
497   ac_srcdir_defaulted=yes
498   # Try the directory containing this script, then its parent.
499   ac_prog=$0
500   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
501   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
502   srcdir=$ac_confdir
503   if test ! -r $srcdir/$ac_unique_file; then
504     srcdir=..
505   fi
506 else
507   ac_srcdir_defaulted=no
508 fi
509 if test ! -r $srcdir/$ac_unique_file; then
510   if test "$ac_srcdir_defaulted" = yes; then
511     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
512   else
513     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
514   fi
515 fi
516 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
517
518 # Prefer explicitly selected file to automatically selected ones.
519 if test -z "$CONFIG_SITE"; then
520   if test "x$prefix" != xNONE; then
521     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
522   else
523     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
524   fi
525 fi
526 for ac_site_file in $CONFIG_SITE; do
527   if test -r "$ac_site_file"; then
528     echo "loading site script $ac_site_file"
529     . "$ac_site_file"
530   fi
531 done
532
533 if test -r "$cache_file"; then
534   echo "loading cache $cache_file"
535   . $cache_file
536 else
537   echo "creating cache $cache_file"
538   > $cache_file
539 fi
540
541 ac_ext=c
542 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
543 ac_cpp='$CPP $CPPFLAGS'
544 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
545 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
546 cross_compiling=$ac_cv_prog_cc_cross
547
548 ac_exeext=
549 ac_objext=o
550 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
551   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
552   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
553     ac_n= ac_c='
554 ' ac_t='        '
555   else
556     ac_n=-n ac_c= ac_t=
557   fi
558 else
559   ac_n= ac_c='\c' ac_t=
560 fi
561
562
563
564 ac_aux_dir=
565 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
566   if test -f $ac_dir/install-sh; then
567     ac_aux_dir=$ac_dir
568     ac_install_sh="$ac_aux_dir/install-sh -c"
569     break
570   elif test -f $ac_dir/install.sh; then
571     ac_aux_dir=$ac_dir
572     ac_install_sh="$ac_aux_dir/install.sh -c"
573     break
574   fi
575 done
576 if test -z "$ac_aux_dir"; then
577   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
578 fi
579 ac_config_guess=$ac_aux_dir/config.guess
580 ac_config_sub=$ac_aux_dir/config.sub
581 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
582
583
584 # Do some error checking and defaulting for the host and target type.
585 # The inputs are:
586 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
587 #
588 # The rules are:
589 # 1. You are not allowed to specify --host, --target, and nonopt at the
590 #    same time.
591 # 2. Host defaults to nonopt.
592 # 3. If nonopt is not specified, then host defaults to the current host,
593 #    as determined by config.guess.
594 # 4. Target and build default to nonopt.
595 # 5. If nonopt is not specified, then target and build default to host.
596
597 # The aliases save the names the user supplied, while $host etc.
598 # will get canonicalized.
599 case $host---$target---$nonopt in
600 NONE---*---* | *---NONE---* | *---*---NONE) ;;
601 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
602 esac
603
604
605 # Make sure we can run config.sub.
606 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
607 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
608 fi
609
610 echo $ac_n "checking host system type""... $ac_c" 1>&6
611 echo "configure:612: checking host system type" >&5
612
613 host_alias=$host
614 case "$host_alias" in
615 NONE)
616   case $nonopt in
617   NONE)
618     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
619     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
620     fi ;;
621   *) host_alias=$nonopt ;;
622   esac ;;
623 esac
624
625 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
626 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
627 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
628 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
629 echo "$ac_t""$host" 1>&6
630
631 echo $ac_n "checking target system type""... $ac_c" 1>&6
632 echo "configure:633: checking target system type" >&5
633
634 target_alias=$target
635 case "$target_alias" in
636 NONE)
637   case $nonopt in
638   NONE) target_alias=$host_alias ;;
639   *) target_alias=$nonopt ;;
640   esac ;;
641 esac
642
643 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
644 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
645 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
646 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
647 echo "$ac_t""$target" 1>&6
648
649 echo $ac_n "checking build system type""... $ac_c" 1>&6
650 echo "configure:651: checking build system type" >&5
651
652 build_alias=$build
653 case "$build_alias" in
654 NONE)
655   case $nonopt in
656   NONE) build_alias=$host_alias ;;
657   *) build_alias=$nonopt ;;
658   esac ;;
659 esac
660
661 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
662 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
663 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
664 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
665 echo "$ac_t""$build" 1>&6
666
667 test "$host_alias" != "$target_alias" &&
668   test "$program_prefix$program_suffix$program_transform_name" = \
669     NONENONEs,x,x, &&
670   program_prefix=${target_alias}-
671
672 if test "$program_transform_name" = s,x,x,; then
673   program_transform_name=
674 else
675   # Double any \ or $.  echo might interpret backslashes.
676   cat <<\EOF_SED > conftestsed
677 s,\\,\\\\,g; s,\$,$$,g
678 EOF_SED
679   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
680   rm -f conftestsed
681 fi
682 test "$program_prefix" != NONE &&
683   program_transform_name="s,^,${program_prefix},; $program_transform_name"
684 # Use a double $ so make ignores it.
685 test "$program_suffix" != NONE &&
686   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
687
688 # sed with no file args requires a program.
689 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
690
691
692 # Get 'install' or 'install-sh' and its variants.
693 # Find a good install program.  We prefer a C program (faster),
694 # so one script is as good as another.  But avoid the broken or
695 # incompatible versions:
696 # SysV /etc/install, /usr/sbin/install
697 # SunOS /usr/etc/install
698 # IRIX /sbin/install
699 # AIX /bin/install
700 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
701 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
702 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
703 # ./install, which can be erroneously created by make from ./install.sh.
704 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
705 echo "configure:706: checking for a BSD compatible install" >&5
706 if test -z "$INSTALL"; then
707 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
708   echo $ac_n "(cached) $ac_c" 1>&6
709 else
710     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
711   for ac_dir in $PATH; do
712     # Account for people who put trailing slashes in PATH elements.
713     case "$ac_dir/" in
714     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
715     *)
716       # OSF1 and SCO ODT 3.0 have their own names for install.
717       # Don't use installbsd from OSF since it installs stuff as root
718       # by default.
719       for ac_prog in ginstall scoinst install; do
720         if test -f $ac_dir/$ac_prog; then
721           if test $ac_prog = install &&
722             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
723             # AIX install.  It has an incompatible calling convention.
724             :
725           else
726             ac_cv_path_install="$ac_dir/$ac_prog -c"
727             break 2
728           fi
729         fi
730       done
731       ;;
732     esac
733   done
734   IFS="$ac_save_IFS"
735
736 fi
737   if test "${ac_cv_path_install+set}" = set; then
738     INSTALL="$ac_cv_path_install"
739   else
740     # As a last resort, use the slow shell script.  We don't cache a
741     # path for INSTALL within a source directory, because that will
742     # break other packages using the cache if that directory is
743     # removed, or if the path is relative.
744     INSTALL="$ac_install_sh"
745   fi
746 fi
747 echo "$ac_t""$INSTALL" 1>&6
748
749 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
750 # It thinks the first close brace ends the variable substitution.
751 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
752
753 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
754
755 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
756
757 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
758 echo "configure:759: checking whether ln works" >&5
759 if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
760   echo $ac_n "(cached) $ac_c" 1>&6
761 else
762   rm -f conftestdata_t
763 echo >conftestdata_f
764 if ln conftestdata_f conftestdata_t 2>/dev/null
765 then
766   acx_cv_prog_LN=ln
767 else
768   acx_cv_prog_LN=no
769 fi
770 rm -f conftestdata_f conftestdata_t
771
772 fi
773 if test $acx_cv_prog_LN = no; then
774   LN="cp"
775   echo "$ac_t""no, using $LN" 1>&6
776 else
777   LN="$acx_cv_prog_LN"
778   echo "$ac_t""yes" 1>&6
779 fi
780
781 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
782 echo "configure:783: checking whether ln -s works" >&5
783 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
784   echo $ac_n "(cached) $ac_c" 1>&6
785 else
786   rm -f conftestdata
787 if ln -s X conftestdata 2>/dev/null
788 then
789   rm -f conftestdata
790   ac_cv_prog_LN_S="ln -s"
791 else
792   ac_cv_prog_LN_S=ln
793 fi
794 fi
795 LN_S="$ac_cv_prog_LN_S"
796 if test "$ac_cv_prog_LN_S" = "ln -s"; then
797   echo "$ac_t""yes" 1>&6
798 else
799   echo "$ac_t""no" 1>&6
800 fi
801
802
803 ### we might need to use some other shell than /bin/sh for running subshells
804 ### If we are on Windows, search for the shell.  This will permit people
805 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
806 ### without also having to set CONFIG_SHELL.  This code will work when
807 ### using bash, which sets OSTYPE.
808 case "${OSTYPE}" in
809 *win32*)
810   if test x${CONFIG_SHELL} = x ; then
811     if test ! -f /bin/sh ; then
812       if test x${SHELL} != x && test -f ${SHELL} ; then
813         CONFIG_SHELL=${SHELL}
814         export CONFIG_SHELL
815       else
816         for prog in sh sh.exe bash bash.exe; do
817           IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
818           for dir in $PATH; do
819             test -z "$dir" && dir=.
820             if test -f $dir/$prog; then
821               CONFIG_SHELL=$dir/$prog
822               export CONFIG_SHELL
823               break
824             fi
825           done
826           IFS="$save_ifs"
827           test -n "${CONFIG_SHELL}" && break
828         done
829       fi
830     fi
831   fi
832   ;;
833 esac
834
835 config_shell=${CONFIG_SHELL-/bin/sh}
836
837 progname=$0
838 # if PWD already has a value, it is probably wrong.
839 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
840
841 # Export original configure arguments for use by sub-configures.  These
842 # will be expanded by make, so quote '$'.
843 tmp="$progname $@"
844 sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
845 $tmp
846 EOF_SED
847 TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
848 rm -f conftestsed.out
849
850
851 moveifchange=${srcdir}/move-if-change
852
853 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
854
855 # We pass INSTALL explicitly to sub-makes.  Make sure that it is not
856 # a relative path.
857 if test "$INSTALL" = "${srcdir}/install-sh -c"; then
858   INSTALL="${srcpwd}/install-sh -c"
859 fi
860
861 # Set srcdir to "." if that's what it is.
862 # This is important for multilib support.
863 pwd=`${PWDCMD-pwd}`
864 if test "${pwd}" = "${srcpwd}" ; then
865   srcdir=.
866 fi
867
868 topsrcdir=$srcpwd
869
870 extra_host_args=
871
872 ### To add a new directory to the tree, first choose whether it is a target
873 ### or a host dependent tool.  Then put it into the appropriate list
874 ### (library or tools, host or target), doing a dependency sort.
875
876 # Subdirs will be configured in the order listed in build_configdirs, 
877 # configdirs, or target_configdirs; see the serialization section below.
878
879 # Dependency sorting is only needed when *configuration* must be done in 
880 # a particular order.  In all cases a dependency should be specified in 
881 # the Makefile, whether or not it's implicitly specified here.
882
883 # Double entries in build_configdirs, configdirs, or target_configdirs may
884 # cause circular dependencies and break everything horribly.
885
886 # these library is used by various programs built for the build
887 # environment
888 #
889 build_libs="build-libiberty"
890
891 # these tools are built for the build environment
892 build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
893
894 # these libraries are used by various programs built for the host environment
895 #
896 host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
897
898 # these tools are built for the host environment
899 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
900 # know that we are building the simulator.
901 # binutils, gas and ld appear in that order because it makes sense to run
902 # "make check" in that particular order.
903 host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
904
905 # libgcj represents the runtime libraries only used by gcj.
906 libgcj="target-libffi \
907         target-zlib \
908         target-qthreads \
909         target-libjava"
910
911 # these libraries are built for the target environment, and are built after
912 # the host libraries and the host tools (which may be a cross compiler)
913 #
914 target_libraries="target-libiberty \
915                 target-libgloss \
916                 target-newlib \
917                 target-libstdc++-v3 \
918                 target-libmudflap \
919                 target-libssp \
920                 target-libgfortran \
921                 target-boehm-gc \
922                 ${libgcj} \
923                 target-libobjc \
924                 target-libada \
925                 target-libgomp"
926
927 # these tools are built using the target libraries, and are intended to
928 # run only in the target environment
929 #
930 # note: any program that *uses* libraries that are in the "target_libraries"
931 # list belongs in this list.  those programs are also very likely
932 # candidates for the "native_only" list which follows
933 #
934 target_tools="target-examples target-groff target-gperf target-rda"
935
936 ################################################################################
937
938 ## All tools belong in one of the four categories, and are assigned above
939 ## We assign ${configdirs} this way to remove all embedded newlines.  This
940 ## is important because configure will choke if they ever get through.
941 ## ${configdirs} is directories we build using the host tools.
942 ## ${target_configdirs} is directories we build using the target tools.
943 configdirs=`echo ${host_libs} ${host_tools}`
944 target_configdirs=`echo ${target_libraries} ${target_tools}`
945 build_configdirs=`echo ${build_libs} ${build_tools}`
946
947 ################################################################################
948
949 srcname="gnu development package"
950
951 # This gets set non-empty for some net releases of packages.
952 appdirs=""
953
954 # Define is_cross_compiler to save on calls to 'test'.
955 is_cross_compiler=
956 if test x"${host}" = x"${target}" ; then
957   is_cross_compiler=no
958 else
959   is_cross_compiler=yes
960 fi      
961
962 # Find the build and target subdir names.
963  case ${build_alias} in
964   "") build_noncanonical=${build} ;;
965   *) build_noncanonical=${build_alias} ;;
966 esac
967
968  case ${host_alias} in
969   "") host_noncanonical=${build_noncanonical} ;;
970   *) host_noncanonical=${host_alias} ;;
971 esac
972
973  case ${target_alias} in
974   "") target_noncanonical=${host_noncanonical} ;;
975   *) target_noncanonical=${target_alias} ;;
976 esac
977
978   # Prefix 'build-' so this never conflicts with target_subdir.
979 build_subdir="build-${build_noncanonical}"
980 # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
981 if ( test $srcdir = . && test -d gcc ) \
982    || test -d $srcdir/../host-${host_noncanonical}; then
983   host_subdir="host-${host_noncanonical}"
984 else
985   host_subdir=.
986 fi
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 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 # A target can indicate whether a language isn't supported for some reason.
1059 # Only spaces may be used in this macro; not newlines or tabs.
1060 unsupported_languages=
1061
1062 # Remove more programs from consideration, based on the host or 
1063 # target this usually means that a port of the program doesn't
1064 # exist yet.
1065
1066 case "${host}" in
1067   hppa*64*-*-*)
1068     noconfigdirs="$noconfigdirs byacc"
1069     ;;
1070   i[3456789]86-*-vsta)
1071     noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
1072     ;;
1073   i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
1074     noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
1075     ;;
1076   i[3456789]86-*-mingw32*)
1077     # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
1078     noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
1079     ;;
1080   i[3456789]86-*-beos*)
1081     noconfigdirs="$noconfigdirs tk itcl libgui gdb"
1082     ;;
1083   *-*-cygwin*)
1084     noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
1085     ;;
1086   *-*-netbsd*)
1087     noconfigdirs="$noconfigdirs rcs"
1088     ;;
1089   ppc*-*-pe)
1090     noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
1091     ;;
1092   powerpc-*-beos*)
1093     noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
1094     ;;
1095 esac
1096
1097
1098 # Check whether --enable-libada or --disable-libada was given.
1099 if test "${enable_libada+set}" = set; then
1100   enableval="$enable_libada"
1101   ENABLE_LIBADA=$enableval
1102 else
1103   ENABLE_LIBADA=yes
1104 fi
1105
1106 if test "${ENABLE_LIBADA}" != "yes" ; then
1107   noconfigdirs="$noconfigdirs gnattools"
1108 fi
1109
1110 # Check whether --enable-libssp or --disable-libssp was given.
1111 if test "${enable_libssp+set}" = set; then
1112   enableval="$enable_libssp"
1113   ENABLE_LIBSSP=$enableval
1114 else
1115   ENABLE_LIBSSP=yes
1116 fi
1117
1118
1119 # Save it here so that, even in case of --enable-libgcj, if the Java
1120 # front-end isn't enabled, we still get libgcj disabled.
1121 libgcj_saved=$libgcj
1122 case $enable_libgcj in
1123 yes)
1124   # If we reset it here, it won't get added to noconfigdirs in the
1125   # target-specific build rules, so it will be forcibly enabled
1126   # (unless the Java language itself isn't enabled).
1127   libgcj=
1128   ;;
1129 no)
1130   # Make sure we get it printed in the list of not supported target libs.
1131   noconfigdirs="$noconfigdirs ${libgcj}"
1132   ;;
1133 esac
1134
1135
1136 # Disable libmudflap on some systems.
1137 if test x$enable_libmudflap = x ; then
1138     case "${target}" in
1139     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
1140         # Enable libmudflap by default in GNU and friends.
1141         ;;
1142     *-*-freebsd*)
1143         # Enable libmudflap by default in FreeBSD.
1144         ;;
1145     *)
1146         # Disable it by default everywhere else.
1147         noconfigdirs="$noconfigdirs target-libmudflap"
1148         ;;
1149     esac
1150 fi
1151
1152 # Disable libgomp on non POSIX hosted systems.
1153 if test x$enable_libgomp = x ; then
1154     # Enable libgomp by default on hosted POSIX systems.
1155     case "${target}" in
1156     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
1157         ;;
1158     *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
1159         ;;
1160     *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
1161         ;;
1162     *-*-darwin* | *-*-aix*)
1163         ;;
1164     *)
1165         noconfigdirs="$noconfigdirs target-libgomp"
1166         ;;
1167     esac
1168 fi
1169
1170
1171 case "${target}" in
1172   *-*-chorusos)
1173     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-boehm-gc ${libgcj}"
1174     ;;
1175   powerpc-*-darwin*)
1176     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1177     noconfigdirs="$noconfigdirs sim target-rda"
1178     ;;
1179   *-*-darwin*)
1180     noconfigdirs="$noconfigdirs ld gas gdb gprof"
1181     noconfigdirs="$noconfigdirs sim target-rda"
1182     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1183     ;;
1184   *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1185     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-boehm-gc ${libgcj}"
1186     ;;
1187   *-*-freebsd*)
1188     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1189     if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1190         && test -f /usr/local/include/gmp.h; then
1191       with_gmp=/usr/local
1192     fi
1193
1194     # Skip some stuff that's unsupported on some FreeBSD configurations.
1195     case "${target}" in
1196       i*86-*-*) ;;
1197       alpha*-*-*) ;;
1198       *)
1199         noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1200         ;;
1201     esac
1202     ;;
1203   *-*-kaos*)
1204     # Remove unsupported stuff on all kaOS configurations.
1205     skipdirs="target-libiberty target-boehm-gc ${libgcj} target-libstdc++-v3 target-librx"
1206     skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1207     skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1208     noconfigdirs="$noconfigdirs target-libgloss"
1209     ;;
1210   *-*-netbsd*)
1211     # Skip some stuff on all NetBSD configurations.
1212     noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1213
1214     # Skip some stuff that's unsupported on some NetBSD configurations.
1215     case "${target}" in
1216       i*86-*-netbsdelf*) ;;
1217       arm*-*-netbsdelf*) ;;
1218       *)
1219         noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1220         ;;
1221     esac
1222     ;;
1223   *-*-netware*)
1224     noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss target-boehm-gc ${libgcj} target-libmudflap"
1225     ;;
1226   *-*-rtems*)
1227     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1228     ;;
1229     # The tpf target doesn't support gdb yet.
1230   *-*-tpf*)
1231     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-boehm-gc ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
1232     ;;
1233   *-*-uclinux*)
1234     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda target-boehm-gc ${libgcj}"
1235     ;;
1236   *-*-vxworks*)
1237     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 target-boehm-gc ${libgcj}"
1238     ;;
1239   alpha*-dec-osf*)
1240     # ld works, but does not support shared libraries.
1241     # newlib is not 64 bit ready.  I'm not sure about fileutils.
1242     # gas doesn't generate exception information.
1243     noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1244     ;;
1245   alpha*-*-*vms*)
1246     noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-boehm-gc ${libgcj}"
1247     ;;
1248   alpha*-*-linux*)
1249     # newlib is not 64 bit ready
1250     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1251     ;;
1252   alpha*-*-*)
1253     # newlib is not 64 bit ready
1254     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-boehm-gc ${libgcj}"
1255     ;;
1256   am33_2.0-*-linux*)
1257     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} target-newlib target-libgloss"
1258     ;;
1259   sh-*-linux*)
1260     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} target-newlib target-libgloss"
1261     ;;    
1262   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1263     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1264     noconfigdirs="$noconfigdirs target-examples"
1265     noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
1266     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
1267     noconfigdirs="$noconfigdirs expect dejagnu"
1268     # the C++ libraries don't build on top of CE's C libraries
1269     noconfigdirs="$noconfigdirs target-libstdc++-v3"
1270     noconfigdirs="$noconfigdirs target-newlib"
1271     case "${host}" in
1272       *-*-cygwin*) ;; # keep gdb and readline
1273       *) noconfigdirs="$noconfigdirs gdb readline"
1274          ;;
1275     esac
1276     ;;
1277   arc-*-*)
1278     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1279     ;;
1280   arm-semi-aof )
1281     ;;
1282   arm-*-coff | strongarm-*-coff | xscale-*-coff)
1283     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1284     ;;
1285   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
1286     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1287     ;;
1288   arm*-*-linux-gnueabi)
1289     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1290     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
1291     ;;
1292   arm*-*-symbianelf*)
1293     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} target-libiberty"
1294     ;;
1295   arm-*-pe*)
1296     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1297     ;;
1298   thumb-*-coff)
1299     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1300     ;;
1301   thumb-*-elf)
1302     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1303     ;;
1304   thumb-*-pe)
1305     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1306     ;;
1307   arm-*-riscix*)
1308     noconfigdirs="$noconfigdirs ld target-libgloss target-boehm-gc ${libgcj}"
1309     ;;
1310   avr-*-*)
1311     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 target-boehm-gc ${libgcj}"
1312     ;;
1313   bfin-*-*)
1314     noconfigdirs="$noconfigdirs target-libgloss gdb"
1315     if test x${is_cross_compiler} != xno ; then
1316       target_configdirs="${target_configdirs} target-bsp target-cygmon"
1317     fi
1318     ;;
1319   c4x-*-* | tic4x-*-*)
1320     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss target-boehm-gc ${libgcj}"
1321     ;;
1322   c54x*-*-* | tic54x-*-*)
1323     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss target-boehm-gc ${libgcj} gcc gdb newlib"
1324     ;;
1325   cris-*-* | crisv32-*-*)
1326     unsupported_languages="$unsupported_languages java"
1327     case "${target}" in
1328       *-*-aout)
1329         unsupported_languages="$unsupported_languages fortran"
1330         noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
1331       *-*-elf)
1332         unsupported_languages="$unsupported_languages fortran"
1333         noconfigdirs="$noconfigdirs target-boehm-gc";;
1334       *-*-linux*)
1335         noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
1336       *)
1337         unsupported_languages="$unsupported_languages fortran"
1338         noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} target-newlib target-libgloss";;
1339     esac
1340     ;;
1341   crx-*-*)
1342     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap target-boehm-gc ${libgcj}"
1343     ;;
1344   d10v-*-*)
1345     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss target-boehm-gc ${libgcj}"
1346     ;;
1347   d30v-*-*)
1348     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} gdb"
1349     ;;
1350   fr30-*-elf*)
1351     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} gdb"
1352     ;;
1353   frv-*-*)
1354     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1355     ;;
1356   h8300*-*-*)
1357     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1358     ;;
1359   h8500-*-*)
1360     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss target-boehm-gc ${libgcj}"
1361     ;;
1362   hppa1.1-*-osf* | hppa1.1-*-bsd* )
1363     ;;
1364   hppa*64*-*-linux* | parisc*64*-*-linux*)
1365     # In this case, it's because the hppa64-linux target is for
1366     # the kernel only at this point and has no libc, and thus no
1367     # headers, crt*.o, etc., all of which are needed by these.
1368     noconfigdirs="$noconfigdirs target-zlib"
1369     ;;
1370   parisc*-*-linux* | hppa*-*-linux*)
1371     ;;
1372   hppa*-*-*elf* | \
1373   hppa*-*-lites* | \
1374   hppa*-*-openbsd* | \
1375   hppa*64*-*-*)
1376     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1377     ;;
1378   hppa*-hp-hpux11*)
1379     noconfigdirs="$noconfigdirs ld shellutils"
1380     ;;
1381   hppa*-*-*)
1382     # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1383     # build on HP-UX 10.20.
1384     noconfigdirs="$noconfigdirs ld shellutils target-boehm-gc ${libgcj}"
1385     ;;
1386   i960-*-*)
1387     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} gdb"
1388     ;;
1389   ia64*-*-elf*)
1390     # No gdb support yet.
1391     noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
1392     ;;
1393   ia64*-**-hpux*)
1394     # No gdb or ld support yet.
1395     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj} readline mmalloc libgui itcl gdb ld"
1396     ;;
1397   i370-*-opened*)
1398     ;;
1399   i[3456789]86-*-coff | i[3456789]86-*-elf)
1400     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1401     ;;
1402   i[3456789]86-*-linux*)
1403     # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1404     # not build java stuff by default.
1405     case "${target}" in
1406       *-*-*libc1*)
1407         noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}";;
1408     esac
1409
1410     # This section makes it possible to build newlib natively on linux.
1411     # If we are using a cross compiler then don't configure newlib.
1412     if test x${is_cross_compiler} != xno ; then
1413       noconfigdirs="$noconfigdirs target-newlib"
1414     fi
1415     noconfigdirs="$noconfigdirs target-libgloss"
1416     # If we are not using a cross compiler, do configure newlib.
1417     # Note however, that newlib will only be configured in this situation
1418     # if the --with-newlib option has been given, because otherwise
1419     # 'target-newlib' will appear in skipdirs.
1420     ;;
1421   i[3456789]86-*-mingw32*)
1422     target_configdirs="$target_configdirs target-mingw"
1423     noconfigdirs="$noconfigdirs expect target-libgloss target-boehm-gc ${libgcj}"
1424
1425     # Can't build gdb for mingw32 if not native.
1426     case "${host}" in
1427       i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
1428       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
1429          ;;
1430     esac
1431     ;;    
1432   *-*-cygwin*)
1433     target_configdirs="$target_configdirs target-libtermcap target-winsup"
1434     noconfigdirs="$noconfigdirs target-gperf target-libgloss target-boehm-gc ${libgcj}"
1435     # always build newlib if winsup directory is present.
1436     if test -d "$srcdir/winsup"; then
1437       skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1438     elif test -d "$srcdir/newlib"; then
1439       echo "Warning: winsup is missing so newlib can't be built."
1440     fi
1441
1442     # Can't build gdb for Cygwin if not native.
1443     case "${host}" in
1444       *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
1445       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
1446          ;;
1447     esac
1448     ;;    
1449   i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1450   i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
1451     ;;
1452   i[3456789]86-*-pe)
1453     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss target-boehm-gc ${libgcj}"
1454     ;;
1455   i[3456789]86-*-sco3.2v5*)
1456     # The linker does not yet know about weak symbols in COFF,
1457     # and is not configured to handle mixed ELF and COFF.
1458     noconfigdirs="$noconfigdirs ld target-libgloss target-boehm-gc ${libgcj}"
1459     ;;
1460   i[3456789]86-*-sco*)
1461     noconfigdirs="$noconfigdirs gprof target-libgloss target-boehm-gc ${libgcj}"
1462     ;;
1463   i[3456789]86-*-solaris2*)
1464     noconfigdirs="$noconfigdirs target-libgloss"
1465     ;;
1466   i[3456789]86-*-sysv4*)
1467     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1468     ;;
1469   i[3456789]86-*-beos*)
1470     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss target-boehm-gc ${libgcj}"
1471     ;;
1472   i[3456789]86-*-rdos*)
1473     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1474     ;;
1475   m32r-*-*)
1476     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1477     ;;
1478   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
1479     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 target-boehm-gc ${libgcj}"
1480     ;;
1481   m68k-*-elf*)
1482     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1483     ;;
1484   m68k-*-coff*)
1485     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1486     ;;
1487   mcore-*-pe*)
1488   # The EPOC C++ environment does not support exceptions or rtti,
1489   # and so building libstdc++-v3 tends not to always work.
1490     noconfigdirs="$noconfigdirs target-libstdc++-v3"
1491     ;;
1492   mmix-*-*)
1493     noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
1494     unsupported_languages="$unsupported_languages fortran java"
1495     ;;
1496   mn10200-*-*)
1497     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1498     ;;
1499   mn10300-*-*)
1500     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1501     ;;
1502   mt-*-*)
1503     noconfigdirs="$noconfigdirs sim"
1504     ;;
1505   powerpc-*-aix*)
1506     # copied from rs6000-*-* entry
1507     noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-boehm-gc ${libgcj}"
1508     ;;
1509   powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1510     target_configdirs="$target_configdirs target-winsup"
1511     noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv target-boehm-gc ${libgcj}"
1512     # always build newlib.
1513     skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1514     ;;
1515     # This is temporary until we can link against shared libraries
1516   powerpcle-*-solaris*)
1517     noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv target-boehm-gc ${libgcj}"
1518     ;;
1519   powerpc-*-beos*)
1520     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss target-boehm-gc ${libgcj}"
1521     ;;
1522   powerpc-*-eabi)
1523     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1524     ;;
1525   powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
1526     ;;
1527   rs6000-*-lynxos*)
1528     noconfigdirs="$noconfigdirs target-newlib gprof target-boehm-gc ${libgcj}"
1529     ;;
1530   rs6000-*-aix*)
1531     noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-boehm-gc ${libgcj}"
1532     ;;
1533   rs6000-*-*)
1534     noconfigdirs="$noconfigdirs gprof target-boehm-gc ${libgcj}"
1535     ;;
1536   m68k-apollo-*)
1537     noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-boehm-gc ${libgcj}"
1538     ;;
1539   mips*-*-irix5*)
1540     noconfigdirs="$noconfigdirs gprof target-libgloss target-boehm-gc ${libgcj}"
1541     ;;
1542   mips*-*-irix6*)
1543     # Linking libjava exceeds command-line length limits on at least
1544     # IRIX 6.2, but not on IRIX 6.5.
1545     # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1546     # <oldham@codesourcery.com>
1547     noconfigdirs="$noconfigdirs gprof target-libgloss target-boehm-gc ${libgcj}"
1548     ;;
1549   mips*-dec-bsd*)
1550     noconfigdirs="$noconfigdirs gprof target-libgloss target-boehm-gc ${libgcj}"
1551     ;;
1552   mips*-*-bsd*)
1553     noconfigdirs="$noconfigdirs gprof target-libgloss target-boehm-gc ${libgcj}"
1554     ;;
1555   mipstx39-*-*)
1556     noconfigdirs="$noconfigdirs gprof target-boehm-gc ${libgcj}"   # same as generic mips
1557     ;;
1558   mips64*-*-linux*)
1559     noconfigdirs="$noconfigdirs target-newlib target-boehm-gc ${libgcj}"
1560     ;;
1561   mips*-*-linux*)
1562     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1563     ;;
1564   mips*-*-*)
1565     noconfigdirs="$noconfigdirs gprof target-boehm-gc ${libgcj}"
1566     ;;
1567   romp-*-*)
1568     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-boehm-gc ${libgcj}"
1569     ;;
1570   sh-*-* | sh64-*-*)
1571     case "${host}" in
1572       i[3456789]86-*-vsta) ;; # don't add gprof back in
1573       i[3456789]86-*-go32*) ;; # don't add gprof back in
1574       i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
1575       *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1576     esac
1577     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1578     ;;
1579   sparc-*-elf*)
1580     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1581     ;;
1582   sparc64-*-elf*)
1583     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1584     ;;
1585   sparclite-*-*)
1586     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1587     ;;
1588   sparc-*-sunos4*)
1589     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1590     if test x${is_cross_compiler} != xno ; then
1591            noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1592     else
1593            use_gnu_ld=no
1594     fi
1595     ;;
1596   sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1597     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1598     ;;
1599   sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1600     ;;
1601   v810-*-*)
1602     noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss target-boehm-gc ${libgcj}"
1603     ;;
1604   v850-*-*)
1605     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1606     ;;
1607   v850e-*-*)
1608     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1609     ;;
1610   v850ea-*-*)
1611     noconfigdirs="$noconfigdirs target-libgloss target-boehm-gc ${libgcj}"
1612     ;;
1613   vax-*-vms)
1614     noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-boehm-gc ${libgcj}"
1615     ;;
1616   vax-*-*)
1617     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-boehm-gc ${libgcj}"
1618     ;;
1619   xtensa-*-*)
1620     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1621     ;;
1622   ip2k-*-*)
1623     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 target-boehm-gc ${libgcj}"
1624     ;;
1625   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
1626     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1627     ;;
1628   *-*-lynxos*)
1629     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-boehm-gc ${libgcj}"
1630     ;; 
1631   *-*-*)
1632     noconfigdirs="$noconfigdirs target-boehm-gc ${libgcj}"
1633     ;;
1634 esac
1635
1636 # If we aren't building newlib, then don't build libgloss, since libgloss
1637 # depends upon some newlib header files.
1638 case "${noconfigdirs}" in
1639   *target-libgloss*) ;;
1640   *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1641 esac
1642
1643 # Work in distributions that contain no compiler tools, like Autoconf.
1644 tentative_cc=""
1645 host_makefile_frag=/dev/null
1646 if test -d ${srcdir}/config ; then
1647 case "${host}" in
1648   m68k-hp-hpux*)
1649     # Avoid "too much defining" errors from HPUX compiler.
1650     tentative_cc="cc -Wp,-H256000"
1651     # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1652     # If it's HP/UX ar, this should be harmless.
1653     RANLIB="ar ts"
1654     ;;
1655   m68k-apollo-sysv*)
1656     tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1657     ;;
1658   m68k-apollo-bsd*)
1659     #None of the Apollo compilers can compile gas or binutils.  The preprocessor
1660     # chokes on bfd, the compiler won't let you assign integers to enums, and
1661     # other problems.  Defining CC to gcc is a questionable way to say "don't use
1662     # the apollo compiler" (the preferred version of GCC could be called cc,
1663     # or whatever), but I'm not sure leaving CC as cc is any better...
1664     #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1665     # Used to have BISON=yacc.
1666     tentative_cc=gcc
1667     ;;
1668   m88k-dg-dgux*)
1669     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1670     ;;
1671   m88k-harris-cxux*)
1672     # Under CX/UX, we want to tell the compiler to use ANSI mode.
1673     tentative_cc="cc -Xa"
1674     host_makefile_frag="config/mh-cxux"
1675     ;;
1676   m88k-motorola-sysv*)
1677     ;;
1678   mips*-dec-ultrix*)
1679     tentative_cc="cc -Wf,-XNg1000"
1680     host_makefile_frag="config/mh-decstation"
1681     ;;
1682   mips*-nec-sysv4*)
1683     # The C compiler on NEC MIPS SVR4 needs bigger tables.
1684     tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1685     host_makefile_frag="config/mh-necv4"
1686     ;;
1687   mips*-sgi-irix4*)
1688     # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
1689     # environment.  Also bump switch table size so that cp-parse will
1690     # compile.  Bump string length limit so linker builds.
1691     tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1692     ;;
1693   mips*-*-sysv4*)
1694     host_makefile_frag="config/mh-sysv4"
1695     ;;
1696   mips*-*-sysv*)
1697     # This is for a MIPS running RISC/os 4.52C.
1698
1699     # This is needed for GDB, but needs to be in the top-level make because
1700     # if a library is compiled with the bsd headers and gets linked with the
1701     # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1702     # a different size).
1703     # ptrace(2) apparently has problems in the BSD environment.  No workaround is
1704     # known except to select the sysv environment.  Could we use /proc instead?
1705     # These "sysv environments" and "bsd environments" often end up being a pain.
1706     #
1707     # This is not part of CFLAGS because perhaps not all C compilers have this
1708     # option.
1709     tentative_cc="cc -systype sysv"
1710     ;;
1711   i370-ibm-opened*)
1712     tentative_cc="c89"
1713     ;;
1714   i[3456789]86-*-sysv5*)
1715     host_makefile_frag="config/mh-sysv5"
1716     ;;
1717   i[3456789]86-*-dgux*)
1718     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1719     host_makefile_frag="config/mh-dgux386"
1720     ;;
1721   i[3456789]86-ncr-sysv4.3*)
1722     # The MetaWare compiler will generate a copyright message unless you
1723     # turn it off by adding the -Hnocopyr flag.
1724     tentative_cc="cc -Hnocopyr"
1725     ;;
1726   i[3456789]86-ncr-sysv4*)
1727     # for an NCR 3000 (i486/SVR4) system.
1728     # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1729     # This compiler not only emits obnoxious copyright messages every time
1730     # you run it, but it chokes and dies on a whole bunch of GNU source
1731     # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1732     tentative_cc="/usr/ccs/ATT/cc"
1733     host_makefile_frag="config/mh-ncr3000"
1734     ;;
1735   i[3456789]86-*-sco3.2v5*)
1736     ;;
1737   i[3456789]86-*-sco*)
1738     # The native C compiler botches some simple uses of const.  Unfortunately,
1739     # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1740     tentative_cc="cc -Dconst="
1741     host_makefile_frag="config/mh-sco"
1742     ;;
1743   i[3456789]86-*-udk*)
1744     host_makefile_frag="config/mh-sysv5"
1745     ;;
1746   i[3456789]86-*-solaris2*)
1747     host_makefile_frag="config/mh-sysv4"
1748     ;;
1749   i[3456789]86-*-msdosdjgpp*)
1750     host_makefile_frag="config/mh-djgpp"
1751     ;;
1752   *-cygwin*)
1753     host_makefile_frag="config/mh-cygwin"
1754     ;;
1755   *-mingw32*)
1756     ;;
1757   *-interix*)
1758     host_makefile_frag="config/mh-interix"
1759     ;;
1760   vax-*-ultrix2*)
1761     # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1762     tentative_cc=gcc
1763     ;;
1764   *-*-solaris2*)
1765     host_makefile_frag="config/mh-solaris"
1766     ;;
1767   m68k-sun-sunos*)
1768     # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1769     # without overflowing the jump tables (-J says to use a 32 bit table)
1770     tentative_cc="cc -J"
1771     ;;
1772   *-hp-hpux*)
1773     tentative_cc="cc -Wp,-H256000"
1774     ;;
1775   *-*-hiux*)
1776     tentative_cc="cc -Wp,-H256000"
1777     ;;
1778   rs6000-*-lynxos*)
1779     # /bin/cc is less than useful for our purposes.  Always use GCC
1780     tentative_cc="/usr/cygnus/progressive/bin/gcc"
1781     host_makefile_frag="config/mh-lynxrs6k"
1782     ;;
1783   powerpc-*-darwin*)
1784     host_makefile_frag="config/mh-ppc-darwin"
1785     ;;
1786   powerpc-*-aix*)
1787     host_makefile_frag="config/mh-ppc-aix"
1788     ;;
1789   rs6000-*-aix*)
1790     host_makefile_frag="config/mh-ppc-aix"
1791     ;;
1792   *-*-lynxos*)
1793     # /bin/cc is less than useful for our purposes.  Always use GCC
1794     tentative_cc="/bin/gcc"
1795     ;;
1796   *-*-sysv4*)
1797     host_makefile_frag="config/mh-sysv4"
1798     ;;
1799   # This is placed last to prevent interfering with the cases above.
1800   i[3456789]86-*-*)
1801     # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1802     host_makefile_frag="config/mh-x86omitfp"
1803     ;;
1804 esac
1805 fi
1806
1807 # If we aren't going to be using gcc, see if we can extract a definition
1808 # of CC from the fragment.
1809 # Actually, use the 'pre-extracted' version above.
1810 if test -z "${CC}" && test "${build}" = "${host}" ; then
1811   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
1812   found=
1813   for dir in $PATH; do
1814     test -z "$dir" && dir=.
1815     if test -f $dir/gcc; then
1816       found=yes
1817       break
1818     fi
1819   done
1820   IFS="$save_ifs"
1821   if test -z "${found}" && test -n "${tentative_cc}" ; then
1822     CC=$tentative_cc
1823   fi
1824 fi
1825
1826 if test "${build}" != "${host}" ; then
1827   # If we are doing a Canadian Cross, in which the host and build systems
1828   # are not the same, we set reasonable default values for the tools.
1829
1830   CC=${CC-${host_alias}-gcc}
1831   CFLAGS=${CFLAGS-"-g -O2"}
1832   CXX=${CXX-${host_alias}-c++}
1833   CXXFLAGS=${CXXFLAGS-"-g -O2"}
1834   CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
1835
1836 else
1837   # Set reasonable default values for some tools even if not Canadian.
1838   # Of course, these are different reasonable default values, originally
1839   # specified directly in the Makefile.
1840   # We don't export, so that autoconf can do its job.
1841   # Note that all these settings are above the fragment inclusion point
1842   # in Makefile.in, so can still be overridden by fragments.
1843   # This is all going to change when we autoconfiscate...
1844
1845   CC_FOR_BUILD="\$(CC)"
1846   # Extract the first word of "gcc", so it can be a program name with args.
1847 set dummy gcc; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="gcc"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 fi
1868 CC="$ac_cv_prog_CC"
1869 if test -n "$CC"; then
1870   echo "$ac_t""$CC" 1>&6
1871 else
1872   echo "$ac_t""no" 1>&6
1873 fi
1874
1875 if test -z "$CC"; then
1876   # Extract the first word of "cc", so it can be a program name with args.
1877 set dummy cc; ac_word=$2
1878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1879 echo "configure:1880: checking for $ac_word" >&5
1880 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   if test -n "$CC"; then
1884   ac_cv_prog_CC="$CC" # Let the user override the test.
1885 else
1886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1887   ac_prog_rejected=no
1888   ac_dummy="$PATH"
1889   for ac_dir in $ac_dummy; do
1890     test -z "$ac_dir" && ac_dir=.
1891     if test -f $ac_dir/$ac_word; then
1892       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1893         ac_prog_rejected=yes
1894         continue
1895       fi
1896       ac_cv_prog_CC="cc"
1897       break
1898     fi
1899   done
1900   IFS="$ac_save_ifs"
1901 if test $ac_prog_rejected = yes; then
1902   # We found a bogon in the path, so make sure we never use it.
1903   set dummy $ac_cv_prog_CC
1904   shift
1905   if test $# -gt 0; then
1906     # We chose a different compiler from the bogus one.
1907     # However, it has the same basename, so the bogon will be chosen
1908     # first if we set CC to just the basename; use the full file name.
1909     shift
1910     set dummy "$ac_dir/$ac_word" "$@"
1911     shift
1912     ac_cv_prog_CC="$@"
1913   fi
1914 fi
1915 fi
1916 fi
1917 CC="$ac_cv_prog_CC"
1918 if test -n "$CC"; then
1919   echo "$ac_t""$CC" 1>&6
1920 else
1921   echo "$ac_t""no" 1>&6
1922 fi
1923
1924   if test -z "$CC"; then
1925     case "`uname -s`" in
1926     *win32* | *WIN32*)
1927       # Extract the first word of "cl", so it can be a program name with args.
1928 set dummy cl; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1932   echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934   if test -n "$CC"; then
1935   ac_cv_prog_CC="$CC" # Let the user override the test.
1936 else
1937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1938   ac_dummy="$PATH"
1939   for ac_dir in $ac_dummy; do
1940     test -z "$ac_dir" && ac_dir=.
1941     if test -f $ac_dir/$ac_word; then
1942       ac_cv_prog_CC="cl"
1943       break
1944     fi
1945   done
1946   IFS="$ac_save_ifs"
1947 fi
1948 fi
1949 CC="$ac_cv_prog_CC"
1950 if test -n "$CC"; then
1951   echo "$ac_t""$CC" 1>&6
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955  ;;
1956     esac
1957   fi
1958   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1959 fi
1960
1961 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1962 echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1963
1964 ac_ext=c
1965 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1966 ac_cpp='$CPP $CPPFLAGS'
1967 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1968 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1969 cross_compiling=$ac_cv_prog_cc_cross
1970
1971 cat > conftest.$ac_ext << EOF
1972
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975
1976 main(){return(0);}
1977 EOF
1978 if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1979   ac_cv_prog_cc_works=yes
1980   # If we can't run a trivial program, we are probably using a cross compiler.
1981   if (./conftest; exit) 2>/dev/null; then
1982     ac_cv_prog_cc_cross=no
1983   else
1984     ac_cv_prog_cc_cross=yes
1985   fi
1986 else
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   ac_cv_prog_cc_works=no
1990 fi
1991 rm -fr conftest*
1992 ac_ext=c
1993 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1994 ac_cpp='$CPP $CPPFLAGS'
1995 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1996 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1997 cross_compiling=$ac_cv_prog_cc_cross
1998
1999 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2000 if test $ac_cv_prog_cc_works = no; then
2001   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2002 fi
2003 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2004 echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2005 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2006 cross_compiling=$ac_cv_prog_cc_cross
2007
2008 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether we are using GNU C" >&5
2010 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2011   echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013   cat > conftest.c <<EOF
2014 #ifdef __GNUC__
2015   yes;
2016 #endif
2017 EOF
2018 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2019   ac_cv_prog_gcc=yes
2020 else
2021   ac_cv_prog_gcc=no
2022 fi
2023 fi
2024
2025 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2026
2027 if test $ac_cv_prog_gcc = yes; then
2028   GCC=yes
2029 else
2030   GCC=
2031 fi
2032
2033 ac_test_CFLAGS="${CFLAGS+set}"
2034 ac_save_CFLAGS="$CFLAGS"
2035 CFLAGS=
2036 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
2038 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   echo 'void f(){}' > conftest.c
2042 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2043   ac_cv_prog_cc_g=yes
2044 else
2045   ac_cv_prog_cc_g=no
2046 fi
2047 rm -f conftest*
2048
2049 fi
2050
2051 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2052 if test "$ac_test_CFLAGS" = set; then
2053   CFLAGS="$ac_save_CFLAGS"
2054 elif test $ac_cv_prog_cc_g = yes; then
2055   if test "$GCC" = yes; then
2056     CFLAGS="-g -O2"
2057   else
2058     CFLAGS="-g"
2059   fi
2060 else
2061   if test "$GCC" = yes; then
2062     CFLAGS="-O2"
2063   else
2064     CFLAGS=
2065   fi
2066 fi
2067
2068
2069   # We must set the default linker to the linker used by gcc for the correct
2070   # operation of libtool.  If LD is not defined and we are using gcc, try to
2071   # set the LD default to the ld used by gcc.
2072   if test -z "$LD"; then
2073     if test "$GCC" = yes; then
2074       case $build in
2075       *-*-mingw*)
2076         gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2077       *)
2078         gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2079       esac
2080       case $gcc_prog_ld in
2081       # Accept absolute paths.
2082       [\\/]* | [A-Za-z]:[\\/]*)
2083         LD="$gcc_prog_ld" ;;
2084       esac
2085     fi
2086   fi
2087
2088   CXX=${CXX-"c++"}
2089   CFLAGS=${CFLAGS-"-g"}
2090   CXXFLAGS=${CXXFLAGS-"-g -O2"}
2091 fi
2092
2093 if test $host != $build; then
2094   ac_tool_prefix=${host_alias}-
2095 else
2096   ac_tool_prefix=
2097 fi
2098
2099
2100
2101 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
2102 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
2103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2104 echo "configure:2105: checking for $ac_word" >&5
2105 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2106   echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108   if test -n "$GNATBIND"; then
2109   ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2110 else
2111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2112   ac_dummy="$PATH"
2113   for ac_dir in $ac_dummy; do
2114     test -z "$ac_dir" && ac_dir=.
2115     if test -f $ac_dir/$ac_word; then
2116       ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2117       break
2118     fi
2119   done
2120   IFS="$ac_save_ifs"
2121 fi
2122 fi
2123 GNATBIND="$ac_cv_prog_GNATBIND"
2124 if test -n "$GNATBIND"; then
2125   echo "$ac_t""$GNATBIND" 1>&6
2126 else
2127   echo "$ac_t""no" 1>&6
2128 fi
2129
2130
2131 if test -z "$ac_cv_prog_GNATBIND"; then
2132 if test -n "$ac_tool_prefix"; then
2133   # Extract the first word of "gnatbind", so it can be a program name with args.
2134 set dummy gnatbind; ac_word=$2
2135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2136 echo "configure:2137: checking for $ac_word" >&5
2137 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2138   echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140   if test -n "$GNATBIND"; then
2141   ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2142 else
2143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2144   ac_dummy="$PATH"
2145   for ac_dir in $ac_dummy; do
2146     test -z "$ac_dir" && ac_dir=.
2147     if test -f $ac_dir/$ac_word; then
2148       ac_cv_prog_GNATBIND="gnatbind"
2149       break
2150     fi
2151   done
2152   IFS="$ac_save_ifs"
2153   test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
2154 fi
2155 fi
2156 GNATBIND="$ac_cv_prog_GNATBIND"
2157 if test -n "$GNATBIND"; then
2158   echo "$ac_t""$GNATBIND" 1>&6
2159 else
2160   echo "$ac_t""no" 1>&6
2161 fi
2162
2163 else
2164   GNATBIND="no"
2165 fi
2166 fi
2167
2168 echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
2169 echo "configure:2170: checking whether compiler driver understands Ada" >&5
2170 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   cat >conftest.adb <<EOF
2174 procedure conftest is begin null; end conftest;
2175 EOF
2176 acx_cv_cc_gcc_supports_ada=no
2177 # There is a bug in old released versions of GCC which causes the
2178 # driver to exit successfully when the appropriate language module
2179 # has not been installed.  This is fixed in 2.95.4, 3.0.2, and 3.1.
2180 # Therefore we must check for the error message as well as an
2181 # unsuccessful exit.
2182 # Other compilers, like HP Tru64 UNIX cc, exit successfully when
2183 # given a .adb file, but produce no object file.  So we must check
2184 # if an object file was really produced to guard against this.
2185 errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
2186 if test x"$errors" = x && test -f conftest.$ac_objext; then
2187   acx_cv_cc_gcc_supports_ada=yes
2188 fi
2189 rm -f conftest.*
2190 fi
2191
2192 echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
2193
2194 if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
2195   have_gnat=yes
2196 else
2197   have_gnat=no
2198 fi
2199
2200 echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
2201 echo "configure:2202: checking how to compare bootstrapped objects" >&5
2202 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205    echo abfoo >t1
2206   echo cdfoo >t2
2207   gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
2208   if cmp t1 t2 2 2 > /dev/null 2>&1; then
2209     if cmp t1 t2 1 1 > /dev/null 2>&1; then
2210       :
2211     else
2212       gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2213     fi
2214   fi
2215   if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2216     if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2217       :
2218     else
2219       gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2220     fi
2221   fi
2222   rm t1 t2
2223
2224 fi
2225
2226 echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2227 do_compare="$gcc_cv_prog_cmp_skip"
2228
2229
2230
2231 # Check for html and install-html
2232 # Check whether --with-datarootdir or --without-datarootdir was given.
2233 if test "${with_datarootdir+set}" = set; then
2234   withval="$with_datarootdir"
2235   datarootdir="\${prefix}/${withval}"
2236 else
2237   datarootdir="\${prefix}/share"
2238 fi
2239
2240
2241 # Check whether --with-docdir or --without-docdir was given.
2242 if test "${with_docdir+set}" = set; then
2243   withval="$with_docdir"
2244   docdir="\${prefix}/${withval}"
2245 else
2246   docdir="\${datarootdir}/doc"
2247 fi
2248
2249
2250 # Check whether --with-htmldir or --without-htmldir was given.
2251 if test "${with_htmldir+set}" = set; then
2252   withval="$with_htmldir"
2253   htmldir="\${prefix}/${withval}"
2254 else
2255   htmldir="\${docdir}"
2256 fi
2257
2258
2259
2260
2261
2262
2263 # Check for GMP and MPFR
2264 gmplibs=
2265 gmpinc=
2266 have_gmp=yes
2267 # Specify a location for mpfr
2268 # check for this first so it ends up on the link line before gmp.
2269 # Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2270 if test "${with_mpfr_dir+set}" = set; then
2271   withval="$with_mpfr_dir"
2272   :
2273 fi
2274
2275
2276 if test "x$with_mpfr_dir" != x; then
2277   gmpinc="-I$with_mpfr_dir"
2278   gmplibs="$with_mpfr_dir/libmpfr.a"
2279 else
2280   gmplibs="-lmpfr"
2281 fi
2282
2283 # Check whether --with-mpfr or --without-mpfr was given.
2284 if test "${with_mpfr+set}" = set; then
2285   withval="$with_mpfr"
2286   :
2287 fi
2288
2289
2290 if test "x$with_mpfr" != x; then
2291   gmplibs="-L$with_mpfr/lib $gmplibs"
2292   gmpinc="-I$with_mpfr/include"
2293 fi
2294
2295 # Specify a location for gmp
2296 # Check whether --with-gmp-dir or --without-gmp-dir was given.
2297 if test "${with_gmp_dir+set}" = set; then
2298   withval="$with_gmp_dir"
2299   :
2300 fi
2301
2302
2303 if test "x$with_gmp_dir" != x; then
2304   gmpinc="$gmpinc -I$with_gmp_dir"
2305   if test -f "$with_gmp_dir/.libs/libgmp.a"; then
2306     gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
2307   elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
2308     gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
2309   fi
2310   # One of the later tests will catch the error if neither library is present.
2311 else
2312   gmplibs="$gmplibs -lgmp"
2313 fi
2314
2315 # Check whether --with-gmp or --without-gmp was given.
2316 if test "${with_gmp+set}" = set; then
2317   withval="$with_gmp"
2318   :
2319 fi
2320
2321
2322 if test "x$with_gmp" != x; then
2323   gmplibs="-L$with_gmp/lib $gmplibs"
2324   gmpinc="-I$with_gmp/include $gmpinc"
2325 fi
2326
2327 saved_CFLAGS="$CFLAGS"
2328 CFLAGS="$CFLAGS $gmpinc"
2329 # Check GMP actually works
2330 echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
2331 echo "configure:2332: checking for correct version of gmp.h" >&5
2332 cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 #include "gmp.h"
2336 int main() {
2337
2338 #if __GNU_MP_VERSION < 3
2339 choke me
2340 #endif
2341
2342 ; return 0; }
2343 EOF
2344 if { (eval echo configure:2345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2345   rm -rf conftest*
2346   echo "$ac_t""yes" 1>&6
2347 else
2348   echo "configure: failed program was:" >&5
2349   cat conftest.$ac_ext >&5
2350   rm -rf conftest*
2351   echo "$ac_t""no" 1>&6; have_gmp=no
2352 fi
2353 rm -f conftest*
2354
2355 if test x"$have_gmp" = xyes; then
2356   echo $ac_n "checking for MPFR""... $ac_c" 1>&6
2357 echo "configure:2358: checking for MPFR" >&5
2358
2359   saved_LIBS="$LIBS"
2360   LIBS="$LIBS $gmplibs"
2361   cat > conftest.$ac_ext <<EOF
2362 #line 2363 "configure"
2363 #include "confdefs.h"
2364 #include <gmp.h>
2365 #include <mpfr.h>
2366 int main() {
2367 mpfr_t n; mpfr_init(n);
2368 ; return 0; }
2369 EOF
2370 if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2371   rm -rf conftest*
2372   echo "$ac_t""yes" 1>&6
2373 else
2374   echo "configure: failed program was:" >&5
2375   cat conftest.$ac_ext >&5
2376   rm -rf conftest*
2377   echo "$ac_t""no" 1>&6; have_gmp=no
2378 fi
2379 rm -f conftest*
2380   LIBS="$saved_LIBS"
2381 fi
2382 CFLAGS="$saved_CFLAGS"
2383
2384 # Flags needed for both GMP and/or MPFR
2385
2386
2387
2388 # By default, C is the only stage 1 language.
2389 stage1_languages=c
2390
2391
2392 # Figure out what language subdirectories are present.
2393 # Look if the user specified --enable-languages="..."; if not, use
2394 # the environment variable $LANGUAGES if defined. $LANGUAGES might
2395 # go away some day.
2396 # NB:  embedded tabs in this IF block -- do not untabify
2397 if test -d ${srcdir}/gcc; then
2398   if test x"${enable_languages+set}" != xset; then
2399     if test x"${LANGUAGES+set}" = xset; then
2400       enable_languages="${LANGUAGES}"
2401         echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2402     else
2403       enable_languages=all
2404     fi
2405   else
2406     if test x"${enable_languages}" = x ||
2407        test x"${enable_languages}" = xyes;
2408        then
2409       echo configure.in: --enable-languages needs at least one language argument 1>&2
2410       exit 1
2411     fi
2412   fi
2413   enable_languages=`echo "${enable_languages}" | sed -e 's/[    ,][     ,]*/,/g' -e 's/,$//'`
2414
2415   # 'f95' is the old name for the 'fortran' language. We issue a warning
2416   # and make the substitution.
2417   case ,${enable_languages}, in
2418     *,f95,*)
2419       echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
2420       enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
2421       ;;
2422   esac
2423
2424   # First scan to see if an enabled language requires some other language.
2425   # We assume that a given config-lang.in will list all the language
2426   # front ends it requires, even if some are required indirectly.
2427   for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2428     case ${lang_frag} in
2429       ..) ;;
2430       # The odd quoting in the next line works around
2431       # an apparent bug in bash 1.12 on linux.
2432       ${srcdir}/gcc/[*]/config-lang.in) ;;
2433       *)
2434         # From the config-lang.in, get $language, $lang_requires
2435         language=
2436         lang_requires=
2437         . ${lang_frag}
2438         for other in ${lang_requires} ; do
2439           case ,${enable_languages}, in
2440             *,$other,*) ;;
2441             *,all,*) ;;
2442             *,$language,*)
2443               echo " \`$other' language required by \`$language'; enabling" 1>&2
2444               enable_languages="${enable_languages},${other}"
2445               ;;
2446           esac
2447         done
2448         ;;
2449     esac
2450   done
2451
2452   new_enable_languages=c
2453   missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
2454   potential_languages=c
2455
2456   for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2457     case ${lang_frag} in
2458       ..) ;;
2459       # The odd quoting in the next line works around
2460       # an apparent bug in bash 1.12 on linux.
2461       ${srcdir}/gcc/[*]/config-lang.in) ;;
2462       *)
2463         # From the config-lang.in, get $language, $target_libs, 
2464         # $lang_dirs, $boot_language, and $build_by_default
2465         language=
2466         target_libs=
2467         lang_dirs=
2468         boot_language=
2469         build_by_default=
2470         need_gmp=
2471         . ${lang_frag}
2472         potential_languages="${potential_languages},${language}"
2473         # This is quite sensitive to the ordering of the case statement arms.
2474         case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2475           *::*:*)
2476             echo "${lang_frag} doesn't set \$language." 1>&2
2477             exit 1
2478             ;;
2479           *:ada:no:*)
2480             # Ada was requested with no preexisting GNAT.  Disable unconditionally.
2481             add_this_lang=no
2482             ;;
2483           *,${language},*:*:*:*)
2484             # Language was explicitly selected; include it.
2485             add_this_lang=yes
2486             ;;
2487           *,all,*:*:*:no)
2488             # 'all' was selected, but this is not a default language
2489             # so do not include it.
2490             add_this_lang=no
2491             ;;
2492           *,all,*:*:*:*)
2493             # 'all' was selected and this is a default language; include it.
2494             add_this_lang=yes
2495             ;;
2496           *)
2497             add_this_lang=no
2498             ;;
2499         esac
2500
2501         # Disable languages that need GMP if it isn't available.
2502         case ,${enable_languages},:${have_gmp}:${need_gmp} in
2503           *,${language},*:no:yes)
2504             # Specifically requested language; tell them.
2505             { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
2506             ;;
2507           *:no:yes)
2508             # Silently disable.
2509             add_this_lang=no
2510             ;;
2511         esac
2512
2513         # Disable a language that is unsupported by the target.
2514         case " $unsupported_languages " in
2515           *" $language "*)
2516             add_this_lang=no
2517             ;;
2518         esac
2519
2520         case $add_this_lang in
2521           no)
2522             # Remove language-dependent dirs.
2523             eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2524             ;;
2525           *)
2526             new_enable_languages="$new_enable_languages,$language"
2527             missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2528             case ${boot_language} in
2529               yes)
2530                 # Add to (comma-separated) list of stage 1 languages.
2531                 stage1_languages="${stage1_languages},${language}"
2532                 ;;
2533             esac
2534             ;;
2535         esac
2536         ;;
2537     esac
2538   done
2539
2540   missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
2541   if test "x$missing_languages" != x; then
2542     { echo "configure: error: 
2543 The following requested languages could not be built: ${missing_languages}
2544 Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
2545   fi
2546
2547   if test "x$new_enable_languages" != "x$enable_languages"; then
2548     echo The following languages will be built: ${new_enable_languages}
2549   fi
2550   enable_languages="$new_enable_languages"
2551   ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
2552 fi
2553
2554 # Handle --disable-<component> generically.
2555 for dir in $configdirs $build_configdirs $target_configdirs ; do
2556   dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
2557   if eval test x\${enable_${dirname}} "=" xno ; then
2558     noconfigdirs="$noconfigdirs $dir"
2559   fi
2560 done
2561
2562 # Check for Boehm's garbage collector
2563 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2564 if test "${enable_objc_gc+set}" = set; then
2565   enableval="$enable_objc_gc"
2566   case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
2567   *,objc,*:*:yes:*target-boehm-gc*)
2568     { echo "configure: error: Boehm's garbage collector was requested yet not supported in this configuration" 1>&2; exit 1; }
2569     ;;
2570 esac
2571 fi
2572
2573
2574 # Make sure we only build Boehm's garbage collector if required.
2575 case ,${enable_languages},:${enable_libgcj}:${enable_objc_gc} in
2576   *,objc,*:*:yes)
2577     # Keep target-boehm-gc if requested for Objective-C.
2578     ;;
2579   *,java,*:no:*)
2580     # Remove target-boehm-gc if libgcj has been disabled explicitly.
2581     noconfigdirs="$noconfigdirs target-boehm-gc"
2582     ;;
2583   *,java,*:*:*)
2584     # Keep target-boehm-gc by default for Java.
2585     ;;
2586   *)
2587     # Otherwise remove target-boehm-gc.
2588     noconfigdirs="$noconfigdirs target-boehm-gc"
2589     ;;
2590 esac
2591
2592 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2593 # $build_configdirs and $target_configdirs.
2594 # If we have the source for $noconfigdirs entries, add them to $notsupp.
2595
2596 notsupp=""
2597 for dir in . $skipdirs $noconfigdirs ; do
2598   dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
2599   if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2600     configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2601     if test -r $srcdir/$dirname/configure ; then
2602       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2603         true
2604       else
2605         notsupp="$notsupp $dir"
2606       fi
2607     fi
2608   fi
2609   if test $dir != .  && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2610     build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2611     if test -r $srcdir/$dirname/configure ; then
2612       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2613         true
2614       else
2615         notsupp="$notsupp $dir"
2616       fi
2617     fi
2618   fi
2619   if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2620     target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2621     if test -r $srcdir/$dirname/configure ; then
2622       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2623         true
2624       else
2625         notsupp="$notsupp $dir"
2626       fi
2627     fi
2628   fi
2629 done
2630
2631 # Sometimes the tools are distributed with libiberty but with no other
2632 # libraries.  In that case, we don't want to build target-libiberty.
2633 if test -n "${target_configdirs}" ; then
2634   others=
2635   for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2636     if test "$i" != "libiberty" ; then
2637       if test -r $srcdir/$i/configure ; then
2638         others=yes;
2639         break;
2640       fi
2641     fi
2642   done
2643   if test -z "${others}" ; then
2644     target_configdirs=
2645   fi
2646 fi
2647
2648 # Quietly strip out all directories which aren't configurable in this tree.
2649 # This relies on all configurable subdirectories being autoconfiscated, which
2650 # is now the case.
2651 build_configdirs_all="$build_configdirs"
2652 build_configdirs=
2653 for i in ${build_configdirs_all} ; do
2654   j=`echo $i | sed -e s/build-//g` 
2655   if test -f ${srcdir}/$j/configure ; then
2656     build_configdirs="${build_configdirs} $i"
2657   fi
2658 done
2659
2660 configdirs_all="$configdirs"
2661 configdirs=
2662 for i in ${configdirs_all} ; do
2663   if test -f ${srcdir}/$i/configure ; then
2664     configdirs="${configdirs} $i"
2665   fi
2666 done
2667
2668 target_configdirs_all="$target_configdirs"
2669 target_configdirs=
2670 for i in ${target_configdirs_all} ; do
2671   j=`echo $i | sed -e s/target-//g` 
2672   if test -f ${srcdir}/$j/configure ; then
2673     target_configdirs="${target_configdirs} $i"
2674   fi
2675 done
2676
2677 # Produce a warning message for the subdirs we can't configure.
2678 # This isn't especially interesting in the Cygnus tree, but in the individual
2679 # FSF releases, it's important to let people know when their machine isn't
2680 # supported by the one or two programs in a package.
2681
2682 if test -n "${notsupp}" && test -z "${norecursion}" ; then
2683   # If $appdirs is non-empty, at least one of those directories must still
2684   # be configured, or we error out.  (E.g., if the gas release supports a
2685   # specified target in some subdirs but not the gas subdir, we shouldn't
2686   # pretend that all is well.)
2687   if test -n "$appdirs" ; then
2688     for dir in $appdirs ; do
2689       if test -r $dir/Makefile.in ; then
2690         if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2691           appdirs=""
2692           break
2693         fi
2694         if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
2695           appdirs=""
2696           break
2697         fi
2698       fi
2699     done
2700     if test -n "$appdirs" ; then
2701       echo "*** This configuration is not supported by this package." 1>&2
2702       exit 1
2703     fi
2704   fi
2705   # Okay, some application will build, or we don't care to check.  Still
2706   # notify of subdirs not getting built.
2707   echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2708   echo "    ${notsupp}" 1>&2
2709   echo "    (Any other directories should still work fine.)" 1>&2
2710 fi
2711
2712 case "$host" in
2713   *msdosdjgpp*)
2714     enable_gdbtk=no ;;
2715 esac
2716
2717 copy_dirs=
2718
2719 # Check whether --with-build-sysroot or --without-build-sysroot was given.
2720 if test "${with_build_sysroot+set}" = set; then
2721   withval="$with_build_sysroot"
2722   if test x"$withval" != x ; then
2723      SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
2724    fi
2725 else
2726   SYSROOT_CFLAGS_FOR_TARGET=
2727 fi
2728
2729
2730
2731 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
2732 # the named directory are copied to $(tooldir)/sys-include.
2733 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2734   if test x${is_cross_compiler} = xno ; then
2735     echo 1>&2 '***' --with-headers is only supported when cross compiling
2736     exit 1
2737   fi
2738   if test x"${with_headers}" != xyes ; then
2739     case "${exec_prefixoption}" in
2740     "") x=${prefix} ;;
2741     *) x=${exec_prefix} ;;
2742     esac
2743     copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2744   fi
2745 fi
2746
2747 # Handle --with-libs=XXX.  If the value is not "yes", the contents of
2748 # the name directories are copied to $(tooldir)/lib.  Multiple directories
2749 # are permitted.
2750 if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2751   if test x${is_cross_compiler} = xno ; then
2752     echo 1>&2 '***' --with-libs is only supported when cross compiling
2753     exit 1
2754   fi
2755   if test x"${with_libs}" != xyes ; then
2756     # Copy the libraries in reverse order, so that files in the first named
2757     # library override files in subsequent libraries.
2758     case "${exec_prefixoption}" in
2759     "") x=${prefix} ;;
2760     *) x=${exec_prefix} ;;
2761     esac
2762     for l in ${with_libs}; do
2763       copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2764     done
2765   fi
2766 fi
2767
2768 # Set with_gnu_as and with_gnu_ld as appropriate.
2769 #
2770 # This is done by determining whether or not the appropriate directory
2771 # is available, and by checking whether or not specific configurations
2772 # have requested that this magic not happen.
2773
2774 # The command line options always override the explicit settings in 
2775 # configure.in, and the settings in configure.in override this magic.
2776 #
2777 # If the default for a toolchain is to use GNU as and ld, and you don't 
2778 # want to do that, then you should use the --without-gnu-as and
2779 # --without-gnu-ld options for the configure script.
2780
2781 if test x${use_gnu_as} = x &&
2782    echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2783   with_gnu_as=yes
2784   extra_host_args="$extra_host_args --with-gnu-as"
2785 fi
2786
2787 if test x${use_gnu_ld} = x &&
2788    echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2789   with_gnu_ld=yes
2790   extra_host_args="$extra_host_args --with-gnu-ld"
2791 fi
2792
2793 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2794 # can detect this case.
2795
2796 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2797   with_newlib=yes
2798   extra_host_args="$extra_host_args --with-newlib"
2799 fi
2800
2801 # Handle ${copy_dirs}
2802 set fnord ${copy_dirs}
2803 shift
2804 while test $# != 0 ; do
2805   if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2806     :
2807   else
2808     echo Copying $1 to $2
2809
2810     # Use the install script to create the directory and all required
2811     # parent directories.
2812     if test -d $2 ; then
2813       :
2814     else
2815       echo >config.temp
2816       ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2817     fi
2818
2819     # Copy the directory, assuming we have tar.
2820     # FIXME: Should we use B in the second tar?  Not all systems support it.
2821     (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2822
2823     # It is the responsibility of the user to correctly adjust all
2824     # symlinks.  If somebody can figure out how to handle them correctly
2825     # here, feel free to add the code.
2826
2827     echo $1 > $2/COPIED
2828   fi
2829   shift; shift
2830 done
2831
2832 # Determine a target-dependent exec_prefix that the installed
2833 # gcc will search in.  Keep this list sorted by triplet, with
2834 # the *-*-osname triplets last.
2835 md_exec_prefix=
2836 case "${target}" in
2837   alpha*-*-*vms*)
2838     md_exec_prefix=/gnu/lib/gcc-lib
2839     ;;
2840   i3456786-pc-msdosdjgpp*)
2841     md_exec_prefix=/dev/env/DJDIR/bin
2842     ;;
2843   i3456786-*-sco3.2v5*)
2844     if test $with_gnu_as = yes; then
2845       md_exec_prefix=/usr/gnu/bin
2846     else
2847       md_exec_prefix=/usr/ccs/bin/elf
2848     fi
2849     ;;
2850
2851   mn10300-*-* | \
2852   powerpc-*-chorusos* | \
2853   powerpc*-*-eabi* | \
2854   powerpc*-*-sysv* | \
2855   powerpc*-*-kaos* | \
2856   s390x-ibm-tpf*)
2857     md_exec_prefix=/usr/ccs/bin
2858     ;;
2859   sparc64-*-elf*)
2860     ;;
2861   v850*-*-*)
2862     md_exec_prefix=/usr/ccs/bin
2863     ;;
2864   xtensa-*-elf*)
2865     ;;
2866
2867   *-*-beos* | \
2868   *-*-elf* | \
2869   *-*-hpux* | \
2870   *-*-netware* | \
2871   *-*-nto-qnx* | \
2872   *-*-rtems* | \
2873   *-*-solaris2* | \
2874   *-*-sysv45* | \
2875   *-*-vxworks* | \
2876   *-wrs-windiss)
2877     md_exec_prefix=/usr/ccs/bin
2878     ;;
2879 esac
2880
2881 extra_arflags_for_target=
2882 extra_nmflags_for_target=
2883 extra_ranlibflags_for_target=
2884 target_makefile_frag=/dev/null
2885 case "${target}" in
2886   *-*-netware*)
2887     target_makefile_frag="config/mt-netware"
2888     ;;
2889   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2890     target_makefile_frag="config/mt-gnu"
2891     ;;
2892   *-*-aix4.[3456789]* | *-*-aix[56789].*)
2893     # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 
2894     # commands to handle both 32-bit and 64-bit objects.  These flags are
2895     # harmless if we're using GNU nm or ar.
2896     extra_arflags_for_target=" -X32_64"
2897     extra_nmflags_for_target=" -B -X32_64"
2898     ;;
2899   *-*-darwin*)
2900     # ranlib from Darwin requires the -c flag to look at common symbols.
2901     extra_ranlibflags_for_target=" -c"
2902     ;;
2903   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2904     target_makefile_frag="config/mt-wince"
2905     ;;
2906 esac
2907
2908 alphaieee_frag=/dev/null
2909 case $target in
2910   alpha*-*-*)
2911     # This just makes sure to use the -mieee option to build target libs.
2912     # This should probably be set individually by each library.
2913     alphaieee_frag="config/mt-alphaieee"
2914     ;;
2915 esac
2916
2917 # If --enable-target-optspace always use -Os instead of -O2 to build
2918 # the target libraries, similarly if it is not specified, use -Os
2919 # on selected platforms.
2920 ospace_frag=/dev/null
2921 case "${enable_target_optspace}:${target}" in
2922   yes:*)
2923     ospace_frag="config/mt-ospace"
2924     ;;
2925   :d30v-*)
2926     ospace_frag="config/mt-d30v"
2927     ;;
2928   :m32r-* | :d10v-* | :fr30-*)
2929     ospace_frag="config/mt-ospace"
2930     ;;
2931   no:* | :*)
2932     ;;
2933   *)
2934     echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2935     ;;
2936 esac
2937
2938 # Default to using --with-stabs for certain targets.
2939 if test x${with_stabs} = x ; then
2940   case "${target}" in
2941   mips*-*-irix[56]*)
2942     ;;
2943   mips*-*-* | alpha*-*-osf*)
2944     with_stabs=yes;
2945     extra_host_args="${extra_host_args} --with-stabs"
2946     ;;
2947   esac
2948 fi
2949
2950 # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
2951 # them automatically.
2952 case "${host}" in
2953   hppa*64*-*-hpux11*)   
2954     extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2955     ;;
2956 esac
2957
2958 # Some systems (e.g., one of the i386-aix systems the gas testers are
2959 # using) don't handle "\$" correctly, so don't use it here.
2960 tooldir='${exec_prefix}'/${target_alias}
2961 build_tooldir=${tooldir}
2962
2963 # Create a .gdbinit file which runs the one in srcdir
2964 # and tells GDB to look there for source files.
2965
2966 if test -r ${srcdir}/.gdbinit ; then
2967   case ${srcdir} in
2968     .) ;;
2969     *) cat > ./.gdbinit <<EOF
2970 # ${NO_EDIT}
2971 dir ${srcdir}
2972 dir .
2973 source ${srcdir}/.gdbinit
2974 EOF
2975     ;;
2976   esac
2977 fi
2978
2979 # Make sure that the compiler is able to generate an executable.  If it
2980 # can't, we are probably in trouble.  We don't care whether we can run the
2981 # executable--we might be using a cross compiler--we only care whether it
2982 # can be created.  At this point the main configure script has set CC.
2983 we_are_ok=no
2984 echo "int main () { return 0; }" > conftest.c
2985 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2986 if test $? = 0 ; then
2987   if test -s conftest || test -s conftest.exe ; then
2988     we_are_ok=yes
2989   fi
2990 fi 
2991 case $we_are_ok in
2992   no)
2993     echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2994     echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2995     rm -f conftest*
2996     exit 1
2997     ;;
2998 esac
2999 rm -f conftest*
3000
3001 # The Solaris /usr/ucb/cc compiler does not appear to work.
3002 case "${host}" in
3003   sparc-sun-solaris2*)
3004       CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
3005       if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
3006           could_use=
3007           test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
3008           if test -d /opt/cygnus/bin ; then
3009               if test "$could_use" = "" ; then
3010                   could_use="/opt/cygnus/bin"
3011               else
3012                   could_use="$could_use or /opt/cygnus/bin"
3013               fi
3014           fi
3015         if test "$could_use" = "" ; then
3016             echo "Warning: compilation may fail because you're using"
3017             echo "/usr/ucb/cc.  You should change your PATH or CC "
3018             echo "variable and rerun configure."
3019         else
3020             echo "Warning: compilation may fail because you're using"
3021             echo "/usr/ucb/cc, when you should use the C compiler from"
3022             echo "$could_use.  You should change your"
3023             echo "PATH or CC variable and rerun configure."
3024         fi
3025       fi
3026   ;;
3027 esac
3028
3029 case "${host}" in
3030   *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
3031   *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
3032   *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
3033 esac
3034
3035 # Record target_configdirs and the configure arguments for target and
3036 # build configuration in Makefile.
3037 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
3038 build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
3039
3040 # Determine whether gdb needs tk/tcl or not.
3041 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available
3042 # and in that case we want gdb to be built without tk.  Ugh!
3043 # In fact I believe gdb is the *only* package directly dependent on tk,
3044 # so we should be able to put the 'maybe's in unconditionally and
3045 # leave out the maybe dependencies when enable_gdbtk is false.  I'm not
3046 # 100% sure that that's safe though.
3047
3048 gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
3049 case "$enable_gdbtk" in
3050   no)
3051     GDB_TK="" ;;
3052   yes)
3053     GDB_TK="${gdb_tk}" ;;
3054   *)
3055     # Only add the dependency on gdbtk when GDBtk is part of the gdb
3056     # distro.  Eventually someone will fix this and move Insight, nee
3057     # gdbtk to a separate directory.
3058     if test -d ${srcdir}/gdb/gdbtk ; then
3059       GDB_TK="${gdb_tk}"
3060     else
3061       GDB_TK=""
3062     fi
3063     ;;
3064 esac
3065 CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
3066 INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
3067
3068 # Strip out unwanted targets.
3069
3070 # While at that, we remove Makefiles if we were started for recursive
3071 # configuration, so that the top-level Makefile reconfigures them,
3072 # like we used to do when configure itself was recursive.
3073
3074 # Loop over modules.  $extrasub must be used with care, limiting as
3075 # much as possible the usage of range addresses.  That's because autoconf
3076 # splits the sed script to overcome limits in the number of commands,
3077 # and relying on carefully-timed sed passes may turn out to be very hard
3078 # to maintain later.  In this particular case, you just have to be careful
3079 # not to nest @if/@endif pairs, because configure will not warn you at all.
3080
3081 # Check whether --enable-bootstrap or --disable-bootstrap was given.
3082 if test "${enable_bootstrap+set}" = set; then
3083   enableval="$enable_bootstrap"
3084   :
3085 else
3086   enable_bootstrap=default
3087 fi
3088
3089
3090 # Issue errors and warnings for invalid/strange bootstrap combinations.
3091 case "$configdirs" in
3092   *gcc*) have_compiler=yes ;;
3093   *) have_compiler=no ;;
3094 esac
3095
3096 case "$have_compiler:$host:$target:$enable_bootstrap" in
3097   *:*:*:no) ;;
3098
3099   # Default behavior.  Enable bootstrap if we have a compiler
3100   # and we are in a native configuration.
3101   yes:$build:$build:default)
3102     enable_bootstrap=yes ;;
3103
3104   *:*:*:default)
3105     enable_bootstrap=no ;;
3106
3107   # We have a compiler and we are in a native configuration, bootstrap is ok
3108   yes:$build:$build:yes)
3109     ;;
3110
3111   # Other configurations, but we have a compiler.  Assume the user knows
3112   # what he's doing.
3113   yes:*:*:yes)
3114     echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
3115     ;;
3116
3117   # No compiler: if they passed --enable-bootstrap explicitly, fail
3118   no:*:*:yes)
3119     { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
3120
3121   # Fail if wrong command line
3122   *)
3123     { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
3124     ;;
3125 esac
3126
3127 # Adjust the toplevel makefile according to whether bootstrap was selected.
3128 case "$enable_bootstrap" in
3129   yes)
3130     bootstrap_suffix=bootstrap ;;
3131   no)
3132     bootstrap_suffix=no-bootstrap ;;
3133 esac
3134
3135 for module in ${build_configdirs} ; do
3136   if test -z "${no_recursion}" \
3137      && test -f ${build_subdir}/${module}/Makefile; then
3138     echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3139     rm -f ${build_subdir}/${module}/Makefile
3140   fi
3141   extrasub="$extrasub
3142 /^@if build-$module\$/d
3143 /^@endif build-$module\$/d
3144 /^@if build-$module-$bootstrap_suffix\$/d
3145 /^@endif build-$module-$bootstrap_suffix\$/d"
3146 done
3147 for module in ${configdirs} ; do
3148   if test -z "${no_recursion}"; then
3149     for file in stage*-${module}/Makefile ${module}/Makefile; do
3150       if test -f ${file}; then
3151         echo 1>&2 "*** removing ${file} to force reconfigure"
3152         rm -f ${file}
3153       fi
3154     done
3155   fi
3156   extrasub="$extrasub
3157 /^@if $module\$/d
3158 /^@endif $module\$/d
3159 /^@if $module-$bootstrap_suffix\$/d
3160 /^@endif $module-$bootstrap_suffix\$/d"
3161 done
3162 for module in ${target_configdirs} ; do
3163   if test -z "${no_recursion}" \
3164      && test -f ${target_subdir}/${module}/Makefile; then
3165     echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3166     rm -f ${target_subdir}/${module}/Makefile
3167   fi
3168   extrasub="$extrasub
3169 /^@if target-$module\$/d
3170 /^@endif target-$module\$/d
3171 /^@if target-$module-$bootstrap_suffix\$/d
3172 /^@endif target-$module-$bootstrap_suffix\$/d"
3173 done
3174
3175 extrasub="$extrasub
3176 /^@if /,/^@endif /d"
3177
3178 # Create the serialization dependencies.  This uses a temporary file.
3179
3180 # Check whether --enable-serial-configure or --disable-serial-configure was given.
3181 if test "${enable_serial_configure+set}" = set; then
3182   enableval="$enable_serial_configure"
3183   :
3184 fi
3185
3186
3187 case ${enable_serial_configure} in
3188   yes)
3189     enable_serial_build_configure=yes
3190     enable_serial_host_configure=yes
3191     enable_serial_target_configure=yes
3192     ;;
3193 esac
3194
3195 # These force 'configure's to be done one at a time, to avoid problems
3196 # with contention over a shared config.cache.
3197 rm -f serdep.tmp
3198 echo '# serdep.tmp' > serdep.tmp
3199 olditem=
3200 test "x${enable_serial_build_configure}" = xyes &&
3201 for item in ${build_configdirs} ; do
3202   case ${olditem} in
3203     "") ;;
3204     *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
3205   esac
3206   olditem=${item}
3207 done
3208 olditem=
3209 test "x${enable_serial_host_configure}" = xyes &&
3210 for item in ${configdirs} ; do
3211   case ${olditem} in
3212     "") ;;
3213     *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
3214   esac
3215   olditem=${item}
3216 done
3217 olditem=
3218 test "x${enable_serial_target_configure}" = xyes &&
3219 for item in ${target_configdirs} ; do
3220   case ${olditem} in
3221     "") ;;
3222     *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
3223   esac
3224   olditem=${item}
3225 done
3226 serialization_dependencies=serdep.tmp
3227
3228
3229 # Base args.  Strip norecursion, cache-file, srcdir, host, build,
3230 # target and nonopt.  These are the ones we might not want to pass
3231 # down to subconfigures.  Also strip program-prefix, program-suffix,
3232 # and program-transform-name, so that we can pass down a consistent
3233 # program-transform-name.  If autoconf has put single quotes around
3234 # any of these arguments (because they contain shell metacharacters)
3235 # then this will fail; in practice this only happens for
3236 # --program-transform-name, so be sure to override --program-transform-name
3237 # at the end of the argument list.
3238 # These will be expanded by make, so quote '$'.
3239 cat <<\EOF_SED > conftestsed
3240 s/ --no[^ ]*/ /g
3241 s/ --c[a-z-]*[= ][^ ]*//g
3242 s/ --sr[a-z-]*[= ][^ ]*//g
3243 s/ --ho[a-z-]*[= ][^ ]*//g
3244 s/ --bu[a-z-]*[= ][^ ]*//g
3245 s/ --t[a-z-]*[= ][^ ]*//g
3246 s/ --program-[pst][a-z-]*[= ][^ ]*//g
3247 s/ -cache-file[= ][^ ]*//g
3248 s/ -srcdir[= ][^ ]*//g
3249 s/ -host[= ][^ ]*//g
3250 s/ -build[= ][^ ]*//g
3251 s/ -target[= ][^ ]*//g
3252 s/ -program-prefix[= ][^ ]*//g
3253 s/ -program-suffix[= ][^ ]*//g
3254 s/ -program-transform-name[= ][^ ]*//g
3255 s/ [^' -][^ ]* / /
3256 s/^ *//;s/ *$//
3257 s,\$,$$,g
3258 EOF_SED
3259 sed -f conftestsed <<EOF_SED > conftestsed.out
3260  ${ac_configure_args} 
3261 EOF_SED
3262 baseargs=`cat conftestsed.out`
3263 rm -f conftestsed conftestsed.out
3264
3265 # Add in --program-transform-name, after --program-prefix and
3266 # --program-suffix have been applied to it.  Autoconf has already
3267 # doubled dollar signs and backslashes in program_transform_name; we want
3268 # the backslashes un-doubled, and then the entire thing wrapped in single
3269 # quotes, because this will be expanded first by make and then by the shell. 
3270 # Also, because we want to override the logic in subdir configure scripts to
3271 # choose program_transform_name, replace any s,x,x, with s,y,y,.
3272 sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3273 ${program_transform_name}
3274 EOF_SED
3275 gcc_transform_name=`cat conftestsed.out`
3276 rm -f conftestsed.out
3277 baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3278
3279 # For the build-side libraries, we just need to pretend we're native,
3280 # and not use the same cache file.  Multilibs are neither needed nor
3281 # desired.
3282 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
3283
3284 # For host modules, accept cache file option, or specification as blank.
3285 case "${cache_file}" in
3286 "") # empty
3287   cache_file_option="" ;;
3288 /* | [A-Za-z]:[\\/]* ) # absolute path
3289   cache_file_option="--cache-file=${cache_file}" ;;
3290 *) # relative path
3291   cache_file_option="--cache-file=../${cache_file}" ;;
3292 esac
3293
3294 # Host dirs don't like to share a cache file either, horribly enough.
3295 # This seems to be due to autoconf 2.5x stupidity.
3296 host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
3297
3298 target_configargs=${baseargs}
3299
3300 # Passing a --with-cross-host argument lets the target libraries know
3301 # whether they are being built with a cross-compiler or being built
3302 # native.  However, it would be better to use other mechanisms to make the
3303 # sorts of decisions they want to make on this basis.  Please consider
3304 # this option to be deprecated.  FIXME.
3305 if test x${is_cross_compiler} = xyes ; then
3306   target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3307 fi
3308
3309 # Default to --enable-multilib.
3310 if test x${enable_multilib} = x ; then
3311   target_configargs="--enable-multilib ${target_configargs}"
3312 fi
3313
3314 # Pass --with-newlib if appropriate.  Note that target_configdirs has
3315 # changed from the earlier setting of with_newlib.
3316 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3317   target_configargs="--with-newlib ${target_configargs}"
3318 fi
3319
3320 # Different target subdirs use different values of certain variables
3321 # (notably CXX).  Worse, multilibs use *lots* of different values.
3322 # Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3323 # it doesn't automatically accept command-line overrides of them.
3324 # This means it's not safe for target subdirs to share a cache file,
3325 # which is disgusting, but there you have it.  Hopefully this can be
3326 # fixed in future.  It's still worthwhile to use a cache file for each
3327 # directory.  I think.
3328
3329 # Pass the appropriate --build, --host, --target and --cache-file arguments.
3330 # We need to pass --target, as newer autoconf's requires consistency
3331 # for target_alias and gcc doesn't manage it consistently.
3332 target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
3333
3334 FLAGS_FOR_TARGET=
3335 case " $target_configdirs " in
3336  *" newlib "*)
3337   case " $target_configargs " in
3338   *" --with-newlib "*)
3339    case "$target" in
3340    *-cygwin*)
3341      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' ;;
3342    esac
3343
3344    # If we're not building GCC, don't discard standard headers.
3345    if test -d ${srcdir}/gcc; then
3346      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3347
3348      if test "${build}" != "${host}"; then
3349        # On Canadian crosses, CC_FOR_TARGET will have already been set
3350        # by `configure', so we won't have an opportunity to add -Bgcc/
3351        # to it.  This is right: we don't want to search that directory
3352        # for binaries, but we want the header files in there, so add
3353        # them explicitly.
3354        FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
3355
3356        # Someone might think of using the pre-installed headers on
3357        # Canadian crosses, in case the installed compiler is not fully
3358        # compatible with the compiler being built.  In this case, it
3359        # would be better to flag an error than risking having
3360        # incompatible object files being constructed.  We can't
3361        # guarantee that an error will be flagged, but let's hope the
3362        # compiler will do it, when presented with incompatible header
3363        # files.
3364      fi
3365    fi
3366
3367    case "${target}-${is_cross_compiler}" in
3368    i[3456789]86-*-linux*-no)
3369       # Here host == target, so we don't need to build gcc,
3370       # so we don't want to discard standard headers.
3371       FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3372       ;;
3373    *)
3374       # If we're building newlib, use its generic headers last, but search
3375       # for any libc-related directories first (so make it the last -B
3376       # switch).
3377       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3378       ;;
3379    esac
3380    ;;
3381   esac
3382   ;;
3383 esac
3384
3385 # Allow the user to override the flags for
3386 # our build compiler if desired.
3387 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3388
3389 # On Canadian crosses, we'll be searching the right directories for
3390 # the previously-installed cross compiler, so don't bother to add
3391 # flags for directories within the install tree of the compiler
3392 # being built; programs in there won't even run.
3393 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3394   # Search for pre-installed headers if nothing else fits.
3395   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
3396 fi
3397
3398 if test "x${use_gnu_ld}" = x &&
3399    echo " ${configdirs} " | grep " ld " > /dev/null ; then
3400   # Arrange for us to find uninstalled linker scripts.
3401   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
3402 fi
3403
3404 # Search for other target-specific linker scripts and such.
3405 case "${target}" in
3406   m32c-*-* )
3407     if test -d ${srcdir}/libgloss/m32c; then
3408       # This is for crt0.o
3409       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3410       # This is for r8c.ld
3411       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
3412       # This is for libnosys.a
3413       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
3414     fi
3415     ;;
3416 esac
3417
3418 # Makefile fragments.
3419 for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3420 do
3421   eval fragval=\$$frag
3422   if test $fragval != /dev/null; then
3423     eval $frag=${srcdir}/$fragval
3424   fi
3425 done
3426
3427
3428
3429
3430
3431 # Miscellanea: directories, flags, etc.
3432
3433
3434
3435
3436
3437
3438
3439 # Build module lists & subconfigure args.
3440
3441
3442
3443 # Host module lists & subconfigure args.
3444
3445
3446
3447 # Target module lists & subconfigure args.
3448
3449
3450
3451 # Build tools.
3452
3453
3454
3455 # Generate default definitions for YACC, M4, LEX and other programs that run
3456 # on the build machine.  These are used if the Makefile can't locate these
3457 # programs in objdir.
3458 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
3459
3460 for ac_prog in 'bison -y' byacc yacc
3461 do
3462 # Extract the first word of "$ac_prog", so it can be a program name with args.
3463 set dummy $ac_prog; ac_word=$2
3464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3465 echo "configure:3466: checking for $ac_word" >&5
3466 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   if test -n "$YACC"; then
3470   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3471 else
3472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3473   ac_dummy="$PATH"
3474   for ac_dir in $ac_dummy; do
3475     test -z "$ac_dir" && ac_dir=.
3476     if test -f $ac_dir/$ac_word; then
3477       ac_cv_prog_YACC="$ac_prog"
3478       break
3479     fi
3480   done
3481   IFS="$ac_save_ifs"
3482 fi
3483 fi
3484 YACC="$ac_cv_prog_YACC"
3485 if test -n "$YACC"; then
3486   echo "$ac_t""$YACC" 1>&6
3487 else
3488   echo "$ac_t""no" 1>&6
3489 fi
3490
3491 test -n "$YACC" && break
3492 done
3493 test -n "$YACC" || YACC="$MISSING bison -y"
3494
3495 case " $build_configdirs " in
3496   *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
3497   *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
3498 esac
3499
3500 for ac_prog in bison
3501 do
3502 # Extract the first word of "$ac_prog", so it can be a program name with args.
3503 set dummy $ac_prog; ac_word=$2
3504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3505 echo "configure:3506: checking for $ac_word" >&5
3506 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3507   echo $ac_n "(cached) $ac_c" 1>&6
3508 else
3509   if test -n "$BISON"; then
3510   ac_cv_prog_BISON="$BISON" # Let the user override the test.
3511 else
3512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3513   ac_dummy="$PATH"
3514   for ac_dir in $ac_dummy; do
3515     test -z "$ac_dir" && ac_dir=.
3516     if test -f $ac_dir/$ac_word; then
3517       ac_cv_prog_BISON="$ac_prog"
3518       break
3519     fi
3520   done
3521   IFS="$ac_save_ifs"
3522 fi
3523 fi
3524 BISON="$ac_cv_prog_BISON"
3525 if test -n "$BISON"; then
3526   echo "$ac_t""$BISON" 1>&6
3527 else
3528   echo "$ac_t""no" 1>&6
3529 fi
3530
3531 test -n "$BISON" && break
3532 done
3533 test -n "$BISON" || BISON="$MISSING bison"
3534
3535 case " $build_configdirs " in
3536   *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
3537 esac
3538
3539 for ac_prog in gm4 gnum4 m4
3540 do
3541 # Extract the first word of "$ac_prog", so it can be a program name with args.
3542 set dummy $ac_prog; ac_word=$2
3543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3544 echo "configure:3545: checking for $ac_word" >&5
3545 if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   if test -n "$M4"; then
3549   ac_cv_prog_M4="$M4" # Let the user override the test.
3550 else
3551   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3552   ac_dummy="$PATH"
3553   for ac_dir in $ac_dummy; do
3554     test -z "$ac_dir" && ac_dir=.
3555     if test -f $ac_dir/$ac_word; then
3556       ac_cv_prog_M4="$ac_prog"
3557       break
3558     fi
3559   done
3560   IFS="$ac_save_ifs"
3561 fi
3562 fi
3563 M4="$ac_cv_prog_M4"
3564 if test -n "$M4"; then
3565   echo "$ac_t""$M4" 1>&6
3566 else
3567   echo "$ac_t""no" 1>&6
3568 fi
3569
3570 test -n "$M4" && break
3571 done
3572 test -n "$M4" || M4="$MISSING m4"
3573
3574 case " $build_configdirs " in
3575   *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
3576 esac
3577
3578 for ac_prog in flex lex
3579 do
3580 # Extract the first word of "$ac_prog", so it can be a program name with args.
3581 set dummy $ac_prog; ac_word=$2
3582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3583 echo "configure:3584: checking for $ac_word" >&5
3584 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3585   echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587   if test -n "$LEX"; then
3588   ac_cv_prog_LEX="$LEX" # Let the user override the test.
3589 else
3590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3591   ac_dummy="$PATH"
3592   for ac_dir in $ac_dummy; do
3593     test -z "$ac_dir" && ac_dir=.
3594     if test -f $ac_dir/$ac_word; then
3595       ac_cv_prog_LEX="$ac_prog"
3596       break
3597     fi
3598   done
3599   IFS="$ac_save_ifs"
3600 fi
3601 fi
3602 LEX="$ac_cv_prog_LEX"
3603 if test -n "$LEX"; then
3604   echo "$ac_t""$LEX" 1>&6
3605 else
3606   echo "$ac_t""no" 1>&6
3607 fi
3608
3609 test -n "$LEX" && break
3610 done
3611 test -n "$LEX" || LEX="$MISSING flex"
3612
3613 case " $build_configdirs " in
3614   *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3615   *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
3616 esac
3617
3618 for ac_prog in flex
3619 do
3620 # Extract the first word of "$ac_prog", so it can be a program name with args.
3621 set dummy $ac_prog; ac_word=$2
3622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3623 echo "configure:3624: checking for $ac_word" >&5
3624 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   if test -n "$FLEX"; then
3628   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3629 else
3630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3631   ac_dummy="$PATH"
3632   for ac_dir in $ac_dummy; do
3633     test -z "$ac_dir" && ac_dir=.
3634     if test -f $ac_dir/$ac_word; then
3635       ac_cv_prog_FLEX="$ac_prog"
3636       break
3637     fi
3638   done
3639   IFS="$ac_save_ifs"
3640 fi
3641 fi
3642 FLEX="$ac_cv_prog_FLEX"
3643 if test -n "$FLEX"; then
3644   echo "$ac_t""$FLEX" 1>&6
3645 else
3646   echo "$ac_t""no" 1>&6
3647 fi
3648
3649 test -n "$FLEX" && break
3650 done
3651 test -n "$FLEX" || FLEX="$MISSING flex"
3652
3653 case " $build_configdirs " in
3654   *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3655 esac
3656
3657 for ac_prog in makeinfo
3658 do
3659 # Extract the first word of "$ac_prog", so it can be a program name with args.
3660 set dummy $ac_prog; ac_word=$2
3661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3662 echo "configure:3663: checking for $ac_word" >&5
3663 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3664   echo $ac_n "(cached) $ac_c" 1>&6
3665 else
3666   if test -n "$MAKEINFO"; then
3667   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3668 else
3669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3670   ac_dummy="$PATH"
3671   for ac_dir in $ac_dummy; do
3672     test -z "$ac_dir" && ac_dir=.
3673     if test -f $ac_dir/$ac_word; then
3674       ac_cv_prog_MAKEINFO="$ac_prog"
3675       break
3676     fi
3677   done
3678   IFS="$ac_save_ifs"
3679 fi
3680 fi
3681 MAKEINFO="$ac_cv_prog_MAKEINFO"
3682 if test -n "$MAKEINFO"; then
3683   echo "$ac_t""$MAKEINFO" 1>&6
3684 else
3685   echo "$ac_t""no" 1>&6
3686 fi
3687
3688 test -n "$MAKEINFO" && break
3689 done
3690 test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3691
3692 case " $build_configdirs " in
3693   *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3694   *)
3695
3696     # For an installed makeinfo, we require it to be from texinfo 4.4 or
3697     # higher, else we use the "missing" dummy.
3698     if ${MAKEINFO} --version \
3699        | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
3700       :
3701     else
3702       MAKEINFO="$MISSING makeinfo"
3703     fi
3704     ;;
3705
3706 esac
3707
3708 # FIXME: expect and dejagnu may become build tools?
3709
3710 for ac_prog in expect
3711 do
3712 # Extract the first word of "$ac_prog", so it can be a program name with args.
3713 set dummy $ac_prog; ac_word=$2
3714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3715 echo "configure:3716: checking for $ac_word" >&5
3716 if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3717   echo $ac_n "(cached) $ac_c" 1>&6
3718 else
3719   if test -n "$EXPECT"; then
3720   ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3721 else
3722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3723   ac_dummy="$PATH"
3724   for ac_dir in $ac_dummy; do
3725     test -z "$ac_dir" && ac_dir=.
3726     if test -f $ac_dir/$ac_word; then
3727       ac_cv_prog_EXPECT="$ac_prog"
3728       break
3729     fi
3730   done
3731   IFS="$ac_save_ifs"
3732 fi
3733 fi
3734 EXPECT="$ac_cv_prog_EXPECT"
3735 if test -n "$EXPECT"; then
3736   echo "$ac_t""$EXPECT" 1>&6
3737 else
3738   echo "$ac_t""no" 1>&6
3739 fi
3740
3741 test -n "$EXPECT" && break
3742 done
3743 test -n "$EXPECT" || EXPECT="expect"
3744
3745 case " $configdirs " in
3746   *" expect "*)
3747     test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3748     ;;
3749 esac
3750
3751 for ac_prog in runtest
3752 do
3753 # Extract the first word of "$ac_prog", so it can be a program name with args.
3754 set dummy $ac_prog; ac_word=$2
3755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3756 echo "configure:3757: checking for $ac_word" >&5
3757 if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   if test -n "$RUNTEST"; then
3761   ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
3762 else
3763   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3764   ac_dummy="$PATH"
3765   for ac_dir in $ac_dummy; do
3766     test -z "$ac_dir" && ac_dir=.
3767     if test -f $ac_dir/$ac_word; then
3768       ac_cv_prog_RUNTEST="$ac_prog"
3769       break
3770     fi
3771   done
3772   IFS="$ac_save_ifs"
3773 fi
3774 fi
3775 RUNTEST="$ac_cv_prog_RUNTEST"
3776 if test -n "$RUNTEST"; then
3777   echo "$ac_t""$RUNTEST" 1>&6
3778 else
3779   echo "$ac_t""no" 1>&6
3780 fi
3781
3782 test -n "$RUNTEST" && break
3783 done
3784 test -n "$RUNTEST" || RUNTEST="runtest"
3785
3786 case " $configdirs " in
3787   *" dejagnu "*)
3788     test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
3789     ;;
3790 esac
3791
3792
3793 # Host tools.
3794 ncn_tool_prefix=
3795 test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3796 ncn_target_tool_prefix=
3797 test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3798
3799  for ncn_progname in ar; do
3800   if test -n "$ncn_tool_prefix"; then
3801     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3802 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
3803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_word" >&5
3805 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   if test -n "$AR"; then
3809   ac_cv_prog_AR="$AR" # Let the user override the test.
3810 else
3811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3812   ac_dummy="$PATH"
3813   for ac_dir in $ac_dummy; do
3814     test -z "$ac_dir" && ac_dir=.
3815     if test -f $ac_dir/$ac_word; then
3816       ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
3817       break
3818     fi
3819   done
3820   IFS="$ac_save_ifs"
3821 fi
3822 fi
3823 AR="$ac_cv_prog_AR"
3824 if test -n "$AR"; then
3825   echo "$ac_t""$AR" 1>&6
3826 else
3827   echo "$ac_t""no" 1>&6
3828 fi
3829
3830   fi
3831   if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3832     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3833 set dummy ${ncn_progname}; ac_word=$2
3834 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3835 echo "configure:3836: checking for $ac_word" >&5
3836 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3837   echo $ac_n "(cached) $ac_c" 1>&6
3838 else
3839   if test -n "$AR"; then
3840   ac_cv_prog_AR="$AR" # Let the user override the test.
3841 else
3842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3843   ac_dummy="$PATH"
3844   for ac_dir in $ac_dummy; do
3845     test -z "$ac_dir" && ac_dir=.
3846     if test -f $ac_dir/$ac_word; then
3847       ac_cv_prog_AR="${ncn_progname}"
3848       break
3849     fi
3850   done
3851   IFS="$ac_save_ifs"
3852 fi
3853 fi
3854 AR="$ac_cv_prog_AR"
3855 if test -n "$AR"; then
3856   echo "$ac_t""$AR" 1>&6
3857 else
3858   echo "$ac_t""no" 1>&6
3859 fi
3860  
3861   fi
3862   test -n "$ac_cv_prog_AR" && break
3863 done
3864
3865 if test -z "$ac_cv_prog_AR" ; then
3866   set dummy ar
3867   if test $build = $host ; then
3868     AR="$2"
3869   else
3870     AR="${ncn_tool_prefix}$2"
3871   fi
3872 fi
3873
3874  for ncn_progname in as; do
3875   if test -n "$ncn_tool_prefix"; then
3876     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3877 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
3878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3879 echo "configure:3880: checking for $ac_word" >&5
3880 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3881   echo $ac_n "(cached) $ac_c" 1>&6
3882 else
3883   if test -n "$AS"; then
3884   ac_cv_prog_AS="$AS" # Let the user override the test.
3885 else
3886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3887   ac_dummy="$PATH"
3888   for ac_dir in $ac_dummy; do
3889     test -z "$ac_dir" && ac_dir=.
3890     if test -f $ac_dir/$ac_word; then
3891       ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
3892       break
3893     fi
3894   done
3895   IFS="$ac_save_ifs"
3896 fi
3897 fi
3898 AS="$ac_cv_prog_AS"
3899 if test -n "$AS"; then
3900   echo "$ac_t""$AS" 1>&6
3901 else
3902   echo "$ac_t""no" 1>&6
3903 fi
3904
3905   fi
3906   if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3907     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3908 set dummy ${ncn_progname}; ac_word=$2
3909 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3910 echo "configure:3911: checking for $ac_word" >&5
3911 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   if test -n "$AS"; then
3915   ac_cv_prog_AS="$AS" # Let the user override the test.
3916 else
3917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3918   ac_dummy="$PATH"
3919   for ac_dir in $ac_dummy; do
3920     test -z "$ac_dir" && ac_dir=.
3921     if test -f $ac_dir/$ac_word; then
3922       ac_cv_prog_AS="${ncn_progname}"
3923       break
3924     fi
3925   done
3926   IFS="$ac_save_ifs"
3927 fi
3928 fi
3929 AS="$ac_cv_prog_AS"
3930 if test -n "$AS"; then
3931   echo "$ac_t""$AS" 1>&6
3932 else
3933   echo "$ac_t""no" 1>&6
3934 fi
3935  
3936   fi
3937   test -n "$ac_cv_prog_AS" && break
3938 done
3939
3940 if test -z "$ac_cv_prog_AS" ; then
3941   set dummy as
3942   if test $build = $host ; then
3943     AS="$2"
3944   else
3945     AS="${ncn_tool_prefix}$2"
3946   fi
3947 fi
3948
3949  for ncn_progname in dlltool; do
3950   if test -n "$ncn_tool_prefix"; then
3951     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3952 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
3953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3954 echo "configure:3955: checking for $ac_word" >&5
3955 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   if test -n "$DLLTOOL"; then
3959   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3960 else
3961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3962   ac_dummy="$PATH"
3963   for ac_dir in $ac_dummy; do
3964     test -z "$ac_dir" && ac_dir=.
3965     if test -f $ac_dir/$ac_word; then
3966       ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
3967       break
3968     fi
3969   done
3970   IFS="$ac_save_ifs"
3971 fi
3972 fi
3973 DLLTOOL="$ac_cv_prog_DLLTOOL"
3974 if test -n "$DLLTOOL"; then
3975   echo "$ac_t""$DLLTOOL" 1>&6
3976 else
3977   echo "$ac_t""no" 1>&6
3978 fi
3979
3980   fi
3981   if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3982     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3983 set dummy ${ncn_progname}; ac_word=$2
3984 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3985 echo "configure:3986: checking for $ac_word" >&5
3986 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3987   echo $ac_n "(cached) $ac_c" 1>&6
3988 else
3989   if test -n "$DLLTOOL"; then
3990   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3991 else
3992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3993   ac_dummy="$PATH"
3994   for ac_dir in $ac_dummy; do
3995     test -z "$ac_dir" && ac_dir=.
3996     if test -f $ac_dir/$ac_word; then
3997       ac_cv_prog_DLLTOOL="${ncn_progname}"
3998       break
3999     fi
4000   done
4001   IFS="$ac_save_ifs"
4002 fi
4003 fi
4004 DLLTOOL="$ac_cv_prog_DLLTOOL"
4005 if test -n "$DLLTOOL"; then
4006   echo "$ac_t""$DLLTOOL" 1>&6
4007 else
4008   echo "$ac_t""no" 1>&6
4009 fi
4010  
4011   fi
4012   test -n "$ac_cv_prog_DLLTOOL" && break
4013 done
4014
4015 if test -z "$ac_cv_prog_DLLTOOL" ; then
4016   set dummy dlltool
4017   if test $build = $host ; then
4018     DLLTOOL="$2"
4019   else
4020     DLLTOOL="${ncn_tool_prefix}$2"
4021   fi
4022 fi
4023
4024  for ncn_progname in ld; do
4025   if test -n "$ncn_tool_prefix"; then
4026     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4027 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4029 echo "configure:4030: checking for $ac_word" >&5
4030 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   if test -n "$LD"; then
4034   ac_cv_prog_LD="$LD" # Let the user override the test.
4035 else
4036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4037   ac_dummy="$PATH"
4038   for ac_dir in $ac_dummy; do
4039     test -z "$ac_dir" && ac_dir=.
4040     if test -f $ac_dir/$ac_word; then
4041       ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
4042       break
4043     fi
4044   done
4045   IFS="$ac_save_ifs"
4046 fi
4047 fi
4048 LD="$ac_cv_prog_LD"
4049 if test -n "$LD"; then
4050   echo "$ac_t""$LD" 1>&6
4051 else
4052   echo "$ac_t""no" 1>&6
4053 fi
4054
4055   fi
4056   if test -z "$ac_cv_prog_LD" && test $build = $host ; then
4057     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4058 set dummy ${ncn_progname}; ac_word=$2
4059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4060 echo "configure:4061: checking for $ac_word" >&5
4061 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   if test -n "$LD"; then
4065   ac_cv_prog_LD="$LD" # Let the user override the test.
4066 else
4067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4068   ac_dummy="$PATH"
4069   for ac_dir in $ac_dummy; do
4070     test -z "$ac_dir" && ac_dir=.
4071     if test -f $ac_dir/$ac_word; then
4072       ac_cv_prog_LD="${ncn_progname}"
4073       break
4074     fi
4075   done
4076   IFS="$ac_save_ifs"
4077 fi
4078 fi
4079 LD="$ac_cv_prog_LD"
4080 if test -n "$LD"; then
4081   echo "$ac_t""$LD" 1>&6
4082 else
4083   echo "$ac_t""no" 1>&6
4084 fi
4085  
4086   fi
4087   test -n "$ac_cv_prog_LD" && break
4088 done
4089
4090 if test -z "$ac_cv_prog_LD" ; then
4091   set dummy ld
4092   if test $build = $host ; then
4093     LD="$2"
4094   else
4095     LD="${ncn_tool_prefix}$2"
4096   fi
4097 fi
4098
4099  for ncn_progname in lipo; do
4100   if test -n "$ncn_tool_prefix"; then
4101     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4102 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4104 echo "configure:4105: checking for $ac_word" >&5
4105 if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   if test -n "$LIPO"; then
4109   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4110 else
4111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4112   ac_dummy="$PATH"
4113   for ac_dir in $ac_dummy; do
4114     test -z "$ac_dir" && ac_dir=.
4115     if test -f $ac_dir/$ac_word; then
4116       ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
4117       break
4118     fi
4119   done
4120   IFS="$ac_save_ifs"
4121 fi
4122 fi
4123 LIPO="$ac_cv_prog_LIPO"
4124 if test -n "$LIPO"; then
4125   echo "$ac_t""$LIPO" 1>&6
4126 else
4127   echo "$ac_t""no" 1>&6
4128 fi
4129
4130   fi
4131   if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
4132     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4133 set dummy ${ncn_progname}; ac_word=$2
4134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_word" >&5
4136 if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   if test -n "$LIPO"; then
4140   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
4141 else
4142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4143   ac_dummy="$PATH"
4144   for ac_dir in $ac_dummy; do
4145     test -z "$ac_dir" && ac_dir=.
4146     if test -f $ac_dir/$ac_word; then
4147       ac_cv_prog_LIPO="${ncn_progname}"
4148       break
4149     fi
4150   done
4151   IFS="$ac_save_ifs"
4152 fi
4153 fi
4154 LIPO="$ac_cv_prog_LIPO"
4155 if test -n "$LIPO"; then
4156   echo "$ac_t""$LIPO" 1>&6
4157 else
4158   echo "$ac_t""no" 1>&6
4159 fi
4160  
4161   fi
4162   test -n "$ac_cv_prog_LIPO" && break
4163 done
4164
4165 if test -z "$ac_cv_prog_LIPO" ; then
4166   set dummy lipo
4167   if test $build = $host ; then
4168     LIPO="$2"
4169   else
4170     LIPO="${ncn_tool_prefix}$2"
4171   fi
4172 fi
4173
4174  for ncn_progname in nm; do
4175   if test -n "$ncn_tool_prefix"; then
4176     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4177 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4178 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4179 echo "configure:4180: checking for $ac_word" >&5
4180 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   if test -n "$NM"; then
4184   ac_cv_prog_NM="$NM" # Let the user override the test.
4185 else
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/$ac_word; then
4191       ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
4192       break
4193     fi
4194   done
4195   IFS="$ac_save_ifs"
4196 fi
4197 fi
4198 NM="$ac_cv_prog_NM"
4199 if test -n "$NM"; then
4200   echo "$ac_t""$NM" 1>&6
4201 else
4202   echo "$ac_t""no" 1>&6
4203 fi
4204
4205   fi
4206   if test -z "$ac_cv_prog_NM" && test $build = $host ; then
4207     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4208 set dummy ${ncn_progname}; ac_word=$2
4209 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4210 echo "configure:4211: checking for $ac_word" >&5
4211 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4212   echo $ac_n "(cached) $ac_c" 1>&6
4213 else
4214   if test -n "$NM"; then
4215   ac_cv_prog_NM="$NM" # Let the user override the test.
4216 else
4217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4218   ac_dummy="$PATH"
4219   for ac_dir in $ac_dummy; do
4220     test -z "$ac_dir" && ac_dir=.
4221     if test -f $ac_dir/$ac_word; then
4222       ac_cv_prog_NM="${ncn_progname}"
4223       break
4224     fi
4225   done
4226   IFS="$ac_save_ifs"
4227 fi
4228 fi
4229 NM="$ac_cv_prog_NM"
4230 if test -n "$NM"; then
4231   echo "$ac_t""$NM" 1>&6
4232 else
4233   echo "$ac_t""no" 1>&6
4234 fi
4235  
4236   fi
4237   test -n "$ac_cv_prog_NM" && break
4238 done
4239
4240 if test -z "$ac_cv_prog_NM" ; then
4241   set dummy nm
4242   if test $build = $host ; then
4243     NM="$2"
4244   else
4245     NM="${ncn_tool_prefix}$2"
4246   fi
4247 fi
4248
4249  for ncn_progname in ranlib; do
4250   if test -n "$ncn_tool_prefix"; then
4251     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4252 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4254 echo "configure:4255: checking for $ac_word" >&5
4255 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4256   echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258   if test -n "$RANLIB"; then
4259   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4260 else
4261   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4262   ac_dummy="$PATH"
4263   for ac_dir in $ac_dummy; do
4264     test -z "$ac_dir" && ac_dir=.
4265     if test -f $ac_dir/$ac_word; then
4266       ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
4267       break
4268     fi
4269   done
4270   IFS="$ac_save_ifs"
4271 fi
4272 fi
4273 RANLIB="$ac_cv_prog_RANLIB"
4274 if test -n "$RANLIB"; then
4275   echo "$ac_t""$RANLIB" 1>&6
4276 else
4277   echo "$ac_t""no" 1>&6
4278 fi
4279
4280   fi
4281   if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
4282     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4283 set dummy ${ncn_progname}; ac_word=$2
4284 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4285 echo "configure:4286: checking for $ac_word" >&5
4286 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4287   echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289   if test -n "$RANLIB"; then
4290   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4291 else
4292   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4293   ac_dummy="$PATH"
4294   for ac_dir in $ac_dummy; do
4295     test -z "$ac_dir" && ac_dir=.
4296     if test -f $ac_dir/$ac_word; then
4297       ac_cv_prog_RANLIB="${ncn_progname}"
4298       break
4299     fi
4300   done
4301   IFS="$ac_save_ifs"
4302 fi
4303 fi
4304 RANLIB="$ac_cv_prog_RANLIB"
4305 if test -n "$RANLIB"; then
4306   echo "$ac_t""$RANLIB" 1>&6
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310  
4311   fi
4312   test -n "$ac_cv_prog_RANLIB" && break
4313 done
4314
4315 if test -z "$ac_cv_prog_RANLIB" ; then
4316   RANLIB=":"
4317 fi
4318
4319  for ncn_progname in strip; do
4320   if test -n "$ncn_tool_prefix"; then
4321     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4322 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4324 echo "configure:4325: checking for $ac_word" >&5
4325 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4326   echo $ac_n "(cached) $ac_c" 1>&6
4327 else
4328   if test -n "$STRIP"; then
4329   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4330 else
4331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4332   ac_dummy="$PATH"
4333   for ac_dir in $ac_dummy; do
4334     test -z "$ac_dir" && ac_dir=.
4335     if test -f $ac_dir/$ac_word; then
4336       ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
4337       break
4338     fi
4339   done
4340   IFS="$ac_save_ifs"
4341 fi
4342 fi
4343 STRIP="$ac_cv_prog_STRIP"
4344 if test -n "$STRIP"; then
4345   echo "$ac_t""$STRIP" 1>&6
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349
4350   fi
4351   if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
4352     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4353 set dummy ${ncn_progname}; ac_word=$2
4354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4355 echo "configure:4356: checking for $ac_word" >&5
4356 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   if test -n "$STRIP"; then
4360   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4361 else
4362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4363   ac_dummy="$PATH"
4364   for ac_dir in $ac_dummy; do
4365     test -z "$ac_dir" && ac_dir=.
4366     if test -f $ac_dir/$ac_word; then
4367       ac_cv_prog_STRIP="${ncn_progname}"
4368       break
4369     fi
4370   done
4371   IFS="$ac_save_ifs"
4372 fi
4373 fi
4374 STRIP="$ac_cv_prog_STRIP"
4375 if test -n "$STRIP"; then
4376   echo "$ac_t""$STRIP" 1>&6
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380  
4381   fi
4382   test -n "$ac_cv_prog_STRIP" && break
4383 done
4384
4385 if test -z "$ac_cv_prog_STRIP" ; then
4386   STRIP=":"
4387 fi
4388
4389  for ncn_progname in windres; do
4390   if test -n "$ncn_tool_prefix"; then
4391     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4392 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4394 echo "configure:4395: checking for $ac_word" >&5
4395 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   if test -n "$WINDRES"; then
4399   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4400 else
4401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4402   ac_dummy="$PATH"
4403   for ac_dir in $ac_dummy; do
4404     test -z "$ac_dir" && ac_dir=.
4405     if test -f $ac_dir/$ac_word; then
4406       ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
4407       break
4408     fi
4409   done
4410   IFS="$ac_save_ifs"
4411 fi
4412 fi
4413 WINDRES="$ac_cv_prog_WINDRES"
4414 if test -n "$WINDRES"; then
4415   echo "$ac_t""$WINDRES" 1>&6
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419
4420   fi
4421   if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
4422     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4423 set dummy ${ncn_progname}; ac_word=$2
4424 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4425 echo "configure:4426: checking for $ac_word" >&5
4426 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4427   echo $ac_n "(cached) $ac_c" 1>&6
4428 else
4429   if test -n "$WINDRES"; then
4430   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4431 else
4432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4433   ac_dummy="$PATH"
4434   for ac_dir in $ac_dummy; do
4435     test -z "$ac_dir" && ac_dir=.
4436     if test -f $ac_dir/$ac_word; then
4437       ac_cv_prog_WINDRES="${ncn_progname}"
4438       break
4439     fi
4440   done
4441   IFS="$ac_save_ifs"
4442 fi
4443 fi
4444 WINDRES="$ac_cv_prog_WINDRES"
4445 if test -n "$WINDRES"; then
4446   echo "$ac_t""$WINDRES" 1>&6
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450  
4451   fi
4452   test -n "$ac_cv_prog_WINDRES" && break
4453 done
4454
4455 if test -z "$ac_cv_prog_WINDRES" ; then
4456   set dummy windres
4457   if test $build = $host ; then
4458     WINDRES="$2"
4459   else
4460     WINDRES="${ncn_tool_prefix}$2"
4461   fi
4462 fi
4463
4464  for ncn_progname in objcopy; do
4465   if test -n "$ncn_tool_prefix"; then
4466     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4467 set dummy ${ncn_tool_prefix}${ncn_progname}; 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_OBJCOPY'+set}'`\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   if test -n "$OBJCOPY"; then
4474   ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
4482       break
4483     fi
4484   done
4485   IFS="$ac_save_ifs"
4486 fi
4487 fi
4488 OBJCOPY="$ac_cv_prog_OBJCOPY"
4489 if test -n "$OBJCOPY"; then
4490   echo "$ac_t""$OBJCOPY" 1>&6
4491 else
4492   echo "$ac_t""no" 1>&6
4493 fi
4494
4495   fi
4496   if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4497     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4498 set dummy ${ncn_progname}; ac_word=$2
4499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4500 echo "configure:4501: checking for $ac_word" >&5
4501 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4502   echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504   if test -n "$OBJCOPY"; then
4505   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4506 else
4507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4508   ac_dummy="$PATH"
4509   for ac_dir in $ac_dummy; do
4510     test -z "$ac_dir" && ac_dir=.
4511     if test -f $ac_dir/$ac_word; then
4512       ac_cv_prog_OBJCOPY="${ncn_progname}"
4513       break
4514     fi
4515   done
4516   IFS="$ac_save_ifs"
4517 fi
4518 fi
4519 OBJCOPY="$ac_cv_prog_OBJCOPY"
4520 if test -n "$OBJCOPY"; then
4521   echo "$ac_t""$OBJCOPY" 1>&6
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525  
4526   fi
4527   test -n "$ac_cv_prog_OBJCOPY" && break
4528 done
4529
4530 if test -z "$ac_cv_prog_OBJCOPY" ; then
4531   set dummy objcopy
4532   if test $build = $host ; then
4533     OBJCOPY="$2"
4534   else
4535     OBJCOPY="${ncn_tool_prefix}$2"
4536   fi
4537 fi
4538
4539  for ncn_progname in objdump; do
4540   if test -n "$ncn_tool_prefix"; then
4541     # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4542 set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4544 echo "configure:4545: checking for $ac_word" >&5
4545 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4546   echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548   if test -n "$OBJDUMP"; then
4549   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4550 else
4551   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4552   ac_dummy="$PATH"
4553   for ac_dir in $ac_dummy; do
4554     test -z "$ac_dir" && ac_dir=.
4555     if test -f $ac_dir/$ac_word; then
4556       ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
4557       break
4558     fi
4559   done
4560   IFS="$ac_save_ifs"
4561 fi
4562 fi
4563 OBJDUMP="$ac_cv_prog_OBJDUMP"
4564 if test -n "$OBJDUMP"; then
4565   echo "$ac_t""$OBJDUMP" 1>&6
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570   fi
4571   if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4572     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4573 set dummy ${ncn_progname}; ac_word=$2
4574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4575 echo "configure:4576: checking for $ac_word" >&5
4576 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4577   echo $ac_n "(cached) $ac_c" 1>&6
4578 else
4579   if test -n "$OBJDUMP"; then
4580   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4581 else
4582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4583   ac_dummy="$PATH"
4584   for ac_dir in $ac_dummy; do
4585     test -z "$ac_dir" && ac_dir=.
4586     if test -f $ac_dir/$ac_word; then
4587       ac_cv_prog_OBJDUMP="${ncn_progname}"
4588       break
4589     fi
4590   done
4591   IFS="$ac_save_ifs"
4592 fi
4593 fi
4594 OBJDUMP="$ac_cv_prog_OBJDUMP"
4595 if test -n "$OBJDUMP"; then
4596   echo "$ac_t""$OBJDUMP" 1>&6
4597 else
4598   echo "$ac_t""no" 1>&6
4599 fi
4600  
4601   fi
4602   test -n "$ac_cv_prog_OBJDUMP" && break
4603 done
4604
4605 if test -z "$ac_cv_prog_OBJDUMP" ; then
4606   set dummy objdump
4607   if test $build = $host ; then
4608     OBJDUMP="$2"
4609   else
4610     OBJDUMP="${ncn_tool_prefix}$2"
4611   fi
4612 fi
4613
4614
4615
4616
4617
4618
4619
4620 # Target tools.
4621 # Check whether --with-build-time-tools or --without-build-time-tools was given.
4622 if test "${with_build_time_tools+set}" = set; then
4623   withval="$with_build_time_tools"
4624   case x"$withval" in
4625      x/*) ;;
4626      *)
4627        with_build_time_tools=
4628        echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
4629        ;;
4630    esac
4631 else
4632   with_build_time_tools=
4633 fi
4634
4635
4636  if test -n "$with_build_time_tools"; then
4637   for ncn_progname in cc gcc; do
4638     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4639 echo "configure:4640: checking for ${ncn_progname} in $with_build_time_tools" >&5
4640     if test -x $with_build_time_tools/${ncn_progname}; then
4641       ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
4642       echo "$ac_t""yes" 1>&6
4643       break
4644     else
4645       echo "$ac_t""no" 1>&6
4646     fi
4647   done
4648 fi
4649
4650 if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
4651   for ncn_progname in cc gcc; do
4652     if test -n "$ncn_target_tool_prefix"; then
4653       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4654 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4656 echo "configure:4657: checking for $ac_word" >&5
4657 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   if test -n "$CC_FOR_TARGET"; then
4661   ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4662 else
4663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4664   ac_dummy="$PATH"
4665   for ac_dir in $ac_dummy; do
4666     test -z "$ac_dir" && ac_dir=.
4667     if test -f $ac_dir/$ac_word; then
4668       ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4669       break
4670     fi
4671   done
4672   IFS="$ac_save_ifs"
4673 fi
4674 fi
4675 CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4676 if test -n "$CC_FOR_TARGET"; then
4677   echo "$ac_t""$CC_FOR_TARGET" 1>&6
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681
4682     fi
4683     if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4684       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4685 set dummy ${ncn_progname}; ac_word=$2
4686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_word" >&5
4688 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   if test -n "$CC_FOR_TARGET"; then
4692   ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4693 else
4694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4695   ac_dummy="$PATH"
4696   for ac_dir in $ac_dummy; do
4697     test -z "$ac_dir" && ac_dir=.
4698     if test -f $ac_dir/$ac_word; then
4699       ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
4700       break
4701     fi
4702   done
4703   IFS="$ac_save_ifs"
4704 fi
4705 fi
4706 CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4707 if test -n "$CC_FOR_TARGET"; then
4708   echo "$ac_t""$CC_FOR_TARGET" 1>&6
4709 else
4710   echo "$ac_t""no" 1>&6
4711 fi
4712  
4713     fi
4714     test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4715   done
4716 fi
4717   
4718 if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4719   set dummy cc gcc
4720   if test $build = $target ; then
4721     CC_FOR_TARGET="$2"
4722   else
4723     CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
4724   fi
4725 fi
4726
4727  if test -n "$with_build_time_tools"; then
4728   for ncn_progname in c++ g++ cxx gxx; do
4729     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4730 echo "configure:4731: checking for ${ncn_progname} in $with_build_time_tools" >&5
4731     if test -x $with_build_time_tools/${ncn_progname}; then
4732       ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
4733       echo "$ac_t""yes" 1>&6
4734       break
4735     else
4736       echo "$ac_t""no" 1>&6
4737     fi
4738   done
4739 fi
4740
4741 if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
4742   for ncn_progname in c++ g++ cxx gxx; do
4743     if test -n "$ncn_target_tool_prefix"; then
4744       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4745 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4747 echo "configure:4748: checking for $ac_word" >&5
4748 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4749   echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751   if test -n "$CXX_FOR_TARGET"; then
4752   ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4753 else
4754   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4755   ac_dummy="$PATH"
4756   for ac_dir in $ac_dummy; do
4757     test -z "$ac_dir" && ac_dir=.
4758     if test -f $ac_dir/$ac_word; then
4759       ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4760       break
4761     fi
4762   done
4763   IFS="$ac_save_ifs"
4764 fi
4765 fi
4766 CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4767 if test -n "$CXX_FOR_TARGET"; then
4768   echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772
4773     fi
4774     if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4775       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4776 set dummy ${ncn_progname}; ac_word=$2
4777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4778 echo "configure:4779: checking for $ac_word" >&5
4779 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   if test -n "$CXX_FOR_TARGET"; then
4783   ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4784 else
4785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4786   ac_dummy="$PATH"
4787   for ac_dir in $ac_dummy; do
4788     test -z "$ac_dir" && ac_dir=.
4789     if test -f $ac_dir/$ac_word; then
4790       ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
4791       break
4792     fi
4793   done
4794   IFS="$ac_save_ifs"
4795 fi
4796 fi
4797 CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4798 if test -n "$CXX_FOR_TARGET"; then
4799   echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4800 else
4801   echo "$ac_t""no" 1>&6
4802 fi
4803  
4804     fi
4805     test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4806   done
4807 fi
4808   
4809 if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4810   set dummy c++ g++ cxx gxx
4811   if test $build = $target ; then
4812     CXX_FOR_TARGET="$2"
4813   else
4814     CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
4815   fi
4816 fi
4817
4818  if test -n "$with_build_time_tools"; then
4819   for ncn_progname in gcc; do
4820     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4821 echo "configure:4822: checking for ${ncn_progname} in $with_build_time_tools" >&5
4822     if test -x $with_build_time_tools/${ncn_progname}; then
4823       ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
4824       echo "$ac_t""yes" 1>&6
4825       break
4826     else
4827       echo "$ac_t""no" 1>&6
4828     fi
4829   done
4830 fi
4831
4832 if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
4833   for ncn_progname in gcc; do
4834     if test -n "$ncn_target_tool_prefix"; then
4835       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4836 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4838 echo "configure:4839: checking for $ac_word" >&5
4839 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4840   echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842   if test -n "$GCC_FOR_TARGET"; then
4843   ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
4844 else
4845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4846   ac_dummy="$PATH"
4847   for ac_dir in $ac_dummy; do
4848     test -z "$ac_dir" && ac_dir=.
4849     if test -f $ac_dir/$ac_word; then
4850       ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4851       break
4852     fi
4853   done
4854   IFS="$ac_save_ifs"
4855 fi
4856 fi
4857 GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4858 if test -n "$GCC_FOR_TARGET"; then
4859   echo "$ac_t""$GCC_FOR_TARGET" 1>&6
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863
4864     fi
4865     if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4866       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4867 set dummy ${ncn_progname}; ac_word=$2
4868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_word" >&5
4870 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   if test -n "$GCC_FOR_TARGET"; then
4874   ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
4875 else
4876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4877   ac_dummy="$PATH"
4878   for ac_dir in $ac_dummy; do
4879     test -z "$ac_dir" && ac_dir=.
4880     if test -f $ac_dir/$ac_word; then
4881       ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
4882       break
4883     fi
4884   done
4885   IFS="$ac_save_ifs"
4886 fi
4887 fi
4888 GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4889 if test -n "$GCC_FOR_TARGET"; then
4890   echo "$ac_t""$GCC_FOR_TARGET" 1>&6
4891 else
4892   echo "$ac_t""no" 1>&6
4893 fi
4894  
4895     fi
4896     test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4897   done
4898 fi
4899   
4900 if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4901   GCC_FOR_TARGET="${CC_FOR_TARGET}"
4902 fi
4903
4904  if test -n "$with_build_time_tools"; then
4905   for ncn_progname in gcj; do
4906     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4907 echo "configure:4908: checking for ${ncn_progname} in $with_build_time_tools" >&5
4908     if test -x $with_build_time_tools/${ncn_progname}; then
4909       ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
4910       echo "$ac_t""yes" 1>&6
4911       break
4912     else
4913       echo "$ac_t""no" 1>&6
4914     fi
4915   done
4916 fi
4917
4918 if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
4919   for ncn_progname in gcj; do
4920     if test -n "$ncn_target_tool_prefix"; then
4921       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4922 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
4923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4924 echo "configure:4925: checking for $ac_word" >&5
4925 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   if test -n "$GCJ_FOR_TARGET"; then
4929   ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4930 else
4931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4932   ac_dummy="$PATH"
4933   for ac_dir in $ac_dummy; do
4934     test -z "$ac_dir" && ac_dir=.
4935     if test -f $ac_dir/$ac_word; then
4936       ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4937       break
4938     fi
4939   done
4940   IFS="$ac_save_ifs"
4941 fi
4942 fi
4943 GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4944 if test -n "$GCJ_FOR_TARGET"; then
4945   echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4946 else
4947   echo "$ac_t""no" 1>&6
4948 fi
4949
4950     fi
4951     if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4952       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4953 set dummy ${ncn_progname}; ac_word=$2
4954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4955 echo "configure:4956: checking for $ac_word" >&5
4956 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   if test -n "$GCJ_FOR_TARGET"; then
4960   ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4961 else
4962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4963   ac_dummy="$PATH"
4964   for ac_dir in $ac_dummy; do
4965     test -z "$ac_dir" && ac_dir=.
4966     if test -f $ac_dir/$ac_word; then
4967       ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
4968       break
4969     fi
4970   done
4971   IFS="$ac_save_ifs"
4972 fi
4973 fi
4974 GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4975 if test -n "$GCJ_FOR_TARGET"; then
4976   echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4977 else
4978   echo "$ac_t""no" 1>&6
4979 fi
4980  
4981     fi
4982     test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4983   done
4984 fi
4985   
4986 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4987   set dummy gcj
4988   if test $build = $target ; then
4989     GCJ_FOR_TARGET="$2"
4990   else
4991     GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
4992   fi
4993 fi
4994
4995  if test -n "$with_build_time_tools"; then
4996   for ncn_progname in gfortran; do
4997     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
4998 echo "configure:4999: checking for ${ncn_progname} in $with_build_time_tools" >&5
4999     if test -x $with_build_time_tools/${ncn_progname}; then
5000       ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5001       echo "$ac_t""yes" 1>&6
5002       break
5003     else
5004       echo "$ac_t""no" 1>&6
5005     fi
5006   done
5007 fi
5008
5009 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
5010   for ncn_progname in gfortran; do
5011     if test -n "$ncn_target_tool_prefix"; then
5012       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5013 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5014 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5015 echo "configure:5016: checking for $ac_word" >&5
5016 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019   if test -n "$GFORTRAN_FOR_TARGET"; then
5020   ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5021 else
5022   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5023   ac_dummy="$PATH"
5024   for ac_dir in $ac_dummy; do
5025     test -z "$ac_dir" && ac_dir=.
5026     if test -f $ac_dir/$ac_word; then
5027       ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5028       break
5029     fi
5030   done
5031   IFS="$ac_save_ifs"
5032 fi
5033 fi
5034 GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
5035 if test -n "$GFORTRAN_FOR_TARGET"; then
5036   echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
5037 else
5038   echo "$ac_t""no" 1>&6
5039 fi
5040
5041     fi
5042     if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
5043       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5044 set dummy ${ncn_progname}; ac_word=$2
5045 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5046 echo "configure:5047: checking for $ac_word" >&5
5047 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   if test -n "$GFORTRAN_FOR_TARGET"; then
5051   ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5052 else
5053   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5054   ac_dummy="$PATH"
5055   for ac_dir in $ac_dummy; do
5056     test -z "$ac_dir" && ac_dir=.
5057     if test -f $ac_dir/$ac_word; then
5058       ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5059       break
5060     fi
5061   done
5062   IFS="$ac_save_ifs"
5063 fi
5064 fi
5065 GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
5066 if test -n "$GFORTRAN_FOR_TARGET"; then
5067   echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
5068 else
5069   echo "$ac_t""no" 1>&6
5070 fi
5071  
5072     fi
5073     test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5074   done
5075 fi
5076   
5077 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5078   set dummy gfortran
5079   if test $build = $target ; then
5080     GFORTRAN_FOR_TARGET="$2"
5081   else
5082     GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
5083   fi
5084 fi
5085
5086
5087
5088 # The user is always right.
5089 if test "${PATH_SEPARATOR+set}" != set; then
5090   echo "#! /bin/sh" >conf$$.sh
5091   echo  "exit 0"   >>conf$$.sh
5092   chmod +x conf$$.sh
5093   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5094     PATH_SEPARATOR=';'
5095   else
5096     PATH_SEPARATOR=: 
5097   fi
5098   rm -f conf$$.sh
5099 fi
5100
5101
5102
5103 if test "x$exec_prefix" = xNONE; then
5104         if test "x$prefix" = xNONE; then
5105                 gcc_cv_tool_prefix=$ac_default_prefix
5106         else
5107                 gcc_cv_tool_prefix=$prefix
5108         fi
5109 else
5110         gcc_cv_tool_prefix=$exec_prefix
5111 fi
5112
5113 # If there is no compiler in the tree, use the PATH only.  In any
5114 # case, if there is no compiler in the tree nobody should use
5115 # AS_FOR_TARGET and LD_FOR_TARGET.
5116 if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
5117     gcc_version=`cat $srcdir/gcc/BASE-VER`
5118     gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5119     gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
5120     gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5121     gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
5122     gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
5123     gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
5124 else
5125     gcc_cv_tool_dirs=
5126 fi
5127
5128 if test x$build = x$target && test -n "$md_exec_prefix"; then
5129         gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
5130 fi
5131
5132
5133
5134 cat > conftest.c << \EOF
5135 #ifdef __GNUC__
5136   gcc_yay;
5137 #endif
5138 EOF
5139 if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
5140   have_gcc_for_target=yes
5141 else
5142   GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
5143   have_gcc_for_target=no
5144 fi
5145 rm conftest.c
5146
5147
5148
5149
5150 if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5151   if test -n "$with_build_time_tools"; then
5152     echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
5153 echo "configure:5154: checking for ar in $with_build_time_tools" >&5
5154     if test -x $with_build_time_tools/ar; then
5155       AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
5156       ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5157       echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
5158     else
5159       echo "$ac_t""no" 1>&6
5160     fi
5161   elif test $build != $host && test $have_gcc_for_target = yes; then
5162     AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
5163     test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
5164     ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
5165   fi
5166 fi
5167 if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5168   # Extract the first word of "ar", so it can be a program name with args.
5169 set dummy ar; ac_word=$2
5170 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5171 echo "configure:5172: checking for $ac_word" >&5
5172 if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175   case "$AR_FOR_TARGET" in
5176   /*)
5177   ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
5178   ;;
5179   ?:/*)                  
5180   ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
5181   ;;
5182   *)
5183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5184   ac_dummy="$gcc_cv_tool_dirs"
5185   for ac_dir in $ac_dummy; do 
5186     test -z "$ac_dir" && ac_dir=.
5187     if test -f $ac_dir/$ac_word; then
5188       ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
5189       break
5190     fi
5191   done
5192   IFS="$ac_save_ifs"
5193   ;;
5194 esac
5195 fi
5196 AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
5197 if test -n "$AR_FOR_TARGET"; then
5198   echo "$ac_t""$AR_FOR_TARGET" 1>&6
5199 else
5200   echo "$ac_t""no" 1>&6
5201 fi
5202
5203 fi
5204 if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
5205    if test -n "$with_build_time_tools"; then
5206   for ncn_progname in ar; do
5207     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5208 echo "configure:5209: checking for ${ncn_progname} in $with_build_time_tools" >&5
5209     if test -x $with_build_time_tools/${ncn_progname}; then
5210       ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5211       echo "$ac_t""yes" 1>&6
5212       break
5213     else
5214       echo "$ac_t""no" 1>&6
5215     fi
5216   done
5217 fi
5218
5219 if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
5220   for ncn_progname in ar; do
5221     if test -n "$ncn_target_tool_prefix"; then
5222       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5223 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_word" >&5
5226 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   if test -n "$AR_FOR_TARGET"; then
5230   ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
5231 else
5232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5233   ac_dummy="$PATH"
5234   for ac_dir in $ac_dummy; do
5235     test -z "$ac_dir" && ac_dir=.
5236     if test -f $ac_dir/$ac_word; then
5237       ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5238       break
5239     fi
5240   done
5241   IFS="$ac_save_ifs"
5242 fi
5243 fi
5244 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5245 if test -n "$AR_FOR_TARGET"; then
5246   echo "$ac_t""$AR_FOR_TARGET" 1>&6
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250
5251     fi
5252     if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
5253       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5254 set dummy ${ncn_progname}; ac_word=$2
5255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5256 echo "configure:5257: checking for $ac_word" >&5
5257 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
5258   echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260   if test -n "$AR_FOR_TARGET"; then
5261   ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
5262 else
5263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5264   ac_dummy="$PATH"
5265   for ac_dir in $ac_dummy; do
5266     test -z "$ac_dir" && ac_dir=.
5267     if test -f $ac_dir/$ac_word; then
5268       ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
5269       break
5270     fi
5271   done
5272   IFS="$ac_save_ifs"
5273 fi
5274 fi
5275 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
5276 if test -n "$AR_FOR_TARGET"; then
5277   echo "$ac_t""$AR_FOR_TARGET" 1>&6
5278 else
5279   echo "$ac_t""no" 1>&6
5280 fi
5281  
5282     fi
5283     test -n "$ac_cv_prog_AR_FOR_TARGET" && break
5284   done
5285 fi
5286   
5287 if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
5288   set dummy ar
5289   if test $build = $target ; then
5290     AR_FOR_TARGET="$2"
5291   else
5292     AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
5293   fi
5294 fi
5295
5296 else
5297   AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
5298 fi
5299
5300
5301
5302
5303 if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5304   if test -n "$with_build_time_tools"; then
5305     echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
5306 echo "configure:5307: checking for as in $with_build_time_tools" >&5
5307     if test -x $with_build_time_tools/as; then
5308       AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
5309       ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5310       echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
5311     else
5312       echo "$ac_t""no" 1>&6
5313     fi
5314   elif test $build != $host && test $have_gcc_for_target = yes; then
5315     AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
5316     test $AS_FOR_TARGET=as && AS_FOR_TARGET=
5317     ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
5318   fi
5319 fi
5320 if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5321   # Extract the first word of "as", so it can be a program name with args.
5322 set dummy as; ac_word=$2
5323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5324 echo "configure:5325: checking for $ac_word" >&5
5325 if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   case "$AS_FOR_TARGET" in
5329   /*)
5330   ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
5331   ;;
5332   ?:/*)                  
5333   ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
5334   ;;
5335   *)
5336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5337   ac_dummy="$gcc_cv_tool_dirs"
5338   for ac_dir in $ac_dummy; do 
5339     test -z "$ac_dir" && ac_dir=.
5340     if test -f $ac_dir/$ac_word; then
5341       ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
5342       break
5343     fi
5344   done
5345   IFS="$ac_save_ifs"
5346   ;;
5347 esac
5348 fi
5349 AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
5350 if test -n "$AS_FOR_TARGET"; then
5351   echo "$ac_t""$AS_FOR_TARGET" 1>&6
5352 else
5353   echo "$ac_t""no" 1>&6
5354 fi
5355
5356 fi
5357 if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
5358    if test -n "$with_build_time_tools"; then
5359   for ncn_progname in as; do
5360     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5361 echo "configure:5362: checking for ${ncn_progname} in $with_build_time_tools" >&5
5362     if test -x $with_build_time_tools/${ncn_progname}; then
5363       ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5364       echo "$ac_t""yes" 1>&6
5365       break
5366     else
5367       echo "$ac_t""no" 1>&6
5368     fi
5369   done
5370 fi
5371
5372 if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
5373   for ncn_progname in as; do
5374     if test -n "$ncn_target_tool_prefix"; then
5375       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5376 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5378 echo "configure:5379: checking for $ac_word" >&5
5379 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5380   echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382   if test -n "$AS_FOR_TARGET"; then
5383   ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5384 else
5385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5386   ac_dummy="$PATH"
5387   for ac_dir in $ac_dummy; do
5388     test -z "$ac_dir" && ac_dir=.
5389     if test -f $ac_dir/$ac_word; then
5390       ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5391       break
5392     fi
5393   done
5394   IFS="$ac_save_ifs"
5395 fi
5396 fi
5397 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5398 if test -n "$AS_FOR_TARGET"; then
5399   echo "$ac_t""$AS_FOR_TARGET" 1>&6
5400 else
5401   echo "$ac_t""no" 1>&6
5402 fi
5403
5404     fi
5405     if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
5406       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5407 set dummy ${ncn_progname}; ac_word=$2
5408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5409 echo "configure:5410: checking for $ac_word" >&5
5410 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
5411   echo $ac_n "(cached) $ac_c" 1>&6
5412 else
5413   if test -n "$AS_FOR_TARGET"; then
5414   ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
5415 else
5416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5417   ac_dummy="$PATH"
5418   for ac_dir in $ac_dummy; do
5419     test -z "$ac_dir" && ac_dir=.
5420     if test -f $ac_dir/$ac_word; then
5421       ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
5422       break
5423     fi
5424   done
5425   IFS="$ac_save_ifs"
5426 fi
5427 fi
5428 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
5429 if test -n "$AS_FOR_TARGET"; then
5430   echo "$ac_t""$AS_FOR_TARGET" 1>&6
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434  
5435     fi
5436     test -n "$ac_cv_prog_AS_FOR_TARGET" && break
5437   done
5438 fi
5439   
5440 if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
5441   set dummy as
5442   if test $build = $target ; then
5443     AS_FOR_TARGET="$2"
5444   else
5445     AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
5446   fi
5447 fi
5448
5449 else
5450   AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
5451 fi
5452
5453
5454
5455
5456 if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5457   if test -n "$with_build_time_tools"; then
5458     echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
5459 echo "configure:5460: checking for dlltool in $with_build_time_tools" >&5
5460     if test -x $with_build_time_tools/dlltool; then
5461       DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
5462       ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5463       echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
5464     else
5465       echo "$ac_t""no" 1>&6
5466     fi
5467   elif test $build != $host && test $have_gcc_for_target = yes; then
5468     DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
5469     test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
5470     ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
5471   fi
5472 fi
5473 if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5474   # Extract the first word of "dlltool", so it can be a program name with args.
5475 set dummy dlltool; ac_word=$2
5476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5477 echo "configure:5478: checking for $ac_word" >&5
5478 if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5479   echo $ac_n "(cached) $ac_c" 1>&6
5480 else
5481   case "$DLLTOOL_FOR_TARGET" in
5482   /*)
5483   ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
5484   ;;
5485   ?:/*)                  
5486   ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
5487   ;;
5488   *)
5489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5490   ac_dummy="$gcc_cv_tool_dirs"
5491   for ac_dir in $ac_dummy; do 
5492     test -z "$ac_dir" && ac_dir=.
5493     if test -f $ac_dir/$ac_word; then
5494       ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word"
5495       break
5496     fi
5497   done
5498   IFS="$ac_save_ifs"
5499   ;;
5500 esac
5501 fi
5502 DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
5503 if test -n "$DLLTOOL_FOR_TARGET"; then
5504   echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5505 else
5506   echo "$ac_t""no" 1>&6
5507 fi
5508
5509 fi
5510 if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
5511    if test -n "$with_build_time_tools"; then
5512   for ncn_progname in dlltool; do
5513     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5514 echo "configure:5515: checking for ${ncn_progname} in $with_build_time_tools" >&5
5515     if test -x $with_build_time_tools/${ncn_progname}; then
5516       ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5517       echo "$ac_t""yes" 1>&6
5518       break
5519     else
5520       echo "$ac_t""no" 1>&6
5521     fi
5522   done
5523 fi
5524
5525 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
5526   for ncn_progname in dlltool; do
5527     if test -n "$ncn_target_tool_prefix"; then
5528       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5529 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5531 echo "configure:5532: checking for $ac_word" >&5
5532 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5533   echo $ac_n "(cached) $ac_c" 1>&6
5534 else
5535   if test -n "$DLLTOOL_FOR_TARGET"; then
5536   ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5537 else
5538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5539   ac_dummy="$PATH"
5540   for ac_dir in $ac_dummy; do
5541     test -z "$ac_dir" && ac_dir=.
5542     if test -f $ac_dir/$ac_word; then
5543       ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5544       break
5545     fi
5546   done
5547   IFS="$ac_save_ifs"
5548 fi
5549 fi
5550 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5551 if test -n "$DLLTOOL_FOR_TARGET"; then
5552   echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556
5557     fi
5558     if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
5559       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5560 set dummy ${ncn_progname}; ac_word=$2
5561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5562 echo "configure:5563: checking for $ac_word" >&5
5563 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
5564   echo $ac_n "(cached) $ac_c" 1>&6
5565 else
5566   if test -n "$DLLTOOL_FOR_TARGET"; then
5567   ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
5568 else
5569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5570   ac_dummy="$PATH"
5571   for ac_dir in $ac_dummy; do
5572     test -z "$ac_dir" && ac_dir=.
5573     if test -f $ac_dir/$ac_word; then
5574       ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
5575       break
5576     fi
5577   done
5578   IFS="$ac_save_ifs"
5579 fi
5580 fi
5581 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
5582 if test -n "$DLLTOOL_FOR_TARGET"; then
5583   echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
5584 else
5585   echo "$ac_t""no" 1>&6
5586 fi
5587  
5588     fi
5589     test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
5590   done
5591 fi
5592   
5593 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
5594   set dummy dlltool
5595   if test $build = $target ; then
5596     DLLTOOL_FOR_TARGET="$2"
5597   else
5598     DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
5599   fi
5600 fi
5601
5602 else
5603   DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
5604 fi
5605
5606
5607
5608
5609 if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5610   if test -n "$with_build_time_tools"; then
5611     echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
5612 echo "configure:5613: checking for ld in $with_build_time_tools" >&5
5613     if test -x $with_build_time_tools/ld; then
5614       LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
5615       ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5616       echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
5617     else
5618       echo "$ac_t""no" 1>&6
5619     fi
5620   elif test $build != $host && test $have_gcc_for_target = yes; then
5621     LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
5622     test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
5623     ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
5624   fi
5625 fi
5626 if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5627   # Extract the first word of "ld", so it can be a program name with args.
5628 set dummy ld; ac_word=$2
5629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5630 echo "configure:5631: checking for $ac_word" >&5
5631 if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
5632   echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634   case "$LD_FOR_TARGET" in
5635   /*)
5636   ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
5637   ;;
5638   ?:/*)                  
5639   ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
5640   ;;
5641   *)
5642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5643   ac_dummy="$gcc_cv_tool_dirs"
5644   for ac_dir in $ac_dummy; do 
5645     test -z "$ac_dir" && ac_dir=.
5646     if test -f $ac_dir/$ac_word; then
5647       ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
5648       break
5649     fi
5650   done
5651   IFS="$ac_save_ifs"
5652   ;;
5653 esac
5654 fi
5655 LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
5656 if test -n "$LD_FOR_TARGET"; then
5657   echo "$ac_t""$LD_FOR_TARGET" 1>&6
5658 else
5659   echo "$ac_t""no" 1>&6
5660 fi
5661
5662 fi
5663 if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
5664    if test -n "$with_build_time_tools"; then
5665   for ncn_progname in ld; do
5666     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5667 echo "configure:5668: checking for ${ncn_progname} in $with_build_time_tools" >&5
5668     if test -x $with_build_time_tools/${ncn_progname}; then
5669       ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5670       echo "$ac_t""yes" 1>&6
5671       break
5672     else
5673       echo "$ac_t""no" 1>&6
5674     fi
5675   done
5676 fi
5677
5678 if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
5679   for ncn_progname in ld; do
5680     if test -n "$ncn_target_tool_prefix"; then
5681       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5682 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5684 echo "configure:5685: checking for $ac_word" >&5
5685 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5686   echo $ac_n "(cached) $ac_c" 1>&6
5687 else
5688   if test -n "$LD_FOR_TARGET"; then
5689   ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5690 else
5691   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5692   ac_dummy="$PATH"
5693   for ac_dir in $ac_dummy; do
5694     test -z "$ac_dir" && ac_dir=.
5695     if test -f $ac_dir/$ac_word; then
5696       ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5697       break
5698     fi
5699   done
5700   IFS="$ac_save_ifs"
5701 fi
5702 fi
5703 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5704 if test -n "$LD_FOR_TARGET"; then
5705   echo "$ac_t""$LD_FOR_TARGET" 1>&6
5706 else
5707   echo "$ac_t""no" 1>&6
5708 fi
5709
5710     fi
5711     if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
5712       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5713 set dummy ${ncn_progname}; ac_word=$2
5714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_word" >&5
5716 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   if test -n "$LD_FOR_TARGET"; then
5720   ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
5721 else
5722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5723   ac_dummy="$PATH"
5724   for ac_dir in $ac_dummy; do
5725     test -z "$ac_dir" && ac_dir=.
5726     if test -f $ac_dir/$ac_word; then
5727       ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5728       break
5729     fi
5730   done
5731   IFS="$ac_save_ifs"
5732 fi
5733 fi
5734 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
5735 if test -n "$LD_FOR_TARGET"; then
5736   echo "$ac_t""$LD_FOR_TARGET" 1>&6
5737 else
5738   echo "$ac_t""no" 1>&6
5739 fi
5740  
5741     fi
5742     test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5743   done
5744 fi
5745   
5746 if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
5747   set dummy ld
5748   if test $build = $target ; then
5749     LD_FOR_TARGET="$2"
5750   else
5751     LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
5752   fi
5753 fi
5754
5755 else
5756   LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
5757 fi
5758
5759
5760
5761
5762 if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5763   if test -n "$with_build_time_tools"; then
5764     echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
5765 echo "configure:5766: checking for lipo in $with_build_time_tools" >&5
5766     if test -x $with_build_time_tools/lipo; then
5767       LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
5768       ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5769       echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
5770     else
5771       echo "$ac_t""no" 1>&6
5772     fi
5773   elif test $build != $host && test $have_gcc_for_target = yes; then
5774     LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
5775     test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
5776     ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
5777   fi
5778 fi
5779 if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5780   # Extract the first word of "lipo", so it can be a program name with args.
5781 set dummy lipo; ac_word=$2
5782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5783 echo "configure:5784: checking for $ac_word" >&5
5784 if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
5785   echo $ac_n "(cached) $ac_c" 1>&6
5786 else
5787   case "$LIPO_FOR_TARGET" in
5788   /*)
5789   ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
5790   ;;
5791   ?:/*)                  
5792   ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
5793   ;;
5794   *)
5795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5796   ac_dummy="$gcc_cv_tool_dirs"
5797   for ac_dir in $ac_dummy; do 
5798     test -z "$ac_dir" && ac_dir=.
5799     if test -f $ac_dir/$ac_word; then
5800       ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word"
5801       break
5802     fi
5803   done
5804   IFS="$ac_save_ifs"
5805   ;;
5806 esac
5807 fi
5808 LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
5809 if test -n "$LIPO_FOR_TARGET"; then
5810   echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5811 else
5812   echo "$ac_t""no" 1>&6
5813 fi
5814
5815 fi
5816 if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
5817    if test -n "$with_build_time_tools"; then
5818   for ncn_progname in lipo; do
5819     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5820 echo "configure:5821: checking for ${ncn_progname} in $with_build_time_tools" >&5
5821     if test -x $with_build_time_tools/${ncn_progname}; then
5822       ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5823       echo "$ac_t""yes" 1>&6
5824       break
5825     else
5826       echo "$ac_t""no" 1>&6
5827     fi
5828   done
5829 fi
5830
5831 if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
5832   for ncn_progname in lipo; do
5833     if test -n "$ncn_target_tool_prefix"; then
5834       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5835 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5837 echo "configure:5838: checking for $ac_word" >&5
5838 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5839   echo $ac_n "(cached) $ac_c" 1>&6
5840 else
5841   if test -n "$LIPO_FOR_TARGET"; then
5842   ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5843 else
5844   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5845   ac_dummy="$PATH"
5846   for ac_dir in $ac_dummy; do
5847     test -z "$ac_dir" && ac_dir=.
5848     if test -f $ac_dir/$ac_word; then
5849       ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5850       break
5851     fi
5852   done
5853   IFS="$ac_save_ifs"
5854 fi
5855 fi
5856 LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5857 if test -n "$LIPO_FOR_TARGET"; then
5858   echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5859 else
5860   echo "$ac_t""no" 1>&6
5861 fi
5862
5863     fi
5864     if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
5865       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5866 set dummy ${ncn_progname}; ac_word=$2
5867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5868 echo "configure:5869: checking for $ac_word" >&5
5869 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5870   echo $ac_n "(cached) $ac_c" 1>&6
5871 else
5872   if test -n "$LIPO_FOR_TARGET"; then
5873   ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5874 else
5875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5876   ac_dummy="$PATH"
5877   for ac_dir in $ac_dummy; do
5878     test -z "$ac_dir" && ac_dir=.
5879     if test -f $ac_dir/$ac_word; then
5880       ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5881       break
5882     fi
5883   done
5884   IFS="$ac_save_ifs"
5885 fi
5886 fi
5887 LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
5888 if test -n "$LIPO_FOR_TARGET"; then
5889   echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
5890 else
5891   echo "$ac_t""no" 1>&6
5892 fi
5893  
5894     fi
5895     test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5896   done
5897 fi
5898   
5899 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
5900   set dummy lipo
5901   if test $build = $target ; then
5902     LIPO_FOR_TARGET="$2"
5903   else
5904     LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
5905   fi
5906 fi
5907
5908 else
5909   LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
5910 fi
5911
5912
5913
5914
5915 if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5916   if test -n "$with_build_time_tools"; then
5917     echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
5918 echo "configure:5919: checking for nm in $with_build_time_tools" >&5
5919     if test -x $with_build_time_tools/nm; then
5920       NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
5921       ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5922       echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
5923     else
5924       echo "$ac_t""no" 1>&6
5925     fi
5926   elif test $build != $host && test $have_gcc_for_target = yes; then
5927     NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
5928     test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
5929     ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
5930   fi
5931 fi
5932 if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5933   # Extract the first word of "nm", so it can be a program name with args.
5934 set dummy nm; ac_word=$2
5935 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5936 echo "configure:5937: checking for $ac_word" >&5
5937 if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
5938   echo $ac_n "(cached) $ac_c" 1>&6
5939 else
5940   case "$NM_FOR_TARGET" in
5941   /*)
5942   ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
5943   ;;
5944   ?:/*)                  
5945   ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
5946   ;;
5947   *)
5948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5949   ac_dummy="$gcc_cv_tool_dirs"
5950   for ac_dir in $ac_dummy; do 
5951     test -z "$ac_dir" && ac_dir=.
5952     if test -f $ac_dir/$ac_word; then
5953       ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
5954       break
5955     fi
5956   done
5957   IFS="$ac_save_ifs"
5958   ;;
5959 esac
5960 fi
5961 NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
5962 if test -n "$NM_FOR_TARGET"; then
5963   echo "$ac_t""$NM_FOR_TARGET" 1>&6
5964 else
5965   echo "$ac_t""no" 1>&6
5966 fi
5967
5968 fi
5969 if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
5970    if test -n "$with_build_time_tools"; then
5971   for ncn_progname in nm; do
5972     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
5973 echo "configure:5974: checking for ${ncn_progname} in $with_build_time_tools" >&5
5974     if test -x $with_build_time_tools/${ncn_progname}; then
5975       ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
5976       echo "$ac_t""yes" 1>&6
5977       break
5978     else
5979       echo "$ac_t""no" 1>&6
5980     fi
5981   done
5982 fi
5983
5984 if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
5985   for ncn_progname in nm; do
5986     if test -n "$ncn_target_tool_prefix"; then
5987       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5988 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_word" >&5
5991 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   if test -n "$NM_FOR_TARGET"; then
5995   ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
5996 else
5997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5998   ac_dummy="$PATH"
5999   for ac_dir in $ac_dummy; do
6000     test -z "$ac_dir" && ac_dir=.
6001     if test -f $ac_dir/$ac_word; then
6002       ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6003       break
6004     fi
6005   done
6006   IFS="$ac_save_ifs"
6007 fi
6008 fi
6009 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
6010 if test -n "$NM_FOR_TARGET"; then
6011   echo "$ac_t""$NM_FOR_TARGET" 1>&6
6012 else
6013   echo "$ac_t""no" 1>&6
6014 fi
6015
6016     fi
6017     if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
6018       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
6019 set dummy ${ncn_progname}; ac_word=$2
6020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6021 echo "configure:6022: checking for $ac_word" >&5
6022 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
6023   echo $ac_n "(cached) $ac_c" 1>&6
6024 else
6025   if test -n "$NM_FOR_TARGET"; then
6026   ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
6027 else
6028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6029   ac_dummy="$PATH"
6030   for ac_dir in $ac_dummy; do
6031     test -z "$ac_dir" && ac_dir=.
6032     if test -f $ac_dir/$ac_word; then
6033       ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
6034       break
6035     fi
6036   done
6037   IFS="$ac_save_ifs"
6038 fi
6039 fi
6040 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
6041 if test -n "$NM_FOR_TARGET"; then
6042   echo "$ac_t""$NM_FOR_TARGET" 1>&6
6043 else
6044   echo "$ac_t""no" 1>&6
6045 fi
6046  
6047     fi
6048     test -n "$ac_cv_prog_NM_FOR_TARGET" && break
6049   done
6050 fi
6051   
6052 if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
6053   set dummy nm
6054   if test $build = $target ; then
6055     NM_FOR_TARGET="$2"
6056   else
6057     NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
6058   fi
6059 fi
6060
6061 else
6062   NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
6063 fi
6064
6065
6066
6067
6068 if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6069   if test -n "$with_build_time_tools"; then
6070     echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
6071 echo "configure:6072: checking for objdump in $with_build_time_tools" >&5
6072     if test -x $with_build_time_tools/objdump; then
6073       OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
6074       ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6075       echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
6076     else
6077       echo "$ac_t""no" 1>&6
6078     fi
6079   elif test $build != $host && test $have_gcc_for_target = yes; then
6080     OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
6081     test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
6082     ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
6083   fi
6084 fi
6085 if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6086   # Extract the first word of "objdump", so it can be a program name with args.
6087 set dummy objdump; ac_word=$2
6088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6089 echo "configure:6090: checking for $ac_word" >&5
6090 if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   case "$OBJDUMP_FOR_TARGET" in
6094   /*)
6095   ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
6096   ;;
6097   ?:/*)                  
6098   ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
6099   ;;
6100   *)
6101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6102   ac_dummy="$gcc_cv_tool_dirs"
6103   for ac_dir in $ac_dummy; do 
6104     test -z "$ac_dir" && ac_dir=.
6105     if test -f $ac_dir/$ac_word; then
6106       ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word"
6107       break
6108     fi
6109   done
6110   IFS="$ac_save_ifs"
6111   ;;
6112 esac
6113 fi
6114 OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
6115 if test -n "$OBJDUMP_FOR_TARGET"; then
6116   echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120
6121 fi
6122 if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
6123    if test -n "$with_build_time_tools"; then
6124   for ncn_progname in objdump; do
6125     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6126 echo "configure:6127: checking for ${ncn_progname} in $with_build_time_tools" >&5
6127     if test -x $with_build_time_tools/${ncn_progname}; then
6128       ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
6129       echo "$ac_t""yes" 1>&6
6130       break
6131     else
6132       echo "$ac_t""no" 1>&6
6133     fi
6134   done
6135 fi
6136
6137 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
6138   for ncn_progname in objdump; do
6139     if test -n "$ncn_target_tool_prefix"; then
6140       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
6141 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6143 echo "configure:6144: checking for $ac_word" >&5
6144 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   if test -n "$OBJDUMP_FOR_TARGET"; then
6148   ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6149 else
6150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6151   ac_dummy="$PATH"
6152   for ac_dir in $ac_dummy; do
6153     test -z "$ac_dir" && ac_dir=.
6154     if test -f $ac_dir/$ac_word; then
6155       ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6156       break
6157     fi
6158   done
6159   IFS="$ac_save_ifs"
6160 fi
6161 fi
6162 OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6163 if test -n "$OBJDUMP_FOR_TARGET"; then
6164   echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6165 else
6166   echo "$ac_t""no" 1>&6
6167 fi
6168
6169     fi
6170     if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
6171       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
6172 set dummy ${ncn_progname}; ac_word=$2
6173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6174 echo "configure:6175: checking for $ac_word" >&5
6175 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
6176   echo $ac_n "(cached) $ac_c" 1>&6
6177 else
6178   if test -n "$OBJDUMP_FOR_TARGET"; then
6179   ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
6180 else
6181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6182   ac_dummy="$PATH"
6183   for ac_dir in $ac_dummy; do
6184     test -z "$ac_dir" && ac_dir=.
6185     if test -f $ac_dir/$ac_word; then
6186       ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
6187       break
6188     fi
6189   done
6190   IFS="$ac_save_ifs"
6191 fi
6192 fi
6193 OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
6194 if test -n "$OBJDUMP_FOR_TARGET"; then
6195   echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
6196 else
6197   echo "$ac_t""no" 1>&6
6198 fi
6199  
6200     fi
6201     test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
6202   done
6203 fi
6204   
6205 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
6206   set dummy objdump
6207   if test $build = $target ; then
6208     OBJDUMP_FOR_TARGET="$2"
6209   else
6210     OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6211   fi
6212 fi
6213
6214 else
6215   OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
6216 fi
6217
6218
6219
6220
6221 if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6222   if test -n "$with_build_time_tools"; then
6223     echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
6224 echo "configure:6225: checking for ranlib in $with_build_time_tools" >&5
6225     if test -x $with_build_time_tools/ranlib; then
6226       RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
6227       ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6228       echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
6229     else
6230       echo "$ac_t""no" 1>&6
6231     fi
6232   elif test $build != $host && test $have_gcc_for_target = yes; then
6233     RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
6234     test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
6235     ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
6236   fi
6237 fi
6238 if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6239   # Extract the first word of "ranlib", so it can be a program name with args.
6240 set dummy ranlib; ac_word=$2
6241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6242 echo "configure:6243: checking for $ac_word" >&5
6243 if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6244   echo $ac_n "(cached) $ac_c" 1>&6
6245 else
6246   case "$RANLIB_FOR_TARGET" in
6247   /*)
6248   ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
6249   ;;
6250   ?:/*)                  
6251   ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
6252   ;;
6253   *)
6254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6255   ac_dummy="$gcc_cv_tool_dirs"
6256   for ac_dir in $ac_dummy; do 
6257     test -z "$ac_dir" && ac_dir=.
6258     if test -f $ac_dir/$ac_word; then
6259       ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
6260       break
6261     fi
6262   done
6263   IFS="$ac_save_ifs"
6264   ;;
6265 esac
6266 fi
6267 RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
6268 if test -n "$RANLIB_FOR_TARGET"; then
6269   echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6270 else
6271   echo "$ac_t""no" 1>&6
6272 fi
6273
6274 fi
6275 if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
6276    if test -n "$with_build_time_tools"; then
6277   for ncn_progname in ranlib; do
6278     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6279 echo "configure:6280: checking for ${ncn_progname} in $with_build_time_tools" >&5
6280     if test -x $with_build_time_tools/${ncn_progname}; then
6281       ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
6282       echo "$ac_t""yes" 1>&6
6283       break
6284     else
6285       echo "$ac_t""no" 1>&6
6286     fi
6287   done
6288 fi
6289
6290 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
6291   for ncn_progname in ranlib; do
6292     if test -n "$ncn_target_tool_prefix"; then
6293       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
6294 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6296 echo "configure:6297: checking for $ac_word" >&5
6297 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   if test -n "$RANLIB_FOR_TARGET"; then
6301   ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
6302 else
6303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6304   ac_dummy="$PATH"
6305   for ac_dir in $ac_dummy; do
6306     test -z "$ac_dir" && ac_dir=.
6307     if test -f $ac_dir/$ac_word; then
6308       ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6309       break
6310     fi
6311   done
6312   IFS="$ac_save_ifs"
6313 fi
6314 fi
6315 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
6316 if test -n "$RANLIB_FOR_TARGET"; then
6317   echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6318 else
6319   echo "$ac_t""no" 1>&6
6320 fi
6321
6322     fi
6323     if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
6324       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
6325 set dummy ${ncn_progname}; ac_word=$2
6326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $ac_word" >&5
6328 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
6329   echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331   if test -n "$RANLIB_FOR_TARGET"; then
6332   ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
6333 else
6334   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6335   ac_dummy="$PATH"
6336   for ac_dir in $ac_dummy; do
6337     test -z "$ac_dir" && ac_dir=.
6338     if test -f $ac_dir/$ac_word; then
6339       ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
6340       break
6341     fi
6342   done
6343   IFS="$ac_save_ifs"
6344 fi
6345 fi
6346 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
6347 if test -n "$RANLIB_FOR_TARGET"; then
6348   echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
6349 else
6350   echo "$ac_t""no" 1>&6
6351 fi
6352  
6353     fi
6354     test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
6355   done
6356 fi
6357   
6358 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
6359   set dummy ranlib
6360   if test $build = $target ; then
6361     RANLIB_FOR_TARGET="$2"
6362   else
6363     RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
6364   fi
6365 fi
6366
6367 else
6368   RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
6369 fi
6370
6371
6372
6373
6374 if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6375   if test -n "$with_build_time_tools"; then
6376     echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
6377 echo "configure:6378: checking for strip in $with_build_time_tools" >&5
6378     if test -x $with_build_time_tools/strip; then
6379       STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
6380       ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6381       echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
6382     else
6383       echo "$ac_t""no" 1>&6
6384     fi
6385   elif test $build != $host && test $have_gcc_for_target = yes; then
6386     STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
6387     test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
6388     ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
6389   fi
6390 fi
6391 if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6392   # Extract the first word of "strip", so it can be a program name with args.
6393 set dummy strip; ac_word=$2
6394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6395 echo "configure:6396: checking for $ac_word" >&5
6396 if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
6397   echo $ac_n "(cached) $ac_c" 1>&6
6398 else
6399   case "$STRIP_FOR_TARGET" in
6400   /*)
6401   ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
6402   ;;
6403   ?:/*)                  
6404   ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
6405   ;;
6406   *)
6407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6408   ac_dummy="$gcc_cv_tool_dirs"
6409   for ac_dir in $ac_dummy; do 
6410     test -z "$ac_dir" && ac_dir=.
6411     if test -f $ac_dir/$ac_word; then
6412       ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
6413       break
6414     fi
6415   done
6416   IFS="$ac_save_ifs"
6417   ;;
6418 esac
6419 fi
6420 STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
6421 if test -n "$STRIP_FOR_TARGET"; then
6422   echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6423 else
6424   echo "$ac_t""no" 1>&6
6425 fi
6426
6427 fi
6428 if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
6429    if test -n "$with_build_time_tools"; then
6430   for ncn_progname in strip; do
6431     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6432 echo "configure:6433: checking for ${ncn_progname} in $with_build_time_tools" >&5
6433     if test -x $with_build_time_tools/${ncn_progname}; then
6434       ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
6435       echo "$ac_t""yes" 1>&6
6436       break
6437     else
6438       echo "$ac_t""no" 1>&6
6439     fi
6440   done
6441 fi
6442
6443 if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
6444   for ncn_progname in strip; do
6445     if test -n "$ncn_target_tool_prefix"; then
6446       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
6447 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6448 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6449 echo "configure:6450: checking for $ac_word" >&5
6450 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6451   echo $ac_n "(cached) $ac_c" 1>&6
6452 else
6453   if test -n "$STRIP_FOR_TARGET"; then
6454   ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6455 else
6456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6457   ac_dummy="$PATH"
6458   for ac_dir in $ac_dummy; do
6459     test -z "$ac_dir" && ac_dir=.
6460     if test -f $ac_dir/$ac_word; then
6461       ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6462       break
6463     fi
6464   done
6465   IFS="$ac_save_ifs"
6466 fi
6467 fi
6468 STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
6469 if test -n "$STRIP_FOR_TARGET"; then
6470   echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6471 else
6472   echo "$ac_t""no" 1>&6
6473 fi
6474
6475     fi
6476     if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
6477       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
6478 set dummy ${ncn_progname}; ac_word=$2
6479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6480 echo "configure:6481: checking for $ac_word" >&5
6481 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   if test -n "$STRIP_FOR_TARGET"; then
6485   ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
6486 else
6487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6488   ac_dummy="$PATH"
6489   for ac_dir in $ac_dummy; do
6490     test -z "$ac_dir" && ac_dir=.
6491     if test -f $ac_dir/$ac_word; then
6492       ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
6493       break
6494     fi
6495   done
6496   IFS="$ac_save_ifs"
6497 fi
6498 fi
6499 STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
6500 if test -n "$STRIP_FOR_TARGET"; then
6501   echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
6502 else
6503   echo "$ac_t""no" 1>&6
6504 fi
6505  
6506     fi
6507     test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
6508   done
6509 fi
6510   
6511 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
6512   set dummy strip
6513   if test $build = $target ; then
6514     STRIP_FOR_TARGET="$2"
6515   else
6516     STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
6517   fi
6518 fi
6519
6520 else
6521   STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
6522 fi
6523
6524
6525
6526
6527 if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6528   if test -n "$with_build_time_tools"; then
6529     echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
6530 echo "configure:6531: checking for windres in $with_build_time_tools" >&5
6531     if test -x $with_build_time_tools/windres; then
6532       WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
6533       ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6534       echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
6535     else
6536       echo "$ac_t""no" 1>&6
6537     fi
6538   elif test $build != $host && test $have_gcc_for_target = yes; then
6539     WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
6540     test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
6541     ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
6542   fi
6543 fi
6544 if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6545   # Extract the first word of "windres", so it can be a program name with args.
6546 set dummy windres; ac_word=$2
6547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6548 echo "configure:6549: checking for $ac_word" >&5
6549 if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   case "$WINDRES_FOR_TARGET" in
6553   /*)
6554   ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
6555   ;;
6556   ?:/*)                  
6557   ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
6558   ;;
6559   *)
6560   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6561   ac_dummy="$gcc_cv_tool_dirs"
6562   for ac_dir in $ac_dummy; do 
6563     test -z "$ac_dir" && ac_dir=.
6564     if test -f $ac_dir/$ac_word; then
6565       ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word"
6566       break
6567     fi
6568   done
6569   IFS="$ac_save_ifs"
6570   ;;
6571 esac
6572 fi
6573 WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
6574 if test -n "$WINDRES_FOR_TARGET"; then
6575   echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6576 else
6577   echo "$ac_t""no" 1>&6
6578 fi
6579
6580 fi
6581 if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
6582    if test -n "$with_build_time_tools"; then
6583   for ncn_progname in windres; do
6584     echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
6585 echo "configure:6586: checking for ${ncn_progname} in $with_build_time_tools" >&5
6586     if test -x $with_build_time_tools/${ncn_progname}; then
6587       ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
6588       echo "$ac_t""yes" 1>&6
6589       break
6590     else
6591       echo "$ac_t""no" 1>&6
6592     fi
6593   done
6594 fi
6595
6596 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
6597   for ncn_progname in windres; do
6598     if test -n "$ncn_target_tool_prefix"; then
6599       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
6600 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
6601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6602 echo "configure:6603: checking for $ac_word" >&5
6603 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6604   echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606   if test -n "$WINDRES_FOR_TARGET"; then
6607   ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
6608 else
6609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6610   ac_dummy="$PATH"
6611   for ac_dir in $ac_dummy; do
6612     test -z "$ac_dir" && ac_dir=.
6613     if test -f $ac_dir/$ac_word; then
6614       ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
6615       break
6616     fi
6617   done
6618   IFS="$ac_save_ifs"
6619 fi
6620 fi
6621 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
6622 if test -n "$WINDRES_FOR_TARGET"; then
6623   echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6624 else
6625   echo "$ac_t""no" 1>&6
6626 fi
6627
6628     fi
6629     if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
6630       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
6631 set dummy ${ncn_progname}; ac_word=$2
6632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6633 echo "configure:6634: checking for $ac_word" >&5
6634 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   if test -n "$WINDRES_FOR_TARGET"; then
6638   ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
6639 else
6640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6641   ac_dummy="$PATH"
6642   for ac_dir in $ac_dummy; do
6643     test -z "$ac_dir" && ac_dir=.
6644     if test -f $ac_dir/$ac_word; then
6645       ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
6646       break
6647     fi
6648   done
6649   IFS="$ac_save_ifs"
6650 fi
6651 fi
6652 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
6653 if test -n "$WINDRES_FOR_TARGET"; then
6654   echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
6655 else
6656   echo "$ac_t""no" 1>&6
6657 fi
6658  
6659     fi
6660     test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
6661   done
6662 fi
6663   
6664 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
6665   set dummy windres
6666   if test $build = $target ; then
6667     WINDRES_FOR_TARGET="$2"
6668   else
6669     WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
6670   fi
6671 fi
6672
6673 else
6674   WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
6675 fi
6676
6677
6678 RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
6679
6680 echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
6681 echo "configure:6682: checking where to find the target ar" >&5
6682 if test "x${build}" != "x${host}" ; then
6683   if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6684     # We already found the complete path
6685     echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
6686   else
6687     # Canadian cross, just use what we found
6688     echo "$ac_t""pre-installed" 1>&6
6689   fi
6690 else
6691   ok=yes
6692   case " ${configdirs} " in
6693     *" binutils "*) ;;
6694     *) ok=no ;;
6695   esac
6696   
6697   if test $ok = yes; then
6698     # An in-tree tool is available and we can use it
6699     AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
6700     echo "$ac_t""just compiled" 1>&6
6701   elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
6702     # We already found the complete path
6703     echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
6704   elif test "x$target" = "x$host"; then
6705     # We can use an host tool
6706     AR_FOR_TARGET='$(AR)'
6707     echo "$ac_t""host tool" 1>&6
6708   else
6709     # We need a cross tool
6710     echo "$ac_t""pre-installed" 1>&6
6711   fi
6712 fi
6713 echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
6714 echo "configure:6715: checking where to find the target as" >&5
6715 if test "x${build}" != "x${host}" ; then
6716   if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6717     # We already found the complete path
6718     echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
6719   else
6720     # Canadian cross, just use what we found
6721     echo "$ac_t""pre-installed" 1>&6
6722   fi
6723 else
6724   ok=yes
6725   case " ${configdirs} " in
6726     *" gas "*) ;;
6727     *) ok=no ;;
6728   esac
6729   
6730   if test $ok = yes; then
6731     # An in-tree tool is available and we can use it
6732     AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
6733     echo "$ac_t""just compiled" 1>&6
6734   elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
6735     # We already found the complete path
6736     echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
6737   elif test "x$target" = "x$host"; then
6738     # We can use an host tool
6739     AS_FOR_TARGET='$(AS)'
6740     echo "$ac_t""host tool" 1>&6
6741   else
6742     # We need a cross tool
6743     echo "$ac_t""pre-installed" 1>&6
6744   fi
6745 fi
6746 echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
6747 echo "configure:6748: checking where to find the target cc" >&5
6748 if test "x${build}" != "x${host}" ; then
6749   if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6750     # We already found the complete path
6751     echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
6752   else
6753     # Canadian cross, just use what we found
6754     echo "$ac_t""pre-installed" 1>&6
6755   fi
6756 else
6757   ok=yes
6758   case " ${configdirs} " in
6759     *" gcc "*) ;;
6760     *) ok=no ;;
6761   esac
6762   
6763   if test $ok = yes; then
6764     # An in-tree tool is available and we can use it
6765     CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6766     echo "$ac_t""just compiled" 1>&6
6767   elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
6768     # We already found the complete path
6769     echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
6770   elif test "x$target" = "x$host"; then
6771     # We can use an host tool
6772     CC_FOR_TARGET='$(CC)'
6773     echo "$ac_t""host tool" 1>&6
6774   else
6775     # We need a cross tool
6776     echo "$ac_t""pre-installed" 1>&6
6777   fi
6778 fi
6779 echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
6780 echo "configure:6781: checking where to find the target c++" >&5
6781 if test "x${build}" != "x${host}" ; then
6782   if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6783     # We already found the complete path
6784     echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
6785   else
6786     # Canadian cross, just use what we found
6787     echo "$ac_t""pre-installed" 1>&6
6788   fi
6789 else
6790   ok=yes
6791   case " ${configdirs} " in
6792     *" gcc "*) ;;
6793     *) ok=no ;;
6794   esac
6795   case ,${enable_languages}, in
6796     *,c++,*) ;;
6797     *) ok=no ;;
6798   esac
6799   if test $ok = yes; then
6800     # An in-tree tool is available and we can use it
6801     CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `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'
6802     echo "$ac_t""just compiled" 1>&6
6803   elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
6804     # We already found the complete path
6805     echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
6806   elif test "x$target" = "x$host"; then
6807     # We can use an host tool
6808     CXX_FOR_TARGET='$(CXX)'
6809     echo "$ac_t""host tool" 1>&6
6810   else
6811     # We need a cross tool
6812     echo "$ac_t""pre-installed" 1>&6
6813   fi
6814 fi
6815 echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
6816 echo "configure:6817: checking where to find the target c++ for libstdc++" >&5
6817 if test "x${build}" != "x${host}" ; then
6818   if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6819     # We already found the complete path
6820     echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
6821   else
6822     # Canadian cross, just use what we found
6823     echo "$ac_t""pre-installed" 1>&6
6824   fi
6825 else
6826   ok=yes
6827   case " ${configdirs} " in
6828     *" gcc "*) ;;
6829     *) ok=no ;;
6830   esac
6831   case ,${enable_languages}, in
6832     *,c++,*) ;;
6833     *) ok=no ;;
6834   esac
6835   if test $ok = yes; then
6836     # An in-tree tool is available and we can use it
6837     RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
6838     echo "$ac_t""just compiled" 1>&6
6839   elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
6840     # We already found the complete path
6841     echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
6842   elif test "x$target" = "x$host"; then
6843     # We can use an host tool
6844     RAW_CXX_FOR_TARGET='$(CXX)'
6845     echo "$ac_t""host tool" 1>&6
6846   else
6847     # We need a cross tool
6848     echo "$ac_t""pre-installed" 1>&6
6849   fi
6850 fi
6851 echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
6852 echo "configure:6853: checking where to find the target dlltool" >&5
6853 if test "x${build}" != "x${host}" ; then
6854   if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6855     # We already found the complete path
6856     echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
6857   else
6858     # Canadian cross, just use what we found
6859     echo "$ac_t""pre-installed" 1>&6
6860   fi
6861 else
6862   ok=yes
6863   case " ${configdirs} " in
6864     *" binutils "*) ;;
6865     *) ok=no ;;
6866   esac
6867   
6868   if test $ok = yes; then
6869     # An in-tree tool is available and we can use it
6870     DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
6871     echo "$ac_t""just compiled" 1>&6
6872   elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
6873     # We already found the complete path
6874     echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
6875   elif test "x$target" = "x$host"; then
6876     # We can use an host tool
6877     DLLTOOL_FOR_TARGET='$(DLLTOOL)'
6878     echo "$ac_t""host tool" 1>&6
6879   else
6880     # We need a cross tool
6881     echo "$ac_t""pre-installed" 1>&6
6882   fi
6883 fi
6884 echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
6885 echo "configure:6886: checking where to find the target gcc" >&5
6886 if test "x${build}" != "x${host}" ; then
6887   if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6888     # We already found the complete path
6889     echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
6890   else
6891     # Canadian cross, just use what we found
6892     echo "$ac_t""pre-installed" 1>&6
6893   fi
6894 else
6895   ok=yes
6896   case " ${configdirs} " in
6897     *" gcc "*) ;;
6898     *) ok=no ;;
6899   esac
6900   
6901   if test $ok = yes; then
6902     # An in-tree tool is available and we can use it
6903     GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
6904     echo "$ac_t""just compiled" 1>&6
6905   elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
6906     # We already found the complete path
6907     echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
6908   elif test "x$target" = "x$host"; then
6909     # We can use an host tool
6910     GCC_FOR_TARGET='$()'
6911     echo "$ac_t""host tool" 1>&6
6912   else
6913     # We need a cross tool
6914     echo "$ac_t""pre-installed" 1>&6
6915   fi
6916 fi
6917 echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
6918 echo "configure:6919: checking where to find the target gcj" >&5
6919 if test "x${build}" != "x${host}" ; then
6920   if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6921     # We already found the complete path
6922     echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
6923   else
6924     # Canadian cross, just use what we found
6925     echo "$ac_t""pre-installed" 1>&6
6926   fi
6927 else
6928   ok=yes
6929   case " ${configdirs} " in
6930     *" gcc "*) ;;
6931     *) ok=no ;;
6932   esac
6933   case ,${enable_languages}, in
6934     *,java,*) ;;
6935     *) ok=no ;;
6936   esac
6937   if test $ok = yes; then
6938     # An in-tree tool is available and we can use it
6939     GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
6940     echo "$ac_t""just compiled" 1>&6
6941   elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
6942     # We already found the complete path
6943     echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
6944   elif test "x$target" = "x$host"; then
6945     # We can use an host tool
6946     GCJ_FOR_TARGET='$(GCJ)'
6947     echo "$ac_t""host tool" 1>&6
6948   else
6949     # We need a cross tool
6950     echo "$ac_t""pre-installed" 1>&6
6951   fi
6952 fi
6953 echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
6954 echo "configure:6955: checking where to find the target gfortran" >&5
6955 if test "x${build}" != "x${host}" ; then
6956   if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6957     # We already found the complete path
6958     echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
6959   else
6960     # Canadian cross, just use what we found
6961     echo "$ac_t""pre-installed" 1>&6
6962   fi
6963 else
6964   ok=yes
6965   case " ${configdirs} " in
6966     *" gcc "*) ;;
6967     *) ok=no ;;
6968   esac
6969   case ,${enable_languages}, in
6970     *,fortran,*) ;;
6971     *) ok=no ;;
6972   esac
6973   if test $ok = yes; then
6974     # An in-tree tool is available and we can use it
6975     GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
6976     echo "$ac_t""just compiled" 1>&6
6977   elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
6978     # We already found the complete path
6979     echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
6980   elif test "x$target" = "x$host"; then
6981     # We can use an host tool
6982     GFORTRAN_FOR_TARGET='$(GFORTRAN)'
6983     echo "$ac_t""host tool" 1>&6
6984   else
6985     # We need a cross tool
6986     echo "$ac_t""pre-installed" 1>&6
6987   fi
6988 fi
6989 echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
6990 echo "configure:6991: checking where to find the target ld" >&5
6991 if test "x${build}" != "x${host}" ; then
6992   if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
6993     # We already found the complete path
6994     echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
6995   else
6996     # Canadian cross, just use what we found
6997     echo "$ac_t""pre-installed" 1>&6
6998   fi
6999 else
7000   ok=yes
7001   case " ${configdirs} " in
7002     *" ld "*) ;;
7003     *) ok=no ;;
7004   esac
7005   
7006   if test $ok = yes; then
7007     # An in-tree tool is available and we can use it
7008     LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
7009     echo "$ac_t""just compiled" 1>&6
7010   elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
7011     # We already found the complete path
7012     echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
7013   elif test "x$target" = "x$host"; then
7014     # We can use an host tool
7015     LD_FOR_TARGET='$(LD)'
7016     echo "$ac_t""host tool" 1>&6
7017   else
7018     # We need a cross tool
7019     echo "$ac_t""pre-installed" 1>&6
7020   fi
7021 fi
7022 echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
7023 echo "configure:7024: checking where to find the target lipo" >&5
7024 if test "x${build}" != "x${host}" ; then
7025   if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7026     # We already found the complete path
7027     echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7028   else
7029     # Canadian cross, just use what we found
7030     echo "$ac_t""pre-installed" 1>&6
7031   fi
7032 else
7033   if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
7034     # We already found the complete path
7035     echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
7036   elif test "x$target" = "x$host"; then
7037     # We can use an host tool
7038     LIPO_FOR_TARGET='$(LIPO)'
7039     echo "$ac_t""host tool" 1>&6
7040   else
7041     # We need a cross tool
7042     echo "$ac_t""pre-installed" 1>&6
7043   fi
7044 fi
7045 echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
7046 echo "configure:7047: checking where to find the target nm" >&5
7047 if test "x${build}" != "x${host}" ; then
7048   if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7049     # We already found the complete path
7050     echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
7051   else
7052     # Canadian cross, just use what we found
7053     echo "$ac_t""pre-installed" 1>&6
7054   fi
7055 else
7056   ok=yes
7057   case " ${configdirs} " in
7058     *" binutils "*) ;;
7059     *) ok=no ;;
7060   esac
7061   
7062   if test $ok = yes; then
7063     # An in-tree tool is available and we can use it
7064     NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
7065     echo "$ac_t""just compiled" 1>&6
7066   elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
7067     # We already found the complete path
7068     echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
7069   elif test "x$target" = "x$host"; then
7070     # We can use an host tool
7071     NM_FOR_TARGET='$(NM)'
7072     echo "$ac_t""host tool" 1>&6
7073   else
7074     # We need a cross tool
7075     echo "$ac_t""pre-installed" 1>&6
7076   fi
7077 fi
7078 echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
7079 echo "configure:7080: checking where to find the target objdump" >&5
7080 if test "x${build}" != "x${host}" ; then
7081   if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7082     # We already found the complete path
7083     echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
7084   else
7085     # Canadian cross, just use what we found
7086     echo "$ac_t""pre-installed" 1>&6
7087   fi
7088 else
7089   ok=yes
7090   case " ${configdirs} " in
7091     *" binutils "*) ;;
7092     *) ok=no ;;
7093   esac
7094   
7095   if test $ok = yes; then
7096     # An in-tree tool is available and we can use it
7097     OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
7098     echo "$ac_t""just compiled" 1>&6
7099   elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
7100     # We already found the complete path
7101     echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
7102   elif test "x$target" = "x$host"; then
7103     # We can use an host tool
7104     OBJDUMP_FOR_TARGET='$(OBJDUMP)'
7105     echo "$ac_t""host tool" 1>&6
7106   else
7107     # We need a cross tool
7108     echo "$ac_t""pre-installed" 1>&6
7109   fi
7110 fi
7111 echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
7112 echo "configure:7113: checking where to find the target ranlib" >&5
7113 if test "x${build}" != "x${host}" ; then
7114   if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7115     # We already found the complete path
7116     echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
7117   else
7118     # Canadian cross, just use what we found
7119     echo "$ac_t""pre-installed" 1>&6
7120   fi
7121 else
7122   ok=yes
7123   case " ${configdirs} " in
7124     *" binutils "*) ;;
7125     *) ok=no ;;
7126   esac
7127   
7128   if test $ok = yes; then
7129     # An in-tree tool is available and we can use it
7130     RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
7131     echo "$ac_t""just compiled" 1>&6
7132   elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
7133     # We already found the complete path
7134     echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
7135   elif test "x$target" = "x$host"; then
7136     # We can use an host tool
7137     RANLIB_FOR_TARGET='$(RANLIB)'
7138     echo "$ac_t""host tool" 1>&6
7139   else
7140     # We need a cross tool
7141     echo "$ac_t""pre-installed" 1>&6
7142   fi
7143 fi
7144 echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
7145 echo "configure:7146: checking where to find the target strip" >&5
7146 if test "x${build}" != "x${host}" ; then
7147   if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7148     # We already found the complete path
7149     echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
7150   else
7151     # Canadian cross, just use what we found
7152     echo "$ac_t""pre-installed" 1>&6
7153   fi
7154 else
7155   ok=yes
7156   case " ${configdirs} " in
7157     *" binutils "*) ;;
7158     *) ok=no ;;
7159   esac
7160   
7161   if test $ok = yes; then
7162     # An in-tree tool is available and we can use it
7163     STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
7164     echo "$ac_t""just compiled" 1>&6
7165   elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
7166     # We already found the complete path
7167     echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
7168   elif test "x$target" = "x$host"; then
7169     # We can use an host tool
7170     STRIP_FOR_TARGET='$(STRIP)'
7171     echo "$ac_t""host tool" 1>&6
7172   else
7173     # We need a cross tool
7174     echo "$ac_t""pre-installed" 1>&6
7175   fi
7176 fi
7177 echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
7178 echo "configure:7179: checking where to find the target windres" >&5
7179 if test "x${build}" != "x${host}" ; then
7180   if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7181     # We already found the complete path
7182     echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
7183   else
7184     # Canadian cross, just use what we found
7185     echo "$ac_t""pre-installed" 1>&6
7186   fi
7187 else
7188   ok=yes
7189   case " ${configdirs} " in
7190     *" binutils "*) ;;
7191     *) ok=no ;;
7192   esac
7193   
7194   if test $ok = yes; then
7195     # An in-tree tool is available and we can use it
7196     WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
7197     echo "$ac_t""just compiled" 1>&6
7198   elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
7199     # We already found the complete path
7200     echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
7201   elif test "x$target" = "x$host"; then
7202     # We can use an host tool
7203     WINDRES_FOR_TARGET='$(WINDRES)'
7204     echo "$ac_t""host tool" 1>&6
7205   else
7206     # We need a cross tool
7207     echo "$ac_t""pre-installed" 1>&6
7208   fi
7209 fi
7210
7211
7212
7213
7214 # Certain tools may need extra flags.
7215 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
7216 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
7217 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
7218
7219 # When building target libraries, except in a Canadian cross, we use
7220 # the same toolchain as the compiler we just built.
7221 COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
7222 COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
7223 COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
7224 if test $host = $build; then
7225   case " $configdirs " in
7226     *" gcc "*)
7227       COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
7228       COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
7229       COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
7230       ;;
7231   esac
7232 fi
7233
7234
7235
7236
7237
7238 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7239 echo "configure:7240: checking whether to enable maintainer-specific portions of Makefiles" >&5
7240 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7241 if test "${enable_maintainer_mode+set}" = set; then
7242   enableval="$enable_maintainer_mode"
7243   USE_MAINTAINER_MODE=$enableval
7244 else
7245   USE_MAINTAINER_MODE=no
7246 fi
7247
7248 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
7249
7250
7251 if test "$USE_MAINTAINER_MODE" = yes; then
7252   MAINTAINER_MODE_TRUE=
7253   MAINTAINER_MODE_FALSE='#'
7254 else
7255   MAINTAINER_MODE_TRUE='#'
7256   MAINTAINER_MODE_FALSE=
7257 fi      
7258 MAINT=$MAINTAINER_MODE_TRUE
7259
7260 # ---------------------
7261 # GCC bootstrap support
7262 # ---------------------
7263
7264 # Stage specific cflags for build.
7265 stage1_cflags="-g"
7266 case $build in
7267   vax-*-*)
7268     case ${GCC} in
7269       yes) stage1_cflags="-g -Wa,-J" ;;
7270       *) stage1_cflags="-g -J" ;;
7271     esac ;;
7272   powerpc-*-darwin*)
7273     # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
7274     # sources; use -no-cpp-precomp to get to GNU cpp.
7275     # Apple's GCC has bugs in designated initializer handling, so disable
7276     # that too.
7277     stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
7278     ;;
7279 esac
7280
7281
7282 # Enable -Werror in bootstrap stage2 and later.
7283 # Change the default to "no" on release branches.
7284 # Check whether --enable-werror or --disable-werror was given.
7285 if test "${enable_werror+set}" = set; then
7286   enableval="$enable_werror"
7287   :
7288 else
7289   enable_werror=yes
7290 fi
7291
7292 case ${enable_werror} in
7293   yes) stage2_werror_flag="--enable-werror-always" ;;
7294   *) stage2_werror_flag="" ;;
7295 esac
7296
7297
7298 trap '' 1 2 15
7299 cat > confcache <<\EOF
7300 # This file is a shell script that caches the results of configure
7301 # tests run on this system so they can be shared between configure
7302 # scripts and configure runs.  It is not useful on other systems.
7303 # If it contains results you don't want to keep, you may remove or edit it.
7304 #
7305 # By default, configure uses ./config.cache as the cache file,
7306 # creating it if it does not exist already.  You can give configure
7307 # the --cache-file=FILE option to use a different cache file; that is
7308 # what configure does when it calls configure scripts in
7309 # subdirectories, so they share the cache.
7310 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7311 # config.status only pays attention to the cache file if you give it the
7312 # --recheck option to rerun configure.
7313 #
7314 EOF
7315 # The following way of writing the cache mishandles newlines in values,
7316 # but we know of no workaround that is simple, portable, and efficient.
7317 # So, don't put newlines in cache variables' values.
7318 # Ultrix sh set writes to stderr and can't be redirected directly,
7319 # and sets the high bit in the cache file unless we assign to the vars.
7320 (set) 2>&1 |
7321   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7322   *ac_space=\ *)
7323     # `set' does not quote correctly, so add quotes (double-quote substitution
7324     # turns \\\\ into \\, and sed turns \\ into \).
7325     sed -n \
7326       -e "s/'/'\\\\''/g" \
7327       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7328     ;;
7329   *)
7330     # `set' quotes correctly as required by POSIX, so do not add quotes.
7331     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7332     ;;
7333   esac >> confcache
7334 if cmp -s $cache_file confcache; then
7335   :
7336 else
7337   if test -w $cache_file; then
7338     echo "updating cache $cache_file"
7339     cat confcache > $cache_file
7340   else
7341     echo "not updating unwritable cache $cache_file"
7342   fi
7343 fi
7344 rm -f confcache
7345
7346 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7347
7348 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7349 # Let make expand exec_prefix.
7350 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7351
7352 # Any assignment to VPATH causes Sun make to only execute
7353 # the first set of double-colon rules, so remove it if not needed.
7354 # If there is a colon in the path, we need to keep it.
7355 if test "x$srcdir" = x.; then
7356   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7357 fi
7358
7359 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7360
7361 # Transform confdefs.h into DEFS.
7362 # Protect against shell expansion while executing Makefile rules.
7363 # Protect against Makefile macro expansion.
7364 cat > conftest.defs <<\EOF
7365 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
7366 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
7367 s%\[%\\&%g
7368 s%\]%\\&%g
7369 s%\$%$$%g
7370 EOF
7371 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
7372 rm -f conftest.defs
7373
7374
7375 # Without the "./", some shells look in PATH for config.status.
7376 : ${CONFIG_STATUS=./config.status}
7377
7378 echo creating $CONFIG_STATUS
7379 rm -f $CONFIG_STATUS
7380 cat > $CONFIG_STATUS <<EOF
7381 #! /bin/sh
7382 # Generated automatically by configure.
7383 # Run this file to recreate the current configuration.
7384 # This directory was configured as follows,
7385 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7386 #
7387 # $0 $ac_configure_args
7388 #
7389 # Compiler output produced by configure, useful for debugging
7390 # configure, is in ./config.log if it exists.
7391
7392 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7393 for ac_option
7394 do
7395   case "\$ac_option" in
7396   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7397     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7398     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7399   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7400     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7401     exit 0 ;;
7402   -help | --help | --hel | --he | --h)
7403     echo "\$ac_cs_usage"; exit 0 ;;
7404   *) echo "\$ac_cs_usage"; exit 1 ;;
7405   esac
7406 done
7407
7408 ac_given_srcdir=$srcdir
7409 ac_given_INSTALL="$INSTALL"
7410
7411 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7412 EOF
7413 cat >> $CONFIG_STATUS <<EOF
7414
7415 # Protect against being on the right side of a sed subst in config.status.
7416 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7417  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7418 $ac_vpsub
7419 $extrasub
7420 s%@SHELL@%$SHELL%g
7421 s%@CFLAGS@%$CFLAGS%g
7422 s%@CPPFLAGS@%$CPPFLAGS%g
7423 s%@CXXFLAGS@%$CXXFLAGS%g
7424 s%@FFLAGS@%$FFLAGS%g
7425 s%@DEFS@%$DEFS%g
7426 s%@LDFLAGS@%$LDFLAGS%g
7427 s%@LIBS@%$LIBS%g
7428 s%@exec_prefix@%$exec_prefix%g
7429 s%@prefix@%$prefix%g
7430 s%@program_transform_name@%$program_transform_name%g
7431 s%@bindir@%$bindir%g
7432 s%@sbindir@%$sbindir%g
7433 s%@libexecdir@%$libexecdir%g
7434 s%@datadir@%$datadir%g
7435 s%@sysconfdir@%$sysconfdir%g
7436 s%@sharedstatedir@%$sharedstatedir%g
7437 s%@localstatedir@%$localstatedir%g
7438 s%@libdir@%$libdir%g
7439 s%@includedir@%$includedir%g
7440 s%@oldincludedir@%$oldincludedir%g
7441 s%@infodir@%$infodir%g
7442 s%@mandir@%$mandir%g
7443 s%@host@%$host%g
7444 s%@host_alias@%$host_alias%g
7445 s%@host_cpu@%$host_cpu%g
7446 s%@host_vendor@%$host_vendor%g
7447 s%@host_os@%$host_os%g
7448 s%@target@%$target%g
7449 s%@target_alias@%$target_alias%g
7450 s%@target_cpu@%$target_cpu%g
7451 s%@target_vendor@%$target_vendor%g
7452 s%@target_os@%$target_os%g
7453 s%@build@%$build%g
7454 s%@build_alias@%$build_alias%g
7455 s%@build_cpu@%$build_cpu%g
7456 s%@build_vendor@%$build_vendor%g
7457 s%@build_os@%$build_os%g
7458 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7459 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7460 s%@INSTALL_DATA@%$INSTALL_DATA%g
7461 s%@LN@%$LN%g
7462 s%@LN_S@%$LN_S%g
7463 s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
7464 s%@build_subdir@%$build_subdir%g
7465 s%@host_subdir@%$host_subdir%g
7466 s%@target_subdir@%$target_subdir%g
7467 s%@CC@%$CC%g
7468 s%@GNATBIND@%$GNATBIND%g
7469 s%@do_compare@%$do_compare%g
7470 s%@datarootdir@%$datarootdir%g
7471 s%@docdir@%$docdir%g
7472 s%@htmldir@%$htmldir%g
7473 s%@gmplibs@%$gmplibs%g
7474 s%@gmpinc@%$gmpinc%g
7475 s%@stage1_languages@%$stage1_languages%g
7476 s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
7477 /@serialization_dependencies@/r $serialization_dependencies
7478 s%@serialization_dependencies@%%g
7479 /@host_makefile_frag@/r $host_makefile_frag
7480 s%@host_makefile_frag@%%g
7481 /@target_makefile_frag@/r $target_makefile_frag
7482 s%@target_makefile_frag@%%g
7483 /@alphaieee_frag@/r $alphaieee_frag
7484 s%@alphaieee_frag@%%g
7485 /@ospace_frag@/r $ospace_frag
7486 s%@ospace_frag@%%g
7487 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
7488 s%@tooldir@%$tooldir%g
7489 s%@build_tooldir@%$build_tooldir%g
7490 s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
7491 s%@GDB_TK@%$GDB_TK%g
7492 s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
7493 s%@build_configargs@%$build_configargs%g
7494 s%@build_configdirs@%$build_configdirs%g
7495 s%@host_configargs@%$host_configargs%g
7496 s%@configdirs@%$configdirs%g
7497 s%@target_configargs@%$target_configargs%g
7498 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7499 s%@config_shell@%$config_shell%g
7500 s%@YACC@%$YACC%g
7501 s%@BISON@%$BISON%g
7502 s%@M4@%$M4%g
7503 s%@LEX@%$LEX%g
7504 s%@FLEX@%$FLEX%g
7505 s%@MAKEINFO@%$MAKEINFO%g
7506 s%@EXPECT@%$EXPECT%g
7507 s%@RUNTEST@%$RUNTEST%g
7508 s%@AR@%$AR%g
7509 s%@AS@%$AS%g
7510 s%@DLLTOOL@%$DLLTOOL%g
7511 s%@LD@%$LD%g
7512 s%@LIPO@%$LIPO%g
7513 s%@NM@%$NM%g
7514 s%@RANLIB@%$RANLIB%g
7515 s%@STRIP@%$STRIP%g
7516 s%@WINDRES@%$WINDRES%g
7517 s%@OBJCOPY@%$OBJCOPY%g
7518 s%@OBJDUMP@%$OBJDUMP%g
7519 s%@CXX@%$CXX%g
7520 s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
7521 s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
7522 s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
7523 s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
7524 s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
7525 s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
7526 s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
7527 s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
7528 s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
7529 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
7530 s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
7531 s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
7532 s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
7533 s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
7534 s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
7535 s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
7536 s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
7537 s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
7538 s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
7539 s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
7540 s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
7541 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7542 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7543 s%@MAINT@%$MAINT%g
7544 s%@stage1_cflags@%$stage1_cflags%g
7545 s%@stage2_werror_flag@%$stage2_werror_flag%g
7546
7547 CEOF
7548 EOF
7549
7550 cat >> $CONFIG_STATUS <<\EOF
7551
7552 # Split the substitutions into bite-sized pieces for seds with
7553 # small command number limits, like on Digital OSF/1 and HP-UX.
7554 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7555 ac_file=1 # Number of current file.
7556 ac_beg=1 # First line for current file.
7557 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7558 ac_more_lines=:
7559 ac_sed_cmds=""
7560 while $ac_more_lines; do
7561   if test $ac_beg -gt 1; then
7562     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7563   else
7564     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7565   fi
7566   if test ! -s conftest.s$ac_file; then
7567     ac_more_lines=false
7568     rm -f conftest.s$ac_file
7569   else
7570     if test -z "$ac_sed_cmds"; then
7571       ac_sed_cmds="sed -f conftest.s$ac_file"
7572     else
7573       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7574     fi
7575     ac_file=`expr $ac_file + 1`
7576     ac_beg=$ac_end
7577     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7578   fi
7579 done
7580 if test -z "$ac_sed_cmds"; then
7581   ac_sed_cmds=cat
7582 fi
7583 EOF
7584
7585 cat >> $CONFIG_STATUS <<EOF
7586
7587 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7588 EOF
7589 cat >> $CONFIG_STATUS <<\EOF
7590 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7591   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7592   case "$ac_file" in
7593   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7594        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7595   *) ac_file_in="${ac_file}.in" ;;
7596   esac
7597
7598   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7599
7600   # Remove last slash and all that follows it.  Not all systems have dirname.
7601   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7602   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7603     # The file is in a subdirectory.
7604     test ! -d "$ac_dir" && mkdir "$ac_dir"
7605     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7606     # A "../" for each directory in $ac_dir_suffix.
7607     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7608   else
7609     ac_dir_suffix= ac_dots=
7610   fi
7611
7612   case "$ac_given_srcdir" in
7613   .)  srcdir=.
7614       if test -z "$ac_dots"; then top_srcdir=.
7615       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7616   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7617   *) # Relative path.
7618     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7619     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7620   esac
7621
7622   case "$ac_given_INSTALL" in
7623   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7624   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7625   esac
7626
7627   echo creating "$ac_file"
7628   rm -f "$ac_file"
7629   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7630   case "$ac_file" in
7631   *Makefile*) ac_comsub="1i\\
7632 # $configure_input" ;;
7633   *) ac_comsub= ;;
7634   esac
7635
7636   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7637   sed -e "$ac_comsub
7638 s%@configure_input@%$configure_input%g
7639 s%@srcdir@%$srcdir%g
7640 s%@top_srcdir@%$top_srcdir%g
7641 s%@INSTALL@%$INSTALL%g
7642 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7643 fi; done
7644 rm -f conftest.s*
7645
7646 EOF
7647 cat >> $CONFIG_STATUS <<EOF
7648
7649 EOF
7650 cat >> $CONFIG_STATUS <<\EOF
7651
7652 exit 0
7653 EOF
7654 chmod +x $CONFIG_STATUS
7655 rm -fr confdefs* $ac_clean_files
7656 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7657