OSDN Git Service

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