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