OSDN Git Service

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