OSDN Git Service

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