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