OSDN Git Service

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