OSDN Git Service

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