OSDN Git Service

update copyrights
[pf3gnuchains/gcc-fork.git] / gcc / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-gnu-ld           arrange to work with GNU ld."
16 ac_help="$ac_help
17   --with-ld               arrange to use the specified ld (full pathname)."
18 ac_help="$ac_help
19   --with-gnu-as           arrange to work with GNU as."
20 ac_help="$ac_help
21   --with-as               arrange to use the specified as (full pathname)."
22 ac_help="$ac_help
23   --with-stabs            arrange to use stabs instead of host debug format."
24 ac_help="$ac_help
25   --with-elf              arrange to use ELF instead of host debug format."
26 ac_help="$ac_help
27   --with-local-prefix=DIR specifies directory to put local include."
28 ac_help="$ac_help
29   --with-gxx-include-dir=DIR
30                           specifies directory to put g++ header files."
31 ac_help="$ac_help
32   --enable-checking       enable expensive run-time checks."
33 ac_help="$ac_help
34   --enable-cpplib         use cpplib for the C preprocessor."
35 ac_help="$ac_help
36   --enable-c-cpplib       link cpplib directly into C and C++ compilers
37                           (implies --enable-cpplib)."
38 ac_help="$ac_help
39   --enable-c-mbchar       enable multibyte characters for C and C++."
40 ac_help="$ac_help
41   --enable-haifa          use the experimental scheduler.
42   --disable-haifa         don't use the experimental scheduler for the
43                           targets which normally enable it."
44 ac_help="$ac_help
45   --with-fast-fixincludes    use a faster fixinclude program (experimental)"
46 ac_help="$ac_help
47   --enable-init-priority  use attributes to assign initialization order
48                           for static objects.
49   --disable-init-priority conform to ISO C++ rules for ordering static objects
50                           (i.e. initialized in order of declaration). "
51 ac_help="$ac_help
52   --enable-threads        enable thread usage for target GCC.
53   --enable-threads=LIB    use LIB thread package for target GCC."
54 ac_help="$ac_help
55   --enable-objc-gc        enable the use of Boehm's garbage collector with
56                           the GNU Objective-C runtime."
57 ac_help="$ac_help
58   --enable-java-gc=TYPE   choose garbage collector [boehm]"
59
60 # Initialize some variables set by options.
61 # The variables have the same names as the options, with
62 # dashes changed to underlines.
63 build=NONE
64 cache_file=./config.cache
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81 bindir='${exec_prefix}/bin'
82 sbindir='${exec_prefix}/sbin'
83 libexecdir='${exec_prefix}/libexec'
84 datadir='${prefix}/share'
85 sysconfdir='${prefix}/etc'
86 sharedstatedir='${prefix}/com'
87 localstatedir='${prefix}/var'
88 libdir='${exec_prefix}/lib'
89 includedir='${prefix}/include'
90 oldincludedir='/usr/include'
91 infodir='${prefix}/info'
92 mandir='${prefix}/man'
93
94 # Initialize some other variables.
95 subdirs=
96 MFLAGS= MAKEFLAGS=
97 SHELL=${CONFIG_SHELL-/bin/sh}
98 # Maximum number of lines to put in a shell here document.
99 ac_max_here_lines=12
100
101 ac_prev=
102 for ac_option
103 do
104
105   # If the previous option needs an argument, assign it.
106   if test -n "$ac_prev"; then
107     eval "$ac_prev=\$ac_option"
108     ac_prev=
109     continue
110   fi
111
112   case "$ac_option" in
113   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
114   *) ac_optarg= ;;
115   esac
116
117   # Accept the important Cygnus configure options, so we can diagnose typos.
118
119   case "$ac_option" in
120
121   -bindir | --bindir | --bindi | --bind | --bin | --bi)
122     ac_prev=bindir ;;
123   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
124     bindir="$ac_optarg" ;;
125
126   -build | --build | --buil | --bui | --bu)
127     ac_prev=build ;;
128   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
129     build="$ac_optarg" ;;
130
131   -cache-file | --cache-file | --cache-fil | --cache-fi \
132   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
133     ac_prev=cache_file ;;
134   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
135   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
136     cache_file="$ac_optarg" ;;
137
138   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
139     ac_prev=datadir ;;
140   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
141   | --da=*)
142     datadir="$ac_optarg" ;;
143
144   -disable-* | --disable-*)
145     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
146     # Reject names that are not valid shell variable names.
147     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
148       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
149     fi
150     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151     eval "enable_${ac_feature}=no" ;;
152
153   -enable-* | --enable-*)
154     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
155     # Reject names that are not valid shell variable names.
156     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
157       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158     fi
159     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160     case "$ac_option" in
161       *=*) ;;
162       *) ac_optarg=yes ;;
163     esac
164     eval "enable_${ac_feature}='$ac_optarg'" ;;
165
166   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
167   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
168   | --exec | --exe | --ex)
169     ac_prev=exec_prefix ;;
170   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
171   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
172   | --exec=* | --exe=* | --ex=*)
173     exec_prefix="$ac_optarg" ;;
174
175   -gas | --gas | --ga | --g)
176     # Obsolete; use --with-gas.
177     with_gas=yes ;;
178
179   -help | --help | --hel | --he)
180     # Omit some internal or obsolete options to make the list less imposing.
181     # This message is too long to be a string in the A/UX 3.1 sh.
182     cat << EOF
183 Usage: configure [options] [host]
184 Options: [defaults in brackets after descriptions]
185 Configuration:
186   --cache-file=FILE       cache test results in FILE
187   --help                  print this message
188   --no-create             do not create output files
189   --quiet, --silent       do not print \`checking...' messages
190   --version               print the version of autoconf that created configure
191 Directory and file names:
192   --prefix=PREFIX         install architecture-independent files in PREFIX
193                           [$ac_default_prefix]
194   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
195                           [same as prefix]
196   --bindir=DIR            user executables in DIR [EPREFIX/bin]
197   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
198   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
199   --datadir=DIR           read-only architecture-independent data in DIR
200                           [PREFIX/share]
201   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
202   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
203                           [PREFIX/com]
204   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
205   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
206   --includedir=DIR        C header files in DIR [PREFIX/include]
207   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
208   --infodir=DIR           info documentation in DIR [PREFIX/info]
209   --mandir=DIR            man documentation in DIR [PREFIX/man]
210   --srcdir=DIR            find the sources in DIR [configure dir or ..]
211   --program-prefix=PREFIX prepend PREFIX to installed program names
212   --program-suffix=SUFFIX append SUFFIX to installed program names
213   --program-transform-name=PROGRAM
214                           run sed PROGRAM on installed program names
215 EOF
216     cat << EOF
217 Host type:
218   --build=BUILD           configure for building on BUILD [BUILD=HOST]
219   --host=HOST             configure for HOST [guessed]
220   --target=TARGET         configure for TARGET [TARGET=HOST]
221 Features and packages:
222   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
223   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
224   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
225   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
226   --x-includes=DIR        X include files are in DIR
227   --x-libraries=DIR       X library files are in DIR
228 EOF
229     if test -n "$ac_help"; then
230       echo "--enable and --with options recognized:$ac_help"
231     fi
232     exit 0 ;;
233
234   -host | --host | --hos | --ho)
235     ac_prev=host ;;
236   -host=* | --host=* | --hos=* | --ho=*)
237     host="$ac_optarg" ;;
238
239   -includedir | --includedir | --includedi | --included | --include \
240   | --includ | --inclu | --incl | --inc)
241     ac_prev=includedir ;;
242   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
243   | --includ=* | --inclu=* | --incl=* | --inc=*)
244     includedir="$ac_optarg" ;;
245
246   -infodir | --infodir | --infodi | --infod | --info | --inf)
247     ac_prev=infodir ;;
248   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
249     infodir="$ac_optarg" ;;
250
251   -libdir | --libdir | --libdi | --libd)
252     ac_prev=libdir ;;
253   -libdir=* | --libdir=* | --libdi=* | --libd=*)
254     libdir="$ac_optarg" ;;
255
256   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
257   | --libexe | --libex | --libe)
258     ac_prev=libexecdir ;;
259   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
260   | --libexe=* | --libex=* | --libe=*)
261     libexecdir="$ac_optarg" ;;
262
263   -localstatedir | --localstatedir | --localstatedi | --localstated \
264   | --localstate | --localstat | --localsta | --localst \
265   | --locals | --local | --loca | --loc | --lo)
266     ac_prev=localstatedir ;;
267   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
268   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
269   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
270     localstatedir="$ac_optarg" ;;
271
272   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
273     ac_prev=mandir ;;
274   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
275     mandir="$ac_optarg" ;;
276
277   -nfp | --nfp | --nf)
278     # Obsolete; use --without-fp.
279     with_fp=no ;;
280
281   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
282   | --no-cr | --no-c)
283     no_create=yes ;;
284
285   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
286   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
287     no_recursion=yes ;;
288
289   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
290   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
291   | --oldin | --oldi | --old | --ol | --o)
292     ac_prev=oldincludedir ;;
293   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
294   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
295   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
296     oldincludedir="$ac_optarg" ;;
297
298   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
299     ac_prev=prefix ;;
300   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
301     prefix="$ac_optarg" ;;
302
303   -program-prefix | --program-prefix | --program-prefi | --program-pref \
304   | --program-pre | --program-pr | --program-p)
305     ac_prev=program_prefix ;;
306   -program-prefix=* | --program-prefix=* | --program-prefi=* \
307   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
308     program_prefix="$ac_optarg" ;;
309
310   -program-suffix | --program-suffix | --program-suffi | --program-suff \
311   | --program-suf | --program-su | --program-s)
312     ac_prev=program_suffix ;;
313   -program-suffix=* | --program-suffix=* | --program-suffi=* \
314   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
315     program_suffix="$ac_optarg" ;;
316
317   -program-transform-name | --program-transform-name \
318   | --program-transform-nam | --program-transform-na \
319   | --program-transform-n | --program-transform- \
320   | --program-transform | --program-transfor \
321   | --program-transfo | --program-transf \
322   | --program-trans | --program-tran \
323   | --progr-tra | --program-tr | --program-t)
324     ac_prev=program_transform_name ;;
325   -program-transform-name=* | --program-transform-name=* \
326   | --program-transform-nam=* | --program-transform-na=* \
327   | --program-transform-n=* | --program-transform-=* \
328   | --program-transform=* | --program-transfor=* \
329   | --program-transfo=* | --program-transf=* \
330   | --program-trans=* | --program-tran=* \
331   | --progr-tra=* | --program-tr=* | --program-t=*)
332     program_transform_name="$ac_optarg" ;;
333
334   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
335   | -silent | --silent | --silen | --sile | --sil)
336     silent=yes ;;
337
338   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
339     ac_prev=sbindir ;;
340   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
341   | --sbi=* | --sb=*)
342     sbindir="$ac_optarg" ;;
343
344   -sharedstatedir | --sharedstatedir | --sharedstatedi \
345   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
346   | --sharedst | --shareds | --shared | --share | --shar \
347   | --sha | --sh)
348     ac_prev=sharedstatedir ;;
349   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
350   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
351   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
352   | --sha=* | --sh=*)
353     sharedstatedir="$ac_optarg" ;;
354
355   -site | --site | --sit)
356     ac_prev=site ;;
357   -site=* | --site=* | --sit=*)
358     site="$ac_optarg" ;;
359
360   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
361     ac_prev=srcdir ;;
362   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
363     srcdir="$ac_optarg" ;;
364
365   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
366   | --syscon | --sysco | --sysc | --sys | --sy)
367     ac_prev=sysconfdir ;;
368   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
369   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
370     sysconfdir="$ac_optarg" ;;
371
372   -target | --target | --targe | --targ | --tar | --ta | --t)
373     ac_prev=target ;;
374   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
375     target="$ac_optarg" ;;
376
377   -v | -verbose | --verbose | --verbos | --verbo | --verb)
378     verbose=yes ;;
379
380   -version | --version | --versio | --versi | --vers)
381     echo "configure generated by autoconf version 2.12.1"
382     exit 0 ;;
383
384   -with-* | --with-*)
385     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
386     # Reject names that are not valid shell variable names.
387     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
388       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389     fi
390     ac_package=`echo $ac_package| sed 's/-/_/g'`
391     case "$ac_option" in
392       *=*) ;;
393       *) ac_optarg=yes ;;
394     esac
395     eval "with_${ac_package}='$ac_optarg'" ;;
396
397   -without-* | --without-*)
398     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
399     # Reject names that are not valid shell variable names.
400     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
401       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402     fi
403     ac_package=`echo $ac_package| sed 's/-/_/g'`
404     eval "with_${ac_package}=no" ;;
405
406   --x)
407     # Obsolete; use --with-x.
408     with_x=yes ;;
409
410   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
411   | --x-incl | --x-inc | --x-in | --x-i)
412     ac_prev=x_includes ;;
413   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
414   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
415     x_includes="$ac_optarg" ;;
416
417   -x-libraries | --x-libraries | --x-librarie | --x-librari \
418   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
419     ac_prev=x_libraries ;;
420   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
421   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
422     x_libraries="$ac_optarg" ;;
423
424   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
425     ;;
426
427   *)
428     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
429       echo "configure: warning: $ac_option: invalid host type" 1>&2
430     fi
431     if test "x$nonopt" != xNONE; then
432       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
433     fi
434     nonopt="$ac_option"
435     ;;
436
437   esac
438 done
439
440 if test -n "$ac_prev"; then
441   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
442 fi
443
444 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
445
446 # File descriptor usage:
447 # 0 standard input
448 # 1 file creation
449 # 2 errors and warnings
450 # 3 some systems may open it to /dev/tty
451 # 4 used on the Kubota Titan
452 # 6 checking for... messages and results
453 # 5 compiler messages saved in config.log
454 if test "$silent" = yes; then
455   exec 6>/dev/null
456 else
457   exec 6>&1
458 fi
459 exec 5>./config.log
460
461 echo "\
462 This file contains any messages produced by compilers while
463 running configure, to aid debugging if configure makes a mistake.
464 " 1>&5
465
466 # Strip out --no-create and --no-recursion so they do not pile up.
467 # Also quote any args containing shell metacharacters.
468 ac_configure_args=
469 for ac_arg
470 do
471   case "$ac_arg" in
472   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
473   | --no-cr | --no-c) ;;
474   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
476   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
477   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
478   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
479   esac
480 done
481
482 # NLS nuisances.
483 # Only set these to C if already set.  These must not be set unconditionally
484 # because not all systems understand e.g. LANG=C (notably SCO).
485 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
486 # Non-C LC_CTYPE values break the ctype check.
487 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
488 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
489 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
490 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
491
492 # confdefs.h avoids OS command line length limits that DEFS can exceed.
493 rm -rf conftest* confdefs.h
494 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
495 echo > confdefs.h
496
497 # A filename unique to this package, relative to the directory that
498 # configure is in, which we can look for to find out if srcdir is correct.
499 ac_unique_file=tree.c
500
501 # Find the source files, if location was not specified.
502 if test -z "$srcdir"; then
503   ac_srcdir_defaulted=yes
504   # Try the directory containing this script, then its parent.
505   ac_prog=$0
506   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
507   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
508   srcdir=$ac_confdir
509   if test ! -r $srcdir/$ac_unique_file; then
510     srcdir=..
511   fi
512 else
513   ac_srcdir_defaulted=no
514 fi
515 if test ! -r $srcdir/$ac_unique_file; then
516   if test "$ac_srcdir_defaulted" = yes; then
517     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
518   else
519     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
520   fi
521 fi
522 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
523
524 # Prefer explicitly selected file to automatically selected ones.
525 if test -z "$CONFIG_SITE"; then
526   if test "x$prefix" != xNONE; then
527     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
528   else
529     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
530   fi
531 fi
532 for ac_site_file in $CONFIG_SITE; do
533   if test -r "$ac_site_file"; then
534     echo "loading site script $ac_site_file"
535     . "$ac_site_file"
536   fi
537 done
538
539 if test -r "$cache_file"; then
540   echo "loading cache $cache_file"
541   . $cache_file
542 else
543   echo "creating cache $cache_file"
544   > $cache_file
545 fi
546
547 ac_ext=c
548 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
549 ac_cpp='$CPP $CPPFLAGS'
550 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
551 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
552 cross_compiling=$ac_cv_prog_cc_cross
553
554 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
555   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
556   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
557     ac_n= ac_c='
558 ' ac_t='        '
559   else
560     ac_n=-n ac_c= ac_t=
561   fi
562 else
563   ac_n= ac_c='\c' ac_t=
564 fi
565
566
567
568
569 remove=rm
570 hard_link=ln
571 symbolic_link='ln -s'
572 copy=cp
573
574 # Check for bogus environment variables.
575 # Test if LIBRARY_PATH contains the notation for the current directory
576 # since this would lead to problems installing/building glibc.
577 # LIBRARY_PATH contains the current directory if one of the following
578 # is true:
579 # - one of the terminals (":" and ";") is the first or last sign
580 # - two terminals occur directly after each other
581 # - the path contains an element with a dot in it
582 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
583 echo "configure:584: checking LIBRARY_PATH variable" >&5
584 case ${LIBRARY_PATH} in
585   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
586     library_path_setting="contains current directory"
587     ;;
588   *)
589     library_path_setting="ok"
590     ;;
591 esac
592 echo "$ac_t""$library_path_setting" 1>&6
593 if test "$library_path_setting" != "ok"; then
594 { echo "configure: error: 
595 *** LIBRARY_PATH shouldn't contain the current directory when
596 *** building egcs. Please change the environment variable
597 *** and run configure again." 1>&2; exit 1; }
598 fi
599
600 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
601 # since this would lead to problems installing/building glibc.
602 # GCC_EXEC_PREFIX contains the current directory if one of the following
603 # is true:
604 # - one of the terminals (":" and ";") is the first or last sign
605 # - two terminals occur directly after each other
606 # - the path contains an element with a dot in it
607 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
608 echo "configure:609: checking GCC_EXEC_PREFIX variable" >&5
609 case ${GCC_EXEC_PREFIX} in
610   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
611     gcc_exec_prefix_setting="contains current directory"
612     ;;
613   *)
614     gcc_exec_prefix_setting="ok"
615     ;;
616 esac
617 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
618 if test "$gcc_exec_prefix_setting" != "ok"; then
619 { echo "configure: error: 
620 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
621 *** building egcs. Please change the environment variable
622 *** and run configure again." 1>&2; exit 1; }
623 fi
624
625 # Check for additional parameters
626
627 # With GNU ld
628 # Check whether --with-gnu-ld or --without-gnu-ld was given.
629 if test "${with_gnu_ld+set}" = set; then
630   withval="$with_gnu_ld"
631   gnu_ld_flag="$with_gnu_ld"
632 else
633   gnu_ld_flag=no
634 fi
635
636
637 # With pre-defined ld
638 # Check whether --with-ld or --without-ld was given.
639 if test "${with_ld+set}" = set; then
640   withval="$with_ld"
641   DEFAULT_LINKER="$with_ld"
642 fi
643
644 if test x"${DEFAULT_LINKER+set}" = x"set"; then
645   if test ! -x "$DEFAULT_LINKER"; then
646     echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
647   elif test "GNU" = `$DEFAULT_LINKER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
648     gnu_ld_flag=yes
649   fi
650   cat >> confdefs.h <<EOF
651 #define DEFAULT_LINKER "$DEFAULT_LINKER"
652 EOF
653
654 fi
655
656 # With GNU as
657 # Check whether --with-gnu-as or --without-gnu-as was given.
658 if test "${with_gnu_as+set}" = set; then
659   withval="$with_gnu_as"
660   gas_flag="$with_gnu_as"
661 else
662   gas_flag=no
663 fi
664
665
666 # Check whether --with-as or --without-as was given.
667 if test "${with_as+set}" = set; then
668   withval="$with_as"
669   DEFAULT_ASSEMBLER="$with_as"
670 fi
671
672 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
673   if test ! -x "$DEFAULT_ASSEMBLER"; then
674     echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
675   elif test "GNU" = `$DEFAULT_ASSEMBLER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
676     gas_flag=yes
677   fi
678   cat >> confdefs.h <<EOF
679 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
680 EOF
681
682 fi
683
684 # With stabs
685 # Check whether --with-stabs or --without-stabs was given.
686 if test "${with_stabs+set}" = set; then
687   withval="$with_stabs"
688   stabs="$with_stabs"
689 else
690   stabs=no
691 fi
692
693
694 # With ELF
695 # Check whether --with-elf or --without-elf was given.
696 if test "${with_elf+set}" = set; then
697   withval="$with_elf"
698   elf="$with_elf"
699 else
700   elf=no
701 fi
702
703
704 # Specify the local prefix
705 local_prefix=
706 # Check whether --with-local-prefix or --without-local-prefix was given.
707 if test "${with_local_prefix+set}" = set; then
708   withval="$with_local_prefix"
709   case "${withval}" in
710 yes)    { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
711 no)     ;;
712 *)      local_prefix=$with_local_prefix ;;
713 esac
714 fi
715
716
717 # Default local prefix if it is empty
718 if test x$local_prefix = x; then
719         local_prefix=/usr/local
720 fi
721
722 gxx_include_dir=
723 # Specify the g++ header file directory
724 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
725 if test "${with_gxx_include_dir+set}" = set; then
726   withval="$with_gxx_include_dir"
727   case "${withval}" in
728 yes)    { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
729 no)     ;;
730 *)      gxx_include_dir=$with_gxx_include_dir ;;
731 esac
732 fi
733
734
735 if test x${gxx_include_dir} = x; then
736   if test x${enable_version_specific_runtime_libs} = xyes; then
737     gxx_include_dir='${libsubdir}/include/g++'
738   else
739     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
740     gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
741   fi
742 fi
743
744 # Enable expensive internal checks
745 # Check whether --enable-checking or --disable-checking was given.
746 if test "${enable_checking+set}" = set; then
747   enableval="$enable_checking"
748   case "${enableval}" in
749 yes)    cat >> confdefs.h <<\EOF
750 #define ENABLE_CHECKING 1
751 EOF
752  ;;
753 no)     ;;
754 *)      { echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;;
755 esac
756 fi
757
758
759 # Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
760 cpp_main=cccp
761 # Check whether --enable-cpplib or --disable-cpplib was given.
762 if test "${enable_cpplib+set}" = set; then
763   enableval="$enable_cpplib"
764   if test x$enable_cpplib != xno; then
765   cpp_main=cppmain
766 fi
767 fi
768
769
770 # Link cpplib into the compiler proper, for C/C++/ObjC.
771 # Check whether --enable-c-cpplib or --disable-c-cpplib was given.
772 if test "${enable_c_cpplib+set}" = set; then
773   enableval="$enable_c_cpplib"
774   if test x$enable_c_cpplib != xno; then
775   extra_c_objs="${extra_c_objs} libcpp.a"
776   extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
777   extra_c_flags=-DUSE_CPPLIB=1
778   cpp_main=cppmain
779 fi
780 fi
781
782
783 # Enable Multibyte Characters for C/C++
784 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
785 if test "${enable_c_mbchar+set}" = set; then
786   enableval="$enable_c_mbchar"
787   if test x$enable_c_mbchar != xno; then
788   extra_c_flags=-DMULTIBYTE_CHARS=1
789 fi
790 fi
791
792   
793 # Enable Haifa scheduler.
794 # Check whether --enable-haifa or --disable-haifa was given.
795 if test "${enable_haifa+set}" = set; then
796   enableval="$enable_haifa"
797   :
798 fi
799
800 # Fast fixincludes
801 #
802 # This is a work in progress...
803 # Check whether --with-fast-fixincludes or --without-fast-fixincludes was given.
804 if test "${with_fast_fixincludes+set}" = set; then
805   withval="$with_fast_fixincludes"
806   fast_fixinc="$with_fast_fixincludes"
807 else
808   fast_fixinc=no
809 fi
810
811
812 # Enable init_priority.
813 # Check whether --enable-init-priority or --disable-init-priority was given.
814 if test "${enable_init_priority+set}" = set; then
815   enableval="$enable_init_priority"
816   if test x$enable_init_priority != xno; then
817   extra_c_flags=-DUSE_INIT_PRIORITY
818 fi
819 fi
820
821
822 # Enable threads
823 # Pass with no value to take the default
824 # Pass with a value to specify a thread package
825 # Check whether --enable-threads or --disable-threads was given.
826 if test "${enable_threads+set}" = set; then
827   enableval="$enable_threads"
828   if test x$enable_threads = xno; then
829         enable_threads=''
830 fi
831 else
832   enable_threads=''
833 fi
834
835
836 enable_threads_flag=$enable_threads
837 # Check if a valid thread package
838 case x${enable_threads_flag} in
839         x | xno)
840                 # No threads
841                 target_thread_file='single'
842                 ;;
843         xyes)
844                 # default
845                 target_thread_file=''
846                 ;;
847         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
848         xsolaris | xwin32 | xdce | xvxworks)
849                 target_thread_file=$enable_threads_flag
850                 ;;
851         *)
852                 echo "$enable_threads is an unknown thread package" 1>&2
853                 exit 1
854                 ;;
855 esac
856
857 # Check whether --enable-objc-gc or --disable-objc-gc was given.
858 if test "${enable_objc_gc+set}" = set; then
859   enableval="$enable_objc_gc"
860   if [ x$enable_objc_gc = xno ]; then
861         objc_boehm_gc=''
862 else
863         objc_boehm_gc=1
864 fi
865 else
866   objc_boehm_gc=''
867 fi
868
869
870 # Check whether --enable-java-gc or --disable-java-gc was given.
871 if test "${enable_java_gc+set}" = set; then
872   enableval="$enable_java_gc"
873   
874   JAVAGC=$enableval
875 else
876   JAVAGC=boehm
877 fi
878
879
880 # Determine the host, build, and target systems
881 ac_aux_dir=
882 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
883   if test -f $ac_dir/install-sh; then
884     ac_aux_dir=$ac_dir
885     ac_install_sh="$ac_aux_dir/install-sh -c"
886     break
887   elif test -f $ac_dir/install.sh; then
888     ac_aux_dir=$ac_dir
889     ac_install_sh="$ac_aux_dir/install.sh -c"
890     break
891   fi
892 done
893 if test -z "$ac_aux_dir"; then
894   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
895 fi
896 ac_config_guess=$ac_aux_dir/config.guess
897 ac_config_sub=$ac_aux_dir/config.sub
898 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
899
900
901 # Do some error checking and defaulting for the host and target type.
902 # The inputs are:
903 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
904 #
905 # The rules are:
906 # 1. You are not allowed to specify --host, --target, and nonopt at the
907 #    same time.
908 # 2. Host defaults to nonopt.
909 # 3. If nonopt is not specified, then host defaults to the current host,
910 #    as determined by config.guess.
911 # 4. Target and build default to nonopt.
912 # 5. If nonopt is not specified, then target and build default to host.
913
914 # The aliases save the names the user supplied, while $host etc.
915 # will get canonicalized.
916 case $host---$target---$nonopt in
917 NONE---*---* | *---NONE---* | *---*---NONE) ;;
918 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
919 esac
920
921
922 # Make sure we can run config.sub.
923 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
924 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
925 fi
926
927 echo $ac_n "checking host system type""... $ac_c" 1>&6
928 echo "configure:929: checking host system type" >&5
929
930 host_alias=$host
931 case "$host_alias" in
932 NONE)
933   case $nonopt in
934   NONE)
935     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
936     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
937     fi ;;
938   *) host_alias=$nonopt ;;
939   esac ;;
940 esac
941
942 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
943 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 echo "$ac_t""$host" 1>&6
947
948 echo $ac_n "checking target system type""... $ac_c" 1>&6
949 echo "configure:950: checking target system type" >&5
950
951 target_alias=$target
952 case "$target_alias" in
953 NONE)
954   case $nonopt in
955   NONE) target_alias=$host_alias ;;
956   *) target_alias=$nonopt ;;
957   esac ;;
958 esac
959
960 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
961 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
962 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
963 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
964 echo "$ac_t""$target" 1>&6
965
966 echo $ac_n "checking build system type""... $ac_c" 1>&6
967 echo "configure:968: checking build system type" >&5
968
969 build_alias=$build
970 case "$build_alias" in
971 NONE)
972   case $nonopt in
973   NONE) build_alias=$host_alias ;;
974   *) build_alias=$nonopt ;;
975   esac ;;
976 esac
977
978 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
979 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
980 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
981 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
982 echo "$ac_t""$build" 1>&6
983
984 test "$host_alias" != "$target_alias" &&
985   test "$program_prefix$program_suffix$program_transform_name" = \
986     NONENONEs,x,x, &&
987   program_prefix=${target_alias}-
988
989
990 # Find the native compiler
991 # Extract the first word of "gcc", so it can be a program name with args.
992 set dummy gcc; ac_word=$2
993 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
994 echo "configure:995: checking for $ac_word" >&5
995 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   if test -n "$CC"; then
999   ac_cv_prog_CC="$CC" # Let the user override the test.
1000 else
1001   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1002   for ac_dir in $PATH; do
1003     test -z "$ac_dir" && ac_dir=.
1004     if test -f $ac_dir/$ac_word; then
1005       ac_cv_prog_CC="gcc"
1006       break
1007     fi
1008   done
1009   IFS="$ac_save_ifs"
1010 fi
1011 fi
1012 CC="$ac_cv_prog_CC"
1013 if test -n "$CC"; then
1014   echo "$ac_t""$CC" 1>&6
1015 else
1016   echo "$ac_t""no" 1>&6
1017 fi
1018
1019 if test -z "$CC"; then
1020   # Extract the first word of "cc", so it can be a program name with args.
1021 set dummy cc; ac_word=$2
1022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1023 echo "configure:1024: checking for $ac_word" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   if test -n "$CC"; then
1028   ac_cv_prog_CC="$CC" # Let the user override the test.
1029 else
1030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1031   ac_prog_rejected=no
1032   for ac_dir in $PATH; do
1033     test -z "$ac_dir" && ac_dir=.
1034     if test -f $ac_dir/$ac_word; then
1035       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1036         ac_prog_rejected=yes
1037         continue
1038       fi
1039       ac_cv_prog_CC="cc"
1040       break
1041     fi
1042   done
1043   IFS="$ac_save_ifs"
1044 if test $ac_prog_rejected = yes; then
1045   # We found a bogon in the path, so make sure we never use it.
1046   set dummy $ac_cv_prog_CC
1047   shift
1048   if test $# -gt 0; then
1049     # We chose a different compiler from the bogus one.
1050     # However, it has the same basename, so the bogon will be chosen
1051     # first if we set CC to just the basename; use the full file name.
1052     shift
1053     set dummy "$ac_dir/$ac_word" "$@"
1054     shift
1055     ac_cv_prog_CC="$@"
1056   fi
1057 fi
1058 fi
1059 fi
1060 CC="$ac_cv_prog_CC"
1061 if test -n "$CC"; then
1062   echo "$ac_t""$CC" 1>&6
1063 else
1064   echo "$ac_t""no" 1>&6
1065 fi
1066
1067   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1068 fi
1069
1070 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1072
1073 ac_ext=c
1074 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1075 ac_cpp='$CPP $CPPFLAGS'
1076 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1077 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1078 cross_compiling=$ac_cv_prog_cc_cross
1079
1080 cat > conftest.$ac_ext <<EOF
1081 #line 1082 "configure"
1082 #include "confdefs.h"
1083 main(){return(0);}
1084 EOF
1085 if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1086   ac_cv_prog_cc_works=yes
1087   # If we can't run a trivial program, we are probably using a cross compiler.
1088   if (./conftest; exit) 2>/dev/null; then
1089     ac_cv_prog_cc_cross=no
1090   else
1091     ac_cv_prog_cc_cross=yes
1092   fi
1093 else
1094   echo "configure: failed program was:" >&5
1095   cat conftest.$ac_ext >&5
1096   ac_cv_prog_cc_works=no
1097 fi
1098 rm -fr conftest*
1099
1100 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1101 if test $ac_cv_prog_cc_works = no; then
1102   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1103 fi
1104 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1105 echo "configure:1106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1106 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1107 cross_compiling=$ac_cv_prog_cc_cross
1108
1109 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1110 echo "configure:1111: checking whether we are using GNU C" >&5
1111 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1112   echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114   cat > conftest.c <<EOF
1115 #ifdef __GNUC__
1116   yes;
1117 #endif
1118 EOF
1119 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1120   ac_cv_prog_gcc=yes
1121 else
1122   ac_cv_prog_gcc=no
1123 fi
1124 fi
1125
1126 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1127
1128 if test $ac_cv_prog_gcc = yes; then
1129   GCC=yes
1130   ac_test_CFLAGS="${CFLAGS+set}"
1131   ac_save_CFLAGS="$CFLAGS"
1132   CFLAGS=
1133   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1134 echo "configure:1135: checking whether ${CC-cc} accepts -g" >&5
1135 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1136   echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138   echo 'void f(){}' > conftest.c
1139 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1140   ac_cv_prog_cc_g=yes
1141 else
1142   ac_cv_prog_cc_g=no
1143 fi
1144 rm -f conftest*
1145
1146 fi
1147
1148 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1149   if test "$ac_test_CFLAGS" = set; then
1150     CFLAGS="$ac_save_CFLAGS"
1151   elif test $ac_cv_prog_cc_g = yes; then
1152     CFLAGS="-g -O2"
1153   else
1154     CFLAGS="-O2"
1155   fi
1156 else
1157   GCC=
1158   test "${CFLAGS+set}" = set || CFLAGS="-g"
1159 fi
1160
1161
1162 # If the native compiler is GCC, we can enable warnings even in stage1.  
1163 # That's useful for people building cross-compilers, or just running a
1164 # quick `make'.
1165 if test "x$GCC" = "xyes"; then 
1166   stage1_warn_cflags='$(WARN_CFLAGS)'
1167 else
1168   stage1_warn_cflags=""
1169 fi
1170
1171
1172 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1173 echo "configure:1174: checking whether ${MAKE-make} sets \${MAKE}" >&5
1174 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1175 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   cat > conftestmake <<\EOF
1179 all:
1180         @echo 'ac_maketemp="${MAKE}"'
1181 EOF
1182 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1183 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1184 if test -n "$ac_maketemp"; then
1185   eval ac_cv_prog_make_${ac_make}_set=yes
1186 else
1187   eval ac_cv_prog_make_${ac_make}_set=no
1188 fi
1189 rm -f conftestmake
1190 fi
1191 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1192   echo "$ac_t""yes" 1>&6
1193   SET_MAKE=
1194 else
1195   echo "$ac_t""no" 1>&6
1196   SET_MAKE="MAKE=${MAKE-make}"
1197 fi
1198
1199
1200 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1201 echo "configure:1202: checking whether a default assembler was specified" >&5
1202 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1203     if test x"$with_gas" = x"no"; then
1204         echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1205     else
1206         echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1207     fi
1208 else
1209     echo "$ac_t""no" 1>&6
1210 fi
1211
1212 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1213 echo "configure:1214: checking whether a default linker was specified" >&5
1214 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1215     if test x"$with_gnu_ld" = x"no"; then
1216         echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1217     else
1218         echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1219     fi
1220 else
1221     echo "$ac_t""no" 1>&6
1222 fi
1223
1224 # Find some useful tools
1225 for ac_prog in mawk gawk nawk awk
1226 do
1227 # Extract the first word of "$ac_prog", so it can be a program name with args.
1228 set dummy $ac_prog; ac_word=$2
1229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1230 echo "configure:1231: checking for $ac_word" >&5
1231 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1232   echo $ac_n "(cached) $ac_c" 1>&6
1233 else
1234   if test -n "$AWK"; then
1235   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1236 else
1237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1238   for ac_dir in $PATH; do
1239     test -z "$ac_dir" && ac_dir=.
1240     if test -f $ac_dir/$ac_word; then
1241       ac_cv_prog_AWK="$ac_prog"
1242       break
1243     fi
1244   done
1245   IFS="$ac_save_ifs"
1246 fi
1247 fi
1248 AWK="$ac_cv_prog_AWK"
1249 if test -n "$AWK"; then
1250   echo "$ac_t""$AWK" 1>&6
1251 else
1252   echo "$ac_t""no" 1>&6
1253 fi
1254
1255 test -n "$AWK" && break
1256 done
1257
1258 # Extract the first word of "flex", so it can be a program name with args.
1259 set dummy flex; ac_word=$2
1260 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1261 echo "configure:1262: checking for $ac_word" >&5
1262 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1263   echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265   if test -n "$LEX"; then
1266   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1267 else
1268   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1269   for ac_dir in $PATH; do
1270     test -z "$ac_dir" && ac_dir=.
1271     if test -f $ac_dir/$ac_word; then
1272       ac_cv_prog_LEX="flex"
1273       break
1274     fi
1275   done
1276   IFS="$ac_save_ifs"
1277   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1278 fi
1279 fi
1280 LEX="$ac_cv_prog_LEX"
1281 if test -n "$LEX"; then
1282   echo "$ac_t""$LEX" 1>&6
1283 else
1284   echo "$ac_t""no" 1>&6
1285 fi
1286
1287 if test -z "$LEXLIB"
1288 then
1289   case "$LEX" in
1290   flex*) ac_lib=fl ;;
1291   *) ac_lib=l ;;
1292   esac
1293   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1294 echo "configure:1295: checking for yywrap in -l$ac_lib" >&5
1295 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   ac_save_LIBS="$LIBS"
1300 LIBS="-l$ac_lib  $LIBS"
1301 cat > conftest.$ac_ext <<EOF
1302 #line 1303 "configure"
1303 #include "confdefs.h"
1304 /* Override any gcc2 internal prototype to avoid an error.  */
1305 /* We use char because int might match the return type of a gcc2
1306     builtin and then its argument prototype would still apply.  */
1307 char yywrap();
1308
1309 int main() {
1310 yywrap()
1311 ; return 0; }
1312 EOF
1313 if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1314   rm -rf conftest*
1315   eval "ac_cv_lib_$ac_lib_var=yes"
1316 else
1317   echo "configure: failed program was:" >&5
1318   cat conftest.$ac_ext >&5
1319   rm -rf conftest*
1320   eval "ac_cv_lib_$ac_lib_var=no"
1321 fi
1322 rm -f conftest*
1323 LIBS="$ac_save_LIBS"
1324
1325 fi
1326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1327   echo "$ac_t""yes" 1>&6
1328   LEXLIB="-l$ac_lib"
1329 else
1330   echo "$ac_t""no" 1>&6
1331 fi
1332
1333 fi
1334
1335 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1336 echo "configure:1337: checking whether ln works" >&5
1337 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1338   echo $ac_n "(cached) $ac_c" 1>&6
1339 else
1340   rm -f conftestdata_t
1341 echo >conftestdata_f
1342 if ln conftestdata_f conftestdata_t 2>/dev/null
1343 then
1344   gcc_cv_prog_LN="ln"
1345 else
1346   if ln -s conftestdata_f conftestdata_t 2>/dev/null
1347   then
1348     gcc_cv_prog_LN="ln -s"
1349   else
1350     gcc_cv_prog_LN=cp
1351   fi
1352 fi
1353 rm -f conftestdata_f conftestdata_t
1354
1355 fi
1356 LN="$gcc_cv_prog_LN"
1357 if test "$gcc_cv_prog_LN" = "ln"; then
1358   echo "$ac_t""yes" 1>&6
1359 else
1360   if test "$gcc_cv_prog_LN" = "ln -s"; then
1361     echo "$ac_t""no, using ln -s" 1>&6
1362   else
1363     echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1364   fi
1365 fi
1366
1367 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1368 echo "configure:1369: checking whether ln -s works" >&5
1369 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1370   echo $ac_n "(cached) $ac_c" 1>&6
1371 else
1372   rm -f conftestdata_t
1373 echo >conftestdata_f
1374 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1375 then
1376   gcc_cv_prog_LN_S="ln -s"
1377 else
1378   if ln conftestdata_f conftestdata_t 2>/dev/null
1379   then
1380     gcc_cv_prog_LN_S=ln
1381   else
1382     gcc_cv_prog_LN_S=cp
1383   fi
1384 fi
1385 rm -f conftestdata_f conftestdata_t
1386
1387 fi
1388 LN_S="$gcc_cv_prog_LN_S"
1389 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1390   echo "$ac_t""yes" 1>&6
1391 else
1392   if test "$gcc_cv_prog_LN_S" = "ln"; then
1393     echo "$ac_t""no, using ln" 1>&6
1394   else
1395     echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1396   fi
1397 fi
1398
1399 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1400 echo "configure:1401: checking for volatile" >&5
1401 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1402   echo $ac_n "(cached) $ac_c" 1>&6
1403 else
1404   cat > conftest.$ac_ext <<EOF
1405 #line 1406 "configure"
1406 #include "confdefs.h"
1407
1408 int main() {
1409 volatile int foo;
1410 ; return 0; }
1411 EOF
1412 if { (eval echo configure:1413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1413   rm -rf conftest*
1414   gcc_cv_c_volatile=yes
1415 else
1416   echo "configure: failed program was:" >&5
1417   cat conftest.$ac_ext >&5
1418   rm -rf conftest*
1419   gcc_cv_c_volatile=no
1420 fi
1421 rm -f conftest*
1422 fi
1423
1424 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1425 if test $gcc_cv_c_volatile = yes ; then
1426   cat >> confdefs.h <<\EOF
1427 #define HAVE_VOLATILE 1
1428 EOF
1429
1430 fi
1431
1432 # Extract the first word of "ranlib", so it can be a program name with args.
1433 set dummy ranlib; ac_word=$2
1434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1435 echo "configure:1436: checking for $ac_word" >&5
1436 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1437   echo $ac_n "(cached) $ac_c" 1>&6
1438 else
1439   if test -n "$RANLIB"; then
1440   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1441 else
1442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1443   for ac_dir in $PATH; do
1444     test -z "$ac_dir" && ac_dir=.
1445     if test -f $ac_dir/$ac_word; then
1446       ac_cv_prog_RANLIB="ranlib"
1447       break
1448     fi
1449   done
1450   IFS="$ac_save_ifs"
1451   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1452 fi
1453 fi
1454 RANLIB="$ac_cv_prog_RANLIB"
1455 if test -n "$RANLIB"; then
1456   echo "$ac_t""$RANLIB" 1>&6
1457 else
1458   echo "$ac_t""no" 1>&6
1459 fi
1460
1461 for ac_prog in 'bison -y' byacc
1462 do
1463 # Extract the first word of "$ac_prog", so it can be a program name with args.
1464 set dummy $ac_prog; ac_word=$2
1465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1466 echo "configure:1467: checking for $ac_word" >&5
1467 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1468   echo $ac_n "(cached) $ac_c" 1>&6
1469 else
1470   if test -n "$YACC"; then
1471   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1472 else
1473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1474   for ac_dir in $PATH; do
1475     test -z "$ac_dir" && ac_dir=.
1476     if test -f $ac_dir/$ac_word; then
1477       ac_cv_prog_YACC="$ac_prog"
1478       break
1479     fi
1480   done
1481   IFS="$ac_save_ifs"
1482 fi
1483 fi
1484 YACC="$ac_cv_prog_YACC"
1485 if test -n "$YACC"; then
1486   echo "$ac_t""$YACC" 1>&6
1487 else
1488   echo "$ac_t""no" 1>&6
1489 fi
1490
1491 test -n "$YACC" && break
1492 done
1493 test -n "$YACC" || YACC="yacc"
1494
1495 # Find a good install program.  We prefer a C program (faster),
1496 # so one script is as good as another.  But avoid the broken or
1497 # incompatible versions:
1498 # SysV /etc/install, /usr/sbin/install
1499 # SunOS /usr/etc/install
1500 # IRIX /sbin/install
1501 # AIX /bin/install
1502 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1503 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1504 # ./install, which can be erroneously created by make from ./install.sh.
1505 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1506 echo "configure:1507: checking for a BSD compatible install" >&5
1507 if test -z "$INSTALL"; then
1508 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1512   for ac_dir in $PATH; do
1513     # Account for people who put trailing slashes in PATH elements.
1514     case "$ac_dir/" in
1515     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1516     *)
1517       # OSF1 and SCO ODT 3.0 have their own names for install.
1518       for ac_prog in ginstall scoinst install; do
1519         if test -f $ac_dir/$ac_prog; then
1520           if test $ac_prog = install &&
1521             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1522             # AIX install.  It has an incompatible calling convention.
1523             # OSF/1 installbsd also uses dspmsg, but is usable.
1524             :
1525           else
1526             ac_cv_path_install="$ac_dir/$ac_prog -c"
1527             break 2
1528           fi
1529         fi
1530       done
1531       ;;
1532     esac
1533   done
1534   IFS="$ac_save_IFS"
1535
1536 fi
1537   if test "${ac_cv_path_install+set}" = set; then
1538     INSTALL="$ac_cv_path_install"
1539   else
1540     # As a last resort, use the slow shell script.  We don't cache a
1541     # path for INSTALL within a source directory, because that will
1542     # break other packages using the cache if that directory is
1543     # removed, or if the path is relative.
1544     INSTALL="$ac_install_sh"
1545   fi
1546 fi
1547 echo "$ac_t""$INSTALL" 1>&6
1548
1549 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1550 # It thinks the first close brace ends the variable substitution.
1551 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1552
1553 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1554
1555
1556 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1557 echo "configure:1558: checking how to run the C preprocessor" >&5
1558 # On Suns, sometimes $CPP names a directory.
1559 if test -n "$CPP" && test -d "$CPP"; then
1560   CPP=
1561 fi
1562 if test -z "$CPP"; then
1563 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1564   echo $ac_n "(cached) $ac_c" 1>&6
1565 else
1566     # This must be in double quotes, not single quotes, because CPP may get
1567   # substituted into the Makefile and "${CC-cc}" will confuse make.
1568   CPP="${CC-cc} -E"
1569   # On the NeXT, cc -E runs the code through the compiler's parser,
1570   # not just through cpp.
1571   cat > conftest.$ac_ext <<EOF
1572 #line 1573 "configure"
1573 #include "confdefs.h"
1574 #include <assert.h>
1575 Syntax Error
1576 EOF
1577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1578 { (eval echo configure:1579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1579 ac_err=`grep -v '^ *+' conftest.out`
1580 if test -z "$ac_err"; then
1581   :
1582 else
1583   echo "$ac_err" >&5
1584   echo "configure: failed program was:" >&5
1585   cat conftest.$ac_ext >&5
1586   rm -rf conftest*
1587   CPP="${CC-cc} -E -traditional-cpp"
1588   cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1591 #include <assert.h>
1592 Syntax Error
1593 EOF
1594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1595 { (eval echo configure:1596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1596 ac_err=`grep -v '^ *+' conftest.out`
1597 if test -z "$ac_err"; then
1598   :
1599 else
1600   echo "$ac_err" >&5
1601   echo "configure: failed program was:" >&5
1602   cat conftest.$ac_ext >&5
1603   rm -rf conftest*
1604   CPP=/lib/cpp
1605 fi
1606 rm -f conftest*
1607 fi
1608 rm -f conftest*
1609   ac_cv_prog_CPP="$CPP"
1610 fi
1611   CPP="$ac_cv_prog_CPP"
1612 else
1613   ac_cv_prog_CPP="$CPP"
1614 fi
1615 echo "$ac_t""$CPP" 1>&6
1616
1617 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1618 echo "configure:1619: checking for ANSI C header files" >&5
1619 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622   cat > conftest.$ac_ext <<EOF
1623 #line 1624 "configure"
1624 #include "confdefs.h"
1625 #include <stdlib.h>
1626 #include <stdarg.h>
1627 #include <string.h>
1628 #include <float.h>
1629 EOF
1630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1631 { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1632 ac_err=`grep -v '^ *+' conftest.out`
1633 if test -z "$ac_err"; then
1634   rm -rf conftest*
1635   ac_cv_header_stdc=yes
1636 else
1637   echo "$ac_err" >&5
1638   echo "configure: failed program was:" >&5
1639   cat conftest.$ac_ext >&5
1640   rm -rf conftest*
1641   ac_cv_header_stdc=no
1642 fi
1643 rm -f conftest*
1644
1645 if test $ac_cv_header_stdc = yes; then
1646   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1647 cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1650 #include <string.h>
1651 EOF
1652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1653   egrep "memchr" >/dev/null 2>&1; then
1654   :
1655 else
1656   rm -rf conftest*
1657   ac_cv_header_stdc=no
1658 fi
1659 rm -f conftest*
1660
1661 fi
1662
1663 if test $ac_cv_header_stdc = yes; then
1664   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1665 cat > conftest.$ac_ext <<EOF
1666 #line 1667 "configure"
1667 #include "confdefs.h"
1668 #include <stdlib.h>
1669 EOF
1670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1671   egrep "free" >/dev/null 2>&1; then
1672   :
1673 else
1674   rm -rf conftest*
1675   ac_cv_header_stdc=no
1676 fi
1677 rm -f conftest*
1678
1679 fi
1680
1681 if test $ac_cv_header_stdc = yes; then
1682   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1683 if test "$cross_compiling" = yes; then
1684   :
1685 else
1686   cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 #include <ctype.h>
1690 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1691 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1692 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1693 int main () { int i; for (i = 0; i < 256; i++)
1694 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1695 exit (0); }
1696
1697 EOF
1698 if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1699 then
1700   :
1701 else
1702   echo "configure: failed program was:" >&5
1703   cat conftest.$ac_ext >&5
1704   rm -fr conftest*
1705   ac_cv_header_stdc=no
1706 fi
1707 rm -fr conftest*
1708 fi
1709
1710 fi
1711 fi
1712
1713 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1714 if test $ac_cv_header_stdc = yes; then
1715   cat >> confdefs.h <<\EOF
1716 #define STDC_HEADERS 1
1717 EOF
1718
1719 fi
1720
1721 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1722 echo "configure:1723: checking whether time.h and sys/time.h may both be included" >&5
1723 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1724   echo $ac_n "(cached) $ac_c" 1>&6
1725 else
1726   cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 #include <sys/types.h>
1730 #include <sys/time.h>
1731 #include <time.h>
1732 int main() {
1733 struct tm *tp;
1734 ; return 0; }
1735 EOF
1736 if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1737   rm -rf conftest*
1738   ac_cv_header_time=yes
1739 else
1740   echo "configure: failed program was:" >&5
1741   cat conftest.$ac_ext >&5
1742   rm -rf conftest*
1743   ac_cv_header_time=no
1744 fi
1745 rm -f conftest*
1746 fi
1747
1748 echo "$ac_t""$ac_cv_header_time" 1>&6
1749 if test $ac_cv_header_time = yes; then
1750   cat >> confdefs.h <<\EOF
1751 #define TIME_WITH_SYS_TIME 1
1752 EOF
1753
1754 fi
1755
1756 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
1757 echo "configure:1758: checking whether string.h and strings.h may both be included" >&5
1758 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
1759   echo $ac_n "(cached) $ac_c" 1>&6
1760 else
1761   cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764 #include <string.h>
1765 #include <strings.h>
1766 int main() {
1767
1768 ; return 0; }
1769 EOF
1770 if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1771   rm -rf conftest*
1772   gcc_cv_header_string=yes
1773 else
1774   echo "configure: failed program was:" >&5
1775   cat conftest.$ac_ext >&5
1776   rm -rf conftest*
1777   gcc_cv_header_string=no
1778 fi
1779 rm -f conftest*
1780 fi
1781
1782 echo "$ac_t""$gcc_cv_header_string" 1>&6
1783 if test $gcc_cv_header_string = yes; then
1784   cat >> confdefs.h <<\EOF
1785 #define STRING_WITH_STRINGS 1
1786 EOF
1787
1788 fi
1789
1790 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1791 echo "configure:1792: checking for sys/wait.h that is POSIX.1 compatible" >&5
1792 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1793   echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795   cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 #include <sys/types.h>
1799 #include <sys/wait.h>
1800 #ifndef WEXITSTATUS
1801 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1802 #endif
1803 #ifndef WIFEXITED
1804 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1805 #endif
1806 int main() {
1807 int s;
1808 wait (&s);
1809 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1810 ; return 0; }
1811 EOF
1812 if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1813   rm -rf conftest*
1814   ac_cv_header_sys_wait_h=yes
1815 else
1816   echo "configure: failed program was:" >&5
1817   cat conftest.$ac_ext >&5
1818   rm -rf conftest*
1819   ac_cv_header_sys_wait_h=no
1820 fi
1821 rm -f conftest*
1822 fi
1823
1824 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1825 if test $ac_cv_header_sys_wait_h = yes; then
1826   cat >> confdefs.h <<\EOF
1827 #define HAVE_SYS_WAIT_H 1
1828 EOF
1829
1830 fi
1831
1832 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h
1833 do
1834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1836 echo "configure:1837: checking for $ac_hdr" >&5
1837 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 #include <$ac_hdr>
1844 EOF
1845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1846 { (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1847 ac_err=`grep -v '^ *+' conftest.out`
1848 if test -z "$ac_err"; then
1849   rm -rf conftest*
1850   eval "ac_cv_header_$ac_safe=yes"
1851 else
1852   echo "$ac_err" >&5
1853   echo "configure: failed program was:" >&5
1854   cat conftest.$ac_ext >&5
1855   rm -rf conftest*
1856   eval "ac_cv_header_$ac_safe=no"
1857 fi
1858 rm -f conftest*
1859 fi
1860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1861   echo "$ac_t""yes" 1>&6
1862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1863   cat >> confdefs.h <<EOF
1864 #define $ac_tr_hdr 1
1865 EOF
1866  
1867 else
1868   echo "$ac_t""no" 1>&6
1869 fi
1870 done
1871
1872
1873 # Check for thread headers.
1874 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
1875 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
1876 echo "configure:1877: checking for thread.h" >&5
1877 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   cat > conftest.$ac_ext <<EOF
1881 #line 1882 "configure"
1882 #include "confdefs.h"
1883 #include <thread.h>
1884 EOF
1885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1886 { (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1887 ac_err=`grep -v '^ *+' conftest.out`
1888 if test -z "$ac_err"; then
1889   rm -rf conftest*
1890   eval "ac_cv_header_$ac_safe=yes"
1891 else
1892   echo "$ac_err" >&5
1893   echo "configure: failed program was:" >&5
1894   cat conftest.$ac_ext >&5
1895   rm -rf conftest*
1896   eval "ac_cv_header_$ac_safe=no"
1897 fi
1898 rm -f conftest*
1899 fi
1900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1901   echo "$ac_t""yes" 1>&6
1902   have_thread_h=yes
1903 else
1904   echo "$ac_t""no" 1>&6
1905 have_thread_h=
1906 fi
1907
1908 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
1909 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
1910 echo "configure:1911: checking for pthread.h" >&5
1911 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1912   echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914   cat > conftest.$ac_ext <<EOF
1915 #line 1916 "configure"
1916 #include "confdefs.h"
1917 #include <pthread.h>
1918 EOF
1919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1920 { (eval echo configure:1921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1921 ac_err=`grep -v '^ *+' conftest.out`
1922 if test -z "$ac_err"; then
1923   rm -rf conftest*
1924   eval "ac_cv_header_$ac_safe=yes"
1925 else
1926   echo "$ac_err" >&5
1927   echo "configure: failed program was:" >&5
1928   cat conftest.$ac_ext >&5
1929   rm -rf conftest*
1930   eval "ac_cv_header_$ac_safe=no"
1931 fi
1932 rm -f conftest*
1933 fi
1934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1935   echo "$ac_t""yes" 1>&6
1936   have_pthread_h=yes
1937 else
1938   echo "$ac_t""no" 1>&6
1939 have_pthread_h=
1940 fi
1941
1942
1943 # See if GNAT has been installed
1944 # Extract the first word of "gnatbind", so it can be a program name with args.
1945 set dummy gnatbind; ac_word=$2
1946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1947 echo "configure:1948: checking for $ac_word" >&5
1948 if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   if test -n "$gnat"; then
1952   ac_cv_prog_gnat="$gnat" # Let the user override the test.
1953 else
1954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1955   for ac_dir in $PATH; do
1956     test -z "$ac_dir" && ac_dir=.
1957     if test -f $ac_dir/$ac_word; then
1958       ac_cv_prog_gnat="yes"
1959       break
1960     fi
1961   done
1962   IFS="$ac_save_ifs"
1963   test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
1964 fi
1965 fi
1966 gnat="$ac_cv_prog_gnat"
1967 if test -n "$gnat"; then
1968   echo "$ac_t""$gnat" 1>&6
1969 else
1970   echo "$ac_t""no" 1>&6
1971 fi
1972
1973
1974 # See if the system preprocessor understands the ANSI C preprocessor
1975 # stringification operator.
1976 echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
1977 echo "configure:1978: checking whether cpp understands the stringify operator" >&5
1978 if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
1979   echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981   cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984
1985 int main() {
1986 #define S(x)   #x
1987 char *test = S(foo);
1988 ; return 0; }
1989 EOF
1990 if { (eval echo configure:1991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1991   rm -rf conftest*
1992   gcc_cv_c_have_stringify=yes
1993 else
1994   echo "configure: failed program was:" >&5
1995   cat conftest.$ac_ext >&5
1996   rm -rf conftest*
1997   gcc_cv_c_have_stringify=no
1998 fi
1999 rm -f conftest*
2000 fi
2001
2002 echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
2003 if test $gcc_cv_c_have_stringify = yes; then
2004   cat >> confdefs.h <<\EOF
2005 #define HAVE_CPP_STRINGIFY 1
2006 EOF
2007
2008 fi
2009
2010 # Use <inttypes.h> only if it exists,
2011 # doesn't clash with <sys/types.h>, and declares intmax_t.
2012 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2013 echo "configure:2014: checking for inttypes.h" >&5
2014 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2015   echo $ac_n "(cached) $ac_c" 1>&6
2016 else
2017   cat > conftest.$ac_ext <<EOF
2018 #line 2019 "configure"
2019 #include "confdefs.h"
2020 #include <sys/types.h>
2021 #include <inttypes.h>
2022 int main() {
2023 intmax_t i = -1;
2024 ; return 0; }
2025 EOF
2026 if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2027   rm -rf conftest*
2028   gcc_cv_header_inttypes_h=yes
2029 else
2030   echo "configure: failed program was:" >&5
2031   cat conftest.$ac_ext >&5
2032   rm -rf conftest*
2033   gcc_cv_header_inttypes_h=no
2034 fi
2035 rm -f conftest*
2036 fi
2037
2038 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2039 if test $gcc_cv_header_inttypes_h = yes; then
2040   cat >> confdefs.h <<\EOF
2041 #define HAVE_INTTYPES_H 1
2042 EOF
2043
2044 fi
2045
2046 for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
2047         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
2048         sysconf isascii gettimeofday strsignal
2049 do
2050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2051 echo "configure:2052: checking for $ac_func" >&5
2052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2053   echo $ac_n "(cached) $ac_c" 1>&6
2054 else
2055   cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 /* System header to define __stub macros and hopefully few prototypes,
2059     which can conflict with char $ac_func(); below.  */
2060 #include <assert.h>
2061 /* Override any gcc2 internal prototype to avoid an error.  */
2062 /* We use char because int might match the return type of a gcc2
2063     builtin and then its argument prototype would still apply.  */
2064 char $ac_func();
2065
2066 int main() {
2067
2068 /* The GNU C library defines this for functions which it implements
2069     to always fail with ENOSYS.  Some functions are actually named
2070     something starting with __ and the normal name is an alias.  */
2071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2072 choke me
2073 #else
2074 $ac_func();
2075 #endif
2076
2077 ; return 0; }
2078 EOF
2079 if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2080   rm -rf conftest*
2081   eval "ac_cv_func_$ac_func=yes"
2082 else
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -rf conftest*
2086   eval "ac_cv_func_$ac_func=no"
2087 fi
2088 rm -f conftest*
2089 fi
2090
2091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2092   echo "$ac_t""yes" 1>&6
2093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2094   cat >> confdefs.h <<EOF
2095 #define $ac_tr_func 1
2096 EOF
2097  
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101 done
2102
2103
2104 # Make sure wchar_t is available
2105 #AC_CHECK_TYPE(wchar_t, unsigned int)
2106
2107 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2108 echo "configure:2109: checking for vprintf" >&5
2109 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2110   echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112   cat > conftest.$ac_ext <<EOF
2113 #line 2114 "configure"
2114 #include "confdefs.h"
2115 /* System header to define __stub macros and hopefully few prototypes,
2116     which can conflict with char vprintf(); below.  */
2117 #include <assert.h>
2118 /* Override any gcc2 internal prototype to avoid an error.  */
2119 /* We use char because int might match the return type of a gcc2
2120     builtin and then its argument prototype would still apply.  */
2121 char vprintf();
2122
2123 int main() {
2124
2125 /* The GNU C library defines this for functions which it implements
2126     to always fail with ENOSYS.  Some functions are actually named
2127     something starting with __ and the normal name is an alias.  */
2128 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2129 choke me
2130 #else
2131 vprintf();
2132 #endif
2133
2134 ; return 0; }
2135 EOF
2136 if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2137   rm -rf conftest*
2138   eval "ac_cv_func_vprintf=yes"
2139 else
2140   echo "configure: failed program was:" >&5
2141   cat conftest.$ac_ext >&5
2142   rm -rf conftest*
2143   eval "ac_cv_func_vprintf=no"
2144 fi
2145 rm -f conftest*
2146 fi
2147
2148 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2149   echo "$ac_t""yes" 1>&6
2150   cat >> confdefs.h <<\EOF
2151 #define HAVE_VPRINTF 1
2152 EOF
2153
2154 else
2155   echo "$ac_t""no" 1>&6
2156 fi
2157
2158 if test "$ac_cv_func_vprintf" != yes; then
2159 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2160 echo "configure:2161: checking for _doprnt" >&5
2161 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2162   echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164   cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 /* System header to define __stub macros and hopefully few prototypes,
2168     which can conflict with char _doprnt(); below.  */
2169 #include <assert.h>
2170 /* Override any gcc2 internal prototype to avoid an error.  */
2171 /* We use char because int might match the return type of a gcc2
2172     builtin and then its argument prototype would still apply.  */
2173 char _doprnt();
2174
2175 int main() {
2176
2177 /* The GNU C library defines this for functions which it implements
2178     to always fail with ENOSYS.  Some functions are actually named
2179     something starting with __ and the normal name is an alias.  */
2180 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2181 choke me
2182 #else
2183 _doprnt();
2184 #endif
2185
2186 ; return 0; }
2187 EOF
2188 if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2189   rm -rf conftest*
2190   eval "ac_cv_func__doprnt=yes"
2191 else
2192   echo "configure: failed program was:" >&5
2193   cat conftest.$ac_ext >&5
2194   rm -rf conftest*
2195   eval "ac_cv_func__doprnt=no"
2196 fi
2197 rm -f conftest*
2198 fi
2199
2200 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2201   echo "$ac_t""yes" 1>&6
2202   cat >> confdefs.h <<\EOF
2203 #define HAVE_DOPRNT 1
2204 EOF
2205
2206 else
2207   echo "$ac_t""no" 1>&6
2208 fi
2209
2210 fi
2211
2212 vfprintf=
2213 doprint=
2214 if test $ac_cv_func_vprintf != yes ; then
2215   vfprintf=vfprintf.o
2216   if test $ac_cv_func__doprnt != yes ; then
2217     doprint=doprint.o
2218   fi
2219 fi
2220
2221
2222
2223 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
2224 echo "configure:2225: checking whether the printf functions support %p" >&5
2225 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
2226   echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228   if test "$cross_compiling" = yes; then
2229   gcc_cv_func_printf_ptr=no
2230 else
2231   cat > conftest.$ac_ext <<EOF
2232 #line 2233 "configure"
2233 #include "confdefs.h"
2234 #include <stdio.h>
2235
2236 main()
2237 {
2238   char buf[64];
2239   char *p = buf, *q = NULL;
2240   sprintf(buf, "%p", p);
2241   sscanf(buf, "%p", &q);
2242   exit (p != q);
2243 }
2244 EOF
2245 if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2246 then
2247   gcc_cv_func_printf_ptr=yes
2248 else
2249   echo "configure: failed program was:" >&5
2250   cat conftest.$ac_ext >&5
2251   rm -fr conftest*
2252   gcc_cv_func_printf_ptr=no
2253 fi
2254 rm -fr conftest*
2255 fi
2256
2257 rm -f core core.* *.core
2258 fi
2259
2260 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
2261 if test $gcc_cv_func_printf_ptr = yes ; then
2262   cat >> confdefs.h <<\EOF
2263 #define HAVE_PRINTF_PTR 1
2264 EOF
2265
2266 fi
2267
2268 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2269 echo "configure:2270: checking for pid_t" >&5
2270 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2271   echo $ac_n "(cached) $ac_c" 1>&6
2272 else
2273   cat > conftest.$ac_ext <<EOF
2274 #line 2275 "configure"
2275 #include "confdefs.h"
2276 #include <sys/types.h>
2277 #if STDC_HEADERS
2278 #include <stdlib.h>
2279 #include <stddef.h>
2280 #endif
2281 EOF
2282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2283   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2284   rm -rf conftest*
2285   ac_cv_type_pid_t=yes
2286 else
2287   rm -rf conftest*
2288   ac_cv_type_pid_t=no
2289 fi
2290 rm -f conftest*
2291
2292 fi
2293 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2294 if test $ac_cv_type_pid_t = no; then
2295   cat >> confdefs.h <<\EOF
2296 #define pid_t int
2297 EOF
2298
2299 fi
2300
2301 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2302 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2303 echo "configure:2304: checking for vfork.h" >&5
2304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2305   echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307   cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <vfork.h>
2311 EOF
2312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2313 { (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2314 ac_err=`grep -v '^ *+' conftest.out`
2315 if test -z "$ac_err"; then
2316   rm -rf conftest*
2317   eval "ac_cv_header_$ac_safe=yes"
2318 else
2319   echo "$ac_err" >&5
2320   echo "configure: failed program was:" >&5
2321   cat conftest.$ac_ext >&5
2322   rm -rf conftest*
2323   eval "ac_cv_header_$ac_safe=no"
2324 fi
2325 rm -f conftest*
2326 fi
2327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2328   echo "$ac_t""yes" 1>&6
2329   cat >> confdefs.h <<\EOF
2330 #define HAVE_VFORK_H 1
2331 EOF
2332
2333 else
2334   echo "$ac_t""no" 1>&6
2335 fi
2336
2337 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2338 echo "configure:2339: checking for working vfork" >&5
2339 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2340   echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342   if test "$cross_compiling" = yes; then
2343   echo $ac_n "checking for vfork""... $ac_c" 1>&6
2344 echo "configure:2345: checking for vfork" >&5
2345 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 /* System header to define __stub macros and hopefully few prototypes,
2352     which can conflict with char vfork(); below.  */
2353 #include <assert.h>
2354 /* Override any gcc2 internal prototype to avoid an error.  */
2355 /* We use char because int might match the return type of a gcc2
2356     builtin and then its argument prototype would still apply.  */
2357 char vfork();
2358
2359 int main() {
2360
2361 /* The GNU C library defines this for functions which it implements
2362     to always fail with ENOSYS.  Some functions are actually named
2363     something starting with __ and the normal name is an alias.  */
2364 #if defined (__stub_vfork) || defined (__stub___vfork)
2365 choke me
2366 #else
2367 vfork();
2368 #endif
2369
2370 ; return 0; }
2371 EOF
2372 if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2373   rm -rf conftest*
2374   eval "ac_cv_func_vfork=yes"
2375 else
2376   echo "configure: failed program was:" >&5
2377   cat conftest.$ac_ext >&5
2378   rm -rf conftest*
2379   eval "ac_cv_func_vfork=no"
2380 fi
2381 rm -f conftest*
2382 fi
2383
2384 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2385   echo "$ac_t""yes" 1>&6
2386   :
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390
2391 ac_cv_func_vfork_works=$ac_cv_func_vfork
2392 else
2393   cat > conftest.$ac_ext <<EOF
2394 #line 2395 "configure"
2395 #include "confdefs.h"
2396 /* Thanks to Paul Eggert for this test.  */
2397 #include <stdio.h>
2398 #include <sys/types.h>
2399 #include <sys/stat.h>
2400 #ifdef HAVE_UNISTD_H
2401 #include <unistd.h>
2402 #endif
2403 #ifdef HAVE_VFORK_H
2404 #include <vfork.h>
2405 #endif
2406 /* On some sparc systems, changes by the child to local and incoming
2407    argument registers are propagated back to the parent.
2408    The compiler is told about this with #include <vfork.h>,
2409    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2410    Test for this by using a static variable whose address
2411    is put into a register that is clobbered by the vfork.  */
2412 static
2413 #ifdef __cplusplus
2414 sparc_address_test (int arg)
2415 #else
2416 sparc_address_test (arg) int arg;
2417 #endif
2418 {
2419   static pid_t child;
2420   if (!child) {
2421     child = vfork ();
2422     if (child < 0) {
2423       perror ("vfork");
2424       _exit(2);
2425     }
2426     if (!child) {
2427       arg = getpid();
2428       write(-1, "", 0);
2429       _exit (arg);
2430     }
2431   }
2432 }
2433 main() {
2434   pid_t parent = getpid ();
2435   pid_t child;
2436
2437   sparc_address_test ();
2438
2439   child = vfork ();
2440
2441   if (child == 0) {
2442     /* Here is another test for sparc vfork register problems.
2443        This test uses lots of local variables, at least
2444        as many local variables as main has allocated so far
2445        including compiler temporaries.  4 locals are enough for
2446        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2447        A buggy compiler should reuse the register of parent
2448        for one of the local variables, since it will think that
2449        parent can't possibly be used any more in this routine.
2450        Assigning to the local variable will thus munge parent
2451        in the parent process.  */
2452     pid_t
2453       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2454       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2455     /* Convince the compiler that p..p7 are live; otherwise, it might
2456        use the same hardware register for all 8 local variables.  */
2457     if (p != p1 || p != p2 || p != p3 || p != p4
2458         || p != p5 || p != p6 || p != p7)
2459       _exit(1);
2460
2461     /* On some systems (e.g. IRIX 3.3),
2462        vfork doesn't separate parent from child file descriptors.
2463        If the child closes a descriptor before it execs or exits,
2464        this munges the parent's descriptor as well.
2465        Test for this by closing stdout in the child.  */
2466     _exit(close(fileno(stdout)) != 0);
2467   } else {
2468     int status;
2469     struct stat st;
2470
2471     while (wait(&status) != child)
2472       ;
2473     exit(
2474          /* Was there some problem with vforking?  */
2475          child < 0
2476
2477          /* Did the child fail?  (This shouldn't happen.)  */
2478          || status
2479
2480          /* Did the vfork/compiler bug occur?  */
2481          || parent != getpid()
2482
2483          /* Did the file descriptor bug occur?  */
2484          || fstat(fileno(stdout), &st) != 0
2485          );
2486   }
2487 }
2488 EOF
2489 if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2490 then
2491   ac_cv_func_vfork_works=yes
2492 else
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495   rm -fr conftest*
2496   ac_cv_func_vfork_works=no
2497 fi
2498 rm -fr conftest*
2499 fi
2500
2501 fi
2502
2503 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2504 if test $ac_cv_func_vfork_works = no; then
2505   cat >> confdefs.h <<\EOF
2506 #define vfork fork
2507 EOF
2508
2509 fi
2510
2511
2512 for ac_func in malloc realloc calloc free bcopy bzero bcmp \
2513         index rindex getenv atol sbrk abort atof strerror getcwd getwd \
2514         strsignal
2515 do
2516 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
2517 echo "configure:2518: checking whether $ac_func must be declared" >&5
2518 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   cat > conftest.$ac_ext <<EOF
2522 #line 2523 "configure"
2523 #include "confdefs.h"
2524
2525 #include <stdio.h>
2526 #ifdef STRING_WITH_STRINGS
2527 # include <string.h>
2528 # include <strings.h>
2529 #else
2530 # ifdef HAVE_STRING_H
2531 #  include <string.h>
2532 # else
2533 #  ifdef HAVE_STRINGS_H
2534 #   include <strings.h>
2535 #  endif
2536 # endif
2537 #endif
2538 #ifdef HAVE_STDLIB_H
2539 #include <stdlib.h>
2540 #endif
2541 #ifdef HAVE_UNISTD_H
2542 #include <unistd.h>
2543 #endif
2544 #ifndef HAVE_RINDEX
2545 #define rindex strrchr
2546 #endif
2547 #ifndef HAVE_INDEX
2548 #define index strchr
2549 #endif
2550
2551 int main() {
2552 char *(*pfn) = (char *(*)) $ac_func
2553 ; return 0; }
2554 EOF
2555 if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2556   rm -rf conftest*
2557   eval "gcc_cv_decl_needed_$ac_func=no"
2558 else
2559   echo "configure: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   rm -rf conftest*
2562   eval "gcc_cv_decl_needed_$ac_func=yes"
2563 fi
2564 rm -f conftest*
2565 fi
2566
2567 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2568   echo "$ac_t""yes" 1>&6
2569   gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2570   cat >> confdefs.h <<EOF
2571 #define $gcc_tr_decl 1
2572 EOF
2573
2574 else
2575   echo "$ac_t""no" 1>&6
2576 fi
2577
2578 done
2579
2580
2581 for ac_func in getrlimit setrlimit
2582 do
2583 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
2584 echo "configure:2585: checking whether $ac_func must be declared" >&5
2585 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2586   echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588   cat > conftest.$ac_ext <<EOF
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591
2592 #include <stdio.h>
2593 #ifdef STRING_WITH_STRINGS
2594 # include <string.h>
2595 # include <strings.h>
2596 #else
2597 # ifdef HAVE_STRING_H
2598 #  include <string.h>
2599 # else
2600 #  ifdef HAVE_STRINGS_H
2601 #   include <strings.h>
2602 #  endif
2603 # endif
2604 #endif
2605 #ifdef HAVE_STDLIB_H
2606 #include <stdlib.h>
2607 #endif
2608 #ifdef HAVE_UNISTD_H
2609 #include <unistd.h>
2610 #endif
2611 #ifndef HAVE_RINDEX
2612 #define rindex strrchr
2613 #endif
2614 #ifndef HAVE_INDEX
2615 #define index strchr
2616 #endif
2617 #include <sys/types.h>
2618 #ifdef HAVE_SYS_RESOURCE_H
2619 #include <sys/resource.h>
2620 #endif
2621
2622 int main() {
2623 char *(*pfn) = (char *(*)) $ac_func
2624 ; return 0; }
2625 EOF
2626 if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2627   rm -rf conftest*
2628   eval "gcc_cv_decl_needed_$ac_func=no"
2629 else
2630   echo "configure: failed program was:" >&5
2631   cat conftest.$ac_ext >&5
2632   rm -rf conftest*
2633   eval "gcc_cv_decl_needed_$ac_func=yes"
2634 fi
2635 rm -f conftest*
2636 fi
2637
2638 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2639   echo "$ac_t""yes" 1>&6
2640   gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2641   cat >> confdefs.h <<EOF
2642 #define $gcc_tr_decl 1
2643 EOF
2644
2645 else
2646   echo "$ac_t""no" 1>&6
2647 fi
2648
2649 done
2650
2651
2652 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2653 echo "configure:2654: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2654 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2655   echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657   cat > conftest.$ac_ext <<EOF
2658 #line 2659 "configure"
2659 #include "confdefs.h"
2660 #include <sys/types.h>
2661 #include <signal.h>
2662 /* NetBSD declares sys_siglist in unistd.h.  */
2663 #ifdef HAVE_UNISTD_H
2664 #include <unistd.h>
2665 #endif
2666 int main() {
2667 char *msg = *(sys_siglist + 1);
2668 ; return 0; }
2669 EOF
2670 if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2671   rm -rf conftest*
2672   ac_cv_decl_sys_siglist=yes
2673 else
2674   echo "configure: failed program was:" >&5
2675   cat conftest.$ac_ext >&5
2676   rm -rf conftest*
2677   ac_cv_decl_sys_siglist=no
2678 fi
2679 rm -f conftest*
2680 fi
2681
2682 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2683 if test $ac_cv_decl_sys_siglist = yes; then
2684   cat >> confdefs.h <<\EOF
2685 #define SYS_SIGLIST_DECLARED 1
2686 EOF
2687
2688 fi
2689
2690
2691 # File extensions
2692 manext='.1'
2693 objext='.o'
2694
2695
2696
2697 build_xm_file=
2698 build_xm_defines=
2699 build_install_headers_dir=install-headers-tar
2700 build_exeext=
2701 host_xm_file=
2702 host_xm_defines=
2703 host_xmake_file=
2704 host_truncate_target=
2705 host_exeext=
2706
2707 # Decode the host machine, then the target machine.
2708 # For the host machine, we save the xm_file variable as host_xm_file;
2709 # then we decode the target machine and forget everything else
2710 # that came from the host machine.
2711 for machine in $build $host $target; do
2712
2713         out_file=
2714         xmake_file=
2715         tmake_file=
2716         extra_headers=
2717         extra_passes=
2718         extra_parts=
2719         extra_programs=
2720         extra_objs=
2721         extra_host_objs=
2722         extra_gcc_objs=
2723         xm_defines=
2724         float_format=
2725         # Set this to force installation and use of collect2.
2726         use_collect2=
2727         # Set this to override the default target model.
2728         target_cpu_default=
2729         # Set this to control which fixincludes program to use.
2730         if test x$fast_fixinc != xyes; then
2731                 fixincludes=fixincludes
2732         else fixincludes=fixinc.sh ; fi
2733         # Set this to control how the header file directory is installed.
2734         install_headers_dir=install-headers-tar
2735         # Set this to a non-empty list of args to pass to cpp if the target
2736         # wants its .md file passed through cpp.
2737         md_cppflags=
2738         # Set this if directory names should be truncated to 14 characters.
2739         truncate_target=
2740         # Set this if gdb needs a dir command with `dirname $out_file`
2741         gdb_needs_out_file_path=
2742         # Set this if the build machine requires executables to have a
2743         # file name suffix.
2744         exeext=
2745         # Set this to control which thread package will be used.
2746         thread_file=
2747         # Reinitialize these from the flag values every loop pass, since some
2748         # configure entries modify them.
2749         gas="$gas_flag"
2750         gnu_ld="$gnu_ld_flag"
2751         enable_threads=$enable_threads_flag
2752
2753         # Set default cpu_type, tm_file and xm_file so it can be updated in
2754         # each machine entry.
2755         cpu_type=`echo $machine | sed 's/-.*$//'`
2756         case $machine in
2757         alpha*-*-*)
2758                 cpu_type=alpha
2759                 ;;
2760         arm*-*-*)
2761                 cpu_type=arm
2762                 ;;
2763         c*-convex-*)
2764                 cpu_type=convex
2765                 ;;
2766         i[34567]86-*-*)
2767                 cpu_type=i386
2768                 ;;
2769         hppa*-*-*)
2770                 cpu_type=pa
2771                 ;;
2772         m68000-*-*)
2773                 cpu_type=m68k
2774                 ;;
2775         mips*-*-*)
2776                 cpu_type=mips
2777                 ;;
2778         powerpc*-*-*)
2779                 cpu_type=rs6000
2780                 ;;
2781         pyramid-*-*)
2782                 cpu_type=pyr
2783                 ;;
2784         sparc*-*-*)
2785                 cpu_type=sparc
2786                 ;;
2787         esac
2788
2789         tm_file=${cpu_type}/${cpu_type}.h
2790         xm_file=${cpu_type}/xm-${cpu_type}.h
2791         
2792         # Set the default macros to define for GNU/Linux systems.
2793         case $machine in
2794         *-*-linux-gnu*)
2795                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
2796                 ;;
2797         esac
2798
2799         case $machine in
2800         # Support site-specific machine types.
2801         *local*)
2802                 cpu_type=`echo $machine | sed -e 's/-.*//'`
2803                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
2804                 xm_file=${cpu_type}/xm-$rest.h
2805                 tm_file=${cpu_type}/$rest.h
2806                 if test -f $srcdir/config/${cpu_type}/x-$rest; \
2807                 then xmake_file=${cpu_type}/x-$rest; \
2808                 else true; \
2809                 fi
2810                 if test -f $srcdir/config/${cpu_type}/t-$rest; \
2811                 then tmake_file=${cpu_type}/t-$rest; \
2812                 else true; \
2813                 fi
2814                 ;;
2815         1750a-*-*)
2816                 ;;
2817         a29k-*-bsd* | a29k-*-sym1*)
2818                 tm_file="${tm_file} a29k/unix.h"
2819                 xm_defines=USG
2820                 xmake_file=a29k/x-unix
2821                 use_collect2=yes
2822                 ;;
2823         a29k-*-udi | a29k-*-coff)
2824                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
2825                 tmake_file=a29k/t-a29kbare
2826                 ;;
2827         a29k-wrs-vxworks*)
2828                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
2829                 tmake_file=a29k/t-vx29k
2830                 extra_parts="crtbegin.o crtend.o"
2831                 thread_file='vxworks'
2832                 ;;
2833         a29k-*-*)                       # Default a29k environment.
2834                 use_collect2=yes
2835                 ;;
2836         alpha*-*-linux-gnuecoff*)
2837                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
2838                 target_cpu_default="MASK_GAS"
2839                 gas=no
2840                 xmake_file=none
2841                 gas=yes gnu_ld=yes
2842                 ;;
2843         alpha*-*-linux-gnulibc1*)
2844                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
2845                 target_cpu_default="MASK_GAS"
2846                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
2847                 extra_parts="crtbegin.o crtend.o"
2848                 fixincludes=fixinc.wrap
2849                 xmake_file=none
2850                 gas=yes gnu_ld=yes
2851                 if test x$enable_threads = xyes; then
2852                         thread_file='posix'
2853                 fi
2854                 ;;
2855         alpha*-*-linux-gnu*)
2856                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
2857                 target_cpu_default="MASK_GAS"
2858                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
2859                 extra_parts="crtbegin.o crtend.o"
2860                 xmake_file=none
2861                 fixincludes=Makefile.in
2862                 gas=yes gnu_ld=yes
2863                 if test x$enable_threads = xyes; then
2864                         thread_file='posix'
2865                 fi
2866                 ;;
2867         alpha*-*-netbsd*)
2868                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
2869                 target_cpu_default="MASK_GAS"
2870                 tmake_file="alpha/t-crtbe"
2871                 extra_parts="crtbegin.o crtend.o"
2872                 xmake_file=none
2873                 fixincludes=fixinc.wrap
2874                 gas=yes gnu_ld=yes
2875                 ;;
2876                 
2877         alpha*-dec-osf*)
2878                 if test x$stabs = xyes
2879                 then
2880                         tm_file="${tm_file} dbx.h"
2881                 fi
2882                 if test x$gas != xyes
2883                 then
2884                         extra_passes="mips-tfile mips-tdump"
2885                 fi
2886                 use_collect2=yes
2887                 case $machine in
2888                   *-*-osf1*)
2889                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
2890                     ;;
2891                   *-*-osf[23]*)
2892                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
2893                     ;;
2894                   *-*-osf4*)
2895                     tm_file="${tm_file} alpha/osf.h"
2896                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
2897                     # a broken tar, so we use cpio instead.
2898                     install_headers_dir=install-headers-cpio
2899                     ;;
2900                 esac
2901                 case $machine in
2902                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
2903                     target_cpu_default=MASK_SUPPORT_ARCH
2904                     ;;
2905                 esac
2906                 ;;
2907         alpha*-*-vxworks*)
2908                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
2909                 if  x$gas != xyes 
2910                 then
2911                         extra_passes="mips-tfile mips-tdump"
2912                 fi
2913                 use_collect2=yes
2914                 ;;
2915         alpha*-*-winnt*)
2916                 tm_file="${tm_file} alpha/win-nt.h"
2917                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
2918                 tmake_file=t-libc-ok
2919                 xmake_file=winnt/x-winnt
2920                 extra_host_objs=oldnames.o
2921                 extra_gcc_objs="spawnv.o oldnames.o"
2922                 fixincludes=fixinc.winnt
2923                 if test x$gnu_ld != xyes
2924                 then
2925                         extra_programs=ld.exe
2926                 fi
2927                 if test x$enable_threads = xyes; then
2928                         thread_file='win32'
2929                 fi
2930                 ;;
2931         alpha*-dec-vms*)
2932                 tm_file=alpha/vms.h
2933                 xm_file="${xm_file} alpha/xm-vms.h"
2934                 tmake_file=alpha/t-vms
2935                 fixincludes=Makefile.in
2936                 ;;
2937         arc-*-elf*)
2938                 extra_parts="crtinit.o crtfini.o"
2939                 ;;
2940         arm-*-coff* | armel-*-coff*)
2941                 tm_file=arm/coff.h
2942                 tmake_file=arm/t-bare
2943                 ;;
2944         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
2945                 tm_file=arm/riscix1-1.h
2946                 use_collect2=yes
2947                 ;;
2948         arm-*-riscix*)                  # Acorn RISC machine
2949                 if test x$gas = xyes
2950                 then
2951                     tm_file=arm/rix-gas.h
2952                 else
2953                     tm_file=arm/riscix.h
2954                 fi
2955                 xmake_file=arm/x-riscix
2956                 tmake_file=arm/t-riscix
2957                 use_collect2=yes
2958                 ;;
2959         arm-semi-aout | armel-semi-aout)
2960                 tm_file=arm/semi.h
2961                 tmake_file=arm/t-semi
2962                 fixincludes=Makefile.in # There is nothing to fix
2963                 ;;
2964         arm-semi-aof | armel-semi-aof)
2965                 tm_file=arm/semiaof.h
2966                 tmake_file=arm/t-semiaof
2967                 fixincludes=Makefile.in # There is nothing to fix
2968                 ;;
2969         arm*-*-netbsd*)
2970                 tm_file=arm/netbsd.h
2971                 xm_file="arm/xm-netbsd.h ${xm_file}"
2972                 tmake_file="t-netbsd arm/t-netbsd"
2973                 # On NetBSD, the headers are already okay, except for math.h.
2974                 fixincludes=fixinc.wrap
2975                 ;;
2976         arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
2977                 cpu_type=arm
2978                 xmake_file=x-linux
2979                 tm_file=arm/linux-aout.h
2980                 tmake_file=arm/t-linux
2981                 fixincludes=Makefile.in
2982                 gnu_ld=yes
2983                 ;;
2984         arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
2985                 xm_file=arm/xm-linux.h
2986                 xmake_file=x-linux
2987                 case $machine in
2988                 armv2*-*-*)
2989                         tm_file=arm/linux-elf26.h
2990                         ;;
2991                 *)
2992                         tm_file=arm/linux-elf.h
2993                         ;;
2994                 esac
2995                 tmake_file="t-linux arm/t-linux"
2996                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2997                 fixincludes=Makefile.in         # Nothing to fix
2998                 gnu_ld=yes
2999                 ;;
3000         arm*-*-aout)
3001                 tm_file=arm/aout.h
3002                 tmake_file=arm/t-bare
3003                 ;;
3004         arm*-*-elf)
3005                 tm_file=arm/unknown-elf.h
3006                 tmake_file=arm/t-arm-elf
3007                 ;;
3008         c1-convex-*)                    # Convex C1
3009                 target_cpu_default=1
3010                 use_collect2=yes
3011                 fixincludes=Makefile.in
3012                 ;;
3013         c2-convex-*)                    # Convex C2
3014                 target_cpu_default=2
3015                 use_collect2=yes
3016                 fixincludes=Makefile.in
3017                 ;;
3018         c32-convex-*)
3019                 target_cpu_default=4
3020                 use_collect2=yes
3021                 fixincludes=Makefile.in
3022                 ;;
3023         c34-convex-*)
3024                 target_cpu_default=8
3025                 use_collect2=yes
3026                 fixincludes=Makefile.in
3027                 ;;
3028         c38-convex-*)
3029                 target_cpu_default=16           
3030                 use_collect2=yes
3031                 fixincludes=Makefile.in
3032                 ;;
3033         c4x-*)
3034                 cpu_type=c4x
3035                 tmake_file=c4x/t-c4x
3036                 ;;
3037         clipper-intergraph-clix*)
3038                 tm_file="${tm_file} svr3.h clipper/clix.h"
3039                 xm_file=clipper/xm-clix.h
3040                 xmake_file=clipper/x-clix
3041                 extra_headers=va-clipper.h
3042                 extra_parts="crtbegin.o crtend.o"
3043                 install_headers_dir=install-headers-cpio
3044                 ;;
3045         dsp16xx-*)
3046                 ;;
3047         elxsi-elxsi-*)
3048                 use_collect2=yes
3049                 ;;
3050 # This hasn't been upgraded to GCC 2.
3051 #       fx80-alliant-*)                 # Alliant FX/80
3052 #               ;;
3053         h8300-*-*)
3054                 float_format=i32
3055                 ;;
3056         hppa1.1-*-pro*)
3057                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
3058                 xm_file=pa/xm-papro.h
3059                 tmake_file=pa/t-pro
3060                 ;;
3061         hppa1.1-*-osf*)
3062                 target_cpu_default=1
3063                 tm_file="${tm_file} pa/pa-osf.h"
3064                 use_collect2=yes
3065                 fixincludes=Makefile.in
3066                 ;;
3067         hppa1.1-*-rtems*)
3068                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
3069                 xm_file=pa/xm-papro.h
3070                 tmake_file=pa/t-pro
3071                 ;;
3072         hppa1.0-*-osf*)
3073                 tm_file="${tm_file} pa/pa-osf.h"
3074                 use_collect2=yes
3075                 fixincludes=Makefile.in
3076                 ;;
3077         hppa1.1-*-bsd*)
3078                 target_cpu_default=1
3079                 use_collect2=yes
3080                 fixincludes=Makefile.in
3081                 ;;
3082         hppa1.0-*-bsd*)
3083                 use_collect2=yes
3084                 fixincludes=Makefile.in
3085                 ;;
3086         hppa1.0-*-hpux7*)
3087                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
3088                 xm_file=pa/xm-pahpux.h
3089                 xmake_file=pa/x-pa-hpux
3090                 if test x$gas = xyes
3091                 then
3092                         tm_file="${tm_file} pa/gas.h"
3093                 fi
3094                 install_headers_dir=install-headers-cpio
3095                 use_collect2=yes
3096                 ;;
3097         hppa1.0-*-hpux8.0[0-2]*)
3098                 tm_file="${tm_file} pa/pa-hpux.h"
3099                 xm_file=pa/xm-pahpux.h
3100                 xmake_file=pa/x-pa-hpux
3101                 if test x$gas = xyes
3102                 then
3103                         tm_file="${tm_file} pa/pa-gas.h"
3104                 else
3105                         tm_file="pa/pa-oldas.h ${tm_file}"
3106                 fi
3107                 install_headers_dir=install-headers-cpio
3108                 use_collect2=yes
3109                 ;;
3110         hppa1.1-*-hpux8.0[0-2]*)
3111                 target_cpu_default=1
3112                 tm_file="${tm_file} pa/pa-hpux.h"
3113                 xm_file=pa/xm-pahpux.h
3114                 xmake_file=pa/x-pa-hpux
3115                 if test x$gas = xyes
3116                 then
3117                         tm_file="${tm_file} pa/pa-gas.h"
3118                 else
3119                         tm_file="pa/pa-oldas.h ${tm_file}"
3120                 fi
3121                 install_headers_dir=install-headers-cpio
3122                 use_collect2=yes
3123                 ;;
3124         hppa1.1-*-hpux8*)
3125                 target_cpu_default=1
3126                 tm_file="${tm_file} pa/pa-hpux.h"
3127                 xm_file=pa/xm-pahpux.h
3128                 xmake_file=pa/x-pa-hpux
3129                 if test x$gas = xyes
3130                 then
3131                         tm_file="${tm_file} pa/pa-gas.h"
3132                 fi
3133                 install_headers_dir=install-headers-cpio
3134                 use_collect2=yes
3135                 ;;
3136         hppa1.0-*-hpux8*)
3137                 tm_file="${tm_file} pa/pa-hpux.h"
3138                 xm_file=pa/xm-pahpux.h
3139                 xmake_file=pa/x-pa-hpux
3140                 if test x$gas = xyes
3141                 then
3142                         tm_file="${tm_file} pa/pa-gas.h"
3143                 fi
3144                 install_headers_dir=install-headers-cpio
3145                 use_collect2=yes
3146                 ;;
3147         hppa1.1-*-hpux10*)
3148                 target_cpu_default=1
3149                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3150                 xm_file=pa/xm-pahpux.h
3151                 xmake_file=pa/x-pa-hpux
3152                 tmake_file=pa/t-pa
3153                 if test x$gas = xyes
3154                 then
3155                         tm_file="${tm_file} pa/pa-gas.h"
3156                 fi
3157                 if test x$enable_threads = x; then
3158                     enable_threads=$have_pthread_h
3159                 fi
3160                 if test x$enable_threads = xyes; then
3161                         thread_file='dce'
3162                         tmake_file="${tmake_file} pa/t-dce-thr"
3163                 fi
3164                 install_headers_dir=install-headers-cpio
3165                 use_collect2=yes
3166                 ;;
3167         hppa1.0-*-hpux10*)
3168                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3169                 xm_file=pa/xm-pahpux.h
3170                 xmake_file=pa/x-pa-hpux
3171                 if test x$gas = xyes
3172                 then
3173                         tm_file="${tm_file} pa/pa-gas.h"
3174                 fi
3175                 if test x$enable_threads = x; then
3176                     enable_threads=$have_pthread_h
3177                 fi
3178                 if test x$enable_threads = xyes; then
3179                         thread_file='dce'
3180                         tmake_file="${tmake_file} pa/t-dce-thr"
3181                 fi
3182                 install_headers_dir=install-headers-cpio
3183                 use_collect2=yes
3184                 ;;
3185         hppa1.1-*-hpux*)
3186                 target_cpu_default=1
3187                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3188                 xm_file=pa/xm-pahpux.h
3189                 xmake_file=pa/x-pa-hpux
3190                 if test x$gas = xyes
3191                 then
3192                         tm_file="${tm_file} pa/pa-gas.h"
3193                 fi
3194                 install_headers_dir=install-headers-cpio
3195                 use_collect2=yes
3196                 ;;
3197         hppa1.0-*-hpux*)
3198                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3199                 xm_file=pa/xm-pahpux.h
3200                 xmake_file=pa/x-pa-hpux
3201                 if test x$gas = xyes
3202                 then
3203                         tm_file="${tm_file} pa/pa-gas.h"
3204                 fi
3205                 install_headers_dir=install-headers-cpio
3206                 use_collect2=yes
3207                 ;;
3208         hppa1.1-*-hiux*)
3209                 target_cpu_default=1
3210                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3211                 xm_file=pa/xm-pahpux.h
3212                 xmake_file=pa/x-pa-hpux
3213                 if test x$gas = xyes
3214                 then
3215                         tm_file="${tm_file} pa/pa-gas.h"
3216                 fi
3217                 install_headers_dir=install-headers-cpio
3218                 use_collect2=yes
3219                 ;;
3220         hppa1.0-*-hiux*)
3221                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3222                 xm_file=pa/xm-pahpux.h
3223                 xmake_file=pa/x-pa-hpux
3224                 if test x$gas = xyes
3225                 then
3226                         tm_file="${tm_file} pa/pa-gas.h"
3227                 fi
3228                 install_headers_dir=install-headers-cpio
3229                 use_collect2=yes
3230                 ;;
3231         hppa*-*-lites*)
3232                 target_cpu_default=1
3233                 use_collect2=yes
3234                 fixincludes=Makefile.in
3235                 ;;
3236         i370-*-mvs*)
3237                 ;;
3238         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
3239                 if test x$gas = xyes
3240                 then
3241                         tm_file=i386/aix386.h
3242                         extra_parts="crtbegin.o crtend.o"
3243                         tmake_file=i386/t-crtstuff
3244                 else
3245                         tm_file=i386/aix386ng.h
3246                         use_collect2=yes
3247                 fi
3248                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
3249                 xm_defines=USG
3250                 xmake_file=i386/x-aix
3251                 ;;
3252         i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
3253                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3254                 xm_defines="USG POSIX SMALL_ARG_MAX"
3255                 xmake_file=i386/x-ncr3000
3256                 if test x$stabs = xyes -a x$gas = xyes
3257                 then
3258                         tm_file=i386/sysv4gdb.h
3259                 else
3260                         tm_file=i386/sysv4.h
3261                 fi
3262                 extra_parts="crtbegin.o crtend.o"
3263                 tmake_file=i386/t-crtpic
3264                 ;;
3265         i[34567]86-next-*)
3266                 tm_file=i386/next.h
3267                 xm_file=i386/xm-next.h
3268                 tmake_file=i386/t-next
3269                 xmake_file=i386/x-next
3270                 extra_objs=nextstep.o
3271                 extra_parts="crtbegin.o crtend.o"
3272                 if test x$enable_threads = xyes; then
3273                         thread_file='mach'
3274                 fi
3275                 ;;
3276         i[34567]86-sequent-bsd*)                # 80386 from Sequent
3277                 use_collect2=yes
3278                 if test x$gas = xyes
3279                 then
3280                         tm_file=i386/seq-gas.h
3281                 else
3282                         tm_file=i386/sequent.h
3283                 fi
3284                 ;;
3285         i[34567]86-sequent-ptx1*)
3286                 xm_defines="USG SVR3"
3287                 xmake_file=i386/x-sysv3
3288                 tm_file=i386/seq-sysv3.h
3289                 tmake_file=i386/t-crtstuff
3290                 fixincludes=fixinc.ptx
3291                 extra_parts="crtbegin.o crtend.o"
3292                 install_headers_dir=install-headers-cpio
3293                 ;;
3294         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
3295                 xm_defines="USG SVR3"
3296                 xmake_file=i386/x-sysv3
3297                 tm_file=i386/seq2-sysv3.h
3298                 tmake_file=i386/t-crtstuff
3299                 extra_parts="crtbegin.o crtend.o"
3300                 fixincludes=fixinc.ptx
3301                 install_headers_dir=install-headers-cpio
3302                 ;;
3303         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
3304                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3305                 xm_defines="USG POSIX SMALL_ARG_MAX"
3306                 xmake_file=x-svr4
3307                 tm_file=i386/ptx4-i.h
3308                 tmake_file=t-svr4
3309                 extra_parts="crtbegin.o crtend.o"
3310                 fixincludes=fixinc.ptx
3311                 install_headers_dir=install-headers-cpio
3312                 ;;
3313         i386-sun-sunos*)                # Sun i386 roadrunner
3314                 xm_defines=USG
3315                 tm_file=i386/sun.h
3316                 use_collect2=yes
3317                 ;;
3318         i[34567]86-wrs-vxworks*)
3319                 tm_file=i386/vxi386.h
3320                 tmake_file=i386/t-i386bare
3321                 ;;
3322         i[34567]86-*-aout*)
3323                 tm_file=i386/i386-aout.h
3324                 tmake_file=i386/t-i386bare
3325                 ;;
3326         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
3327                 tm_file=i386/bsd386.h
3328 #               tmake_file=t-libc-ok
3329                 ;;
3330         i[34567]86-*-bsd*)
3331                 tm_file=i386/386bsd.h
3332 #               tmake_file=t-libc-ok
3333 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
3334 #               use_collect2=yes
3335                 ;;
3336         i[34567]86-*-freebsdelf*)
3337                 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
3338                 # On FreeBSD, the headers are already ok, except for math.h.
3339                 fixincludes=fixinc.wrap
3340                 tmake_file=i386/t-freebsd
3341                 gas=yes
3342                 gnu_ld=yes
3343                 stabs=yes
3344                 ;;
3345         i[34567]86-*-freebsd*)
3346                 tm_file=i386/freebsd.h
3347                 # On FreeBSD, the headers are already ok, except for math.h.
3348                 fixincludes=fixinc.wrap
3349                 tmake_file=i386/t-freebsd
3350                 ;;
3351         # We are hoping OpenBSD is still close enough to NetBSD that we can
3352         # share the configurations.
3353         i[34567]86-*-netbsd* | i[34567]86-*-openbsd*)
3354                 tm_file=i386/netbsd.h
3355                 # On NetBSD, the headers are already okay, except for math.h.
3356                 fixincludes=fixinc.wrap
3357                 tmake_file=t-netbsd
3358                 ;;
3359         i[34567]86-*-coff*)
3360                 tm_file=i386/i386-coff.h
3361                 tmake_file=i386/t-i386bare
3362                 ;;
3363         i[34567]86-*-isc*)              # 80386 running ISC system
3364                 xm_file="${xm_file} i386/xm-isc.h"
3365                 xm_defines="USG SVR3"
3366                 case $machine in
3367                   i[34567]86-*-isc[34]*)
3368                     xmake_file=i386/x-isc3
3369                     ;;
3370                   *)
3371                     xmake_file=i386/x-isc
3372                     ;;
3373                 esac
3374                 if test x$gas = xyes -a x$stabs = xyes
3375                 then
3376                         tm_file=i386/iscdbx.h
3377                         tmake_file=i386/t-svr3dbx
3378                         extra_parts="svr3.ifile svr3z.ifile"
3379                 else
3380                         tm_file=i386/isccoff.h
3381                         tmake_file=i386/t-crtstuff
3382                         extra_parts="crtbegin.o crtend.o"
3383                 fi
3384                 install_headers_dir=install-headers-cpio
3385                 ;;
3386         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
3387                                         # pre BFD linkers
3388                 xmake_file=x-linux-aout
3389                 tmake_file="t-linux-aout i386/t-crtstuff"
3390                 tm_file=i386/linux-oldld.h
3391                 fixincludes=Makefile.in #On Linux, the headers are ok already.
3392                 gnu_ld=yes
3393                 float_format=i386
3394                 ;;
3395         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
3396                 xmake_file=x-linux-aout
3397                 tmake_file="t-linux-aout i386/t-crtstuff"
3398                 tm_file=i386/linux-aout.h
3399                 fixincludes=Makefile.in #On Linux, the headers are ok already.
3400                 gnu_ld=yes
3401                 float_format=i386
3402                 ;;
3403         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
3404                                         # GNU/Linux C library 5
3405                 xmake_file=x-linux      
3406                 tm_file=i386/linux.h    
3407                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
3408                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3409                 fixincludes=Makefile.in #On Linux, the headers are ok already.
3410                 gnu_ld=yes
3411                 float_format=i386
3412                 if test x$enable_threads = xyes; then
3413                         thread_file='single'
3414                 fi
3415                 ;;
3416         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
3417                                         # aka GNU/Linux C library 6
3418                 xmake_file=x-linux
3419                 tm_file=i386/linux.h
3420                 tmake_file="t-linux i386/t-crtstuff"
3421                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3422                 fixincludes=Makefile.in #On Linux, the headers are ok already.
3423                 gnu_ld=yes
3424                 float_format=i386
3425                 if test x$enable_threads = xyes; then
3426                         thread_file='posix'
3427                 fi
3428                 ;;
3429         i[34567]86-*-gnu*)
3430                 ;;
3431         i[34567]86-go32-msdos | i[34567]86-*-go32*)
3432                 xm_file=i386/xm-go32.h
3433                 tm_file=i386/go32.h
3434                 tmake_file=i386/t-go32
3435                 ;;
3436         i[34567]86-pc-msdosdjgpp*)
3437                 xm_file=i386/xm-go32.h
3438                 tm_file=i386/go32.h
3439                 tmake_file=i386/t-go32
3440                 gnu_ld=yes
3441                 gas=yes
3442                 exeext=.exe
3443                 case $host in
3444                 *pc-msdosdjgpp*)
3445                         target_alias=djgpp
3446                         ;;
3447                 esac
3448                 ;;
3449         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
3450                 tm_file=i386/moss.h
3451                 tmake_file=t-libc-ok
3452                 fixincludes=Makefile.in
3453                 gnu_ld=yes
3454                 gas=yes
3455                 ;;
3456         i[34567]86-*-lynxos*)
3457                 if test x$gas = xyes
3458                 then
3459                         tm_file=i386/lynx.h
3460                 else
3461                         tm_file=i386/lynx-ng.h
3462                 fi
3463                 xm_file=i386/xm-lynx.h
3464                 tmake_file=i386/t-i386bare
3465                 xmake_file=x-lynx
3466                 ;;
3467         i[34567]86-*-mach*)
3468                 tm_file=i386/mach.h
3469 #               tmake_file=t-libc-ok
3470                 use_collect2=yes
3471                 ;;
3472         i[34567]86-*-osfrose*)          # 386 using OSF/rose
3473                 if test x$elf = xyes
3474                 then
3475                         tm_file=i386/osfelf.h
3476                         use_collect2=
3477                 else
3478                         tm_file=i386/osfrose.h
3479                         use_collect2=yes
3480                 fi
3481                 xm_file="i386/xm-osf.h ${xm_file}"
3482                 xmake_file=i386/x-osfrose
3483                 tmake_file=i386/t-osf
3484                 extra_objs=halfpic.o
3485                 ;;
3486         i[34567]86-go32-rtems*)
3487                 cpu_type=i386
3488                 xm_file=i386/xm-go32.h
3489                 tm_file=i386/go32-rtems.h
3490                 tmake_file="i386/t-go32 t-rtems"
3491                 ;;
3492         i[34567]86-*-rtemself*)
3493                 cpu_type=i386
3494                 tm_file=i386/rtemself.h
3495                 tmake_file="i386/t-i386bare t-rtems"
3496                 ;;
3497         i[34567]86-*-rtems*)
3498                 cpu_type=i386
3499                 tm_file=i386/rtems.h
3500                 tmake_file="i386/t-i386bare t-rtems"
3501                 ;;
3502         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
3503                 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
3504                 xm_defines="USG SVR3"
3505                 xmake_file=i386/x-sco5
3506                 fixincludes=fixinc.sco
3507                 install_headers_dir=install-headers-cpio
3508                 tm_file=i386/sco5.h
3509                 if test x$gas = xyes
3510                 then
3511                         tm_file="i386/sco5gas.h ${tm_file}"
3512                         tmake_file=i386/t-sco5gas
3513                 else
3514                         tmake_file=i386/t-sco5
3515                 fi
3516                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3517                 ;;
3518         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
3519                 xm_file="${xm_file} i386/xm-sco.h"
3520                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
3521                 xmake_file=i386/x-sco4
3522                 fixincludes=fixinc.sco
3523                 install_headers_dir=install-headers-cpio
3524                 if test x$stabs = xyes
3525                 then
3526                         tm_file=i386/sco4dbx.h
3527                         tmake_file=i386/t-svr3dbx
3528                         extra_parts="svr3.ifile svr3z.rfile"
3529                 else
3530                         tm_file=i386/sco4.h
3531                         tmake_file=i386/t-crtstuff
3532                         extra_parts="crtbegin.o crtend.o"
3533                 fi
3534                 truncate_target=yes
3535                 ;;
3536         i[34567]86-*-sco*)              # 80386 running SCO system
3537                 xm_file=i386/xm-sco.h
3538                 xmake_file=i386/x-sco
3539                 install_headers_dir=install-headers-cpio
3540                 if test x$stabs = xyes
3541                 then
3542                         tm_file=i386/scodbx.h
3543                         tmake_file=i386/t-svr3dbx
3544                         extra_parts="svr3.ifile svr3z.rfile"
3545                 else
3546                         tm_file=i386/sco.h
3547                         extra_parts="crtbegin.o crtend.o"
3548                         tmake_file=i386/t-crtstuff
3549                 fi
3550                 truncate_target=yes
3551                 ;;
3552         i[34567]86-*-solaris2*)
3553                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3554                 xm_defines="USG POSIX SMALL_ARG_MAX"
3555                 if test x$stabs = xyes
3556                 then
3557                         tm_file=i386/sol2dbg.h
3558                 else
3559                         tm_file=i386/sol2.h
3560                 fi
3561                 tmake_file=i386/t-sol2
3562                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
3563                 xmake_file=x-svr4
3564                 case $machine in
3565                 *-*-solaris2.[0-4])
3566                         fixincludes=fixinc.svr4;;
3567                 *)
3568                         fixincludes=fixinc.wrap;;
3569                 esac
3570                 if test x$enable_threads = xyes; then
3571                         thread_file='solaris'
3572                 fi
3573                 ;;
3574        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
3575                xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3576                xm_defines="USG POSIX"
3577                tm_file=i386/sysv4.h
3578                if test x$stabs = xyes
3579                then
3580                        tm_file="${tm_file} dbx.h"
3581                fi
3582                tmake_file=i386/t-crtpic
3583                xmake_file=x-svr4
3584                extra_parts="crtbegin.o crtend.o"
3585                fixincludes=fixinc.svr4
3586                ;;
3587         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
3588                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3589                 xm_defines="USG POSIX SMALL_ARG_MAX"
3590                 tm_file=i386/sysv4.h
3591                 if test x$stabs = xyes
3592                 then
3593                         tm_file="${tm_file} dbx.h"
3594                 fi
3595                 tmake_file=i386/t-crtpic
3596                 xmake_file=x-svr4
3597                 extra_parts="crtbegin.o crtend.o"
3598                 ;;
3599         i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
3600                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3601                 xm_defines="USG POSIX"
3602                 tm_file=i386/udk.h
3603                 tmake_file="i386/t-crtpic i386/t-udk"
3604                 xmake_file=x-svr4
3605                 extra_parts="crtbegin.o crtend.o"
3606                 fixincludes="fixinc.svr4"
3607                 ;;
3608         i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
3609                 cpu_type=i386
3610                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
3611                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
3612                 fixincludes=Makefile.in #Don't do it on OSF/1
3613                 if test x$stabs = xyes
3614                 then
3615                         tm_file=i386/osf1elfgdb.h
3616                 else
3617                         tm_file=i386/osf1elf.h
3618                 fi
3619                 tmake_file=i386/t-osf1elf
3620                 xmake_file=i386/x-osf1elf
3621                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3622                 ;;
3623         i[34567]86-*-sysv*)             # Intel 80386's running system V
3624                 xm_defines="USG SVR3"
3625                 xmake_file=i386/x-sysv3
3626                 if test x$gas = xyes
3627                 then
3628                         if test x$stabs = xyes
3629                         then
3630                                 tm_file=i386/svr3dbx.h
3631                                 tmake_file=i386/t-svr3dbx
3632                                 extra_parts="svr3.ifile svr3z.rfile"
3633                         else
3634                                 tm_file=i386/svr3gas.h
3635                                 extra_parts="crtbegin.o crtend.o"
3636                                 tmake_file=i386/t-crtstuff
3637                         fi
3638                 else
3639                         tm_file=i386/sysv3.h
3640                         extra_parts="crtbegin.o crtend.o"
3641                         tmake_file=i386/t-crtstuff
3642                 fi
3643                 ;;
3644         i386-*-vsta)                    # Intel 80386's running VSTa kernel
3645                 xm_file="${xm_file} i386/xm-vsta.h"
3646                 tm_file=i386/vsta.h
3647                 tmake_file=i386/t-vsta
3648                 xmake_file=i386/x-vsta
3649                 ;;
3650         i[34567]86-*-win32)
3651                 xm_file="${xm_file} i386/xm-cygwin.h"
3652                 tmake_file=i386/t-cygwin
3653                 tm_file=i386/win32.h
3654                 xmake_file=i386/x-cygwin
3655                 extra_objs=winnt.o
3656                 fixincludes=Makefile.in
3657                 if test x$enable_threads = xyes; then
3658                         thread_file='win32'
3659                 fi
3660                 exeext=.exe
3661                 ;;
3662         i[34567]86-*-pe | i[34567]86-*-cygwin*)
3663                 xm_file="${xm_file} i386/xm-cygwin.h"
3664                 tmake_file=i386/t-cygwin
3665                 tm_file=i386/cygwin.h
3666                 xmake_file=i386/x-cygwin
3667                 extra_objs=winnt.o
3668                 fixincludes=Makefile.in
3669                 if test x$enable_threads = xyes; then
3670                         thread_file='win32'
3671                 fi
3672                 exeext=.exe
3673                 ;;
3674         i[34567]86-*-mingw32*)
3675                 tm_file=i386/mingw32.h
3676                 xm_file="${xm_file} i386/xm-mingw32.h"
3677                 tmake_file="i386/t-cygwin i386/t-mingw32"
3678                 extra_objs=winnt.o
3679                 xmake_file=i386/x-cygwin
3680                 fixincludes=Makefile.in
3681                 if test x$enable_threads = xyes; then
3682                         thread_file='win32'
3683                 fi
3684                 exeext=.exe
3685                 case $machine in
3686                         *mingw32msv*)
3687                                 ;;
3688                         *minwg32crt* | *mingw32*)
3689                                 tm_file="${tm_file} i386/crtdll.h"
3690                                 ;;
3691                 esac
3692                 ;;
3693         i[34567]86-*-winnt3*)
3694                 tm_file=i386/win-nt.h
3695                 out_file=i386/i386.c
3696                 xm_file="xm-winnt.h ${xm_file}"
3697                 xmake_file=winnt/x-winnt
3698                 tmake_file=i386/t-winnt
3699                 extra_host_objs="winnt.o oldnames.o"
3700                 extra_gcc_objs="spawnv.o oldnames.o"
3701                 fixincludes=fixinc.winnt
3702                 if test x$gnu_ld != xyes
3703                 then
3704                         extra_programs=ld.exe
3705                 fi
3706                 if test x$enable_threads = xyes; then
3707                         thread_file='win32'
3708                 fi
3709                 ;;
3710         i[34567]86-dg-dgux*)
3711                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3712                 xm_defines="USG POSIX"
3713                 out_file=i386/dgux.c
3714                 tm_file=i386/dgux.h
3715                 tmake_file=i386/t-dgux
3716                 xmake_file=i386/x-dgux
3717                 fixincludes=fixinc.dgux
3718                 install_headers_dir=install-headers-cpio
3719               ;;
3720         i860-alliant-*)         # Alliant FX/2800
3721                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
3722                 xm_file="${xm_file}"
3723                 xmake_file=i860/x-fx2800
3724                 tmake_file=i860/t-fx2800
3725                 extra_parts="crtbegin.o crtend.o"
3726                 ;;
3727         i860-*-bsd*)
3728                 tm_file="${tm_file} i860/bsd.h"
3729                 if test x$gas = xyes
3730                 then
3731                         tm_file="${tm_file} i860/bsd-gas.h"
3732                 fi
3733                 use_collect2=yes
3734                 ;;
3735         i860-*-mach*)
3736                 tm_file="${tm_file} i860/mach.h"
3737                 tmake_file=t-libc-ok
3738                 ;;
3739         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
3740                 tm_file="${tm_file} svr3.h i860/paragon.h"
3741                 xm_defines="USG SVR3"
3742                 tmake_file=t-osf
3743                 ;;
3744         i860-*-sysv3*)
3745                 tm_file="${tm_file} svr3.h i860/sysv3.h"
3746                 xm_defines="USG SVR3"
3747                 xmake_file=i860/x-sysv3
3748                 extra_parts="crtbegin.o crtend.o"
3749                 ;;
3750         i860-*-sysv4*)
3751                 tm_file="${tm_file} svr4.h i860/sysv4.h"
3752                 xm_defines="USG SVR3"
3753                 xmake_file=i860/x-sysv4
3754                 tmake_file=t-svr4
3755                 extra_parts="crtbegin.o crtend.o"
3756                 ;;
3757         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
3758                 tm_file="${tm_file} i960/vx960.h"
3759                 tmake_file=i960/t-vxworks960
3760                 use_collect2=yes
3761                 thread_file='vxworks'
3762                 ;;
3763         i960-wrs-vxworks5* | i960-wrs-vxworks)
3764                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
3765                 tmake_file=i960/t-vxworks960
3766                 use_collect2=yes
3767                 thread_file='vxworks'
3768                 ;;
3769         i960-wrs-vxworks*)
3770                 tm_file="${tm_file} i960/vx960.h"
3771                 tmake_file=i960/t-vxworks960
3772                 use_collect2=yes
3773                 thread_file='vxworks'
3774                 ;;
3775         i960-*-coff*)
3776                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
3777                 tmake_file=i960/t-960bare
3778                 use_collect2=yes
3779                 ;;
3780         i960-*-rtems)
3781                 tmake_file="i960/t-960bare t-rtems"
3782                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
3783                 use_collect2=yes
3784                 ;;
3785         i960-*-*)                       # Default i960 environment.
3786                 use_collect2=yes
3787                 ;;
3788         m32r-*-elf*)
3789                 extra_parts="crtinit.o crtfini.o"
3790                 ;;
3791         m68000-convergent-sysv*)
3792                 tm_file=m68k/ctix.h
3793                 xm_file="m68k/xm-3b1.h ${xm_file}"
3794                 xm_defines=USG
3795                 use_collect2=yes
3796                 extra_headers=math-68881.h
3797                 ;;
3798         m68000-hp-bsd*)                 # HP 9000/200 running BSD
3799                 tm_file=m68k/hp2bsd.h
3800                 xmake_file=m68k/x-hp2bsd
3801                 use_collect2=yes
3802                 extra_headers=math-68881.h
3803                 ;;
3804         m68000-hp-hpux*)                # HP 9000 series 300
3805                 xm_file="xm_alloca.h ${xm_file}"
3806                 xm_defines="USG NO_SYS_SIGLIST"
3807                 if test x$gas = xyes
3808                 then
3809                         xmake_file=m68k/x-hp320g
3810                         tm_file=m68k/hp310g.h
3811                 else
3812                         xmake_file=m68k/x-hp320
3813                         tm_file=m68k/hp310.h
3814                 fi
3815                 install_headers_dir=install-headers-cpio
3816                 use_collect2=yes
3817                 extra_headers=math-68881.h
3818                 ;;
3819         m68000-sun-sunos3*)
3820                 tm_file=m68k/sun2.h
3821                 use_collect2=yes
3822                 extra_headers=math-68881.h
3823                 ;;
3824         m68000-sun-sunos4*)
3825                 tm_file=m68k/sun2o4.h
3826                 use_collect2=yes
3827                 extra_headers=math-68881.h
3828                 ;;
3829         m68000-att-sysv*)
3830                 xm_file="m68k/xm-3b1.h ${xm_file}"
3831                 xm_defines=USG
3832                 if test x$gas = xyes
3833                 then
3834                         tm_file=m68k/3b1g.h
3835                 else
3836                         tm_file=m68k/3b1.h
3837                 fi
3838                 use_collect2=yes
3839                 extra_headers=math-68881.h
3840                 ;;
3841         m68k-apple-aux*)                # Apple Macintosh running A/UX
3842                 xm_defines="USG AUX"
3843                 tmake_file=m68k/t-aux
3844                 install_headers_dir=install-headers-cpio
3845                 extra_headers=math-68881.h
3846                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
3847                 tm_file=
3848                 if test "$gnu_ld" = yes
3849                 then
3850                         tm_file="${tm_file} m68k/auxgld.h"
3851                 else
3852                         tm_file="${tm_file} m68k/auxld.h"
3853                 fi
3854                 if test "$gas" = yes
3855                 then
3856                         tm_file="${tm_file} m68k/auxgas.h"
3857                 else
3858                         tm_file="${tm_file} m68k/auxas.h"
3859                 fi
3860                 tm_file="${tm_file} m68k/a-ux.h"
3861                 float_format=m68k
3862                 ;;
3863         m68k-apollo-*)
3864                 tm_file=m68k/apollo68.h
3865                 xmake_file=m68k/x-apollo68
3866                 use_collect2=yes
3867                 extra_headers=math-68881.h
3868                 float_format=m68k
3869                 ;;
3870         m68k-altos-sysv*)                  # Altos 3068
3871                 if test x$gas = xyes
3872                 then
3873                         tm_file=m68k/altos3068.h
3874                         xm_defines=USG
3875                 else
3876                         echo "The Altos is supported only with the GNU assembler" 1>&2
3877                         exit 1
3878                 fi
3879                 extra_headers=math-68881.h
3880                 ;;
3881         m68k-bull-sysv*)                # Bull DPX/2
3882                 if test x$gas = xyes
3883                 then
3884                         if test x$stabs = xyes
3885                         then
3886                                 tm_file=m68k/dpx2cdbx.h
3887                         else
3888                                 tm_file=m68k/dpx2g.h
3889                         fi
3890                 else
3891                         tm_file=m68k/dpx2.h
3892                 fi
3893                 xm_file="xm-alloca.h ${xm_file}"
3894                 xm_defines=USG
3895                 xmake_file=m68k/x-dpx2
3896                 use_collect2=yes
3897                 extra_headers=math-68881.h
3898                 ;;
3899         m68k-atari-sysv4*)              # Atari variant of V.4.
3900                 tm_file=m68k/atari.h
3901                 xm_file="xm-alloca.h ${xm_file}"
3902                 xm_defines="USG FULL_PROTOTYPES"
3903                 tmake_file=t-svr4
3904                 extra_parts="crtbegin.o crtend.o"
3905                 extra_headers=math-68881.h
3906                 float_format=m68k
3907                 ;;
3908         m68k-motorola-sysv*)
3909                 tm_file=m68k/mot3300.h
3910                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
3911                 xm_defines=NO_SYS_SIGLIST
3912                 if test x$gas = xyes
3913                 then
3914                         xmake_file=m68k/x-mot3300-gas
3915                         if test x$gnu_ld = xyes
3916                         then
3917                                 tmake_file=m68k/t-mot3300-gald
3918                         else
3919                                 tmake_file=m68k/t-mot3300-gas
3920                                 use_collect2=yes
3921                         fi
3922                 else
3923                         xmake_file=m68k/x-mot3300
3924                         if test x$gnu_ld = xyes
3925                         then
3926                                 tmake_file=m68k/t-mot3300-gld
3927                         else
3928                                 tmake_file=m68k/t-mot3300
3929                                 use_collect2=yes
3930                         fi
3931                 fi
3932                 gdb_needs_out_file_path=yes
3933                 extra_parts="crt0.o mcrt0.o"
3934                 extra_headers=math-68881.h
3935                 float_format=m68k
3936                 ;;
3937         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
3938                 tm_file=m68k/tower-as.h
3939                 xm_defines="USG SVR3"
3940                 xmake_file=m68k/x-tower
3941                 extra_parts="crtbegin.o crtend.o"
3942                 extra_headers=math-68881.h
3943                 ;;
3944         m68k-plexus-sysv*)
3945                 tm_file=m68k/plexus.h
3946                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
3947                 xm_defines=USG
3948                 use_collect2=yes
3949                 extra_headers=math-68881.h
3950                 ;;
3951         m68k-tti-*)
3952                 tm_file=m68k/pbb.h
3953                 xm_file="xm-alloca.h ${xm_file}"
3954                 xm_defines=USG
3955                 extra_headers=math-68881.h
3956                 ;;
3957         m68k-crds-unos*)
3958                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
3959                 xm_defines="USG unos"
3960                 xmake_file=m68k/x-crds
3961                 tm_file=m68k/crds.h
3962                 use_collect2=yes
3963                 extra_headers=math-68881.h
3964                 ;;
3965         m68k-cbm-sysv4*)                # Commodore variant of V.4.
3966                 tm_file=m68k/amix.h
3967                 xm_file="xm-alloca.h ${xm_file}"
3968                 xm_defines="USG FULL_PROTOTYPES"
3969                 xmake_file=m68k/x-amix
3970                 tmake_file=t-svr4
3971                 extra_parts="crtbegin.o crtend.o"
3972                 extra_headers=math-68881.h
3973                 float_format=m68k
3974                 ;;
3975         m68k-ccur-rtu)
3976                 tm_file=m68k/ccur-GAS.h
3977                 xmake_file=m68k/x-ccur
3978                 extra_headers=math-68881.h
3979                 use_collect2=yes
3980                 float_format=m68k
3981                 ;;
3982         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
3983                 tm_file=m68k/hp3bsd44.h
3984                 xmake_file=m68k/x-hp3bsd44
3985                 use_collect2=yes
3986                 extra_headers=math-68881.h
3987                 float_format=m68k
3988                 ;;
3989         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
3990                 tm_file=m68k/hp3bsd.h
3991                 use_collect2=yes
3992                 extra_headers=math-68881.h
3993                 float_format=m68k
3994                 ;;
3995         m68k-isi-bsd*)
3996                 if test x$with_fp = xno
3997                 then
3998                         tm_file=m68k/isi-nfp.h
3999                 else
4000                         tm_file=m68k/isi.h
4001                         float_format=m68k
4002                 fi
4003                 use_collect2=yes
4004                 extra_headers=math-68881.h
4005                 ;;
4006         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
4007                 xm_file="xm_alloca.h ${xm_file}"
4008                 xm_defines="USG NO_SYS_SIGLIST"
4009                 if test x$gas = xyes
4010                 then
4011                         xmake_file=m68k/x-hp320g
4012                         tm_file=m68k/hp320g.h
4013                 else
4014                         xmake_file=m68k/x-hp320
4015                         tm_file=m68k/hpux7.h
4016                 fi
4017                 install_headers_dir=install-headers-cpio
4018                 use_collect2=yes
4019                 extra_headers=math-68881.h
4020                 float_format=m68k
4021                 ;;
4022         m68k-hp-hpux*)  # HP 9000 series 300
4023                 xm_file="xm_alloca.h ${xm_file}"
4024                 xm_defines="USG NO_SYS_SIGLIST"
4025                 if test x$gas = xyes
4026                 then
4027                         xmake_file=m68k/x-hp320g
4028                         tm_file=m68k/hp320g.h
4029                 else
4030                         xmake_file=m68k/x-hp320
4031                         tm_file=m68k/hp320.h
4032                 fi
4033                 install_headers_dir=install-headers-cpio
4034                 use_collect2=yes
4035                 extra_headers=math-68881.h
4036                 float_format=m68k
4037                 ;;
4038         m68k-sun-mach*)
4039                 tm_file=m68k/sun3mach.h
4040                 use_collect2=yes
4041                 extra_headers=math-68881.h
4042                 float_format=m68k
4043                 ;;
4044         m68k-sony-newsos3*)
4045                 if test x$gas = xyes
4046                 then
4047                         tm_file=m68k/news3gas.h
4048                 else
4049                         tm_file=m68k/news3.h
4050                 fi
4051                 use_collect2=yes
4052                 extra_headers=math-68881.h
4053                 float_format=m68k
4054                 ;;
4055         m68k-sony-bsd* | m68k-sony-newsos*)
4056                 if test x$gas = xyes
4057                 then
4058                         tm_file=m68k/newsgas.h
4059                 else
4060                         tm_file=m68k/news.h
4061                 fi
4062                 use_collect2=yes
4063                 extra_headers=math-68881.h
4064                 float_format=m68k
4065                 ;;
4066         m68k-next-nextstep2*)
4067                 tm_file=m68k/next21.h
4068                 xm_file="m68k/xm-next.h ${xm_file}"
4069                 tmake_file=m68k/t-next
4070                 xmake_file=m68k/x-next
4071                 extra_objs=nextstep.o
4072                 extra_headers=math-68881.h
4073                 use_collect2=yes
4074                 float_format=m68k
4075                 ;;
4076         m68k-next-nextstep3*)
4077                 tm_file=m68k/next.h
4078                 xm_file="m68k/xm-next.h ${xm_file}"
4079                 tmake_file=m68k/t-next
4080                 xmake_file=m68k/x-next
4081                 extra_objs=nextstep.o
4082                 extra_parts="crtbegin.o crtend.o"
4083                 extra_headers=math-68881.h
4084                 float_format=m68k
4085                 if test x$enable_threads = xyes; then
4086                         thread_file='mach'
4087                 fi
4088                 ;;
4089         m68k-sun-sunos3*)
4090                 if test x$with_fp = xno
4091                 then
4092                         tm_file=m68k/sun3n3.h
4093                 else
4094                         tm_file=m68k/sun3o3.h
4095                         float_format=m68k
4096                 fi
4097                 use_collect2=yes
4098                 extra_headers=math-68881.h
4099                 ;;
4100         m68k-sun-sunos*)                        # For SunOS 4 (the default).
4101                 if test x$with_fp = xno
4102                 then
4103                         tm_file=m68k/sun3n.h
4104                 else
4105                         tm_file=m68k/sun3.h
4106                         float_format=m68k
4107                 fi
4108                 use_collect2=yes
4109                 extra_headers=math-68881.h
4110                 ;;
4111         m68k-wrs-vxworks*)
4112                 tm_file=m68k/vxm68k.h
4113                 tmake_file=m68k/t-vxworks68
4114                 extra_headers=math-68881.h
4115                 thread_file='vxworks'
4116                 float_format=m68k
4117                 ;;
4118         m68k-*-aout*)
4119                 tmake_file=m68k/t-m68kbare
4120                 tm_file="m68k/m68k-aout.h libgloss.h"
4121                 extra_headers=math-68881.h
4122                 float_format=m68k
4123                 ;;
4124         m68k-*-coff*)
4125                 tmake_file=m68k/t-m68kbare
4126                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
4127                 extra_headers=math-68881.h
4128                 float_format=m68k
4129                 ;;
4130         m68k-*-lynxos*)
4131                 if test x$gas = xyes
4132                 then
4133                         tm_file=m68k/lynx.h
4134                 else
4135                         tm_file=m68k/lynx-ng.h
4136                 fi
4137                 xm_file=m68k/xm-lynx.h
4138                 xmake_file=x-lynx
4139                 tmake_file=m68k/t-lynx
4140                 extra_headers=math-68881.h
4141                 float_format=m68k
4142                 ;;
4143         m68k*-*-netbsd*)
4144                 tm_file=m68k/netbsd.h
4145                 # On NetBSD, the headers are already okay, except for math.h.
4146                 fixincludes=fixinc.wrap
4147                 tmake_file=t-netbsd
4148                 float_format=m68k
4149                 ;;
4150         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
4151                 xm_file="xm-alloca.h ${xm_file}"
4152                 xm_defines=USG
4153                 xmake_file=m68k/x-m68kv
4154                 extra_parts="crtbegin.o crtend.o"
4155                 extra_headers=math-68881.h
4156                 float_format=m68k
4157                 ;;
4158         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
4159                 tm_file=m68k/m68kv4.h
4160                 xm_file="xm-alloca.h ${xm_file}"
4161                 xm_defines=USG
4162                 tmake_file=t-svr4
4163                 extra_parts="crtbegin.o crtend.o"
4164                 extra_headers=math-68881.h
4165                 float_format=m68k
4166                 ;;
4167         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
4168                                         # with a.out format
4169                 xmake_file=x-linux
4170                 tm_file=m68k/linux-aout.h
4171                 tmake_file="t-linux-aout m68k/t-linux-aout"
4172                 fixincludes=Makefile.in # The headers are ok already.
4173                 extra_headers=math-68881.h
4174                 float_format=m68k
4175                 gnu_ld=yes
4176                 ;;
4177         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
4178                                         # with ELF format using the
4179                                         # GNU/Linux C library 5
4180                 xmake_file=x-linux
4181                 tm_file=m68k/linux.h
4182                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
4183                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4184                 fixincludes=Makefile.in # The headers are ok already.
4185                 extra_headers=math-68881.h
4186                 float_format=m68k
4187                 gnu_ld=yes
4188                 ;;
4189         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
4190                                         # with ELF format using glibc 2
4191                                         # aka the GNU/Linux C library 6.
4192                 xmake_file=x-linux
4193                 tm_file=m68k/linux.h
4194                 tmake_file="t-linux m68k/t-linux"
4195                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4196                 fixincludes=Makefile.in # The headers are ok already.
4197                 extra_headers=math-68881.h
4198                 float_format=m68k
4199                 gnu_ld=yes
4200                 if test x$enable_threads = xyes; then
4201                         thread_file='posix'
4202                 fi
4203                 ;;
4204         m68k-*-psos*)
4205                 tmake_file=m68k/t-m68kbare
4206                 tm_file=m68k/m68k-psos.h
4207                 extra_headers=math-68881.h
4208                 float_format=m68k
4209                 ;;
4210         m68k-*-rtems*)
4211                 tmake_file="m68k/t-m68kbare t-rtems"
4212                 tm_file=m68k/rtems.h
4213                 extra_headers=math-68881.h
4214                 float_format=m68k
4215                 ;;
4216
4217         m88k-dg-dgux*)
4218                 case $machine in
4219                   m88k-dg-dguxbcs*)
4220                     tm_file=m88k/dguxbcs.h
4221                     tmake_file=m88k/t-dguxbcs
4222                     ;;
4223                   *)
4224                     tm_file=m88k/dgux.h
4225                     tmake_file=m88k/t-dgux
4226                     ;;
4227                 esac
4228                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
4229                 xmake_file=m88k/x-dgux
4230                 if test x$gas = xyes
4231                 then
4232                         tmake_file=m88k/t-dgux-gas
4233                 fi
4234                 fixincludes=fixinc.dgux
4235                 ;;
4236         m88k-dolphin-sysv3*)
4237                 tm_file=m88k/dolph.h
4238                 extra_parts="crtbegin.o crtend.o"
4239                 xm_file="m88k/xm-sysv3.h ${xm_file}"
4240                 xmake_file=m88k/x-dolph
4241                 if test x$gas = xyes
4242                 then
4243                         tmake_file=m88k/t-m88k-gas
4244                 fi
4245                 ;;
4246         m88k-tektronix-sysv3)
4247                 tm_file=m88k/tekXD88.h
4248                 extra_parts="crtbegin.o crtend.o"
4249                 xm_file="m88k/xm-sysv3.h ${xm_file}"
4250                 xmake_file=m88k/x-tekXD88
4251                 if test x$gas = xyes
4252                 then
4253                         tmake_file=m88k/t-m88k-gas
4254                 fi
4255                 ;;
4256         m88k-*-aout*)
4257                 tm_file=m88k/m88k-aout.h
4258                 ;;
4259         m88k-*-coff*)
4260                 tm_file=m88k/m88k-coff.h
4261                 tmake_file=m88k/t-bug
4262                 ;;
4263         m88k-*-luna*)
4264                 tm_file=m88k/luna.h
4265                 extra_parts="crtbegin.o crtend.o"
4266                 if test x$gas = xyes
4267                 then
4268                         tmake_file=m88k/t-luna-gas
4269                 else
4270                         tmake_file=m88k/t-luna
4271                 fi
4272                 ;;
4273         m88k-*-sysv3*)
4274                 tm_file=m88k/sysv3.h
4275                 extra_parts="crtbegin.o crtend.o"
4276                 xm_file="m88k/xm-sysv3.h ${xm_file}"
4277                 xmake_file=m88k/x-sysv3
4278                 if test x$gas = xyes
4279                 then
4280                         tmake_file=m88k/t-m88k-gas
4281                 fi
4282                 ;;
4283         m88k-*-sysv4*)
4284                 tm_file=m88k/sysv4.h
4285                 extra_parts="crtbegin.o crtend.o"
4286                 xmake_file=m88k/x-sysv4
4287                 tmake_file=m88k/t-sysv4
4288                 ;;
4289         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
4290                 tm_file=mips/iris6.h
4291                 xm_file=mips/xm-iris6.h
4292                 fixincludes=fixinc.irix
4293                 xmake_file=mips/x-iris6
4294                 tmake_file=mips/t-iris6
4295 #               if test x$enable_threads = xyes; then
4296 #                       thread_file='irix'
4297 #               fi
4298                 ;;
4299         mips-wrs-vxworks)
4300                 tm_file="mips/elf.h libgloss.h"
4301                 tmake_file=mips/t-ecoff
4302                 gas=yes
4303                 gnu_ld=yes
4304                 extra_parts="crtbegin.o crtend.o"
4305 #               thread_file='vxworks'
4306                 ;;
4307         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
4308                 tm_file="mips/iris6.h mips/cross64.h"
4309                 xm_defines=USG
4310                 xm_file="mips/xm-iris5.h"
4311                 fixincludes=Makefile.in
4312                 xmake_file=mips/x-iris
4313                 tmake_file=mips/t-cross64
4314                 # See comment in mips/iris[56].h files.
4315                 use_collect2=yes
4316 #               if test x$enable_threads = xyes; then
4317 #                       thread_file='irix'
4318 #               fi
4319                 ;;
4320         mips-sni-sysv4)
4321                 if test x$gas = xyes
4322                 then
4323                         if test x$stabs = xyes
4324                         then
4325                                 tm_file=mips/iris5gdb.h
4326                         else
4327                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
4328                         fi
4329                 else
4330                         tm_file=mips/sni-svr4.h
4331                 fi
4332                 xm_defines=USG
4333                 xmake_file=mips/x-sni-svr4
4334                 tmake_file=mips/t-mips-gas
4335                 if test x$gnu_ld != xyes
4336                 then
4337                         use_collect2=yes
4338                 fi
4339                 ;;
4340         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
4341                 if test x$gas = xyes
4342                 then
4343                         tm_file="mips/iris5.h mips/iris5gas.h"
4344                         if test x$stabs = xyes
4345                         then
4346                                 tm_file="${tm_file} dbx.h"
4347                         fi
4348                 else
4349                         tm_file=mips/iris5.h
4350                 fi
4351                 xm_defines=USG
4352                 xm_file="mips/xm-iris5.h"
4353                 fixincludes=fixinc.irix
4354                 xmake_file=mips/x-iris
4355                 # mips-tfile doesn't work yet
4356                 tmake_file=mips/t-mips-gas
4357                 # See comment in mips/iris5.h file.
4358                 use_collect2=yes
4359 #               if test x$enable_threads = xyes; then
4360 #                       thread_file='irix'
4361 #               fi
4362                 ;;
4363         mips-sgi-irix4loser*)           # Mostly like a MIPS.
4364                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
4365                 if test x$stabs = xyes; then
4366                         tm_file="${tm_file} dbx.h"
4367                 fi
4368                 xm_defines=USG
4369                 xmake_file=mips/x-iris
4370                 if test x$gas = xyes
4371                 then
4372                         tmake_file=mips/t-mips-gas
4373                 else
4374                         extra_passes="mips-tfile mips-tdump"
4375                 fi
4376                 if test x$gnu_ld != xyes
4377                 then
4378                         use_collect2=yes
4379                 fi
4380 #               if test x$enable_threads = xyes; then
4381 #                       thread_file='irix'
4382 #               fi
4383                 ;;
4384         mips-sgi-irix4*)                # Mostly like a MIPS.
4385                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
4386                 if test x$stabs = xyes; then
4387                         tm_file="${tm_file} dbx.h"
4388                 fi
4389                 xm_defines=USG
4390                 xmake_file=mips/x-iris
4391                 if test x$gas = xyes
4392                 then
4393                         tmake_file=mips/t-mips-gas
4394                 else
4395                         extra_passes="mips-tfile mips-tdump"
4396                 fi
4397                 if test x$gnu_ld != xyes
4398                 then
4399                         use_collect2=yes
4400                 fi
4401 #               if test x$enable_threads = xyes; then
4402 #                       thread_file='irix'
4403 #               fi
4404                 ;;
4405         mips-sgi-*)                     # Mostly like a MIPS.
4406                 tm_file="mips/iris3.h ${tm_file}"
4407                 if test x$stabs = xyes; then
4408                         tm_file="${tm_file} dbx.h"
4409                 fi
4410                 xm_defines=USG
4411                 xmake_file=mips/x-iris3
4412                 if test x$gas = xyes
4413                 then
4414                         tmake_file=mips/t-mips-gas
4415                 else
4416                         extra_passes="mips-tfile mips-tdump"
4417                 fi
4418                 if test x$gnu_ld != xyes
4419                 then
4420                         use_collect2=yes
4421                 fi
4422                 ;;
4423         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
4424                 tm_file="mips/osfrose.h ${tm_file}"
4425                 xmake_file=mips/x-osfrose
4426                 tmake_file=mips/t-osfrose
4427                 extra_objs=halfpic.o
4428                 use_collect2=yes
4429                 ;;
4430         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
4431                 tm_file=mips/dec-osf1.h
4432                 if test x$stabs = xyes; then
4433                         tm_file="${tm_file} dbx.h"
4434                 fi
4435                 xmake_file=mips/x-dec-osf1
4436                 if test x$gas = xyes
4437                 then
4438                         tmake_file=mips/t-mips-gas
4439                 else
4440                         tmake_file=mips/t-ultrix
4441                         extra_passes="mips-tfile mips-tdump"
4442                 fi
4443                 if test x$gnu_ld != xyes
4444                 then
4445                         use_collect2=yes
4446                 fi
4447                 ;;
4448         mips-dec-bsd*)                  # Decstation running 4.4 BSD
4449               tm_file=mips/dec-bsd.h
4450               fixincludes=
4451               if test x$gas = xyes
4452               then
4453                         tmake_file=mips/t-mips-gas
4454               else
4455                         tmake_file=mips/t-ultrix
4456                         extra_passes="mips-tfile mips-tdump"
4457               fi
4458               if test x$gnu_ld != xyes
4459               then
4460                         use_collect2=yes
4461               fi
4462               ;;
4463         mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
4464                 tm_file=mips/netbsd.h
4465                 # On NetBSD, the headers are already okay, except for math.h.
4466                 fixincludes=fixinc.wrap
4467                 tmake_file=t-netbsd
4468                 ;;
4469         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
4470                 tm_file="mips/news4.h ${tm_file}"
4471                 if test x$stabs = xyes; then
4472                         tm_file="${tm_file} dbx.h"
4473                 fi
4474                 if test x$gas = xyes
4475                 then
4476                         tmake_file=mips/t-mips-gas
4477                 else
4478                         extra_passes="mips-tfile mips-tdump"
4479                 fi
4480                 if test x$gnu_ld != xyes
4481                 then
4482                         use_collect2=yes
4483                 fi
4484                 xmake_file=mips/x-sony
4485                 ;;
4486         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
4487                                         # That is based on svr4.
4488                 # t-svr4 is not right because this system doesn't use ELF.
4489                 tm_file="mips/news5.h ${tm_file}"
4490                 if test x$stabs = xyes; then
4491                         tm_file="${tm_file} dbx.h"
4492                 fi
4493                 xm_file="xm-siglist.h ${xm_file}"
4494                 xm_defines=USG
4495                 if test x$gas = xyes
4496                 then
4497                         tmake_file=mips/t-mips-gas
4498                 else
4499                         extra_passes="mips-tfile mips-tdump"
4500                 fi
4501                 if test x$gnu_ld != xyes
4502                 then
4503                         use_collect2=yes
4504                 fi
4505                 ;;
4506         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
4507                 tm_file="mips/svr4-5.h mips/svr4-t.h"
4508                 if test x$stabs = xyes; then
4509                         tm_file="${tm_file} dbx.h"
4510                 fi
4511                 xm_file="xm-siglist.h ${xm_file}"
4512                 xm_defines=USG
4513                 xmake_file=mips/x-sysv
4514                 if test x$gas = xyes
4515                 then
4516                         tmake_file=mips/t-mips-gas
4517                         extra_parts="crtbegin.o crtend.o"
4518                 else
4519                         tmake_file=mips/t-mips
4520                         extra_passes="mips-tfile mips-tdump"
4521                 fi
4522                 if test x$gnu_ld != xyes
4523                 then
4524                         use_collect2=yes
4525                 fi
4526                 ;;
4527         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
4528                 tm_file="mips/ultrix.h ${tm_file}"
4529                 if test x$stabs = xyes; then
4530                         tm_file="${tm_file} dbx.h"
4531                 fi
4532                 xmake_file=mips/x-ultrix
4533                 if test x$gas = xyes
4534                 then
4535                         tmake_file=mips/t-mips-gas
4536                 else
4537                         tmake_file=mips/t-ultrix
4538                         extra_passes="mips-tfile mips-tdump"
4539                 fi
4540                 if test x$gnu_ld != xyes
4541                 then
4542                         use_collect2=yes
4543                 fi
4544                 ;;
4545         mips-*-riscos[56789]bsd*)
4546                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
4547                 if test x$stabs = xyes; then
4548                         tm_file="${tm_file} dbx.h"
4549                 fi
4550                 if test x$gas = xyes
4551                 then
4552                         tmake_file=mips/t-bsd-gas
4553                 else
4554                         tmake_file=mips/t-bsd
4555                         extra_passes="mips-tfile mips-tdump"
4556                 fi
4557                 if test x$gnu_ld != xyes
4558                 then
4559                         use_collect2=yes
4560                 fi
4561                 ;;
4562         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
4563                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
4564                 if test x$stabs = xyes; then
4565                         tm_file="${tm_file} dbx.h"
4566                 fi
4567                 if test x$gas = xyes
4568                 then
4569                         tmake_file=mips/t-bsd-gas
4570                 else
4571                         tmake_file=mips/t-bsd
4572                         extra_passes="mips-tfile mips-tdump"
4573                 fi
4574                 if test x$gnu_ld != xyes
4575                 then
4576                         use_collect2=yes
4577                 fi
4578                 ;;
4579         mips-*-riscos[56789]sysv4*)
4580                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
4581                 if test x$stabs = xyes; then
4582                         tm_file="${tm_file} dbx.h"
4583                 fi
4584                 xm_file="xm-siglist.h ${xm_file}"
4585                 xmake_file=mips/x-sysv
4586                 if test x$gas = xyes
4587                 then
4588                         tmake_file=mips/t-svr4-gas
4589                 else
4590                         tmake_file=mips/t-svr4
4591                         extra_passes="mips-tfile mips-tdump"
4592                 fi
4593                 if test x$gnu_ld != xyes
4594                 then
4595                         use_collect2=yes
4596                 fi
4597                 ;;
4598         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
4599                 tm_file="mips/svr4-4.h ${tm_file}"
4600                 if test x$stabs = xyes; then
4601                         tm_file="${tm_file} dbx.h"
4602                 fi
4603                 xm_defines=USG
4604                 xmake_file=mips/x-sysv
4605                 if test x$gas = xyes
4606                 then
4607                         tmake_file=mips/t-svr4-gas
4608                 else
4609                         tmake_file=mips/t-svr4
4610                         extra_passes="mips-tfile mips-tdump"
4611                 fi
4612                 if test x$gnu_ld != xyes
4613                 then
4614                         use_collect2=yes
4615                 fi
4616                 ;;
4617         mips-*-riscos[56789]sysv*)
4618                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
4619                 if test x$stabs = xyes; then
4620                         tm_file="${tm_file} dbx.h"
4621                 fi
4622                 xm_defines=USG
4623                 xmake_file=mips/x-sysv
4624                 if test x$gas = xyes
4625                 then
4626                         tmake_file=mips/t-svr3-gas
4627                 else
4628                         tmake_file=mips/t-svr3
4629                         extra_passes="mips-tfile mips-tdump"
4630                 fi
4631                 if test x$gnu_ld != xyes
4632                 then
4633                         use_collect2=yes
4634                 fi
4635                 ;;
4636         mips-*-sysv* | mips-*-riscos*sysv*)
4637                 tm_file="mips/svr3-4.h ${tm_file}"
4638                 if test x$stabs = xyes; then
4639                         tm_file="${tm_file} dbx.h"
4640                 fi
4641                 xm_defines=USG
4642                 xmake_file=mips/x-sysv
4643                 if test x$gas = xyes
4644                 then
4645                         tmake_file=mips/t-svr3-gas
4646                 else
4647                         tmake_file=mips/t-svr3
4648                         extra_passes="mips-tfile mips-tdump"
4649                 fi
4650                 if test x$gnu_ld != xyes
4651                 then
4652                         use_collect2=yes
4653                 fi
4654                 ;;
4655         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
4656                 tm_file=mips/mips-5.h
4657                 if test x$stabs = xyes; then
4658                         tm_file="${tm_file} dbx.h"
4659                 fi
4660                 if test x$gas = xyes
4661                 then
4662                         tmake_file=mips/t-mips-gas
4663                 else
4664                         extra_passes="mips-tfile mips-tdump"
4665                 fi
4666                 if test x$gnu_ld != xyes
4667                 then
4668                         use_collect2=yes
4669                 fi
4670                 ;;
4671         mips-*-gnu*)
4672                 ;;
4673         mipsel-*-ecoff*)
4674                 tm_file=mips/ecoffl.h
4675                 if test x$stabs = xyes; then
4676                         tm_file="${tm_file} dbx.h"
4677                 fi
4678                 tmake_file=mips/t-ecoff
4679                 ;;
4680         mips-*-ecoff*)
4681                 tm_file="gofast.h mips/ecoff.h"
4682                 if test x$stabs = xyes; then
4683                         tm_file="${tm_file} dbx.h"
4684                 fi
4685                 tmake_file=mips/t-ecoff
4686                 ;;
4687         mipsel-*-elf*)
4688                 tm_file="mips/elfl.h libgloss.h"
4689                 tmake_file=mips/t-ecoff
4690                 ;;
4691         mips-*-elf*)
4692                 tm_file="mips/elf.h libgloss.h"
4693                 tmake_file=mips/t-ecoff
4694                 ;;
4695         mips64el-*-elf*)
4696                 tm_file="mips/elfl64.h libgloss.h"
4697                 tmake_file=mips/t-ecoff
4698                 ;;
4699         mips64orionel-*-elf*)
4700                 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
4701                 tmake_file=mips/t-ecoff
4702                 ;;
4703         mips64-*-elf*)
4704                 tm_file="mips/elf64.h libgloss.h"
4705                 tmake_file=mips/t-ecoff
4706                 ;;
4707         mips64orion-*-elf*)
4708                 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
4709                 tmake_file=mips/t-ecoff
4710                 ;;
4711         mips64orion-*-rtems*)
4712                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
4713                 tmake_file="mips/t-ecoff t-rtems"
4714                 ;;
4715         mipstx39el-*-elf*)
4716                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
4717                 tmake_file=mips/t-r3900
4718                 ;;
4719         mipstx39-*-elf*)
4720                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
4721                 tmake_file=mips/t-r3900
4722                 # FIXME mips-elf should be fixed to use crtstuff.
4723                 use_collect2=yes
4724                 ;;
4725         mips-*-*)                               # Default MIPS RISC-OS 4.0.
4726                 if test x$stabs = xyes; then
4727                         tm_file="${tm_file} dbx.h"
4728                 fi
4729                 if test x$gas = xyes
4730                 then
4731                         tmake_file=mips/t-mips-gas
4732                 else
4733                         extra_passes="mips-tfile mips-tdump"
4734                 fi
4735                 if test x$gnu_ld != xyes
4736                 then
4737                         use_collect2=yes
4738                 fi
4739                 ;;
4740         mn10200-*-*)
4741                 cpu_type=mn10200
4742                 tm_file="mn10200/mn10200.h"
4743                 if test x$stabs = xyes
4744                 then
4745                         tm_file="${tm_file} dbx.h"
4746                 fi
4747                 use_collect2=no
4748                 ;;
4749         mn10300-*-*)
4750                 cpu_type=mn10300
4751                 tm_file="mn10300/mn10300.h"
4752                 if test x$stabs = xyes
4753                 then
4754                         tm_file="${tm_file} dbx.h"
4755                 fi
4756                 use_collect2=no
4757                 ;;
4758         ns32k-encore-bsd*)
4759                 tm_file=ns32k/encore.h
4760                 use_collect2=yes
4761                 ;;
4762         ns32k-sequent-bsd*)
4763                 tm_file=ns32k/sequent.h
4764                 use_collect2=yes
4765                 ;;
4766         ns32k-tek6100-bsd*)
4767                 tm_file=ns32k/tek6100.h
4768                 use_collect2=yes
4769                 ;;
4770         ns32k-tek6200-bsd*)
4771                 tm_file=ns32k/tek6200.h
4772                 use_collect2=yes
4773                 ;;
4774 # This has not been updated to GCC 2.
4775 #       ns32k-ns-genix*)
4776 #               xm_defines=USG
4777 #               xmake_file=ns32k/x-genix
4778 #               tm_file=ns32k/genix.h
4779 #               use_collect2=yes
4780 #               ;;
4781         ns32k-merlin-*)
4782                 tm_file=ns32k/merlin.h
4783                 use_collect2=yes
4784                 ;;
4785         ns32k-pc532-mach*)
4786                 tm_file=ns32k/pc532-mach.h
4787                 use_collect2=yes
4788                 ;;
4789         ns32k-pc532-minix*)
4790                 tm_file=ns32k/pc532-min.h
4791                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
4792                 xm_defines=USG
4793                 use_collect2=yes
4794                 ;;
4795         ns32k-*-netbsd*)
4796                 tm_file=ns32k/netbsd.h
4797                 xm_file="ns32k/xm-netbsd.h ${xm_file}"
4798                 # On NetBSD, the headers are already okay, except for math.h.
4799                 fixincludes=fixinc.wrap
4800                 tmake_file=t-netbsd
4801                 ;;
4802         pdp11-*-bsd)
4803                 tm_file="${tm_file} pdp11/2bsd.h"
4804                 ;;
4805         pdp11-*-*)
4806                 ;;
4807         pyramid-*-*)
4808                 cpu_type=pyr
4809                 xmake_file=pyr/x-pyr
4810                 use_collect2=yes
4811                 ;;
4812         romp-*-aos*)
4813                 use_collect2=yes
4814                 ;;
4815         romp-*-mach*)
4816                 xmake_file=romp/x-mach
4817                 use_collect2=yes
4818                 ;;
4819         powerpc-*-beos*)
4820                 cpu_type=rs6000
4821                 tm_file=rs6000/beos.h
4822                 xm_file=rs6000/xm-beos.h
4823                 tmake_file=rs6000/t-beos
4824                 xmake_file=rs6000/x-beos
4825                 ;;
4826         powerpc-*-sysv* | powerpc-*-elf*)
4827                 tm_file=rs6000/sysv4.h
4828                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4829                 xm_defines="USG POSIX"
4830                 extra_headers=ppc-asm.h
4831                 if test x$gas = xyes
4832                 then
4833                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4834                 else
4835                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4836                 fi
4837                 xmake_file=rs6000/x-sysv4
4838                 ;;
4839         powerpc-*-eabiaix*)
4840                 tm_file=rs6000/eabiaix.h
4841                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4842                 fixincludes=Makefile.in
4843                 extra_headers=ppc-asm.h
4844                 ;;
4845         powerpc-*-eabisim*)
4846                 tm_file=rs6000/eabisim.h
4847                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4848                 fixincludes=Makefile.in
4849                 extra_headers=ppc-asm.h
4850                 ;;
4851         powerpc-*-eabi*)
4852                 tm_file=rs6000/eabi.h
4853                 if test x$gas = xyes
4854                 then
4855                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4856                 else
4857                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4858                 fi
4859                 fixincludes=Makefile.in
4860                 extra_headers=ppc-asm.h
4861                 ;;
4862         powerpc-*-rtems*)
4863                 tm_file=rs6000/rtems.h
4864                 if test x$gas = xyes
4865                 then
4866                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
4867                 else
4868                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
4869                 fi
4870                 fixincludes=Makefile.in
4871                 extra_headers=ppc-asm.h
4872                 ;;
4873         powerpc-*-linux-gnulibc1)
4874                 tm_file=rs6000/linux.h
4875                 xm_file=rs6000/xm-sysv4.h
4876                 out_file=rs6000/rs6000.c
4877                 if test x$gas = xyes
4878                 then
4879                         tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
4880                 else
4881                         tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
4882                 fi
4883                 xmake_file=x-linux
4884                 fixincludes=Makefile.in
4885                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4886                 extra_headers=ppc-asm.h
4887                 if test x$enable_threads = xyes; then
4888                         thread_file='posix'
4889                 fi
4890                 ;;
4891         powerpc-*-linux-gnu*)
4892                 tm_file=rs6000/linux.h
4893                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4894                 xm_defines="USG ${xm_defines}"
4895                 out_file=rs6000/rs6000.c
4896                 if test x$gas = xyes
4897                 then
4898                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
4899                 else
4900                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
4901                 fi
4902                 xmake_file=x-linux
4903                 fixincludes=Makefile.in
4904                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4905                 extra_headers=ppc-asm.h
4906                 if test x$enable_threads = xyes; then
4907                         thread_file='posix'
4908                 fi
4909                 ;;
4910         powerpc-wrs-vxworks*)
4911                 cpu_type=rs6000
4912                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4913                 xm_defines="USG POSIX"
4914                 tm_file=rs6000/vxppc.h
4915                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4916                 extra_headers=ppc-asm.h
4917                 thread_file='vxworks'
4918                 ;;
4919         powerpcle-*-sysv* | powerpcle-*-elf*)
4920                 tm_file=rs6000/sysv4le.h
4921                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4922                 xm_defines="USG POSIX"
4923                 if test x$gas = xyes
4924                 then
4925                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4926                 else
4927                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4928                 fi
4929                 xmake_file=rs6000/x-sysv4
4930                 extra_headers=ppc-asm.h
4931                 ;;
4932         powerpcle-*-eabisim*)
4933                 tm_file=rs6000/eabilesim.h
4934                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4935                 fixincludes=Makefile.in
4936                 extra_headers=ppc-asm.h
4937                 ;;
4938         powerpcle-*-eabi*)
4939                 tm_file=rs6000/eabile.h
4940                 if test x$gas = xyes
4941                 then
4942                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4943                 else
4944                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4945                 fi
4946                 fixincludes=Makefile.in
4947                 extra_headers=ppc-asm.h
4948                 ;;
4949         powerpcle-*-winnt* )
4950                 tm_file=rs6000/win-nt.h
4951                 tmake_file=rs6000/t-winnt
4952 #               extra_objs=pe.o
4953                 fixincludes=Makefile.in
4954                 if test x$enable_threads = xyes; then
4955                         thread_file='win32'
4956                 fi
4957                 extra_headers=ppc-asm.h
4958                 ;;
4959         powerpcle-*-pe | powerpcle-*-cygwin*)
4960                 tm_file=rs6000/cygwin.h
4961                 xm_file="rs6000/xm-cygwin.h ${xm_file}"
4962                 tmake_file=rs6000/t-winnt
4963                 xmake_file=rs6000/x-cygwin
4964 #               extra_objs=pe.o
4965                 fixincludes=Makefile.in
4966                 if test x$enable_threads = xyes; then
4967                         thread_file='win32'
4968                 fi
4969                 exeext=.exe
4970                 extra_headers=ppc-asm.h
4971                 ;;
4972         powerpcle-*-solaris2*)
4973                 tm_file=rs6000/sol2.h
4974                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4975                 xm_defines="USG POSIX"
4976                 if test x$gas = xyes
4977                 then
4978                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4979                 else
4980                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4981                 fi
4982                 xmake_file=rs6000/x-sysv4
4983                 case $machine in
4984                 *-*-solaris2.[0-4])
4985                         fixincludes=fixinc.svr4;;
4986                 *)
4987                         fixincludes=fixinc.wrap;;
4988                 esac
4989                 extra_headers=ppc-asm.h
4990                 ;;
4991         rs6000-ibm-aix3.[01]*)
4992                 tm_file=rs6000/aix31.h
4993                 xmake_file=rs6000/x-aix31
4994                 use_collect2=yes
4995                 ;;
4996         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
4997                 tm_file=rs6000/aix3newas.h
4998                 if test x$host != x$target
4999                 then
5000                         tmake_file=rs6000/t-xnewas
5001                 else
5002                         tmake_file=rs6000/t-newas
5003                 fi
5004                 use_collect2=yes
5005                 ;;
5006         rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
5007                 tm_file=rs6000/aix41.h
5008                 if test x$host != x$target
5009                 then
5010                         tmake_file=rs6000/t-xnewas
5011                 else
5012                         tmake_file=rs6000/t-newas
5013                 fi
5014                 xmake_file=rs6000/x-aix41
5015                 use_collect2=yes
5016                 ;;
5017         rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
5018                 tm_file=rs6000/aix43.h
5019                 if test x$host != x$target
5020                 then
5021                         tmake_file=rs6000/t-xaix43
5022                 else
5023                         tmake_file=rs6000/t-aix43
5024                 fi
5025                 xmake_file=rs6000/x-aix43
5026                 use_collect2=yes
5027                 ;;
5028         rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
5029                 tm_file=rs6000/aix43.h
5030                 if test x$host != x$target
5031                 then
5032                         tmake_file=rs6000/t-xaix43
5033                 else
5034                         tmake_file=rs6000/t-aix43
5035                 fi
5036                 xmake_file=rs6000/x-aix43
5037                 use_collect2=yes
5038                 ;;
5039         rs6000-ibm-aix*)
5040                 use_collect2=yes
5041                 ;;
5042         rs6000-bull-bosx)
5043                 use_collect2=yes
5044                 ;;
5045         rs6000-*-mach*)
5046                 tm_file=rs6000/mach.h
5047                 xm_file="${xm_file} rs6000/xm-mach.h"
5048                 xmake_file=rs6000/x-mach
5049                 use_collect2=yes
5050                 ;;
5051         rs6000-*-lynxos*)
5052                 tm_file=rs6000/lynx.h
5053                 xm_file=rs6000/xm-lynx.h
5054                 tmake_file=rs6000/t-rs6000
5055                 xmake_file=rs6000/x-lynx
5056                 use_collect2=yes
5057                 ;;
5058         sh-*-elf*)
5059                 tm_file=sh/elf.h
5060                 float_format=sh
5061                 ;;
5062         sh-*-rtemself*)
5063                 tmake_file="sh/t-sh t-rtems"
5064                 tm_file=sh/rtemself.h
5065                 float_format=sh
5066                 ;;
5067         sh-*-rtems*)
5068                 tmake_file="sh/t-sh t-rtems"
5069                 tm_file=sh/rtems.h
5070                 float_format=sh
5071                 ;;
5072         sh-*-*)
5073                 float_format=sh
5074                 ;;
5075         sparc-tti-*)
5076                 tm_file=sparc/pbd.h
5077                 xm_file="xm-alloca.h ${xm_file}"
5078                 xm_defines=USG
5079                 ;;
5080         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
5081                 tm_file=sparc/vxsparc.h
5082                 tmake_file=sparc/t-vxsparc
5083                 use_collect2=yes
5084                 thread_file='vxworks'
5085                 ;;
5086         sparc-*-aout*)
5087                 tmake_file=sparc/t-sparcbare
5088                 tm_file="sparc/aout.h libgloss.h"
5089                 ;;
5090         sparc-*-netbsd*)
5091                 tm_file=sparc/netbsd.h
5092                 # On NetBSD, the headers are already okay, except for math.h.
5093                 fixincludes=fixinc.wrap
5094                 tmake_file=t-netbsd
5095                 ;;
5096         sparc-*-bsd*)
5097                 tm_file=sparc/bsd.h
5098                 ;;
5099         sparc-*-elf*)
5100                 tm_file=sparc/elf.h
5101                 tmake_file=sparc/t-elf
5102                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5103                 #float_format=i128
5104                 float_format=i64
5105                 ;;
5106         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
5107                 xm_file="${xm_file} sparc/xm-linux.h"
5108                 tm_file=sparc/linux-aout.h
5109                 xmake_file=x-linux
5110                 fixincludes=Makefile.in #On Linux, the headers are ok already.
5111                 gnu_ld=yes
5112                 ;;
5113         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
5114                 xm_file="${xm_file} sparc/xm-linux.h"
5115                 xmake_file=x-linux
5116                 tm_file=sparc/linux.h
5117                 tmake_file="t-linux t-linux-gnulibc1"
5118                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5119                 fixincludes=Makefile.in #On Linux, the headers are ok already.
5120                 gnu_ld=yes
5121                 ;;
5122         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
5123                 xm_file="${xm_file} sparc/xm-linux.h"
5124                 xmake_file=x-linux
5125                 tm_file=sparc/linux.h
5126                 tmake_file="t-linux"
5127                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5128                 fixincludes=Makefile.in #On Linux, the headers are ok already.
5129                 gnu_ld=yes
5130                 if test x$enable_threads = xyes; then
5131                         thread_file='posix'
5132                 fi
5133                 ;;
5134         sparc-*-lynxos*)
5135                 if test x$gas = xyes
5136                 then
5137                         tm_file=sparc/lynx.h
5138                 else
5139                         tm_file=sparc/lynx-ng.h
5140                 fi
5141                 xm_file=sparc/xm-lynx.h
5142                 tmake_file=sparc/t-sunos41
5143                 xmake_file=x-lynx
5144                 ;;
5145         sparc-*-rtems*)
5146                 tmake_file="sparc/t-sparcbare t-rtems"
5147                 tm_file=sparc/rtems.h
5148                 ;;
5149         sparcv9-*-solaris2*)
5150                 tm_file=sparc/sol2-sld-64.h
5151                 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
5152                 xm_defines="USG POSIX"
5153                 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
5154                 xmake_file=sparc/x-sysv4
5155                 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
5156                 fixincludes=fixinc.wrap
5157                 float_format=i128
5158                 if test x${enable_threads} = x ; then
5159                     enable_threads=$have_pthread_h
5160                     if test x${enable_threads} = x ; then
5161                         enable_threads=$have_thread_h
5162                     fi
5163                 fi
5164                 if test x${enable_threads} = xyes ; then
5165                     if test x${have_pthread_h} = xyes ; then
5166                         thread_file='posix'
5167                     else
5168                         thread_file='solaris'
5169                     fi
5170                 fi
5171                 ;;
5172         sparc-*-solaris2*)
5173                 if test x$gnu_ld = xyes
5174                 then
5175                         tm_file=sparc/sol2.h
5176                 else
5177                         tm_file=sparc/sol2-sld.h
5178                 fi
5179                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5180                 xm_defines="USG POSIX"
5181                 tmake_file=sparc/t-sol2
5182                 xmake_file=sparc/x-sysv4
5183                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
5184                 case $machine in
5185                 *-*-solaris2.[0-4])
5186                         fixincludes=fixinc.svr4;;
5187                 *)
5188                         fixincludes=fixinc.wrap;;
5189                 esac
5190                 float_format=i128
5191                 if test x${enable_threads} = x; then
5192                     enable_threads=$have_pthread_h
5193                     if test x${enable_threads} = x; then
5194                         enable_threads=$have_thread_h
5195                     fi
5196                 fi
5197                 if test x${enable_threads} = xyes; then
5198                     if test x${have_pthread_h} = xyes; then
5199                         thread_file='posix'
5200                     else
5201                         thread_file='solaris'
5202                     fi
5203                 fi
5204                 ;;
5205         sparc-*-sunos4.0*)
5206                 tm_file=sparc/sunos4.h
5207                 tmake_file=sparc/t-sunos40
5208                 use_collect2=yes
5209                 ;;
5210         sparc-*-sunos4*)
5211                 tm_file=sparc/sunos4.h
5212                 tmake_file=sparc/t-sunos41
5213                 use_collect2=yes
5214                 if test x$gas = xyes; then
5215                         tm_file="${tm_file} sparc/sun4gas.h"
5216                 fi
5217                 ;;
5218         sparc-*-sunos3*)
5219                 tm_file=sparc/sun4o3.h
5220                 use_collect2=yes
5221                 ;;
5222         sparc-*-sysv4*)
5223                 tm_file=sparc/sysv4.h
5224                 xm_file="xm-siglist.h sparc/xm-sysv4.h"
5225                 xm_defines="USG POSIX"
5226                 tmake_file=t-svr4
5227                 xmake_file=sparc/x-sysv4
5228                 extra_parts="crtbegin.o crtend.o"
5229                 ;;
5230         sparc-*-vxsim*)
5231                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5232                 xm_defines="USG POSIX"
5233                 tm_file=sparc/vxsim.h
5234                 tmake_file=sparc/t-vxsparc
5235                 xmake_file=sparc/x-sysv4
5236                 ;;
5237         sparclet-*-aout*)
5238                 tm_file="sparc/splet.h libgloss.h"
5239                 tmake_file=sparc/t-splet
5240                 ;;
5241         sparclite-*-coff*)
5242                 tm_file="sparc/litecoff.h libgloss.h"
5243                 tmake_file=sparc/t-sparclite
5244                 ;;
5245         sparclite-*-aout*)
5246                 tm_file="sparc/lite.h aoutos.h libgloss.h"
5247                 tmake_file=sparc/t-sparclite
5248                 ;;
5249         sparc64-*-aout*)
5250                 tmake_file=sparc/t-sp64
5251                 tm_file=sparc/sp64-aout.h
5252                 ;;
5253         sparc64-*-elf*)
5254                 tmake_file=sparc/t-sp64
5255                 tm_file=sparc/sp64-elf.h
5256                 extra_parts="crtbegin.o crtend.o"
5257                 ;;
5258         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
5259                 tmake_file="t-linux sparc/t-linux64"
5260                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
5261                 tm_file=sparc/linux64.h
5262                 xmake_file=x-linux
5263                 fixincludes=Makefile.in # The headers are ok already.
5264                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5265                 gnu_ld=yes
5266                 ;;
5267 # This hasn't been upgraded to GCC 2.
5268 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
5269 #               tm_file=tahoe/harris.h
5270 #               ;;
5271 #       tahoe-*-bsd*)                   # tahoe running BSD
5272 #               ;;
5273         thumb-*-coff* | thumbel-*-coff*)
5274                 tm_file=arm/tcoff.h
5275                 out_file=arm/thumb.c
5276                 xm_file=arm/xm-thumb.h
5277                 md_file=arm/thumb.md
5278                 tmake_file=arm/t-thumb
5279                 fixincludes=Makefile.in # There is nothing to fix
5280                 ;;
5281 # This hasn't been upgraded to GCC 2.
5282 #       tron-*-*)
5283 #               cpu_type=gmicro
5284 #               use_collect2=yes
5285 #               ;;
5286         v850-*-*)
5287                 cpu_type=v850
5288                 tm_file="v850/v850.h"
5289                 xm_file="v850/xm-v850.h"
5290                 tmake_file=v850/t-v850
5291                 if test x$stabs = xyes
5292                 then
5293                         tm_file="${tm_file} dbx.h"
5294                 fi
5295                 use_collect2=no
5296                 ;;
5297         vax-*-bsd*)                     # vaxen running BSD
5298                 use_collect2=yes
5299                 float_format=vax
5300                 ;;
5301         vax-*-sysv*)                    # vaxen running system V
5302                 tm_file="${tm_file} vax/vaxv.h"
5303                 xm_defines=USG
5304                 float_format=vax
5305                 ;;
5306         vax-*-netbsd*)
5307                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
5308                 # On NetBSD, the headers are already okay, except for math.h.
5309                 fixincludes=fixinc.wrap
5310                 tmake_file=t-netbsd
5311                 float_format=vax
5312                 ;;
5313         vax-*-ultrix*)                  # vaxen running ultrix
5314                 tm_file="${tm_file} vax/ultrix.h"
5315                 use_collect2=yes
5316                 float_format=vax
5317                 ;;
5318         vax-*-vms*)                     # vaxen running VMS
5319                 xm_file=vax/xm-vms.h
5320                 tm_file=vax/vms.h
5321                 float_format=vax
5322                 ;;
5323         vax-*-*)                        # vax default entry
5324                 float_format=vax
5325                 ;;
5326         we32k-att-sysv*)
5327                 xm_file="${xm_file} xm-svr3"
5328                 use_collect2=yes
5329                 ;;
5330         *)
5331                 echo "Configuration $machine not supported" 1>&2
5332                 exit 1
5333                 ;;
5334         esac
5335
5336         case $machine in
5337         *-*-linux-gnu*)
5338                 ;; # Existing GNU/Linux systems do not use the GNU setup.
5339         *-*-gnu*)
5340                 # On the GNU system, the setup is just about the same on
5341                 # each different CPU.  The specific machines that GNU
5342                 # supports are matched above and just set $cpu_type.
5343                 xm_file="xm-gnu.h ${xm_file}"
5344                 tm_file=${cpu_type}/gnu.h
5345                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
5346                 # GNU always uses ELF.
5347                 elf=yes
5348                 # GNU tools are the only tools.
5349                 gnu_ld=yes
5350                 gas=yes
5351                 # On GNU, the headers are already okay.
5352                 fixincludes=Makefile.in
5353                 xmake_file=x-linux      # These details are the same as Linux.
5354                 tmake_file=t-gnu        # These are not.
5355                 ;;
5356         *-*-sysv4*)
5357                 fixincludes=fixinc.svr4
5358                 xmake_try_sysv=x-sysv
5359                 install_headers_dir=install-headers-cpio
5360                 ;;
5361         *-*-sysv*)
5362                 install_headers_dir=install-headers-cpio
5363                 ;;
5364         esac
5365
5366         # Distinguish i[34567]86
5367         # Also, do not run mips-tfile on MIPS if using gas.
5368         # Process --with-cpu= for PowerPC/rs6000
5369         target_cpu_default2=
5370         case $machine in
5371         i486-*-*)
5372                 target_cpu_default2=1
5373                 ;;
5374         i586-*-*)
5375                 target_cpu_default2=2
5376                 ;;
5377         i686-*-* | i786-*-*)
5378                 target_cpu_default2=3
5379                 ;;
5380         alpha*-*-*)
5381                 case $machine in
5382                         alphaev6*)
5383                                 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
5384                                 ;;
5385                         alphapca56*)
5386                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
5387                                 ;;
5388                         alphaev56*)
5389                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
5390                                 ;;
5391                         alphaev5*)
5392                                 target_cpu_default2="MASK_CPU_EV5"
5393                                 ;;
5394                 esac
5395                                 
5396                 if test x$gas = xyes
5397                 then
5398                         if test "$target_cpu_default2" = ""
5399                         then
5400                                 target_cpu_default2="MASK_GAS"
5401                         else
5402                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
5403                         fi
5404                 fi
5405                 ;;
5406         arm*-*-*)
5407                 case "x$with_cpu" in
5408                         x)
5409                                 # The most generic
5410                                 target_cpu_default2="TARGET_CPU_generic"
5411                                 ;;
5412
5413                         # Distinguish cores, and major variants
5414                         # arm7m doesn't exist, but D & I don't affect code
5415                         xarm23678 | xarm250 | xarm67010 \
5416                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
5417                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
5418                         | xstrongarm | xstrongarm110)
5419                                 target_cpu_default2="TARGET_CPU_$with_cpu"
5420                                 ;;
5421
5422                         xyes | xno)
5423                                 echo "--with-cpu must be passed a value" 1>&2
5424                                 exit 1
5425                                 ;;
5426
5427                         *)
5428                                 if test x$pass2done = xyes
5429                                 then
5430                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5431                                         exit 1
5432                                 fi
5433                                 ;;
5434                 esac
5435                 ;;
5436
5437         mips*-*-ecoff* | mips*-*-elf*)
5438                 if test x$gas = xyes
5439                 then
5440                         if test x$gnu_ld = xyes
5441                         then
5442                                 target_cpu_default2=20
5443                         else
5444                                 target_cpu_default2=16
5445                         fi
5446                 fi
5447                 ;;
5448         mips*-*-*)
5449                 if test x$gas = xyes
5450                 then
5451                         target_cpu_default2=16
5452                 fi
5453                 ;;
5454         powerpc*-*-* | rs6000-*-*)
5455                 case "x$with_cpu" in
5456                         x)
5457                                 ;;
5458
5459                         xcommon | xpower | xpower2 | xpowerpc | xrios \
5460                           | xrios1 | xrios2 | xrsc | xrsc1 \
5461                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
5462                           | x403 | x505 | x801 | x821 | x823 | x860)
5463                                 target_cpu_default2="\"$with_cpu\""
5464                                 ;;
5465
5466                         xyes | xno)
5467                                 echo "--with-cpu must be passed a value" 1>&2
5468                                 exit 1
5469                                 ;;
5470
5471                         *)
5472                                 if test x$pass2done = xyes
5473                                 then
5474                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5475                                         exit 1
5476                                 fi
5477                                 ;;
5478                 esac
5479                 ;;
5480         sparc*-*-*)
5481                 case ".$with_cpu" in
5482                         .)
5483                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
5484                                 ;;
5485                         .supersparc | .ultrasparc | .v7 | .v8 | .v9)
5486                                 target_cpu_default2="TARGET_CPU_$with_cpu"
5487                                 ;;
5488                         *)
5489                                 if test x$pass2done = xyes
5490                                 then
5491                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5492                                         exit 1
5493                                 fi
5494                                 ;;
5495                 esac
5496                 ;;
5497         esac
5498
5499         if test "$target_cpu_default2" != ""
5500         then
5501                 if test "$target_cpu_default" != ""
5502                 then
5503                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5504                 else
5505                         target_cpu_default=$target_cpu_default2
5506                 fi
5507         fi
5508
5509         # No need for collect2 if we have the GNU linker.
5510         # Actually, there is now; GNU ld doesn't handle the EH info or
5511         # collecting for shared libraries.
5512         #case x$gnu_ld in
5513         #xyes)
5514         #       use_collect2=
5515         #       ;;
5516         #esac
5517
5518 # Save data on machine being used to compile GCC in build_xm_file.
5519 # Save data on host machine in vars host_xm_file and host_xmake_file.
5520         if test x$pass1done = x
5521         then
5522                 if test x"$xm_file" = x
5523                 then build_xm_file=$cpu_type/xm-$cpu_type.h
5524                 else build_xm_file=$xm_file
5525                 fi
5526                 build_xm_defines=$xm_defines
5527                 build_install_headers_dir=$install_headers_dir
5528                 build_exeext=$exeext
5529                 pass1done=yes
5530         else
5531                 if test x$pass2done = x
5532                 then
5533                         if test x"$xm_file" = x
5534                         then host_xm_file=$cpu_type/xm-$cpu_type.h
5535                         else host_xm_file=$xm_file
5536                         fi
5537                         host_xm_defines=$xm_defines
5538                         if test x"$xmake_file" = x
5539                         then xmake_file=$cpu_type/x-$cpu_type
5540                         fi
5541                         host_xmake_file="$xmake_file"
5542                         host_truncate_target=$truncate_target
5543                         host_extra_gcc_objs=$extra_gcc_objs
5544                         host_extra_objs=$extra_host_objs
5545                         host_exeext=$exeext
5546                         pass2done=yes
5547                 fi
5548         fi
5549 done
5550
5551 extra_objs="${host_extra_objs} ${extra_objs}"
5552
5553 # Default the target-machine variables that were not explicitly set.
5554 if test x"$tm_file" = x
5555 then tm_file=$cpu_type/$cpu_type.h; fi
5556
5557 if test x$extra_headers = x
5558 then extra_headers=; fi
5559
5560 if test x"$xm_file" = x
5561 then xm_file=$cpu_type/xm-$cpu_type.h; fi
5562
5563 if test x$md_file = x
5564 then md_file=$cpu_type/$cpu_type.md; fi
5565
5566 if test x$out_file = x
5567 then out_file=$cpu_type/$cpu_type.c; fi
5568
5569 if test x"$tmake_file" = x
5570 then tmake_file=$cpu_type/t-$cpu_type
5571 fi
5572
5573 if test x$float_format = x
5574 then float_format=i64
5575 fi
5576
5577 if test x$enable_haifa = x
5578 then
5579   case $target in
5580     alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc*-* | m32r*-*)
5581       enable_haifa=yes;;
5582   esac
5583 fi
5584
5585 # Say what files are being used for the output code and MD file.
5586 echo "Using \`$srcdir/config/$out_file' to output insns."
5587 echo "Using \`$srcdir/config/$md_file' as machine description file."
5588
5589 count=a
5590 for f in $tm_file; do
5591         count=${count}x
5592 done
5593 if test $count = ax; then
5594         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5595 else
5596         echo "Using the following target machine macro files:"
5597         for f in $tm_file; do
5598                 echo "  $srcdir/config/$f"
5599         done
5600 fi
5601
5602 count=a
5603 for f in $host_xm_file; do
5604         count=${count}x
5605 done
5606 if test $count = ax; then
5607         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5608 else
5609         echo "Using the following host machine macro files:"
5610         for f in $host_xm_file; do
5611                 echo "  $srcdir/config/$f"
5612         done
5613 fi
5614
5615 if test "$host_xm_file" != "$build_xm_file"; then
5616         count=a
5617         for f in $build_xm_file; do
5618                 count=${count}x
5619         done
5620         if test $count = ax; then
5621                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5622         else
5623                 echo "Using the following build machine macro files:"
5624                 for f in $build_xm_file; do
5625                         echo "  $srcdir/config/$f"
5626                 done
5627         fi
5628 fi
5629
5630 if test x$thread_file = x; then
5631         if test x$target_thread_file != x; then
5632                 thread_file=$target_thread_file
5633         else
5634                 thread_file='single'
5635         fi
5636 fi
5637
5638 # Set up the header files.
5639 # $links is the list of header files to create.
5640 # $vars is the list of shell variables with file names to include.
5641 # auto-host.h is the file containing items generated by autoconf and is
5642 # the first file included by config.h.
5643 null_defines=
5644 host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
5645
5646 # If host=build, it is correct to have hconfig include auto-host.h
5647 # as well.  If host!=build, we are in error and need to do more 
5648 # work to find out the build config parameters.
5649 if test x$host = x$build
5650 then
5651         build_xm_file="auto-host.h gansidecl.h ${build_xm_file}"
5652 else
5653         # We create a subdir, then run autoconf in the subdir.
5654         # To prevent recursion we set host and build for the new
5655         # invocation of configure to the build for this invocation
5656         # of configure. 
5657         tempdir=build.$$
5658         rm -rf $tempdir
5659         mkdir $tempdir
5660         cd $tempdir
5661         case ${srcdir} in
5662         /*) realsrcdir=${srcdir};;
5663         *) realsrcdir=../${srcdir};;
5664         esac
5665         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
5666                 --target=$target --host=$build --build=$build
5667
5668         # We just finished tests for the build machine, so rename
5669         # the file auto-build.h in the gcc directory.
5670         mv auto-host.h ../auto-build.h
5671         cd ..
5672         rm -rf $tempdir
5673         build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
5674 fi
5675
5676 xm_file="gansidecl.h ${xm_file}"
5677 tm_file="gansidecl.h ${tm_file}"
5678
5679 vars="host_xm_file tm_file xm_file build_xm_file"
5680 links="config.h tm.h tconfig.h hconfig.h"
5681 defines="host_xm_defines null_defines xm_defines build_xm_defines"
5682
5683 rm -f config.bak
5684 if test -f config.status; then mv -f config.status config.bak; fi
5685
5686 # Make the links.
5687 while test -n "$vars"
5688 do
5689         set $vars; var=$1; shift; vars=$*
5690         set $links; link=$1; shift; links=$*
5691         set $defines; define=$1; shift; defines=$*
5692
5693         rm -f $link
5694
5695         # Define TARGET_CPU_DEFAULT if the system wants one.
5696         # This substitutes for lots of *.h files.
5697         if test "$target_cpu_default" != "" -a $link = tm.h
5698         then
5699                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
5700         fi
5701
5702         for file in `eval echo '$'$var`; do
5703                 echo "#include \"$file\"" >>$link
5704         done
5705
5706         for def in `eval echo '$'$define`; do
5707                 echo "#ifndef $def" >>$link
5708                 echo "#define $def" >>$link
5709                 echo "#endif" >>$link
5710         done
5711 done
5712
5713 # Truncate the target if necessary
5714 if test x$host_truncate_target != x; then
5715         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5716 fi
5717
5718 # Get the version trigger filename from the toplevel
5719 if test "${with_gcc_version_trigger+set}" = set; then
5720         gcc_version_trigger=$with_gcc_version_trigger
5721 else
5722         gcc_version_trigger=${srcdir}/version.c
5723 fi
5724 gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
5725
5726 # Get an absolute path to the GCC top-level source directory
5727 holddir=`pwd`
5728 cd $srcdir
5729 topdir=`pwd`
5730 cd $holddir
5731
5732 # Conditionalize the makefile for this host machine.
5733 # Make-host contains the concatenation of all host makefile fragments
5734 # [there can be more than one].  This file is built by configure.frag.
5735 host_overrides=Make-host
5736 dep_host_xmake_file=
5737 for f in .. ${host_xmake_file}
5738 do
5739         if test -f ${srcdir}/config/$f
5740         then
5741                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
5742         fi
5743 done
5744
5745 # Conditionalize the makefile for this target machine.
5746 # Make-target contains the concatenation of all host makefile fragments
5747 # [there can be more than one].  This file is built by configure.frag.
5748 target_overrides=Make-target
5749 dep_tmake_file=
5750 for f in .. ${tmake_file}
5751 do
5752         if test -f ${srcdir}/config/$f
5753         then
5754                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
5755         fi
5756 done
5757
5758 # If the host doesn't support symlinks, modify CC in
5759 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5760 # Otherwise, we can use "CC=$(CC)".
5761 rm -f symtest.tem
5762 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5763 then
5764         cc_set_by_configure="\$(CC)"
5765         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5766 else
5767         rm -f symtest.tem
5768         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5769         then
5770                 symbolic_link="cp -p"
5771         else
5772                 symbolic_link="cp"
5773         fi
5774         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5775         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5776 fi
5777 rm -f symtest.tem
5778
5779 out_object_file=`basename $out_file .c`.o
5780
5781 tm_file_list=
5782 for f in $tm_file; do
5783         if test $f != "gansidecl.h" ; then
5784                 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
5785         else
5786                 tm_file_list="${tm_file_list} $f"
5787         fi
5788 done
5789
5790 host_xm_file_list=
5791 for f in $host_xm_file; do
5792         if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
5793                 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
5794         else
5795                 host_xm_file_list="${host_xm_file_list} $f"
5796         fi
5797 done
5798
5799 build_xm_file_list=
5800 for f in $build_xm_file; do
5801         if test $f != "auto-build.h" -a $f != "auto-host.h" -a $f != "gansidecl.h" ; then
5802                 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
5803         else
5804                 build_xm_file_list="${build_xm_file_list} $f"
5805         fi
5806 done
5807
5808 # Define macro CROSS_COMPILE in compilation
5809 # if this is a cross-compiler.
5810 # Also use all.cross instead of all.internal
5811 # and add cross-make to Makefile.
5812 cross_overrides="/dev/null"
5813 if test x$host != x$target
5814 then
5815         cross_defines="CROSS=-DCROSS_COMPILE"
5816         cross_overrides="${topdir}/cross-make"
5817 fi
5818
5819 # When building gcc with a cross-compiler, we need to fix a few things.
5820 # This must come after cross-make as we want all.build to override
5821 # all.cross.
5822 build_overrides="/dev/null"
5823 if test x$build != x$host
5824 then
5825         build_overrides="${topdir}/build-make"
5826 fi
5827
5828 # Expand extra_headers to include complete path.
5829 # This substitutes for lots of t-* files.
5830 extra_headers_list=
5831 if test "x$extra_headers" = x
5832 then true
5833 else
5834         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
5835         for file in $extra_headers;
5836         do
5837                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
5838         done
5839 fi
5840
5841 if test x$use_collect2 = xno; then
5842         use_collect2=
5843 fi
5844
5845 # Add a definition of USE_COLLECT2 if system wants one.
5846 # Also tell toplev.c what to do.
5847 # This substitutes for lots of t-* files.
5848 if test x$use_collect2 = x
5849 then
5850         will_use_collect2=
5851         maybe_use_collect2=
5852 else
5853         will_use_collect2="collect2"
5854         maybe_use_collect2="-DUSE_COLLECT2"
5855 fi
5856
5857 # NEED TO CONVERT
5858 # Set MD_DEPS if the real md file is in md.pre-cpp.
5859 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
5860 # for line oriented comments, so we must always use a GNU cpp.  If
5861 # building gcc with a cross compiler, use the cross compiler just
5862 # built.  Otherwise, we can use the cpp just built.
5863 md_file_sub=
5864 if test "x$md_cppflags" = x
5865 then
5866         md_file_sub=$srcdir/config/$md_file
5867 else
5868         md_file=md
5869 fi
5870
5871 # If we have gas in the build tree, make a link to it.
5872 if test -f ../gas/Makefile; then
5873         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5874 fi
5875
5876 # If we have nm in the build tree, make a link to it.
5877 if test -f ../binutils/Makefile; then
5878         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
5879 fi
5880
5881 # If we have ld in the build tree, make a link to it.
5882 if test -f ../ld/Makefile; then
5883 #       if test x$use_collect2 = x; then
5884 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
5885 #       else
5886                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
5887 #       fi
5888 fi
5889
5890 # Figure out what assembler alignment features are present.
5891 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
5892 echo "configure:5893: checking assembler alignment features" >&5
5893 gcc_cv_as=
5894 gcc_cv_as_alignment_features=
5895 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
5896 if test -x "$DEFAULT_ASSEMBLER"; then
5897         gcc_cv_as="$DEFAULT_ASSEMBLER"
5898 elif test -x "$AS"; then
5899         gcc_cv_as="$AS"
5900 elif test -x as$host_exeext; then
5901         # Build using assembler in the current directory.
5902         gcc_cv_as=./as$host_exeext
5903 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
5904         # Single tree build which includes gas.
5905         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
5906         do
5907                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5908                 if test x$gcc_cv_gas_version != x; then
5909                         break
5910                 fi
5911         done
5912         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
5913         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5914         if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5915                 # Gas version 2.6 and later support for .balign and .p2align.
5916                 # bytes to skip when using .p2align.
5917                 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
5918                         gcc_cv_as_alignment_features=".balign and .p2align"
5919                         cat >> confdefs.h <<\EOF
5920 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5921 EOF
5922
5923                 fi
5924                 # Gas version 2.8 and later support specifying the maximum
5925                 # bytes to skip when using .p2align.
5926                 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
5927                         gcc_cv_as_alignment_features=".p2align including maximum skip"
5928                         cat >> confdefs.h <<\EOF
5929 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
5930 EOF
5931
5932                 fi
5933         fi
5934 elif test x$host = x$target; then
5935         # Native build.
5936         gcc_cv_as=as$host_exeext
5937 fi
5938 if test x$gcc_cv_as != x; then
5939         # Check if we have .balign and .p2align
5940         echo ".balign  4" > conftest.s
5941         echo ".p2align  2" >> conftest.s
5942         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5943                 gcc_cv_as_alignment_features=".balign and .p2align"
5944                 cat >> confdefs.h <<\EOF
5945 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5946 EOF
5947
5948         fi
5949         rm -f conftest.s conftest.o
5950         # Check if specifying the maximum bytes to skip when
5951         # using .p2align is supported.
5952         echo ".p2align 4,,7" > conftest.s
5953         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5954                 gcc_cv_as_alignment_features=".p2align including maximum skip"
5955                 cat >> confdefs.h <<\EOF
5956 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
5957 EOF
5958
5959         fi
5960         rm -f conftest.s conftest.o
5961 fi
5962 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
5963
5964 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
5965 echo "configure:5966: checking assembler subsection support" >&5
5966 gcc_cv_as_subsections=
5967 if test x$gcc_cv_as != x; then
5968         # Check if we have .subsection
5969         echo ".subsection 1" > conftest.s
5970         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5971                 gcc_cv_as_subsections=".subsection"
5972                 if test -x nm$host_exeext; then
5973                         gcc_cv_nm=./nm$host_exeext
5974                 elif test x$host = x$target; then
5975                         # Native build.
5976                         gcc_cv_nm=nm$host_exeext
5977                 fi
5978                 if test x$gcc_cv_nm != x; then
5979                         cat > conftest.s <<EOF
5980 conftest_label1: .word 0
5981 .subsection -1
5982 conftest_label2: .word 0
5983 .previous
5984 EOF
5985                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5986                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
5987                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
5988                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
5989                                         :
5990                                 else
5991                                         gcc_cv_as_subsections="working .subsection -1"
5992                                         cat >> confdefs.h <<\EOF
5993 #define HAVE_GAS_SUBSECTION_ORDERING 1
5994 EOF
5995
5996                                 fi
5997                         fi
5998                 fi
5999         fi
6000         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6001 fi
6002 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6003
6004 # Figure out what language subdirectories are present.
6005 subdirs=
6006 for lang in ${srcdir}/*/config-lang.in ..
6007 do
6008         case $lang in
6009         ..) ;;
6010         # The odd quoting in the next line works around
6011         # an apparent bug in bash 1.12 on linux.
6012         ${srcdir}/ada/config-lang.in)
6013           if test x$gnat = xyes ; then
6014                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6015           fi
6016         ;;
6017         ${srcdir}/[*]/config-lang.in) ;;
6018         *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6019         esac
6020 done
6021
6022 # Make gthr-default.h if we have a thread file.
6023 gthread_flags=
6024 if test $thread_file != single; then
6025     rm -f gthr-default.h
6026     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6027     gthread_flags=-DHAVE_GTHR_DEFAULT
6028 fi
6029
6030
6031 # Make empty files to contain the specs and options for each language.
6032 # Then add #include lines to for a compiler that has specs and/or options.
6033
6034 lang_specs_files=
6035 lang_options_files=
6036 lang_tree_files=
6037 rm -f specs.h options.h gencheck.h
6038 touch specs.h options.h gencheck.h
6039 for subdir in . $subdirs
6040 do
6041         if test -f $srcdir/$subdir/lang-specs.h; then
6042                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6043                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6044         fi
6045         if test -f $srcdir/$subdir/lang-options.h; then
6046                 echo "#include \"$subdir/lang-options.h\"" >>options.h
6047                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6048         fi
6049         if test -f $srcdir/$subdir/$subdir-tree.def; then
6050                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6051                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6052         fi
6053 done
6054
6055 # These (without "all_") are set in each config-lang.in.
6056 # `language' must be a single word so is spelled singularly.
6057 all_languages=
6058 all_boot_languages=
6059 all_compilers=
6060 all_stagestuff=
6061 all_diff_excludes=
6062 all_outputs=Makefile
6063 # List of language makefile fragments.
6064 all_lang_makefiles=
6065 all_headers=
6066 all_lib2funcs=
6067
6068 # Add the language fragments.
6069 # Languages are added via two mechanisms.  Some information must be
6070 # recorded in makefile variables, these are defined in config-lang.in.
6071 # We accumulate them and plug them into the main Makefile.
6072 # The other mechanism is a set of hooks for each of the main targets
6073 # like `clean', `install', etc.
6074
6075 language_fragments="Make-lang"
6076 language_hooks="Make-hooks"
6077 oldstyle_subdirs=
6078
6079 for s in .. $subdirs
6080 do
6081         if test $s != ".."
6082         then
6083                 language=
6084                 boot_language=
6085                 compilers=
6086                 stagestuff=
6087                 diff_excludes=
6088                 headers=
6089                 outputs=
6090                 lib2funcs=
6091                 . ${srcdir}/$s/config-lang.in
6092                 if test "x$language" = x
6093                 then
6094                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6095                         exit 1
6096                 fi
6097                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
6098                 all_languages="$all_languages $language"
6099                 if test "x$boot_language" = xyes
6100                 then
6101                         all_boot_languages="$all_boot_languages $language"
6102                 fi
6103                 all_compilers="$all_compilers $compilers"
6104                 all_stagestuff="$all_stagestuff $stagestuff"
6105                 all_diff_excludes="$all_diff_excludes $diff_excludes"
6106                 all_headers="$all_headers $headers"
6107                 all_outputs="$all_outputs $outputs"
6108                 if test x$outputs = x
6109                 then
6110                         oldstyle_subdirs="$oldstyle_subdirs $s"
6111                 fi
6112                 all_lib2funcs="$all_lib2funcs $lib2funcs"
6113         fi
6114 done
6115
6116 # Since we can't use `::' targets, we link each language in
6117 # with a set of hooks, reached indirectly via lang.${target}.
6118
6119 rm -f Make-hooks
6120 touch Make-hooks
6121 target_list="all.build all.cross start.encap rest.encap \
6122         info dvi \
6123         install-normal install-common install-info install-man \
6124         uninstall distdir \
6125         mostlyclean clean distclean extraclean maintainer-clean \
6126         stage1 stage2 stage3 stage4"
6127 for t in $target_list
6128 do
6129         x=
6130         for l in .. $all_languages
6131         do
6132                 if test $l != ".."; then
6133                         x="$x $l.$t"
6134                 fi
6135         done
6136         echo "lang.$t: $x" >> Make-hooks
6137 done
6138
6139 # If we're not building in srcdir, create .gdbinit.
6140
6141 if test ! -f Makefile.in; then
6142         echo "dir ." > .gdbinit
6143         echo "dir ${srcdir}" >> .gdbinit
6144         if test x$gdb_needs_out_file_path = xyes
6145         then
6146                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6147         fi
6148         if test "x$subdirs" != x; then
6149                 for s in $subdirs
6150                 do
6151                         echo "dir ${srcdir}/$s" >> .gdbinit
6152                 done
6153         fi
6154         echo "source ${srcdir}/.gdbinit" >> .gdbinit
6155 fi
6156
6157 # Define variables host_canonical and build_canonical
6158 # because some Cygnus local changes in the Makefile depend on them.
6159 build_canonical=${build}
6160 host_canonical=${host}
6161 target_subdir=
6162 if test "${host}" != "${target}" ; then
6163     target_subdir=${target}/
6164 fi
6165
6166
6167
6168         
6169 # If this is using newlib, then define inhibit_libc in
6170 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
6171 # libgcc.a, but that's OK because newib should have its own version of
6172 # assert.h.
6173 inhibit_libc=
6174 if test x$with_newlib = xyes; then
6175         inhibit_libc=-Dinhibit_libc
6176 fi
6177
6178
6179 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
6180 sched_prefix=
6181 sched_cflags=
6182 if test x$enable_haifa = xyes; then
6183     echo "Using the Haifa scheduler."
6184     sched_prefix=haifa-
6185     sched_cflags=-DHAIFA
6186 fi
6187
6188
6189 if test x$enable_haifa != x; then
6190     # Explicitly remove files that need to be recompiled for the Haifa scheduler.
6191     for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
6192         if test -f $x; then
6193             echo "Removing $x"
6194             rm -f $x
6195         fi
6196     done
6197 fi
6198
6199 # Warn if using init_priority.
6200 echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6
6201 echo "configure:6202: checking whether to enable init_priority by default" >&5
6202 if test x$enable_init_priority != xyes; then
6203   enable_init_priority=no
6204 fi
6205 echo "$ac_t""$enable_init_priority" 1>&6
6206
6207 # Nothing to do for FLOAT_H, float_format already handled.
6208 objdir=`pwd`
6209
6210
6211 # Process the language and host/target makefile fragments.
6212 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
6213
6214 # Substitute configuration variables
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273 # Echo that links are built
6274 if test x$host = x$target
6275 then
6276         str1="native "
6277 else
6278         str1="cross-"
6279         str2=" from $host"
6280 fi
6281
6282 if test x$host != x$build
6283 then
6284         str3=" on a $build system"
6285 fi
6286
6287 if test "x$str2" != x || test "x$str3" != x
6288 then
6289         str4=
6290 fi
6291
6292 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
6293
6294 if test "x$str2" != x || test "x$str3" != x
6295 then
6296         echo " ${str2}${str3}." 1>&2
6297 fi
6298
6299 # Truncate the target if necessary
6300 if test x$host_truncate_target != x; then
6301         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
6302 fi
6303
6304 # Configure the subdirectories
6305 # AC_CONFIG_SUBDIRS($subdirs)
6306
6307 # Create the Makefile
6308 # and configure language subdirectories
6309 trap '' 1 2 15
6310 cat > confcache <<\EOF
6311 # This file is a shell script that caches the results of configure
6312 # tests run on this system so they can be shared between configure
6313 # scripts and configure runs.  It is not useful on other systems.
6314 # If it contains results you don't want to keep, you may remove or edit it.
6315 #
6316 # By default, configure uses ./config.cache as the cache file,
6317 # creating it if it does not exist already.  You can give configure
6318 # the --cache-file=FILE option to use a different cache file; that is
6319 # what configure does when it calls configure scripts in
6320 # subdirectories, so they share the cache.
6321 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6322 # config.status only pays attention to the cache file if you give it the
6323 # --recheck option to rerun configure.
6324 #
6325 EOF
6326 # The following way of writing the cache mishandles newlines in values,
6327 # but we know of no workaround that is simple, portable, and efficient.
6328 # So, don't put newlines in cache variables' values.
6329 # Ultrix sh set writes to stderr and can't be redirected directly,
6330 # and sets the high bit in the cache file unless we assign to the vars.
6331 (set) 2>&1 |
6332   case `(ac_space=' '; set) 2>&1 | grep ac_space` in
6333   *ac_space=\ *)
6334     # `set' does not quote correctly, so add quotes (double-quote substitution
6335     # turns \\\\ into \\, and sed turns \\ into \).
6336     sed -n \
6337       -e "s/'/'\\\\''/g" \
6338       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6339     ;;
6340   *)
6341     # `set' quotes correctly as required by POSIX, so do not add quotes.
6342     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6343     ;;
6344   esac >> confcache
6345 if cmp -s $cache_file confcache; then
6346   :
6347 else
6348   if test -w $cache_file; then
6349     echo "updating cache $cache_file"
6350     cat confcache > $cache_file
6351   else
6352     echo "not updating unwritable cache $cache_file"
6353   fi
6354 fi
6355 rm -f confcache
6356
6357 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6358
6359 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6360 # Let make expand exec_prefix.
6361 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6362
6363 # Any assignment to VPATH causes Sun make to only execute
6364 # the first set of double-colon rules, so remove it if not needed.
6365 # If there is a colon in the path, we need to keep it.
6366 if test "x$srcdir" = x.; then
6367   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6368 fi
6369
6370 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6371
6372 DEFS=-DHAVE_CONFIG_H
6373
6374 # Without the "./", some shells look in PATH for config.status.
6375 : ${CONFIG_STATUS=./config.status}
6376
6377 echo creating $CONFIG_STATUS
6378 rm -f $CONFIG_STATUS
6379 cat > $CONFIG_STATUS <<EOF
6380 #! /bin/sh
6381 # Generated automatically by configure.
6382 # Run this file to recreate the current configuration.
6383 # This directory was configured as follows,
6384 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6385 #
6386 # $0 $ac_configure_args
6387 #
6388 # Compiler output produced by configure, useful for debugging
6389 # configure, is in ./config.log if it exists.
6390
6391 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6392 for ac_option
6393 do
6394   case "\$ac_option" in
6395   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6396     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6397     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6398   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6399     echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
6400     exit 0 ;;
6401   -help | --help | --hel | --he | --h)
6402     echo "\$ac_cs_usage"; exit 0 ;;
6403   *) echo "\$ac_cs_usage"; exit 1 ;;
6404   esac
6405 done
6406
6407 ac_given_srcdir=$srcdir
6408
6409 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6410 EOF
6411 cat >> $CONFIG_STATUS <<EOF
6412
6413 # Protect against being on the right side of a sed subst in config.status.
6414 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6415  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6416 $ac_vpsub
6417 $extrasub
6418 s%@SHELL@%$SHELL%g
6419 s%@CFLAGS@%$CFLAGS%g
6420 s%@CPPFLAGS@%$CPPFLAGS%g
6421 s%@CXXFLAGS@%$CXXFLAGS%g
6422 s%@DEFS@%$DEFS%g
6423 s%@LDFLAGS@%$LDFLAGS%g
6424 s%@LIBS@%$LIBS%g
6425 s%@exec_prefix@%$exec_prefix%g
6426 s%@prefix@%$prefix%g
6427 s%@program_transform_name@%$program_transform_name%g
6428 s%@bindir@%$bindir%g
6429 s%@sbindir@%$sbindir%g
6430 s%@libexecdir@%$libexecdir%g
6431 s%@datadir@%$datadir%g
6432 s%@sysconfdir@%$sysconfdir%g
6433 s%@sharedstatedir@%$sharedstatedir%g
6434 s%@localstatedir@%$localstatedir%g
6435 s%@libdir@%$libdir%g
6436 s%@includedir@%$includedir%g
6437 s%@oldincludedir@%$oldincludedir%g
6438 s%@infodir@%$infodir%g
6439 s%@mandir@%$mandir%g
6440 s%@host@%$host%g
6441 s%@host_alias@%$host_alias%g
6442 s%@host_cpu@%$host_cpu%g
6443 s%@host_vendor@%$host_vendor%g
6444 s%@host_os@%$host_os%g
6445 s%@target@%$target%g
6446 s%@target_alias@%$target_alias%g
6447 s%@target_cpu@%$target_cpu%g
6448 s%@target_vendor@%$target_vendor%g
6449 s%@target_os@%$target_os%g
6450 s%@build@%$build%g
6451 s%@build_alias@%$build_alias%g
6452 s%@build_cpu@%$build_cpu%g
6453 s%@build_vendor@%$build_vendor%g
6454 s%@build_os@%$build_os%g
6455 s%@CC@%$CC%g
6456 s%@stage1_warn_cflags@%$stage1_warn_cflags%g
6457 s%@SET_MAKE@%$SET_MAKE%g
6458 s%@AWK@%$AWK%g
6459 s%@LEX@%$LEX%g
6460 s%@LEXLIB@%$LEXLIB%g
6461 s%@LN@%$LN%g
6462 s%@LN_S@%$LN_S%g
6463 s%@RANLIB@%$RANLIB%g
6464 s%@YACC@%$YACC%g
6465 s%@INSTALL@%$INSTALL%g
6466 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6467 s%@INSTALL_DATA@%$INSTALL_DATA%g
6468 s%@CPP@%$CPP%g
6469 s%@gnat@%$gnat%g
6470 s%@vfprintf@%$vfprintf%g
6471 s%@doprint@%$doprint%g
6472 s%@manext@%$manext%g
6473 s%@objext@%$objext%g
6474 s%@gthread_flags@%$gthread_flags%g
6475 s%@build_canonical@%$build_canonical%g
6476 s%@host_canonical@%$host_canonical%g
6477 s%@target_subdir@%$target_subdir%g
6478 s%@inhibit_libc@%$inhibit_libc%g
6479 s%@sched_prefix@%$sched_prefix%g
6480 s%@sched_cflags@%$sched_cflags%g
6481 s%@objdir@%$objdir%g
6482 s%@subdirs@%$subdirs%g
6483 s%@all_languages@%$all_languages%g
6484 s%@all_boot_languages@%$all_boot_languages%g
6485 s%@all_compilers@%$all_compilers%g
6486 s%@all_lang_makefiles@%$all_lang_makefiles%g
6487 s%@all_stagestuff@%$all_stagestuff%g
6488 s%@all_diff_excludes@%$all_diff_excludes%g
6489 s%@all_lib2funcs@%$all_lib2funcs%g
6490 s%@all_headers@%$all_headers%g
6491 s%@cpp_main@%$cpp_main%g
6492 s%@extra_passes@%$extra_passes%g
6493 s%@extra_programs@%$extra_programs%g
6494 s%@extra_parts@%$extra_parts%g
6495 s%@extra_c_objs@%$extra_c_objs%g
6496 s%@extra_cxx_objs@%$extra_cxx_objs%g
6497 s%@extra_cpp_objs@%$extra_cpp_objs%g
6498 s%@extra_c_flags@%$extra_c_flags%g
6499 s%@extra_objs@%$extra_objs%g
6500 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
6501 s%@extra_headers_list@%$extra_headers_list%g
6502 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
6503 s%@dep_tmake_file@%$dep_tmake_file%g
6504 s%@out_file@%$out_file%g
6505 s%@out_object_file@%$out_object_file%g
6506 s%@md_file@%$md_file%g
6507 s%@tm_file_list@%$tm_file_list%g
6508 s%@build_xm_file_list@%$build_xm_file_list%g
6509 s%@host_xm_file_list@%$host_xm_file_list%g
6510 s%@lang_specs_files@%$lang_specs_files%g
6511 s%@lang_options_files@%$lang_options_files%g
6512 s%@lang_tree_files@%$lang_tree_files%g
6513 s%@thread_file@%$thread_file%g
6514 s%@objc_boehm_gc@%$objc_boehm_gc%g
6515 s%@JAVAGC@%$JAVAGC%g
6516 s%@gcc_version@%$gcc_version%g
6517 s%@gcc_version_trigger@%$gcc_version_trigger%g
6518 s%@local_prefix@%$local_prefix%g
6519 s%@gxx_include_dir@%$gxx_include_dir%g
6520 s%@fixincludes@%$fixincludes%g
6521 s%@build_install_headers_dir@%$build_install_headers_dir%g
6522 s%@build_exeext@%$build_exeext%g
6523 s%@host_exeext@%$host_exeext%g
6524 s%@float_format@%$float_format%g
6525 s%@will_use_collect2@%$will_use_collect2%g
6526 s%@maybe_use_collect2@%$maybe_use_collect2%g
6527 s%@cc_set_by_configure@%$cc_set_by_configure%g
6528 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
6529 s%@install@%$install%g
6530 s%@symbolic_link@%$symbolic_link%g
6531 /@target_overrides@/r $target_overrides
6532 s%@target_overrides@%%g
6533 /@host_overrides@/r $host_overrides
6534 s%@host_overrides@%%g
6535 s%@cross_defines@%$cross_defines%g
6536 /@cross_overrides@/r $cross_overrides
6537 s%@cross_overrides@%%g
6538 /@build_overrides@/r $build_overrides
6539 s%@build_overrides@%%g
6540 /@language_fragments@/r $language_fragments
6541 s%@language_fragments@%%g
6542 /@language_hooks@/r $language_hooks
6543 s%@language_hooks@%%g
6544
6545 CEOF
6546 EOF
6547
6548 cat >> $CONFIG_STATUS <<\EOF
6549
6550 # Split the substitutions into bite-sized pieces for seds with
6551 # small command number limits, like on Digital OSF/1 and HP-UX.
6552 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6553 ac_file=1 # Number of current file.
6554 ac_beg=1 # First line for current file.
6555 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6556 ac_more_lines=:
6557 ac_sed_cmds=""
6558 while $ac_more_lines; do
6559   if test $ac_beg -gt 1; then
6560     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6561   else
6562     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6563   fi
6564   if test ! -s conftest.s$ac_file; then
6565     ac_more_lines=false
6566     rm -f conftest.s$ac_file
6567   else
6568     if test -z "$ac_sed_cmds"; then
6569       ac_sed_cmds="sed -f conftest.s$ac_file"
6570     else
6571       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6572     fi
6573     ac_file=`expr $ac_file + 1`
6574     ac_beg=$ac_end
6575     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6576   fi
6577 done
6578 if test -z "$ac_sed_cmds"; then
6579   ac_sed_cmds=cat
6580 fi
6581 EOF
6582
6583 cat >> $CONFIG_STATUS <<EOF
6584
6585 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
6586 EOF
6587 cat >> $CONFIG_STATUS <<\EOF
6588 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6589   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6590   case "$ac_file" in
6591   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6592        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6593   *) ac_file_in="${ac_file}.in" ;;
6594   esac
6595
6596   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6597
6598   # Remove last slash and all that follows it.  Not all systems have dirname.
6599   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6600   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6601     # The file is in a subdirectory.
6602     test ! -d "$ac_dir" && mkdir "$ac_dir"
6603     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6604     # A "../" for each directory in $ac_dir_suffix.
6605     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6606   else
6607     ac_dir_suffix= ac_dots=
6608   fi
6609
6610   case "$ac_given_srcdir" in
6611   .)  srcdir=.
6612       if test -z "$ac_dots"; then top_srcdir=.
6613       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6614   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6615   *) # Relative path.
6616     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6617     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6618   esac
6619
6620
6621   echo creating "$ac_file"
6622   rm -f "$ac_file"
6623   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6624   case "$ac_file" in
6625   *Makefile*) ac_comsub="1i\\
6626 # $configure_input" ;;
6627   *) ac_comsub= ;;
6628   esac
6629
6630   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6631   sed -e "$ac_comsub
6632 s%@configure_input@%$configure_input%g
6633 s%@srcdir@%$srcdir%g
6634 s%@top_srcdir@%$top_srcdir%g
6635 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6636 fi; done
6637 rm -f conftest.s*
6638
6639 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6640 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6641 #
6642 # ac_d sets the value in "#define NAME VALUE" lines.
6643 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6644 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6645 ac_dC='\3'
6646 ac_dD='%g'
6647 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6648 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6649 ac_uB='\([      ]\)%\1#\2define\3'
6650 ac_uC=' '
6651 ac_uD='\4%g'
6652 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6653 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6654 ac_eB='$%\1#\2define\3'
6655 ac_eC=' '
6656 ac_eD='%g'
6657
6658 if test "${CONFIG_HEADERS+set}" != set; then
6659 EOF
6660 cat >> $CONFIG_STATUS <<EOF
6661   CONFIG_HEADERS="auto-host.h:config.in"
6662 EOF
6663 cat >> $CONFIG_STATUS <<\EOF
6664 fi
6665 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6666   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6667   case "$ac_file" in
6668   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6669        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6670   *) ac_file_in="${ac_file}.in" ;;
6671   esac
6672
6673   echo creating $ac_file
6674
6675   rm -f conftest.frag conftest.in conftest.out
6676   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6677   cat $ac_file_inputs > conftest.in
6678
6679 EOF
6680
6681 # Transform confdefs.h into a sed script conftest.vals that substitutes
6682 # the proper values into config.h.in to produce config.h.  And first:
6683 # Protect against being on the right side of a sed subst in config.status.
6684 # Protect against being in an unquoted here document in config.status.
6685 rm -f conftest.vals
6686 cat > conftest.hdr <<\EOF
6687 s/[\\&%]/\\&/g
6688 s%[\\$`]%\\&%g
6689 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6690 s%ac_d%ac_u%gp
6691 s%ac_u%ac_e%gp
6692 EOF
6693 sed -n -f conftest.hdr confdefs.h > conftest.vals
6694 rm -f conftest.hdr
6695
6696 # This sed command replaces #undef with comments.  This is necessary, for
6697 # example, in the case of _POSIX_SOURCE, which is predefined and required
6698 # on some systems where configure will not decide to define it.
6699 cat >> conftest.vals <<\EOF
6700 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6701 EOF
6702
6703 # Break up conftest.vals because some shells have a limit on
6704 # the size of here documents, and old seds have small limits too.
6705
6706 rm -f conftest.tail
6707 while :
6708 do
6709   ac_lines=`grep -c . conftest.vals`
6710   # grep -c gives empty output for an empty file on some AIX systems.
6711   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6712   # Write a limited-size here document to conftest.frag.
6713   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6714   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6715   echo 'CEOF
6716   sed -f conftest.frag conftest.in > conftest.out
6717   rm -f conftest.in
6718   mv conftest.out conftest.in
6719 ' >> $CONFIG_STATUS
6720   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6721   rm -f conftest.vals
6722   mv conftest.tail conftest.vals
6723 done
6724 rm -f conftest.vals
6725
6726 cat >> $CONFIG_STATUS <<\EOF
6727   rm -f conftest.frag conftest.h
6728   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6729   cat conftest.in >> conftest.h
6730   rm -f conftest.in
6731   if cmp -s $ac_file conftest.h 2>/dev/null; then
6732     echo "$ac_file is unchanged"
6733     rm -f conftest.h
6734   else
6735     # Remove last slash and all that follows it.  Not all systems have dirname.
6736       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6737       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6738       # The file is in a subdirectory.
6739       test ! -d "$ac_dir" && mkdir "$ac_dir"
6740     fi
6741     rm -f $ac_file
6742     mv conftest.h $ac_file
6743   fi
6744 fi; done
6745
6746 EOF
6747 cat >> $CONFIG_STATUS <<EOF
6748
6749 host='${host}'
6750 build='${build}'
6751 target='${target}'
6752 target_alias='${target_alias}'
6753 srcdir='${srcdir}'
6754 subdirs='${subdirs}'
6755 oldstyle_subdirs='${oldstyle_subdirs}'
6756 symbolic_link='${symbolic_link}'
6757 program_transform_set='${program_transform_set}'
6758 program_transform_name='${program_transform_name}'
6759 dep_host_xmake_file='${dep_host_xmake_file}'
6760 host_xmake_file='${host_xmake_file}'
6761 dep_tmake_file='${dep_tmake_file}'
6762 tmake_file='${tmake_file}'
6763 thread_file='${thread_file}'
6764 gcc_version='${gcc_version}'
6765 gcc_version_trigger='${gcc_version_trigger}'
6766 local_prefix='${local_prefix}'
6767 build_install_headers_dir='${build_install_headers_dir}'
6768 build_exeext='${build_exeext}'
6769 host_exeext='${host_exeext}'
6770 out_file='${out_file}'
6771 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
6772 SET_MAKE='${SET_MAKE}'
6773 target_list='${target_list}'
6774 target_overrides='${target_overrides}'
6775 host_overrides='${host_overrides}'
6776 cross_defines='${cross_defines}'
6777 cross_overrides='${cross_overrides}'
6778 build_overrides='${build_overrides}'
6779
6780 EOF
6781 cat >> $CONFIG_STATUS <<\EOF
6782
6783 . $srcdir/configure.lang
6784 case x$CONFIG_HEADERS in
6785 xauto-host.h:config.in)
6786 echo > cstamp-h ;;
6787 esac
6788 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
6789 # bootstrapping and the installation procedure can still use
6790 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
6791 # FLAGS_TO_PASS has been modified to solve the problem there.
6792 # This is virtually a duplicate of what happens in configure.lang; we do
6793 # an extra check to make sure this only happens if ln -s can be used.
6794 if test "$symbolic_link" = "ln -s"; then
6795  for d in .. ${subdirs} ; do
6796    if test $d != ..; then
6797         STARTDIR=`pwd`
6798         cd $d
6799         for t in stage1 stage2 stage3 stage4 include
6800         do
6801                 rm -f $t
6802                 $symbolic_link ../$t $t 2>/dev/null
6803         done
6804         cd $STARTDIR
6805    fi
6806  done
6807 else true ; fi
6808
6809 exit 0
6810 EOF
6811 chmod +x $CONFIG_STATUS
6812 rm -fr confdefs* $ac_clean_files
6813 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6814