OSDN Git Service

* fr.po: Update.
[pf3gnuchains/gcc-fork.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-libada        Builds libada directory"
16 ac_help="$ac_help
17   --enable-serial-[{host,target,build}-]configure
18                           Force sequential configuration of
19                           sub-packages for the host, target or build
20                           machine, or all sub-packages"
21 ac_help="$ac_help
22   --enable-maintainer-mode enable make rules and dependencies not useful
23                           (and sometimes confusing) to the casual installer"
24
25 # Initialize some variables set by options.
26 # The variables have the same names as the options, with
27 # dashes changed to underlines.
28 build=NONE
29 cache_file=./config.cache
30 exec_prefix=NONE
31 host=NONE
32 no_create=
33 nonopt=NONE
34 no_recursion=
35 prefix=NONE
36 program_prefix=NONE
37 program_suffix=NONE
38 program_transform_name=s,x,x,
39 silent=
40 site=
41 srcdir=
42 target=NONE
43 verbose=
44 x_includes=NONE
45 x_libraries=NONE
46 bindir='${exec_prefix}/bin'
47 sbindir='${exec_prefix}/sbin'
48 libexecdir='${exec_prefix}/libexec'
49 datadir='${prefix}/share'
50 sysconfdir='${prefix}/etc'
51 sharedstatedir='${prefix}/com'
52 localstatedir='${prefix}/var'
53 libdir='${exec_prefix}/lib'
54 includedir='${prefix}/include'
55 oldincludedir='/usr/include'
56 infodir='${prefix}/info'
57 mandir='${prefix}/man'
58
59 # Initialize some other variables.
60 subdirs=
61 MFLAGS= MAKEFLAGS=
62 SHELL=${CONFIG_SHELL-/bin/sh}
63 # Maximum number of lines to put in a shell here document.
64 ac_max_here_lines=12
65
66 ac_prev=
67 for ac_option
68 do
69
70   # If the previous option needs an argument, assign it.
71   if test -n "$ac_prev"; then
72     eval "$ac_prev=\$ac_option"
73     ac_prev=
74     continue
75   fi
76
77   case "$ac_option" in
78   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
79   *) ac_optarg= ;;
80   esac
81
82   # Accept the important Cygnus configure options, so we can diagnose typos.
83
84   case "$ac_option" in
85
86   -bindir | --bindir | --bindi | --bind | --bin | --bi)
87     ac_prev=bindir ;;
88   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89     bindir="$ac_optarg" ;;
90
91   -build | --build | --buil | --bui | --bu)
92     ac_prev=build ;;
93   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94     build="$ac_optarg" ;;
95
96   -cache-file | --cache-file | --cache-fil | --cache-fi \
97   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
98     ac_prev=cache_file ;;
99   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101     cache_file="$ac_optarg" ;;
102
103   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
104     ac_prev=datadir ;;
105   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
106   | --da=*)
107     datadir="$ac_optarg" ;;
108
109   -disable-* | --disable-*)
110     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111     # Reject names that are not valid shell variable names.
112     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     eval "enable_${ac_feature}=no" ;;
117
118   -enable-* | --enable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     case "$ac_option" in
126       *=*) ;;
127       *) ac_optarg=yes ;;
128     esac
129     eval "enable_${ac_feature}='$ac_optarg'" ;;
130
131   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133   | --exec | --exe | --ex)
134     ac_prev=exec_prefix ;;
135   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137   | --exec=* | --exe=* | --ex=*)
138     exec_prefix="$ac_optarg" ;;
139
140   -gas | --gas | --ga | --g)
141     # Obsolete; use --with-gas.
142     with_gas=yes ;;
143
144   -help | --help | --hel | --he)
145     # Omit some internal or obsolete options to make the list less imposing.
146     # This message is too long to be a string in the A/UX 3.1 sh.
147     cat << EOF
148 Usage: configure [options] [host]
149 Options: [defaults in brackets after descriptions]
150 Configuration:
151   --cache-file=FILE       cache test results in FILE
152   --help                  print this message
153   --no-create             do not create output files
154   --quiet, --silent       do not print \`checking...' messages
155   --version               print the version of autoconf that created configure
156 Directory and file names:
157   --prefix=PREFIX         install architecture-independent files in PREFIX
158                           [$ac_default_prefix]
159   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
160                           [same as prefix]
161   --bindir=DIR            user executables in DIR [EPREFIX/bin]
162   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
163   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
164   --datadir=DIR           read-only architecture-independent data in DIR
165                           [PREFIX/share]
166   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
167   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
168                           [PREFIX/com]
169   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
170   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
171   --includedir=DIR        C header files in DIR [PREFIX/include]
172   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
173   --infodir=DIR           info documentation in DIR [PREFIX/info]
174   --mandir=DIR            man documentation in DIR [PREFIX/man]
175   --srcdir=DIR            find the sources in DIR [configure dir or ..]
176   --program-prefix=PREFIX prepend PREFIX to installed program names
177   --program-suffix=SUFFIX append SUFFIX to installed program names
178   --program-transform-name=PROGRAM
179                           run sed PROGRAM on installed program names
180 EOF
181     cat << EOF
182 Host type:
183   --build=BUILD           configure for building on BUILD [BUILD=HOST]
184   --host=HOST             configure for HOST [guessed]
185   --target=TARGET         configure for TARGET [TARGET=HOST]
186 Features and packages:
187   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
188   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
189   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
190   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
191   --x-includes=DIR        X include files are in DIR
192   --x-libraries=DIR       X library files are in DIR
193 EOF
194     if test -n "$ac_help"; then
195       echo "--enable and --with options recognized:$ac_help"
196     fi
197     exit 0 ;;
198
199   -host | --host | --hos | --ho)
200     ac_prev=host ;;
201   -host=* | --host=* | --hos=* | --ho=*)
202     host="$ac_optarg" ;;
203
204   -includedir | --includedir | --includedi | --included | --include \
205   | --includ | --inclu | --incl | --inc)
206     ac_prev=includedir ;;
207   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208   | --includ=* | --inclu=* | --incl=* | --inc=*)
209     includedir="$ac_optarg" ;;
210
211   -infodir | --infodir | --infodi | --infod | --info | --inf)
212     ac_prev=infodir ;;
213   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214     infodir="$ac_optarg" ;;
215
216   -libdir | --libdir | --libdi | --libd)
217     ac_prev=libdir ;;
218   -libdir=* | --libdir=* | --libdi=* | --libd=*)
219     libdir="$ac_optarg" ;;
220
221   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222   | --libexe | --libex | --libe)
223     ac_prev=libexecdir ;;
224   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225   | --libexe=* | --libex=* | --libe=*)
226     libexecdir="$ac_optarg" ;;
227
228   -localstatedir | --localstatedir | --localstatedi | --localstated \
229   | --localstate | --localstat | --localsta | --localst \
230   | --locals | --local | --loca | --loc | --lo)
231     ac_prev=localstatedir ;;
232   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235     localstatedir="$ac_optarg" ;;
236
237   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
238     ac_prev=mandir ;;
239   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240     mandir="$ac_optarg" ;;
241
242   -nfp | --nfp | --nf)
243     # Obsolete; use --without-fp.
244     with_fp=no ;;
245
246   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
247   | --no-cr | --no-c)
248     no_create=yes ;;
249
250   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252     no_recursion=yes ;;
253
254   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256   | --oldin | --oldi | --old | --ol | --o)
257     ac_prev=oldincludedir ;;
258   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261     oldincludedir="$ac_optarg" ;;
262
263   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
264     ac_prev=prefix ;;
265   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266     prefix="$ac_optarg" ;;
267
268   -program-prefix | --program-prefix | --program-prefi | --program-pref \
269   | --program-pre | --program-pr | --program-p)
270     ac_prev=program_prefix ;;
271   -program-prefix=* | --program-prefix=* | --program-prefi=* \
272   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273     program_prefix="$ac_optarg" ;;
274
275   -program-suffix | --program-suffix | --program-suffi | --program-suff \
276   | --program-suf | --program-su | --program-s)
277     ac_prev=program_suffix ;;
278   -program-suffix=* | --program-suffix=* | --program-suffi=* \
279   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280     program_suffix="$ac_optarg" ;;
281
282   -program-transform-name | --program-transform-name \
283   | --program-transform-nam | --program-transform-na \
284   | --program-transform-n | --program-transform- \
285   | --program-transform | --program-transfor \
286   | --program-transfo | --program-transf \
287   | --program-trans | --program-tran \
288   | --progr-tra | --program-tr | --program-t)
289     ac_prev=program_transform_name ;;
290   -program-transform-name=* | --program-transform-name=* \
291   | --program-transform-nam=* | --program-transform-na=* \
292   | --program-transform-n=* | --program-transform-=* \
293   | --program-transform=* | --program-transfor=* \
294   | --program-transfo=* | --program-transf=* \
295   | --program-trans=* | --program-tran=* \
296   | --progr-tra=* | --program-tr=* | --program-t=*)
297     program_transform_name="$ac_optarg" ;;
298
299   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300   | -silent | --silent | --silen | --sile | --sil)
301     silent=yes ;;
302
303   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
304     ac_prev=sbindir ;;
305   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
306   | --sbi=* | --sb=*)
307     sbindir="$ac_optarg" ;;
308
309   -sharedstatedir | --sharedstatedir | --sharedstatedi \
310   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311   | --sharedst | --shareds | --shared | --share | --shar \
312   | --sha | --sh)
313     ac_prev=sharedstatedir ;;
314   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
317   | --sha=* | --sh=*)
318     sharedstatedir="$ac_optarg" ;;
319
320   -site | --site | --sit)
321     ac_prev=site ;;
322   -site=* | --site=* | --sit=*)
323     site="$ac_optarg" ;;
324
325   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
326     ac_prev=srcdir ;;
327   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328     srcdir="$ac_optarg" ;;
329
330   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331   | --syscon | --sysco | --sysc | --sys | --sy)
332     ac_prev=sysconfdir ;;
333   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335     sysconfdir="$ac_optarg" ;;
336
337   -target | --target | --targe | --targ | --tar | --ta | --t)
338     ac_prev=target ;;
339   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340     target="$ac_optarg" ;;
341
342   -v | -verbose | --verbose | --verbos | --verbo | --verb)
343     verbose=yes ;;
344
345   -version | --version | --versio | --versi | --vers)
346     echo "configure generated by autoconf version 2.13"
347     exit 0 ;;
348
349   -with-* | --with-*)
350     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351     # Reject names that are not valid shell variable names.
352     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354     fi
355     ac_package=`echo $ac_package| sed 's/-/_/g'`
356     case "$ac_option" in
357       *=*) ;;
358       *) ac_optarg=yes ;;
359     esac
360     eval "with_${ac_package}='$ac_optarg'" ;;
361
362   -without-* | --without-*)
363     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364     # Reject names that are not valid shell variable names.
365     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367     fi
368     ac_package=`echo $ac_package| sed 's/-/_/g'`
369     eval "with_${ac_package}=no" ;;
370
371   --x)
372     # Obsolete; use --with-x.
373     with_x=yes ;;
374
375   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376   | --x-incl | --x-inc | --x-in | --x-i)
377     ac_prev=x_includes ;;
378   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380     x_includes="$ac_optarg" ;;
381
382   -x-libraries | --x-libraries | --x-librarie | --x-librari \
383   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384     ac_prev=x_libraries ;;
385   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387     x_libraries="$ac_optarg" ;;
388
389   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
390     ;;
391
392   *)
393     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394       echo "configure: warning: $ac_option: invalid host type" 1>&2
395     fi
396     if test "x$nonopt" != xNONE; then
397       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
398     fi
399     nonopt="$ac_option"
400     ;;
401
402   esac
403 done
404
405 if test -n "$ac_prev"; then
406   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 fi
408
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
410
411 # File descriptor usage:
412 # 0 standard input
413 # 1 file creation
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
420   exec 6>/dev/null
421 else
422   exec 6>&1
423 fi
424 exec 5>./config.log
425
426 echo "\
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
429 " 1>&5
430
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
433 ac_configure_args=
434 for ac_arg
435 do
436   case "$ac_arg" in
437   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438   | --no-cr | --no-c) ;;
439   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444   esac
445 done
446
447 # NLS nuisances.
448 # Only set these to C if already set.  These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
456
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
461
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=move-if-change
465
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468   ac_srcdir_defaulted=yes
469   # Try the directory containing this script, then its parent.
470   ac_prog=$0
471   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473   srcdir=$ac_confdir
474   if test ! -r $srcdir/$ac_unique_file; then
475     srcdir=..
476   fi
477 else
478   ac_srcdir_defaulted=no
479 fi
480 if test ! -r $srcdir/$ac_unique_file; then
481   if test "$ac_srcdir_defaulted" = yes; then
482     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483   else
484     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485   fi
486 fi
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491   if test "x$prefix" != xNONE; then
492     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493   else
494     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495   fi
496 fi
497 for ac_site_file in $CONFIG_SITE; do
498   if test -r "$ac_site_file"; then
499     echo "loading site script $ac_site_file"
500     . "$ac_site_file"
501   fi
502 done
503
504 if test -r "$cache_file"; then
505   echo "loading cache $cache_file"
506   . $cache_file
507 else
508   echo "creating cache $cache_file"
509   > $cache_file
510 fi
511
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
518
519 ac_exeext=
520 ac_objext=o
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524     ac_n= ac_c='
525 ' ac_t='        '
526   else
527     ac_n=-n ac_c= ac_t=
528   fi
529 else
530   ac_n= ac_c='\c' ac_t=
531 fi
532
533
534
535 ac_aux_dir=
536 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
537   if test -f $ac_dir/install-sh; then
538     ac_aux_dir=$ac_dir
539     ac_install_sh="$ac_aux_dir/install-sh -c"
540     break
541   elif test -f $ac_dir/install.sh; then
542     ac_aux_dir=$ac_dir
543     ac_install_sh="$ac_aux_dir/install.sh -c"
544     break
545   fi
546 done
547 if test -z "$ac_aux_dir"; then
548   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
549 fi
550 ac_config_guess=$ac_aux_dir/config.guess
551 ac_config_sub=$ac_aux_dir/config.sub
552 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
553
554
555 # Do some error checking and defaulting for the host and target type.
556 # The inputs are:
557 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
558 #
559 # The rules are:
560 # 1. You are not allowed to specify --host, --target, and nonopt at the
561 #    same time.
562 # 2. Host defaults to nonopt.
563 # 3. If nonopt is not specified, then host defaults to the current host,
564 #    as determined by config.guess.
565 # 4. Target and build default to nonopt.
566 # 5. If nonopt is not specified, then target and build default to host.
567
568 # The aliases save the names the user supplied, while $host etc.
569 # will get canonicalized.
570 case $host---$target---$nonopt in
571 NONE---*---* | *---NONE---* | *---*---NONE) ;;
572 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
573 esac
574
575
576 # Make sure we can run config.sub.
577 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
578 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
579 fi
580
581 echo $ac_n "checking host system type""... $ac_c" 1>&6
582 echo "configure:583: checking host system type" >&5
583
584 host_alias=$host
585 case "$host_alias" in
586 NONE)
587   case $nonopt in
588   NONE)
589     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
590     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
591     fi ;;
592   *) host_alias=$nonopt ;;
593   esac ;;
594 esac
595
596 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
597 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
598 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
599 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
600 echo "$ac_t""$host" 1>&6
601
602 echo $ac_n "checking target system type""... $ac_c" 1>&6
603 echo "configure:604: checking target system type" >&5
604
605 target_alias=$target
606 case "$target_alias" in
607 NONE)
608   case $nonopt in
609   NONE) target_alias=$host_alias ;;
610   *) target_alias=$nonopt ;;
611   esac ;;
612 esac
613
614 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
615 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
616 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
617 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
618 echo "$ac_t""$target" 1>&6
619
620 echo $ac_n "checking build system type""... $ac_c" 1>&6
621 echo "configure:622: checking build system type" >&5
622
623 build_alias=$build
624 case "$build_alias" in
625 NONE)
626   case $nonopt in
627   NONE) build_alias=$host_alias ;;
628   *) build_alias=$nonopt ;;
629   esac ;;
630 esac
631
632 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
633 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
634 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
635 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
636 echo "$ac_t""$build" 1>&6
637
638 test "$host_alias" != "$target_alias" &&
639   test "$program_prefix$program_suffix$program_transform_name" = \
640     NONENONEs,x,x, &&
641   program_prefix=${target_alias}-
642
643 if test "$program_transform_name" = s,x,x,; then
644   program_transform_name=
645 else
646   # Double any \ or $.  echo might interpret backslashes.
647   cat <<\EOF_SED > conftestsed
648 s,\\,\\\\,g; s,\$,$$,g
649 EOF_SED
650   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
651   rm -f conftestsed
652 fi
653 test "$program_prefix" != NONE &&
654   program_transform_name="s,^,${program_prefix},; $program_transform_name"
655 # Use a double $ so make ignores it.
656 test "$program_suffix" != NONE &&
657   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
658
659 # sed with no file args requires a program.
660 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
661
662
663 # Get 'install' or 'install-sh' and its variants.
664 # Find a good install program.  We prefer a C program (faster),
665 # so one script is as good as another.  But avoid the broken or
666 # incompatible versions:
667 # SysV /etc/install, /usr/sbin/install
668 # SunOS /usr/etc/install
669 # IRIX /sbin/install
670 # AIX /bin/install
671 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
672 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
673 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
674 # ./install, which can be erroneously created by make from ./install.sh.
675 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
676 echo "configure:677: checking for a BSD compatible install" >&5
677 if test -z "$INSTALL"; then
678 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
679   echo $ac_n "(cached) $ac_c" 1>&6
680 else
681     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
682   for ac_dir in $PATH; do
683     # Account for people who put trailing slashes in PATH elements.
684     case "$ac_dir/" in
685     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
686     *)
687       # OSF1 and SCO ODT 3.0 have their own names for install.
688       # Don't use installbsd from OSF since it installs stuff as root
689       # by default.
690       for ac_prog in ginstall scoinst install; do
691         if test -f $ac_dir/$ac_prog; then
692           if test $ac_prog = install &&
693             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
694             # AIX install.  It has an incompatible calling convention.
695             :
696           else
697             ac_cv_path_install="$ac_dir/$ac_prog -c"
698             break 2
699           fi
700         fi
701       done
702       ;;
703     esac
704   done
705   IFS="$ac_save_IFS"
706
707 fi
708   if test "${ac_cv_path_install+set}" = set; then
709     INSTALL="$ac_cv_path_install"
710   else
711     # As a last resort, use the slow shell script.  We don't cache a
712     # path for INSTALL within a source directory, because that will
713     # break other packages using the cache if that directory is
714     # removed, or if the path is relative.
715     INSTALL="$ac_install_sh"
716   fi
717 fi
718 echo "$ac_t""$INSTALL" 1>&6
719
720 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
721 # It thinks the first close brace ends the variable substitution.
722 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
723
724 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
725
726 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
727
728
729 # Autoconf M4 include file defining utility macros for complex Canadian
730 # cross builds.
731
732  
733  
734  
735  
736
737 ####
738 # _NCN_TOOL_PREFIXES:  Some stuff that oughtta be done in AC_CANONICAL_SYSTEM 
739 # or AC_INIT.
740 # These demand that AC_CANONICAL_SYSTEM be called beforehand.
741  
742 ####
743 # NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
744 # Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
745 # Code is pretty much lifted from autoconf2.53.
746
747  
748
749 ####
750 # NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
751 # Like AC_CHECK_TOOL, but requires the prefix if build!=host.
752
753  
754
755 ####
756 # NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
757 # Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
758
759  
760 ###
761 # AC_PROG_CPP_WERROR
762 # Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which
763 # triggers warnings from the preprocessor.  Will be in autoconf 2.58.
764 # For now, using this also overrides header checks to use only the
765 # preprocessor (matches 2.13 behavior; matching 2.58's behavior is a
766 # bit harder from here).
767 # Eventually autoconf will default to checking headers with the compiler
768 # instead, and we'll have to do this differently.
769
770 # AC_PROG_CPP_WERROR
771
772
773 ### we might need to use some other shell than /bin/sh for running subshells
774 ### If we are on Windows, search for the shell.  This will permit people
775 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
776 ### without also having to set CONFIG_SHELL.  This code will work when
777 ### using bash, which sets OSTYPE.
778 case "${OSTYPE}" in
779 *win32*)
780   if test x${CONFIG_SHELL} = x ; then
781     if test ! -f /bin/sh ; then
782       if test x${SHELL} != x && test -f ${SHELL} ; then
783         CONFIG_SHELL=${SHELL}
784         export CONFIG_SHELL
785       else
786         for prog in sh sh.exe bash bash.exe; do
787           IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
788           for dir in $PATH; do
789             test -z "$dir" && dir=.
790             if test -f $dir/$prog; then
791               CONFIG_SHELL=$dir/$prog
792               export CONFIG_SHELL
793               break
794             fi
795           done
796           IFS="$save_ifs"
797           test -n "${CONFIG_SHELL}" && break
798         done
799       fi
800     fi
801   fi
802   ;;
803 esac
804
805 config_shell=${CONFIG_SHELL-/bin/sh}
806
807 progname=$0
808 # if PWD already has a value, it is probably wrong.
809 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
810
811 # Export original configure arguments for use by sub-configures.  These
812 # will be expanded by make, so quote '$'.
813 tmp="$progname $@"
814 sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
815 $tmp
816 EOF_SED
817 TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
818 rm -f conftestsed.out
819
820
821 moveifchange=${srcdir}/move-if-change
822
823 # Set srcdir to "." if that's what it is.
824 # This is important for multilib support.
825 pwd=`${PWDCMD-pwd}`
826 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
827 if test "${pwd}" = "${srcpwd}" ; then
828   srcdir=.
829 fi
830
831 topsrcdir=$srcpwd
832
833 extra_host_args=
834 # Define the trigger file to make sure configure will re-run whenever
835 # the gcc version number changes.
836 if test "${with_gcc_version_trigger+set}" = set ; then
837   gcc_version_trigger="$with_gcc_version_trigger"
838   gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
839 else
840   # If gcc's sources are available, define the trigger file.
841   if test -f ${topsrcdir}/gcc/version.c ; then
842     gcc_version_trigger=${topsrcdir}/gcc/version.c
843     gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
844     case "$ac_configure_args" in
845       *--with-gcc-version-trigger=$gcc_version_trigger* )
846         ;;
847       * )
848         # Add to all subconfigure arguments: build, host, and target.
849         ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
850         ;;
851     esac
852   fi
853 fi
854
855 ### To add a new directory to the tree, first choose whether it is a target
856 ### or a host dependent tool.  Then put it into the appropriate list
857 ### (library or tools, host or target), doing a dependency sort.
858
859 # Subdirs will be configured in the order listed in build_configdirs, 
860 # configdirs, or target_configdirs; see the serialization section below.
861
862 # Dependency sorting is only needed when *configuration* must be done in 
863 # a particular order.  In all cases a dependency should be specified in 
864 # the Makefile, whether or not it's implicitly specified here.
865
866 # Double entries in build_configdirs, configdirs, or target_configdirs may
867 # cause circular dependencies and break everything horribly.
868
869 # these libraries are used by various programs built for the host environment
870 #
871 host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
872
873 # these tools are built for the host environment
874 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
875 # know that we are building the simulator.
876 # binutils, gas and ld appear in that order because it makes sense to run
877 # "make check" in that particular order.
878 host_tools="texinfo byacc flex bison binutils gas ld 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"
879
880 # libgcj represents the runtime libraries only used by gcj.
881 libgcj="target-libffi \
882         target-boehm-gc \
883         target-zlib \
884         target-qthreads \
885         target-libjava"
886
887 # these libraries are built for the target environment, and are built after
888 # the host libraries and the host tools (which may be a cross compiler)
889 #
890 target_libraries="target-libiberty \
891                 target-libgloss \
892                 target-newlib \
893                 target-libstdc++-v3 \
894                 target-libf2c \
895                 ${libgcj} \
896                 target-libobjc \
897                 target-libada"
898
899 # these tools are built using the target libraries, and are intended to
900 # run only in the target environment
901 #
902 # note: any program that *uses* libraries that are in the "target_libraries"
903 # list belongs in this list.  those programs are also very likely
904 # candidates for the "native_only" list which follows
905 #
906 target_tools="target-examples target-groff target-gperf target-rda"
907
908 ################################################################################
909
910 ## All tools belong in one of the four categories, and are assigned above
911 ## We assign ${configdirs} this way to remove all embedded newlines.  This
912 ## is important because configure will choke if they ever get through.
913 ## ${configdirs} is directories we build using the host tools.
914 ## ${target_configdirs} is directories we build using the target tools.
915 #
916 configdirs=`echo ${host_libs} ${host_tools}`
917 target_configdirs=`echo ${target_libraries} ${target_tools}`
918
919 # Only make build modules if build != host.
920 # This should be done more generally, but at the moment it doesn't matter.
921 if test ${host_alias} != ${build_alias} ; then
922   # This is the only build module.
923   build_modules=libiberty
924 else
925   build_modules=
926 fi
927
928
929 ################################################################################
930
931 srcname="gnu development package"
932
933 # This gets set non-empty for some net releases of packages.
934 appdirs=""
935
936 # Define is_cross_compiler to save on calls to 'test'.
937 is_cross_compiler=
938 if test x"${host}" = x"${target}" ; then
939   is_cross_compiler=no
940 else
941   is_cross_compiler=yes
942 fi      
943
944 # Find the build and target subdir names.
945  case ${build_alias} in
946   "") build_noncanonical=${build} ;;
947   *) build_noncanonical=${build_alias} ;;
948 esac
949
950  case ${host_alias} in
951   "") host_noncanonical=${build_noncanonical} ;;
952   *) host_noncanonical=${host_alias} ;;
953 esac
954
955  case ${target_alias} in
956   "") target_noncanonical=${host_noncanonical} ;;
957   *) target_noncanonical=${target_alias} ;;
958 esac
959
960   # Prefix 'build-' so this never conflicts with target_subdir.
961 build_subdir="build-${build_noncanonical}"
962 # Not really a subdirectory, but here for completeness.
963 host_subdir=.
964 # No prefix.
965 target_subdir=${target_noncanonical}
966    
967
968 # Skipdirs are removed silently.
969 skipdirs=
970 # Noconfigdirs are removed loudly.
971 noconfigdirs=""
972
973 use_gnu_ld=
974 # Make sure we don't let GNU ld be added if we didn't want it.
975 if test x$with_gnu_ld = xno ; then
976   use_gnu_ld=no
977   noconfigdirs="$noconfigdirs ld"
978 fi
979
980 use_gnu_as=
981 # Make sure we don't let GNU as be added if we didn't want it.
982 if test x$with_gnu_as = xno ; then
983   use_gnu_as=no
984   noconfigdirs="$noconfigdirs gas"
985 fi
986
987 # some tools are so dependent upon X11 that if we're not building with X, 
988 # it's not even worth trying to configure, much less build, that tool.
989
990 case ${with_x} in
991   yes | "") ;; # the default value for this tree is that X11 is available
992   no)
993     skipdirs="${skipdirs} tk tix itcl libgui"
994     # We won't be able to build gdbtk without X.
995     enable_gdbtk=no 
996     ;;
997   *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
998 esac
999
1000 # Some tools are only suitable for building in a "native" situation.
1001 # Remove these if host!=target.  
1002 native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
1003
1004 # Similarly, some are only suitable for cross toolchains.
1005 # Remove these if host=target.
1006 cross_only="target-libgloss target-newlib target-opcodes"
1007
1008 case $is_cross_compiler in
1009   no) skipdirs="${skipdirs} ${cross_only}" ;;
1010   yes) skipdirs="${skipdirs} ${native_only}" ;;
1011 esac
1012
1013 # If both --with-headers and --with-libs are specified, default to
1014 # --without-newlib.
1015 if test x"${with_headers}" != x && test x"${with_headers} != xno \
1016    && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
1017   if test x"${with_newlib}" = x ; then
1018     with_newlib=no
1019   fi
1020 fi
1021
1022 # Recognize --with-newlib/--without-newlib.
1023 case ${with_newlib} in
1024   no) skipdirs="${skipdirs} target-newlib" ;;
1025   yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1026 esac
1027
1028 # Configure extra directories which are host specific
1029
1030 case "${host}" in
1031   *-cygwin*)
1032     configdirs="$configdirs libtermcap" ;;
1033 esac
1034
1035 # Remove more programs from consideration, based on the host or 
1036 # target this usually means that a port of the program doesn't
1037 # exist yet.
1038
1039 case "${host}" in
1040   hppa*64*-*-*)
1041     noconfigdirs="$noconfigdirs byacc"
1042     ;;
1043   i[3456789]86-*-vsta)
1044     noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
1045     ;;
1046   i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
1047     noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
1048     ;;
1049   i[3456789]86-*-mingw32*)
1050     # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
1051     noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
1052     ;;
1053   i[3456789]86-*-beos*)
1054     noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
1055     ;;
1056   *-*-cygwin*)
1057     noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
1058     ;;
1059   *-*-netbsd*)
1060     noconfigdirs="$noconfigdirs rcs"
1061     ;;
1062   ppc*-*-pe)
1063     noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
1064     ;;
1065   powerpc-*-beos*)
1066     noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
1067     ;;
1068   *-*-darwin*)
1069     noconfigdirs="$noconfigdirs tk itcl tix libgui"
1070     ;;
1071 esac
1072
1073 # Check whether --enable-libada or --disable-libada was given.
1074 if test "${enable_libada+set}" = set; then
1075   enableval="$enable_libada"
1076   ENABLE_LIBADA=$enableval
1077 else
1078   ENABLE_LIBADA=yes
1079 fi
1080
1081 if test "${ENABLE_LIBADA}" != "yes" ; then
1082   noconfigdirs="$noconfigdirs target-libada"
1083 fi
1084
1085 # Save it here so that, even in case of --enable-libgcj, if the Java
1086 # front-end isn't enabled, we still get libgcj disabled.
1087 libgcj_saved=$libgcj
1088 case $enable_libgcj in
1089 yes)
1090   # If we reset it here, it won't get added to noconfigdirs in the
1091   # target-specific build rules, so it will be forcibly enabled
1092   # (unless the Java language itself isn't enabled).
1093   libgcj=
1094   ;;
1095 no)
1096   # Make sure we get it printed in the list of not supported target libs.
1097   noconfigdirs="$noconfigdirs ${libgcj}"
1098   ;;
1099 esac
1100
1101 case "${target}" in
1102   *-*-chorusos)
1103     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1104     ;;
1105   powerpc-*-darwin*)
1106     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1107     noconfigdirs="$noconfigdirs target-libobjc"
1108     ;;
1109   *-*-darwin*)
1110     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1111     noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
1112     ;;
1113   *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1114     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1115     ;;
1116   *-*-kaos*)
1117     # Remove unsupported stuff on all kaOS configurations.
1118     skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
1119     skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1120     skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1121     noconfigdirs="$noconfigdirs target-libgloss"
1122     ;;
1123   *-*-netbsd*)
1124     # Skip some stuff on all NetBSD configurations.
1125     noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1126
1127     # Skip some stuff that's unsupported on some NetBSD configurations.
1128     case "${target}" in
1129       i*86-*-netbsdelf*) ;;
1130       arm*-*-netbsdelf*) ;;
1131       *)
1132         noconfigdirs="$noconfigdirs ${libgcj}"
1133         ;;
1134     esac
1135     ;;
1136   *-*-netware)
1137     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
1138     ;;
1139   *-*-rtems*)
1140     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1141     case ${target} in
1142         h8300*-*-* | h8500-*-*)
1143           noconfigdirs="$noconfigdirs target-libf2c"
1144           ;;
1145         *) ;;
1146     esac
1147     ;;
1148   *-*-uclinux*)
1149     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1150     ;;
1151   *-*-vxworks*)
1152     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
1153     ;;
1154   alpha*-dec-osf*)
1155     # ld works, but does not support shared libraries.
1156     # newlib is not 64 bit ready.  I'm not sure about fileutils.
1157     # gas doesn't generate exception information.
1158     noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1159     ;;
1160   alpha*-*-*vms*)
1161     noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
1162     ;;
1163   alpha*-*-linux*)
1164     # newlib is not 64 bit ready
1165     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1166     ;;
1167   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
1168     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1169     ;;
1170   alpha*-*-*)
1171     # newlib is not 64 bit ready
1172     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1173     ;;
1174   am33_2.0-*-linux*)
1175     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1176     ;;
1177   sh-*-linux*)
1178     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1179     ;;    
1180   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1181     noconfigdirs="$noconfigdirs ${libgcj}"
1182     noconfigdirs="$noconfigdirs target-examples"
1183     noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
1184     noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
1185     noconfigdirs="$noconfigdirs expect dejagnu"
1186     # the C++ libraries don't build on top of CE's C libraries
1187     noconfigdirs="$noconfigdirs target-libstdc++-v3"
1188     noconfigdirs="$noconfigdirs target-newlib"
1189     case "${host}" in
1190       *-*-cygwin*) ;; # keep gdb and readline
1191       *) noconfigdirs="$noconfigdirs gdb readline"
1192          ;;
1193     esac
1194     ;;
1195   arc-*-*)
1196     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1197     ;;
1198   arm-*-coff | strongarm-*-coff | xscale-*-coff)
1199     noconfigdirs="$noconfigdirs ${libgcj}"
1200     ;;
1201   arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
1202     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1203     ;;
1204   arm-*-pe*)
1205     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1206     ;;
1207   arm-*-oabi*)
1208     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1209     ;;
1210   thumb-*-coff)
1211     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1212     ;;
1213   thumb-*-elf)
1214     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1215     ;;
1216   thumb-*-oabi)
1217     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1218     ;;
1219   thumb-*-pe)
1220     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1221     ;;
1222   arm-*-riscix*)
1223     noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1224     ;;
1225   avr-*-*)
1226     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1227     ;;
1228   c4x-*-* | tic4x-*-*)
1229     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1230     ;;
1231   c54x*-*-* | tic54x-*-*)
1232     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
1233     ;;
1234   cris-*-*)
1235     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1236     ;;
1237   d10v-*-*)
1238     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1239     ;;
1240   d30v-*-*)
1241     noconfigdirs="$noconfigdirs ${libgcj} gdb"
1242     ;;
1243   fr30-*-elf*)
1244     noconfigdirs="$noconfigdirs ${libgcj} gdb"
1245     ;;
1246   frv-*-*)
1247     noconfigdirs="$noconfigdirs ${libgcj}"
1248     ;;
1249   h8300*-*-*)
1250     noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
1251     ;;
1252   h8500-*-*)
1253     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
1254     ;;
1255   hppa*64*-*-linux* | parisc*64*-*-linux*)
1256     # In this case, it's because the hppa64-linux target is for
1257     # the kernel only at this point and has no libc, and thus no
1258     # headers, crt*.o, etc., all of which are needed by these.
1259     noconfigdirs="$noconfigdirs target-zlib"
1260     ;;
1261   hppa*-*-*elf* | \
1262   parisc*-*-linux* | hppa*-*-linux* | \
1263   hppa*-*-lites* | \
1264   hppa*-*-openbsd* | \
1265   hppa*64*-*-*)
1266     noconfigdirs="$noconfigdirs ${libgcj}"
1267     # Do configure ld/binutils/gas for this case.
1268     ;;
1269   hppa*-*-*)
1270     # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1271     # build on HP-UX 10.20.
1272     noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1273     ;;
1274   i960-*-*)
1275     noconfigdirs="$noconfigdirs ${libgcj} gdb"
1276     ;;
1277   ia64*-*-elf*)
1278     # No gdb support yet.
1279     noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
1280     ;;
1281   ia64*-**-hpux*)
1282     # No gdb or ld support yet.
1283     noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
1284     ;;
1285   i[3456789]86-*-coff | i[3456789]86-*-elf)
1286     noconfigdirs="$noconfigdirs ${libgcj}"
1287     ;;
1288   i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
1289     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1290     ;;
1291   i[3456789]86-*-linux*)
1292     # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1293     # not build java stuff by default.
1294     case "${target}" in
1295       *-*-*libc1*)
1296         noconfigdirs="$noconfigdirs ${libgcj}";;
1297     esac
1298
1299     # This section makes it possible to build newlib natively on linux.
1300     # If we are using a cross compiler then don't configure newlib.
1301     if test x${is_cross_compiler} != xno ; then
1302       noconfigdirs="$noconfigdirs target-newlib"
1303     fi
1304     noconfigdirs="$noconfigdirs target-libgloss"
1305     # If we are not using a cross compiler, do configure newlib.
1306     # Note however, that newlib will only be configured in this situation
1307     # if the --with-newlib option has been given, because otherwise
1308     # 'target-newlib' will appear in skipdirs.
1309     ;;
1310   i[3456789]86-*-mingw32*)
1311     target_configdirs="$target_configdirs target-mingw"
1312     noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
1313
1314     # Can't build gdb for mingw32 if not native.
1315     case "${host}" in
1316       i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
1317       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
1318          ;;
1319     esac
1320     ;;    
1321   *-*-cygwin*)
1322     target_configdirs="$target_configdirs target-libtermcap target-winsup"
1323     noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
1324     # always build newlib.
1325     skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1326
1327     # Can't build gdb for Cygwin if not native.
1328     case "${host}" in
1329       *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
1330       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
1331          ;;
1332     esac
1333     ;;    
1334   i[3456789]86-*-pe)
1335     noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1336     ;;
1337   i[3456789]86-*-sco3.2v5*)
1338     # The linker does not yet know about weak symbols in COFF,
1339     # and is not configured to handle mixed ELF and COFF.
1340     noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1341     ;;
1342   i[3456789]86-*-sco*)
1343     noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1344     ;;
1345   i[3456789]86-*-solaris2*)
1346     noconfigdirs="$noconfigdirs target-libgloss"
1347     ;;
1348   i[3456789]86-*-sysv4*)
1349     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1350     ;;
1351   i[3456789]86-*-beos*)
1352     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1353     ;;
1354   m32r-*-*)
1355     noconfigdirs="$noconfigdirs ${libgcj}"
1356     ;;
1357   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
1358     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1359     ;;
1360   m68k-*-elf*)
1361     noconfigdirs="$noconfigdirs ${libgcj}"
1362     ;;
1363   m68k-*-coff*)
1364     noconfigdirs="$noconfigdirs ${libgcj}"
1365     ;;
1366   mcore-*-pe*)
1367   # The EPOC C++ environment does not support exceptions or rtti,
1368   # and so building libstdc++-v3 tends not to always work.
1369     noconfigdirs="$noconfigdirs target-libstdc++-v3"
1370     ;;
1371   mmix-*-*)
1372     noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
1373     ;;
1374   mn10200-*-*)
1375     noconfigdirs="$noconfigdirs ${libgcj}"
1376     ;;
1377   mn10300-*-*)
1378     noconfigdirs="$noconfigdirs ${libgcj}"
1379     ;;
1380   powerpc-*-aix*)
1381     # copied from rs6000-*-* entry
1382     noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
1383     ;;
1384   powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1385     target_configdirs="$target_configdirs target-winsup"
1386     noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
1387     # always build newlib.
1388     skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1389     ;;
1390     # This is temporary until we can link against shared libraries
1391   powerpcle-*-solaris*)
1392     noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
1393     ;;
1394   powerpc-*-beos*)
1395     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1396     ;;
1397   powerpc-*-eabi)
1398     noconfigdirs="$noconfigdirs ${libgcj}"
1399     ;;
1400   rs6000-*-lynxos*)
1401     noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1402     ;;
1403   rs6000-*-aix*)
1404     noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
1405     ;;
1406   rs6000-*-*)
1407     noconfigdirs="$noconfigdirs gprof ${libgcj}"
1408     ;;
1409   m68k-apollo-*)
1410     noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1411     ;;
1412   mips*-*-irix5*)
1413     # The GNU linker does not support shared libraries.
1414     noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
1415     ;;
1416   mips*-*-irix6*)
1417     # Linking libjava exceeds command-line length limits on at least
1418     # IRIX 6.2, but not on IRIX 6.5.
1419     # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1420     # <oldham@codesourcery.com>
1421     noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1422     ;;
1423   mips*-dec-bsd*)
1424     noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1425     ;;
1426   mips*-*-bsd*)
1427     noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1428     ;;
1429   mipstx39-*-*)
1430     noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
1431     ;;
1432   mips*-*-linux*)
1433     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1434     ;;
1435   mips*-*-*)
1436     noconfigdirs="$noconfigdirs gprof ${libgcj}"
1437     ;;
1438   romp-*-*)
1439     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1440     ;;
1441   sh-*-*)
1442     case "${host}" in
1443       i[3456789]86-*-vsta) ;; # don't add gprof back in
1444       i[3456789]86-*-go32*) ;; # don't add gprof back in
1445       i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
1446       *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1447     esac
1448     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1449     ;;
1450   sh64-*-*)
1451     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1452     ;;
1453   sparc-*-elf*)
1454     noconfigdirs="$noconfigdirs ${libgcj}"
1455     ;;
1456   sparc64-*-elf*)
1457     noconfigdirs="$noconfigdirs ${libgcj}"
1458     ;;
1459   sparclite-*-*)
1460     noconfigdirs="$noconfigdirs ${libgcj}"
1461     ;;
1462   sparc-*-sunos4*)
1463     noconfigdirs="$noconfigdirs ${libgcj}"
1464     if test x${is_cross_compiler} != xno ; then
1465            noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1466     else
1467            use_gnu_ld=no
1468     fi
1469     ;;
1470   sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1471     ;;
1472   v810-*-*)
1473     noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
1474     ;;
1475   v850-*-*)
1476     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1477     ;;
1478   v850e-*-*)
1479     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1480     ;;
1481   v850ea-*-*)
1482     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1483     ;;
1484   vax-*-vms)
1485     noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1486     ;;
1487   vax-*-*)
1488     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1489     ;;
1490   xtensa-*-*)
1491     noconfigdirs="$noconfigdirs ${libgcj}"
1492     ;;
1493   ip2k-*-*)
1494     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1495     ;;
1496   *-*-linux*)
1497     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1498     ;;
1499   *-*-lynxos*)
1500     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1501     ;; 
1502   *-*-*)
1503     noconfigdirs="$noconfigdirs ${libgcj}"
1504     ;;
1505 esac
1506
1507 # If we aren't building newlib, then don't build libgloss, since libgloss
1508 # depends upon some newlib header files.
1509 case "${noconfigdirs}" in
1510   *target-libgloss*) ;;
1511   *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1512 esac
1513
1514 # Figure out what language subdirectories are present.
1515 # Look if the user specified --enable-languages="..."; if not, use
1516 # the environment variable $LANGUAGES if defined. $LANGUAGES might
1517 # go away some day.
1518 # NB:  embedded tabs in this IF block -- do not untabify
1519 if test x"${enable_languages+set}" != xset; then
1520   if test x"${LANGUAGES+set}" = xset; then
1521     enable_languages="${LANGUAGES}"
1522       echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
1523   else
1524     enable_languages=all
1525   fi
1526 else
1527   if test x"${enable_languages}" = x ||
1528      test x"${enable_languages}" = xyes;
1529      then
1530     echo configure.in: --enable-languages needs at least one language argument 1>&2
1531     exit 1
1532   fi
1533 fi
1534 enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/,$//'`
1535
1536 # First scan to see if an enabled language requires some other language.
1537 # We assume that a given config-lang.in will list all the language
1538 # front ends it requires, even if some are required indirectly.
1539 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
1540   case ${lang_frag} in
1541     ..) ;;
1542     # The odd quoting in the next line works around
1543     # an apparent bug in bash 1.12 on linux.
1544     ${srcdir}/gcc/[*]/config-lang.in) ;;
1545     *)
1546       # From the config-lang.in, get $language, $lang_requires
1547       language=
1548       lang_requires=
1549       . ${lang_frag}
1550       for other in ${lang_requires} ; do
1551         case ,${enable_languages}, in
1552           *,$other,*) ;;
1553           *,all,*) ;;
1554           *,$language,*)
1555             echo " \`$other' language required by \`$language'; enabling" 1>&2
1556             enable_languages="${enable_languages},${other}"
1557             ;;
1558         esac
1559       done
1560       ;;
1561   esac
1562 done
1563
1564 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
1565   case ${lang_frag} in
1566     ..) ;;
1567     # The odd quoting in the next line works around
1568     # an apparent bug in bash 1.12 on linux.
1569     ${srcdir}/gcc/[*]/config-lang.in) ;;
1570     *)
1571       # From the config-lang.in, get $language, $target_libs, 
1572       # $lang_dirs, and $build_by_default
1573       language=
1574       target_libs=
1575       lang_dirs=
1576       build_by_default=
1577       . ${lang_frag}
1578       if test "x$language" = x ; then
1579         echo "${lang_frag} doesn't set \$language." 1>&2
1580         exit 1
1581       fi
1582       case ,${enable_languages}, in
1583         *,${language},*)
1584           # Language was explicitly selected; include it.
1585           add_this_lang=yes
1586           ;;
1587         *,all,*)
1588           # 'all' was selected; include 'default' languages.
1589           case ${build_by_default} in
1590             no) add_this_lang=no ;;
1591             *) add_this_lang=yes ;;
1592           esac 
1593           ;;
1594         *) add_this_lang=no ;;
1595       esac
1596       case ${add_this_lang} in
1597         no)
1598           # Remove language-dependent dirs.
1599           eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
1600           ;;
1601       esac
1602       ;;
1603   esac
1604 done
1605
1606 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
1607 # $target_configdirs.
1608 # If we have the source for $noconfigdirs entries, add them to $notsupp.
1609
1610 notsupp=""
1611 for dir in . $skipdirs $noconfigdirs ; do
1612   dirname=`echo $dir | sed -e s/target-//g`
1613   if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1614     configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
1615     if test -r $srcdir/$dirname/configure ; then
1616       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1617         true
1618       else
1619         notsupp="$notsupp $dir"
1620       fi
1621     fi
1622   fi
1623   if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1624     target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
1625     if test -r $srcdir/$dirname/configure ; then
1626       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1627         true
1628       else
1629         notsupp="$notsupp $dir"
1630       fi
1631     fi
1632   fi
1633 done
1634
1635 # Sometimes the tools are distributed with libiberty but with no other
1636 # libraries.  In that case, we don't want to build target-libiberty.
1637 if test -n "${target_configdirs}" ; then
1638   others=
1639   for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
1640     if test "$i" != "libiberty" ; then
1641       if test -r $srcdir/$i/configure ; then
1642         others=yes;
1643         break;
1644       fi
1645     fi
1646   done
1647   if test -z "${others}" ; then
1648     target_configdirs=
1649   fi
1650 fi
1651
1652 # Quietly strip out all directories which aren't configurable in this tree.
1653 # This relies on all configurable subdirectories being autoconfiscated, which
1654 # is now the case.
1655 configdirs_all="$configdirs"
1656 configdirs=
1657 for i in ${configdirs_all} ; do
1658   if test -f ${srcdir}/$i/configure ; then
1659     configdirs="${configdirs} $i"
1660   fi
1661 done
1662 target_configdirs_all="$target_configdirs"
1663 target_configdirs=
1664 for i in ${target_configdirs_all} ; do
1665   j=`echo $i | sed -e s/target-//g` 
1666   if test -f ${srcdir}/$j/configure ; then
1667     target_configdirs="${target_configdirs} $i"
1668   fi
1669 done
1670
1671 # Produce a warning message for the subdirs we can't configure.
1672 # This isn't especially interesting in the Cygnus tree, but in the individual
1673 # FSF releases, it's important to let people know when their machine isn't
1674 # supported by the one or two programs in a package.
1675
1676 if test -n "${notsupp}" && test -z "${norecursion}" ; then
1677   # If $appdirs is non-empty, at least one of those directories must still
1678   # be configured, or we error out.  (E.g., if the gas release supports a
1679   # specified target in some subdirs but not the gas subdir, we shouldn't
1680   # pretend that all is well.)
1681   if test -n "$appdirs" ; then
1682     for dir in $appdirs ; do
1683       if test -r $dir/Makefile.in ; then
1684         if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1685           appdirs=""
1686           break
1687         fi
1688         if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1689           appdirs=""
1690           break
1691         fi
1692       fi
1693     done
1694     if test -n "$appdirs" ; then
1695       echo "*** This configuration is not supported by this package." 1>&2
1696       exit 1
1697     fi
1698   fi
1699   # Okay, some application will build, or we don't care to check.  Still
1700   # notify of subdirs not getting built.
1701   echo "*** This configuration is not supported in the following subdirectories:" 1>&2
1702   echo "    ${notsupp}" 1>&2
1703   echo "    (Any other directories should still work fine.)" 1>&2
1704 fi
1705
1706 case "$host" in
1707   *msdosdjgpp*)
1708     enable_gdbtk=no ;;
1709 esac
1710
1711 copy_dirs=
1712
1713 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
1714 # the named directory are copied to $(tooldir)/sys-include.
1715 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
1716   if test x${is_cross_compiler} = xno ; then
1717     echo 1>&2 '***' --with-headers is only supported when cross compiling
1718     exit 1
1719   fi
1720   if test x"${with_headers}" != xyes ; then
1721     case "${exec_prefixoption}" in
1722     "") x=${prefix} ;;
1723     *) x=${exec_prefix} ;;
1724     esac
1725     copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
1726   fi
1727 fi
1728
1729 # Handle --with-libs=XXX.  If the value is not "yes", the contents of
1730 # the name directories are copied to $(tooldir)/lib.  Multiple directories
1731 # are permitted.
1732 if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
1733   if test x${is_cross_compiler} = xno ; then
1734     echo 1>&2 '***' --with-libs is only supported when cross compiling
1735     exit 1
1736   fi
1737   if test x"${with_libs}" != xyes ; then
1738     # Copy the libraries in reverse order, so that files in the first named
1739     # library override files in subsequent libraries.
1740     case "${exec_prefixoption}" in
1741     "") x=${prefix} ;;
1742     *) x=${exec_prefix} ;;
1743     esac
1744     for l in ${with_libs}; do
1745       copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
1746     done
1747   fi
1748 fi
1749
1750 # Handle ${copy_dirs}
1751 set fnord ${copy_dirs}
1752 shift
1753 while test $# != 0 ; do
1754   if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
1755     :
1756   else
1757     echo Copying $1 to $2
1758
1759     # Use the install script to create the directory and all required
1760     # parent directories.
1761     if test -d $2 ; then
1762       :
1763     else
1764       echo >config.temp
1765       ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
1766     fi
1767
1768     # Copy the directory, assuming we have tar.
1769     # FIXME: Should we use B in the second tar?  Not all systems support it.
1770     (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
1771
1772     # It is the responsibility of the user to correctly adjust all
1773     # symlinks.  If somebody can figure out how to handle them correctly
1774     # here, feel free to add the code.
1775
1776     echo $1 > $2/COPIED
1777   fi
1778   shift; shift
1779 done
1780
1781 # Work in distributions that contain no compiler tools, like Autoconf.
1782 tentative_cc=""
1783 host_makefile_frag=/dev/null
1784 if test -d ${srcdir}/config ; then
1785 case "${host}" in
1786   m68k-hp-hpux*)
1787     # Avoid "too much defining" errors from HPUX compiler.
1788     tentative_cc="cc -Wp,-H256000"
1789     # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1790     # If it's HP/UX ar, this should be harmless.
1791     RANLIB="ar ts"
1792     ;;
1793   m68k-apollo-sysv*)
1794     tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1795     ;;
1796   m68k-apollo-bsd*)
1797     #None of the Apollo compilers can compile gas or binutils.  The preprocessor
1798     # chokes on bfd, the compiler won't let you assign integers to enums, and
1799     # other problems.  Defining CC to gcc is a questionable way to say "don't use
1800     # the apollo compiler" (the preferred version of GCC could be called cc,
1801     # or whatever), but I'm not sure leaving CC as cc is any better...
1802     #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1803     # Used to have BISON=yacc.
1804     tentative_cc=gcc
1805     ;;
1806   m88k-dg-dgux*)
1807     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1808     ;;
1809   m88k-harris-cxux*)
1810     # Under CX/UX, we want to tell the compiler to use ANSI mode.
1811     tentative_cc="cc -Xa"
1812     host_makefile_frag="config/mh-cxux"
1813     ;;
1814   m88k-motorola-sysv*)
1815     ;;
1816   mips*-dec-ultrix*)
1817     tentative_cc="cc -Wf,-XNg1000"
1818     host_makefile_frag="config/mh-decstation"
1819     ;;
1820   mips*-nec-sysv4*)
1821     # The C compiler on NEC MIPS SVR4 needs bigger tables.
1822     tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1823     host_makefile_frag="config/mh-necv4"
1824     ;;
1825   mips*-sgi-irix4*)
1826     # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
1827     # environment.  Also bump switch table size so that cp-parse will
1828     # compile.  Bump string length limit so linker builds.
1829     tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1830     ;;
1831   mips*-*-sysv4*)
1832     host_makefile_frag="config/mh-sysv4"
1833     ;;
1834   mips*-*-sysv*)
1835     # This is for a MIPS running RISC/os 4.52C.
1836
1837     # This is needed for GDB, but needs to be in the top-level make because
1838     # if a library is compiled with the bsd headers and gets linked with the
1839     # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1840     # a different size).
1841     # ptrace(2) apparently has problems in the BSD environment.  No workaround is
1842     # known except to select the sysv environment.  Could we use /proc instead?
1843     # These "sysv environments" and "bsd environments" often end up being a pain.
1844     #
1845     # This is not part of CFLAGS because perhaps not all C compilers have this
1846     # option.
1847     tentative_cc="cc -systype sysv"
1848     ;;
1849   i370-ibm-opened*)
1850     tentative_cc="c89"
1851     ;;
1852   i[3456789]86-*-sysv5*)
1853     host_makefile_frag="config/mh-sysv5"
1854     ;;
1855   i[3456789]86-*-dgux*)
1856     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1857     host_makefile_frag="config/mh-dgux386"
1858     ;;
1859   i[3456789]86-ncr-sysv4.3*)
1860     # The MetaWare compiler will generate a copyright message unless you
1861     # turn it off by adding the -Hnocopyr flag.
1862     tentative_cc="cc -Hnocopyr"
1863     ;;
1864   i[3456789]86-ncr-sysv4*)
1865     # for an NCR 3000 (i486/SVR4) system.
1866     # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1867     # This compiler not only emits obnoxious copyright messages every time
1868     # you run it, but it chokes and dies on a whole bunch of GNU source
1869     # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1870     tentative_cc="/usr/ccs/ATT/cc"
1871     host_makefile_frag="config/mh-ncr3000"
1872     ;;
1873   i[3456789]86-*-sco3.2v5*)
1874     ;;
1875   i[3456789]86-*-sco*)
1876     # The native C compiler botches some simple uses of const.  Unfortunately,
1877     # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1878     tentative_cc="cc -Dconst="
1879     host_makefile_frag="config/mh-sco"
1880     ;;
1881   i[3456789]86-*-udk*)
1882     host_makefile_frag="config/mh-sysv5"
1883     ;;
1884   i[3456789]86-*-solaris2*)
1885     host_makefile_frag="config/mh-sysv4"
1886     ;;
1887   i[3456789]86-*-msdosdjgpp*)
1888     host_makefile_frag="config/mh-djgpp"
1889     ;;
1890   *-cygwin*)
1891     host_makefile_frag="config/mh-cygwin"
1892     ;;
1893   *-mingw32*)
1894     host_makefile_frag="config/mh-mingw32"
1895     ;;
1896   *-interix*)
1897     host_makefile_frag="config/mh-interix"
1898     ;;
1899   vax-*-ultrix2*)
1900     # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1901     tentative_cc=gcc
1902     ;;
1903   *-*-solaris2*)
1904     host_makefile_frag="config/mh-solaris"
1905     ;;
1906   m68k-sun-sunos*)
1907     # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1908     # without overflowing the jump tables (-J says to use a 32 bit table)
1909     tentative_cc="cc -J"
1910     ;;
1911   *-hp-hpux*)
1912     tentative_cc="cc -Wp,-H256000"
1913     ;;
1914   *-*-hiux*)
1915     tentative_cc="cc -Wp,-H256000"
1916     ;;
1917   rs6000-*-lynxos*)
1918     # /bin/cc is less than useful for our purposes.  Always use GCC
1919     tentative_cc="/usr/cygnus/progressive/bin/gcc"
1920     host_makefile_frag="config/mh-lynxrs6k"
1921     ;;
1922   *-*-lynxos*)
1923     # /bin/cc is less than useful for our purposes.  Always use GCC
1924     tentative_cc="/bin/gcc"
1925     ;;
1926   *-*-sysv4*)
1927     host_makefile_frag="config/mh-sysv4"
1928     ;;
1929 esac
1930 fi
1931
1932 extra_arflags_for_target=
1933 extra_nmflags_for_target=
1934 extra_ranlibflags_for_target=
1935 target_makefile_frag=/dev/null
1936 case "${target}" in
1937   i[3456789]86-*-netware*)
1938     target_makefile_frag="config/mt-netware"
1939     ;;
1940   powerpc-*-netware*)
1941     target_makefile_frag="config/mt-netware"
1942     ;;
1943   *-*-linux*)
1944     target_makefile_frag="config/mt-linux"
1945     ;;
1946   *-*-aix4.[3456789]* | *-*-aix[56789].*)
1947     # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 
1948     # commands to handle both 32-bit and 64-bit objects.  These flags are
1949     # harmless if we're using GNU nm or ar.
1950     extra_arflags_for_target=" -X32_64"
1951     extra_nmflags_for_target=" -B -X32_64"
1952     ;;
1953   *-*-darwin*)
1954     # ranlib from Darwin requires the -c flag to look at common symbols.
1955     extra_ranlibflags_for_target=" -c"
1956     ;;
1957   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
1958     target_makefile_frag="config/mt-wince"
1959     ;;
1960 esac
1961
1962 alphaieee_frag=/dev/null
1963 case $target in
1964   alpha*-*-*)
1965     # This just makes sure to use the -mieee option to build target libs.
1966     # This should probably be set individually by each library.
1967     alphaieee_frag="config/mt-alphaieee"
1968     ;;
1969 esac
1970
1971 # If --enable-target-optspace always use -Os instead of -O2 to build
1972 # the target libraries, similarly if it is not specified, use -Os
1973 # on selected platforms.
1974 ospace_frag=/dev/null
1975 case "${enable_target_optspace}:${target}" in
1976   yes:*)
1977     ospace_frag="config/mt-ospace"
1978     ;;
1979   :d30v-*)
1980     ospace_frag="config/mt-d30v"
1981     ;;
1982   :m32r-* | :d10v-* | :fr30-*)
1983     ospace_frag="config/mt-ospace"
1984     ;;
1985   no:* | :*)
1986     ;;
1987   *)
1988     echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
1989     ;;
1990 esac
1991
1992 # Set with_gnu_as and with_gnu_ld as appropriate.
1993 #
1994 # This is done by determining whether or not the appropriate directory
1995 # is available, and by checking whether or not specific configurations
1996 # have requested that this magic not happen.
1997
1998 # The command line options always override the explicit settings in 
1999 # configure.in, and the settings in configure.in override this magic.
2000 #
2001 # If the default for a toolchain is to use GNU as and ld, and you don't 
2002 # want to do that, then you should use the --without-gnu-as and
2003 # --without-gnu-ld options for the configure script.
2004
2005 if test x${use_gnu_as} = x &&
2006    echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2007   with_gnu_as=yes
2008   extra_host_args="$extra_host_args --with-gnu-as"
2009 fi
2010
2011 if test x${use_gnu_ld} = x &&
2012    echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2013   with_gnu_ld=yes
2014   extra_host_args="$extra_host_args --with-gnu-ld"
2015 fi
2016
2017 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2018 # can detect this case.
2019
2020 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2021   with_newlib=yes
2022   extra_host_args="$extra_host_args --with-newlib"
2023 fi
2024
2025
2026 # Default to using --with-stabs for certain targets.
2027 if test x${with_stabs} = x ; then
2028   case "${target}" in
2029   mips*-*-irix[56]*)
2030     ;;
2031   mips*-*-* | alpha*-*-osf*)
2032     with_stabs=yes;
2033     extra_host_args="${extra_host_args} --with-stabs"
2034     ;;
2035   esac
2036 fi
2037
2038 # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
2039 # them automatically.
2040 case "${host}" in
2041   hppa*64*-*-hpux11*)   
2042     extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2043     ;;
2044 esac
2045
2046 # If we aren't going to be using gcc, see if we can extract a definition
2047 # of CC from the fragment.
2048 # Actually, use the 'pre-extracted' version above.
2049 if test -z "${CC}" && test "${build}" = "${host}" ; then
2050   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
2051   found=
2052   for dir in $PATH; do
2053     test -z "$dir" && dir=.
2054     if test -f $dir/gcc; then
2055       found=yes
2056       break
2057     fi
2058   done
2059   IFS="$save_ifs"
2060   if test -z "${found}" && test -n "${tentative_cc}" ; then
2061     CC=$tentative_cc
2062   fi
2063 fi
2064
2065 # Some systems (e.g., one of the i386-aix systems the gas testers are
2066 # using) don't handle "\$" correctly, so don't use it here.
2067 tooldir='${exec_prefix}'/${target_alias}
2068 build_tooldir=${tooldir}
2069
2070 # Generate a default definition for YACC.  This is used if the makefile can't
2071 # locate bison or byacc in objdir.
2072
2073 for prog in 'bison -y' byacc yacc
2074 do
2075   set dummy $prog; tmp=$2
2076   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
2077   for dir in $PATH; do
2078     test -z "$dir" && dir=.
2079     if test -f $dir/$tmp; then
2080       DEFAULT_YACC="$prog"
2081       break
2082     fi
2083   done
2084   IFS="$save_ifs"
2085
2086   test -n "$DEFAULT_YACC" && break
2087 done
2088
2089 # Generate a default definition for M4.  This is used if the makefile can't
2090 # locate m4 in objdir.
2091
2092 for prog in gm4 gnum4 m4
2093 do
2094   set dummy $prog; tmp=$2
2095   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
2096   for dir in $PATH; do
2097     test -z "$dir" && dir=.
2098     if test -f $dir/$tmp; then
2099       DEFAULT_M4="$prog"
2100       break
2101     fi
2102   done
2103   IFS="$save_ifs"
2104
2105   test -n "$DEFAULT_M4" && break
2106 done
2107
2108 # Generate a default definition for LEX.  This is used if the makefile can't
2109 # locate flex in objdir.
2110
2111 for prog in flex lex
2112 do
2113   set dummy $prog; tmp=$2
2114   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
2115   for dir in $PATH; do
2116     test -z "$dir" && dir=.
2117     if test -f $dir/$tmp; then
2118       DEFAULT_LEX="$prog"
2119       break
2120     fi
2121   done
2122   IFS="$save_ifs"
2123
2124   test -n "$DEFAULT_LEX" && break
2125 done
2126
2127 if test "${build}" != "${host}" ; then
2128   # If we are doing a Canadian Cross, in which the host and build systems
2129   # are not the same, we set reasonable default values for the tools.
2130
2131   BISON=${BISON-bison}
2132   CC=${CC-${host_alias}-gcc}
2133   CFLAGS=${CFLAGS-"-g -O2"}
2134   CXX=${CXX-${host_alias}-c++}
2135   CXXFLAGS=${CXXFLAGS-"-g -O2"}
2136   CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
2137   CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
2138   CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
2139   GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
2140   GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
2141   BUILD_PREFIX=${build_alias}-
2142   BUILD_PREFIX_1=${build_alias}-
2143   MAKEINFO=${MAKEINFO-makeinfo}
2144
2145   if test -z "${YACC}" ; then
2146     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
2147     for dir in $PATH; do
2148       test -z "$dir" && dir=.
2149       if test -f $dir/bison; then
2150         YACC="bison -y"
2151         break
2152       fi
2153       if test -f $dir/byacc; then
2154         YACC=byacc
2155         break
2156       fi
2157       if test -f $dir/yacc; then
2158         YACC=yacc
2159         break
2160       fi
2161     done
2162     IFS="$save_ifs"
2163     if test -z "${YACC}" ; then
2164       YACC="bison -y"
2165     fi
2166   fi
2167
2168   if test -z "${LEX}" ; then
2169     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
2170     for dir in $PATH; do
2171       test -z "$dir" && dir=.
2172       if test -f $dir/flex; then
2173         LEX=flex
2174         break
2175       fi
2176       if test -f $dir/lex; then
2177         LEX=lex
2178         break
2179       fi
2180     done
2181     IFS="$save_ifs"
2182     LEX=${LEX-flex}
2183   fi
2184
2185 else
2186   # Set reasonable default values for some tools even if not Canadian.
2187   # Of course, these are different reasonable default values, originally
2188   # specified directly in the Makefile.
2189   # We don't export, so that autoconf can do its job.
2190   # Note that all these settings are above the fragment inclusion point
2191   # in Makefile.in, so can still be overridden by fragments.
2192   # This is all going to change when we autoconfiscate...
2193
2194   BISON="\$(USUAL_BISON)"
2195   CC_FOR_BUILD="\$(CC)"
2196   GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
2197   BUILD_PREFIX=
2198   BUILD_PREFIX_1=loser-
2199   MAKEINFO="\$(USUAL_MAKEINFO)"
2200   LEX="\$(USUAL_LEX)"
2201   YACC="\$(USUAL_YACC)"
2202
2203   # If CC is still not set, try to get gcc.
2204   cc_prog_is_gcc=
2205   if test -z "${CC}" ; then
2206     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
2207     for dir in $PATH; do
2208       test -z "$dir" && dir=.
2209       if test -f $dir/gcc; then
2210         CC="gcc"
2211         cc_prog_is_gcc=yes
2212         echo 'void f(){}' > conftest.c
2213         if test -z "`${CC} -g -c conftest.c 2>&1`"; then
2214           CFLAGS=${CFLAGS-"-g -O2"}
2215           CXXFLAGS=${CXXFLAGS-"-g -O2"}
2216         else
2217           CFLAGS=${CFLAGS-"-O2"}
2218           CXXFLAGS=${CXXFLAGS-"-O2"}
2219         fi
2220         rm -f conftest*
2221         break
2222       fi
2223     done
2224     IFS="$save_ifs"
2225     CC=${CC-cc}
2226   else
2227     # Determine if we are using gcc.
2228     cat > conftest.c <<EOF
2229 #ifdef __GNUC__
2230   yes;
2231 #endif
2232 EOF
2233     if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
2234       cc_prog_is_gcc=yes
2235     fi
2236     rm -f conftest.c
2237     if test -z "${CFLAGS}"; then
2238       # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
2239       # is set to a version of gcc.
2240       if test "$cc_prog_is_gcc" = yes; then
2241         echo 'void f(){}' > conftest.c
2242         if test -z "`${CC} -g -c conftest.c 2>&1`"; then
2243           CFLAGS=${CFLAGS-"-g -O2"}
2244           CXXFLAGS=${CXXFLAGS-"-g -O2"}
2245         else
2246           CFLAGS=${CFLAGS-"-O2"}
2247           CXXFLAGS=${CXXFLAGS-"-O2"}
2248         fi
2249         rm -f conftest*
2250       fi
2251     fi
2252   fi
2253
2254   # We must set the default linker to the linker used by gcc for the correct
2255   # operation of libtool.  If LD is not defined and we are using gcc, try to
2256   # set the LD default to the ld used by gcc.
2257   if test -z "$LD"; then
2258     if test "$cc_prog_is_gcc" = yes; then
2259       case $build in
2260       *-*-mingw*)
2261         gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2262       *)
2263         gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2264       esac
2265       case $gcc_prog_ld in
2266       # Accept absolute paths.
2267       [\\/]* | [A-Za-z]:[\\/]*)
2268         LD="$gcc_prog_ld" ;;
2269       esac
2270     fi
2271   fi
2272
2273   CXX=${CXX-"c++"}
2274   CFLAGS=${CFLAGS-"-g"}
2275   CXXFLAGS=${CXXFLAGS-"-g -O2"}
2276 fi
2277
2278 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
2279 # Set up the list of links to be made.
2280 # ${links} is the list of link names, and ${files} is the list of names to link to.
2281
2282 # Make the links.
2283 configlinks="${links}"
2284 if test -r ./config.status  ; then
2285   mv -f ./config.status ./config.back
2286 fi
2287 while test -n "${files}" ; do
2288   # set file to car of files, files to cdr of files
2289   set ${files}; file=$1; shift; files=$*
2290   set ${links}; link=$1; shift; links=$*
2291
2292   if test ! -r ${srcdir}/${file} ; then
2293     if test ! -r ${file} ; then
2294       echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
2295       echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
2296       exit 1
2297     else
2298       srcfile=${file}
2299     fi
2300   else
2301     srcfile=${srcdir}/${file}
2302   fi
2303
2304   ${remove} -f ${link}
2305   # Make a symlink if possible, otherwise try a hard link
2306   if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
2307     true
2308   else
2309     # We need to re-remove the file because Lynx leaves a 
2310     # very strange directory there when it fails an NFS symlink.
2311     ${remove} -r -f ${link}
2312     ${hard_link} ${srcfile} ${link}
2313   fi
2314   if test ! -r ${link} ; then
2315     echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
2316     exit 1
2317   fi
2318
2319   echo "Linked \"${link}\" to \"${srcfile}\"."
2320 done
2321
2322 # Create a .gdbinit file which runs the one in srcdir
2323 # and tells GDB to look there for source files.
2324
2325 if test -r ${srcdir}/.gdbinit ; then
2326   case ${srcdir} in
2327     .) ;;
2328     *) cat > ./.gdbinit <<EOF
2329 # ${NO_EDIT}
2330 dir ${srcdir}
2331 dir .
2332 source ${srcdir}/.gdbinit
2333 EOF
2334     ;;
2335   esac
2336 fi
2337
2338 # Make sure that the compiler is able to generate an executable.  If it
2339 # can't, we are probably in trouble.  We don't care whether we can run the
2340 # executable--we might be using a cross compiler--we only care whether it
2341 # can be created.  At this point the main configure script has set CC.
2342 we_are_ok=no
2343 echo "int main () { return 0; }" > conftest.c
2344 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2345 if test $? = 0 ; then
2346   if test -s conftest || test -s conftest.exe ; then
2347     we_are_ok=yes
2348   fi
2349 fi 
2350 case $we_are_ok in
2351   no)
2352     echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2353     echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2354     rm -f conftest*
2355     exit 1
2356     ;;
2357 esac
2358 rm -f conftest*
2359
2360 # The Solaris /usr/ucb/cc compiler does not appear to work.
2361 case "${host}" in
2362   sparc-sun-solaris2*)
2363       CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2364       if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2365           could_use=
2366           test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2367           if test -d /opt/cygnus/bin ; then
2368               if test "$could_use" = "" ; then
2369                   could_use="/opt/cygnus/bin"
2370               else
2371                   could_use="$could_use or /opt/cygnus/bin"
2372               fi
2373           fi
2374         if test "$could_use" = "" ; then
2375             echo "Warning: compilation may fail because you're using"
2376             echo "/usr/ucb/cc.  You should change your PATH or CC "
2377             echo "variable and rerun configure."
2378         else
2379             echo "Warning: compilation may fail because you're using"
2380             echo "/usr/ucb/cc, when you should use the C compiler from"
2381             echo "$could_use.  You should change your"
2382             echo "PATH or CC variable and rerun configure."
2383         fi
2384       fi
2385   ;;
2386 esac
2387
2388 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
2389 # binutils tools will find libbfd.so.
2390 case "${enable_shared}" in
2391   no | "") SET_LIB_PATH= ;;
2392   *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
2393 esac
2394
2395 case "${host}" in
2396   *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
2397   *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
2398 esac
2399
2400 # Record target_configdirs and the configure arguments for target and
2401 # build configuration in Makefile.
2402 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
2403
2404 # This is the final value for target_configdirs.  configdirs already
2405 # has its final value, as does build_modules.  It's time to create some 
2406 # lists of valid targets.
2407
2408 all_build_modules=
2409 configure_build_modules=
2410 for module in ${build_modules} ; do
2411   all_build_modules=all-build-${module}
2412   configure_build_modules=configure-build-${module}
2413 done
2414
2415 # Determine whether gdb needs tk/tcl or not.
2416 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available
2417 # and in that case we want gdb to be built without tk.  Ugh!
2418 # In fact I believe gdb is the *only* package directly dependent on tk,
2419 # so we should be able to put the 'maybe's in unconditionally and
2420 # leave out the maybe dependencies when enable_gdbtk is false.  I'm not
2421 # 100% sure that that's safe though.
2422
2423 gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
2424 case "$enable_gdbtk" in
2425   no)
2426     GDB_TK="" ;;
2427   yes)
2428     GDB_TK="${gdb_tk}" ;;
2429   *)
2430     # Only add the dependency on gdbtk when GDBtk is part of the gdb
2431     # distro.  Eventually someone will fix this and move Insight, nee
2432     # gdbtk to a separate directory.
2433     if test -d ${srcdir}/gdb/gdbtk ; then
2434       GDB_TK="${gdb_tk}"
2435     else
2436       GDB_TK=""
2437     fi
2438     ;;
2439 esac
2440
2441 # Create the 'maybe dependencies'.  This uses a temporary file.
2442
2443 # While at that, we remove Makefiles if we were started for recursive
2444 # configuration, so that the top-level Makefile reconfigures them,
2445 # like we used to do when configure itself was recursive.
2446 rm -f maybedep.tmp
2447 echo '# maybedep.tmp' > maybedep.tmp
2448
2449 # Make-targets which may need maybe dependencies.
2450 mts="configure all install check clean distclean dvi info install-info"
2451 mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
2452
2453 # Loop over modules and make-targets.
2454 for module in ${build_modules} ; do
2455   if test -z "${no_recursion}" \
2456      && test -f ${build_subdir}/${module}/Makefile; then
2457     echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
2458     rm -f ${build_subdir}/${module}/Makefile
2459   fi
2460   for mt in ${mts} ; do
2461     case ${mt} in
2462       install) ;; # No installing build modules.
2463       *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
2464     esac
2465   done
2466 done
2467 for module in ${configdirs} ; do
2468   if test -z "${no_recursion}" \
2469      && test -f ${module}/Makefile; then
2470     echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
2471     rm -f ${module}/Makefile
2472   fi
2473   for mt in ${mts} ; do
2474     echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
2475   done
2476 done
2477 for module in ${target_configdirs} ; do
2478   if test -z "${no_recursion}" \
2479      && test -f ${target_subdir}/${module}/Makefile; then
2480     echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
2481     rm -f ${target_subdir}/${module}/Makefile
2482   fi
2483   for mt in ${mts} ; do
2484     echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
2485   done
2486 done
2487 maybe_dependencies=maybedep.tmp
2488
2489
2490 # Create the serialization dependencies.  This uses a temporary file.
2491
2492 # Check whether --enable-serial-configure or --disable-serial-configure was given.
2493 if test "${enable_serial_configure+set}" = set; then
2494   enableval="$enable_serial_configure"
2495   :
2496 fi
2497
2498
2499 case ${enable_serial_configure} in
2500   yes)
2501     enable_serial_build_configure=yes
2502     enable_serial_host_configure=yes
2503     enable_serial_target_configure=yes
2504     ;;
2505 esac
2506
2507 # These force 'configure's to be done one at a time, to avoid problems
2508 # with contention over a shared config.cache.
2509 rm -f serdep.tmp
2510 echo '# serdep.tmp' > serdep.tmp
2511 olditem=
2512 test "x${enable_serial_build_configure}" = xyes &&
2513 for item in ${build_configdirs} ; do
2514   case ${olditem} in
2515     "") ;;
2516     *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
2517   esac
2518   olditem=${item}
2519 done
2520 olditem=
2521 test "x${enable_serial_host_configure}" = xyes &&
2522 for item in ${configdirs} ; do
2523   case ${olditem} in
2524     "") ;;
2525     *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
2526   esac
2527   olditem=${item}
2528 done
2529 olditem=
2530 test "x${enable_serial_target_configure}" = xyes &&
2531 for item in ${target_configdirs} ; do
2532   case ${olditem} in
2533     "") ;;
2534     *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
2535   esac
2536   olditem=${item}
2537 done
2538 serialization_dependencies=serdep.tmp
2539
2540
2541 # Base args.  Strip norecursion, cache-file, srcdir, host, build,
2542 # target and nonopt.  These are the ones we might not want to pass
2543 # down to subconfigures.  Also strip program-prefix, program-suffix,
2544 # and program-transform-name, so that we can pass down a consistent
2545 # program-transform-name.  If autoconf has put single quotes around
2546 # any of these arguments (because they contain shell metacharacters)
2547 # then this will fail; in practice this only happens for
2548 # --program-transform-name, so be sure to override --program-transform-name
2549 # at the end of the argument list.
2550 # These will be expanded by make, so quote '$'.
2551 cat <<\EOF_SED > conftestsed
2552 s/ --no[^ ]* / /
2553 s/ --c[a-z-]*[= ][^ ]* / /
2554 s/ --sr[a-z-]*[= ][^ ]* / /
2555 s/ --ho[a-z-]*[= ][^ ]* / /
2556 s/ --bu[a-z-]*[= ][^ ]* / /
2557 s/ --t[a-z-]*[= ][^ ]* / /
2558 s/ --program-[pst][a-z-]*[= ][^ ]* / /
2559 s/ -cache-file[= ][^ ]* / /
2560 s/ -srcdir[= ][^ ]* / /
2561 s/ -host[= ][^ ]* / /
2562 s/ -build[= ][^ ]* / /
2563 s/ -target[= ][^ ]* / /
2564 s/ -program-prefix[= ][^ ]* / /
2565 s/ -program-suffix[= ][^ ]* / /
2566 s/ -program-transform-name[= ][^ ]* / /
2567 s/ [^' -][^ ]* / /
2568 s/^ *//;s/ *$//
2569 s,\$,$$,g
2570 EOF_SED
2571 sed -f conftestsed <<EOF_SED > conftestsed.out
2572  ${ac_configure_args} 
2573 EOF_SED
2574 baseargs=`cat conftestsed.out`
2575 rm -f conftestsed conftestsed.out
2576
2577 # Add in --program-transform-name, after --program-prefix and
2578 # --program-suffix have been applied to it.  Autoconf has already
2579 # doubled dollar signs and backslashes in program_transform_name; we want
2580 # the backslashes un-doubled, and then the entire thing wrapped in single
2581 # quotes, because this will be expanded first by make and then by the shell. 
2582 # Also, because we want to override the logic in subdir configure scripts to
2583 # choose program_transform_name, replace any s,x,x, with s,y,y,.
2584 sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
2585 ${program_transform_name}
2586 EOF_SED
2587 gcc_transform_name=`cat conftestsed.out`
2588 rm -f conftestsed.out
2589 baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
2590
2591 # For the build-side libraries, we just need to pretend we're native,
2592 # and not use the same cache file.  Multilibs are neither needed nor
2593 # desired.
2594 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
2595
2596 # For host modules, accept cache file option, or specification as blank.
2597 case "${cache_file}" in
2598 "") # empty
2599   cache_file_option="" ;;
2600 /* | [A-Za-z]:[\\/]* ) # absolute path
2601   cache_file_option="--cache-file=${cache_file}" ;;
2602 *) # relative path
2603   cache_file_option="--cache-file=../${cache_file}" ;;
2604 esac
2605
2606 # Host dirs don't like to share a cache file either, horribly enough.
2607 # This seems to be due to autoconf 2.5x stupidity.
2608 host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
2609
2610 target_configargs=${baseargs}
2611
2612 # Passing a --with-cross-host argument lets the target libraries know
2613 # whether they are being built with a cross-compiler or being built
2614 # native.  However, it would be better to use other mechanisms to make the
2615 # sorts of decisions they want to make on this basis.  Please consider
2616 # this option to be deprecated.  FIXME.
2617 if test x${is_cross_compiler} = xyes ; then
2618   target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
2619 fi
2620
2621 # Default to --enable-multilib.
2622 if test x${enable_multilib} = x ; then
2623   target_configargs="--enable-multilib ${target_configargs}"
2624 fi
2625
2626 # Pass --with-newlib if appropriate.  Note that target_configdirs has
2627 # changed from the earlier setting of with_newlib.
2628 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
2629   target_configargs="--with-newlib ${target_configargs}"
2630 fi
2631
2632 # Different target subdirs use different values of certain variables
2633 # (notably CXX).  Worse, multilibs use *lots* of different values.
2634 # Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
2635 # it doesn't automatically accept command-line overrides of them.
2636 # This means it's not safe for target subdirs to share a cache file,
2637 # which is disgusting, but there you have it.  Hopefully this can be
2638 # fixed in future.  It's still worthwhile to use a cache file for each
2639 # directory.  I think.
2640
2641 # Pass the appropriate --host, --build, and --cache-file arguments.
2642 target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
2643
2644 # provide a proper gxx_include_dir.
2645 # Note, if you change the default, make sure to fix both here and in
2646 # the gcc and libstdc++-v3 subdirectories.
2647 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
2648 case "${with_gxx_include_dir}" in
2649   yes)
2650     { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
2651     ;;
2652   no | "")
2653     case "${enable_version_specific_runtime_libs}" in
2654       yes) gxx_include_dir='${libsubdir}/include/c++' ;;
2655       *)
2656         . ${srcdir}/config.if
2657         gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
2658     esac ;;
2659   *) gxx_include_dir=${with_gxx_include_dir} ;;
2660 esac
2661
2662 FLAGS_FOR_TARGET=
2663 case " $target_configdirs " in
2664  *" newlib "*)
2665   case " $target_configargs " in
2666   *" --with-newlib "*)
2667    case "$target" in
2668    *-cygwin*)
2669      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' ;;
2670    esac
2671
2672    # If we're not building GCC, don't discard standard headers.
2673    if test -d ${srcdir}/gcc; then
2674      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
2675
2676      if test "${build}" != "${host}"; then
2677        # On Canadian crosses, CC_FOR_TARGET will have already been set
2678        # by `configure', so we won't have an opportunity to add -Bgcc/
2679        # to it.  This is right: we don't want to search that directory
2680        # for binaries, but we want the header files in there, so add
2681        # them explicitly.
2682        FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
2683
2684        # Someone might think of using the pre-installed headers on
2685        # Canadian crosses, in case the installed compiler is not fully
2686        # compatible with the compiler being built.  In this case, it
2687        # would be better to flag an error than risking having
2688        # incompatible object files being constructed.  We can't
2689        # guarantee that an error will be flagged, but let's hope the
2690        # compiler will do it, when presented with incompatible header
2691        # files.
2692      fi
2693    fi
2694
2695    case "${target}-${is_cross_compiler}" in
2696    i[3456789]86-*-linux*-no)
2697       # Here host == target, so we don't need to build gcc,
2698       # so we don't want to discard standard headers.
2699       FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
2700       ;;
2701    *)
2702       # If we're building newlib, use its generic headers last, but search
2703       # for any libc-related directories first (so make it the last -B
2704       # switch).
2705       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
2706       ;;
2707    esac
2708    ;;
2709   esac
2710   ;;
2711 esac
2712
2713 # Allow the user to override the flags for
2714 # our build compiler if desired.
2715 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
2716
2717 # On Canadian crosses, we'll be searching the right directories for
2718 # the previously-installed cross compiler, so don't bother to add
2719 # flags for directories within the install tree of the compiler
2720 # being built; programs in there won't even run.
2721 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
2722   # Search for pre-installed headers if nothing else fits.
2723   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
2724 fi
2725
2726 if test "x${use_gnu_ld}" = x &&
2727    echo " ${configdirs} " | grep " ld " > /dev/null ; then
2728   # Arrange for us to find uninstalled linker scripts.
2729   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
2730 fi
2731
2732 if test "x${CC_FOR_TARGET+set}" = xset; then
2733   :
2734 elif test -d ${srcdir}/gcc; then
2735   CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
2736 elif test "$host" = "$target"; then
2737   CC_FOR_TARGET='$(CC)'
2738 else
2739   CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
2740 fi
2741 CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2742
2743 if test "x${GCJ_FOR_TARGET+set}" = xset; then
2744   :
2745 elif test -d ${srcdir}/gcc; then
2746   GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
2747 elif test "$host" = "$target"; then
2748   GCJ_FOR_TARGET='gcj'
2749 else
2750   GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
2751 fi
2752 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2753
2754 # Don't use libstdc++-v3's flags to configure/build itself.
2755 libstdcxx_flags='`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'
2756 raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
2757
2758 if test "x${CXX_FOR_TARGET+set}" = xset; then
2759   if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
2760     RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
2761   fi
2762 elif test -d ${srcdir}/gcc; then
2763   # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
2764   # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
2765   # default whereas gcc does not.
2766   # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
2767   # all other cases.
2768   CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
2769   RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
2770 elif test "$host" = "$target"; then
2771   CXX_FOR_TARGET='$(CXX)'
2772   RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
2773 else
2774   CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
2775   RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
2776 fi
2777 CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2778 RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2779
2780 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
2781 qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
2782
2783 # We want to defer the evaluation of `cmd`s and shell variables in
2784 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
2785 # bootstrap.  We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
2786 # quotes, but we still have to duplicate `$'s so that shell variables
2787 # can be expanded by the nested make as shell variables, not as make
2788 # macros.
2789 qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
2790 qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
2791
2792 # Wrap CC_FOR_TARGET and friends, for certain types of builds.
2793 CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
2794 GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
2795 CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
2796 RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
2797 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
2798 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
2799
2800 # Makefile fragments.
2801 host_makefile_frag=${srcdir}/${host_makefile_frag}
2802 target_makefile_frag=${srcdir}/${target_makefile_frag}
2803 alphaieee_frag=${srcdir}/${alphaieee_frag}
2804 ospace_frag=${srcdir}/${ospace_frag}
2805
2806
2807
2808
2809
2810 # Miscellanea: directories, flags, etc.
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824 # Build module lists & subconfigure args.
2825
2826
2827
2828
2829 # Host module lists & subconfigure args.
2830
2831
2832
2833 # Target module lists & subconfigure args.
2834
2835
2836
2837 # Build tools.
2838
2839
2840
2841
2842
2843
2844
2845 # Host tools.
2846 ncn_tool_prefix=
2847 test -n "$host_alias" && ncn_tool_prefix=$host_alias-
2848 ncn_target_tool_prefix=
2849 test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
2850
2851  if test -n "$ncn_tool_prefix"; then
2852   # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
2853 set dummy ${ncn_tool_prefix}ar; ac_word=$2
2854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_word" >&5
2856 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   if test -n "$AR"; then
2860   ac_cv_prog_AR="$AR" # Let the user override the test.
2861 else
2862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2863   ac_dummy="$PATH"
2864   for ac_dir in $ac_dummy; do
2865     test -z "$ac_dir" && ac_dir=.
2866     if test -f $ac_dir/$ac_word; then
2867       ac_cv_prog_AR="${ncn_tool_prefix}ar"
2868       break
2869     fi
2870   done
2871   IFS="$ac_save_ifs"
2872 fi
2873 fi
2874 AR="$ac_cv_prog_AR"
2875 if test -n "$AR"; then
2876   echo "$ac_t""$AR" 1>&6
2877 else
2878   echo "$ac_t""no" 1>&6
2879 fi
2880
2881 fi
2882 if test -z "$ac_cv_prog_AR" ; then
2883   if test $build = $host ; then
2884     ncn_cv_AR=$AR
2885     # Extract the first word of "ar", so it can be a program name with args.
2886 set dummy ar; ac_word=$2
2887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2888 echo "configure:2889: checking for $ac_word" >&5
2889 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   if test -n "$ncn_cv_AR"; then
2893   ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
2894 else
2895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2896   ac_dummy="$PATH"
2897   for ac_dir in $ac_dummy; do
2898     test -z "$ac_dir" && ac_dir=.
2899     if test -f $ac_dir/$ac_word; then
2900       ac_cv_prog_ncn_cv_AR="ar"
2901       break
2902     fi
2903   done
2904   IFS="$ac_save_ifs"
2905   test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
2906 fi
2907 fi
2908 ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
2909 if test -n "$ncn_cv_AR"; then
2910   echo "$ac_t""$ncn_cv_AR" 1>&6
2911 else
2912   echo "$ac_t""no" 1>&6
2913 fi
2914  
2915     AR=$ncn_cv_AR
2916   else
2917     AR="${ncn_tool_prefix}ar"
2918   fi
2919 else
2920   AR="$ac_cv_prog_AR"
2921 fi
2922
2923  if test -n "$ncn_tool_prefix"; then
2924   # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
2925 set dummy ${ncn_tool_prefix}as; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$AS"; then
2932   ac_cv_prog_AS="$AS" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_AS="${ncn_tool_prefix}as"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 AS="$ac_cv_prog_AS"
2947 if test -n "$AS"; then
2948   echo "$ac_t""$AS" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 fi
2954 if test -z "$ac_cv_prog_AS" ; then
2955   if test $build = $host ; then
2956     ncn_cv_AS=$AS
2957     # Extract the first word of "as", so it can be a program name with args.
2958 set dummy as; ac_word=$2
2959 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2960 echo "configure:2961: checking for $ac_word" >&5
2961 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
2962   echo $ac_n "(cached) $ac_c" 1>&6
2963 else
2964   if test -n "$ncn_cv_AS"; then
2965   ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
2966 else
2967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2968   ac_dummy="$PATH"
2969   for ac_dir in $ac_dummy; do
2970     test -z "$ac_dir" && ac_dir=.
2971     if test -f $ac_dir/$ac_word; then
2972       ac_cv_prog_ncn_cv_AS="as"
2973       break
2974     fi
2975   done
2976   IFS="$ac_save_ifs"
2977   test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
2978 fi
2979 fi
2980 ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
2981 if test -n "$ncn_cv_AS"; then
2982   echo "$ac_t""$ncn_cv_AS" 1>&6
2983 else
2984   echo "$ac_t""no" 1>&6
2985 fi
2986  
2987     AS=$ncn_cv_AS
2988   else
2989     AS="${ncn_tool_prefix}as"
2990   fi
2991 else
2992   AS="$ac_cv_prog_AS"
2993 fi
2994
2995  if test -n "$ncn_tool_prefix"; then
2996   # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
2997 set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
2998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_word" >&5
3000 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   if test -n "$DLLTOOL"; then
3004   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3005 else
3006   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3007   ac_dummy="$PATH"
3008   for ac_dir in $ac_dummy; do
3009     test -z "$ac_dir" && ac_dir=.
3010     if test -f $ac_dir/$ac_word; then
3011       ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
3012       break
3013     fi
3014   done
3015   IFS="$ac_save_ifs"
3016 fi
3017 fi
3018 DLLTOOL="$ac_cv_prog_DLLTOOL"
3019 if test -n "$DLLTOOL"; then
3020   echo "$ac_t""$DLLTOOL" 1>&6
3021 else
3022   echo "$ac_t""no" 1>&6
3023 fi
3024
3025 fi
3026 if test -z "$ac_cv_prog_DLLTOOL" ; then
3027   if test $build = $host ; then
3028     ncn_cv_DLLTOOL=$DLLTOOL
3029     # Extract the first word of "dlltool", so it can be a program name with args.
3030 set dummy dlltool; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   if test -n "$ncn_cv_DLLTOOL"; then
3037   ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
3038 else
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049   test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3050 fi
3051 fi
3052 ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
3053 if test -n "$ncn_cv_DLLTOOL"; then
3054   echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
3055 else
3056   echo "$ac_t""no" 1>&6
3057 fi
3058  
3059     DLLTOOL=$ncn_cv_DLLTOOL
3060   else
3061     DLLTOOL="${ncn_tool_prefix}dlltool"
3062   fi
3063 else
3064   DLLTOOL="$ac_cv_prog_DLLTOOL"
3065 fi
3066
3067  if test -n "$ncn_tool_prefix"; then
3068   # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
3069 set dummy ${ncn_tool_prefix}ld; ac_word=$2
3070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3071 echo "configure:3072: checking for $ac_word" >&5
3072 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   if test -n "$LD"; then
3076   ac_cv_prog_LD="$LD" # Let the user override the test.
3077 else
3078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3079   ac_dummy="$PATH"
3080   for ac_dir in $ac_dummy; do
3081     test -z "$ac_dir" && ac_dir=.
3082     if test -f $ac_dir/$ac_word; then
3083       ac_cv_prog_LD="${ncn_tool_prefix}ld"
3084       break
3085     fi
3086   done
3087   IFS="$ac_save_ifs"
3088 fi
3089 fi
3090 LD="$ac_cv_prog_LD"
3091 if test -n "$LD"; then
3092   echo "$ac_t""$LD" 1>&6
3093 else
3094   echo "$ac_t""no" 1>&6
3095 fi
3096
3097 fi
3098 if test -z "$ac_cv_prog_LD" ; then
3099   if test $build = $host ; then
3100     ncn_cv_LD=$LD
3101     # Extract the first word of "ld", so it can be a program name with args.
3102 set dummy ld; ac_word=$2
3103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3104 echo "configure:3105: checking for $ac_word" >&5
3105 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   if test -n "$ncn_cv_LD"; then
3109   ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
3110 else
3111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3112   ac_dummy="$PATH"
3113   for ac_dir in $ac_dummy; do
3114     test -z "$ac_dir" && ac_dir=.
3115     if test -f $ac_dir/$ac_word; then
3116       ac_cv_prog_ncn_cv_LD="ld"
3117       break
3118     fi
3119   done
3120   IFS="$ac_save_ifs"
3121   test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
3122 fi
3123 fi
3124 ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
3125 if test -n "$ncn_cv_LD"; then
3126   echo "$ac_t""$ncn_cv_LD" 1>&6
3127 else
3128   echo "$ac_t""no" 1>&6
3129 fi
3130  
3131     LD=$ncn_cv_LD
3132   else
3133     LD="${ncn_tool_prefix}ld"
3134   fi
3135 else
3136   LD="$ac_cv_prog_LD"
3137 fi
3138
3139  if test -n "$ncn_tool_prefix"; then
3140   # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
3141 set dummy ${ncn_tool_prefix}nm; ac_word=$2
3142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3143 echo "configure:3144: checking for $ac_word" >&5
3144 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   if test -n "$NM"; then
3148   ac_cv_prog_NM="$NM" # Let the user override the test.
3149 else
3150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3151   ac_dummy="$PATH"
3152   for ac_dir in $ac_dummy; do
3153     test -z "$ac_dir" && ac_dir=.
3154     if test -f $ac_dir/$ac_word; then
3155       ac_cv_prog_NM="${ncn_tool_prefix}nm"
3156       break
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160 fi
3161 fi
3162 NM="$ac_cv_prog_NM"
3163 if test -n "$NM"; then
3164   echo "$ac_t""$NM" 1>&6
3165 else
3166   echo "$ac_t""no" 1>&6
3167 fi
3168
3169 fi
3170 if test -z "$ac_cv_prog_NM" ; then
3171   if test $build = $host ; then
3172     ncn_cv_NM=$NM
3173     # Extract the first word of "nm", so it can be a program name with args.
3174 set dummy nm; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$ncn_cv_NM"; then
3181   ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_ncn_cv_NM="nm"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193   test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
3194 fi
3195 fi
3196 ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
3197 if test -n "$ncn_cv_NM"; then
3198   echo "$ac_t""$ncn_cv_NM" 1>&6
3199 else
3200   echo "$ac_t""no" 1>&6
3201 fi
3202  
3203     NM=$ncn_cv_NM
3204   else
3205     NM="${ncn_tool_prefix}nm"
3206   fi
3207 else
3208   NM="$ac_cv_prog_NM"
3209 fi
3210
3211  if test -n "$ncn_tool_prefix"; then
3212   # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
3213 set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
3214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3215 echo "configure:3216: checking for $ac_word" >&5
3216 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   if test -n "$RANLIB"; then
3220   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3221 else
3222   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3223   ac_dummy="$PATH"
3224   for ac_dir in $ac_dummy; do
3225     test -z "$ac_dir" && ac_dir=.
3226     if test -f $ac_dir/$ac_word; then
3227       ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib"
3228       break
3229     fi
3230   done
3231   IFS="$ac_save_ifs"
3232 fi
3233 fi
3234 RANLIB="$ac_cv_prog_RANLIB"
3235 if test -n "$RANLIB"; then
3236   echo "$ac_t""$RANLIB" 1>&6
3237 else
3238   echo "$ac_t""no" 1>&6
3239 fi
3240
3241 fi
3242 if test -z "$ac_cv_prog_RANLIB" ; then
3243   if test $build = $host ; then
3244     ncn_cv_RANLIB=$RANLIB
3245     # Extract the first word of "ranlib", so it can be a program name with args.
3246 set dummy ranlib; ac_word=$2
3247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3248 echo "configure:3249: checking for $ac_word" >&5
3249 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   if test -n "$ncn_cv_RANLIB"; then
3253   ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
3254 else
3255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3256   ac_dummy="$PATH"
3257   for ac_dir in $ac_dummy; do
3258     test -z "$ac_dir" && ac_dir=.
3259     if test -f $ac_dir/$ac_word; then
3260       ac_cv_prog_ncn_cv_RANLIB="ranlib"
3261       break
3262     fi
3263   done
3264   IFS="$ac_save_ifs"
3265   test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
3266 fi
3267 fi
3268 ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
3269 if test -n "$ncn_cv_RANLIB"; then
3270   echo "$ac_t""$ncn_cv_RANLIB" 1>&6
3271 else
3272   echo "$ac_t""no" 1>&6
3273 fi
3274  
3275     RANLIB=$ncn_cv_RANLIB
3276   else
3277     RANLIB=":"
3278   fi
3279 else
3280   RANLIB="$ac_cv_prog_RANLIB"
3281 fi
3282
3283  if test -n "$ncn_tool_prefix"; then
3284   # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
3285 set dummy ${ncn_tool_prefix}windres; ac_word=$2
3286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3287 echo "configure:3288: checking for $ac_word" >&5
3288 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   if test -n "$WINDRES"; then
3292   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3293 else
3294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3295   ac_dummy="$PATH"
3296   for ac_dir in $ac_dummy; do
3297     test -z "$ac_dir" && ac_dir=.
3298     if test -f $ac_dir/$ac_word; then
3299       ac_cv_prog_WINDRES="${ncn_tool_prefix}windres"
3300       break
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304 fi
3305 fi
3306 WINDRES="$ac_cv_prog_WINDRES"
3307 if test -n "$WINDRES"; then
3308   echo "$ac_t""$WINDRES" 1>&6
3309 else
3310   echo "$ac_t""no" 1>&6
3311 fi
3312
3313 fi
3314 if test -z "$ac_cv_prog_WINDRES" ; then
3315   if test $build = $host ; then
3316     ncn_cv_WINDRES=$WINDRES
3317     # Extract the first word of "windres", so it can be a program name with args.
3318 set dummy windres; ac_word=$2
3319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_word" >&5
3321 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   if test -n "$ncn_cv_WINDRES"; then
3325   ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
3326 else
3327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3328   ac_dummy="$PATH"
3329   for ac_dir in $ac_dummy; do
3330     test -z "$ac_dir" && ac_dir=.
3331     if test -f $ac_dir/$ac_word; then
3332       ac_cv_prog_ncn_cv_WINDRES="windres"
3333       break
3334     fi
3335   done
3336   IFS="$ac_save_ifs"
3337   test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
3338 fi
3339 fi
3340 ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
3341 if test -n "$ncn_cv_WINDRES"; then
3342   echo "$ac_t""$ncn_cv_WINDRES" 1>&6
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346  
3347     WINDRES=$ncn_cv_WINDRES
3348   else
3349     WINDRES="${ncn_tool_prefix}windres"
3350   fi
3351 else
3352   WINDRES="$ac_cv_prog_WINDRES"
3353 fi
3354
3355  if test -n "$ncn_tool_prefix"; then
3356   # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
3357 set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
3358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_word" >&5
3360 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   if test -n "$OBJCOPY"; then
3364   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
3365 else
3366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3367   ac_dummy="$PATH"
3368   for ac_dir in $ac_dummy; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f $ac_dir/$ac_word; then
3371       ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy"
3372       break
3373     fi
3374   done
3375   IFS="$ac_save_ifs"
3376 fi
3377 fi
3378 OBJCOPY="$ac_cv_prog_OBJCOPY"
3379 if test -n "$OBJCOPY"; then
3380   echo "$ac_t""$OBJCOPY" 1>&6
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384
3385 fi
3386 if test -z "$ac_cv_prog_OBJCOPY" ; then
3387   if test $build = $host ; then
3388     ncn_cv_OBJCOPY=$OBJCOPY
3389     # Extract the first word of "objcopy", so it can be a program name with args.
3390 set dummy objcopy; ac_word=$2
3391 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3392 echo "configure:3393: checking for $ac_word" >&5
3393 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   if test -n "$ncn_cv_OBJCOPY"; then
3397   ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
3398 else
3399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3400   ac_dummy="$PATH"
3401   for ac_dir in $ac_dummy; do
3402     test -z "$ac_dir" && ac_dir=.
3403     if test -f $ac_dir/$ac_word; then
3404       ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
3405       break
3406     fi
3407   done
3408   IFS="$ac_save_ifs"
3409   test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
3410 fi
3411 fi
3412 ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
3413 if test -n "$ncn_cv_OBJCOPY"; then
3414   echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
3415 else
3416   echo "$ac_t""no" 1>&6
3417 fi
3418  
3419     OBJCOPY=$ncn_cv_OBJCOPY
3420   else
3421     OBJCOPY="${ncn_tool_prefix}objcopy"
3422   fi
3423 else
3424   OBJCOPY="$ac_cv_prog_OBJCOPY"
3425 fi
3426
3427  if test -n "$ncn_tool_prefix"; then
3428   # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
3429 set dummy ${ncn_tool_prefix}objdump; ac_word=$2
3430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3431 echo "configure:3432: checking for $ac_word" >&5
3432 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3433   echo $ac_n "(cached) $ac_c" 1>&6
3434 else
3435   if test -n "$OBJDUMP"; then
3436   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3437 else
3438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3439   ac_dummy="$PATH"
3440   for ac_dir in $ac_dummy; do
3441     test -z "$ac_dir" && ac_dir=.
3442     if test -f $ac_dir/$ac_word; then
3443       ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump"
3444       break
3445     fi
3446   done
3447   IFS="$ac_save_ifs"
3448 fi
3449 fi
3450 OBJDUMP="$ac_cv_prog_OBJDUMP"
3451 if test -n "$OBJDUMP"; then
3452   echo "$ac_t""$OBJDUMP" 1>&6
3453 else
3454   echo "$ac_t""no" 1>&6
3455 fi
3456
3457 fi
3458 if test -z "$ac_cv_prog_OBJDUMP" ; then
3459   if test $build = $host ; then
3460     ncn_cv_OBJDUMP=$OBJDUMP
3461     # Extract the first word of "objdump", so it can be a program name with args.
3462 set dummy objdump; ac_word=$2
3463 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3464 echo "configure:3465: checking for $ac_word" >&5
3465 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   if test -n "$ncn_cv_OBJDUMP"; then
3469   ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
3470 else
3471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3472   ac_dummy="$PATH"
3473   for ac_dir in $ac_dummy; do
3474     test -z "$ac_dir" && ac_dir=.
3475     if test -f $ac_dir/$ac_word; then
3476       ac_cv_prog_ncn_cv_OBJDUMP="objdump"
3477       break
3478     fi
3479   done
3480   IFS="$ac_save_ifs"
3481   test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
3482 fi
3483 fi
3484 ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
3485 if test -n "$ncn_cv_OBJDUMP"; then
3486   echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
3487 else
3488   echo "$ac_t""no" 1>&6
3489 fi
3490  
3491     OBJDUMP=$ncn_cv_OBJDUMP
3492   else
3493     OBJDUMP="${ncn_tool_prefix}objdump"
3494   fi
3495 else
3496   OBJDUMP="$ac_cv_prog_OBJDUMP"
3497 fi
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508 # Target tools.
3509  if test -n "$ncn_target_tool_prefix"; then
3510   # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
3511 set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
3512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3513 echo "configure:3514: checking for $ac_word" >&5
3514 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   if test -n "$AR_FOR_TARGET"; then
3518   ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
3519 else
3520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3521   ac_dummy="$PATH"
3522   for ac_dir in $ac_dummy; do
3523     test -z "$ac_dir" && ac_dir=.
3524     if test -f $ac_dir/$ac_word; then
3525       ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
3526       break
3527     fi
3528   done
3529   IFS="$ac_save_ifs"
3530 fi
3531 fi
3532 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
3533 if test -n "$AR_FOR_TARGET"; then
3534   echo "$ac_t""$AR_FOR_TARGET" 1>&6
3535 else
3536   echo "$ac_t""no" 1>&6
3537 fi
3538
3539 fi
3540 if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
3541   if test $build = $target ; then
3542     ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
3543     # Extract the first word of "ar", so it can be a program name with args.
3544 set dummy ar; ac_word=$2
3545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3546 echo "configure:3547: checking for $ac_word" >&5
3547 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   if test -n "$ncn_cv_AR_FOR_TARGET"; then
3551   ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
3552 else
3553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3554   ac_dummy="$PATH"
3555   for ac_dir in $ac_dummy; do
3556     test -z "$ac_dir" && ac_dir=.
3557     if test -f $ac_dir/$ac_word; then
3558       ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
3559       break
3560     fi
3561   done
3562   IFS="$ac_save_ifs"
3563   test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
3564 fi
3565 fi
3566 ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
3567 if test -n "$ncn_cv_AR_FOR_TARGET"; then
3568   echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
3569 else
3570   echo "$ac_t""no" 1>&6
3571 fi
3572  
3573     AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
3574   else
3575     AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
3576   fi
3577 else
3578   AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
3579 fi
3580
3581  if test -n "$ncn_target_tool_prefix"; then
3582   # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
3583 set dummy ${ncn_target_tool_prefix}as; ac_word=$2
3584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3585 echo "configure:3586: checking for $ac_word" >&5
3586 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
3587   echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589   if test -n "$AS_FOR_TARGET"; then
3590   ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
3591 else
3592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3593   ac_dummy="$PATH"
3594   for ac_dir in $ac_dummy; do
3595     test -z "$ac_dir" && ac_dir=.
3596     if test -f $ac_dir/$ac_word; then
3597       ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
3598       break
3599     fi
3600   done
3601   IFS="$ac_save_ifs"
3602 fi
3603 fi
3604 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
3605 if test -n "$AS_FOR_TARGET"; then
3606   echo "$ac_t""$AS_FOR_TARGET" 1>&6
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610
3611 fi
3612 if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
3613   if test $build = $target ; then
3614     ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
3615     # Extract the first word of "as", so it can be a program name with args.
3616 set dummy as; ac_word=$2
3617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3618 echo "configure:3619: checking for $ac_word" >&5
3619 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
3620   echo $ac_n "(cached) $ac_c" 1>&6
3621 else
3622   if test -n "$ncn_cv_AS_FOR_TARGET"; then
3623   ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
3624 else
3625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3626   ac_dummy="$PATH"
3627   for ac_dir in $ac_dummy; do
3628     test -z "$ac_dir" && ac_dir=.
3629     if test -f $ac_dir/$ac_word; then
3630       ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
3631       break
3632     fi
3633   done
3634   IFS="$ac_save_ifs"
3635   test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
3636 fi
3637 fi
3638 ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
3639 if test -n "$ncn_cv_AS_FOR_TARGET"; then
3640   echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
3641 else
3642   echo "$ac_t""no" 1>&6
3643 fi
3644  
3645     AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
3646   else
3647     AS_FOR_TARGET="${ncn_target_tool_prefix}as"
3648   fi
3649 else
3650   AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
3651 fi
3652
3653  if test -n "$ncn_target_tool_prefix"; then
3654   # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
3655 set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
3656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3657 echo "configure:3658: checking for $ac_word" >&5
3658 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
3659   echo $ac_n "(cached) $ac_c" 1>&6
3660 else
3661   if test -n "$DLLTOOL_FOR_TARGET"; then
3662   ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
3663 else
3664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3665   ac_dummy="$PATH"
3666   for ac_dir in $ac_dummy; do
3667     test -z "$ac_dir" && ac_dir=.
3668     if test -f $ac_dir/$ac_word; then
3669       ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
3670       break
3671     fi
3672   done
3673   IFS="$ac_save_ifs"
3674 fi
3675 fi
3676 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
3677 if test -n "$DLLTOOL_FOR_TARGET"; then
3678   echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
3679 else
3680   echo "$ac_t""no" 1>&6
3681 fi
3682
3683 fi
3684 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
3685   if test $build = $target ; then
3686     ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
3687     # Extract the first word of "dlltool", so it can be a program name with args.
3688 set dummy dlltool; ac_word=$2
3689 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3690 echo "configure:3691: checking for $ac_word" >&5
3691 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
3692   echo $ac_n "(cached) $ac_c" 1>&6
3693 else
3694   if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
3695   ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
3696 else
3697   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3698   ac_dummy="$PATH"
3699   for ac_dir in $ac_dummy; do
3700     test -z "$ac_dir" && ac_dir=.
3701     if test -f $ac_dir/$ac_word; then
3702       ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
3703       break
3704     fi
3705   done
3706   IFS="$ac_save_ifs"
3707   test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
3708 fi
3709 fi
3710 ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
3711 if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
3712   echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
3713 else
3714   echo "$ac_t""no" 1>&6
3715 fi
3716  
3717     DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
3718   else
3719     DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
3720   fi
3721 else
3722   DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
3723 fi
3724
3725  if test -n "$ncn_target_tool_prefix"; then
3726   # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
3727 set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
3728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3729 echo "configure:3730: checking for $ac_word" >&5
3730 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
3731   echo $ac_n "(cached) $ac_c" 1>&6
3732 else
3733   if test -n "$LD_FOR_TARGET"; then
3734   ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
3735 else
3736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3737   ac_dummy="$PATH"
3738   for ac_dir in $ac_dummy; do
3739     test -z "$ac_dir" && ac_dir=.
3740     if test -f $ac_dir/$ac_word; then
3741       ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
3742       break
3743     fi
3744   done
3745   IFS="$ac_save_ifs"
3746 fi
3747 fi
3748 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
3749 if test -n "$LD_FOR_TARGET"; then
3750   echo "$ac_t""$LD_FOR_TARGET" 1>&6
3751 else
3752   echo "$ac_t""no" 1>&6
3753 fi
3754
3755 fi
3756 if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
3757   if test $build = $target ; then
3758     ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
3759     # Extract the first word of "ld", so it can be a program name with args.
3760 set dummy ld; ac_word=$2
3761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3762 echo "configure:3763: checking for $ac_word" >&5
3763 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
3764   echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766   if test -n "$ncn_cv_LD_FOR_TARGET"; then
3767   ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
3768 else
3769   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3770   ac_dummy="$PATH"
3771   for ac_dir in $ac_dummy; do
3772     test -z "$ac_dir" && ac_dir=.
3773     if test -f $ac_dir/$ac_word; then
3774       ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
3775       break
3776     fi
3777   done
3778   IFS="$ac_save_ifs"
3779   test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
3780 fi
3781 fi
3782 ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
3783 if test -n "$ncn_cv_LD_FOR_TARGET"; then
3784   echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
3785 else
3786   echo "$ac_t""no" 1>&6
3787 fi
3788  
3789     LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
3790   else
3791     LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
3792   fi
3793 else
3794   LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
3795 fi
3796
3797  if test -n "$ncn_target_tool_prefix"; then
3798   # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
3799 set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
3800 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3801 echo "configure:3802: checking for $ac_word" >&5
3802 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
3803   echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805   if test -n "$NM_FOR_TARGET"; then
3806   ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
3807 else
3808   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3809   ac_dummy="$PATH"
3810   for ac_dir in $ac_dummy; do
3811     test -z "$ac_dir" && ac_dir=.
3812     if test -f $ac_dir/$ac_word; then
3813       ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
3814       break
3815     fi
3816   done
3817   IFS="$ac_save_ifs"
3818 fi
3819 fi
3820 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
3821 if test -n "$NM_FOR_TARGET"; then
3822   echo "$ac_t""$NM_FOR_TARGET" 1>&6
3823 else
3824   echo "$ac_t""no" 1>&6
3825 fi
3826
3827 fi
3828 if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
3829   if test $build = $target ; then
3830     ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
3831     # Extract the first word of "nm", so it can be a program name with args.
3832 set dummy nm; ac_word=$2
3833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3834 echo "configure:3835: checking for $ac_word" >&5
3835 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
3836   echo $ac_n "(cached) $ac_c" 1>&6
3837 else
3838   if test -n "$ncn_cv_NM_FOR_TARGET"; then
3839   ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
3840 else
3841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3842   ac_dummy="$PATH"
3843   for ac_dir in $ac_dummy; do
3844     test -z "$ac_dir" && ac_dir=.
3845     if test -f $ac_dir/$ac_word; then
3846       ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
3847       break
3848     fi
3849   done
3850   IFS="$ac_save_ifs"
3851   test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
3852 fi
3853 fi
3854 ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
3855 if test -n "$ncn_cv_NM_FOR_TARGET"; then
3856   echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
3857 else
3858   echo "$ac_t""no" 1>&6
3859 fi
3860  
3861     NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
3862   else
3863     NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
3864   fi
3865 else
3866   NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
3867 fi
3868
3869  if test -n "$ncn_target_tool_prefix"; then
3870   # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
3871 set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
3872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3873 echo "configure:3874: checking for $ac_word" >&5
3874 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   if test -n "$RANLIB_FOR_TARGET"; then
3878   ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
3879 else
3880   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3881   ac_dummy="$PATH"
3882   for ac_dir in $ac_dummy; do
3883     test -z "$ac_dir" && ac_dir=.
3884     if test -f $ac_dir/$ac_word; then
3885       ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
3886       break
3887     fi
3888   done
3889   IFS="$ac_save_ifs"
3890 fi
3891 fi
3892 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
3893 if test -n "$RANLIB_FOR_TARGET"; then
3894   echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
3895 else
3896   echo "$ac_t""no" 1>&6
3897 fi
3898
3899 fi
3900 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
3901   if test $build = $target ; then
3902     ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
3903     # Extract the first word of "ranlib", so it can be a program name with args.
3904 set dummy ranlib; ac_word=$2
3905 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3906 echo "configure:3907: checking for $ac_word" >&5
3907 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
3911   ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
3912 else
3913   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3914   ac_dummy="$PATH"
3915   for ac_dir in $ac_dummy; do
3916     test -z "$ac_dir" && ac_dir=.
3917     if test -f $ac_dir/$ac_word; then
3918       ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="ranlib"
3919       break
3920     fi
3921   done
3922   IFS="$ac_save_ifs"
3923   test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
3924 fi
3925 fi
3926 ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
3927 if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
3928   echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
3929 else
3930   echo "$ac_t""no" 1>&6
3931 fi
3932  
3933     RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
3934   else
3935     RANLIB_FOR_TARGET=":"
3936   fi
3937 else
3938   RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
3939 fi
3940
3941  if test -n "$ncn_target_tool_prefix"; then
3942   # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
3943 set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
3944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3945 echo "configure:3946: checking for $ac_word" >&5
3946 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   if test -n "$WINDRES_FOR_TARGET"; then
3950   ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
3951 else
3952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3953   ac_dummy="$PATH"
3954   for ac_dir in $ac_dummy; do
3955     test -z "$ac_dir" && ac_dir=.
3956     if test -f $ac_dir/$ac_word; then
3957       ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
3958       break
3959     fi
3960   done
3961   IFS="$ac_save_ifs"
3962 fi
3963 fi
3964 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
3965 if test -n "$WINDRES_FOR_TARGET"; then
3966   echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
3967 else
3968   echo "$ac_t""no" 1>&6
3969 fi
3970
3971 fi
3972 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
3973   if test $build = $target ; then
3974     ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
3975     # Extract the first word of "windres", so it can be a program name with args.
3976 set dummy windres; ac_word=$2
3977 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3978 echo "configure:3979: checking for $ac_word" >&5
3979 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
3980   echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982   if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
3983   ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
3984 else
3985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3986   ac_dummy="$PATH"
3987   for ac_dir in $ac_dummy; do
3988     test -z "$ac_dir" && ac_dir=.
3989     if test -f $ac_dir/$ac_word; then
3990       ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
3991       break
3992     fi
3993   done
3994   IFS="$ac_save_ifs"
3995   test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
3996 fi
3997 fi
3998 ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
3999 if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
4000   echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
4001 else
4002   echo "$ac_t""no" 1>&6
4003 fi
4004  
4005     WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
4006   else
4007     WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
4008   fi
4009 else
4010   WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
4011 fi
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023 # Fix up target tools.
4024 if test "x${build}" = "x${host}" ; then
4025   # In this case, the newly built tools can and should be used,
4026   # so we override the results of the autoconf tests.
4027   # This should really only happen when the tools are actually being built,
4028   # but that's a further refinement.  The new build scheme, where
4029   # tools are built into a structure paralleling where they're installed,
4030   # should also eliminate all of this cleanly.
4031   AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
4032   AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
4033   DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
4034   LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
4035   NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
4036   RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
4037   WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
4038 fi
4039 # Certain tools may need extra flags.
4040 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
4041 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
4042 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
4043
4044 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4045 echo "configure:4046: checking whether to enable maintainer-specific portions of Makefiles" >&5
4046 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4047 if test "${enable_maintainer_mode+set}" = set; then
4048   enableval="$enable_maintainer_mode"
4049   USE_MAINTAINER_MODE=$enableval
4050 else
4051   USE_MAINTAINER_MODE=no
4052 fi
4053
4054 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4055
4056
4057 if test "$USE_MAINTAINER_MODE" = yes; then
4058   MAINTAINER_MODE_TRUE=
4059   MAINTAINER_MODE_FALSE='#'
4060 else
4061   MAINTAINER_MODE_TRUE='#'
4062   MAINTAINER_MODE_FALSE=
4063 fi      
4064 MAINT=$MAINTAINER_MODE_TRUE
4065
4066 trap '' 1 2 15
4067 cat > confcache <<\EOF
4068 # This file is a shell script that caches the results of configure
4069 # tests run on this system so they can be shared between configure
4070 # scripts and configure runs.  It is not useful on other systems.
4071 # If it contains results you don't want to keep, you may remove or edit it.
4072 #
4073 # By default, configure uses ./config.cache as the cache file,
4074 # creating it if it does not exist already.  You can give configure
4075 # the --cache-file=FILE option to use a different cache file; that is
4076 # what configure does when it calls configure scripts in
4077 # subdirectories, so they share the cache.
4078 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4079 # config.status only pays attention to the cache file if you give it the
4080 # --recheck option to rerun configure.
4081 #
4082 EOF
4083 # The following way of writing the cache mishandles newlines in values,
4084 # but we know of no workaround that is simple, portable, and efficient.
4085 # So, don't put newlines in cache variables' values.
4086 # Ultrix sh set writes to stderr and can't be redirected directly,
4087 # and sets the high bit in the cache file unless we assign to the vars.
4088 (set) 2>&1 |
4089   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4090   *ac_space=\ *)
4091     # `set' does not quote correctly, so add quotes (double-quote substitution
4092     # turns \\\\ into \\, and sed turns \\ into \).
4093     sed -n \
4094       -e "s/'/'\\\\''/g" \
4095       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4096     ;;
4097   *)
4098     # `set' quotes correctly as required by POSIX, so do not add quotes.
4099     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4100     ;;
4101   esac >> confcache
4102 if cmp -s $cache_file confcache; then
4103   :
4104 else
4105   if test -w $cache_file; then
4106     echo "updating cache $cache_file"
4107     cat confcache > $cache_file
4108   else
4109     echo "not updating unwritable cache $cache_file"
4110   fi
4111 fi
4112 rm -f confcache
4113
4114 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4115
4116 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4117 # Let make expand exec_prefix.
4118 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4119
4120 # Any assignment to VPATH causes Sun make to only execute
4121 # the first set of double-colon rules, so remove it if not needed.
4122 # If there is a colon in the path, we need to keep it.
4123 if test "x$srcdir" = x.; then
4124   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4125 fi
4126
4127 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4128
4129 # Transform confdefs.h into DEFS.
4130 # Protect against shell expansion while executing Makefile rules.
4131 # Protect against Makefile macro expansion.
4132 cat > conftest.defs <<\EOF
4133 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
4134 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
4135 s%\[%\\&%g
4136 s%\]%\\&%g
4137 s%\$%$$%g
4138 EOF
4139 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
4140 rm -f conftest.defs
4141
4142
4143 # Without the "./", some shells look in PATH for config.status.
4144 : ${CONFIG_STATUS=./config.status}
4145
4146 echo creating $CONFIG_STATUS
4147 rm -f $CONFIG_STATUS
4148 cat > $CONFIG_STATUS <<EOF
4149 #! /bin/sh
4150 # Generated automatically by configure.
4151 # Run this file to recreate the current configuration.
4152 # This directory was configured as follows,
4153 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4154 #
4155 # $0 $ac_configure_args
4156 #
4157 # Compiler output produced by configure, useful for debugging
4158 # configure, is in ./config.log if it exists.
4159
4160 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4161 for ac_option
4162 do
4163   case "\$ac_option" in
4164   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4165     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4166     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4167   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4168     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4169     exit 0 ;;
4170   -help | --help | --hel | --he | --h)
4171     echo "\$ac_cs_usage"; exit 0 ;;
4172   *) echo "\$ac_cs_usage"; exit 1 ;;
4173   esac
4174 done
4175
4176 ac_given_srcdir=$srcdir
4177 ac_given_INSTALL="$INSTALL"
4178
4179 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4180 EOF
4181 cat >> $CONFIG_STATUS <<EOF
4182
4183 # Protect against being on the right side of a sed subst in config.status.
4184 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4185  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4186 $ac_vpsub
4187 $extrasub
4188 s%@SHELL@%$SHELL%g
4189 s%@CFLAGS@%$CFLAGS%g
4190 s%@CPPFLAGS@%$CPPFLAGS%g
4191 s%@CXXFLAGS@%$CXXFLAGS%g
4192 s%@FFLAGS@%$FFLAGS%g
4193 s%@DEFS@%$DEFS%g
4194 s%@LDFLAGS@%$LDFLAGS%g
4195 s%@LIBS@%$LIBS%g
4196 s%@exec_prefix@%$exec_prefix%g
4197 s%@prefix@%$prefix%g
4198 s%@program_transform_name@%$program_transform_name%g
4199 s%@bindir@%$bindir%g
4200 s%@sbindir@%$sbindir%g
4201 s%@libexecdir@%$libexecdir%g
4202 s%@datadir@%$datadir%g
4203 s%@sysconfdir@%$sysconfdir%g
4204 s%@sharedstatedir@%$sharedstatedir%g
4205 s%@localstatedir@%$localstatedir%g
4206 s%@libdir@%$libdir%g
4207 s%@includedir@%$includedir%g
4208 s%@oldincludedir@%$oldincludedir%g
4209 s%@infodir@%$infodir%g
4210 s%@mandir@%$mandir%g
4211 s%@host@%$host%g
4212 s%@host_alias@%$host_alias%g
4213 s%@host_cpu@%$host_cpu%g
4214 s%@host_vendor@%$host_vendor%g
4215 s%@host_os@%$host_os%g
4216 s%@target@%$target%g
4217 s%@target_alias@%$target_alias%g
4218 s%@target_cpu@%$target_cpu%g
4219 s%@target_vendor@%$target_vendor%g
4220 s%@target_os@%$target_os%g
4221 s%@build@%$build%g
4222 s%@build_alias@%$build_alias%g
4223 s%@build_cpu@%$build_cpu%g
4224 s%@build_vendor@%$build_vendor%g
4225 s%@build_os@%$build_os%g
4226 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4227 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4228 s%@INSTALL_DATA@%$INSTALL_DATA%g
4229 s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
4230 s%@build_subdir@%$build_subdir%g
4231 s%@host_subdir@%$host_subdir%g
4232 s%@target_subdir@%$target_subdir%g
4233 /@maybe_dependencies@/r $maybe_dependencies
4234 s%@maybe_dependencies@%%g
4235 /@serialization_dependencies@/r $serialization_dependencies
4236 s%@serialization_dependencies@%%g
4237 /@host_makefile_frag@/r $host_makefile_frag
4238 s%@host_makefile_frag@%%g
4239 /@target_makefile_frag@/r $target_makefile_frag
4240 s%@target_makefile_frag@%%g
4241 /@alphaieee_frag@/r $alphaieee_frag
4242 s%@alphaieee_frag@%%g
4243 /@ospace_frag@/r $ospace_frag
4244 s%@ospace_frag@%%g
4245 s%@SET_LIB_PATH@%$SET_LIB_PATH%g
4246 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
4247 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
4248 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
4249 s%@configlinks@%$configlinks%g
4250 s%@gcc_version_trigger@%$gcc_version_trigger%g
4251 s%@gcc_version@%$gcc_version%g
4252 s%@tooldir@%$tooldir%g
4253 s%@build_tooldir@%$build_tooldir%g
4254 s%@GDB_TK@%$GDB_TK%g
4255 s%@gxx_include_dir@%$gxx_include_dir%g
4256 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
4257 s%@build_configargs@%$build_configargs%g
4258 s%@configure_build_modules@%$configure_build_modules%g
4259 s%@all_build_modules@%$all_build_modules%g
4260 s%@host_configargs@%$host_configargs%g
4261 s%@configdirs@%$configdirs%g
4262 s%@target_configargs@%$target_configargs%g
4263 s%@target_configdirs@%$target_configdirs%g
4264 s%@BISON@%$BISON%g
4265 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4266 s%@LEX@%$LEX%g
4267 s%@MAKEINFO@%$MAKEINFO%g
4268 s%@YACC@%$YACC%g
4269 s%@config_shell@%$config_shell%g
4270 s%@AR@%$AR%g
4271 s%@ncn_cv_AR@%$ncn_cv_AR%g
4272 s%@AS@%$AS%g
4273 s%@ncn_cv_AS@%$ncn_cv_AS%g
4274 s%@DLLTOOL@%$DLLTOOL%g
4275 s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
4276 s%@LD@%$LD%g
4277 s%@ncn_cv_LD@%$ncn_cv_LD%g
4278 s%@NM@%$NM%g
4279 s%@ncn_cv_NM@%$ncn_cv_NM%g
4280 s%@RANLIB@%$RANLIB%g
4281 s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
4282 s%@WINDRES@%$WINDRES%g
4283 s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
4284 s%@OBJCOPY@%$OBJCOPY%g
4285 s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
4286 s%@OBJDUMP@%$OBJDUMP%g
4287 s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
4288 s%@CC@%$CC%g
4289 s%@CXX@%$CXX%g
4290 s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
4291 s%@DEFAULT_YACC@%$DEFAULT_YACC%g
4292 s%@DEFAULT_LEX@%$DEFAULT_LEX%g
4293 s%@DEFAULT_M4@%$DEFAULT_M4%g
4294 s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
4295 s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
4296 s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
4297 s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
4298 s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
4299 s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
4300 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
4301 s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
4302 s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
4303 s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
4304 s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
4305 s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
4306 s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
4307 s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
4308 s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
4309 s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
4310 s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
4311 s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
4312 s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
4313 s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
4314 s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
4315 s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
4316 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
4317 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
4318 s%@MAINT@%$MAINT%g
4319
4320 CEOF
4321 EOF
4322
4323 cat >> $CONFIG_STATUS <<\EOF
4324
4325 # Split the substitutions into bite-sized pieces for seds with
4326 # small command number limits, like on Digital OSF/1 and HP-UX.
4327 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4328 ac_file=1 # Number of current file.
4329 ac_beg=1 # First line for current file.
4330 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4331 ac_more_lines=:
4332 ac_sed_cmds=""
4333 while $ac_more_lines; do
4334   if test $ac_beg -gt 1; then
4335     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4336   else
4337     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4338   fi
4339   if test ! -s conftest.s$ac_file; then
4340     ac_more_lines=false
4341     rm -f conftest.s$ac_file
4342   else
4343     if test -z "$ac_sed_cmds"; then
4344       ac_sed_cmds="sed -f conftest.s$ac_file"
4345     else
4346       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4347     fi
4348     ac_file=`expr $ac_file + 1`
4349     ac_beg=$ac_end
4350     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4351   fi
4352 done
4353 if test -z "$ac_sed_cmds"; then
4354   ac_sed_cmds=cat
4355 fi
4356 EOF
4357
4358 cat >> $CONFIG_STATUS <<EOF
4359
4360 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4361 EOF
4362 cat >> $CONFIG_STATUS <<\EOF
4363 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4364   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4365   case "$ac_file" in
4366   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4367        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4368   *) ac_file_in="${ac_file}.in" ;;
4369   esac
4370
4371   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4372
4373   # Remove last slash and all that follows it.  Not all systems have dirname.
4374   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4375   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4376     # The file is in a subdirectory.
4377     test ! -d "$ac_dir" && mkdir "$ac_dir"
4378     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4379     # A "../" for each directory in $ac_dir_suffix.
4380     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4381   else
4382     ac_dir_suffix= ac_dots=
4383   fi
4384
4385   case "$ac_given_srcdir" in
4386   .)  srcdir=.
4387       if test -z "$ac_dots"; then top_srcdir=.
4388       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4389   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4390   *) # Relative path.
4391     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4392     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4393   esac
4394
4395   case "$ac_given_INSTALL" in
4396   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4397   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4398   esac
4399
4400   echo creating "$ac_file"
4401   rm -f "$ac_file"
4402   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4403   case "$ac_file" in
4404   *Makefile*) ac_comsub="1i\\
4405 # $configure_input" ;;
4406   *) ac_comsub= ;;
4407   esac
4408
4409   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4410   sed -e "$ac_comsub
4411 s%@configure_input@%$configure_input%g
4412 s%@srcdir@%$srcdir%g
4413 s%@top_srcdir@%$top_srcdir%g
4414 s%@INSTALL@%$INSTALL%g
4415 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4416 fi; done
4417 rm -f conftest.s*
4418
4419 EOF
4420 cat >> $CONFIG_STATUS <<EOF
4421
4422 EOF
4423 cat >> $CONFIG_STATUS <<\EOF
4424
4425 exit 0
4426 EOF
4427 chmod +x $CONFIG_STATUS
4428 rm -fr confdefs* $ac_clean_files
4429 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4430