OSDN Git Service

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