OSDN Git Service

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