OSDN Git Service

* config/d30v: New port.
[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.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-gnu-ld           arrange to work with GNU ld."
16 ac_help="$ac_help
17   --with-ld               arrange to use the specified ld (full pathname)."
18 ac_help="$ac_help
19   --with-gnu-as           arrange to work with GNU as."
20 ac_help="$ac_help
21   --with-as               arrange to use the specified as (full pathname)."
22 ac_help="$ac_help
23   --with-stabs            arrange to use stabs instead of host debug format."
24 ac_help="$ac_help
25   --with-elf              arrange to use ELF instead of host debug format."
26 ac_help="$ac_help
27   --with-local-prefix=DIR specifies directory to put local include."
28 ac_help="$ac_help
29   --with-gxx-include-dir=DIR
30                           specifies directory to put g++ header files."
31 ac_help="$ac_help
32   --enable-checking[=LIST]
33                           enable expensive run-time checks.  With LIST,
34                           enable only specific categories of checks.
35                           Categories are: misc,tree,rtl,gc,gcac; default
36                           is misc,tree,rtl"
37 ac_help="$ac_help
38   --disable-cpp           don't provide a user-visible C preprocessor."
39 ac_help="$ac_help
40   --with-cpp-install-dir=DIR
41                           install the user visible C preprocessor in DIR
42                           (relative to PREFIX) as well as PREFIX/bin."
43 ac_help="$ac_help
44   --enable-c-mbchar       Enable multibyte characters for C and C++."
45 ac_help="$ac_help
46   --enable-threads        enable thread usage for target GCC.
47   --enable-threads=LIB    use LIB thread package for target GCC."
48 ac_help="$ac_help
49   --enable-objc-gc        enable the use of Boehm's garbage collector with
50                           the GNU Objective-C runtime."
51 ac_help="$ac_help
52   --with-dwarf2   force the default debug format to be DWARF2."
53 ac_help="$ac_help
54   --enable-nls            use Native Language Support (disabled by default)"
55 ac_help="$ac_help
56   --disable-nls           do not use Native Language Support"
57 ac_help="$ac_help
58   --with-included-gettext use the GNU gettext library included here"
59 ac_help="$ac_help
60   --with-catgets          use catgets functions if available"
61 ac_help="$ac_help
62   --disable-win32-registry
63                           Disable lookup of installation paths in the
64                          Registry on Windows hosts.
65   --enable-win32-registry Enable registry lookup (default).
66   --enable-win32-registry=KEY
67                           Use KEY instead of GCC version as the last portion
68                          of the registry key."
69 ac_help="$ac_help
70   --with-gc={simple,page} Choose the garbage collection mechanism to use
71                            with the compiler."
72 ac_help="$ac_help
73   --enable-new-gxx-abi
74                           select the new abi for g++. You must select an ABI
75                           at configuration time, so that the correct runtime
76                           support is built. You cannot mix ABIs."
77 ac_help="$ac_help
78   --enable-libstdcxx-v3 
79                           enable libstdc++-v3 for building and installation"
80
81 # Initialize some variables set by options.
82 # The variables have the same names as the options, with
83 # dashes changed to underlines.
84 build=NONE
85 cache_file=./config.cache
86 exec_prefix=NONE
87 host=NONE
88 no_create=
89 nonopt=NONE
90 no_recursion=
91 prefix=NONE
92 program_prefix=NONE
93 program_suffix=NONE
94 program_transform_name=s,x,x,
95 silent=
96 site=
97 srcdir=
98 target=NONE
99 verbose=
100 x_includes=NONE
101 x_libraries=NONE
102 bindir='${exec_prefix}/bin'
103 sbindir='${exec_prefix}/sbin'
104 libexecdir='${exec_prefix}/libexec'
105 datadir='${prefix}/share'
106 sysconfdir='${prefix}/etc'
107 sharedstatedir='${prefix}/com'
108 localstatedir='${prefix}/var'
109 libdir='${exec_prefix}/lib'
110 includedir='${prefix}/include'
111 oldincludedir='/usr/include'
112 infodir='${prefix}/info'
113 mandir='${prefix}/man'
114
115 # Initialize some other variables.
116 subdirs=
117 MFLAGS= MAKEFLAGS=
118 SHELL=${CONFIG_SHELL-/bin/sh}
119 # Maximum number of lines to put in a shell here document.
120 ac_max_here_lines=12
121
122 ac_prev=
123 for ac_option
124 do
125
126   # If the previous option needs an argument, assign it.
127   if test -n "$ac_prev"; then
128     eval "$ac_prev=\$ac_option"
129     ac_prev=
130     continue
131   fi
132
133   case "$ac_option" in
134   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
135   *) ac_optarg= ;;
136   esac
137
138   # Accept the important Cygnus configure options, so we can diagnose typos.
139
140   case "$ac_option" in
141
142   -bindir | --bindir | --bindi | --bind | --bin | --bi)
143     ac_prev=bindir ;;
144   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
145     bindir="$ac_optarg" ;;
146
147   -build | --build | --buil | --bui | --bu)
148     ac_prev=build ;;
149   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
150     build="$ac_optarg" ;;
151
152   -cache-file | --cache-file | --cache-fil | --cache-fi \
153   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
154     ac_prev=cache_file ;;
155   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
156   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
157     cache_file="$ac_optarg" ;;
158
159   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
160     ac_prev=datadir ;;
161   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
162   | --da=*)
163     datadir="$ac_optarg" ;;
164
165   -disable-* | --disable-*)
166     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
167     # Reject names that are not valid shell variable names.
168     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
169       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
170     fi
171     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
172     eval "enable_${ac_feature}=no" ;;
173
174   -enable-* | --enable-*)
175     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
176     # Reject names that are not valid shell variable names.
177     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
178       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179     fi
180     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181     case "$ac_option" in
182       *=*) ;;
183       *) ac_optarg=yes ;;
184     esac
185     eval "enable_${ac_feature}='$ac_optarg'" ;;
186
187   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
188   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
189   | --exec | --exe | --ex)
190     ac_prev=exec_prefix ;;
191   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
192   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
193   | --exec=* | --exe=* | --ex=*)
194     exec_prefix="$ac_optarg" ;;
195
196   -gas | --gas | --ga | --g)
197     # Obsolete; use --with-gas.
198     with_gas=yes ;;
199
200   -help | --help | --hel | --he)
201     # Omit some internal or obsolete options to make the list less imposing.
202     # This message is too long to be a string in the A/UX 3.1 sh.
203     cat << EOF
204 Usage: configure [options] [host]
205 Options: [defaults in brackets after descriptions]
206 Configuration:
207   --cache-file=FILE       cache test results in FILE
208   --help                  print this message
209   --no-create             do not create output files
210   --quiet, --silent       do not print \`checking...' messages
211   --version               print the version of autoconf that created configure
212 Directory and file names:
213   --prefix=PREFIX         install architecture-independent files in PREFIX
214                           [$ac_default_prefix]
215   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
216                           [same as prefix]
217   --bindir=DIR            user executables in DIR [EPREFIX/bin]
218   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
219   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
220   --datadir=DIR           read-only architecture-independent data in DIR
221                           [PREFIX/share]
222   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
223   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
224                           [PREFIX/com]
225   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
226   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
227   --includedir=DIR        C header files in DIR [PREFIX/include]
228   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
229   --infodir=DIR           info documentation in DIR [PREFIX/info]
230   --mandir=DIR            man documentation in DIR [PREFIX/man]
231   --srcdir=DIR            find the sources in DIR [configure dir or ..]
232   --program-prefix=PREFIX prepend PREFIX to installed program names
233   --program-suffix=SUFFIX append SUFFIX to installed program names
234   --program-transform-name=PROGRAM
235                           run sed PROGRAM on installed program names
236 EOF
237     cat << EOF
238 Host type:
239   --build=BUILD           configure for building on BUILD [BUILD=HOST]
240   --host=HOST             configure for HOST [guessed]
241   --target=TARGET         configure for TARGET [TARGET=HOST]
242 Features and packages:
243   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
244   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
245   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
246   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
247   --x-includes=DIR        X include files are in DIR
248   --x-libraries=DIR       X library files are in DIR
249 EOF
250     if test -n "$ac_help"; then
251       echo "--enable and --with options recognized:$ac_help"
252     fi
253     exit 0 ;;
254
255   -host | --host | --hos | --ho)
256     ac_prev=host ;;
257   -host=* | --host=* | --hos=* | --ho=*)
258     host="$ac_optarg" ;;
259
260   -includedir | --includedir | --includedi | --included | --include \
261   | --includ | --inclu | --incl | --inc)
262     ac_prev=includedir ;;
263   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
264   | --includ=* | --inclu=* | --incl=* | --inc=*)
265     includedir="$ac_optarg" ;;
266
267   -infodir | --infodir | --infodi | --infod | --info | --inf)
268     ac_prev=infodir ;;
269   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
270     infodir="$ac_optarg" ;;
271
272   -libdir | --libdir | --libdi | --libd)
273     ac_prev=libdir ;;
274   -libdir=* | --libdir=* | --libdi=* | --libd=*)
275     libdir="$ac_optarg" ;;
276
277   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
278   | --libexe | --libex | --libe)
279     ac_prev=libexecdir ;;
280   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
281   | --libexe=* | --libex=* | --libe=*)
282     libexecdir="$ac_optarg" ;;
283
284   -localstatedir | --localstatedir | --localstatedi | --localstated \
285   | --localstate | --localstat | --localsta | --localst \
286   | --locals | --local | --loca | --loc | --lo)
287     ac_prev=localstatedir ;;
288   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
289   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
290   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
291     localstatedir="$ac_optarg" ;;
292
293   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
294     ac_prev=mandir ;;
295   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
296     mandir="$ac_optarg" ;;
297
298   -nfp | --nfp | --nf)
299     # Obsolete; use --without-fp.
300     with_fp=no ;;
301
302   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
303   | --no-cr | --no-c)
304     no_create=yes ;;
305
306   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
307   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
308     no_recursion=yes ;;
309
310   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
311   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
312   | --oldin | --oldi | --old | --ol | --o)
313     ac_prev=oldincludedir ;;
314   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
315   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
316   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
317     oldincludedir="$ac_optarg" ;;
318
319   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
320     ac_prev=prefix ;;
321   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
322     prefix="$ac_optarg" ;;
323
324   -program-prefix | --program-prefix | --program-prefi | --program-pref \
325   | --program-pre | --program-pr | --program-p)
326     ac_prev=program_prefix ;;
327   -program-prefix=* | --program-prefix=* | --program-prefi=* \
328   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
329     program_prefix="$ac_optarg" ;;
330
331   -program-suffix | --program-suffix | --program-suffi | --program-suff \
332   | --program-suf | --program-su | --program-s)
333     ac_prev=program_suffix ;;
334   -program-suffix=* | --program-suffix=* | --program-suffi=* \
335   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
336     program_suffix="$ac_optarg" ;;
337
338   -program-transform-name | --program-transform-name \
339   | --program-transform-nam | --program-transform-na \
340   | --program-transform-n | --program-transform- \
341   | --program-transform | --program-transfor \
342   | --program-transfo | --program-transf \
343   | --program-trans | --program-tran \
344   | --progr-tra | --program-tr | --program-t)
345     ac_prev=program_transform_name ;;
346   -program-transform-name=* | --program-transform-name=* \
347   | --program-transform-nam=* | --program-transform-na=* \
348   | --program-transform-n=* | --program-transform-=* \
349   | --program-transform=* | --program-transfor=* \
350   | --program-transfo=* | --program-transf=* \
351   | --program-trans=* | --program-tran=* \
352   | --progr-tra=* | --program-tr=* | --program-t=*)
353     program_transform_name="$ac_optarg" ;;
354
355   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
356   | -silent | --silent | --silen | --sile | --sil)
357     silent=yes ;;
358
359   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
360     ac_prev=sbindir ;;
361   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
362   | --sbi=* | --sb=*)
363     sbindir="$ac_optarg" ;;
364
365   -sharedstatedir | --sharedstatedir | --sharedstatedi \
366   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
367   | --sharedst | --shareds | --shared | --share | --shar \
368   | --sha | --sh)
369     ac_prev=sharedstatedir ;;
370   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
371   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
372   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
373   | --sha=* | --sh=*)
374     sharedstatedir="$ac_optarg" ;;
375
376   -site | --site | --sit)
377     ac_prev=site ;;
378   -site=* | --site=* | --sit=*)
379     site="$ac_optarg" ;;
380
381   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
382     ac_prev=srcdir ;;
383   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
384     srcdir="$ac_optarg" ;;
385
386   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
387   | --syscon | --sysco | --sysc | --sys | --sy)
388     ac_prev=sysconfdir ;;
389   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
390   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
391     sysconfdir="$ac_optarg" ;;
392
393   -target | --target | --targe | --targ | --tar | --ta | --t)
394     ac_prev=target ;;
395   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
396     target="$ac_optarg" ;;
397
398   -v | -verbose | --verbose | --verbos | --verbo | --verb)
399     verbose=yes ;;
400
401   -version | --version | --versio | --versi | --vers)
402     echo "configure generated by autoconf version 2.13"
403     exit 0 ;;
404
405   -with-* | --with-*)
406     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
407     # Reject names that are not valid shell variable names.
408     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
409       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
410     fi
411     ac_package=`echo $ac_package| sed 's/-/_/g'`
412     case "$ac_option" in
413       *=*) ;;
414       *) ac_optarg=yes ;;
415     esac
416     eval "with_${ac_package}='$ac_optarg'" ;;
417
418   -without-* | --without-*)
419     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
422       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
423     fi
424     ac_package=`echo $ac_package| sed 's/-/_/g'`
425     eval "with_${ac_package}=no" ;;
426
427   --x)
428     # Obsolete; use --with-x.
429     with_x=yes ;;
430
431   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432   | --x-incl | --x-inc | --x-in | --x-i)
433     ac_prev=x_includes ;;
434   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436     x_includes="$ac_optarg" ;;
437
438   -x-libraries | --x-libraries | --x-librarie | --x-librari \
439   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440     ac_prev=x_libraries ;;
441   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443     x_libraries="$ac_optarg" ;;
444
445   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
446     ;;
447
448   *)
449     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
450       echo "configure: warning: $ac_option: invalid host type" 1>&2
451     fi
452     if test "x$nonopt" != xNONE; then
453       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
454     fi
455     nonopt="$ac_option"
456     ;;
457
458   esac
459 done
460
461 if test -n "$ac_prev"; then
462   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
463 fi
464
465 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
466
467 # File descriptor usage:
468 # 0 standard input
469 # 1 file creation
470 # 2 errors and warnings
471 # 3 some systems may open it to /dev/tty
472 # 4 used on the Kubota Titan
473 # 6 checking for... messages and results
474 # 5 compiler messages saved in config.log
475 if test "$silent" = yes; then
476   exec 6>/dev/null
477 else
478   exec 6>&1
479 fi
480 exec 5>./config.log
481
482 echo "\
483 This file contains any messages produced by compilers while
484 running configure, to aid debugging if configure makes a mistake.
485 " 1>&5
486
487 # Strip out --no-create and --no-recursion so they do not pile up.
488 # Also quote any args containing shell metacharacters.
489 ac_configure_args=
490 for ac_arg
491 do
492   case "$ac_arg" in
493   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
494   | --no-cr | --no-c) ;;
495   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
496   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
497   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
498   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
499   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
500   esac
501 done
502
503 # NLS nuisances.
504 # Only set these to C if already set.  These must not be set unconditionally
505 # because not all systems understand e.g. LANG=C (notably SCO).
506 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
507 # Non-C LC_CTYPE values break the ctype check.
508 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
509 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
510 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
511 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
512
513 # confdefs.h avoids OS command line length limits that DEFS can exceed.
514 rm -rf conftest* confdefs.h
515 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
516 echo > confdefs.h
517
518 # A filename unique to this package, relative to the directory that
519 # configure is in, which we can look for to find out if srcdir is correct.
520 ac_unique_file=tree.c
521
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524   ac_srcdir_defaulted=yes
525   # Try the directory containing this script, then its parent.
526   ac_prog=$0
527   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
528   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
529   srcdir=$ac_confdir
530   if test ! -r $srcdir/$ac_unique_file; then
531     srcdir=..
532   fi
533 else
534   ac_srcdir_defaulted=no
535 fi
536 if test ! -r $srcdir/$ac_unique_file; then
537   if test "$ac_srcdir_defaulted" = yes; then
538     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
539   else
540     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
541   fi
542 fi
543 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
544
545 # Prefer explicitly selected file to automatically selected ones.
546 if test -z "$CONFIG_SITE"; then
547   if test "x$prefix" != xNONE; then
548     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
549   else
550     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
551   fi
552 fi
553 for ac_site_file in $CONFIG_SITE; do
554   if test -r "$ac_site_file"; then
555     echo "loading site script $ac_site_file"
556     . "$ac_site_file"
557   fi
558 done
559
560 if test -r "$cache_file"; then
561   echo "loading cache $cache_file"
562   . $cache_file
563 else
564   echo "creating cache $cache_file"
565   > $cache_file
566 fi
567
568 ac_ext=c
569 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
570 ac_cpp='$CPP $CPPFLAGS'
571 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
572 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
573 cross_compiling=$ac_cv_prog_cc_cross
574
575 ac_exeext=
576 ac_objext=o
577 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
578   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
579   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
580     ac_n= ac_c='
581 ' ac_t='        '
582   else
583     ac_n=-n ac_c= ac_t=
584   fi
585 else
586   ac_n= ac_c='\c' ac_t=
587 fi
588
589
590
591
592 remove=rm
593 hard_link=ln
594 symbolic_link='ln -s'
595 copy=cp
596
597 # Check for bogus environment variables.
598 # Test if LIBRARY_PATH contains the notation for the current directory
599 # since this would lead to problems installing/building glibc.
600 # LIBRARY_PATH contains the current directory if one of the following
601 # is true:
602 # - one of the terminals (":" and ";") is the first or last sign
603 # - two terminals occur directly after each other
604 # - the path contains an element with a dot in it
605 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
606 echo "configure:607: checking LIBRARY_PATH variable" >&5
607 case ${LIBRARY_PATH} in
608   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
609     library_path_setting="contains current directory"
610     ;;
611   *)
612     library_path_setting="ok"
613     ;;
614 esac
615 echo "$ac_t""$library_path_setting" 1>&6
616 if test "$library_path_setting" != "ok"; then
617 { echo "configure: error: 
618 *** LIBRARY_PATH shouldn't contain the current directory when
619 *** building gcc. Please change the environment variable
620 *** and run configure again." 1>&2; exit 1; }
621 fi
622
623 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
624 # since this would lead to problems installing/building glibc.
625 # GCC_EXEC_PREFIX contains the current directory if one of the following
626 # is true:
627 # - one of the terminals (":" and ";") is the first or last sign
628 # - two terminals occur directly after each other
629 # - the path contains an element with a dot in it
630 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
631 echo "configure:632: checking GCC_EXEC_PREFIX variable" >&5
632 case ${GCC_EXEC_PREFIX} in
633   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
634     gcc_exec_prefix_setting="contains current directory"
635     ;;
636   *)
637     gcc_exec_prefix_setting="ok"
638     ;;
639 esac
640 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
641 if test "$gcc_exec_prefix_setting" != "ok"; then
642 { echo "configure: error: 
643 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
644 *** building gcc. Please change the environment variable
645 *** and run configure again." 1>&2; exit 1; }
646 fi
647
648 # Check for additional parameters
649
650 # With GNU ld
651 # Check whether --with-gnu-ld or --without-gnu-ld was given.
652 if test "${with_gnu_ld+set}" = set; then
653   withval="$with_gnu_ld"
654   gnu_ld_flag="$with_gnu_ld"
655 else
656   gnu_ld_flag=no
657 fi
658
659
660 # With pre-defined ld
661 # Check whether --with-ld or --without-ld was given.
662 if test "${with_ld+set}" = set; then
663   withval="$with_ld"
664   DEFAULT_LINKER="$with_ld"
665 fi
666
667 if test x"${DEFAULT_LINKER+set}" = x"set"; then
668   if test ! -x "$DEFAULT_LINKER"; then
669     echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
670   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
671     gnu_ld_flag=yes
672   fi
673   cat >> confdefs.h <<EOF
674 #define DEFAULT_LINKER "$DEFAULT_LINKER"
675 EOF
676
677 fi
678
679 # With GNU as
680 # Check whether --with-gnu-as or --without-gnu-as was given.
681 if test "${with_gnu_as+set}" = set; then
682   withval="$with_gnu_as"
683   gas_flag="$with_gnu_as"
684 else
685   gas_flag=no
686 fi
687
688
689 # Check whether --with-as or --without-as was given.
690 if test "${with_as+set}" = set; then
691   withval="$with_as"
692   DEFAULT_ASSEMBLER="$with_as"
693 fi
694
695 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
696   if test ! -x "$DEFAULT_ASSEMBLER"; then
697     echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
698   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
699     gas_flag=yes
700   fi
701   cat >> confdefs.h <<EOF
702 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
703 EOF
704
705 fi
706
707 # With stabs
708 # Check whether --with-stabs or --without-stabs was given.
709 if test "${with_stabs+set}" = set; then
710   withval="$with_stabs"
711   stabs="$with_stabs"
712 else
713   stabs=no
714 fi
715
716
717 # With ELF
718 # Check whether --with-elf or --without-elf was given.
719 if test "${with_elf+set}" = set; then
720   withval="$with_elf"
721   elf="$with_elf"
722 else
723   elf=no
724 fi
725
726
727 # Specify the local prefix
728 local_prefix=
729 # Check whether --with-local-prefix or --without-local-prefix was given.
730 if test "${with_local_prefix+set}" = set; then
731   withval="$with_local_prefix"
732   case "${withval}" in
733 yes)    { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
734 no)     ;;
735 *)      local_prefix=$with_local_prefix ;;
736 esac
737 fi
738
739
740 # Default local prefix if it is empty
741 if test x$local_prefix = x; then
742         local_prefix=/usr/local
743 fi
744
745 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
746 # passed in by the toplevel make and thus we'd get different behavior
747 # depending on where we built the sources.
748 gcc_gxx_include_dir=
749 # Specify the g++ header file directory
750 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
751 if test "${with_gxx_include_dir+set}" = set; then
752   withval="$with_gxx_include_dir"
753   case "${withval}" in
754 yes)    { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
755 no)     ;;
756 *)      gcc_gxx_include_dir=$with_gxx_include_dir ;;
757 esac
758 fi
759
760
761 if test x${gcc_gxx_include_dir} = x; then
762   if test x${enable_version_specific_runtime_libs} = xyes; then
763     gcc_gxx_include_dir='${libsubdir}/include/g++'
764   else
765     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
766     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
767   fi
768 fi
769
770 # Enable expensive internal checks
771 # Check whether --enable-checking or --disable-checking was given.
772 if test "${enable_checking+set}" = set; then
773   enableval="$enable_checking"
774   ac_checking=
775 ac_tree_checking=
776 ac_rtl_checking=
777 ac_gc_checking=
778 ac_gc_always_collect=
779 case "${enableval}" in
780 yes)    ac_checking=1 ; ac_tree_checking=1 ; ac_rtl_checking=1 ;;
781 no)     ;;
782 *)      IFS="${IFS=     }"; ac_save_IFS="$IFS" IFS="$IFS,"
783         set fnord $enableval; shift
784         IFS="$ac_save_IFS"
785         for check
786         do
787                 case $check in
788                 misc)   ac_checking=1 ;;
789                 tree)   ac_tree_checking=1 ;;
790                 rtl)    ac_rtl_checking=1 ;;
791                 gc)     ac_gc_checking=1 ;;
792                 gcac)   ac_gc_always_collect=1 ;;
793                 *)      { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
794                 esac
795         done
796         ;;
797 esac
798 if test x$ac_checking != x ; then
799   cat >> confdefs.h <<\EOF
800 #define ENABLE_CHECKING 1
801 EOF
802
803 fi
804 if test x$ac_tree_checking != x ; then
805   cat >> confdefs.h <<\EOF
806 #define ENABLE_TREE_CHECKING 1
807 EOF
808
809 fi
810 if test x$ac_rtl_checking != x ; then
811   cat >> confdefs.h <<\EOF
812 #define ENABLE_RTL_CHECKING 1
813 EOF
814
815 fi
816 if test x$ac_gc_checking != x ; then
817   cat >> confdefs.h <<\EOF
818 #define ENABLE_GC_CHECKING 1
819 EOF
820
821 fi
822 if test x$ac_gc_always_collect != x ; then
823   cat >> confdefs.h <<\EOF
824 #define ENABLE_GC_ALWAYS_COLLECT 1
825 EOF
826
827 fi
828
829 fi
830
831
832 # Check whether --enable-cpp or --disable-cpp was given.
833 if test "${enable_cpp+set}" = set; then
834   enableval="$enable_cpp"
835   :
836 else
837   enable_cpp=yes
838 fi
839
840
841 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
842 if test "${with_cpp_install_dir+set}" = set; then
843   withval="$with_cpp_install_dir"
844   if test x$withval = xyes; then
845   { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
846 elif test x$withval != xno; then
847   cpp_install_dir=$withval
848 fi
849 fi
850
851
852
853 # Enable Multibyte Characters for C/C++
854 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
855 if test "${enable_c_mbchar+set}" = set; then
856   enableval="$enable_c_mbchar"
857   if test x$enable_c_mbchar != xno; then
858   extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
859 fi
860 fi
861
862   
863 # Enable threads
864 # Pass with no value to take the default
865 # Pass with a value to specify a thread package
866 # Check whether --enable-threads or --disable-threads was given.
867 if test "${enable_threads+set}" = set; then
868   enableval="$enable_threads"
869   if test x$enable_threads = xno; then
870         enable_threads=''
871 fi
872 else
873   enable_threads=''
874 fi
875
876
877 enable_threads_flag=$enable_threads
878 # Check if a valid thread package
879 case x${enable_threads_flag} in
880         x | xno)
881                 # No threads
882                 target_thread_file='single'
883                 ;;
884         xyes)
885                 # default
886                 target_thread_file=''
887                 ;;
888         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
889         xsolaris | xwin32 | xdce | xvxworks)
890                 target_thread_file=$enable_threads_flag
891                 ;;
892         *)
893                 echo "$enable_threads is an unknown thread package" 1>&2
894                 exit 1
895                 ;;
896 esac
897
898 # Check whether --enable-objc-gc or --disable-objc-gc was given.
899 if test "${enable_objc_gc+set}" = set; then
900   enableval="$enable_objc_gc"
901   if test x$enable_objc_gc = xno; then
902         objc_boehm_gc=''
903 else
904         objc_boehm_gc=1
905 fi
906 else
907   objc_boehm_gc=''
908 fi
909
910
911 # Check whether --with-dwarf2 or --without-dwarf2 was given.
912 if test "${with_dwarf2+set}" = set; then
913   withval="$with_dwarf2"
914   dwarf2="$with_dwarf2"
915 else
916   dwarf2=no
917 fi
918
919
920 # Determine the host, build, and target systems
921 ac_aux_dir=
922 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
923   if test -f $ac_dir/install-sh; then
924     ac_aux_dir=$ac_dir
925     ac_install_sh="$ac_aux_dir/install-sh -c"
926     break
927   elif test -f $ac_dir/install.sh; then
928     ac_aux_dir=$ac_dir
929     ac_install_sh="$ac_aux_dir/install.sh -c"
930     break
931   fi
932 done
933 if test -z "$ac_aux_dir"; then
934   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
935 fi
936 ac_config_guess=$ac_aux_dir/config.guess
937 ac_config_sub=$ac_aux_dir/config.sub
938 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
939
940
941 # Do some error checking and defaulting for the host and target type.
942 # The inputs are:
943 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
944 #
945 # The rules are:
946 # 1. You are not allowed to specify --host, --target, and nonopt at the
947 #    same time.
948 # 2. Host defaults to nonopt.
949 # 3. If nonopt is not specified, then host defaults to the current host,
950 #    as determined by config.guess.
951 # 4. Target and build default to nonopt.
952 # 5. If nonopt is not specified, then target and build default to host.
953
954 # The aliases save the names the user supplied, while $host etc.
955 # will get canonicalized.
956 case $host---$target---$nonopt in
957 NONE---*---* | *---NONE---* | *---*---NONE) ;;
958 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
959 esac
960
961
962 # Make sure we can run config.sub.
963 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
964 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
965 fi
966
967 echo $ac_n "checking host system type""... $ac_c" 1>&6
968 echo "configure:969: checking host system type" >&5
969
970 host_alias=$host
971 case "$host_alias" in
972 NONE)
973   case $nonopt in
974   NONE)
975     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
976     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
977     fi ;;
978   *) host_alias=$nonopt ;;
979   esac ;;
980 esac
981
982 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
983 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
984 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
985 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
986 echo "$ac_t""$host" 1>&6
987
988 echo $ac_n "checking target system type""... $ac_c" 1>&6
989 echo "configure:990: checking target system type" >&5
990
991 target_alias=$target
992 case "$target_alias" in
993 NONE)
994   case $nonopt in
995   NONE) target_alias=$host_alias ;;
996   *) target_alias=$nonopt ;;
997   esac ;;
998 esac
999
1000 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1001 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1002 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1003 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1004 echo "$ac_t""$target" 1>&6
1005
1006 echo $ac_n "checking build system type""... $ac_c" 1>&6
1007 echo "configure:1008: checking build system type" >&5
1008
1009 build_alias=$build
1010 case "$build_alias" in
1011 NONE)
1012   case $nonopt in
1013   NONE) build_alias=$host_alias ;;
1014   *) build_alias=$nonopt ;;
1015   esac ;;
1016 esac
1017
1018 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1019 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1020 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1021 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1022 echo "$ac_t""$build" 1>&6
1023
1024 test "$host_alias" != "$target_alias" &&
1025   test "$program_prefix$program_suffix$program_transform_name" = \
1026     NONENONEs,x,x, &&
1027   program_prefix=${target_alias}-
1028
1029
1030 # Find the native compiler
1031 # Extract the first word of "gcc", so it can be a program name with args.
1032 set dummy gcc; ac_word=$2
1033 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1034 echo "configure:1035: checking for $ac_word" >&5
1035 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1036   echo $ac_n "(cached) $ac_c" 1>&6
1037 else
1038   if test -n "$CC"; then
1039   ac_cv_prog_CC="$CC" # Let the user override the test.
1040 else
1041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1042   ac_dummy="$PATH"
1043   for ac_dir in $ac_dummy; do
1044     test -z "$ac_dir" && ac_dir=.
1045     if test -f $ac_dir/$ac_word; then
1046       ac_cv_prog_CC="gcc"
1047       break
1048     fi
1049   done
1050   IFS="$ac_save_ifs"
1051 fi
1052 fi
1053 CC="$ac_cv_prog_CC"
1054 if test -n "$CC"; then
1055   echo "$ac_t""$CC" 1>&6
1056 else
1057   echo "$ac_t""no" 1>&6
1058 fi
1059
1060 if test -z "$CC"; then
1061   # Extract the first word of "cc", so it can be a program name with args.
1062 set dummy cc; ac_word=$2
1063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1064 echo "configure:1065: checking for $ac_word" >&5
1065 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1066   echo $ac_n "(cached) $ac_c" 1>&6
1067 else
1068   if test -n "$CC"; then
1069   ac_cv_prog_CC="$CC" # Let the user override the test.
1070 else
1071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1072   ac_prog_rejected=no
1073   ac_dummy="$PATH"
1074   for ac_dir in $ac_dummy; do
1075     test -z "$ac_dir" && ac_dir=.
1076     if test -f $ac_dir/$ac_word; then
1077       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1078         ac_prog_rejected=yes
1079         continue
1080       fi
1081       ac_cv_prog_CC="cc"
1082       break
1083     fi
1084   done
1085   IFS="$ac_save_ifs"
1086 if test $ac_prog_rejected = yes; then
1087   # We found a bogon in the path, so make sure we never use it.
1088   set dummy $ac_cv_prog_CC
1089   shift
1090   if test $# -gt 0; then
1091     # We chose a different compiler from the bogus one.
1092     # However, it has the same basename, so the bogon will be chosen
1093     # first if we set CC to just the basename; use the full file name.
1094     shift
1095     set dummy "$ac_dir/$ac_word" "$@"
1096     shift
1097     ac_cv_prog_CC="$@"
1098   fi
1099 fi
1100 fi
1101 fi
1102 CC="$ac_cv_prog_CC"
1103 if test -n "$CC"; then
1104   echo "$ac_t""$CC" 1>&6
1105 else
1106   echo "$ac_t""no" 1>&6
1107 fi
1108
1109   if test -z "$CC"; then
1110     case "`uname -s`" in
1111     *win32* | *WIN32*)
1112       # Extract the first word of "cl", so it can be a program name with args.
1113 set dummy cl; ac_word=$2
1114 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1115 echo "configure:1116: checking for $ac_word" >&5
1116 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1117   echo $ac_n "(cached) $ac_c" 1>&6
1118 else
1119   if test -n "$CC"; then
1120   ac_cv_prog_CC="$CC" # Let the user override the test.
1121 else
1122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1123   ac_dummy="$PATH"
1124   for ac_dir in $ac_dummy; do
1125     test -z "$ac_dir" && ac_dir=.
1126     if test -f $ac_dir/$ac_word; then
1127       ac_cv_prog_CC="cl"
1128       break
1129     fi
1130   done
1131   IFS="$ac_save_ifs"
1132 fi
1133 fi
1134 CC="$ac_cv_prog_CC"
1135 if test -n "$CC"; then
1136   echo "$ac_t""$CC" 1>&6
1137 else
1138   echo "$ac_t""no" 1>&6
1139 fi
1140  ;;
1141     esac
1142   fi
1143   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1144 fi
1145
1146 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1147 echo "configure:1148: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1148
1149 ac_ext=c
1150 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1151 ac_cpp='$CPP $CPPFLAGS'
1152 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1153 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1154 cross_compiling=$ac_cv_prog_cc_cross
1155
1156 cat > conftest.$ac_ext << EOF
1157
1158 #line 1159 "configure"
1159 #include "confdefs.h"
1160
1161 main(){return(0);}
1162 EOF
1163 if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1164   ac_cv_prog_cc_works=yes
1165   # If we can't run a trivial program, we are probably using a cross compiler.
1166   if (./conftest; exit) 2>/dev/null; then
1167     ac_cv_prog_cc_cross=no
1168   else
1169     ac_cv_prog_cc_cross=yes
1170   fi
1171 else
1172   echo "configure: failed program was:" >&5
1173   cat conftest.$ac_ext >&5
1174   ac_cv_prog_cc_works=no
1175 fi
1176 rm -fr conftest*
1177 ac_ext=c
1178 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1179 ac_cpp='$CPP $CPPFLAGS'
1180 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1181 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1182 cross_compiling=$ac_cv_prog_cc_cross
1183
1184 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1185 if test $ac_cv_prog_cc_works = no; then
1186   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1187 fi
1188 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1189 echo "configure:1190: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1190 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1191 cross_compiling=$ac_cv_prog_cc_cross
1192
1193 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether we are using GNU C" >&5
1195 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftest.c <<EOF
1199 #ifdef __GNUC__
1200   yes;
1201 #endif
1202 EOF
1203 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1204   ac_cv_prog_gcc=yes
1205 else
1206   ac_cv_prog_gcc=no
1207 fi
1208 fi
1209
1210 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1211
1212 if test $ac_cv_prog_gcc = yes; then
1213   GCC=yes
1214 else
1215   GCC=
1216 fi
1217
1218 ac_test_CFLAGS="${CFLAGS+set}"
1219 ac_save_CFLAGS="$CFLAGS"
1220 CFLAGS=
1221 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1222 echo "configure:1223: checking whether ${CC-cc} accepts -g" >&5
1223 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1224   echo $ac_n "(cached) $ac_c" 1>&6
1225 else
1226   echo 'void f(){}' > conftest.c
1227 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1228   ac_cv_prog_cc_g=yes
1229 else
1230   ac_cv_prog_cc_g=no
1231 fi
1232 rm -f conftest*
1233
1234 fi
1235
1236 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1237 if test "$ac_test_CFLAGS" = set; then
1238   CFLAGS="$ac_save_CFLAGS"
1239 elif test $ac_cv_prog_cc_g = yes; then
1240   if test "$GCC" = yes; then
1241     CFLAGS="-g -O2"
1242   else
1243     CFLAGS="-g"
1244   fi
1245 else
1246   if test "$GCC" = yes; then
1247     CFLAGS="-O2"
1248   else
1249     CFLAGS=
1250   fi
1251 fi
1252
1253 echo $ac_n "checking for long double""... $ac_c" 1>&6
1254 echo "configure:1255: checking for long double" >&5
1255 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1256   echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258   if test "$GCC" = yes; then
1259   gcc_cv_c_long_double=yes
1260 else
1261 cat > conftest.$ac_ext <<EOF
1262 #line 1263 "configure"
1263 #include "confdefs.h"
1264
1265 int main() {
1266 /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
1267 long double foo = 0.0;
1268 /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
1269 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1270 ; return 0; }
1271 EOF
1272 if { (eval echo configure:1273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1273   rm -rf conftest*
1274   gcc_cv_c_long_double=yes
1275 else
1276   echo "configure: failed program was:" >&5
1277   cat conftest.$ac_ext >&5
1278   rm -rf conftest*
1279   gcc_cv_c_long_double=no
1280 fi
1281 rm -f conftest*
1282 fi
1283 fi
1284
1285 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1286 if test $gcc_cv_c_long_double = yes; then
1287   cat >> confdefs.h <<\EOF
1288 #define HAVE_LONG_DOUBLE 1
1289 EOF
1290
1291 fi
1292
1293
1294 # If the native compiler is GCC, we can enable warnings even in stage1.  
1295 # That's useful for people building cross-compilers, or just running a
1296 # quick `make'.
1297 if test "x$GCC" = "xyes"; then 
1298   stage1_warn_cflags='$(WARN_CFLAGS)'
1299 else
1300   stage1_warn_cflags=""
1301 fi
1302
1303
1304 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether ${MAKE-make} sets \${MAKE}" >&5
1306 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1307 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   cat > conftestmake <<\EOF
1311 all:
1312         @echo 'ac_maketemp="${MAKE}"'
1313 EOF
1314 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1315 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1316 if test -n "$ac_maketemp"; then
1317   eval ac_cv_prog_make_${ac_make}_set=yes
1318 else
1319   eval ac_cv_prog_make_${ac_make}_set=no
1320 fi
1321 rm -f conftestmake
1322 fi
1323 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1324   echo "$ac_t""yes" 1>&6
1325   SET_MAKE=
1326 else
1327   echo "$ac_t""no" 1>&6
1328   SET_MAKE="MAKE=${MAKE-make}"
1329 fi
1330
1331
1332 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1333 echo "configure:1334: checking whether a default assembler was specified" >&5
1334 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1335     if test x"$gas_flag" = x"no"; then
1336         echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1337     else
1338         echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1339     fi
1340 else
1341     echo "$ac_t""no" 1>&6
1342 fi
1343
1344 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1345 echo "configure:1346: checking whether a default linker was specified" >&5
1346 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1347     if test x"$gnu_ld_flag" = x"no"; then
1348         echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1349     else
1350         echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1351     fi
1352 else
1353     echo "$ac_t""no" 1>&6
1354 fi
1355
1356 # Find some useful tools
1357 for ac_prog in gawk mawk nawk awk
1358 do
1359 # Extract the first word of "$ac_prog", so it can be a program name with args.
1360 set dummy $ac_prog; ac_word=$2
1361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1362 echo "configure:1363: checking for $ac_word" >&5
1363 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1364   echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366   if test -n "$AWK"; then
1367   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1368 else
1369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1370   ac_dummy="$PATH"
1371   for ac_dir in $ac_dummy; do
1372     test -z "$ac_dir" && ac_dir=.
1373     if test -f $ac_dir/$ac_word; then
1374       ac_cv_prog_AWK="$ac_prog"
1375       break
1376     fi
1377   done
1378   IFS="$ac_save_ifs"
1379 fi
1380 fi
1381 AWK="$ac_cv_prog_AWK"
1382 if test -n "$AWK"; then
1383   echo "$ac_t""$AWK" 1>&6
1384 else
1385   echo "$ac_t""no" 1>&6
1386 fi
1387
1388 test -n "$AWK" && break
1389 done
1390
1391 # Extract the first word of "flex", so it can be a program name with args.
1392 set dummy flex; ac_word=$2
1393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1394 echo "configure:1395: checking for $ac_word" >&5
1395 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1396   echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398   if test -n "$LEX"; then
1399   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1400 else
1401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1402   ac_dummy="$PATH"
1403   for ac_dir in $ac_dummy; do
1404     test -z "$ac_dir" && ac_dir=.
1405     if test -f $ac_dir/$ac_word; then
1406       ac_cv_prog_LEX="flex"
1407       break
1408     fi
1409   done
1410   IFS="$ac_save_ifs"
1411   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1412 fi
1413 fi
1414 LEX="$ac_cv_prog_LEX"
1415 if test -n "$LEX"; then
1416   echo "$ac_t""$LEX" 1>&6
1417 else
1418   echo "$ac_t""no" 1>&6
1419 fi
1420
1421 if test -z "$LEXLIB"
1422 then
1423   case "$LEX" in
1424   flex*) ac_lib=fl ;;
1425   *) ac_lib=l ;;
1426   esac
1427   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1428 echo "configure:1429: checking for yywrap in -l$ac_lib" >&5
1429 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1430 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1431   echo $ac_n "(cached) $ac_c" 1>&6
1432 else
1433   ac_save_LIBS="$LIBS"
1434 LIBS="-l$ac_lib  $LIBS"
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438 /* Override any gcc2 internal prototype to avoid an error.  */
1439 /* We use char because int might match the return type of a gcc2
1440     builtin and then its argument prototype would still apply.  */
1441 char yywrap();
1442
1443 int main() {
1444 yywrap()
1445 ; return 0; }
1446 EOF
1447 if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1448   rm -rf conftest*
1449   eval "ac_cv_lib_$ac_lib_var=yes"
1450 else
1451   echo "configure: failed program was:" >&5
1452   cat conftest.$ac_ext >&5
1453   rm -rf conftest*
1454   eval "ac_cv_lib_$ac_lib_var=no"
1455 fi
1456 rm -f conftest*
1457 LIBS="$ac_save_LIBS"
1458
1459 fi
1460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1461   echo "$ac_t""yes" 1>&6
1462   LEXLIB="-l$ac_lib"
1463 else
1464   echo "$ac_t""no" 1>&6
1465 fi
1466
1467 fi
1468
1469 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1470 echo "configure:1471: checking whether ln works" >&5
1471 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   rm -f conftestdata_t
1475 echo >conftestdata_f
1476 if ln conftestdata_f conftestdata_t 2>/dev/null
1477 then
1478   gcc_cv_prog_LN="ln"
1479 else
1480   if ln -s conftestdata_f conftestdata_t 2>/dev/null
1481   then
1482     gcc_cv_prog_LN="ln -s"
1483   else
1484     gcc_cv_prog_LN=cp
1485   fi
1486 fi
1487 rm -f conftestdata_f conftestdata_t
1488
1489 fi
1490 LN="$gcc_cv_prog_LN"
1491 if test "$gcc_cv_prog_LN" = "ln"; then
1492   echo "$ac_t""yes" 1>&6
1493 else
1494   if test "$gcc_cv_prog_LN" = "ln -s"; then
1495     echo "$ac_t""no, using ln -s" 1>&6
1496   else
1497     echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1498   fi
1499 fi
1500
1501 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1502 echo "configure:1503: checking whether ln -s works" >&5
1503 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1504   echo $ac_n "(cached) $ac_c" 1>&6
1505 else
1506   rm -f conftestdata_t
1507 echo >conftestdata_f
1508 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1509 then
1510   gcc_cv_prog_LN_S="ln -s"
1511 else
1512   if ln conftestdata_f conftestdata_t 2>/dev/null
1513   then
1514     gcc_cv_prog_LN_S=ln
1515   else
1516     gcc_cv_prog_LN_S=cp
1517   fi
1518 fi
1519 rm -f conftestdata_f conftestdata_t
1520
1521 fi
1522 LN_S="$gcc_cv_prog_LN_S"
1523 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1524   echo "$ac_t""yes" 1>&6
1525 else
1526   if test "$gcc_cv_prog_LN_S" = "ln"; then
1527     echo "$ac_t""no, using ln" 1>&6
1528   else
1529     echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1530   fi
1531 fi
1532
1533 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1534 echo "configure:1535: checking for volatile" >&5
1535 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1536   echo $ac_n "(cached) $ac_c" 1>&6
1537 else
1538   cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1541
1542 int main() {
1543 volatile int foo;
1544 ; return 0; }
1545 EOF
1546 if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1547   rm -rf conftest*
1548   gcc_cv_c_volatile=yes
1549 else
1550   echo "configure: failed program was:" >&5
1551   cat conftest.$ac_ext >&5
1552   rm -rf conftest*
1553   gcc_cv_c_volatile=no
1554 fi
1555 rm -f conftest*
1556 fi
1557
1558 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1559 if test $gcc_cv_c_volatile = yes ; then
1560   cat >> confdefs.h <<\EOF
1561 #define HAVE_VOLATILE 1
1562 EOF
1563
1564 fi
1565
1566 # Extract the first word of "ranlib", so it can be a program name with args.
1567 set dummy ranlib; ac_word=$2
1568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1569 echo "configure:1570: checking for $ac_word" >&5
1570 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1571   echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573   if test -n "$RANLIB"; then
1574   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1575 else
1576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1577   ac_dummy="$PATH"
1578   for ac_dir in $ac_dummy; do
1579     test -z "$ac_dir" && ac_dir=.
1580     if test -f $ac_dir/$ac_word; then
1581       ac_cv_prog_RANLIB="ranlib"
1582       break
1583     fi
1584   done
1585   IFS="$ac_save_ifs"
1586   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1587 fi
1588 fi
1589 RANLIB="$ac_cv_prog_RANLIB"
1590 if test -n "$RANLIB"; then
1591   echo "$ac_t""$RANLIB" 1>&6
1592 else
1593   echo "$ac_t""no" 1>&6
1594 fi
1595
1596 for ac_prog in 'bison -y' byacc
1597 do
1598 # Extract the first word of "$ac_prog", so it can be a program name with args.
1599 set dummy $ac_prog; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1603   echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605   if test -n "$YACC"; then
1606   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1607 else
1608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1609   ac_dummy="$PATH"
1610   for ac_dir in $ac_dummy; do
1611     test -z "$ac_dir" && ac_dir=.
1612     if test -f $ac_dir/$ac_word; then
1613       ac_cv_prog_YACC="$ac_prog"
1614       break
1615     fi
1616   done
1617   IFS="$ac_save_ifs"
1618 fi
1619 fi
1620 YACC="$ac_cv_prog_YACC"
1621 if test -n "$YACC"; then
1622   echo "$ac_t""$YACC" 1>&6
1623 else
1624   echo "$ac_t""no" 1>&6
1625 fi
1626
1627 test -n "$YACC" && break
1628 done
1629 test -n "$YACC" || YACC="yacc"
1630
1631 # Find a good install program.  We prefer a C program (faster),
1632 # so one script is as good as another.  But avoid the broken or
1633 # incompatible versions:
1634 # SysV /etc/install, /usr/sbin/install
1635 # SunOS /usr/etc/install
1636 # IRIX /sbin/install
1637 # AIX /bin/install
1638 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1639 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1640 # ./install, which can be erroneously created by make from ./install.sh.
1641 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1642 echo "configure:1643: checking for a BSD compatible install" >&5
1643 if test -z "$INSTALL"; then
1644 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1645   echo $ac_n "(cached) $ac_c" 1>&6
1646 else
1647     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1648   for ac_dir in $PATH; do
1649     # Account for people who put trailing slashes in PATH elements.
1650     case "$ac_dir/" in
1651     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1652     *)
1653       # OSF1 and SCO ODT 3.0 have their own names for install.
1654       for ac_prog in ginstall scoinst install; do
1655         if test -f $ac_dir/$ac_prog; then
1656           if test $ac_prog = install &&
1657             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1658             # AIX install.  It has an incompatible calling convention.
1659             # OSF/1 installbsd also uses dspmsg, but is usable.
1660             :
1661           else
1662             ac_cv_path_install="$ac_dir/$ac_prog -c"
1663             break 2
1664           fi
1665         fi
1666       done
1667       ;;
1668     esac
1669   done
1670   IFS="$ac_save_IFS"
1671
1672 fi
1673   if test "${ac_cv_path_install+set}" = set; then
1674     INSTALL="$ac_cv_path_install"
1675   else
1676     # As a last resort, use the slow shell script.  We don't cache a
1677     # path for INSTALL within a source directory, because that will
1678     # break other packages using the cache if that directory is
1679     # removed, or if the path is relative.
1680     INSTALL="$ac_install_sh"
1681   fi
1682 fi
1683 echo "$ac_t""$INSTALL" 1>&6
1684
1685 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1686 # It thinks the first close brace ends the variable substitution.
1687 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1688
1689 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1690
1691
1692 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1693 echo "configure:1694: checking how to run the C preprocessor" >&5
1694 # On Suns, sometimes $CPP names a directory.
1695 if test -n "$CPP" && test -d "$CPP"; then
1696   CPP=
1697 fi
1698 if test -z "$CPP"; then
1699 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1700   echo $ac_n "(cached) $ac_c" 1>&6
1701 else
1702     # This must be in double quotes, not single quotes, because CPP may get
1703   # substituted into the Makefile and "${CC-cc}" will confuse make.
1704   CPP="${CC-cc} -E"
1705   # On the NeXT, cc -E runs the code through the compiler's parser,
1706   # not just through cpp.
1707   cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 #include <assert.h>
1711 Syntax Error
1712 EOF
1713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1714 { (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1716 if test -z "$ac_err"; then
1717   :
1718 else
1719   echo "$ac_err" >&5
1720   echo "configure: failed program was:" >&5
1721   cat conftest.$ac_ext >&5
1722   rm -rf conftest*
1723   CPP="${CC-cc} -E -traditional-cpp"
1724   cat > conftest.$ac_ext <<EOF
1725 #line 1726 "configure"
1726 #include "confdefs.h"
1727 #include <assert.h>
1728 Syntax Error
1729 EOF
1730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1731 { (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1733 if test -z "$ac_err"; then
1734   :
1735 else
1736   echo "$ac_err" >&5
1737   echo "configure: failed program was:" >&5
1738   cat conftest.$ac_ext >&5
1739   rm -rf conftest*
1740   CPP="${CC-cc} -nologo -E"
1741   cat > conftest.$ac_ext <<EOF
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744 #include <assert.h>
1745 Syntax Error
1746 EOF
1747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1748 { (eval echo configure:1749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1750 if test -z "$ac_err"; then
1751   :
1752 else
1753   echo "$ac_err" >&5
1754   echo "configure: failed program was:" >&5
1755   cat conftest.$ac_ext >&5
1756   rm -rf conftest*
1757   CPP=/lib/cpp
1758 fi
1759 rm -f conftest*
1760 fi
1761 rm -f conftest*
1762 fi
1763 rm -f conftest*
1764   ac_cv_prog_CPP="$CPP"
1765 fi
1766   CPP="$ac_cv_prog_CPP"
1767 else
1768   ac_cv_prog_CPP="$CPP"
1769 fi
1770 echo "$ac_t""$CPP" 1>&6
1771
1772 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1773 echo "configure:1774: checking for ANSI C header files" >&5
1774 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include <stdlib.h>
1781 #include <stdarg.h>
1782 #include <string.h>
1783 #include <float.h>
1784 EOF
1785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1786 { (eval echo configure:1787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1788 if test -z "$ac_err"; then
1789   rm -rf conftest*
1790   ac_cv_header_stdc=yes
1791 else
1792   echo "$ac_err" >&5
1793   echo "configure: failed program was:" >&5
1794   cat conftest.$ac_ext >&5
1795   rm -rf conftest*
1796   ac_cv_header_stdc=no
1797 fi
1798 rm -f conftest*
1799
1800 if test $ac_cv_header_stdc = yes; then
1801   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1802 cat > conftest.$ac_ext <<EOF
1803 #line 1804 "configure"
1804 #include "confdefs.h"
1805 #include <string.h>
1806 EOF
1807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1808   egrep "memchr" >/dev/null 2>&1; then
1809   :
1810 else
1811   rm -rf conftest*
1812   ac_cv_header_stdc=no
1813 fi
1814 rm -f conftest*
1815
1816 fi
1817
1818 if test $ac_cv_header_stdc = yes; then
1819   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1820 cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1823 #include <stdlib.h>
1824 EOF
1825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1826   egrep "free" >/dev/null 2>&1; then
1827   :
1828 else
1829   rm -rf conftest*
1830   ac_cv_header_stdc=no
1831 fi
1832 rm -f conftest*
1833
1834 fi
1835
1836 if test $ac_cv_header_stdc = yes; then
1837   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1838 if test "$cross_compiling" = yes; then
1839   :
1840 else
1841   cat > conftest.$ac_ext <<EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1844 #include <ctype.h>
1845 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1846 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1847 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1848 int main () { int i; for (i = 0; i < 256; i++)
1849 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1850 exit (0); }
1851
1852 EOF
1853 if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1854 then
1855   :
1856 else
1857   echo "configure: failed program was:" >&5
1858   cat conftest.$ac_ext >&5
1859   rm -fr conftest*
1860   ac_cv_header_stdc=no
1861 fi
1862 rm -fr conftest*
1863 fi
1864
1865 fi
1866 fi
1867
1868 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1869 if test $ac_cv_header_stdc = yes; then
1870   cat >> confdefs.h <<\EOF
1871 #define STDC_HEADERS 1
1872 EOF
1873
1874 fi
1875
1876 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1877 echo "configure:1878: checking whether time.h and sys/time.h may both be included" >&5
1878 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1879   echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881   cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884 #include <sys/types.h>
1885 #include <sys/time.h>
1886 #include <time.h>
1887 int main() {
1888 struct tm *tp;
1889 ; return 0; }
1890 EOF
1891 if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1892   rm -rf conftest*
1893   ac_cv_header_time=yes
1894 else
1895   echo "configure: failed program was:" >&5
1896   cat conftest.$ac_ext >&5
1897   rm -rf conftest*
1898   ac_cv_header_time=no
1899 fi
1900 rm -f conftest*
1901 fi
1902
1903 echo "$ac_t""$ac_cv_header_time" 1>&6
1904 if test $ac_cv_header_time = yes; then
1905   cat >> confdefs.h <<\EOF
1906 #define TIME_WITH_SYS_TIME 1
1907 EOF
1908
1909 fi
1910
1911 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
1912 echo "configure:1913: checking whether string.h and strings.h may both be included" >&5
1913 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
1914   echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916   cat > conftest.$ac_ext <<EOF
1917 #line 1918 "configure"
1918 #include "confdefs.h"
1919 #include <string.h>
1920 #include <strings.h>
1921 int main() {
1922
1923 ; return 0; }
1924 EOF
1925 if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1926   rm -rf conftest*
1927   gcc_cv_header_string=yes
1928 else
1929   echo "configure: failed program was:" >&5
1930   cat conftest.$ac_ext >&5
1931   rm -rf conftest*
1932   gcc_cv_header_string=no
1933 fi
1934 rm -f conftest*
1935 fi
1936
1937 echo "$ac_t""$gcc_cv_header_string" 1>&6
1938 if test $gcc_cv_header_string = yes; then
1939   cat >> confdefs.h <<\EOF
1940 #define STRING_WITH_STRINGS 1
1941 EOF
1942
1943 fi
1944
1945 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1946 echo "configure:1947: checking for sys/wait.h that is POSIX.1 compatible" >&5
1947 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1948   echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950   cat > conftest.$ac_ext <<EOF
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953 #include <sys/types.h>
1954 #include <sys/wait.h>
1955 #ifndef WEXITSTATUS
1956 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1957 #endif
1958 #ifndef WIFEXITED
1959 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1960 #endif
1961 int main() {
1962 int s;
1963 wait (&s);
1964 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1965 ; return 0; }
1966 EOF
1967 if { (eval echo configure:1968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1968   rm -rf conftest*
1969   ac_cv_header_sys_wait_h=yes
1970 else
1971   echo "configure: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   rm -rf conftest*
1974   ac_cv_header_sys_wait_h=no
1975 fi
1976 rm -f conftest*
1977 fi
1978
1979 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1980 if test $ac_cv_header_sys_wait_h = yes; then
1981   cat >> confdefs.h <<\EOF
1982 #define HAVE_SYS_WAIT_H 1
1983 EOF
1984
1985 fi
1986
1987 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
1988                  fcntl.h unistd.h stab.h sys/file.h sys/time.h \
1989                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
1990                  direct.h malloc.h
1991 do
1992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1994 echo "configure:1995: checking for $ac_hdr" >&5
1995 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1996   echo $ac_n "(cached) $ac_c" 1>&6
1997 else
1998   cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 #include <$ac_hdr>
2002 EOF
2003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2004 { (eval echo configure:2005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2006 if test -z "$ac_err"; then
2007   rm -rf conftest*
2008   eval "ac_cv_header_$ac_safe=yes"
2009 else
2010   echo "$ac_err" >&5
2011   echo "configure: failed program was:" >&5
2012   cat conftest.$ac_ext >&5
2013   rm -rf conftest*
2014   eval "ac_cv_header_$ac_safe=no"
2015 fi
2016 rm -f conftest*
2017 fi
2018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2019   echo "$ac_t""yes" 1>&6
2020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2021   cat >> confdefs.h <<EOF
2022 #define $ac_tr_hdr 1
2023 EOF
2024  
2025 else
2026   echo "$ac_t""no" 1>&6
2027 fi
2028 done
2029
2030
2031 # Check for thread headers.
2032 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2033 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2034 echo "configure:2035: checking for thread.h" >&5
2035 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 #include <thread.h>
2042 EOF
2043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2044 { (eval echo configure:2045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2046 if test -z "$ac_err"; then
2047   rm -rf conftest*
2048   eval "ac_cv_header_$ac_safe=yes"
2049 else
2050   echo "$ac_err" >&5
2051   echo "configure: failed program was:" >&5
2052   cat conftest.$ac_ext >&5
2053   rm -rf conftest*
2054   eval "ac_cv_header_$ac_safe=no"
2055 fi
2056 rm -f conftest*
2057 fi
2058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2059   echo "$ac_t""yes" 1>&6
2060   have_thread_h=yes
2061 else
2062   echo "$ac_t""no" 1>&6
2063 have_thread_h=
2064 fi
2065
2066 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2067 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2068 echo "configure:2069: checking for pthread.h" >&5
2069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 #include <pthread.h>
2076 EOF
2077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2078 { (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2080 if test -z "$ac_err"; then
2081   rm -rf conftest*
2082   eval "ac_cv_header_$ac_safe=yes"
2083 else
2084   echo "$ac_err" >&5
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   eval "ac_cv_header_$ac_safe=no"
2089 fi
2090 rm -f conftest*
2091 fi
2092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2093   echo "$ac_t""yes" 1>&6
2094   have_pthread_h=yes
2095 else
2096   echo "$ac_t""no" 1>&6
2097 have_pthread_h=
2098 fi
2099
2100
2101 # See if GNAT has been installed
2102 # Extract the first word of "gnatbind", so it can be a program name with args.
2103 set dummy gnatbind; ac_word=$2
2104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2105 echo "configure:2106: checking for $ac_word" >&5
2106 if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
2107   echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109   if test -n "$gnat"; then
2110   ac_cv_prog_gnat="$gnat" # Let the user override the test.
2111 else
2112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2113   ac_dummy="$PATH"
2114   for ac_dir in $ac_dummy; do
2115     test -z "$ac_dir" && ac_dir=.
2116     if test -f $ac_dir/$ac_word; then
2117       ac_cv_prog_gnat="yes"
2118       break
2119     fi
2120   done
2121   IFS="$ac_save_ifs"
2122   test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
2123 fi
2124 fi
2125 gnat="$ac_cv_prog_gnat"
2126 if test -n "$gnat"; then
2127   echo "$ac_t""$gnat" 1>&6
2128 else
2129   echo "$ac_t""no" 1>&6
2130 fi
2131
2132
2133 # See if the stage1 system preprocessor understands the ANSI C
2134 # preprocessor stringification operator.
2135
2136
2137 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
2138 echo "configure:2139: checking for preprocessor stringizing operator" >&5
2139 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
2140   echo $ac_n "(cached) $ac_c" 1>&6
2141 else
2142   cat > conftest.$ac_ext <<EOF
2143 #line 2144 "configure"
2144 #include "confdefs.h"
2145
2146 #define x(y) #y
2147
2148 char *s = x(teststring);
2149
2150 EOF
2151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2152   egrep "#teststring" >/dev/null 2>&1; then
2153   rm -rf conftest*
2154   ac_cv_c_stringize=no
2155 else
2156   rm -rf conftest*
2157   ac_cv_c_stringize=yes
2158 fi
2159 rm -f conftest*
2160
2161 fi
2162
2163 if test "${ac_cv_c_stringize}" = yes
2164 then
2165         cat >> confdefs.h <<\EOF
2166 #define HAVE_STRINGIZE 1
2167 EOF
2168
2169 fi
2170 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2171
2172
2173 # Use <inttypes.h> only if it exists,
2174 # doesn't clash with <sys/types.h>, and declares intmax_t.
2175 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2176 echo "configure:2177: checking for inttypes.h" >&5
2177 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2178   echo $ac_n "(cached) $ac_c" 1>&6
2179 else
2180   cat > conftest.$ac_ext <<EOF
2181 #line 2182 "configure"
2182 #include "confdefs.h"
2183 #include <sys/types.h>
2184 #include <inttypes.h>
2185 int main() {
2186 intmax_t i = -1;
2187 ; return 0; }
2188 EOF
2189 if { (eval echo configure:2190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2190   rm -rf conftest*
2191   gcc_cv_header_inttypes_h=yes
2192 else
2193   echo "configure: failed program was:" >&5
2194   cat conftest.$ac_ext >&5
2195   rm -rf conftest*
2196   gcc_cv_header_inttypes_h=no
2197 fi
2198 rm -f conftest*
2199 fi
2200
2201 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2202 if test $gcc_cv_header_inttypes_h = yes; then
2203   cat >> confdefs.h <<\EOF
2204 #define HAVE_INTTYPES_H 1
2205 EOF
2206
2207 fi
2208
2209 #
2210 # Determine if enumerated bitfields are unsigned.   ISO C says they can 
2211 # be either signed or unsigned.
2212 #
2213 echo $ac_n "checking for unsigned enumerated bitfields""... $ac_c" 1>&6
2214 echo "configure:2215: checking for unsigned enumerated bitfields" >&5
2215 if eval "test \"`echo '$''{'gcc_cv_enum_bf_unsigned'+set}'`\" = set"; then
2216   echo $ac_n "(cached) $ac_c" 1>&6
2217 else
2218   if test "$cross_compiling" = yes; then
2219   gcc_cv_enum_bf_unsigned=yes
2220 else
2221   cat > conftest.$ac_ext <<EOF
2222 #line 2223 "configure"
2223 #include "confdefs.h"
2224 #include <stdlib.h>
2225 enum t { BLAH = 128 } ;
2226 struct s_t { enum t member : 8; } s ;
2227 int main(void)
2228 {            
2229         s.member = BLAH;
2230         if (s.member < 0) exit(1);
2231         exit(0);
2232
2233 }
2234 EOF
2235 if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2236 then
2237   gcc_cv_enum_bf_unsigned=yes
2238 else
2239   echo "configure: failed program was:" >&5
2240   cat conftest.$ac_ext >&5
2241   rm -fr conftest*
2242   gcc_cv_enum_bf_unsigned=no
2243 fi
2244 rm -fr conftest*
2245 fi
2246
2247 fi
2248
2249 echo "$ac_t""$gcc_cv_enum_bf_unsigned" 1>&6
2250 if test $gcc_cv_enum_bf_unsigned = yes; then
2251   cat >> confdefs.h <<\EOF
2252 #define ENUM_BITFIELDS_ARE_UNSIGNED 1
2253 EOF
2254
2255 fi
2256
2257 for ac_func in strtoul bsearch putenv popen bcopy bzero bcmp \
2258         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
2259         sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2260         fputs_unlocked getrusage valloc
2261 do
2262 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2263 echo "configure:2264: checking for $ac_func" >&5
2264 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   cat > conftest.$ac_ext <<EOF
2268 #line 2269 "configure"
2269 #include "confdefs.h"
2270 /* System header to define __stub macros and hopefully few prototypes,
2271     which can conflict with char $ac_func(); below.  */
2272 #include <assert.h>
2273 /* Override any gcc2 internal prototype to avoid an error.  */
2274 /* We use char because int might match the return type of a gcc2
2275     builtin and then its argument prototype would still apply.  */
2276 char $ac_func();
2277
2278 int main() {
2279
2280 /* The GNU C library defines this for functions which it implements
2281     to always fail with ENOSYS.  Some functions are actually named
2282     something starting with __ and the normal name is an alias.  */
2283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2284 choke me
2285 #else
2286 $ac_func();
2287 #endif
2288
2289 ; return 0; }
2290 EOF
2291 if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2292   rm -rf conftest*
2293   eval "ac_cv_func_$ac_func=yes"
2294 else
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   eval "ac_cv_func_$ac_func=no"
2299 fi
2300 rm -f conftest*
2301 fi
2302
2303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2304   echo "$ac_t""yes" 1>&6
2305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2306   cat >> confdefs.h <<EOF
2307 #define $ac_tr_func 1
2308 EOF
2309  
2310 else
2311   echo "$ac_t""no" 1>&6
2312 fi
2313 done
2314
2315
2316 # Make sure wchar_t is available
2317 #AC_CHECK_TYPE(wchar_t, unsigned int)
2318
2319 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2320 echo "configure:2321: checking for vprintf" >&5
2321 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2322   echo $ac_n "(cached) $ac_c" 1>&6
2323 else
2324   cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 /* System header to define __stub macros and hopefully few prototypes,
2328     which can conflict with char vprintf(); below.  */
2329 #include <assert.h>
2330 /* Override any gcc2 internal prototype to avoid an error.  */
2331 /* We use char because int might match the return type of a gcc2
2332     builtin and then its argument prototype would still apply.  */
2333 char vprintf();
2334
2335 int main() {
2336
2337 /* The GNU C library defines this for functions which it implements
2338     to always fail with ENOSYS.  Some functions are actually named
2339     something starting with __ and the normal name is an alias.  */
2340 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2341 choke me
2342 #else
2343 vprintf();
2344 #endif
2345
2346 ; return 0; }
2347 EOF
2348 if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2349   rm -rf conftest*
2350   eval "ac_cv_func_vprintf=yes"
2351 else
2352   echo "configure: failed program was:" >&5
2353   cat conftest.$ac_ext >&5
2354   rm -rf conftest*
2355   eval "ac_cv_func_vprintf=no"
2356 fi
2357 rm -f conftest*
2358 fi
2359
2360 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2361   echo "$ac_t""yes" 1>&6
2362   cat >> confdefs.h <<\EOF
2363 #define HAVE_VPRINTF 1
2364 EOF
2365
2366 else
2367   echo "$ac_t""no" 1>&6
2368 fi
2369
2370 if test "$ac_cv_func_vprintf" != yes; then
2371 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2372 echo "configure:2373: checking for _doprnt" >&5
2373 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 /* System header to define __stub macros and hopefully few prototypes,
2380     which can conflict with char _doprnt(); below.  */
2381 #include <assert.h>
2382 /* Override any gcc2 internal prototype to avoid an error.  */
2383 /* We use char because int might match the return type of a gcc2
2384     builtin and then its argument prototype would still apply.  */
2385 char _doprnt();
2386
2387 int main() {
2388
2389 /* The GNU C library defines this for functions which it implements
2390     to always fail with ENOSYS.  Some functions are actually named
2391     something starting with __ and the normal name is an alias.  */
2392 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2393 choke me
2394 #else
2395 _doprnt();
2396 #endif
2397
2398 ; return 0; }
2399 EOF
2400 if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2401   rm -rf conftest*
2402   eval "ac_cv_func__doprnt=yes"
2403 else
2404   echo "configure: failed program was:" >&5
2405   cat conftest.$ac_ext >&5
2406   rm -rf conftest*
2407   eval "ac_cv_func__doprnt=no"
2408 fi
2409 rm -f conftest*
2410 fi
2411
2412 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2413   echo "$ac_t""yes" 1>&6
2414   cat >> confdefs.h <<\EOF
2415 #define HAVE_DOPRNT 1
2416 EOF
2417
2418 else
2419   echo "$ac_t""no" 1>&6
2420 fi
2421
2422 fi
2423
2424 vfprintf=
2425 doprint=
2426 if test $ac_cv_func_vprintf != yes ; then
2427   vfprintf=vfprintf.o
2428   if test $ac_cv_func__doprnt != yes ; then
2429     doprint=doprint.o
2430   fi
2431 fi
2432
2433
2434
2435 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
2436 echo "configure:2437: checking whether the printf functions support %p" >&5
2437 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   if test "$cross_compiling" = yes; then
2441   gcc_cv_func_printf_ptr=no
2442 else
2443   cat > conftest.$ac_ext <<EOF
2444 #line 2445 "configure"
2445 #include "confdefs.h"
2446 #include <stdio.h>
2447
2448 int main()
2449 {
2450   char buf[64];
2451   char *p = buf, *q = NULL;
2452   sprintf(buf, "%p", p);
2453   sscanf(buf, "%p", &q);
2454   return (p != q);
2455 }
2456 EOF
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2458 then
2459   gcc_cv_func_printf_ptr=yes
2460 else
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -fr conftest*
2464   gcc_cv_func_printf_ptr=no
2465 fi
2466 rm -fr conftest*
2467 fi
2468
2469 rm -f core core.* *.core
2470 fi
2471
2472 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
2473 if test $gcc_cv_func_printf_ptr = yes ; then
2474   cat >> confdefs.h <<\EOF
2475 #define HAVE_PRINTF_PTR 1
2476 EOF
2477
2478 fi
2479
2480
2481 case "${host}" in
2482 *-*-uwin*)
2483   # Under some versions of uwin, vfork is notoriously buggy and the test 
2484   # can hang configure; on other versions, vfork exists just as a stub.
2485   # FIXME: This should be removed once vfork in uwin's runtime is fixed.
2486   ac_cv_func_vfork_works=no
2487   ;;
2488 esac
2489 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2490 echo "configure:2491: checking for pid_t" >&5
2491 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2492   echo $ac_n "(cached) $ac_c" 1>&6
2493 else
2494   cat > conftest.$ac_ext <<EOF
2495 #line 2496 "configure"
2496 #include "confdefs.h"
2497 #include <sys/types.h>
2498 #if STDC_HEADERS
2499 #include <stdlib.h>
2500 #include <stddef.h>
2501 #endif
2502 EOF
2503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2504   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2505   rm -rf conftest*
2506   ac_cv_type_pid_t=yes
2507 else
2508   rm -rf conftest*
2509   ac_cv_type_pid_t=no
2510 fi
2511 rm -f conftest*
2512
2513 fi
2514 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2515 if test $ac_cv_type_pid_t = no; then
2516   cat >> confdefs.h <<\EOF
2517 #define pid_t int
2518 EOF
2519
2520 fi
2521
2522 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2523 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2524 echo "configure:2525: checking for vfork.h" >&5
2525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   cat > conftest.$ac_ext <<EOF
2529 #line 2530 "configure"
2530 #include "confdefs.h"
2531 #include <vfork.h>
2532 EOF
2533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2534 { (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2536 if test -z "$ac_err"; then
2537   rm -rf conftest*
2538   eval "ac_cv_header_$ac_safe=yes"
2539 else
2540   echo "$ac_err" >&5
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -rf conftest*
2544   eval "ac_cv_header_$ac_safe=no"
2545 fi
2546 rm -f conftest*
2547 fi
2548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2549   echo "$ac_t""yes" 1>&6
2550   cat >> confdefs.h <<\EOF
2551 #define HAVE_VFORK_H 1
2552 EOF
2553
2554 else
2555   echo "$ac_t""no" 1>&6
2556 fi
2557
2558 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2559 echo "configure:2560: checking for working vfork" >&5
2560 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2561   echo $ac_n "(cached) $ac_c" 1>&6
2562 else
2563   if test "$cross_compiling" = yes; then
2564   echo $ac_n "checking for vfork""... $ac_c" 1>&6
2565 echo "configure:2566: checking for vfork" >&5
2566 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2567   echo $ac_n "(cached) $ac_c" 1>&6
2568 else
2569   cat > conftest.$ac_ext <<EOF
2570 #line 2571 "configure"
2571 #include "confdefs.h"
2572 /* System header to define __stub macros and hopefully few prototypes,
2573     which can conflict with char vfork(); below.  */
2574 #include <assert.h>
2575 /* Override any gcc2 internal prototype to avoid an error.  */
2576 /* We use char because int might match the return type of a gcc2
2577     builtin and then its argument prototype would still apply.  */
2578 char vfork();
2579
2580 int main() {
2581
2582 /* The GNU C library defines this for functions which it implements
2583     to always fail with ENOSYS.  Some functions are actually named
2584     something starting with __ and the normal name is an alias.  */
2585 #if defined (__stub_vfork) || defined (__stub___vfork)
2586 choke me
2587 #else
2588 vfork();
2589 #endif
2590
2591 ; return 0; }
2592 EOF
2593 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2594   rm -rf conftest*
2595   eval "ac_cv_func_vfork=yes"
2596 else
2597   echo "configure: failed program was:" >&5
2598   cat conftest.$ac_ext >&5
2599   rm -rf conftest*
2600   eval "ac_cv_func_vfork=no"
2601 fi
2602 rm -f conftest*
2603 fi
2604
2605 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2606   echo "$ac_t""yes" 1>&6
2607   :
2608 else
2609   echo "$ac_t""no" 1>&6
2610 fi
2611
2612 ac_cv_func_vfork_works=$ac_cv_func_vfork
2613 else
2614   cat > conftest.$ac_ext <<EOF
2615 #line 2616 "configure"
2616 #include "confdefs.h"
2617 /* Thanks to Paul Eggert for this test.  */
2618 #include <stdio.h>
2619 #include <sys/types.h>
2620 #include <sys/stat.h>
2621 #ifdef HAVE_UNISTD_H
2622 #include <unistd.h>
2623 #endif
2624 #ifdef HAVE_VFORK_H
2625 #include <vfork.h>
2626 #endif
2627 /* On some sparc systems, changes by the child to local and incoming
2628    argument registers are propagated back to the parent.
2629    The compiler is told about this with #include <vfork.h>,
2630    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2631    Test for this by using a static variable whose address
2632    is put into a register that is clobbered by the vfork.  */
2633 static
2634 #ifdef __cplusplus
2635 sparc_address_test (int arg)
2636 #else
2637 sparc_address_test (arg) int arg;
2638 #endif
2639 {
2640   static pid_t child;
2641   if (!child) {
2642     child = vfork ();
2643     if (child < 0) {
2644       perror ("vfork");
2645       _exit(2);
2646     }
2647     if (!child) {
2648       arg = getpid();
2649       write(-1, "", 0);
2650       _exit (arg);
2651     }
2652   }
2653 }
2654 main() {
2655   pid_t parent = getpid ();
2656   pid_t child;
2657
2658   sparc_address_test ();
2659
2660   child = vfork ();
2661
2662   if (child == 0) {
2663     /* Here is another test for sparc vfork register problems.
2664        This test uses lots of local variables, at least
2665        as many local variables as main has allocated so far
2666        including compiler temporaries.  4 locals are enough for
2667        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2668        A buggy compiler should reuse the register of parent
2669        for one of the local variables, since it will think that
2670        parent can't possibly be used any more in this routine.
2671        Assigning to the local variable will thus munge parent
2672        in the parent process.  */
2673     pid_t
2674       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2675       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2676     /* Convince the compiler that p..p7 are live; otherwise, it might
2677        use the same hardware register for all 8 local variables.  */
2678     if (p != p1 || p != p2 || p != p3 || p != p4
2679         || p != p5 || p != p6 || p != p7)
2680       _exit(1);
2681
2682     /* On some systems (e.g. IRIX 3.3),
2683        vfork doesn't separate parent from child file descriptors.
2684        If the child closes a descriptor before it execs or exits,
2685        this munges the parent's descriptor as well.
2686        Test for this by closing stdout in the child.  */
2687     _exit(close(fileno(stdout)) != 0);
2688   } else {
2689     int status;
2690     struct stat st;
2691
2692     while (wait(&status) != child)
2693       ;
2694     exit(
2695          /* Was there some problem with vforking?  */
2696          child < 0
2697
2698          /* Did the child fail?  (This shouldn't happen.)  */
2699          || status
2700
2701          /* Did the vfork/compiler bug occur?  */
2702          || parent != getpid()
2703
2704          /* Did the file descriptor bug occur?  */
2705          || fstat(fileno(stdout), &st) != 0
2706          );
2707   }
2708 }
2709 EOF
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2711 then
2712   ac_cv_func_vfork_works=yes
2713 else
2714   echo "configure: failed program was:" >&5
2715   cat conftest.$ac_ext >&5
2716   rm -fr conftest*
2717   ac_cv_func_vfork_works=no
2718 fi
2719 rm -fr conftest*
2720 fi
2721
2722 fi
2723
2724 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2725 if test $ac_cv_func_vfork_works = no; then
2726   cat >> confdefs.h <<\EOF
2727 #define vfork fork
2728 EOF
2729
2730 fi
2731
2732 for ac_hdr in unistd.h
2733 do
2734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2736 echo "configure:2737: checking for $ac_hdr" >&5
2737 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2738   echo $ac_n "(cached) $ac_c" 1>&6
2739 else
2740   cat > conftest.$ac_ext <<EOF
2741 #line 2742 "configure"
2742 #include "confdefs.h"
2743 #include <$ac_hdr>
2744 EOF
2745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2746 { (eval echo configure:2747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2748 if test -z "$ac_err"; then
2749   rm -rf conftest*
2750   eval "ac_cv_header_$ac_safe=yes"
2751 else
2752   echo "$ac_err" >&5
2753   echo "configure: failed program was:" >&5
2754   cat conftest.$ac_ext >&5
2755   rm -rf conftest*
2756   eval "ac_cv_header_$ac_safe=no"
2757 fi
2758 rm -f conftest*
2759 fi
2760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2761   echo "$ac_t""yes" 1>&6
2762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2763   cat >> confdefs.h <<EOF
2764 #define $ac_tr_hdr 1
2765 EOF
2766  
2767 else
2768   echo "$ac_t""no" 1>&6
2769 fi
2770 done
2771
2772 for ac_func in getpagesize
2773 do
2774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2775 echo "configure:2776: checking for $ac_func" >&5
2776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 /* System header to define __stub macros and hopefully few prototypes,
2783     which can conflict with char $ac_func(); below.  */
2784 #include <assert.h>
2785 /* Override any gcc2 internal prototype to avoid an error.  */
2786 /* We use char because int might match the return type of a gcc2
2787     builtin and then its argument prototype would still apply.  */
2788 char $ac_func();
2789
2790 int main() {
2791
2792 /* The GNU C library defines this for functions which it implements
2793     to always fail with ENOSYS.  Some functions are actually named
2794     something starting with __ and the normal name is an alias.  */
2795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2796 choke me
2797 #else
2798 $ac_func();
2799 #endif
2800
2801 ; return 0; }
2802 EOF
2803 if { (eval echo configure:2804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2804   rm -rf conftest*
2805   eval "ac_cv_func_$ac_func=yes"
2806 else
2807   echo "configure: failed program was:" >&5
2808   cat conftest.$ac_ext >&5
2809   rm -rf conftest*
2810   eval "ac_cv_func_$ac_func=no"
2811 fi
2812 rm -f conftest*
2813 fi
2814
2815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2816   echo "$ac_t""yes" 1>&6
2817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2818   cat >> confdefs.h <<EOF
2819 #define $ac_tr_func 1
2820 EOF
2821  
2822 else
2823   echo "$ac_t""no" 1>&6
2824 fi
2825 done
2826
2827 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
2828 echo "configure:2829: checking for working mmap from /dev/zero" >&5
2829 if eval "test \"`echo '$''{'ac_cv_func_mmap_anywhere'+set}'`\" = set"; then
2830   echo $ac_n "(cached) $ac_c" 1>&6
2831 else
2832   if test "$cross_compiling" = yes; then
2833   ac_cv_func_mmap_anywhere=no
2834 else
2835   cat > conftest.$ac_ext <<EOF
2836 #line 2837 "configure"
2837 #include "confdefs.h"
2838
2839 /* Test by Richard Henderson and Alexandre Oliva.
2840    Check whether mmap from /dev/zero works. */
2841 #include <sys/types.h>
2842 #include <fcntl.h>
2843 #include <sys/mman.h>
2844
2845 /* This mess was copied from the GNU getpagesize.h.  */
2846 #ifndef HAVE_GETPAGESIZE
2847 # ifdef HAVE_UNISTD_H
2848 #  include <unistd.h>
2849 # endif
2850
2851 /* Assume that all systems that can run configure have sys/param.h.  */
2852 # ifndef HAVE_SYS_PARAM_H
2853 #  define HAVE_SYS_PARAM_H 1
2854 # endif
2855
2856 # ifdef _SC_PAGESIZE
2857 #  define getpagesize() sysconf(_SC_PAGESIZE)
2858 # else /* no _SC_PAGESIZE */
2859 #  ifdef HAVE_SYS_PARAM_H
2860 #   include <sys/param.h>
2861 #   ifdef EXEC_PAGESIZE
2862 #    define getpagesize() EXEC_PAGESIZE
2863 #   else /* no EXEC_PAGESIZE */
2864 #    ifdef NBPG
2865 #     define getpagesize() NBPG * CLSIZE
2866 #     ifndef CLSIZE
2867 #      define CLSIZE 1
2868 #     endif /* no CLSIZE */
2869 #    else /* no NBPG */
2870 #     ifdef NBPC
2871 #      define getpagesize() NBPC
2872 #     else /* no NBPC */
2873 #      ifdef PAGESIZE
2874 #       define getpagesize() PAGESIZE
2875 #      endif /* PAGESIZE */
2876 #     endif /* no NBPC */
2877 #    endif /* no NBPG */
2878 #   endif /* no EXEC_PAGESIZE */
2879 #  else /* no HAVE_SYS_PARAM_H */
2880 #   define getpagesize() 8192   /* punt totally */
2881 #  endif /* no HAVE_SYS_PARAM_H */
2882 # endif /* no _SC_PAGESIZE */
2883
2884 #endif /* no HAVE_GETPAGESIZE */
2885
2886 int main()
2887 {
2888   char *x;
2889   int fd, pg;
2890
2891   fd = open("/dev/zero", O_RDWR);
2892   if (fd < 0)
2893     exit(1);
2894
2895   pg = getpagesize();
2896   x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
2897   if (x == (char *) -1)
2898     exit(2);
2899
2900   *(int *)x += 1;
2901
2902   if (munmap(x, pg) < 0)
2903     exit(3);
2904
2905   exit(0);
2906 }
2907 EOF
2908 if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2909 then
2910   ac_cv_func_mmap_anywhere=yes
2911 else
2912   echo "configure: failed program was:" >&5
2913   cat conftest.$ac_ext >&5
2914   rm -fr conftest*
2915   ac_cv_func_mmap_anywhere=no
2916 fi
2917 rm -fr conftest*
2918 fi
2919
2920 fi
2921
2922 echo "$ac_t""$ac_cv_func_mmap_anywhere" 1>&6
2923 if test $ac_cv_func_mmap_anywhere = yes; then
2924   cat >> confdefs.h <<\EOF
2925 #define HAVE_MMAP_ANYWHERE 1
2926 EOF
2927
2928 fi
2929
2930 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
2931 echo "configure:2932: checking for working mmap of a file" >&5
2932 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
2933   echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935   # Create a file one thousand bytes long.
2936 for i in 1 2 3 4 5 6 7 8 9 0
2937 do for j in 1 2 3 4 5 6 7 8 9 0
2938 do echo $i $j xxxxx
2939 done
2940 done > conftestdata$$
2941
2942 if test "$cross_compiling" = yes; then
2943   ac_cv_func_mmap_file=no
2944 else
2945   cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948
2949 /* Test by Zack Weinberg.  Modified from MMAP_ANYWHERE test by
2950    Richard Henderson and Alexandre Oliva.
2951    Check whether read-only mmap of a plain file works. */
2952 #include <sys/types.h>
2953 #include <sys/stat.h>
2954 #include <fcntl.h>
2955 #include <sys/mman.h>
2956
2957 int main()
2958 {
2959   char *x;
2960   int fd;
2961   struct stat st;
2962
2963   fd = open("conftestdata$$", O_RDONLY);
2964   if (fd < 0)
2965     exit(1);
2966
2967   if (fstat (fd, &st))
2968     exit(2);
2969
2970   x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
2971   if (x == (char *) -1)
2972     exit(3);
2973
2974   if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
2975     exit(4);
2976
2977   if (munmap(x, st.st_size) < 0)
2978     exit(5);
2979
2980   exit(0);
2981 }
2982 EOF
2983 if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2984 then
2985   ac_cv_func_mmap_file=yes
2986 else
2987   echo "configure: failed program was:" >&5
2988   cat conftest.$ac_ext >&5
2989   rm -fr conftest*
2990   ac_cv_func_mmap_file=no
2991 fi
2992 rm -fr conftest*
2993 fi
2994
2995 fi
2996
2997 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
2998 if test $ac_cv_func_mmap_file = yes; then
2999   cat >> confdefs.h <<\EOF
3000 #define HAVE_MMAP_FILE 1
3001 EOF
3002
3003 fi
3004
3005
3006 # We will need to find libiberty.h and ansidecl.h
3007 saved_CFLAGS="$CFLAGS"
3008 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
3009 for ac_func in bcopy bzero bcmp \
3010         index rindex getenv atol sbrk abort atof getcwd getwd \
3011         strsignal putc_unlocked fputs_unlocked strstr environ \
3012         malloc realloc calloc free
3013 do
3014 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
3015 echo "configure:3016: checking whether $ac_func must be declared" >&5
3016 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022
3023 #include "gansidecl.h"
3024 #include "system.h"
3025 int main() {
3026 #ifndef $ac_func
3027 char *(*pfn) = (char *(*)) $ac_func ;
3028 #endif
3029 ; return 0; }
3030 EOF
3031 if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3032   rm -rf conftest*
3033   eval "gcc_cv_decl_needed_$ac_func=no"
3034 else
3035   echo "configure: failed program was:" >&5
3036   cat conftest.$ac_ext >&5
3037   rm -rf conftest*
3038   eval "gcc_cv_decl_needed_$ac_func=yes"
3039 fi
3040 rm -f conftest*
3041 fi
3042
3043 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
3044   echo "$ac_t""yes" 1>&6 ;   ac_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3045   cat >> confdefs.h <<EOF
3046 #define $ac_tr_decl 1
3047 EOF
3048  
3049 else
3050   echo "$ac_t""no" 1>&6 ; :
3051 fi
3052
3053 done
3054 if test x = y ; then
3055   cat >> confdefs.h <<EOF
3056 #define NEED_DECLARATION_BCOPY 1
3057 EOF
3058  cat >> confdefs.h <<EOF
3059 #define NEED_DECLARATION_BZERO 1
3060 EOF
3061  cat >> confdefs.h <<EOF
3062 #define NEED_DECLARATION_BCMP 1
3063 EOF
3064  \
3065         cat >> confdefs.h <<EOF
3066 #define NEED_DECLARATION_INDEX 1
3067 EOF
3068  cat >> confdefs.h <<EOF
3069 #define NEED_DECLARATION_RINDEX 1
3070 EOF
3071  cat >> confdefs.h <<EOF
3072 #define NEED_DECLARATION_GETENV 1
3073 EOF
3074  cat >> confdefs.h <<EOF
3075 #define NEED_DECLARATION_ATOL 1
3076 EOF
3077  cat >> confdefs.h <<EOF
3078 #define NEED_DECLARATION_SBRK 1
3079 EOF
3080  cat >> confdefs.h <<EOF
3081 #define NEED_DECLARATION_ABORT 1
3082 EOF
3083  cat >> confdefs.h <<EOF
3084 #define NEED_DECLARATION_ATOF 1
3085 EOF
3086  cat >> confdefs.h <<EOF
3087 #define NEED_DECLARATION_GETCWD 1
3088 EOF
3089  cat >> confdefs.h <<EOF
3090 #define NEED_DECLARATION_GETWD 1
3091 EOF
3092  \
3093         cat >> confdefs.h <<EOF
3094 #define NEED_DECLARATION_STRSIGNAL 1
3095 EOF
3096  cat >> confdefs.h <<EOF
3097 #define NEED_DECLARATION_PUTC_UNLOCKED 1
3098 EOF
3099  cat >> confdefs.h <<EOF
3100 #define NEED_DECLARATION_FPUTS_UNLOCKED 1
3101 EOF
3102  cat >> confdefs.h <<EOF
3103 #define NEED_DECLARATION_STRSTR 1
3104 EOF
3105  cat >> confdefs.h <<EOF
3106 #define NEED_DECLARATION_ENVIRON 1
3107 EOF
3108  \
3109         cat >> confdefs.h <<EOF
3110 #define NEED_DECLARATION_MALLOC 1
3111 EOF
3112  cat >> confdefs.h <<EOF
3113 #define NEED_DECLARATION_REALLOC 1
3114 EOF
3115  cat >> confdefs.h <<EOF
3116 #define NEED_DECLARATION_CALLOC 1
3117 EOF
3118  cat >> confdefs.h <<EOF
3119 #define NEED_DECLARATION_FREE 1
3120 EOF
3121 fi
3122
3123
3124 for ac_func in getrlimit setrlimit getrusage
3125 do
3126 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
3127 echo "configure:3128: checking whether $ac_func must be declared" >&5
3128 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134
3135 #include "gansidecl.h"
3136 #include "system.h"
3137 #ifdef HAVE_SYS_RESOURCE_H
3138 #include <sys/resource.h>
3139 #endif
3140
3141 int main() {
3142 #ifndef $ac_func
3143 char *(*pfn) = (char *(*)) $ac_func ;
3144 #endif
3145 ; return 0; }
3146 EOF
3147 if { (eval echo configure:3148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3148   rm -rf conftest*
3149   eval "gcc_cv_decl_needed_$ac_func=no"
3150 else
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   eval "gcc_cv_decl_needed_$ac_func=yes"
3155 fi
3156 rm -f conftest*
3157 fi
3158
3159 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
3160   echo "$ac_t""yes" 1>&6 ;   ac_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3161   cat >> confdefs.h <<EOF
3162 #define $ac_tr_decl 1
3163 EOF
3164  
3165 else
3166   echo "$ac_t""no" 1>&6 ; :
3167 fi
3168
3169 done
3170 if test x = y ; then
3171   cat >> confdefs.h <<EOF
3172 #define NEED_DECLARATION_GETRLIMIT 1
3173 EOF
3174  cat >> confdefs.h <<EOF
3175 #define NEED_DECLARATION_SETRLIMIT 1
3176 EOF
3177  cat >> confdefs.h <<EOF
3178 #define NEED_DECLARATION_GETRUSAGE 1
3179 EOF
3180 fi
3181
3182
3183 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
3184 CFLAGS="$saved_CFLAGS"
3185
3186 # mkdir takes a single argument on some systems. 
3187 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
3188 echo "configure:3189: checking if mkdir takes one argument" >&5
3189 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3195
3196 #include <sys/types.h>
3197 #ifdef HAVE_SYS_STAT_H
3198 # include <sys/stat.h>
3199 #endif
3200 #ifdef HAVE_UNISTD_H
3201 # include <unistd.h>
3202 #endif
3203 #ifdef HAVE_DIRECT_H
3204 # include <direct.h>
3205 #endif
3206 int main() {
3207 mkdir ("foo", 0);
3208 ; return 0; }
3209 EOF
3210 if { (eval echo configure:3211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3211   rm -rf conftest*
3212   gcc_cv_mkdir_takes_one_arg=no
3213 else
3214   echo "configure: failed program was:" >&5
3215   cat conftest.$ac_ext >&5
3216   rm -rf conftest*
3217   gcc_cv_mkdir_takes_one_arg=yes
3218 fi
3219 rm -f conftest*
3220 fi
3221
3222 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
3223 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
3224   cat >> confdefs.h <<\EOF
3225 #define MKDIR_TAKES_ONE_ARG 1
3226 EOF
3227
3228 fi
3229
3230
3231 # File extensions
3232 manext='.1'
3233 objext='.o'
3234
3235
3236
3237 build_xm_file=
3238 build_xm_defines=
3239 build_install_headers_dir=install-headers-tar
3240 build_exeext=
3241 host_xm_file=
3242 host_xm_defines=
3243 host_xmake_file=
3244 host_truncate_target=
3245 host_exeext=
3246
3247 # Decode the host machine, then the target machine.
3248 # For the host machine, we save the xm_file variable as host_xm_file;
3249 # then we decode the target machine and forget everything else
3250 # that came from the host machine.
3251 for machine in $build $host $target; do
3252
3253         out_file=
3254         xmake_file=
3255         tmake_file=
3256         extra_headers=
3257         extra_passes=
3258         extra_parts=
3259         extra_programs=
3260         extra_objs=
3261         extra_host_objs=
3262         extra_gcc_objs=
3263         xm_defines=
3264         float_format=
3265         # Set this to force installation and use of collect2.
3266         use_collect2=
3267         # Set this to override the default target model.
3268         target_cpu_default=
3269         # Set this to control how the header file directory is installed.
3270         install_headers_dir=install-headers-tar
3271         # Set this to a non-empty list of args to pass to cpp if the target
3272         # wants its .md file passed through cpp.
3273         md_cppflags=
3274         # Set this if directory names should be truncated to 14 characters.
3275         truncate_target=
3276         # Set this if gdb needs a dir command with `dirname $out_file`
3277         gdb_needs_out_file_path=
3278         # Set this if the build machine requires executables to have a
3279         # file name suffix.
3280         exeext=
3281         # Set this to control which thread package will be used.
3282         thread_file=
3283         # Reinitialize these from the flag values every loop pass, since some
3284         # configure entries modify them.
3285         gas="$gas_flag"
3286         gnu_ld="$gnu_ld_flag"
3287         enable_threads=$enable_threads_flag
3288
3289         # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
3290         # updated in each machine entry.
3291         tm_p_file=
3292         cpu_type=`echo $machine | sed 's/-.*$//'`
3293         case $machine in
3294         alpha*-*-*)
3295                 cpu_type=alpha
3296                 ;;
3297         arm*-*-*)
3298                 cpu_type=arm
3299                 ;;
3300         c*-convex-*)
3301                 cpu_type=convex
3302                 ;;
3303         i[34567]86-*-*)
3304                 cpu_type=i386
3305                 ;;
3306         hppa*-*-*)
3307                 cpu_type=pa
3308                 ;;
3309         m68000-*-*)
3310                 cpu_type=m68k
3311                 ;;
3312         mips*-*-*)
3313                 cpu_type=mips
3314                 ;;
3315         pj*-*-*)
3316                 cpu_type=pj
3317                 ;;
3318         powerpc*-*-*)
3319                 cpu_type=rs6000
3320                 ;;
3321         pyramid-*-*)
3322                 cpu_type=pyr
3323                 ;;
3324         sparc*-*-*)
3325                 cpu_type=sparc
3326                 ;;
3327         esac
3328
3329         tm_file=${cpu_type}/${cpu_type}.h
3330         xm_file=${cpu_type}/xm-${cpu_type}.h
3331         if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
3332         then
3333                 tm_p_file=${cpu_type}/${cpu_type}-protos.h;
3334         fi
3335         # On a.out targets, we need to use collect2.
3336         case $machine in
3337         *-*-*aout*)
3338                 use_collect2=yes
3339                 ;;
3340         esac    
3341
3342         # Common parts for linux-gnu and openbsd systems
3343         case $machine in
3344         *-*-linux-gnu*)
3345                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
3346                 ;;
3347         *-*-openbsd*)
3348                 tm_file=${cpu_type}/openbsd.h
3349                 tmake_file="t-libc-ok t-openbsd"
3350                 # avoid surprises, always provide an xm-openbsd file 
3351                 xm_file=${cpu_type}/xm-openbsd.h
3352                 # don't depend on processor x-fragments as well
3353                 xmake_file=none
3354                 if test x$enable_threads = xyes; then
3355                         thread_file='posix'
3356                         tmake_file="${tmake_file} t-openbsd-thread"
3357                 fi
3358                 ;;
3359         esac
3360
3361         case $machine in
3362         # Support site-specific machine types.
3363         *local*)
3364                 cpu_type=`echo $machine | sed -e 's/-.*//'`
3365                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
3366                 xm_file=${cpu_type}/xm-$rest.h
3367                 tm_file=${cpu_type}/$rest.h
3368                 if test -f $srcdir/config/${cpu_type}/x-$rest; \
3369                 then xmake_file=${cpu_type}/x-$rest; \
3370                 else true; \
3371                 fi
3372                 if test -f $srcdir/config/${cpu_type}/t-$rest; \
3373                 then tmake_file=${cpu_type}/t-$rest; \
3374                 else true; \
3375                 fi
3376                 ;;
3377         1750a-*-*)
3378                 ;;
3379         a29k-*-bsd* | a29k-*-sym1*)
3380                 tm_file="${tm_file} a29k/unix.h"
3381                 xm_defines=USG
3382                 xmake_file=a29k/x-unix
3383                 use_collect2=yes
3384                 ;;
3385         a29k-*-udi | a29k-*-coff)
3386                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
3387                 tmake_file=a29k/t-a29kbare
3388                 ;;
3389         a29k-wrs-vxworks*)
3390                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
3391                 tmake_file=a29k/t-vx29k
3392                 extra_parts="crtbegin.o crtend.o"
3393                 thread_file='vxworks'
3394                 ;;
3395         a29k-*-*)                       # Default a29k environment.
3396                 use_collect2=yes
3397                 ;;
3398         alpha-*-interix)
3399                 tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
3400
3401                 # GAS + IEEE_CONFORMANT+IEEE (no inexact);
3402                 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
3403
3404                 # GAS + IEEE_CONFORMANT
3405                 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
3406
3407                 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
3408                 xmake_file="x-interix alpha/t-pe"
3409                 tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
3410                 if test x$enable_threads = xyes ; then
3411                         thread_file='posix'
3412                 fi
3413                 if test x$stabs = xyes ; then
3414                         tm_file="${tm_file} dbxcoff.h"
3415                 fi
3416                 #prefix='$$INTERIX_ROOT'/usr/contrib
3417                 #local_prefix='$$INTERIX_ROOT'/usr/contrib
3418                 ;;
3419         alpha*-*-linux-gnuecoff*)
3420                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
3421                 target_cpu_default="MASK_GAS"
3422                 tmake_file="alpha/t-alpha alpha/t-ieee"
3423                 gas=no
3424                 xmake_file=none
3425                 gas=yes gnu_ld=yes
3426                 ;;
3427         alpha*-*-linux-gnulibc1*)
3428                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
3429                 target_cpu_default="MASK_GAS"
3430                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-linux alpha/t-crtbe alpha/t-ieee"
3431                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3432                 xmake_file=none
3433                 gas=yes gnu_ld=yes
3434                 if test x$enable_threads = xyes; then
3435                         thread_file='posix'
3436                 fi
3437                 ;;
3438         alpha*-*-linux-gnu*)
3439                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
3440                 target_cpu_default="MASK_GAS"
3441                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
3442                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3443                 xmake_file=none
3444                 gas=yes gnu_ld=yes
3445                 if test x$enable_threads = xyes; then
3446                         thread_file='posix'
3447                 fi
3448                 ;;
3449         alpha*-*-netbsd*)
3450                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
3451                 target_cpu_default="MASK_GAS"
3452                 tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
3453                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3454                 xmake_file=none
3455                 gas=yes gnu_ld=yes
3456                 ;;
3457
3458         alpha*-*-openbsd*)
3459                 # default x-alpha is only appropriate for dec-osf.
3460                 target_cpu_default="MASK_GAS"
3461                 tmake_file="alpha/t-alpha alpha/t-ieee"
3462                 ;;
3463                 
3464         alpha*-dec-osf*)
3465                 if test x$stabs = xyes
3466                 then
3467                         tm_file="${tm_file} dbx.h"
3468                 fi
3469                 if test x$gas != xyes
3470                 then
3471                         extra_passes="mips-tfile mips-tdump"
3472                 fi
3473                 use_collect2=yes
3474                 tmake_file="alpha/t-alpha alpha/t-ieee"
3475                 case $machine in
3476                   *-*-osf1*)
3477                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
3478                     ;;
3479                   *-*-osf[23]*)
3480                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
3481                     ;;
3482                   *-*-osf4*)
3483                     tm_file="${tm_file} alpha/osf.h"
3484                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
3485                     # a broken tar, so we use cpio instead.
3486                     install_headers_dir=install-headers-cpio
3487                     ;;
3488                   *-*-osf5*)
3489                     tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
3490                     ;;
3491                 esac
3492                 case $machine in
3493                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
3494                     target_cpu_default=MASK_SUPPORT_ARCH
3495                     ;;
3496                 esac
3497                 ;;
3498         alpha*-*-vxworks*)
3499                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
3500                 tmake_file="alpha/t-alpha alpha/t-ieee"
3501                 if  x$gas != xyes 
3502                 then
3503                         extra_passes="mips-tfile mips-tdump"
3504                 fi
3505                 use_collect2=yes
3506                 thread_file='vxworks'
3507                 ;;
3508         alpha*-*-winnt*)
3509                 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
3510                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
3511                 tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
3512                 xmake_file=winnt/x-winnt
3513                 extra_host_objs=oldnames.o
3514                 extra_gcc_objs="spawnv.o oldnames.o"
3515                 if test x$gnu_ld != xyes
3516                 then
3517                         extra_programs=ld.exe
3518                 fi
3519                 if test x$enable_threads = xyes; then
3520                         thread_file='win32'
3521                 fi
3522                 ;;
3523         alpha*-dec-vms*)
3524                 tm_file=alpha/vms.h
3525                 xm_file="${xm_file} alpha/xm-vms.h"
3526                 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
3527                 ;;
3528         arc-*-elf*)
3529                 extra_parts="crtinit.o crtfini.o"
3530                 ;;
3531         arm-*-coff* | armel-*-coff*)
3532                 tm_file=arm/coff.h
3533                 tmake_file=arm/t-arm-coff
3534                 ;;
3535         arm-*-vxworks*)
3536                 tm_file=arm/vxarm.h
3537                 tmake_file=arm/t-arm-coff
3538                 thread_file='vxworks'
3539                 ;;
3540         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
3541                 tm_file=arm/riscix1-1.h
3542                 use_collect2=yes
3543                 ;;
3544         arm-*-riscix*)                  # Acorn RISC machine
3545                 if test x$gas = xyes
3546                 then
3547                     tm_file=arm/rix-gas.h
3548                 else
3549                     tm_file=arm/riscix.h
3550                 fi
3551                 xmake_file=arm/x-riscix
3552                 tmake_file=arm/t-riscix
3553                 use_collect2=yes
3554                 ;;
3555         arm-semi-aout | armel-semi-aout)
3556                 tm_file=arm/semi.h
3557                 tmake_file=arm/t-semi
3558                 ;;
3559         arm-semi-aof | armel-semi-aof)
3560                 tm_file=arm/semiaof.h
3561                 tmake_file=arm/t-semiaof
3562                 ;;
3563         arm*-*-netbsd*)
3564                 tm_file=arm/netbsd.h
3565                 tmake_file="t-netbsd arm/t-netbsd"
3566                 use_collect2=yes
3567                 ;;
3568         arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
3569                 cpu_type=arm
3570                 xmake_file=x-linux
3571                 tm_file=arm/linux-aout.h
3572                 tmake_file=arm/t-linux
3573                 gnu_ld=yes
3574                 ;;
3575         arm*-*-linux-gnuoldld*)         # ARM GNU/Linux with old ELF linker
3576                 xm_file=arm/xm-linux.h
3577                 xmake_file=x-linux
3578                 tm_file="arm/linux-oldld.h arm/linux-elf.h"
3579                 case $machine in
3580                 armv2*-*-*)
3581                         tm_file="arm/linux-elf26.h $tm_file"
3582                         ;;
3583                 esac
3584                 tmake_file="t-linux arm/t-linux"
3585                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3586                 gnu_ld=yes
3587                 case x${enable_threads} in
3588                 x | xyes | xpthreads | xposix)
3589                         thread_file='posix'
3590                         ;;
3591                 esac
3592                 ;;
3593         arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
3594                 xm_file=arm/xm-linux.h
3595                 xmake_file=x-linux
3596                 tm_file="arm/linux-elf.h"
3597                 case $machine in
3598                 armv2*-*-*)
3599                         tm_file="arm/linux-elf26.h $tm_file"
3600                         ;;
3601                 esac
3602                 tmake_file="t-linux arm/t-linux"
3603                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3604                 gnu_ld=yes
3605                 case x${enable_threads} in
3606                 x | xyes | xpthreads | xposix)
3607                         thread_file='posix'
3608                         ;;
3609                 esac
3610                 ;;
3611         arm*-*-uclinux*)                # ARM ucLinux
3612                 tm_file=arm/uclinux-elf.h
3613                 tmake_file=arm/t-arm-elf
3614                 ;;
3615         arm*-*-aout)
3616                 tm_file=arm/aout.h
3617                 tmake_file=arm/t-arm-aout
3618                 ;;
3619         arm*-*-ecos-elf)
3620                 tm_file=arm/ecos-elf.h
3621                 tmake_file=arm/t-arm-elf
3622                 ;; 
3623         arm*-*-elf)
3624                 tm_file=arm/unknown-elf.h
3625                 tmake_file=arm/t-arm-elf
3626                 ;;
3627         arm*-*-conix*)
3628                 tm_file=arm/conix-elf.h
3629                 tmake_file=arm/t-arm-elf
3630                 ;;
3631         arm*-*-oabi)
3632                 tm_file=arm/unknown-elf-oabi.h
3633                 tmake_file=arm/t-arm-elf
3634                 ;;
3635         arm-*-pe*)
3636                 tm_file=arm/pe.h
3637                 tmake_file=arm/t-pe
3638                 extra_objs="pe.o"
3639                 ;;
3640         avr-*-*)
3641                 ;;
3642         c1-convex-*)                    # Convex C1
3643                 target_cpu_default=1
3644                 use_collect2=yes
3645                 ;;
3646         c2-convex-*)                    # Convex C2
3647                 target_cpu_default=2
3648                 use_collect2=yes
3649                 ;;
3650         c32-convex-*)
3651                 target_cpu_default=4
3652                 use_collect2=yes
3653                 ;;
3654         c34-convex-*)
3655                 target_cpu_default=8
3656                 use_collect2=yes
3657                 ;;
3658         c38-convex-*)
3659                 target_cpu_default=16           
3660                 use_collect2=yes
3661                 ;;
3662         c4x-*)
3663                 cpu_type=c4x
3664                 tmake_file=c4x/t-c4x
3665                 ;;
3666         clipper-intergraph-clix*)
3667                 tm_file="${tm_file} svr3.h clipper/clix.h"
3668                 xm_file=clipper/xm-clix.h
3669                 xmake_file=clipper/x-clix
3670                 extra_headers=va-clipper.h
3671                 extra_parts="crtbegin.o crtend.o"
3672                 install_headers_dir=install-headers-cpio
3673                 ;;
3674         d30v-*)
3675                 float_format=i64
3676                 ;;
3677         dsp16xx-*)
3678                 ;;
3679         elxsi-elxsi-*)
3680                 use_collect2=yes
3681                 ;;
3682         fr30-*-elf)
3683                 tm_file="fr30/fr30.h"
3684                 tmake_file=fr30/t-fr30
3685                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3686                 ;;
3687 # This hasn't been upgraded to GCC 2.
3688 #       fx80-alliant-*)                 # Alliant FX/80
3689 #               ;;
3690         h8300-*-*)
3691                 float_format=i32
3692                 ;;
3693         hppa*-*-linux*)
3694                 target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
3695                 tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
3696                 tmake_file="t-linux pa/t-linux"
3697                 extra_parts="crtbegin.o crtend.o"
3698                 xmake_file=none
3699                 gas=yes gnu_ld=yes
3700                 if test x$enable_threads = xyes; then
3701                         thread_file='posix'
3702                 fi
3703                 ;;
3704         hppa*-*-openbsd*)
3705                 target_cpu_default="MASK_PA_11"
3706                 tmake_file=pa/t-openbsd
3707                 ;;
3708         hppa1.1-*-pro*)
3709                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
3710                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
3711                 xm_file=pa/xm-papro.h
3712                 tmake_file=pa/t-pro
3713                 ;;
3714         hppa1.1-*-osf*)
3715                 target_cpu_default="MASK_PA_11"
3716                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
3717                 use_collect2=yes
3718                 ;;
3719         hppa1.1-*-rtems*)
3720                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
3721                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
3722                 xm_file=pa/xm-papro.h
3723                 tmake_file=pa/t-pro
3724                 ;;
3725         hppa1.0-*-osf*)
3726                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
3727                 use_collect2=yes
3728                 ;;
3729         hppa1.1-*-bsd*)
3730                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
3731                 target_cpu_default="MASK_PA_11"
3732                 use_collect2=yes
3733                 ;;
3734         hppa1.0-*-bsd*)
3735                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
3736                 use_collect2=yes
3737                 ;;
3738         hppa1.0-*-hpux7*)
3739                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
3740                 xm_file=pa/xm-pahpux.h
3741                 xmake_file=pa/x-pa-hpux
3742                 if test x$gas = xyes
3743                 then
3744                         tm_file="${tm_file} pa/gas.h"
3745                 fi
3746                 install_headers_dir=install-headers-cpio
3747                 use_collect2=yes
3748                 ;;
3749         hppa1.0-*-hpux8.0[0-2]*)
3750                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
3751                 xm_file=pa/xm-pahpux.h
3752                 xmake_file=pa/x-pa-hpux
3753                 if test x$gas = xyes
3754                 then
3755                         tm_file="${tm_file} pa/pa-gas.h"
3756                 else
3757                         tm_file="pa/pa-oldas.h ${tm_file}"
3758                 fi
3759                 install_headers_dir=install-headers-cpio
3760                 use_collect2=yes
3761                 ;;
3762         hppa1.1-*-hpux8.0[0-2]*)
3763                 target_cpu_default="MASK_PA_11"
3764                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
3765                 xm_file=pa/xm-pahpux.h
3766                 xmake_file=pa/x-pa-hpux
3767                 if test x$gas = xyes
3768                 then
3769                         tm_file="${tm_file} pa/pa-gas.h"
3770                 else
3771                         tm_file="pa/pa-oldas.h ${tm_file}"
3772                 fi
3773                 install_headers_dir=install-headers-cpio
3774                 use_collect2=yes
3775                 ;;
3776         hppa1.1-*-hpux8*)
3777                 target_cpu_default="MASK_PA_11"
3778                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
3779                 xm_file=pa/xm-pahpux.h
3780                 xmake_file=pa/x-pa-hpux
3781                 if test x$gas = xyes
3782                 then
3783                         tm_file="${tm_file} pa/pa-gas.h"
3784                 fi
3785                 install_headers_dir=install-headers-cpio
3786                 use_collect2=yes
3787                 ;;
3788         hppa1.0-*-hpux8*)
3789                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
3790                 xm_file=pa/xm-pahpux.h
3791                 xmake_file=pa/x-pa-hpux
3792                 if test x$gas = xyes
3793                 then
3794                         tm_file="${tm_file} pa/pa-gas.h"
3795                 fi
3796                 install_headers_dir=install-headers-cpio
3797                 use_collect2=yes
3798                 ;;
3799         hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
3800                 target_cpu_default="MASK_PA_11"
3801                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
3802                 float_format=i128
3803                 xm_file=pa/xm-pahpux.h
3804                 xmake_file=pa/x-pa-hpux
3805                 tmake_file=pa/t-pa
3806                 if test x$gas = xyes
3807                 then
3808                         tm_file="${tm_file} pa/pa-gas.h"
3809                 fi
3810                 if test x$enable_threads = x; then
3811                     enable_threads=$have_pthread_h
3812                 fi
3813                 if test x$enable_threads = xyes; then
3814                         thread_file='dce'
3815                         tmake_file="${tmake_file} pa/t-dce-thr"
3816                 fi
3817                 install_headers_dir=install-headers-cpio
3818                 use_collect2=yes
3819                 ;;
3820         hppa1.0-*-hpux10*)
3821                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
3822                 float_format=i128
3823                 xm_file=pa/xm-pahpux.h
3824                 xmake_file=pa/x-pa-hpux
3825                 tmake_file=pa/t-pa
3826                 if test x$gas = xyes
3827                 then
3828                         tm_file="${tm_file} pa/pa-gas.h"
3829                 fi
3830                 if test x$enable_threads = x; then
3831                     enable_threads=$have_pthread_h
3832                 fi
3833                 if test x$enable_threads = xyes; then
3834                         thread_file='dce'
3835                         tmake_file="${tmake_file} pa/t-dce-thr"
3836                 fi
3837                 install_headers_dir=install-headers-cpio
3838                 use_collect2=yes
3839                 ;;
3840         hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
3841                 target_cpu_default="MASK_PA_11"
3842                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
3843                 float_format=i128
3844                 xm_file=pa/xm-pahpux.h
3845                 xmake_file=pa/x-pa-hpux
3846                 tmake_file=pa/t-pa
3847                 if test x$gas = xyes
3848                 then
3849                         tm_file="${tm_file} pa/pa-gas.h"
3850                 fi
3851 #               if test x$enable_threads = x; then
3852 #                   enable_threads=$have_pthread_h
3853 #               fi
3854 #               if test x$enable_threads = xyes; then
3855 #                       thread_file='dce'
3856 #                       tmake_file="${tmake_file} pa/t-dce-thr"
3857 #               fi
3858                 install_headers_dir=install-headers-cpio
3859                 use_collect2=yes
3860                 ;;
3861         hppa1.0-*-hpux11*)
3862                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
3863                 float_format=i128
3864                 xm_file=pa/xm-pahpux.h
3865                 xmake_file=pa/x-pa-hpux
3866                 if test x$gas = xyes
3867                 then
3868                         tm_file="${tm_file} pa/pa-gas.h"
3869                 fi
3870 #               if test x$enable_threads = x; then
3871 #                   enable_threads=$have_pthread_h
3872 #               fi
3873 #               if test x$enable_threads = xyes; then
3874 #                       thread_file='dce'
3875 #                       tmake_file="${tmake_file} pa/t-dce-thr"
3876 #               fi
3877                 install_headers_dir=install-headers-cpio
3878                 use_collect2=yes
3879                 ;;
3880         hppa1.1-*-hpux* | hppa2*-*-hpux*)
3881                 target_cpu_default="MASK_PA_11"
3882                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
3883                 xm_file=pa/xm-pahpux.h
3884                 xmake_file=pa/x-pa-hpux
3885                 if test x$gas = xyes
3886                 then
3887                         tm_file="${tm_file} pa/pa-gas.h"
3888                 fi
3889                 install_headers_dir=install-headers-cpio
3890                 use_collect2=yes
3891                 ;;
3892         hppa1.0-*-hpux*)
3893                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
3894                 xm_file=pa/xm-pahpux.h
3895                 xmake_file=pa/x-pa-hpux
3896                 if test x$gas = xyes
3897                 then
3898                         tm_file="${tm_file} pa/pa-gas.h"
3899                 fi
3900                 install_headers_dir=install-headers-cpio
3901                 use_collect2=yes
3902                 ;;
3903         hppa1.1-*-hiux* | hppa2*-*-hiux*)
3904                 target_cpu_default="MASK_PA_11"
3905                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
3906                 xm_file=pa/xm-pahpux.h
3907                 xmake_file=pa/x-pa-hpux
3908                 if test x$gas = xyes
3909                 then
3910                         tm_file="${tm_file} pa/pa-gas.h"
3911                 fi
3912                 install_headers_dir=install-headers-cpio
3913                 use_collect2=yes
3914                 ;;
3915         hppa1.0-*-hiux*)
3916                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
3917                 xm_file=pa/xm-pahpux.h
3918                 xmake_file=pa/x-pa-hpux
3919                 if test x$gas = xyes
3920                 then
3921                         tm_file="${tm_file} pa/pa-gas.h"
3922                 fi
3923                 install_headers_dir=install-headers-cpio
3924                 use_collect2=yes
3925                 ;;
3926         hppa*-*-lites*)
3927                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h"
3928                 target_cpu_default="MASK_PA_11"
3929                 use_collect2=yes
3930                 ;;
3931         hppa*-*-mpeix*)
3932                 tm_file="${tm_file} pa/pa-mpeix.h"
3933                 xm_file=pa/xm-pampeix.h 
3934                 xmake_file=pa/x-pa-mpeix 
3935                 echo "You must use gas. Assuming it is already installed." 
3936                 install_headers_dir=install-headers-tar
3937                 use_collect2=yes 
3938                 ;; 
3939         i370-*-opened*)                  # IBM 360/370/390 Architecture
3940                 xm_file=i370/xm-oe.h
3941                 tm_file=i370/oe.h
3942                 xmake_file=i370/x-oe
3943                 tmake_file=i370/t-oe
3944                 ;;
3945         i370-*-mvs*)
3946                 xm_file=i370/xm-mvs.h
3947                 tm_file=i370/mvs.h
3948                 tmake_file=i370/t-mvs
3949                 ;;
3950         i370-*-linux*)
3951                 xm_file="xm-linux.h i370/xm-linux.h"
3952                 xmake_file=x-linux
3953                 tm_file="i370/linux.h ${tm_file}"
3954                 tmake_file="t-linux i370/t-linux"
3955                 # broken_install=yes
3956                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3957                 # extra_parts="crtbegin.o crtend.o"
3958                 gnu_ld=yes
3959                 gas=yes
3960                 elf=yes
3961                 if test x$enable_threads = xyes; then
3962                         thread_file='posix'
3963                 fi
3964                 ;;
3965         i[34567]86-*-elf*)
3966                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
3967                 tm_file=i386/i386elf.h
3968                 tmake_file=i386/t-i386elf
3969                 xmake_file=x-svr4
3970                 ;;
3971         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
3972                 if test x$gas = xyes
3973                 then
3974                         tm_file=i386/aix386.h
3975                         extra_parts="crtbegin.o crtend.o"
3976                         tmake_file=i386/t-crtstuff
3977                 else
3978                         tm_file=i386/aix386ng.h
3979                         use_collect2=yes
3980                 fi
3981                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
3982                 xm_defines=USG
3983                 xmake_file=i386/x-aix
3984                 ;;
3985         i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
3986                 xm_file="xm-alloca.h ${xm_file}"
3987                 xm_defines="USG POSIX SMALL_ARG_MAX"
3988                 xmake_file=i386/x-ncr3000
3989                 if test x$stabs = xyes -a x$gas = xyes
3990                 then
3991                         tm_file=i386/sysv4gdb.h
3992                 else
3993                         tm_file=i386/sysv4.h
3994                 fi
3995                 extra_parts="crtbegin.o crtend.o"
3996                 tmake_file=i386/t-crtpic
3997                 ;;
3998         i[34567]86-next-*)
3999                 tm_file=i386/next.h
4000                 xm_file=i386/xm-next.h
4001                 tmake_file=i386/t-next
4002                 xmake_file=i386/x-next
4003                 extra_objs=nextstep.o
4004                 extra_parts="crtbegin.o crtend.o"
4005                 if test x$enable_threads = xyes; then
4006                         thread_file='mach'
4007                 fi
4008                 ;;
4009         i[34567]86-sequent-bsd*)                # 80386 from Sequent
4010                 use_collect2=yes
4011                 if test x$gas = xyes
4012                 then
4013                         tm_file=i386/seq-gas.h
4014                 else
4015                         tm_file=i386/sequent.h
4016                 fi
4017                 ;;
4018         i[34567]86-sequent-ptx1*)
4019                 xm_defines="USG SVR3"
4020                 xmake_file=i386/x-sysv3
4021                 tm_file=i386/seq-sysv3.h
4022                 tmake_file=i386/t-crtstuff
4023                 extra_parts="crtbegin.o crtend.o"
4024                 install_headers_dir=install-headers-cpio
4025                 ;;
4026         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
4027                 xm_defines="USG SVR3"
4028                 xmake_file=i386/x-sysv3
4029                 tm_file=i386/seq2-sysv3.h
4030                 tmake_file=i386/t-crtstuff
4031                 extra_parts="crtbegin.o crtend.o"
4032                 install_headers_dir=install-headers-cpio
4033                 ;;
4034         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
4035                 xm_file="xm-alloca.h ${xm_file}"
4036                 xm_defines="USG POSIX SMALL_ARG_MAX"
4037                 xmake_file=x-svr4
4038                 tm_file=i386/ptx4-i.h
4039                 tmake_file=t-svr4
4040                 extra_parts="crtbegin.o crtend.o"
4041                 install_headers_dir=install-headers-cpio
4042                 ;;
4043         i386-sun-sunos*)                # Sun i386 roadrunner
4044                 xm_defines=USG
4045                 tm_file=i386/sun.h
4046                 use_collect2=yes
4047                 ;;
4048         i[34567]86-wrs-vxworks*)
4049                 tm_file=i386/vxi386.h
4050                 tmake_file=i386/t-i386bare
4051                 thread_file='vxworks'
4052                 ;;
4053         i[34567]86-*-aout*)
4054                 tm_file=i386/i386-aout.h
4055                 tmake_file=i386/t-i386bare
4056                 ;;
4057         i[34567]86-*-beospe*)
4058                 xm_file=i386/xm-beos.h
4059                 xm_defines="USE_C_ALLOCA"
4060                 tmake_file=i386/t-beos
4061                 tm_file=i386/beos-pe.h
4062                 xmake_file=i386/x-beos
4063                 extra_objs=winnt.o
4064                 ;;
4065         i[34567]86-*-beoself* | i[34567]86-*-beos*)
4066                 xm_file=i386/xm-beos.h
4067                 tmake_file='i386/t-beos i386/t-crtpic'
4068                 tm_file=i386/beos-elf.h
4069                 xmake_file=i386/x-beos
4070                 extra_objs=winnt.o
4071                 extra_parts='crtbegin.o crtend.o'
4072                 ;;
4073         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
4074                 tm_file=i386/bsd386.h
4075 #               tmake_file=t-libc-ok
4076                 ;;
4077         i[34567]86-*-bsd*)
4078                 tm_file=i386/386bsd.h
4079 #               tmake_file=t-libc-ok
4080 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
4081 #               use_collect2=yes
4082                 ;;
4083         i[34567]86-*-freebsdelf*)
4084                 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
4085                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4086                 tmake_file=t-freebsd
4087                 gas=yes
4088                 gnu_ld=yes
4089                 stabs=yes
4090                 case x${enable_threads} in
4091                 xyes | xpthreads | xposix)
4092                         thread_file='posix'
4093                         tmake_file="${tmake_file} t-freebsd-thread"
4094                         ;;
4095                 esac
4096                 ;;
4097         i[34567]86-*-freebsd*)
4098                 tm_file="i386/freebsd.h i386/perform.h"
4099                 tmake_file=t-freebsd
4100                 ;;
4101         i[34567]86-*-netbsd*)
4102                 tm_file=i386/netbsd.h
4103                 tmake_file=t-netbsd
4104                 use_collect2=yes
4105                 ;;
4106         i[34567]86-*-openbsd*)
4107                 # we need collect2 until our bug is fixed...
4108                 use_collect2=yes
4109                 ;;
4110         i[34567]86-*-coff*)
4111                 tm_file=i386/i386-coff.h
4112                 tmake_file=i386/t-i386bare
4113                 ;;
4114         i[34567]86-*-isc*)              # 80386 running ISC system
4115                 xm_file="${xm_file} i386/xm-isc.h"
4116                 xm_defines="USG SVR3"
4117                 case $machine in
4118                   i[34567]86-*-isc[34]*)
4119                     xmake_file=i386/x-isc3
4120                     ;;
4121                   *)
4122                     xmake_file=i386/x-isc
4123                     ;;
4124                 esac
4125                 if test x$gas = xyes -a x$stabs = xyes
4126                 then
4127                         tm_file=i386/iscdbx.h
4128                         tmake_file=i386/t-svr3dbx
4129                         extra_parts="svr3.ifile svr3z.ifile"
4130                 else
4131                         tm_file=i386/isccoff.h
4132                         tmake_file=i386/t-crtstuff
4133                         extra_parts="crtbegin.o crtend.o"
4134                 fi
4135                 install_headers_dir=install-headers-cpio
4136                 ;;
4137         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
4138                                         # pre BFD linkers
4139                 xmake_file=x-linux-aout
4140                 tmake_file="t-linux-aout i386/t-crtstuff"
4141                 tm_file=i386/linux-oldld.h
4142                 gnu_ld=yes
4143                 float_format=i386
4144                 ;;
4145         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
4146                 xmake_file=x-linux-aout
4147                 tmake_file="t-linux-aout i386/t-crtstuff"
4148                 tm_file=i386/linux-aout.h
4149                 gnu_ld=yes
4150                 float_format=i386
4151                 ;;
4152         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
4153                                         # GNU/Linux C library 5
4154                 xmake_file=x-linux      
4155                 tm_file=i386/linux.h    
4156                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
4157                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4158                 gnu_ld=yes
4159                 float_format=i386
4160                 if test x$enable_threads = xyes; then
4161                         thread_file='single'
4162                 fi
4163                 ;;
4164         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
4165                                         # aka GNU/Linux C library 6
4166                 xmake_file=x-linux
4167                 tm_file=i386/linux.h
4168                 tmake_file="t-linux i386/t-crtstuff"
4169                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4170                 gnu_ld=yes
4171                 float_format=i386
4172                 if test x$enable_threads = xyes; then
4173                         thread_file='posix'
4174                 fi
4175                 ;;
4176         i[34567]86-*-gnu*)
4177                 float_format=i386
4178                 ;;
4179         i[34567]86-go32-msdos | i[34567]86-*-go32*)
4180                 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
4181                 exit 1
4182                 ;;
4183         i[34567]86-pc-msdosdjgpp*)
4184                 xm_file=i386/xm-djgpp.h
4185                 tm_file=i386/djgpp.h
4186                 tmake_file=i386/t-djgpp
4187                 xmake_file=i386/x-djgpp
4188                 gnu_ld=yes
4189                 gas=yes
4190                 exeext=.exe
4191                 case $host in *pc-msdosdjgpp*)
4192                         target_alias=djgpp
4193                         ;;
4194                 esac
4195                 ;;
4196         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
4197                 tm_file=i386/moss.h
4198                 tmake_file=t-libc-ok
4199                 gnu_ld=yes
4200                 gas=yes
4201                 ;;
4202         i[34567]86-*-lynxos*)
4203                 if test x$gas = xyes
4204                 then
4205                         tm_file=i386/lynx.h
4206                 else
4207                         tm_file=i386/lynx-ng.h
4208                 fi
4209                 xm_file=i386/xm-lynx.h
4210                 tmake_file=i386/t-i386bare
4211                 xmake_file=x-lynx
4212                 ;;
4213         i[34567]86-*-mach*)
4214                 tm_file=i386/mach.h
4215 #               tmake_file=t-libc-ok
4216                 use_collect2=yes
4217                 ;;
4218         i[34567]86-*-osfrose*)          # 386 using OSF/rose
4219                 if test x$elf = xyes
4220                 then
4221                         tm_file=i386/osfelf.h
4222                         use_collect2=
4223                 else
4224                         tm_file=i386/osfrose.h
4225                         use_collect2=yes
4226                 fi
4227                 xm_file="i386/xm-osf.h ${xm_file}"
4228                 xmake_file=i386/x-osfrose
4229                 tmake_file=i386/t-osf
4230                 extra_objs=halfpic.o
4231                 ;;
4232         i[34567]86-go32-rtems*)
4233                 cpu_type=i386
4234                 xm_file=i386/xm-go32.h
4235                 tm_file=i386/go32-rtems.h
4236                 tmake_file="i386/t-go32 t-rtems"
4237                 ;;
4238         i[34567]86-*-rtemscoff*)
4239                 cpu_type=i386
4240                 tm_file=i386/rtems.h
4241                 tmake_file="i386/t-i386bare t-rtems"
4242                 ;;
4243         i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
4244                 cpu_type=i386
4245                 tm_file=i386/rtemself.h
4246                 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
4247                 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
4248                 ;;
4249         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
4250                 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
4251                 xm_defines="USG SVR3"
4252                 xmake_file=i386/x-sco5
4253                 install_headers_dir=install-headers-cpio
4254                 tm_file=i386/sco5.h
4255                 if test x$gas = xyes
4256                 then
4257                         tm_file="i386/sco5gas.h ${tm_file}"
4258                         tmake_file=i386/t-sco5gas
4259                 else
4260                         tmake_file=i386/t-sco5
4261                 fi
4262                 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
4263                 ;;
4264         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
4265                 xm_file="${xm_file} i386/xm-sco.h"
4266                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
4267                 xmake_file=i386/x-sco4
4268                 install_headers_dir=install-headers-cpio
4269                 if test x$stabs = xyes
4270                 then
4271                         tm_file=i386/sco4dbx.h
4272                         tmake_file=i386/t-svr3dbx
4273                         extra_parts="svr3.ifile svr3z.rfile"
4274                 else
4275                         tm_file=i386/sco4.h
4276                         tmake_file=i386/t-crtstuff
4277                         extra_parts="crtbegin.o crtend.o"
4278                 fi
4279                 # The default EAFS filesystem supports long file names.
4280                 # Truncating the target makes $host != $target which
4281                 # makes gcc think it is doing a cross-compile.
4282                 # truncate_target=yes
4283                 ;;
4284         i[34567]86-*-sco*)              # 80386 running SCO system
4285                 xm_file=i386/xm-sco.h
4286                 xmake_file=i386/x-sco
4287                 install_headers_dir=install-headers-cpio
4288                 if test x$stabs = xyes
4289                 then
4290                         tm_file=i386/scodbx.h
4291                         tmake_file=i386/t-svr3dbx
4292                         extra_parts="svr3.ifile svr3z.rfile"
4293                 else
4294                         tm_file=i386/sco.h
4295                         extra_parts="crtbegin.o crtend.o"
4296                         tmake_file=i386/t-crtstuff
4297                 fi
4298                 truncate_target=yes
4299                 ;;
4300         i[34567]86-*-solaris2*)
4301                 xm_file="xm-alloca.h ${xm_file}"
4302                 xm_defines="USG POSIX SMALL_ARG_MAX"
4303                 tm_file=i386/sol2.h
4304                 if test x$gas = xyes; then
4305                         # Only needed if gas does not support -s
4306                         tm_file="i386/sol2gas.h ${tm_file}"
4307                 fi
4308                 tmake_file=i386/t-sol2
4309                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
4310                 xmake_file=x-svr4
4311                 if test x${enable_threads} = x; then
4312                     enable_threads=$have_pthread_h
4313                     if test x${enable_threads} = x; then
4314                         enable_threads=$have_thread_h
4315                     fi
4316                 fi
4317                 if test x${enable_threads} = xyes; then
4318                     if test x${have_pthread_h} = xyes; then
4319                         thread_file='posix'
4320                     else
4321                         thread_file='solaris'
4322                     fi
4323                 fi
4324                 ;;
4325        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
4326                xm_file="xm-alloca.h ${xm_file}"
4327                xm_defines="USG POSIX"
4328                tm_file=i386/sysv5.h
4329                if test x$stabs = xyes
4330                then
4331                        tm_file="${tm_file} dbx.h"
4332                fi
4333                tmake_file=i386/t-crtpic
4334                xmake_file=x-svr4
4335                extra_parts="crtbegin.o crtend.o"
4336                if test x$enable_threads = xyes; then
4337                        thread_file='posix'
4338                fi
4339                ;;
4340         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
4341                 xm_file="xm-alloca.h ${xm_file}"
4342                 xm_defines="USG POSIX SMALL_ARG_MAX"
4343                 tm_file=i386/sysv4.h
4344                 if test x$stabs = xyes
4345                 then
4346                         tm_file="${tm_file} dbx.h"
4347                 fi
4348                 tmake_file=i386/t-crtpic
4349                 xmake_file=x-svr4
4350                 extra_parts="crtbegin.o crtend.o"
4351                 ;;
4352         i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
4353                 xm_file="xm-alloca.h ${xm_file}"
4354                 xm_defines="USG POSIX"
4355                 tm_file=i386/udk.h
4356                 tmake_file="i386/t-crtpic i386/t-udk"
4357                 xmake_file=x-svr4
4358                 extra_parts="crtbegin.o crtend.o"
4359                 install_headers_dir=install-headers-cpio
4360                 ;;
4361         i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
4362                 cpu_type=i386
4363                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
4364                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
4365                 if test x$stabs = xyes
4366                 then
4367                         tm_file=i386/osf1elfgdb.h
4368                 else
4369                         tm_file=i386/osf1elf.h
4370                 fi
4371                 tmake_file=i386/t-osf1elf
4372                 xmake_file=i386/x-osf1elf
4373                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
4374                 ;;
4375         i[34567]86-*-sysv*)             # Intel 80386's running system V
4376                 xm_defines="USG SVR3"
4377                 xmake_file=i386/x-sysv3
4378                 if test x$gas = xyes
4379                 then
4380                         if test x$stabs = xyes
4381                         then
4382                                 tm_file=i386/svr3dbx.h
4383                                 tmake_file=i386/t-svr3dbx
4384                                 extra_parts="svr3.ifile svr3z.rfile"
4385                         else
4386                                 tm_file=i386/svr3gas.h
4387                                 extra_parts="crtbegin.o crtend.o"
4388                                 tmake_file=i386/t-crtstuff
4389                         fi
4390                 else
4391                         tm_file=i386/sysv3.h
4392                         extra_parts="crtbegin.o crtend.o"
4393                         tmake_file=i386/t-crtstuff
4394                 fi
4395                 ;;
4396         i386-*-vsta)                    # Intel 80386's running VSTa kernel
4397                 xm_file="${xm_file} i386/xm-vsta.h"
4398                 tm_file=i386/vsta.h
4399                 tmake_file=i386/t-vsta
4400                 xmake_file=i386/x-vsta
4401                 ;;
4402         i[34567]86-*-win32)
4403                 xm_file="${xm_file} i386/xm-cygwin.h"
4404                 tmake_file=i386/t-cygwin
4405                 tm_file=i386/win32.h
4406                 xmake_file=i386/x-cygwin
4407                 extra_objs=winnt.o
4408                 if test x$enable_threads = xyes; then
4409                         thread_file='win32'
4410                 fi
4411                 exeext=.exe
4412                 ;;
4413         i[34567]86-*-pe | i[34567]86-*-cygwin*)
4414                 xm_file="${xm_file} i386/xm-cygwin.h"
4415                 tmake_file=i386/t-cygwin
4416                 tm_file=i386/cygwin.h
4417                 xmake_file=i386/x-cygwin
4418                 extra_objs=winnt.o
4419                 if test x$enable_threads = xyes; then
4420                         thread_file='win32'
4421                 fi
4422                 exeext=.exe
4423                 ;;
4424         i[34567]86-*-mingw32*)
4425                 tm_file=i386/mingw32.h
4426                 xm_file="${xm_file} i386/xm-mingw32.h"
4427                 tmake_file="i386/t-cygwin i386/t-mingw32"
4428                 extra_objs=winnt.o
4429                 xmake_file=i386/x-cygwin
4430                 if test x$enable_threads = xyes; then
4431                         thread_file='win32'
4432                 fi
4433                 exeext=.exe
4434                 case $machine in
4435                         *mingw32msv*)
4436                                 ;;
4437                         *minwg32crt* | *mingw32*)
4438                                 tm_file="${tm_file} i386/crtdll.h"
4439                                 ;;
4440                 esac
4441                 ;;
4442         i[34567]86-*-uwin*)
4443                 tm_file=i386/uwin.h
4444                 xm_file="${xm_file} i386/xm-uwin.h"
4445                 xm_defines="USG NO_STAB_H"
4446                 tmake_file="i386/t-cygwin i386/t-uwin"
4447                 extra_objs=winnt.o
4448                 xmake_file=i386/x-cygwin
4449                 if test x$enable_threads = xyes; then
4450                         thread_file='win32'
4451                 fi
4452                 exeext=.exe
4453                 ;;
4454         i[34567]86-*-interix*)
4455                 tm_file="i386/i386-interix.h interix.h"
4456                 xm_file="i386/xm-i386-interix.h xm-interix.h"
4457                 xm_defines="USG"
4458                 tmake_file="i386/t-interix"
4459                 extra_objs=interix.o
4460                 xmake_file=x-interix
4461                 if test x$enable_threads = xyes ; then
4462                         thread_file='posix'
4463                 fi
4464                 if test x$stabs = xyes ; then
4465                         tm_file="${tm_file} dbxcoff.h"
4466                 fi
4467                 ;;
4468         i[34567]86-*-winnt3*)
4469                 tm_file=i386/win-nt.h
4470                 out_file=i386/i386.c
4471                 xm_file="xm-winnt.h ${xm_file}"
4472                 xmake_file=winnt/x-winnt
4473                 tmake_file=i386/t-winnt
4474                 extra_host_objs="winnt.o oldnames.o"
4475                 extra_gcc_objs="spawnv.o oldnames.o"
4476                 if test x$gnu_ld != xyes
4477                 then
4478                         extra_programs=ld.exe
4479                 fi
4480                 if test x$enable_threads = xyes; then
4481                         thread_file='win32'
4482                 fi
4483                 ;;
4484         i[34567]86-dg-dgux*)
4485                 xm_file="xm-alloca.h ${xm_file}"
4486                 xm_defines="USG POSIX"
4487                 out_file=i386/dgux.c
4488                 tm_file=i386/dgux.h
4489                 tmake_file=i386/t-dgux
4490                 xmake_file=i386/x-dgux
4491                 install_headers_dir=install-headers-cpio
4492               ;;
4493         i860-alliant-*)         # Alliant FX/2800
4494                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
4495                 xm_file="${xm_file}"
4496                 xmake_file=i860/x-fx2800
4497                 tmake_file=i860/t-fx2800
4498                 extra_parts="crtbegin.o crtend.o"
4499                 ;;
4500         i860-*-bsd*)
4501                 tm_file="${tm_file} i860/bsd.h"
4502                 if test x$gas = xyes
4503                 then
4504                         tm_file="${tm_file} i860/bsd-gas.h"
4505                 fi
4506                 use_collect2=yes
4507                 ;;
4508         i860-*-mach*)
4509                 tm_file="${tm_file} i860/mach.h"
4510                 tmake_file=t-libc-ok
4511                 ;;
4512         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
4513                 tm_file="${tm_file} svr3.h i860/paragon.h"
4514                 xm_defines="USG SVR3"
4515                 tmake_file=t-osf
4516                 ;;
4517         i860-*-sysv3*)
4518                 tm_file="${tm_file} svr3.h i860/sysv3.h"
4519                 xm_defines="USG SVR3"
4520                 xmake_file=i860/x-sysv3
4521                 extra_parts="crtbegin.o crtend.o"
4522                 ;;
4523         i860-*-sysv4*)
4524                 tm_file="${tm_file} svr4.h i860/sysv4.h"
4525                 xm_defines="USG SVR3"
4526                 xmake_file=i860/x-sysv4
4527                 tmake_file=t-svr4
4528                 extra_parts="crtbegin.o crtend.o"
4529                 ;;
4530         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
4531                 tm_file="${tm_file} i960/vx960.h"
4532                 tmake_file=i960/t-vxworks960
4533                 use_collect2=yes
4534                 thread_file='vxworks'
4535                 ;;
4536         i960-wrs-vxworks5* | i960-wrs-vxworks)
4537                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
4538                 tmake_file=i960/t-vxworks960
4539                 use_collect2=yes
4540                 thread_file='vxworks'
4541                 ;;
4542         i960-wrs-vxworks*)
4543                 tm_file="${tm_file} i960/vx960.h"
4544                 tmake_file=i960/t-vxworks960
4545                 use_collect2=yes
4546                 thread_file='vxworks'
4547                 ;;
4548         i960-*-coff*)
4549                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
4550                 tmake_file=i960/t-960bare
4551                 use_collect2=yes
4552                 ;;
4553         i960-*-rtems)
4554                 tmake_file="i960/t-960bare t-rtems"
4555                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
4556                 use_collect2=yes
4557                 ;;
4558         i960-*-*)                       # Default i960 environment.
4559                 use_collect2=yes
4560                 ;;
4561         ia64*-*-elf*)
4562                 tm_file=ia64/elf.h
4563                 tmake_file="ia64/t-ia64"
4564                 target_cpu_default="0"
4565                 if test x$gas = xyes
4566                 then
4567                         target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
4568                 fi
4569                 if test x$gnu_ld = xyes
4570                 then
4571                         target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
4572                 fi
4573                 ;;
4574         ia64*-*-linux*)
4575                 tm_file=ia64/linux.h
4576                 tmake_file="t-linux ia64/t-ia64"
4577                 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
4578                 if test x$enable_threads = xyes; then
4579                         thread_file='posix'
4580                 fi
4581                 ;;
4582         m32r-*-elf*)
4583                 extra_parts="crtinit.o crtfini.o"
4584                 ;;
4585         m68000-convergent-sysv*)
4586                 tm_file=m68k/ctix.h
4587                 xm_file="m68k/xm-3b1.h ${xm_file}"
4588                 xm_defines=USG
4589                 use_collect2=yes
4590                 extra_headers=math-68881.h
4591                 ;;
4592         m68000-hp-bsd*)                 # HP 9000/200 running BSD
4593                 tm_file=m68k/hp2bsd.h
4594                 xmake_file=m68k/x-hp2bsd
4595                 use_collect2=yes
4596                 extra_headers=math-68881.h
4597                 ;;
4598         m68000-hp-hpux*)                # HP 9000 series 300
4599                 xm_file="xm-alloca.h ${xm_file}"
4600                 xm_defines="USG"
4601                 if test x$gas = xyes
4602                 then
4603                         xmake_file=m68k/x-hp320g
4604                         tm_file=m68k/hp310g.h
4605                 else
4606                         xmake_file=m68k/x-hp320
4607                         tm_file=m68k/hp310.h
4608                 fi
4609                 install_headers_dir=install-headers-cpio
4610                 use_collect2=yes
4611                 extra_headers=math-68881.h
4612                 ;;
4613         m68000-sun-sunos3*)
4614                 tm_file=m68k/sun2.h
4615                 use_collect2=yes
4616                 extra_headers=math-68881.h
4617                 ;;
4618         m68000-sun-sunos4*)
4619                 tm_file=m68k/sun2o4.h
4620                 use_collect2=yes
4621                 extra_headers=math-68881.h
4622                 ;;
4623         m68000-att-sysv*)
4624                 xm_file="m68k/xm-3b1.h ${xm_file}"
4625                 xm_defines=USG
4626                 if test x$gas = xyes
4627                 then
4628                         tm_file=m68k/3b1g.h
4629                 else
4630                         tm_file=m68k/3b1.h
4631                 fi
4632                 use_collect2=yes
4633                 extra_headers=math-68881.h
4634                 ;;
4635         m68k-apple-aux*)                # Apple Macintosh running A/UX
4636                 xm_defines="USG AUX"
4637                 tmake_file=m68k/t-aux
4638                 install_headers_dir=install-headers-cpio
4639                 extra_headers=math-68881.h
4640                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
4641                 tm_file=
4642                 if test "$gnu_ld" = yes
4643                 then
4644                         tm_file="${tm_file} m68k/auxgld.h"
4645                 else
4646                         tm_file="${tm_file} m68k/auxld.h"
4647                 fi
4648                 if test "$gas" = yes
4649                 then
4650                         tm_file="${tm_file} m68k/auxgas.h"
4651                 else
4652                         tm_file="${tm_file} m68k/auxas.h"
4653                 fi
4654                 tm_file="${tm_file} m68k/a-ux.h"
4655                 float_format=m68k
4656                 ;;
4657         m68k-apollo-*)
4658                 tm_file=m68k/apollo68.h
4659                 xmake_file=m68k/x-apollo68
4660                 use_collect2=yes
4661                 extra_headers=math-68881.h
4662                 float_format=m68k
4663                 ;;
4664         m68k-altos-sysv*)                  # Altos 3068
4665                 if test x$gas = xyes
4666                 then
4667                         tm_file=m68k/altos3068.h
4668                         xm_defines=USG
4669                 else
4670                         echo "The Altos is supported only with the GNU assembler" 1>&2
4671                         exit 1
4672                 fi
4673                 extra_headers=math-68881.h
4674                 ;;
4675         m68k-bull-sysv*)                # Bull DPX/2
4676                 if test x$gas = xyes
4677                 then
4678                         if test x$stabs = xyes
4679                         then
4680                                 tm_file=m68k/dpx2cdbx.h
4681                         else
4682                                 tm_file=m68k/dpx2g.h
4683                         fi
4684                 else
4685                         tm_file=m68k/dpx2.h
4686                 fi
4687                 xm_file="xm-alloca.h ${xm_file}"
4688                 xm_defines=USG
4689                 xmake_file=m68k/x-dpx2
4690                 use_collect2=yes
4691                 extra_headers=math-68881.h
4692                 ;;
4693         m68k-atari-sysv4*)              # Atari variant of V.4.
4694                 tm_file=m68k/atari.h
4695                 xm_file="xm-alloca.h ${xm_file}"
4696                 xm_defines="USG FULL_PROTOTYPES"
4697                 tmake_file=t-svr4
4698                 extra_parts="crtbegin.o crtend.o"
4699                 extra_headers=math-68881.h
4700                 float_format=m68k
4701                 ;;
4702         m68k-motorola-sysv*)
4703                 tm_file=m68k/mot3300.h
4704                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
4705                 if test x$gas = xyes
4706                 then
4707                         xmake_file=m68k/x-mot3300-gas
4708                         if test x$gnu_ld = xyes
4709                         then
4710                                 tmake_file=m68k/t-mot3300-gald
4711                         else
4712                                 tmake_file=m68k/t-mot3300-gas
4713                                 use_collect2=yes
4714                         fi
4715                 else
4716                         xmake_file=m68k/x-mot3300
4717                         if test x$gnu_ld = xyes
4718                         then
4719                                 tmake_file=m68k/t-mot3300-gld
4720                         else
4721                                 tmake_file=m68k/t-mot3300
4722                                 use_collect2=yes
4723                         fi
4724                 fi
4725                 gdb_needs_out_file_path=yes
4726                 extra_parts="crt0.o mcrt0.o"
4727                 extra_headers=math-68881.h
4728                 float_format=m68k
4729                 ;;
4730         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
4731                 tm_file=m68k/tower-as.h
4732                 xm_defines="USG SVR3"
4733                 xmake_file=m68k/x-tower
4734                 extra_parts="crtbegin.o crtend.o"
4735                 extra_headers=math-68881.h
4736                 ;;
4737         m68k-plexus-sysv*)
4738                 tm_file=m68k/plexus.h
4739                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
4740                 xm_defines=USG
4741                 use_collect2=yes
4742                 extra_headers=math-68881.h
4743                 ;;
4744         m68k-tti-*)
4745                 tm_file=m68k/pbb.h
4746                 xm_file="xm-alloca.h ${xm_file}"
4747                 xm_defines=USG
4748                 extra_headers=math-68881.h
4749                 ;;
4750         m68k-crds-unos*)
4751                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
4752                 xm_defines="USG unos"
4753                 xmake_file=m68k/x-crds
4754                 tm_file=m68k/crds.h
4755                 use_collect2=yes
4756                 extra_headers=math-68881.h
4757                 ;;
4758         m68k-cbm-sysv4*)                # Commodore variant of V.4.
4759                 tm_file=m68k/amix.h
4760                 xm_file="xm-alloca.h ${xm_file}"
4761                 xm_defines="USG FULL_PROTOTYPES"
4762                 xmake_file=m68k/x-amix
4763                 tmake_file=t-svr4
4764                 extra_parts="crtbegin.o crtend.o"
4765                 extra_headers=math-68881.h
4766                 float_format=m68k
4767                 ;;
4768         m68k-ccur-rtu)
4769                 tm_file=m68k/ccur-GAS.h
4770                 xmake_file=m68k/x-ccur
4771                 extra_headers=math-68881.h
4772                 use_collect2=yes
4773                 float_format=m68k
4774                 ;;
4775         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
4776                 tm_file=m68k/hp3bsd44.h
4777                 xmake_file=m68k/x-hp3bsd44
4778                 use_collect2=yes
4779                 extra_headers=math-68881.h
4780                 float_format=m68k
4781                 ;;
4782         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
4783                 tm_file=m68k/hp3bsd.h
4784                 use_collect2=yes
4785                 extra_headers=math-68881.h
4786                 float_format=m68k
4787                 ;;
4788         m68k-isi-bsd*)
4789                 if test x$with_fp = xno
4790                 then
4791                         tm_file=m68k/isi-nfp.h
4792                 else
4793                         tm_file=m68k/isi.h
4794                         float_format=m68k
4795                 fi
4796                 use_collect2=yes
4797                 extra_headers=math-68881.h
4798                 ;;
4799         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
4800                 xm_file="xm-alloca.h ${xm_file}"
4801                 xm_defines="USG"
4802                 if test x$gas = xyes
4803                 then
4804                         xmake_file=m68k/x-hp320g
4805                         tm_file=m68k/hp320g.h
4806                 else
4807                         xmake_file=m68k/x-hp320
4808                         tm_file=m68k/hpux7.h
4809                 fi
4810                 install_headers_dir=install-headers-cpio
4811                 use_collect2=yes
4812                 extra_headers=math-68881.h
4813                 float_format=m68k
4814                 ;;
4815         m68k-hp-hpux*)  # HP 9000 series 300
4816                 xm_file="xm-alloca.h ${xm_file}"
4817                 xm_defines="USG"
4818                 if test x$gas = xyes
4819                 then
4820                         xmake_file=m68k/x-hp320g
4821                         tm_file=m68k/hp320g.h
4822                 else
4823                         xmake_file=m68k/x-hp320
4824                         tm_file=m68k/hp320.h
4825                 fi
4826                 install_headers_dir=install-headers-cpio
4827                 use_collect2=yes
4828                 extra_headers=math-68881.h
4829                 float_format=m68k
4830                 ;;
4831         m68k-sun-mach*)
4832                 tm_file=m68k/sun3mach.h
4833                 use_collect2=yes
4834                 extra_headers=math-68881.h
4835                 float_format=m68k
4836                 ;;
4837         m68k-sony-newsos3*)
4838                 if test x$gas = xyes
4839                 then
4840                         tm_file=m68k/news3gas.h
4841                 else
4842                         tm_file=m68k/news3.h
4843                 fi
4844                 use_collect2=yes
4845                 extra_headers=math-68881.h
4846                 float_format=m68k
4847                 ;;
4848         m68k-sony-bsd* | m68k-sony-newsos*)
4849                 if test x$gas = xyes
4850                 then
4851                         tm_file=m68k/newsgas.h
4852                 else
4853                         tm_file=m68k/news.h
4854                 fi
4855                 use_collect2=yes
4856                 extra_headers=math-68881.h
4857                 float_format=m68k
4858                 ;;
4859         m68k-next-nextstep2*)
4860                 tm_file=m68k/next21.h
4861                 xm_file="m68k/xm-next.h ${xm_file}"
4862                 tmake_file=m68k/t-next
4863                 xmake_file=m68k/x-next
4864                 extra_objs=nextstep.o
4865                 extra_headers=math-68881.h
4866                 use_collect2=yes
4867                 float_format=m68k
4868                 ;;
4869         m68k-next-nextstep[34]*)
4870                 tm_file=m68k/next.h
4871                 xm_file="m68k/xm-next.h ${xm_file}"
4872                 tmake_file=m68k/t-next
4873                 xmake_file=m68k/x-next
4874                 extra_objs=nextstep.o
4875                 extra_parts="crtbegin.o crtend.o"
4876                 extra_headers=math-68881.h
4877                 float_format=m68k
4878                 if test x$enable_threads = xyes; then
4879                         thread_file='mach'
4880                 fi
4881                 ;;
4882         m68k-sun-sunos3*)
4883                 if test x$with_fp = xno
4884                 then
4885                         tm_file=m68k/sun3n3.h
4886                 else
4887                         tm_file=m68k/sun3o3.h
4888                         float_format=m68k
4889                 fi
4890                 use_collect2=yes
4891                 extra_headers=math-68881.h
4892                 ;;
4893         m68k-sun-sunos*)                        # For SunOS 4 (the default).
4894                 if test x$with_fp = xno
4895                 then
4896                         tm_file=m68k/sun3n.h
4897                 else
4898                         tm_file=m68k/sun3.h
4899                         float_format=m68k
4900                 fi
4901                 use_collect2=yes
4902                 extra_headers=math-68881.h
4903                 ;;
4904         m68k-wrs-vxworks*)
4905                 tm_file=m68k/vxm68k.h
4906                 tmake_file=m68k/t-vxworks68
4907                 extra_headers=math-68881.h
4908                 thread_file='vxworks'
4909                 float_format=m68k
4910                 ;;
4911         m68k-*-aout*)
4912                 tmake_file=m68k/t-m68kbare
4913                 tm_file="m68k/m68k-aout.h libgloss.h"
4914                 extra_headers=math-68881.h
4915                 float_format=m68k
4916                 ;;
4917         m68k-*-coff*)
4918                 tmake_file=m68k/t-m68kbare
4919                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
4920                 extra_headers=math-68881.h
4921                 float_format=m68k
4922                 ;;
4923         m68020-*-elf* | m68k-*-elf*)
4924                 tm_file="m68k/m68020-elf.h"
4925                 xm_file=m68k/xm-m68kv.h
4926                 tmake_file=m68k/t-m68kelf
4927                 header_files=math-68881.h
4928                 ;;
4929         m68k-*-lynxos*)
4930                 if test x$gas = xyes
4931                 then
4932                         tm_file=m68k/lynx.h
4933                 else
4934                         tm_file=m68k/lynx-ng.h
4935                 fi
4936                 xm_file=m68k/xm-lynx.h
4937                 xmake_file=x-lynx
4938                 tmake_file=m68k/t-lynx
4939                 extra_headers=math-68881.h
4940                 float_format=m68k
4941                 ;;
4942         m68k*-*-netbsd*)
4943                 tm_file=m68k/netbsd.h
4944                 tmake_file=t-netbsd
4945                 float_format=m68k
4946                 use_collect2=yes
4947                 ;;
4948         m68k*-*-openbsd*)
4949                 float_format=m68k
4950                 # we need collect2 until our bug is fixed...
4951                 use_collect2=yes
4952                 ;;
4953         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
4954                 xm_file="xm-alloca.h ${xm_file}"
4955                 xm_defines=USG
4956                 xmake_file=m68k/x-m68kv
4957                 extra_parts="crtbegin.o crtend.o"
4958                 extra_headers=math-68881.h
4959                 float_format=m68k
4960                 ;;
4961         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
4962                 tm_file=m68k/m68kv4.h
4963                 xm_file="xm-alloca.h ${xm_file}"
4964                 xm_defines=USG
4965                 tmake_file=t-svr4
4966                 extra_parts="crtbegin.o crtend.o"
4967                 extra_headers=math-68881.h
4968                 float_format=m68k
4969                 ;;
4970         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
4971                                         # with a.out format
4972                 xmake_file=x-linux
4973                 tm_file=m68k/linux-aout.h
4974                 tmake_file="t-linux-aout m68k/t-linux-aout"
4975                 extra_headers=math-68881.h
4976                 float_format=m68k
4977                 gnu_ld=yes
4978                 ;;
4979         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
4980                                         # with ELF format using the
4981                                         # GNU/Linux C library 5
4982                 xmake_file=x-linux
4983                 tm_file=m68k/linux.h
4984                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
4985                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4986                 extra_headers=math-68881.h
4987                 float_format=m68k
4988                 gnu_ld=yes
4989                 ;;
4990         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
4991                                         # with ELF format using glibc 2
4992                                         # aka the GNU/Linux C library 6.
4993                 xmake_file=x-linux
4994                 tm_file=m68k/linux.h
4995                 tmake_file="t-linux m68k/t-linux"
4996                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4997                 extra_headers=math-68881.h
4998                 float_format=m68k
4999                 gnu_ld=yes
5000                 if test x$enable_threads = xyes; then
5001                         thread_file='posix'
5002                 fi
5003                 ;;
5004         m68k-*-psos*)
5005                 tmake_file=m68k/t-m68kbare
5006                 tm_file=m68k/m68k-psos.h
5007                 extra_headers=math-68881.h
5008                 float_format=m68k
5009                 ;;
5010         m68k-*-rtemscoff*)
5011                 tmake_file="m68k/t-m68kbare t-rtems"
5012                 tm_file=m68k/rtems.h
5013                 extra_headers=math-68881.h
5014                 float_format=m68k
5015                 ;;
5016         m68k-*-rtemself*|m68k-*-rtems*)
5017                 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
5018                 tm_file=m68k/rtemself.h
5019                 extra_headers=math-68881.h
5020                 float_format=m68k
5021                 ;;
5022         m88k-dg-dgux*)
5023                 case $machine in
5024                   m88k-dg-dguxbcs*)
5025                     tm_file=m88k/dguxbcs.h
5026                     tmake_file=m88k/t-dguxbcs
5027                     ;;
5028                   *)
5029                     tm_file=m88k/dgux.h
5030                     tmake_file=m88k/t-dgux
5031                     ;;
5032                 esac
5033                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
5034                 xmake_file=m88k/x-dgux
5035                 if test x$gas = xyes
5036                 then
5037                         tmake_file=m88k/t-dgux-gas
5038                 fi
5039                 ;;
5040         m88k-dolphin-sysv3*)
5041                 tm_file=m88k/dolph.h
5042                 extra_parts="crtbegin.o crtend.o"
5043                 xm_file="m88k/xm-sysv3.h ${xm_file}"
5044                 xmake_file=m88k/x-dolph
5045                 if test x$gas = xyes
5046                 then
5047                         tmake_file=m88k/t-m88k-gas
5048                 fi
5049                 ;;
5050         m88k-tektronix-sysv3)
5051                 tm_file=m88k/tekXD88.h
5052                 extra_parts="crtbegin.o crtend.o"
5053                 xm_file="m88k/xm-sysv3.h ${xm_file}"
5054                 xmake_file=m88k/x-tekXD88
5055                 if test x$gas = xyes
5056                 then
5057                         tmake_file=m88k/t-m88k-gas
5058                 fi
5059                 ;;
5060         m88k-*-aout*)
5061                 tm_file=m88k/m88k-aout.h
5062                 ;;
5063         m88k-*-coff*)
5064                 tm_file=m88k/m88k-coff.h
5065                 tmake_file=m88k/t-bug
5066                 ;;
5067         m88k-*-luna*)
5068                 tm_file=m88k/luna.h
5069                 extra_parts="crtbegin.o crtend.o"
5070                 if test x$gas = xyes
5071                 then
5072                         tmake_file=m88k/t-luna-gas
5073                 else
5074                         tmake_file=m88k/t-luna
5075                 fi
5076                 ;;
5077         m88k-*-openbsd*)
5078                 tmake_file="${tmake_file} m88k/t-luna-gas"
5079                 ;;
5080         m88k-*-sysv3*)
5081                 tm_file=m88k/sysv3.h
5082                 extra_parts="crtbegin.o crtend.o"
5083                 xm_file="m88k/xm-sysv3.h ${xm_file}"
5084                 xmake_file=m88k/x-sysv3
5085                 if test x$gas = xyes
5086                 then
5087                         tmake_file=m88k/t-m88k-gas
5088                 fi
5089                 ;;
5090         m88k-*-sysv4*)
5091                 tm_file=m88k/sysv4.h
5092                 extra_parts="crtbegin.o crtend.o"
5093                 xmake_file=m88k/x-sysv4
5094                 tmake_file=m88k/t-sysv4
5095                 ;;
5096         mcore-*-elf)
5097                 tm_file=mcore/mcore-elf.h
5098                 tmake_file=mcore/t-mcore
5099                 ;;
5100         mcore-*-pe*)
5101                 tm_file=mcore/mcore-pe.h
5102                 tmake_file=mcore/t-mcore-pe
5103                 ;;
5104         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
5105                 if test "x$gnu_ld" = xyes
5106                 then
5107                         tm_file="mips/iris6.h mips/iris6gld.h"
5108                 else
5109                         tm_file=mips/iris6.h
5110                 fi
5111                 tmake_file=mips/t-iris6
5112                 xm_file=mips/xm-iris6.h
5113                 xmake_file=mips/x-iris6
5114 #               if test x$enable_threads = xyes; then
5115 #                       thread_file='irix'
5116 #               fi
5117                 ;;
5118         mips-wrs-vxworks)
5119                 tm_file="mips/elf.h mips/vxworks.h"
5120                 tmake_file=mips/t-ecoff
5121                 gas=yes
5122                 gnu_ld=yes
5123                 extra_parts="crtbegin.o crtend.o"
5124                 thread_file='vxworks'
5125                 ;;
5126         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
5127                 tm_file="mips/iris6.h mips/cross64.h"
5128                 xm_defines=USG
5129                 xm_file="mips/xm-iris5.h"
5130                 xmake_file=mips/x-iris
5131                 tmake_file=mips/t-cross64
5132                 # See comment in mips/iris[56].h files.
5133                 use_collect2=yes
5134 #               if test x$enable_threads = xyes; then
5135 #                       thread_file='irix'
5136 #               fi
5137                 ;;
5138         mips-sni-sysv4)
5139                 if test x$gas = xyes
5140                 then
5141                         if test x$stabs = xyes
5142                         then
5143                                 tm_file=mips/iris5gdb.h
5144                         else
5145                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
5146                         fi
5147                 else
5148                         tm_file=mips/sni-svr4.h
5149                 fi
5150                 xm_defines=USG
5151                 xmake_file=mips/x-sni-svr4
5152                 tmake_file=mips/t-mips-gas
5153                 if test x$gnu_ld != xyes
5154                 then
5155                         use_collect2=yes
5156                 fi
5157                 ;;
5158         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
5159                 if test x$gas = xyes
5160                 then
5161                         tm_file="mips/iris5.h mips/iris5gas.h"
5162                         if test x$stabs = xyes
5163                         then
5164                                 tm_file="${tm_file} dbx.h"
5165                         fi
5166                 else
5167                         tm_file=mips/iris5.h
5168                 fi
5169                 xm_defines=USG
5170                 xm_file="mips/xm-iris5.h"
5171                 xmake_file=mips/x-iris
5172                 # mips-tfile doesn't work yet
5173                 tmake_file=mips/t-mips-gas
5174                 # See comment in mips/iris5.h file.
5175                 use_collect2=yes
5176 #               if test x$enable_threads = xyes; then
5177 #                       thread_file='irix'
5178 #               fi
5179                 ;;
5180         mips-sgi-irix4loser*)           # Mostly like a MIPS.
5181                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
5182                 if test x$stabs = xyes; then
5183                         tm_file="${tm_file} dbx.h"
5184                 fi
5185                 xm_defines=USG
5186                 xmake_file=mips/x-iris
5187                 if test x$gas = xyes
5188                 then
5189                         tmake_file=mips/t-mips-gas
5190                 else
5191                         extra_passes="mips-tfile mips-tdump"
5192                 fi
5193                 if test x$gnu_ld != xyes
5194                 then
5195                         use_collect2=yes
5196                 fi
5197 #               if test x$enable_threads = xyes; then
5198 #                       thread_file='irix'
5199 #               fi
5200                 ;;
5201         mips-sgi-irix4*)                # Mostly like a MIPS.
5202                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
5203                 if test x$stabs = xyes; then
5204                         tm_file="${tm_file} dbx.h"
5205                 fi
5206                 xm_defines=USG
5207                 xmake_file=mips/x-iris
5208                 if test x$gas = xyes
5209                 then
5210                         tmake_file=mips/t-mips-gas
5211                 else
5212                         extra_passes="mips-tfile mips-tdump"
5213                 fi
5214                 if test x$gnu_ld != xyes
5215                 then
5216                         use_collect2=yes
5217                 fi
5218 #               if test x$enable_threads = xyes; then
5219 #                       thread_file='irix'
5220 #               fi
5221                 ;;
5222         mips-sgi-*)                     # Mostly like a MIPS.
5223                 tm_file="mips/iris3.h ${tm_file}"
5224                 if test x$stabs = xyes; then
5225                         tm_file="${tm_file} dbx.h"
5226                 fi
5227                 xm_defines=USG
5228                 xmake_file=mips/x-iris3
5229                 if test x$gas = xyes
5230                 then
5231                         tmake_file=mips/t-mips-gas
5232                 else
5233                         extra_passes="mips-tfile mips-tdump"
5234                 fi
5235                 if test x$gnu_ld != xyes
5236                 then
5237                         use_collect2=yes
5238                 fi
5239                 ;;
5240         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
5241                 tm_file="mips/osfrose.h ${tm_file}"
5242                 xmake_file=mips/x-osfrose
5243                 tmake_file=mips/t-osfrose
5244                 extra_objs=halfpic.o
5245                 use_collect2=yes
5246                 ;;
5247         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
5248                 tm_file=mips/dec-osf1.h
5249                 if test x$stabs = xyes; then
5250                         tm_file="${tm_file} dbx.h"
5251                 fi
5252                 xmake_file=mips/x-dec-osf1
5253                 if test x$gas = xyes
5254                 then
5255                         tmake_file=mips/t-mips-gas
5256                 else
5257                         tmake_file=mips/t-ultrix
5258                         extra_passes="mips-tfile mips-tdump"
5259                 fi
5260                 if test x$gnu_ld != xyes
5261                 then
5262                         use_collect2=yes
5263                 fi
5264                 ;;
5265         mips-dec-bsd*)                  # Decstation running 4.4 BSD
5266               tm_file=mips/dec-bsd.h
5267               if test x$gas = xyes
5268               then
5269                         tmake_file=mips/t-mips-gas
5270               else
5271                         tmake_file=mips/t-ultrix
5272                         extra_passes="mips-tfile mips-tdump"
5273               fi
5274               if test x$gnu_ld != xyes
5275               then
5276                         use_collect2=yes
5277               fi
5278               ;;
5279         mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
5280                 tm_file=mips/netbsd.h
5281                 # On NetBSD, the headers are already okay, except for math.h.
5282                 tmake_file=t-netbsd
5283                 ;;
5284        mips*-*-linux*)                         # Linux MIPS, either endian.
5285                 xmake_file=x-linux
5286                case $machine in
5287                        mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
5288                        *)         tm_file="mips/elf.h mips/linux.h" ;;
5289                esac
5290                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5291                 gnu_ld=yes
5292                 gas=yes
5293                 if test x$enable_threads = xyes; then
5294                         thread_file='posix'
5295                 fi
5296                 ;;
5297         mips*el-*-openbsd*)     # mips little endian
5298                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
5299                 ;;
5300         mips*-*-openbsd*)               # mips big endian
5301                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
5302                 tm_file="mips/openbsd-be.h ${tm_file}"
5303                 ;;
5304         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
5305                 tm_file="mips/news4.h ${tm_file}"
5306                 if test x$stabs = xyes; then
5307                         tm_file="${tm_file} dbx.h"
5308                 fi
5309                 if test x$gas = xyes
5310                 then
5311                         tmake_file=mips/t-mips-gas
5312                 else
5313                         extra_passes="mips-tfile mips-tdump"
5314                 fi
5315                 if test x$gnu_ld != xyes
5316                 then
5317                         use_collect2=yes
5318                 fi
5319                 xmake_file=mips/x-sony
5320                 ;;
5321         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
5322                                         # That is based on svr4.
5323                 # t-svr4 is not right because this system doesn't use ELF.
5324                 tm_file="mips/news5.h ${tm_file}"
5325                 if test x$stabs = xyes; then
5326                         tm_file="${tm_file} dbx.h"
5327                 fi
5328                 xm_defines=USG
5329                 if test x$gas = xyes
5330                 then
5331                         tmake_file=mips/t-mips-gas
5332                 else
5333                         extra_passes="mips-tfile mips-tdump"
5334                 fi
5335                 if test x$gnu_ld != xyes
5336                 then
5337                         use_collect2=yes
5338                 fi
5339                 ;;
5340         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
5341                 tm_file="mips/svr4-5.h mips/svr4-t.h"
5342                 if test x$stabs = xyes; then
5343                         tm_file="${tm_file} dbx.h"
5344                 fi
5345                 xm_defines=USG
5346                 xmake_file=mips/x-sysv
5347                 if test x$gas = xyes
5348                 then
5349                         tmake_file=mips/t-mips-gas
5350                         extra_parts="crtbegin.o crtend.o"
5351                 else
5352                         tmake_file=mips/t-mips
5353                         extra_passes="mips-tfile mips-tdump"
5354                 fi
5355                 if test x$gnu_ld != xyes
5356                 then
5357                         use_collect2=yes
5358                 fi
5359                 ;;
5360         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
5361                 tm_file="mips/ultrix.h ${tm_file}"
5362                 if test x$stabs = xyes; then
5363                         tm_file="${tm_file} dbx.h"
5364                 fi
5365                 xmake_file=mips/x-ultrix
5366                 if test x$gas = xyes
5367                 then
5368                         tmake_file=mips/t-mips-gas
5369                 else
5370                         tmake_file=mips/t-ultrix
5371                         extra_passes="mips-tfile mips-tdump"
5372                 fi
5373                 if test x$gnu_ld != xyes
5374                 then
5375                         use_collect2=yes
5376                 fi
5377                 ;;
5378         mips-*-riscos[56789]bsd*)
5379                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
5380                 if test x$stabs = xyes; then
5381                         tm_file="${tm_file} dbx.h"
5382                 fi
5383                 if test x$gas = xyes
5384                 then
5385                         tmake_file=mips/t-bsd-gas
5386                 else
5387                         tmake_file=mips/t-bsd
5388                         extra_passes="mips-tfile mips-tdump"
5389                 fi
5390                 if test x$gnu_ld != xyes
5391                 then
5392                         use_collect2=yes
5393                 fi
5394                 ;;
5395         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
5396                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
5397                 if test x$stabs = xyes; then
5398                         tm_file="${tm_file} dbx.h"
5399                 fi
5400                 if test x$gas = xyes
5401                 then
5402                         tmake_file=mips/t-bsd-gas
5403                 else
5404                         tmake_file=mips/t-bsd
5405                         extra_passes="mips-tfile mips-tdump"
5406                 fi
5407                 if test x$gnu_ld != xyes
5408                 then
5409                         use_collect2=yes
5410                 fi
5411                 ;;
5412         mips-*-riscos[56789]sysv4*)
5413                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
5414                 if test x$stabs = xyes; then
5415                         tm_file="${tm_file} dbx.h"
5416                 fi
5417                 xmake_file=mips/x-sysv
5418                 if test x$gas = xyes
5419                 then
5420                         tmake_file=mips/t-svr4-gas
5421                 else
5422                         tmake_file=mips/t-svr4
5423                         extra_passes="mips-tfile mips-tdump"
5424                 fi
5425                 if test x$gnu_ld != xyes
5426                 then
5427                         use_collect2=yes
5428                 fi
5429                 ;;
5430         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
5431                 tm_file="mips/svr4-4.h ${tm_file}"
5432                 if test x$stabs = xyes; then
5433                         tm_file="${tm_file} dbx.h"
5434                 fi
5435                 xm_defines=USG
5436                 xmake_file=mips/x-sysv
5437                 if test x$gas = xyes
5438                 then
5439                         tmake_file=mips/t-svr4-gas
5440                 else
5441                         tmake_file=mips/t-svr4
5442                         extra_passes="mips-tfile mips-tdump"
5443                 fi
5444                 if test x$gnu_ld != xyes
5445                 then
5446                         use_collect2=yes
5447                 fi
5448                 ;;
5449         mips-*-riscos[56789]sysv*)
5450                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
5451                 if test x$stabs = xyes; then
5452                         tm_file="${tm_file} dbx.h"
5453                 fi
5454                 xm_defines=USG
5455                 xmake_file=mips/x-sysv
5456                 if test x$gas = xyes
5457                 then
5458                         tmake_file=mips/t-svr3-gas
5459                 else
5460                         tmake_file=mips/t-svr3
5461                         extra_passes="mips-tfile mips-tdump"
5462                 fi
5463                 if test x$gnu_ld != xyes
5464                 then
5465                         use_collect2=yes
5466                 fi
5467                 ;;
5468         mips-*-sysv* | mips-*-riscos*sysv*)
5469                 tm_file="mips/svr3-4.h ${tm_file}"
5470                 if test x$stabs = xyes; then
5471                         tm_file="${tm_file} dbx.h"
5472                 fi
5473                 xm_defines=USG
5474                 xmake_file=mips/x-sysv
5475                 if test x$gas = xyes
5476                 then
5477                         tmake_file=mips/t-svr3-gas
5478                 else
5479                         tmake_file=mips/t-svr3
5480                         extra_passes="mips-tfile mips-tdump"
5481                 fi
5482                 if test x$gnu_ld != xyes
5483                 then
5484                         use_collect2=yes
5485                 fi
5486                 ;;
5487         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
5488                 tm_file=mips/mips-5.h
5489                 if test x$stabs = xyes; then
5490                         tm_file="${tm_file} dbx.h"
5491                 fi
5492                 if test x$gas = xyes
5493                 then
5494                         tmake_file=mips/t-mips-gas
5495                 else
5496                         extra_passes="mips-tfile mips-tdump"
5497                 fi
5498                 if test x$gnu_ld != xyes
5499                 then
5500                         use_collect2=yes
5501                 fi
5502                 ;;
5503         mips-*-gnu*)
5504                 ;;
5505         mipsel-*-ecoff*)
5506                 tm_file=mips/ecoffl.h
5507                 if test x$stabs = xyes; then
5508                         tm_file="${tm_file} dbx.h"
5509                 fi
5510                 tmake_file=mips/t-ecoff
5511                 ;;
5512         mips-*-ecoff*)
5513                 tm_file="gofast.h mips/ecoff.h"
5514                 if test x$stabs = xyes; then
5515                         tm_file="${tm_file} dbx.h"
5516                 fi
5517                 tmake_file=mips/t-ecoff
5518                 ;;
5519         mipsel-*-elf*)
5520                 tm_file="mips/elfl.h"
5521                 tmake_file=mips/t-elf
5522                 ;;
5523         mips-*-elf*)
5524                 tm_file="mips/elf.h"
5525                 tmake_file=mips/t-elf
5526                 ;;
5527         mips64el-*-elf*)
5528                 tm_file="mips/elfl64.h"
5529                 tmake_file=mips/t-elf
5530                 ;;
5531         mips64orionel-*-elf*)
5532                 tm_file="mips/elforion.h mips/elfl64.h"
5533                 tmake_file=mips/t-elf
5534                 ;;
5535         mips64-*-elf*)
5536                 tm_file="mips/elf64.h"
5537                 tmake_file=mips/t-elf
5538                 ;;
5539         mips64orion-*-elf*)
5540                 tm_file="mips/elforion.h mips/elf64.h"
5541                 tmake_file=mips/t-elf
5542                 ;;
5543         mips64orion-*-rtems*)
5544                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
5545                 tmake_file="mips/t-elf t-rtems"
5546                 ;;
5547         mipstx39el-*-elf*)
5548                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
5549                 tmake_file=mips/t-r3900
5550                 ;;
5551         mipstx39-*-elf*)
5552                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
5553                 tmake_file=mips/t-r3900
5554                 ;;
5555         mips-*-*)                               # Default MIPS RISC-OS 4.0.
5556                 if test x$stabs = xyes; then
5557                         tm_file="${tm_file} dbx.h"
5558                 fi
5559                 if test x$gas = xyes
5560                 then
5561                         tmake_file=mips/t-mips-gas
5562                 else
5563                         extra_passes="mips-tfile mips-tdump"
5564                 fi
5565                 if test x$gnu_ld != xyes
5566                 then
5567                         use_collect2=yes
5568                 fi
5569                 ;;
5570         mn10200-*-*)
5571                 float_format=i32
5572                 cpu_type=mn10200
5573                 tm_file="mn10200/mn10200.h"
5574                 if test x$stabs = xyes
5575                 then
5576                         tm_file="${tm_file} dbx.h"
5577                 fi
5578                 use_collect2=no
5579                 ;;
5580         mn10300-*-*)
5581                 cpu_type=mn10300
5582                 tm_file="mn10300/mn10300.h"
5583                 if test x$stabs = xyes
5584                 then
5585                         tm_file="${tm_file} dbx.h"
5586                 fi
5587                 use_collect2=no
5588                 ;;
5589         ns32k-encore-bsd*)
5590                 tm_file=ns32k/encore.h
5591                 use_collect2=yes
5592                 ;;
5593         ns32k-sequent-bsd*)
5594                 tm_file=ns32k/sequent.h
5595                 use_collect2=yes
5596                 ;;
5597         ns32k-tek6100-bsd*)
5598                 tm_file=ns32k/tek6100.h
5599                 use_collect2=yes
5600                 ;;
5601         ns32k-tek6200-bsd*)
5602                 tm_file=ns32k/tek6200.h
5603                 use_collect2=yes
5604                 ;;
5605 # This has not been updated to GCC 2.
5606 #       ns32k-ns-genix*)
5607 #               xm_defines=USG
5608 #               xmake_file=ns32k/x-genix
5609 #               tm_file=ns32k/genix.h
5610 #               use_collect2=yes
5611 #               ;;
5612         ns32k-merlin-*)
5613                 tm_file=ns32k/merlin.h
5614                 use_collect2=yes
5615                 ;;
5616         ns32k-pc532-mach*)
5617                 tm_file=ns32k/pc532-mach.h
5618                 use_collect2=yes
5619                 ;;
5620         ns32k-pc532-minix*)
5621                 tm_file=ns32k/pc532-min.h
5622                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
5623                 xm_defines=USG
5624                 use_collect2=yes
5625                 ;;
5626         ns32k-*-netbsd*)
5627                 tm_file=ns32k/netbsd.h
5628                 xm_file="ns32k/xm-netbsd.h ${xm_file}"
5629                 # On NetBSD, the headers are already okay, except for math.h.
5630                 tmake_file=t-netbsd
5631                 use_collect2=yes
5632                 ;;
5633         pdp11-*-bsd)
5634                 tm_file="${tm_file} pdp11/2bsd.h"
5635                 ;;
5636         pdp11-*-*)
5637                 ;;
5638         avr-*-*)
5639                 ;;
5640         ns32k-*-openbsd*)
5641                 # Nothing special
5642                 ;;
5643 # This has not been updated to GCC 2.
5644 #       pyramid-*-*)
5645 #               cpu_type=pyr
5646 #               xmake_file=pyr/x-pyr
5647 #               use_collect2=yes
5648 #               ;;
5649
5650         pj*-linux*)
5651                 tm_file="svr4.h pj/linux.h ${tm_file}"
5652                 ;;
5653         pj-*)
5654                 ;;
5655         pjl-*)
5656                 tm_file="svr4.h pj/pjl.h ${tm_file}"
5657                 ;;
5658
5659         romp-*-aos*)
5660                 use_collect2=yes
5661                 ;;
5662         romp-*-mach*)
5663                 xmake_file=romp/x-mach
5664                 use_collect2=yes
5665                 ;;
5666         romp-*-openbsd*)
5667                 # Nothing special
5668                 ;;
5669         powerpc-*-openbsd*)
5670                 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
5671                 ;;
5672         powerpc-*-beos*)
5673                 cpu_type=rs6000
5674                 tm_file=rs6000/beos.h
5675                 xm_file=rs6000/xm-beos.h
5676                 tmake_file=rs6000/t-beos
5677                 xmake_file=rs6000/x-beos
5678                 ;;
5679         powerpc-*-sysv*)
5680                 tm_file=rs6000/sysv4.h
5681                 xm_file="rs6000/xm-sysv4.h"
5682                 xm_defines="USG POSIX"
5683                 extra_headers=ppc-asm.h
5684                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5685                 xmake_file=rs6000/x-sysv4
5686                 ;;
5687         powerpc-*-eabiaix*)
5688                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
5689                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5690                 extra_headers=ppc-asm.h
5691                 ;;
5692         powerpc-*-eabisim*)
5693                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
5694                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5695                 extra_headers=ppc-asm.h
5696                 ;;
5697         powerpc-*-elf*)
5698                 tm_file="rs6000/sysv4.h"
5699                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5700                 extra_headers=ppc-asm.h
5701                 ;;
5702         powerpc-*-eabi*)
5703                 tm_file="rs6000/sysv4.h rs6000/eabi.h"
5704                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5705                 extra_headers=ppc-asm.h
5706                 ;;
5707         powerpc-*-rtems*)
5708                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
5709                 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
5710                 extra_headers=ppc-asm.h
5711                 ;;
5712         powerpc-*-linux-gnulibc1)
5713                 tm_file="rs6000/sysv4.h rs6000/linux.h"
5714                 xm_file=rs6000/xm-sysv4.h
5715                 out_file=rs6000/rs6000.c
5716                 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
5717                 xmake_file=x-linux
5718                 extra_headers=ppc-asm.h
5719                 if test x$enable_threads = xyes; then
5720                         thread_file='posix'
5721                 fi
5722                 ;;
5723         powerpc-*-linux-gnu*)
5724                 tm_file="rs6000/sysv4.h rs6000/linux.h"
5725                 xm_file="rs6000/xm-sysv4.h"
5726                 xm_defines="USG ${xm_defines}"
5727                 out_file=rs6000/rs6000.c
5728                 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
5729                 xmake_file=x-linux
5730                 extra_headers=ppc-asm.h
5731                 if test x$enable_threads = xyes; then
5732                         thread_file='posix'
5733                 fi
5734                 ;;
5735         powerpc-wrs-vxworks*)
5736                 cpu_type=rs6000
5737                 xm_file="rs6000/xm-sysv4.h"
5738                 xm_defines="USG POSIX"
5739                 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
5740                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5741                 extra_headers=ppc-asm.h
5742                 thread_file='vxworks'
5743                 ;;
5744         powerpcle-wrs-vxworks*)
5745                 cpu_type=rs6000
5746                 xm_file="rs6000/xm-sysv4.h"
5747                 xm_defines="USG POSIX"
5748                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
5749                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5750                 extra_headers=ppc-asm.h
5751                 thread_file='vxworks'
5752                 ;;
5753         powerpcle-*-sysv*)
5754                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
5755                 xm_file="rs6000/xm-sysv4.h"
5756                 xm_defines="USG POSIX"
5757                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5758                 xmake_file=rs6000/x-sysv4
5759                 extra_headers=ppc-asm.h
5760                 ;;
5761         powerpcle-*-elf*)
5762                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
5763                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5764                 extra_headers=ppc-asm.h
5765                 ;;
5766         powerpcle-*-eabisim*)
5767                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
5768                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5769                 extra_headers=ppc-asm.h
5770                 ;;
5771         powerpcle-*-eabi*)
5772                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
5773                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5774                 extra_headers=ppc-asm.h
5775                 ;;
5776         powerpcle-*-solaris2*)
5777                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
5778                 xm_file="rs6000/xm-sysv4.h"
5779                 xm_defines="USG POSIX"
5780                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5781                 xmake_file=rs6000/x-sysv4
5782                 extra_headers=ppc-asm.h
5783                 ;;
5784         rs6000-ibm-aix3.[01]*)
5785                 tm_file=rs6000/aix31.h
5786                 xmake_file=rs6000/x-aix31
5787                 float_format=none
5788                 use_collect2=yes
5789                 ;;
5790         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
5791                 tm_file=rs6000/aix3newas.h
5792                 if test x$host != x$target
5793                 then
5794                         tmake_file=rs6000/t-xnewas
5795                 else
5796                         tmake_file=rs6000/t-newas
5797                 fi
5798                 float_format=none
5799                 use_collect2=yes
5800                 ;;
5801         rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
5802                 tm_file=rs6000/aix41.h
5803                 if test x$host != x$target
5804                 then
5805                         tmake_file=rs6000/t-xnewas
5806                 else
5807                         tmake_file=rs6000/t-newas
5808                 fi
5809                 if test "$gnu_ld" = yes
5810                 then
5811                         xmake_file=rs6000/x-aix41-gld
5812                 else
5813                         tmake_file="rs6000/t-newas rs6000/t-aix41"
5814                 fi
5815                 xmake_file=rs6000/x-aix41
5816                 float_format=none
5817                 use_collect2=yes
5818                 ;;
5819         rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
5820                 tm_file=rs6000/aix43.h
5821                 tmake_file=rs6000/t-aix43
5822                 xmake_file=rs6000/x-aix41
5823                 float_format=none
5824                 use_collect2=yes
5825                 ;;
5826         rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
5827                 tm_file=rs6000/aix43.h
5828                 tmake_file=rs6000/t-aix43
5829                 xmake_file=rs6000/x-aix41
5830                 float_format=none
5831                 use_collect2=yes
5832                 ;;
5833         rs6000-ibm-aix*)
5834                 float_format=none
5835                 use_collect2=yes
5836                 ;;
5837         rs6000-bull-bosx)
5838                 float_format=none
5839                 use_collect2=yes
5840                 ;;
5841         rs6000-*-mach*)
5842                 tm_file=rs6000/mach.h
5843                 xm_file="${xm_file} rs6000/xm-mach.h"
5844                 xmake_file=rs6000/x-mach
5845                 use_collect2=yes
5846                 ;;
5847         rs6000-*-lynxos*)
5848                 tm_file=rs6000/lynx.h
5849                 xm_file=rs6000/xm-lynx.h
5850                 tmake_file=rs6000/t-rs6000
5851                 xmake_file=rs6000/x-lynx
5852                 use_collect2=yes
5853                 ;;
5854         sh-*-elf*)
5855                 tm_file=sh/elf.h
5856                 float_format=sh
5857                 ;;
5858         sh-*-rtemself*)
5859                 tmake_file="sh/t-sh t-rtems"
5860                 tm_file=sh/rtemself.h
5861                 float_format=sh
5862                 ;;
5863         sh-*-rtems*)
5864                 tmake_file="sh/t-sh t-rtems"
5865                 tm_file=sh/rtems.h
5866                 float_format=sh
5867                 ;;
5868         sh-*-*)
5869                 float_format=sh
5870                 ;;
5871         sparc-tti-*)
5872                 tm_file=sparc/pbd.h
5873                 xm_file="xm-alloca.h ${xm_file}"
5874                 xm_defines=USG
5875                 ;;
5876         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
5877                 tm_file=sparc/vxsparc.h
5878                 tmake_file=sparc/t-vxsparc
5879                 use_collect2=yes
5880                 thread_file='vxworks'
5881                 ;;
5882         sparc-*-aout*)
5883                 tmake_file=sparc/t-sparcbare
5884                 tm_file="sparc/aout.h libgloss.h"
5885                 ;;
5886         sparc-*-netbsd*)
5887                 tm_file=sparc/netbsd.h
5888                 tmake_file=t-netbsd
5889                 use_collect2=yes
5890                 ;;
5891         sparc-*-openbsd*)
5892                 # we need collect2 until our bug is fixed...
5893                 use_collect2=yes
5894                 ;;
5895         sparc-*-bsd*)
5896                 tm_file=sparc/bsd.h
5897                 ;;
5898         sparc-*-elf*)
5899                 tm_file=sparc/elf.h
5900                 tmake_file=sparc/t-elf
5901                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5902                 #float_format=i128
5903                 float_format=i64
5904                 ;;
5905         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
5906                 xm_file="${xm_file} sparc/xm-linux.h"
5907                 tm_file=sparc/linux-aout.h
5908                 xmake_file=x-linux
5909                 gnu_ld=yes
5910                 ;;
5911         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
5912                 xm_file="${xm_file} sparc/xm-linux.h"
5913                 xmake_file=x-linux
5914                 tm_file=sparc/linux.h
5915                 tmake_file="t-linux t-linux-gnulibc1"
5916                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5917                 gnu_ld=yes
5918                 float_format=sparc
5919                 ;;
5920         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
5921                 xm_file="${xm_file} sparc/xm-linux.h"
5922                 xmake_file=x-linux
5923                 tm_file=sparc/linux.h
5924                 tmake_file="t-linux"
5925                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5926                 gnu_ld=yes
5927                 if test x$enable_threads = xyes; then
5928                         thread_file='posix'
5929                 fi
5930                 float_format=sparc
5931                 ;;
5932         sparc-*-lynxos*)
5933                 if test x$gas = xyes
5934                 then
5935                         tm_file=sparc/lynx.h
5936                 else
5937                         tm_file=sparc/lynx-ng.h
5938                 fi
5939                 xm_file=sparc/xm-lynx.h
5940                 tmake_file=sparc/t-sunos41
5941                 xmake_file=x-lynx
5942                 ;;
5943         sparc-*-rtemsaout*)
5944                 tmake_file="sparc/t-sparcbare t-rtems"
5945                 tm_file=sparc/rtems.h
5946                 ;;
5947         sparc-*-rtems*|sparc-*-rtemself*)
5948                 tm_file="sparc/rtemself.h"
5949                 tmake_file="sparc/t-elf t-rtems"
5950                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5951                 #float_format=i128
5952                 float_format=i64
5953                 ;;
5954         sparcv9-*-solaris2*)
5955                 if test x$gnu_ld = xyes
5956                 then
5957                         tm_file=sparc/sol2-64.h
5958                 else
5959                         tm_file=sparc/sol2-sld-64.h
5960                 fi
5961                 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
5962                 xm_defines="USG POSIX"
5963                 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
5964                 xmake_file=sparc/x-sysv4
5965                 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
5966                 float_format=none
5967                 if test x${enable_threads} = x ; then
5968                     enable_threads=$have_pthread_h
5969                     if test x${enable_threads} = x ; then
5970                         enable_threads=$have_thread_h
5971                     fi
5972                 fi
5973                 if test x${enable_threads} = xyes ; then
5974                     if test x${have_pthread_h} = xyes ; then
5975                         thread_file='posix'
5976                     else
5977                         thread_file='solaris'
5978                     fi
5979                 fi
5980                 ;;
5981         sparc-hal-solaris2*)
5982                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
5983                 xm_defines="USG POSIX"
5984                 tm_file="sparc/sol2.h sparc/hal.h"
5985                 tmake_file="sparc/t-halos sparc/t-sol2"
5986                 xmake_file=sparc/x-sysv4
5987                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
5988                 case $machine in
5989                 *-*-solaris2.[0-4])
5990                         float_format=i128
5991                 ;;
5992                 *)
5993                         float_format=none
5994                         ;;
5995                 esac
5996                 thread_file='solaris'
5997                 ;;
5998         sparc-*-solaris2*)
5999                 if test x$gnu_ld = xyes
6000                 then
6001                         tm_file=sparc/sol2.h
6002                 else
6003                         tm_file=sparc/sol2-sld.h
6004                 fi
6005                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
6006                 xm_defines="USG POSIX"
6007                 tmake_file=sparc/t-sol2
6008                 xmake_file=sparc/x-sysv4
6009                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
6010                 case $machine in
6011                 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
6012                 *-*-solaris2*)
6013                         if test x$gnu_ld = xyes
6014                         then
6015                                 tm_file=sparc/sol2-64.h
6016                         else
6017                                 tm_file=sparc/sol2-sld-64.h
6018                         fi
6019                         tmake_file="$tmake_file sparc/t-sol2-64"
6020                         ;;
6021                 esac
6022                 case $machine in
6023                 *-*-solaris2.[0-4])
6024                         float_format=i128
6025                         ;;
6026                 *)
6027                         float_format=none
6028                         ;;
6029                 esac
6030                 if test x${enable_threads} = x; then
6031                     enable_threads=$have_pthread_h
6032                     if test x${enable_threads} = x; then
6033                         enable_threads=$have_thread_h
6034                     fi
6035                 fi
6036                 if test x${enable_threads} = xyes; then
6037                     if test x${have_pthread_h} = xyes; then
6038                         thread_file='posix'
6039                     else
6040                         thread_file='solaris'
6041                     fi
6042                 fi
6043                 ;;
6044         sparc-*-sunos4.0*)
6045                 tm_file=sparc/sunos4.h
6046                 tmake_file=sparc/t-sunos40
6047                 use_collect2=yes
6048                 ;;
6049         sparc-*-sunos4*)
6050                 tm_file=sparc/sunos4.h
6051                 tmake_file=sparc/t-sunos41
6052                 use_collect2=yes
6053                 if test x$gas = xyes; then
6054                         tm_file="${tm_file} sparc/sun4gas.h"
6055                 fi
6056                 ;;
6057         sparc-*-sunos3*)
6058                 tm_file=sparc/sun4o3.h
6059                 use_collect2=yes
6060                 ;;
6061         sparc-*-sysv4*)
6062                 tm_file=sparc/sysv4.h
6063                 xm_file="sparc/xm-sysv4.h"
6064                 xm_defines="USG POSIX"
6065                 tmake_file=t-svr4
6066                 xmake_file=sparc/x-sysv4
6067                 extra_parts="crtbegin.o crtend.o"
6068                 ;;
6069         sparc-*-vxsim*)
6070                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
6071                 xm_defines="USG POSIX"
6072                 tm_file=sparc/vxsim.h
6073                 tmake_file=sparc/t-vxsparc
6074                 xmake_file=sparc/x-sysv4
6075                 ;;
6076         sparclet-*-aout*)
6077                 tm_file="sparc/splet.h libgloss.h"
6078                 tmake_file=sparc/t-splet
6079                 ;;
6080         sparclite-*-coff*)
6081                 tm_file="sparc/litecoff.h libgloss.h"
6082                 tmake_file=sparc/t-sparclite
6083                 ;;
6084         sparclite-*-aout*)
6085                 tm_file="sparc/lite.h aoutos.h libgloss.h"
6086                 tmake_file=sparc/t-sparclite
6087                 ;;
6088         sparclite-*-elf*)
6089                 tm_file="sparc/liteelf.h"
6090                 tmake_file=sparc/t-sparclite
6091                 extra_parts="crtbegin.o crtend.o"
6092                 ;;
6093         sparc86x-*-aout*)
6094                 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
6095                 tmake_file=sparc/t-sp86x
6096                 ;;
6097         sparc86x-*-elf*)        
6098                 tm_file="sparc/sp86x-elf.h"
6099                 tmake_file=sparc/t-sp86x
6100                 extra_parts="crtbegin.o crtend.o"
6101                 ;;
6102         sparc64-*-aout*)
6103                 tmake_file=sparc/t-sp64
6104                 tm_file=sparc/sp64-aout.h
6105                 ;;
6106         sparc64-*-elf*)
6107                 tmake_file=sparc/t-sp64
6108                 tm_file=sparc/sp64-elf.h
6109                 extra_parts="crtbegin.o crtend.o"
6110                 ;;
6111         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
6112                 tmake_file="t-linux sparc/t-linux64"
6113                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
6114                 tm_file=sparc/linux64.h
6115                 xmake_file=x-linux
6116                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6117                 gnu_ld=yes
6118                 if test x$enable_threads = xyes; then
6119                         thread_file='posix'
6120                 fi
6121                 float_format=sparc
6122                 ;;
6123 # This hasn't been upgraded to GCC 2.
6124 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
6125 #               tm_file=tahoe/harris.h
6126 #               ;;
6127 #       tahoe-*-bsd*)                   # tahoe running BSD
6128 #               ;;
6129
6130         thumb*-*-*)
6131                 { echo "configure: error: 
6132 *** The Thumb targets have been depreciated.  The equivalent
6133 *** ARM based toolchain can now generated Thumb instructions
6134 *** when the -mthumb switch is given to the compiler." 1>&2; exit 1; }
6135                 ;;
6136 # This hasn't been upgraded to GCC 2.
6137 #       tron-*-*)
6138 #               cpu_type=gmicro
6139 #               use_collect2=yes
6140 #               ;;
6141         v850-*-rtems*)
6142                 cpu_type=v850
6143                 tm_file="v850/rtems.h"
6144                 xm_file="v850/xm-v850.h"
6145                 tmake_file="v850/t-v850 t-rtems"
6146                 if test x$stabs = xyes
6147                 then
6148                         tm_file="${tm_file} dbx.h"
6149                 fi
6150                 use_collect2=no
6151                 ;;
6152         v850-*-*)
6153                 target_cpu_default="TARGET_CPU_generic"
6154                 cpu_type=v850
6155                 tm_file="v850/v850.h"
6156                 xm_file="v850/xm-v850.h"
6157                 tmake_file=v850/t-v850
6158                 if test x$stabs = xyes
6159                 then
6160                         tm_file="${tm_file} dbx.h"
6161                 fi
6162                 use_collect2=no
6163                 ;;
6164         vax-*-bsd*)                     # vaxen running BSD
6165                 use_collect2=yes
6166                 float_format=vax
6167                 ;;
6168         vax-*-sysv*)                    # vaxen running system V
6169                 tm_file="${tm_file} vax/vaxv.h"
6170                 xm_defines=USG
6171                 float_format=vax
6172                 ;;
6173         vax-*-netbsd*)
6174                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
6175                 tmake_file=t-netbsd
6176                 float_format=vax
6177                 use_collect2=yes
6178                 ;;
6179         vax-*-openbsd*)
6180                 tmake_file="${tmake_file} vax/t-openbsd"
6181                 ;;
6182         vax-*-ultrix*)                  # vaxen running ultrix
6183                 tm_file="${tm_file} vax/ultrix.h"
6184                 use_collect2=yes
6185                 float_format=vax
6186                 ;;
6187         vax-*-vms*)                     # vaxen running VMS
6188                 xm_file=vax/xm-vms.h
6189                 tm_file=vax/vms.h
6190                 float_format=vax
6191                 ;;
6192         vax-*-*)                        # vax default entry
6193                 float_format=vax
6194                 ;;
6195         we32k-att-sysv*)
6196                 xm_file="${xm_file} xm-svr3"
6197                 use_collect2=yes
6198                 ;;
6199         *)
6200                 echo "Configuration $machine not supported" 1>&2
6201                 exit 1
6202                 ;;
6203         esac
6204
6205         case $machine in
6206         *-*-linux-gnu*)
6207                 ;; # Existing GNU/Linux systems do not use the GNU setup.
6208         *-*-gnu*)
6209                 # On the GNU system, the setup is just about the same on
6210                 # each different CPU.  The specific machines that GNU
6211                 # supports are matched above and just set $cpu_type.
6212                 xm_file="xm-gnu.h ${xm_file}"
6213                 tm_file=${cpu_type}/gnu.h
6214                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
6215                 # GNU always uses ELF.
6216                 elf=yes
6217                 # GNU tools are the only tools.
6218                 gnu_ld=yes
6219                 gas=yes
6220                 xmake_file=x-linux      # These details are the same as Linux.
6221                 tmake_file=t-gnu        # These are not.
6222                 ;;
6223         *-*-sysv4*)
6224                 xmake_try_sysv=x-sysv
6225                 install_headers_dir=install-headers-cpio
6226                 ;;
6227         *-*-sysv*)
6228                 install_headers_dir=install-headers-cpio
6229                 ;;
6230         esac
6231
6232         # Distinguish i[34567]86
6233         # Also, do not run mips-tfile on MIPS if using gas.
6234         # Process --with-cpu= for PowerPC/rs6000
6235         target_cpu_default2=
6236         case $machine in
6237         i486-*-*)
6238                 target_cpu_default2=1
6239                 ;;
6240         i586-*-*)
6241                 case $target_alias in
6242                         k6-*)
6243                                 target_cpu_default2=4
6244                                 ;;
6245                         *)
6246                                 target_cpu_default2=2
6247                                 ;;
6248                 esac
6249                 ;;
6250         i686-*-* | i786-*-*)
6251                 target_cpu_default2=3
6252                 ;;
6253         alpha*-*-*)
6254                 case $machine in
6255                         alphaev6[78]*)
6256                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
6257                                 ;;
6258                         alphaev6*)
6259                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
6260                                 ;;
6261                         alphapca56*)
6262                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
6263                                 ;;
6264                         alphaev56*)
6265                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
6266                                 ;;
6267                         alphaev5*)
6268                                 target_cpu_default2="MASK_CPU_EV5"
6269                                 ;;
6270                 esac
6271                                 
6272                 if test x$gas = xyes
6273                 then
6274                         if test "$target_cpu_default2" = ""
6275                         then
6276                                 target_cpu_default2="MASK_GAS"
6277                         else
6278                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
6279                         fi
6280                 fi
6281                 ;;
6282         arm*-*-*)
6283                 case "x$with_cpu" in
6284                         x)
6285                                 # The most generic
6286                                 target_cpu_default2="TARGET_CPU_generic"
6287                                 ;;
6288
6289                         # Distinguish cores, and major variants
6290                         # arm7m doesn't exist, but D & I don't affect code
6291                         xarm[23678] | xarm250 | xarm[67][01]0 \
6292                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
6293                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
6294                         | xstrongarm | xstrongarm110 | xstrongarm1100)
6295                                 target_cpu_default2="TARGET_CPU_$with_cpu"
6296                                 ;;
6297
6298                         xyes | xno)
6299                                 echo "--with-cpu must be passed a value" 1>&2
6300                                 exit 1
6301                                 ;;
6302
6303                         *)
6304                                 if test x$pass2done = xyes
6305                                 then
6306                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6307                                         exit 1
6308                                 fi
6309                                 ;;
6310                 esac
6311                 ;;
6312
6313         mips*-*-ecoff* | mips*-*-elf*)
6314                 if test x$gas = xyes
6315                 then
6316                         if test x$gnu_ld = xyes
6317                         then
6318                                 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
6319                         else
6320                                 target_cpu_default2="MASK_GAS"
6321                         fi
6322                 fi
6323                 ;;
6324         mips*-*-*)
6325                 if test x$gas = xyes
6326                 then
6327                         target_cpu_default2="MASK_GAS"
6328                 fi
6329                 ;;
6330         powerpc*-*-* | rs6000-*-*)
6331                 case "x$with_cpu" in
6332                         x)
6333                                 ;;
6334
6335                         xcommon | xpower | xpower2 | xpowerpc | xrios \
6336                           | xrios1 | xrios2 | xrsc | xrsc1 \
6337                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
6338                           | xec603e | x740 | x750 | x401 \
6339                           | x403 | x505 | x801 | x821 | x823 | x860)
6340                                 target_cpu_default2="\"$with_cpu\""
6341                                 ;;
6342
6343                         xyes | xno)
6344                                 echo "--with-cpu must be passed a value" 1>&2
6345                                 exit 1
6346                                 ;;
6347
6348                         *)
6349                                 if test x$pass2done = xyes
6350                                 then
6351                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6352                                         exit 1
6353                                 fi
6354                                 ;;
6355                 esac
6356                 ;;
6357         sparc*-*-*)
6358                 case ".$with_cpu" in
6359                         .)
6360                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
6361                                 ;;
6362                         .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
6363                                 target_cpu_default2="TARGET_CPU_$with_cpu"
6364                                 ;;
6365                         *)
6366                                 if test x$pass2done = xyes
6367                                 then
6368                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6369                                         exit 1
6370                                 fi
6371                                 ;;
6372                 esac
6373                 ;;
6374         esac
6375
6376         if test "$target_cpu_default2" != ""
6377         then
6378                 if test "$target_cpu_default" != ""
6379                 then
6380                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
6381                 else
6382                         target_cpu_default=$target_cpu_default2
6383                 fi
6384         fi
6385
6386         # No need for collect2 if we have the GNU linker.
6387         # Actually, there is now; GNU ld doesn't handle the EH info or
6388         # collecting for shared libraries.
6389         #case x$gnu_ld in
6390         #xyes)
6391         #       use_collect2=
6392         #       ;;
6393         #esac
6394
6395 # Save data on machine being used to compile GCC in build_xm_file.
6396 # Save data on host machine in vars host_xm_file and host_xmake_file.
6397         if test x$pass1done = x
6398         then
6399                 if test x"$xm_file" = x
6400                 then build_xm_file=$cpu_type/xm-$cpu_type.h
6401                 else build_xm_file=$xm_file
6402                 fi
6403                 build_xm_defines=$xm_defines
6404                 build_install_headers_dir=$install_headers_dir
6405                 build_exeext=$exeext
6406                 pass1done=yes
6407         else
6408                 if test x$pass2done = x
6409                 then
6410                         if test x"$xm_file" = x
6411                         then host_xm_file=$cpu_type/xm-$cpu_type.h
6412                         else host_xm_file=$xm_file
6413                         fi
6414                         host_xm_defines=$xm_defines
6415                         if test x"$xmake_file" = x
6416                         then xmake_file=$cpu_type/x-$cpu_type
6417                         fi
6418                         host_xmake_file="$xmake_file"
6419                         host_truncate_target=$truncate_target
6420                         host_extra_gcc_objs=$extra_gcc_objs
6421                         host_extra_objs=$extra_host_objs
6422                         host_exeext=$exeext
6423                         pass2done=yes
6424                 fi
6425         fi
6426 done
6427
6428 extra_objs="${host_extra_objs} ${extra_objs}"
6429
6430 # Default the target-machine variables that were not explicitly set.
6431 if test x"$tm_file" = x
6432 then tm_file=$cpu_type/$cpu_type.h; fi
6433
6434 if test x$extra_headers = x
6435 then extra_headers=; fi
6436
6437 if test x"$xm_file" = x
6438 then xm_file=$cpu_type/xm-$cpu_type.h; fi
6439
6440 if test x$md_file = x
6441 then md_file=$cpu_type/$cpu_type.md; fi
6442
6443 if test x$out_file = x
6444 then out_file=$cpu_type/$cpu_type.c; fi
6445
6446 if test x"$tmake_file" = x
6447 then tmake_file=$cpu_type/t-$cpu_type
6448 fi
6449
6450 if test x"$dwarf2" = xyes
6451 then tm_file="$tm_file tm-dwarf2.h"
6452 fi
6453
6454 if test x$float_format = x
6455 then float_format=i64
6456 fi
6457
6458 if test $float_format = none
6459 then float_h_file=Makefile.in
6460 else float_h_file=float-$float_format.h
6461 fi
6462
6463 # Handle cpp installation.
6464 if test x$enable_cpp != xno
6465 then
6466   tmake_file="$tmake_file t-install-cpp"
6467 fi
6468
6469 # Say what files are being used for the output code and MD file.
6470 echo "Using \`$srcdir/config/$out_file' to output insns."
6471 echo "Using \`$srcdir/config/$md_file' as machine description file."
6472
6473 count=a
6474 for f in $tm_file; do
6475         count=${count}x
6476 done
6477 if test $count = ax; then
6478         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
6479 else
6480         echo "Using the following target machine macro files:"
6481         for f in $tm_file; do
6482                 echo "  $srcdir/config/$f"
6483         done
6484 fi
6485
6486 count=a
6487 for f in $host_xm_file; do
6488         count=${count}x
6489 done
6490 if test $count = ax; then
6491         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
6492 else
6493         echo "Using the following host machine macro files:"
6494         for f in $host_xm_file; do
6495                 echo "  $srcdir/config/$f"
6496         done
6497 fi
6498
6499 if test "$host_xm_file" != "$build_xm_file"; then
6500         count=a
6501         for f in $build_xm_file; do
6502                 count=${count}x
6503         done
6504         if test $count = ax; then
6505                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
6506         else
6507                 echo "Using the following build machine macro files:"
6508                 for f in $build_xm_file; do
6509                         echo "  $srcdir/config/$f"
6510                 done
6511         fi
6512 fi
6513
6514 if test x$thread_file = x; then
6515         if test x$target_thread_file != x; then
6516                 thread_file=$target_thread_file
6517         else
6518                 thread_file='single'
6519         fi
6520 fi
6521
6522 # Set up the header files.
6523 # $links is the list of header files to create.
6524 # $vars is the list of shell variables with file names to include.
6525 # auto-host.h is the file containing items generated by autoconf and is
6526 # the first file included by config.h.
6527 null_defines=
6528 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
6529
6530 # If host=build, it is correct to have hconfig include auto-host.h
6531 # as well.  If host!=build, we are in error and need to do more 
6532 # work to find out the build config parameters.
6533 if test x$host = x$build
6534 then
6535         build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
6536 else
6537         # We create a subdir, then run autoconf in the subdir.
6538         # To prevent recursion we set host and build for the new
6539         # invocation of configure to the build for this invocation
6540         # of configure. 
6541         tempdir=build.$$
6542         rm -rf $tempdir
6543         mkdir $tempdir
6544         cd $tempdir
6545         case ${srcdir} in
6546         /*) realsrcdir=${srcdir};;
6547         *) realsrcdir=../${srcdir};;
6548         esac
6549         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
6550                 --target=$target --host=$build --build=$build
6551
6552         # We just finished tests for the build machine, so rename
6553         # the file auto-build.h in the gcc directory.
6554         mv auto-host.h ../auto-build.h
6555         cd ..
6556         rm -rf $tempdir
6557         build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
6558 fi
6559
6560 xm_file="gansidecl.h ${xm_file}"
6561 tm_file="gansidecl.h ${tm_file}"
6562
6563 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
6564 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
6565 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
6566
6567 rm -f config.bak
6568 if test -f config.status; then mv -f config.status config.bak; fi
6569
6570 # Make the links.
6571 while test -n "$vars"
6572 do
6573         set $vars; var=$1; shift; vars=$*
6574         set $links; link=$1; shift; links=$*
6575         set $defines; define=$1; shift; defines=$*
6576
6577         rm -f $link
6578         # Make sure the file is created, even if it is empty.
6579         echo >$link
6580
6581         # Define TARGET_CPU_DEFAULT if the system wants one.
6582         # This substitutes for lots of *.h files.
6583         if test "$target_cpu_default" != "" -a $link = tm.h
6584         then
6585                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
6586         fi
6587
6588         for file in `eval echo '$'$var`; do
6589                 case $file in
6590                 auto-config.h)
6591                         ;;
6592                 *)
6593                         echo '#ifdef IN_GCC' >>$link
6594                         ;;
6595                 esac
6596                 echo "#include \"$file\"" >>$link
6597                 case $file in
6598                 auto-config.h)
6599                         ;;
6600                 *)
6601                         echo '#endif' >>$link
6602                         ;;
6603                 esac
6604         done
6605
6606         for def in `eval echo '$'$define`; do
6607                 echo "#ifndef $def" >>$link
6608                 echo "#define $def" >>$link
6609                 echo "#endif" >>$link
6610         done
6611 done
6612
6613 # Truncate the target if necessary
6614 if test x$host_truncate_target != x; then
6615         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
6616 fi
6617
6618 # Get the version trigger filename from the toplevel
6619 if test "${with_gcc_version_trigger+set}" = set; then
6620         gcc_version_trigger=$with_gcc_version_trigger
6621 else
6622         gcc_version_trigger=${srcdir}/version.c
6623 fi
6624 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
6625
6626 # Internationalization
6627 PACKAGE=gcc
6628 VERSION="$gcc_version"
6629 cat >> confdefs.h <<EOF
6630 #define PACKAGE "$PACKAGE"
6631 EOF
6632
6633 cat >> confdefs.h <<EOF
6634 #define VERSION "$VERSION"
6635 EOF
6636
6637
6638
6639
6640 ALL_LINGUAS="en_UK"
6641
6642 # NLS support is still experimental, so disable it by default for now.
6643 # Check whether --enable-nls or --disable-nls was given.
6644 if test "${enable_nls+set}" = set; then
6645   enableval="$enable_nls"
6646   :
6647 else
6648   enable_nls=no
6649 fi
6650
6651
6652
6653         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
6654 echo "configure:6655: checking for strerror in -lcposix" >&5
6655 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
6656 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   ac_save_LIBS="$LIBS"
6660 LIBS="-lcposix  $LIBS"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char strerror();
6668
6669 int main() {
6670 strerror()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 LIBS="$ac_save_LIBS"
6684
6685 fi
6686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688   LIBS="$LIBS -lcposix"
6689 else
6690   echo "$ac_t""no" 1>&6
6691 fi
6692
6693   
6694
6695 echo $ac_n "checking for working const""... $ac_c" 1>&6
6696 echo "configure:6697: checking for working const" >&5
6697 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6698   echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703
6704 int main() {
6705
6706 /* Ultrix mips cc rejects this.  */
6707 typedef int charset[2]; const charset x;
6708 /* SunOS 4.1.1 cc rejects this.  */
6709 char const *const *ccp;
6710 char **p;
6711 /* NEC SVR4.0.2 mips cc rejects this.  */
6712 struct point {int x, y;};
6713 static struct point const zero = {0,0};
6714 /* AIX XL C 1.02.0.0 rejects this.
6715    It does not let you subtract one const X* pointer from another in an arm
6716    of an if-expression whose if-part is not a constant expression */
6717 const char *g = "string";
6718 ccp = &g + (g ? g-g : 0);
6719 /* HPUX 7.0 cc rejects these. */
6720 ++ccp;
6721 p = (char**) ccp;
6722 ccp = (char const *const *) p;
6723 { /* SCO 3.2v4 cc rejects this.  */
6724   char *t;
6725   char const *s = 0 ? (char *) 0 : (char const *) 0;
6726
6727   *t++ = 0;
6728 }
6729 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6730   int x[] = {25, 17};
6731   const int *foo = &x[0];
6732   ++foo;
6733 }
6734 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6735   typedef const int *iptr;
6736   iptr p = 0;
6737   ++p;
6738 }
6739 { /* AIX XL C 1.02.0.0 rejects this saying
6740      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6741   struct s { int j; const int *ap[3]; };
6742   struct s *b; b->j = 5;
6743 }
6744 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6745   const int foo = 10;
6746 }
6747
6748 ; return 0; }
6749 EOF
6750 if { (eval echo configure:6751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6751   rm -rf conftest*
6752   ac_cv_c_const=yes
6753 else
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   ac_cv_c_const=no
6758 fi
6759 rm -f conftest*
6760 fi
6761
6762 echo "$ac_t""$ac_cv_c_const" 1>&6
6763 if test $ac_cv_c_const = no; then
6764   cat >> confdefs.h <<\EOF
6765 #define const 
6766 EOF
6767
6768 fi
6769
6770 echo $ac_n "checking for inline""... $ac_c" 1>&6
6771 echo "configure:6772: checking for inline" >&5
6772 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
6773   echo $ac_n "(cached) $ac_c" 1>&6
6774 else
6775   ac_cv_c_inline=no
6776 for ac_kw in inline __inline__ __inline; do
6777   cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780
6781 int main() {
6782 } $ac_kw foo() {
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6786   rm -rf conftest*
6787   ac_cv_c_inline=$ac_kw; break
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791 fi
6792 rm -f conftest*
6793 done
6794
6795 fi
6796
6797 echo "$ac_t""$ac_cv_c_inline" 1>&6
6798 case "$ac_cv_c_inline" in
6799   inline | yes) ;;
6800   no) cat >> confdefs.h <<\EOF
6801 #define inline 
6802 EOF
6803  ;;
6804   *)  cat >> confdefs.h <<EOF
6805 #define inline $ac_cv_c_inline
6806 EOF
6807  ;;
6808 esac
6809
6810 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6811 echo "configure:6812: checking for off_t" >&5
6812 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6813   echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815   cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818 #include <sys/types.h>
6819 #if STDC_HEADERS
6820 #include <stdlib.h>
6821 #include <stddef.h>
6822 #endif
6823 EOF
6824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6825   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6826   rm -rf conftest*
6827   ac_cv_type_off_t=yes
6828 else
6829   rm -rf conftest*
6830   ac_cv_type_off_t=no
6831 fi
6832 rm -f conftest*
6833
6834 fi
6835 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6836 if test $ac_cv_type_off_t = no; then
6837   cat >> confdefs.h <<\EOF
6838 #define off_t long
6839 EOF
6840
6841 fi
6842
6843 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6844 echo "configure:6845: checking for size_t" >&5
6845 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6846   echo $ac_n "(cached) $ac_c" 1>&6
6847 else
6848   cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851 #include <sys/types.h>
6852 #if STDC_HEADERS
6853 #include <stdlib.h>
6854 #include <stddef.h>
6855 #endif
6856 EOF
6857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6858   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6859   rm -rf conftest*
6860   ac_cv_type_size_t=yes
6861 else
6862   rm -rf conftest*
6863   ac_cv_type_size_t=no
6864 fi
6865 rm -f conftest*
6866
6867 fi
6868 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6869 if test $ac_cv_type_size_t = no; then
6870   cat >> confdefs.h <<\EOF
6871 #define size_t unsigned
6872 EOF
6873
6874 fi
6875
6876 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6877 # for constant arguments.  Useless!
6878 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6879 echo "configure:6880: checking for working alloca.h" >&5
6880 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 #include <alloca.h>
6887 int main() {
6888 char *p = alloca(2 * sizeof(int));
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   ac_cv_header_alloca_h=yes
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   ac_cv_header_alloca_h=no
6899 fi
6900 rm -f conftest*
6901 fi
6902
6903 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6904 if test $ac_cv_header_alloca_h = yes; then
6905   cat >> confdefs.h <<\EOF
6906 #define HAVE_ALLOCA_H 1
6907 EOF
6908
6909 fi
6910
6911 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6912 echo "configure:6913: checking for alloca" >&5
6913 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6914   echo $ac_n "(cached) $ac_c" 1>&6
6915 else
6916   cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919
6920 #ifdef __GNUC__
6921 # define alloca __builtin_alloca
6922 #else
6923 # ifdef _MSC_VER
6924 #  include <malloc.h>
6925 #  define alloca _alloca
6926 # else
6927 #  if HAVE_ALLOCA_H
6928 #   include <alloca.h>
6929 #  else
6930 #   ifdef _AIX
6931  #pragma alloca
6932 #   else
6933 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6934 char *alloca ();
6935 #    endif
6936 #   endif
6937 #  endif
6938 # endif
6939 #endif
6940
6941 int main() {
6942 char *p = (char *) alloca(1);
6943 ; return 0; }
6944 EOF
6945 if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946   rm -rf conftest*
6947   ac_cv_func_alloca_works=yes
6948 else
6949   echo "configure: failed program was:" >&5
6950   cat conftest.$ac_ext >&5
6951   rm -rf conftest*
6952   ac_cv_func_alloca_works=no
6953 fi
6954 rm -f conftest*
6955 fi
6956
6957 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6958 if test $ac_cv_func_alloca_works = yes; then
6959   cat >> confdefs.h <<\EOF
6960 #define HAVE_ALLOCA 1
6961 EOF
6962
6963 fi
6964
6965 if test $ac_cv_func_alloca_works = no; then
6966   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6967   # that cause trouble.  Some versions do not even contain alloca or
6968   # contain a buggy version.  If you still want to use their alloca,
6969   # use ar to extract alloca.o from them instead of compiling alloca.c.
6970   ALLOCA=alloca.${ac_objext}
6971   cat >> confdefs.h <<\EOF
6972 #define C_ALLOCA 1
6973 EOF
6974
6975
6976 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6977 echo "configure:6978: checking whether alloca needs Cray hooks" >&5
6978 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6979   echo $ac_n "(cached) $ac_c" 1>&6
6980 else
6981   cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 #if defined(CRAY) && ! defined(CRAY2)
6985 webecray
6986 #else
6987 wenotbecray
6988 #endif
6989
6990 EOF
6991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6992   egrep "webecray" >/dev/null 2>&1; then
6993   rm -rf conftest*
6994   ac_cv_os_cray=yes
6995 else
6996   rm -rf conftest*
6997   ac_cv_os_cray=no
6998 fi
6999 rm -f conftest*
7000
7001 fi
7002
7003 echo "$ac_t""$ac_cv_os_cray" 1>&6
7004 if test $ac_cv_os_cray = yes; then
7005 for ac_func in _getb67 GETB67 getb67; do
7006   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7007 echo "configure:7008: checking for $ac_func" >&5
7008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7009   echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 /* System header to define __stub macros and hopefully few prototypes,
7015     which can conflict with char $ac_func(); below.  */
7016 #include <assert.h>
7017 /* Override any gcc2 internal prototype to avoid an error.  */
7018 /* We use char because int might match the return type of a gcc2
7019     builtin and then its argument prototype would still apply.  */
7020 char $ac_func();
7021
7022 int main() {
7023
7024 /* The GNU C library defines this for functions which it implements
7025     to always fail with ENOSYS.  Some functions are actually named
7026     something starting with __ and the normal name is an alias.  */
7027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028 choke me
7029 #else
7030 $ac_func();
7031 #endif
7032
7033 ; return 0; }
7034 EOF
7035 if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7036   rm -rf conftest*
7037   eval "ac_cv_func_$ac_func=yes"
7038 else
7039   echo "configure: failed program was:" >&5
7040   cat conftest.$ac_ext >&5
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=no"
7043 fi
7044 rm -f conftest*
7045 fi
7046
7047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048   echo "$ac_t""yes" 1>&6
7049   cat >> confdefs.h <<EOF
7050 #define CRAY_STACKSEG_END $ac_func
7051 EOF
7052
7053   break
7054 else
7055   echo "$ac_t""no" 1>&6
7056 fi
7057
7058 done
7059 fi
7060
7061 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
7062 echo "configure:7063: checking stack direction for C alloca" >&5
7063 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   if test "$cross_compiling" = yes; then
7067   ac_cv_c_stack_direction=0
7068 else
7069   cat > conftest.$ac_ext <<EOF
7070 #line 7071 "configure"
7071 #include "confdefs.h"
7072 find_stack_direction ()
7073 {
7074   static char *addr = 0;
7075   auto char dummy;
7076   if (addr == 0)
7077     {
7078       addr = &dummy;
7079       return find_stack_direction ();
7080     }
7081   else
7082     return (&dummy > addr) ? 1 : -1;
7083 }
7084 main ()
7085 {
7086   exit (find_stack_direction() < 0);
7087 }
7088 EOF
7089 if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7090 then
7091   ac_cv_c_stack_direction=1
7092 else
7093   echo "configure: failed program was:" >&5
7094   cat conftest.$ac_ext >&5
7095   rm -fr conftest*
7096   ac_cv_c_stack_direction=-1
7097 fi
7098 rm -fr conftest*
7099 fi
7100
7101 fi
7102
7103 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
7104 cat >> confdefs.h <<EOF
7105 #define STACK_DIRECTION $ac_cv_c_stack_direction
7106 EOF
7107
7108 fi
7109
7110                            
7111    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7112 unistd.h sys/param.h
7113 do
7114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7116 echo "configure:7117: checking for $ac_hdr" >&5
7117 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   cat > conftest.$ac_ext <<EOF
7121 #line 7122 "configure"
7122 #include "confdefs.h"
7123 #include <$ac_hdr>
7124 EOF
7125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7126 { (eval echo configure:7127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7128 if test -z "$ac_err"; then
7129   rm -rf conftest*
7130   eval "ac_cv_header_$ac_safe=yes"
7131 else
7132   echo "$ac_err" >&5
7133   echo "configure: failed program was:" >&5
7134   cat conftest.$ac_ext >&5
7135   rm -rf conftest*
7136   eval "ac_cv_header_$ac_safe=no"
7137 fi
7138 rm -f conftest*
7139 fi
7140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7141   echo "$ac_t""yes" 1>&6
7142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7143   cat >> confdefs.h <<EOF
7144 #define $ac_tr_hdr 1
7145 EOF
7146  
7147 else
7148   echo "$ac_t""no" 1>&6
7149 fi
7150 done
7151
7152    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7153 strdup __argz_count __argz_stringify __argz_next
7154 do
7155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7156 echo "configure:7157: checking for $ac_func" >&5
7157 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7158   echo $ac_n "(cached) $ac_c" 1>&6
7159 else
7160   cat > conftest.$ac_ext <<EOF
7161 #line 7162 "configure"
7162 #include "confdefs.h"
7163 /* System header to define __stub macros and hopefully few prototypes,
7164     which can conflict with char $ac_func(); below.  */
7165 #include <assert.h>
7166 /* Override any gcc2 internal prototype to avoid an error.  */
7167 /* We use char because int might match the return type of a gcc2
7168     builtin and then its argument prototype would still apply.  */
7169 char $ac_func();
7170
7171 int main() {
7172
7173 /* The GNU C library defines this for functions which it implements
7174     to always fail with ENOSYS.  Some functions are actually named
7175     something starting with __ and the normal name is an alias.  */
7176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7177 choke me
7178 #else
7179 $ac_func();
7180 #endif
7181
7182 ; return 0; }
7183 EOF
7184 if { (eval echo configure:7185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7185   rm -rf conftest*
7186   eval "ac_cv_func_$ac_func=yes"
7187 else
7188   echo "configure: failed program was:" >&5
7189   cat conftest.$ac_ext >&5
7190   rm -rf conftest*
7191   eval "ac_cv_func_$ac_func=no"
7192 fi
7193 rm -f conftest*
7194 fi
7195
7196 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7197   echo "$ac_t""yes" 1>&6
7198     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7199   cat >> confdefs.h <<EOF
7200 #define $ac_tr_func 1
7201 EOF
7202  
7203 else
7204   echo "$ac_t""no" 1>&6
7205 fi
7206 done
7207
7208
7209    if test "${ac_cv_func_stpcpy+set}" != "set"; then
7210      for ac_func in stpcpy
7211 do
7212 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7213 echo "configure:7214: checking for $ac_func" >&5
7214 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7215   echo $ac_n "(cached) $ac_c" 1>&6
7216 else
7217   cat > conftest.$ac_ext <<EOF
7218 #line 7219 "configure"
7219 #include "confdefs.h"
7220 /* System header to define __stub macros and hopefully few prototypes,
7221     which can conflict with char $ac_func(); below.  */
7222 #include <assert.h>
7223 /* Override any gcc2 internal prototype to avoid an error.  */
7224 /* We use char because int might match the return type of a gcc2
7225     builtin and then its argument prototype would still apply.  */
7226 char $ac_func();
7227
7228 int main() {
7229
7230 /* The GNU C library defines this for functions which it implements
7231     to always fail with ENOSYS.  Some functions are actually named
7232     something starting with __ and the normal name is an alias.  */
7233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7234 choke me
7235 #else
7236 $ac_func();
7237 #endif
7238
7239 ; return 0; }
7240 EOF
7241 if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7242   rm -rf conftest*
7243   eval "ac_cv_func_$ac_func=yes"
7244 else
7245   echo "configure: failed program was:" >&5
7246   cat conftest.$ac_ext >&5
7247   rm -rf conftest*
7248   eval "ac_cv_func_$ac_func=no"
7249 fi
7250 rm -f conftest*
7251 fi
7252
7253 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7254   echo "$ac_t""yes" 1>&6
7255     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7256   cat >> confdefs.h <<EOF
7257 #define $ac_tr_func 1
7258 EOF
7259  
7260 else
7261   echo "$ac_t""no" 1>&6
7262 fi
7263 done
7264
7265    fi
7266    if test "${ac_cv_func_stpcpy}" = "yes"; then
7267      cat >> confdefs.h <<\EOF
7268 #define HAVE_STPCPY 1
7269 EOF
7270
7271    fi
7272
7273    if test $ac_cv_header_locale_h = yes; then
7274     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
7275 echo "configure:7276: checking for LC_MESSAGES" >&5
7276 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
7277   echo $ac_n "(cached) $ac_c" 1>&6
7278 else
7279   cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282 #include <locale.h>
7283 int main() {
7284 return LC_MESSAGES
7285 ; return 0; }
7286 EOF
7287 if { (eval echo configure:7288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7288   rm -rf conftest*
7289   am_cv_val_LC_MESSAGES=yes
7290 else
7291   echo "configure: failed program was:" >&5
7292   cat conftest.$ac_ext >&5
7293   rm -rf conftest*
7294   am_cv_val_LC_MESSAGES=no
7295 fi
7296 rm -f conftest*
7297 fi
7298
7299 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
7300     if test $am_cv_val_LC_MESSAGES = yes; then
7301       cat >> confdefs.h <<\EOF
7302 #define HAVE_LC_MESSAGES 1
7303 EOF
7304
7305     fi
7306   fi
7307    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
7308 echo "configure:7309: checking whether NLS is requested" >&5
7309         # Check whether --enable-nls or --disable-nls was given.
7310 if test "${enable_nls+set}" = set; then
7311   enableval="$enable_nls"
7312   USE_NLS=$enableval
7313 else
7314   USE_NLS=yes
7315 fi
7316
7317     echo "$ac_t""$USE_NLS" 1>&6
7318     
7319
7320     USE_INCLUDED_LIBINTL=no
7321
7322         if test "$USE_NLS" = "yes"; then
7323       cat >> confdefs.h <<\EOF
7324 #define ENABLE_NLS 1
7325 EOF
7326
7327       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
7328 echo "configure:7329: checking whether included gettext is requested" >&5
7329       # Check whether --with-included-gettext or --without-included-gettext was given.
7330 if test "${with_included_gettext+set}" = set; then
7331   withval="$with_included_gettext"
7332   nls_cv_force_use_gnu_gettext=$withval
7333 else
7334   nls_cv_force_use_gnu_gettext=no
7335 fi
7336
7337       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
7338
7339       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7340       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7341                                         nls_cv_header_intl=
7342         nls_cv_header_libgt=
7343         CATOBJEXT=NONE
7344
7345         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
7346 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
7347 echo "configure:7348: checking for libintl.h" >&5
7348 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7349   echo $ac_n "(cached) $ac_c" 1>&6
7350 else
7351   cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 #include <libintl.h>
7355 EOF
7356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7357 { (eval echo configure:7358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7359 if test -z "$ac_err"; then
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=yes"
7362 else
7363   echo "$ac_err" >&5
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=no"
7368 fi
7369 rm -f conftest*
7370 fi
7371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
7374 echo "configure:7375: checking for gettext in libc" >&5
7375 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
7376   echo $ac_n "(cached) $ac_c" 1>&6
7377 else
7378   cat > conftest.$ac_ext <<EOF
7379 #line 7380 "configure"
7380 #include "confdefs.h"
7381 #include <libintl.h>
7382 int main() {
7383 return (int) gettext ("")
7384 ; return 0; }
7385 EOF
7386 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7387   rm -rf conftest*
7388   gt_cv_func_gettext_libc=yes
7389 else
7390   echo "configure: failed program was:" >&5
7391   cat conftest.$ac_ext >&5
7392   rm -rf conftest*
7393   gt_cv_func_gettext_libc=no
7394 fi
7395 rm -f conftest*
7396 fi
7397
7398 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
7399
7400            if test "$gt_cv_func_gettext_libc" != "yes"; then
7401              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
7402 echo "configure:7403: checking for bindtextdomain in -lintl" >&5
7403 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
7404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7405   echo $ac_n "(cached) $ac_c" 1>&6
7406 else
7407   ac_save_LIBS="$LIBS"
7408 LIBS="-lintl  $LIBS"
7409 cat > conftest.$ac_ext <<EOF
7410 #line 7411 "configure"
7411 #include "confdefs.h"
7412 /* Override any gcc2 internal prototype to avoid an error.  */
7413 /* We use char because int might match the return type of a gcc2
7414     builtin and then its argument prototype would still apply.  */
7415 char bindtextdomain();
7416
7417 int main() {
7418 bindtextdomain()
7419 ; return 0; }
7420 EOF
7421 if { (eval echo configure:7422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7422   rm -rf conftest*
7423   eval "ac_cv_lib_$ac_lib_var=yes"
7424 else
7425   echo "configure: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   rm -rf conftest*
7428   eval "ac_cv_lib_$ac_lib_var=no"
7429 fi
7430 rm -f conftest*
7431 LIBS="$ac_save_LIBS"
7432
7433 fi
7434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7435   echo "$ac_t""yes" 1>&6
7436   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
7437 echo "configure:7438: checking for gettext in libintl" >&5
7438 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
7439   echo $ac_n "(cached) $ac_c" 1>&6
7440 else
7441   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
7442 echo "configure:7443: checking for gettext in -lintl" >&5
7443 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
7444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7445   echo $ac_n "(cached) $ac_c" 1>&6
7446 else
7447   ac_save_LIBS="$LIBS"
7448 LIBS="-lintl  $LIBS"
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char gettext();
7456
7457 int main() {
7458 gettext()
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=yes"
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=no"
7469 fi
7470 rm -f conftest*
7471 LIBS="$ac_save_LIBS"
7472
7473 fi
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7475   echo "$ac_t""yes" 1>&6
7476   gt_cv_func_gettext_libintl=yes
7477 else
7478   echo "$ac_t""no" 1>&6
7479 gt_cv_func_gettext_libintl=no
7480 fi
7481
7482 fi
7483
7484 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
7485 else
7486   echo "$ac_t""no" 1>&6
7487 fi
7488
7489            fi
7490
7491            if test "$gt_cv_func_gettext_libc" = "yes" \
7492               || test "$gt_cv_func_gettext_libintl" = "yes"; then
7493               cat >> confdefs.h <<\EOF
7494 #define HAVE_GETTEXT 1
7495 EOF
7496
7497               # Extract the first word of "msgfmt", so it can be a program name with args.
7498 set dummy msgfmt; ac_word=$2
7499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7500 echo "configure:7501: checking for $ac_word" >&5
7501 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7502   echo $ac_n "(cached) $ac_c" 1>&6
7503 else
7504   case "$MSGFMT" in
7505   /*)
7506   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7507   ;;
7508   *)
7509   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7510   for ac_dir in $PATH; do
7511     test -z "$ac_dir" && ac_dir=.
7512     if test -f $ac_dir/$ac_word; then
7513       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7514         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7515         break
7516       fi
7517     fi
7518   done
7519   IFS="$ac_save_ifs"
7520   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7521   ;;
7522 esac
7523 fi
7524 MSGFMT="$ac_cv_path_MSGFMT"
7525 if test -n "$MSGFMT"; then
7526   echo "$ac_t""$MSGFMT" 1>&6
7527 else
7528   echo "$ac_t""no" 1>&6
7529 fi
7530               if test "$MSGFMT" != "no"; then
7531                 for ac_func in dcgettext
7532 do
7533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7534 echo "configure:7535: checking for $ac_func" >&5
7535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7536   echo $ac_n "(cached) $ac_c" 1>&6
7537 else
7538   cat > conftest.$ac_ext <<EOF
7539 #line 7540 "configure"
7540 #include "confdefs.h"
7541 /* System header to define __stub macros and hopefully few prototypes,
7542     which can conflict with char $ac_func(); below.  */
7543 #include <assert.h>
7544 /* Override any gcc2 internal prototype to avoid an error.  */
7545 /* We use char because int might match the return type of a gcc2
7546     builtin and then its argument prototype would still apply.  */
7547 char $ac_func();
7548
7549 int main() {
7550
7551 /* The GNU C library defines this for functions which it implements
7552     to always fail with ENOSYS.  Some functions are actually named
7553     something starting with __ and the normal name is an alias.  */
7554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7555 choke me
7556 #else
7557 $ac_func();
7558 #endif
7559
7560 ; return 0; }
7561 EOF
7562 if { (eval echo configure:7563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7563   rm -rf conftest*
7564   eval "ac_cv_func_$ac_func=yes"
7565 else
7566   echo "configure: failed program was:" >&5
7567   cat conftest.$ac_ext >&5
7568   rm -rf conftest*
7569   eval "ac_cv_func_$ac_func=no"
7570 fi
7571 rm -f conftest*
7572 fi
7573
7574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7575   echo "$ac_t""yes" 1>&6
7576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7577   cat >> confdefs.h <<EOF
7578 #define $ac_tr_func 1
7579 EOF
7580  
7581 else
7582   echo "$ac_t""no" 1>&6
7583 fi
7584 done
7585
7586                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7587 set dummy gmsgfmt; ac_word=$2
7588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7589 echo "configure:7590: checking for $ac_word" >&5
7590 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7591   echo $ac_n "(cached) $ac_c" 1>&6
7592 else
7593   case "$GMSGFMT" in
7594   /*)
7595   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7596   ;;
7597   ?:/*)                  
7598   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7599   ;;
7600   *)
7601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7602   ac_dummy="$PATH"
7603   for ac_dir in $ac_dummy; do 
7604     test -z "$ac_dir" && ac_dir=.
7605     if test -f $ac_dir/$ac_word; then
7606       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7607       break
7608     fi
7609   done
7610   IFS="$ac_save_ifs"
7611   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7612   ;;
7613 esac
7614 fi
7615 GMSGFMT="$ac_cv_path_GMSGFMT"
7616 if test -n "$GMSGFMT"; then
7617   echo "$ac_t""$GMSGFMT" 1>&6
7618 else
7619   echo "$ac_t""no" 1>&6
7620 fi
7621
7622                 # Extract the first word of "xgettext", so it can be a program name with args.
7623 set dummy xgettext; ac_word=$2
7624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7625 echo "configure:7626: checking for $ac_word" >&5
7626 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   case "$XGETTEXT" in
7630   /*)
7631   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7632   ;;
7633   *)
7634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7635   for ac_dir in $PATH; do
7636     test -z "$ac_dir" && ac_dir=.
7637     if test -f $ac_dir/$ac_word; then
7638       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7639         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7640         break
7641       fi
7642     fi
7643   done
7644   IFS="$ac_save_ifs"
7645   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7646   ;;
7647 esac
7648 fi
7649 XGETTEXT="$ac_cv_path_XGETTEXT"
7650 if test -n "$XGETTEXT"; then
7651   echo "$ac_t""$XGETTEXT" 1>&6
7652 else
7653   echo "$ac_t""no" 1>&6
7654 fi
7655
7656                 cat > conftest.$ac_ext <<EOF
7657 #line 7658 "configure"
7658 #include "confdefs.h"
7659
7660 int main() {
7661 extern int _nl_msg_cat_cntr;
7662                                return _nl_msg_cat_cntr
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7666   rm -rf conftest*
7667   CATOBJEXT=.gmo
7668                    DATADIRNAME=share
7669 else
7670   echo "configure: failed program was:" >&5
7671   cat conftest.$ac_ext >&5
7672   rm -rf conftest*
7673   CATOBJEXT=.mo
7674                    DATADIRNAME=lib
7675 fi
7676 rm -f conftest*
7677                 INSTOBJEXT=.mo
7678               fi
7679             fi
7680         
7681 else
7682   echo "$ac_t""no" 1>&6
7683 fi
7684
7685
7686         if test "$CATOBJEXT" = "NONE"; then
7687           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
7688 echo "configure:7689: checking whether catgets can be used" >&5
7689           # Check whether --with-catgets or --without-catgets was given.
7690 if test "${with_catgets+set}" = set; then
7691   withval="$with_catgets"
7692   nls_cv_use_catgets=$withval
7693 else
7694   nls_cv_use_catgets=no
7695 fi
7696
7697           echo "$ac_t""$nls_cv_use_catgets" 1>&6
7698
7699           if test "$nls_cv_use_catgets" = "yes"; then
7700                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
7701 echo "configure:7702: checking for main in -li" >&5
7702 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
7703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7704   echo $ac_n "(cached) $ac_c" 1>&6
7705 else
7706   ac_save_LIBS="$LIBS"
7707 LIBS="-li  $LIBS"
7708 cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711
7712 int main() {
7713 main()
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   eval "ac_cv_lib_$ac_lib_var=yes"
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   eval "ac_cv_lib_$ac_lib_var=no"
7724 fi
7725 rm -f conftest*
7726 LIBS="$ac_save_LIBS"
7727
7728 fi
7729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7730   echo "$ac_t""yes" 1>&6
7731     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7732     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7733   cat >> confdefs.h <<EOF
7734 #define $ac_tr_lib 1
7735 EOF
7736
7737   LIBS="-li $LIBS"
7738
7739 else
7740   echo "$ac_t""no" 1>&6
7741 fi
7742
7743             echo $ac_n "checking for catgets""... $ac_c" 1>&6
7744 echo "configure:7745: checking for catgets" >&5
7745 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   cat > conftest.$ac_ext <<EOF
7749 #line 7750 "configure"
7750 #include "confdefs.h"
7751 /* System header to define __stub macros and hopefully few prototypes,
7752     which can conflict with char catgets(); below.  */
7753 #include <assert.h>
7754 /* Override any gcc2 internal prototype to avoid an error.  */
7755 /* We use char because int might match the return type of a gcc2
7756     builtin and then its argument prototype would still apply.  */
7757 char catgets();
7758
7759 int main() {
7760
7761 /* The GNU C library defines this for functions which it implements
7762     to always fail with ENOSYS.  Some functions are actually named
7763     something starting with __ and the normal name is an alias.  */
7764 #if defined (__stub_catgets) || defined (__stub___catgets)
7765 choke me
7766 #else
7767 catgets();
7768 #endif
7769
7770 ; return 0; }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7773   rm -rf conftest*
7774   eval "ac_cv_func_catgets=yes"
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -rf conftest*
7779   eval "ac_cv_func_catgets=no"
7780 fi
7781 rm -f conftest*
7782 fi
7783
7784 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
7785   echo "$ac_t""yes" 1>&6
7786   cat >> confdefs.h <<\EOF
7787 #define HAVE_CATGETS 1
7788 EOF
7789
7790                INTLOBJS="\$(CATOBJS)"
7791                # Extract the first word of "gencat", so it can be a program name with args.
7792 set dummy gencat; ac_word=$2
7793 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7794 echo "configure:7795: checking for $ac_word" >&5
7795 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
7796   echo $ac_n "(cached) $ac_c" 1>&6
7797 else
7798   case "$GENCAT" in
7799   /*)
7800   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
7801   ;;
7802   ?:/*)                  
7803   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
7804   ;;
7805   *)
7806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7807   ac_dummy="$PATH"
7808   for ac_dir in $ac_dummy; do 
7809     test -z "$ac_dir" && ac_dir=.
7810     if test -f $ac_dir/$ac_word; then
7811       ac_cv_path_GENCAT="$ac_dir/$ac_word"
7812       break
7813     fi
7814   done
7815   IFS="$ac_save_ifs"
7816   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
7817   ;;
7818 esac
7819 fi
7820 GENCAT="$ac_cv_path_GENCAT"
7821 if test -n "$GENCAT"; then
7822   echo "$ac_t""$GENCAT" 1>&6
7823 else
7824   echo "$ac_t""no" 1>&6
7825 fi
7826                if test "$GENCAT" != "no"; then
7827                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
7828 set dummy gmsgfmt; ac_word=$2
7829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7830 echo "configure:7831: checking for $ac_word" >&5
7831 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7832   echo $ac_n "(cached) $ac_c" 1>&6
7833 else
7834   case "$GMSGFMT" in
7835   /*)
7836   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7837   ;;
7838   ?:/*)                  
7839   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7840   ;;
7841   *)
7842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7843   ac_dummy="$PATH"
7844   for ac_dir in $ac_dummy; do 
7845     test -z "$ac_dir" && ac_dir=.
7846     if test -f $ac_dir/$ac_word; then
7847       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7848       break
7849     fi
7850   done
7851   IFS="$ac_save_ifs"
7852   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7853   ;;
7854 esac
7855 fi
7856 GMSGFMT="$ac_cv_path_GMSGFMT"
7857 if test -n "$GMSGFMT"; then
7858   echo "$ac_t""$GMSGFMT" 1>&6
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862
7863                  if test "$GMSGFMT" = "no"; then
7864                    # Extract the first word of "msgfmt", so it can be a program name with args.
7865 set dummy msgfmt; ac_word=$2
7866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7867 echo "configure:7868: checking for $ac_word" >&5
7868 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7869   echo $ac_n "(cached) $ac_c" 1>&6
7870 else
7871   case "$GMSGFMT" in
7872   /*)
7873   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7874   ;;
7875   *)
7876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7877   for ac_dir in $PATH; do
7878     test -z "$ac_dir" && ac_dir=.
7879     if test -f $ac_dir/$ac_word; then
7880       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7881         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7882         break
7883       fi
7884     fi
7885   done
7886   IFS="$ac_save_ifs"
7887   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7888   ;;
7889 esac
7890 fi
7891 GMSGFMT="$ac_cv_path_GMSGFMT"
7892 if test -n "$GMSGFMT"; then
7893   echo "$ac_t""$GMSGFMT" 1>&6
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897
7898                  fi
7899                  # Extract the first word of "xgettext", so it can be a program name with args.
7900 set dummy xgettext; ac_word=$2
7901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7902 echo "configure:7903: checking for $ac_word" >&5
7903 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7904   echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906   case "$XGETTEXT" in
7907   /*)
7908   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7909   ;;
7910   *)
7911   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7912   for ac_dir in $PATH; do
7913     test -z "$ac_dir" && ac_dir=.
7914     if test -f $ac_dir/$ac_word; then
7915       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7916         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7917         break
7918       fi
7919     fi
7920   done
7921   IFS="$ac_save_ifs"
7922   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7923   ;;
7924 esac
7925 fi
7926 XGETTEXT="$ac_cv_path_XGETTEXT"
7927 if test -n "$XGETTEXT"; then
7928   echo "$ac_t""$XGETTEXT" 1>&6
7929 else
7930   echo "$ac_t""no" 1>&6
7931 fi
7932
7933                  USE_INCLUDED_LIBINTL=yes
7934                  CATOBJEXT=.cat
7935                  INSTOBJEXT=.cat
7936                  DATADIRNAME=lib
7937                  INTLDEPS='$(top_builddir)/intl/libintl.a'
7938                  INTLLIBS=$INTLDEPS
7939                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7940                  nls_cv_header_intl=intl/libintl.h
7941                  nls_cv_header_libgt=intl/libgettext.h
7942                fi
7943 else
7944   echo "$ac_t""no" 1>&6
7945 fi
7946
7947           fi
7948         fi
7949
7950         if test "$CATOBJEXT" = "NONE"; then
7951                           nls_cv_use_gnu_gettext=yes
7952         fi
7953       fi
7954
7955       if test "$nls_cv_use_gnu_gettext" = "yes"; then
7956                 INTLOBJS="\$(GETTOBJS)"
7957         # Extract the first word of "msgfmt", so it can be a program name with args.
7958 set dummy msgfmt; ac_word=$2
7959 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7960 echo "configure:7961: checking for $ac_word" >&5
7961 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7962   echo $ac_n "(cached) $ac_c" 1>&6
7963 else
7964   case "$MSGFMT" in
7965   /*)
7966   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7967   ;;
7968   *)
7969   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7970   for ac_dir in $PATH; do
7971     test -z "$ac_dir" && ac_dir=.
7972     if test -f $ac_dir/$ac_word; then
7973       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7974         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7975         break
7976       fi
7977     fi
7978   done
7979   IFS="$ac_save_ifs"
7980   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
7981   ;;
7982 esac
7983 fi
7984 MSGFMT="$ac_cv_path_MSGFMT"
7985 if test -n "$MSGFMT"; then
7986   echo "$ac_t""$MSGFMT" 1>&6
7987 else
7988   echo "$ac_t""no" 1>&6
7989 fi
7990
7991         # Extract the first word of "gmsgfmt", so it can be a program name with args.
7992 set dummy gmsgfmt; ac_word=$2
7993 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7994 echo "configure:7995: checking for $ac_word" >&5
7995 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7996   echo $ac_n "(cached) $ac_c" 1>&6
7997 else
7998   case "$GMSGFMT" in
7999   /*)
8000   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8001   ;;
8002   ?:/*)                  
8003   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
8004   ;;
8005   *)
8006   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8007   ac_dummy="$PATH"
8008   for ac_dir in $ac_dummy; do 
8009     test -z "$ac_dir" && ac_dir=.
8010     if test -f $ac_dir/$ac_word; then
8011       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8012       break
8013     fi
8014   done
8015   IFS="$ac_save_ifs"
8016   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8017   ;;
8018 esac
8019 fi
8020 GMSGFMT="$ac_cv_path_GMSGFMT"
8021 if test -n "$GMSGFMT"; then
8022   echo "$ac_t""$GMSGFMT" 1>&6
8023 else
8024   echo "$ac_t""no" 1>&6
8025 fi
8026
8027         # Extract the first word of "xgettext", so it can be a program name with args.
8028 set dummy xgettext; ac_word=$2
8029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8030 echo "configure:8031: checking for $ac_word" >&5
8031 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
8032   echo $ac_n "(cached) $ac_c" 1>&6
8033 else
8034   case "$XGETTEXT" in
8035   /*)
8036   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8037   ;;
8038   *)
8039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8040   for ac_dir in $PATH; do
8041     test -z "$ac_dir" && ac_dir=.
8042     if test -f $ac_dir/$ac_word; then
8043       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8044         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8045         break
8046       fi
8047     fi
8048   done
8049   IFS="$ac_save_ifs"
8050   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8051   ;;
8052 esac
8053 fi
8054 XGETTEXT="$ac_cv_path_XGETTEXT"
8055 if test -n "$XGETTEXT"; then
8056   echo "$ac_t""$XGETTEXT" 1>&6
8057 else
8058   echo "$ac_t""no" 1>&6
8059 fi
8060
8061         
8062         USE_INCLUDED_LIBINTL=yes
8063         CATOBJEXT=.gmo
8064         INSTOBJEXT=.mo
8065         DATADIRNAME=share
8066         INTLDEPS='$(top_builddir)/intl/libintl.a'
8067         INTLLIBS=$INTLDEPS
8068         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8069         nls_cv_header_intl=intl/libintl.h
8070         nls_cv_header_libgt=intl/libgettext.h
8071       fi
8072
8073             if test "$XGETTEXT" != ":"; then
8074                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8075           : ;
8076         else
8077           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
8078           XGETTEXT=":"
8079         fi
8080       fi
8081
8082       # We need to process the po/ directory.
8083       POSUB=po
8084     else
8085       DATADIRNAME=share
8086       nls_cv_header_intl=intl/libintl.h
8087       nls_cv_header_libgt=intl/libgettext.h
8088     fi
8089     
8090     
8091
8092
8093     # If this is used in GNU gettext we have to set USE_NLS to `yes'
8094     # because some of the sources are only built for this goal.
8095     if test "$PACKAGE" = gettext; then
8096       USE_NLS=yes
8097       USE_INCLUDED_LIBINTL=yes
8098     fi
8099
8100                 for lang in $ALL_LINGUAS; do
8101       GMOFILES="$GMOFILES $lang.gmo"
8102       POFILES="$POFILES $lang.po"
8103     done
8104
8105         
8106     
8107     
8108     
8109     
8110     
8111     
8112     
8113     
8114     
8115     
8116   
8117
8118    if test "x$CATOBJEXT" != "x"; then
8119      if test "x$ALL_LINGUAS" = "x"; then
8120        LINGUAS=
8121      else
8122        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
8123 echo "configure:8124: checking for catalogs to be installed" >&5
8124        NEW_LINGUAS=
8125        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8126          case "$ALL_LINGUAS" in
8127           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8128          esac
8129        done
8130        LINGUAS=$NEW_LINGUAS
8131        echo "$ac_t""$LINGUAS" 1>&6
8132      fi
8133
8134           if test -n "$LINGUAS"; then
8135        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8136      fi
8137    fi
8138
8139             if test $ac_cv_header_locale_h = yes; then
8140      INCLUDE_LOCALE_H="#include <locale.h>"
8141    else
8142      INCLUDE_LOCALE_H="\
8143 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
8144    fi
8145    
8146
8147             test -d intl || mkdir intl
8148    if test "$CATOBJEXT" = ".cat"; then
8149      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
8150 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
8151 echo "configure:8152: checking for linux/version.h" >&5
8152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8153   echo $ac_n "(cached) $ac_c" 1>&6
8154 else
8155   cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 #include <linux/version.h>
8159 EOF
8160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8161 { (eval echo configure:8162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8163 if test -z "$ac_err"; then
8164   rm -rf conftest*
8165   eval "ac_cv_header_$ac_safe=yes"
8166 else
8167   echo "$ac_err" >&5
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   eval "ac_cv_header_$ac_safe=no"
8172 fi
8173 rm -f conftest*
8174 fi
8175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8176   echo "$ac_t""yes" 1>&6
8177   msgformat=linux
8178 else
8179   echo "$ac_t""no" 1>&6
8180 msgformat=xopen
8181 fi
8182
8183
8184                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
8185    fi
8186       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
8187      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
8188
8189             if test "$PACKAGE" = "gettext"; then
8190      GT_NO="#NO#"
8191      GT_YES=
8192    else
8193      GT_NO=
8194      GT_YES="#YES#"
8195    fi
8196    
8197    
8198
8199             MKINSTALLDIRS=
8200    if test -n "$ac_aux_dir"; then
8201      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8202    fi
8203    if test -z "$MKINSTALLDIRS"; then
8204      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8205    fi
8206    
8207
8208       l=
8209    
8210
8211          test -d po || mkdir po
8212    if test "x$srcdir" != "x."; then
8213      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8214        posrcprefix="$srcdir/"
8215      else
8216        posrcprefix="../$srcdir/"
8217      fi
8218    else
8219      posrcprefix="../"
8220    fi
8221    rm -f po/POTFILES
8222    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8223         < $srcdir/po/POTFILES.in > po/POTFILES
8224   
8225 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
8226
8227 # Windows32 Registry support for specifying GCC installation paths.
8228 # Check whether --enable-win32-registry or --disable-win32-registry was given.
8229 if test "${enable_win32_registry+set}" = set; then
8230   enableval="$enable_win32_registry"
8231   :
8232 fi
8233
8234
8235 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
8236 echo "configure:8237: checking whether windows registry support is requested" >&5
8237 if test x$enable_win32_registry != xno; then
8238   cat >> confdefs.h <<\EOF
8239 #define ENABLE_WIN32_REGISTRY 1
8240 EOF
8241
8242   echo "$ac_t""yes" 1>&6
8243 else
8244   echo "$ac_t""no" 1>&6
8245 fi
8246
8247 # Check if user specified a different registry key.
8248 case x${enable_win32_registry} in
8249 x | xyes)
8250   # default.
8251   gcc_cv_win32_registry_key="$VERSION"
8252   ;;
8253 xno)
8254   # no registry lookup.
8255   gcc_cv_win32_registry_key=''
8256   ;;
8257 *)
8258   # user-specified key.
8259   gcc_cv_win32_registry_key="$enable_win32_registry"
8260   ;;
8261 esac
8262
8263 if test x$enable_win32_registry != xno; then
8264   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
8265 echo "configure:8266: checking registry key on windows hosts" >&5
8266   cat >> confdefs.h <<EOF
8267 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
8268 EOF
8269
8270   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
8271 fi
8272
8273 # Get an absolute path to the GCC top-level source directory
8274 holddir=`pwd`
8275 cd $srcdir
8276 topdir=`pwd`
8277 cd $holddir
8278
8279 # Conditionalize the makefile for this host machine.
8280 # Make-host contains the concatenation of all host makefile fragments
8281 # [there can be more than one].  This file is built by configure.frag.
8282 host_overrides=Make-host
8283 dep_host_xmake_file=
8284 for f in .. ${host_xmake_file}
8285 do
8286         if test -f ${srcdir}/config/$f
8287         then
8288                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
8289         fi
8290 done
8291
8292 # Conditionalize the makefile for this target machine.
8293 # Make-target contains the concatenation of all host makefile fragments
8294 # [there can be more than one].  This file is built by configure.frag.
8295 target_overrides=Make-target
8296 dep_tmake_file=
8297 for f in .. ${tmake_file}
8298 do
8299         if test -f ${srcdir}/config/$f
8300         then
8301                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
8302         fi
8303 done
8304
8305 # If the host doesn't support symlinks, modify CC in
8306 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
8307 # Otherwise, we can use "CC=$(CC)".
8308 rm -f symtest.tem
8309 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
8310 then
8311         cc_set_by_configure="\$(CC)"
8312         quoted_cc_set_by_configure="\$(CC)"
8313         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
8314 else
8315         rm -f symtest.tem
8316         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
8317         then
8318                 symbolic_link="cp -p"
8319         else
8320                 symbolic_link="cp"
8321         fi
8322         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
8323         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
8324         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
8325 fi
8326 rm -f symtest.tem
8327
8328 out_object_file=`basename $out_file .c`.o
8329
8330 tm_file_list=
8331 for f in $tm_file; do
8332   case $f in
8333     gansidecl.h )
8334        tm_file_list="${tm_file_list} $f" ;;
8335     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
8336   esac
8337 done
8338
8339 host_xm_file_list=
8340 for f in $host_xm_file; do
8341   case $f in
8342     auto-host.h | gansidecl.h | hwint.h )
8343        host_xm_file_list="${host_xm_file_list} $f" ;;
8344     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
8345   esac
8346 done
8347
8348 build_xm_file_list=
8349 for f in $build_xm_file; do
8350   case $f in
8351     auto-build.h | auto-host.h | gansidecl.h | hwint.h )
8352        build_xm_file_list="${build_xm_file_list} $f" ;;
8353     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
8354   esac
8355 done
8356
8357 # Define macro CROSS_COMPILE in compilation
8358 # if this is a cross-compiler.
8359 # Also use all.cross instead of all.internal
8360 # and add cross-make to Makefile.
8361 cross_overrides="/dev/null"
8362 if test x$host != x$target
8363 then
8364         cross_defines="CROSS=-DCROSS_COMPILE"
8365         cross_overrides="${topdir}/cross-make"
8366 fi
8367
8368 # When building gcc with a cross-compiler, we need to fix a few things.
8369 # This must come after cross-make as we want all.build to override
8370 # all.cross.
8371 build_overrides="/dev/null"
8372 if test x$build != x$host
8373 then
8374         build_overrides="${topdir}/build-make"
8375 fi
8376
8377 # Expand extra_headers to include complete path.
8378 # This substitutes for lots of t-* files.
8379 extra_headers_list=
8380 if test "x$extra_headers" = x
8381 then true
8382 else
8383         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
8384         for file in $extra_headers;
8385         do
8386                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
8387         done
8388 fi
8389
8390 if test x$use_collect2 = xno; then
8391         use_collect2=
8392 fi
8393
8394 # Add a definition of USE_COLLECT2 if system wants one.
8395 # Also tell toplev.c what to do.
8396 # This substitutes for lots of t-* files.
8397 if test x$use_collect2 = x
8398 then
8399         will_use_collect2=
8400         maybe_use_collect2=
8401 else
8402         will_use_collect2="collect2"
8403         maybe_use_collect2="-DUSE_COLLECT2"
8404 fi
8405
8406 # NEED TO CONVERT
8407 # Set MD_DEPS if the real md file is in md.pre-cpp.
8408 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
8409 # for line oriented comments, so we must always use a GNU cpp.  If
8410 # building gcc with a cross compiler, use the cross compiler just
8411 # built.  Otherwise, we can use the cpp just built.
8412 md_file_sub=
8413 if test "x$md_cppflags" = x
8414 then
8415         md_file_sub=$srcdir/config/$md_file
8416 else
8417         md_file=md
8418 fi
8419
8420 # If we have gas in the build tree, make a link to it.
8421 if test -f ../gas/Makefile; then
8422         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
8423 fi
8424
8425 # If we have nm in the build tree, make a link to it.
8426 if test -f ../binutils/Makefile; then
8427         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
8428 fi
8429
8430 # If we have ld in the build tree, make a link to it.
8431 if test -f ../ld/Makefile; then
8432 #       if test x$use_collect2 = x; then
8433 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
8434 #       else
8435                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
8436 #       fi
8437 fi
8438
8439 # Figure out what assembler alignment features are present.
8440 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
8441 echo "configure:8442: checking assembler alignment features" >&5
8442 gcc_cv_as=
8443 gcc_cv_as_alignment_features=
8444 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
8445 if test -x "$DEFAULT_ASSEMBLER"; then
8446         gcc_cv_as="$DEFAULT_ASSEMBLER"
8447 elif test -x "$AS"; then
8448         gcc_cv_as="$AS"
8449 elif test -x as$host_exeext; then
8450         # Build using assembler in the current directory.
8451         gcc_cv_as=./as$host_exeext
8452 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
8453         # Single tree build which includes gas.
8454         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
8455         do
8456                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
8457                 if test x$gcc_cv_gas_version != x; then
8458                         break
8459                 fi
8460         done
8461         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
8462         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
8463         if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
8464                 # Gas version 2.6 and later support for .balign and .p2align.
8465                 # bytes to skip when using .p2align.
8466                 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
8467                         gcc_cv_as_alignment_features=".balign and .p2align"
8468                         cat >> confdefs.h <<\EOF
8469 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
8470 EOF
8471
8472                 fi
8473                 # Gas version 2.8 and later support specifying the maximum
8474                 # bytes to skip when using .p2align.
8475                 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
8476                         gcc_cv_as_alignment_features=".p2align including maximum skip"
8477                         cat >> confdefs.h <<\EOF
8478 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
8479 EOF
8480
8481                 fi
8482         fi
8483 elif test x$host = x$target; then
8484         # Native build.
8485         # Search the same directories that the installed compiler will
8486         # search.  Else we may find the wrong assembler and lose.  If we
8487         # do not find a suitable assembler binary, then try the user's
8488         # path.
8489         #
8490         # Also note we have to check MD_EXEC_PREFIX before checking the
8491         # user's path.  Unfortunately, there is no good way to get at the
8492         # value of MD_EXEC_PREFIX here.  So we do a brute force search
8493         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
8494         # to be fixed as part of the make/configure rewrite too.
8495
8496         if test "x$exec_prefix" = xNONE; then
8497                 if test "x$prefix" = xNONE; then
8498                         test_prefix=/usr/local
8499                 else
8500                         test_prefix=$prefix
8501                 fi
8502         else
8503                 test_prefix=$exec_prefix
8504         fi
8505
8506         # If the loop below does not find an assembler, then use whatever
8507         # one we can find in the users's path.
8508         # user's path.
8509         as=as$host_exeext
8510
8511         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
8512                    $test_prefix/lib/gcc-lib/$target \
8513                    /usr/lib/gcc/$target/$gcc_version \
8514                    /usr/lib/gcc/$target \
8515                    $test_prefix/$target/bin/$target/$gcc_version \
8516                    $test_prefix/$target/bin \
8517                    /usr/libexec \
8518                    /usr/ccs/gcc \
8519                    /usr/ccs/bin \
8520                    /udk/usr/ccs/bin \
8521                    /bsd43/usr/lib/cmplrs/cc \
8522                    /usr/cross64/usr/bin \
8523                    /usr/lib/cmplrs/cc \
8524                    /sysv/usr/lib/cmplrs/cc \
8525                    /svr4/usr/lib/cmplrs/cc \
8526                    /usr/bin"
8527
8528         for dir in $test_dirs; do
8529                 if test -f $dir/as$host_exeext; then
8530                         gcc_cv_as=$dir/as$host_exeext
8531                         break;
8532                 fi
8533         done
8534 fi
8535 if test x$gcc_cv_as != x; then
8536         # Check if we have .balign and .p2align
8537         echo ".balign  4" > conftest.s
8538         echo ".p2align  2" >> conftest.s
8539         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8540                 gcc_cv_as_alignment_features=".balign and .p2align"
8541                 cat >> confdefs.h <<\EOF
8542 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
8543 EOF
8544
8545         fi
8546         rm -f conftest.s conftest.o
8547         # Check if specifying the maximum bytes to skip when
8548         # using .p2align is supported.
8549         echo ".p2align 4,,7" > conftest.s
8550         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8551                 gcc_cv_as_alignment_features=".p2align including maximum skip"
8552                 cat >> confdefs.h <<\EOF
8553 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
8554 EOF
8555
8556         fi
8557         rm -f conftest.s conftest.o
8558 fi
8559 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
8560
8561 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
8562 echo "configure:8563: checking assembler subsection support" >&5
8563 gcc_cv_as_subsections=
8564 if test x$gcc_cv_as != x; then
8565         # Check if we have .subsection
8566         echo ".subsection 1" > conftest.s
8567         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8568                 gcc_cv_as_subsections=".subsection"
8569                 if test -x nm$host_exeext; then
8570                         gcc_cv_nm=./nm$host_exeext
8571                 elif test x$host = x$target; then
8572                         # Native build.
8573                         gcc_cv_nm=nm$host_exeext
8574                 fi
8575                 if test x$gcc_cv_nm != x; then
8576                         cat > conftest.s <<EOF
8577 conftest_label1: .word 0
8578 .subsection -1
8579 conftest_label2: .word 0
8580 .previous
8581 EOF
8582                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8583                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
8584                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
8585                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
8586                                         :
8587                                 else
8588                                         gcc_cv_as_subsections="working .subsection -1"
8589                                         cat >> confdefs.h <<\EOF
8590 #define HAVE_GAS_SUBSECTION_ORDERING 1
8591 EOF
8592
8593                                 fi
8594                         fi
8595                 fi
8596         fi
8597         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8598 fi
8599 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
8600
8601 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
8602 echo "configure:8603: checking assembler weak support" >&5
8603 gcc_cv_as_weak=
8604 if test x$gcc_cv_as != x; then
8605         # Check if we have .weak
8606         echo "  .weak foobar" > conftest.s
8607         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8608                 cat >> confdefs.h <<\EOF
8609 #define HAVE_GAS_WEAK 1
8610 EOF
8611
8612                 gcc_cv_as_weak="yes"
8613         fi
8614         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8615 fi
8616 echo "$ac_t""$gcc_cv_as_weak" 1>&6
8617
8618 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
8619 echo "configure:8620: checking assembler hidden support" >&5
8620 gcc_cv_as_hidden=
8621 if test x$gcc_cv_as != x; then
8622         # Check if we have .hidden
8623         echo "  .hidden foobar" > conftest.s
8624         echo "foobar:" >> conftest.s
8625         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8626                 cat >> confdefs.h <<\EOF
8627 #define HAVE_GAS_HIDDEN 1
8628 EOF
8629
8630                 gcc_cv_as_hidden="yes"
8631         fi
8632         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8633 fi
8634 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
8635
8636 case "$target" in 
8637   sparc*-*-*)
8638     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8639 echo "configure:8640: checking assembler .register pseudo-op support" >&5
8640 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8641   echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643   
8644         gcc_cv_as_register_pseudo_op=unknown
8645         if test x$gcc_cv_as != x; then
8646             # Check if we have .register
8647             echo ".register %g2, #scratch" > conftest.s
8648             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8649                 gcc_cv_as_register_pseudo_op=yes
8650             else
8651                 gcc_cv_as_register_pseudo_op=no
8652             fi
8653             rm -f conftest.s conftest.o
8654         fi
8655     
8656 fi
8657
8658 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8659     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8660         cat >> confdefs.h <<\EOF
8661 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8662 EOF
8663
8664     fi
8665
8666     case "$tm_file" in
8667     *64*)
8668         echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
8669 echo "configure:8670: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
8670 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
8671   echo $ac_n "(cached) $ac_c" 1>&6
8672 else
8673   
8674                 if test -n "$gcc_cv_as"; then
8675                     echo ".xword foo" > conftest.s
8676                     gcc_cv_as_flags64=no
8677                     for flag in "-xarch=v9" "-64 -Av9"; do
8678                         if $gcc_cv_as $flag -o conftest.o conftest.s \
8679                             > /dev/null 2>&1; then
8680                             gcc_cv_as_flags64=$flag
8681                             break
8682                         fi
8683                     done
8684                     rm -f conftest.s conftest.o
8685                 else
8686                     if test "$gas" = yes; then
8687                         gcc_cv_as_flags64="-64 -Av9"
8688                     else
8689                         gcc_cv_as_flags64="-xarch=v9"
8690                     fi
8691                 fi
8692         
8693 fi
8694
8695 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
8696         if test "x$gcc_cv_as_flags64" = xno; then
8697
8698             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
8699             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
8700
8701         else
8702             cat >> confdefs.h <<EOF
8703 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
8704 EOF
8705
8706         fi
8707         ;;
8708     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
8709         ;;
8710     esac
8711
8712     if test "x$gcc_cv_as_flags64" != xno; then
8713         echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8714 echo "configure:8715: checking for assembler offsetable %lo() support" >&5
8715 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8716   echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718   
8719             gcc_cv_as_offsetable_lo10=unknown
8720             if test "x$gcc_cv_as" != x; then
8721                 # Check if assembler has offsetable %lo()
8722                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8723                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8724                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
8725                         > /dev/null 2>&1 &&
8726                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
8727                         > /dev/null 2>&1; then
8728                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8729                         gcc_cv_as_offsetable_lo10=no
8730                     else
8731                         gcc_cv_as_offsetable_lo10=yes
8732                     fi
8733                 else
8734                     gcc_cv_as_offsetable_lo10=no
8735                 fi
8736                 rm -f conftest.s conftest.o conftest1.s conftest1.o
8737             fi
8738         
8739 fi
8740
8741 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8742         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8743             cat >> confdefs.h <<\EOF
8744 #define HAVE_AS_OFFSETABLE_LO10 1
8745 EOF
8746
8747         fi
8748     fi
8749     ;;
8750
8751   i[34567]86-*-*)
8752     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8753 echo "configure:8754: checking assembler instructions" >&5
8754     gcc_cv_as_instructions=
8755     if test x$gcc_cv_as != x; then
8756         set "filds fists" "filds mem; fists mem"
8757         while test $# -gt 0
8758         do
8759                 echo "$2" > conftest.s
8760                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8761                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8762                         cat >> confdefs.h <<EOF
8763 #define HAVE_GAS_`echo "$1" | tr 'a-z ' 'A-Z_'` 1
8764 EOF
8765
8766                 fi
8767                 shift 2
8768         done
8769         rm -f conftest.s conftest.o
8770     fi
8771     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8772     ;;
8773 esac
8774
8775 # Figure out what language subdirectories are present.
8776 # Look if the user specified --enable-languages="..."; if not, use
8777 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8778 # go away some day.
8779 if test x"${enable_languages+set}" != xset; then
8780         if test x"${LANGUAGES+set}" = xset; then
8781                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
8782         else
8783                 enable_languages=all
8784         fi
8785 fi
8786 subdirs=
8787 for lang in ${srcdir}/*/config-lang.in ..
8788 do
8789         case $lang in
8790         ..) ;;
8791         # The odd quoting in the next line works around
8792         # an apparent bug in bash 1.12 on linux.
8793         ${srcdir}/[*]/config-lang.in) ;;
8794         *)
8795           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
8796           if test "x$lang_alias" = x
8797           then
8798                 echo "$lang doesn't set \$language." 1>&2
8799                 exit 1
8800           fi
8801           if test x"${enable_languages}" = xall; then
8802                 add_this_lang=yes
8803           else
8804                 case "${enable_languages}" in
8805                     ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
8806                         add_this_lang=yes
8807                         ;;
8808                     * )
8809                         add_this_lang=no
8810                         ;;
8811                 esac
8812           fi
8813           if test x"${add_this_lang}" = xyes; then
8814                 case $lang in
8815                     ${srcdir}/ada/config-lang.in)
8816                         if test x$gnat = xyes ; then
8817                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8818                         fi
8819                         ;;
8820                     *)
8821                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8822                         ;;
8823                 esac
8824           fi
8825           ;;
8826         esac
8827 done
8828
8829 # Make gthr-default.h if we have a thread file.
8830 gthread_flags=
8831 if test $thread_file != single; then
8832     rm -f gthr-default.h
8833     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8834     gthread_flags=-DHAVE_GTHR_DEFAULT
8835 fi
8836
8837
8838 # Find out what GC implementation we want, or may, use.
8839 # Check whether --with-gc or --without-gc was given.
8840 if test "${with_gc+set}" = set; then
8841   withval="$with_gc"
8842   case "$withval" in
8843   simple | page)
8844     GGC=ggc-$withval
8845     ;;
8846   *)
8847     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8848     ;;
8849 esac
8850 else
8851   if test $ac_cv_func_mmap_anywhere = yes \
8852     || test $ac_cv_func_valloc = yes; then
8853   GGC=ggc-page
8854 else
8855   GGC=ggc-simple
8856 fi
8857 fi
8858
8859
8860 echo "Using $GGC for garbage collection."
8861
8862 # Build a new-abi (c++) system
8863 # Check whether --enable-new-gxx-abi or --disable-new-gxx-abi was given.
8864 if test "${enable_new_gxx_abi+set}" = set; then
8865   enableval="$enable_new_gxx_abi"
8866   cat >> confdefs.h <<\EOF
8867 #define ENABLE_NEW_GXX_ABI 1
8868 EOF
8869
8870 GXX_ABI_FLAG='-fnew-abi'
8871 echo "Building a new-abi g++ compiler."
8872
8873 fi
8874
8875
8876
8877 # Build a new-libstdc++ system (ie libstdc++-v3)
8878 echo $ac_n "checking for libstdc++ to install""... $ac_c" 1>&6
8879 echo "configure:8880: checking for libstdc++ to install" >&5
8880 # Check whether --enable-libstdcxx-v3 or --disable-libstdcxx-v3 was given.
8881 if test "${enable_libstdcxx_v3+set}" = set; then
8882   enableval="$enable_libstdcxx_v3"
8883   enable_libstdcxx_v3=yes
8884 else
8885   enable_libstdcxx_v3=no
8886 fi
8887
8888
8889 if test x$enable_libstdcxx_v3 = xyes; then
8890   echo "$ac_t""v3" 1>&6
8891   ac_esn=1
8892 else
8893   echo "$ac_t""v2" 1>&6
8894   ac_esn=0
8895 fi
8896 cat >> confdefs.h <<EOF
8897 #define ENABLE_STD_NAMESPACE $ac_esn
8898 EOF
8899
8900
8901 # Make empty files to contain the specs and options for each language.
8902 # Then add #include lines to for a compiler that has specs and/or options.
8903
8904 lang_specs_files=
8905 lang_options_files=
8906 lang_tree_files=
8907 rm -f specs.h options.h gencheck.h
8908 touch specs.h options.h gencheck.h
8909 for subdir in . $subdirs
8910 do
8911         if test -f $srcdir/$subdir/lang-specs.h; then
8912                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
8913                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8914         fi
8915         if test -f $srcdir/$subdir/lang-options.h; then
8916                 echo "#include \"$subdir/lang-options.h\"" >>options.h
8917                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8918         fi
8919         if test -f $srcdir/$subdir/$subdir-tree.def; then
8920                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
8921                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8922         fi
8923 done
8924
8925 # These (without "all_") are set in each config-lang.in.
8926 # `language' must be a single word so is spelled singularly.
8927 all_languages=
8928 all_boot_languages=
8929 all_compilers=
8930 all_stagestuff=
8931 all_diff_excludes=
8932 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug'
8933 # List of language makefile fragments.
8934 all_lang_makefiles=
8935 all_headers=
8936 all_lib2funcs=
8937
8938 # Add the language fragments.
8939 # Languages are added via two mechanisms.  Some information must be
8940 # recorded in makefile variables, these are defined in config-lang.in.
8941 # We accumulate them and plug them into the main Makefile.
8942 # The other mechanism is a set of hooks for each of the main targets
8943 # like `clean', `install', etc.
8944
8945 language_fragments="Make-lang"
8946 language_hooks="Make-hooks"
8947 oldstyle_subdirs=
8948
8949 for s in .. $subdirs
8950 do
8951         if test $s != ".."
8952         then
8953                 language=
8954                 boot_language=
8955                 compilers=
8956                 stagestuff=
8957                 diff_excludes=
8958                 headers=
8959                 outputs=
8960                 lib2funcs=
8961                 . ${srcdir}/$s/config-lang.in
8962                 if test "x$language" = x
8963                 then
8964                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8965                         exit 1
8966                 fi
8967                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
8968                 all_languages="$all_languages $language"
8969                 if test "x$boot_language" = xyes
8970                 then
8971                         all_boot_languages="$all_boot_languages $language"
8972                 fi
8973                 all_compilers="$all_compilers $compilers"
8974                 all_stagestuff="$all_stagestuff $stagestuff"
8975                 all_diff_excludes="$all_diff_excludes $diff_excludes"
8976                 all_headers="$all_headers $headers"
8977                 all_outputs="$all_outputs $outputs"
8978                 if test x$outputs = x
8979                 then
8980                         oldstyle_subdirs="$oldstyle_subdirs $s"
8981                 fi
8982                 all_lib2funcs="$all_lib2funcs $lib2funcs"
8983         fi
8984 done
8985
8986 # Since we can't use `::' targets, we link each language in
8987 # with a set of hooks, reached indirectly via lang.${target}.
8988
8989 rm -f Make-hooks
8990 touch Make-hooks
8991 target_list="all.build all.cross start.encap rest.encap \
8992         info dvi \
8993         install-normal install-common install-info install-man \
8994         uninstall distdir \
8995         mostlyclean clean distclean extraclean maintainer-clean \
8996         stage1 stage2 stage3 stage4"
8997 for t in $target_list
8998 do
8999         x=
9000         for lang in .. $all_languages
9001         do
9002                 if test $lang != ".."; then
9003                         x="$x $lang.$t"
9004                 fi
9005         done
9006         echo "lang.$t: $x" >> Make-hooks
9007 done
9008
9009 # If we're not building in srcdir, create .gdbinit.
9010
9011 if test ! -f Makefile.in; then
9012         echo "dir ." > .gdbinit
9013         echo "dir ${srcdir}" >> .gdbinit
9014         if test x$gdb_needs_out_file_path = xyes
9015         then
9016                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
9017         fi
9018         if test "x$subdirs" != x; then
9019                 for s in $subdirs
9020                 do
9021                         echo "dir ${srcdir}/$s" >> .gdbinit
9022                 done
9023         fi
9024         echo "source ${srcdir}/.gdbinit" >> .gdbinit
9025 fi
9026
9027 # Define variables host_canonical and build_canonical
9028 # because some Cygnus local changes in the Makefile depend on them.
9029 build_canonical=${build}
9030 host_canonical=${host}
9031 target_subdir=
9032 if test "${host}" != "${target}" ; then
9033     target_subdir=${target}/
9034 fi
9035
9036
9037
9038         
9039 # If this is using newlib, then define inhibit_libc in
9040 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
9041 # libgcc.a, but that's OK because newib should have its own version of
9042 # assert.h.
9043 inhibit_libc=
9044 if test x$with_newlib = xyes; then
9045         inhibit_libc=-Dinhibit_libc
9046 fi
9047
9048
9049 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
9050 # absolute path for gcc_tooldir based on inserting the number of up-directory
9051 # movements required to get from $(exec_prefix) to $(prefix) into the basic
9052 # $(libsubdir)/@(unlibsubdir) based path.
9053 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
9054 # make and thus we'd get different behavior depending on where we built the
9055 # sources.
9056 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
9057     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
9058 else
9059 # An explanation of the sed strings:
9060 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
9061 #  -e 's|/$||'            match a trailing forward slash and eliminates it
9062 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
9063 #  -e 's|/[^/]*|../|g'    replaces each occurance of /<directory> with ../
9064 #
9065 # (*) Note this pattern overwrites the first character of the string
9066 # with a forward slash if one is not already present.  This is not a
9067 # problem because the exact names of the sub-directories concerned is
9068 # unimportant, just the number of them matters.
9069 #
9070 # The practical upshot of these patterns is like this:
9071 #
9072 #  prefix     exec_prefix        result
9073 #  ------     -----------        ------
9074 #   /foo        /foo/bar          ../
9075 #   /foo/       /foo/bar          ../
9076 #   /foo        /foo/bar/         ../
9077 #   /foo/       /foo/bar/         ../
9078 #   /foo        /foo/bar/ugg      ../../
9079 #
9080     dollar='$$'
9081     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
9082 fi
9083
9084
9085
9086 # Nothing to do for FLOAT_H, float_format already handled.
9087 objdir=`pwd`
9088
9089
9090 # Process the language and host/target makefile fragments.
9091 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9092
9093 # Substitute configuration variables
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152 # Echo that links are built
9153 if test x$host = x$target
9154 then
9155         str1="native "
9156 else
9157         str1="cross-"
9158         str2=" from $host"
9159 fi
9160
9161 if test x$host != x$build
9162 then
9163         str3=" on a $build system"
9164 fi
9165
9166 if test "x$str2" != x || test "x$str3" != x
9167 then
9168         str4=
9169 fi
9170
9171 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9172
9173 if test "x$str2" != x || test "x$str3" != x
9174 then
9175         echo " ${str2}${str3}." 1>&2
9176 fi
9177
9178 # Truncate the target if necessary
9179 if test x$host_truncate_target != x; then
9180         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9181 fi
9182
9183 # Configure the subdirectories
9184 # AC_CONFIG_SUBDIRS($subdirs)
9185
9186 # Create the Makefile
9187 # and configure language subdirectories
9188 trap '' 1 2 15
9189 cat > confcache <<\EOF
9190 # This file is a shell script that caches the results of configure
9191 # tests run on this system so they can be shared between configure
9192 # scripts and configure runs.  It is not useful on other systems.
9193 # If it contains results you don't want to keep, you may remove or edit it.
9194 #
9195 # By default, configure uses ./config.cache as the cache file,
9196 # creating it if it does not exist already.  You can give configure
9197 # the --cache-file=FILE option to use a different cache file; that is
9198 # what configure does when it calls configure scripts in
9199 # subdirectories, so they share the cache.
9200 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9201 # config.status only pays attention to the cache file if you give it the
9202 # --recheck option to rerun configure.
9203 #
9204 EOF
9205 # The following way of writing the cache mishandles newlines in values,
9206 # but we know of no workaround that is simple, portable, and efficient.
9207 # So, don't put newlines in cache variables' values.
9208 # Ultrix sh set writes to stderr and can't be redirected directly,
9209 # and sets the high bit in the cache file unless we assign to the vars.
9210 (set) 2>&1 |
9211   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9212   *ac_space=\ *)
9213     # `set' does not quote correctly, so add quotes (double-quote substitution
9214     # turns \\\\ into \\, and sed turns \\ into \).
9215     sed -n \
9216       -e "s/'/'\\\\''/g" \
9217       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9218     ;;
9219   *)
9220     # `set' quotes correctly as required by POSIX, so do not add quotes.
9221     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9222     ;;
9223   esac >> confcache
9224 if cmp -s $cache_file confcache; then
9225   :
9226 else
9227   if test -w $cache_file; then
9228     echo "updating cache $cache_file"
9229     cat confcache > $cache_file
9230   else
9231     echo "not updating unwritable cache $cache_file"
9232   fi
9233 fi
9234 rm -f confcache
9235
9236 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9237
9238 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9239 # Let make expand exec_prefix.
9240 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9241
9242 # Any assignment to VPATH causes Sun make to only execute
9243 # the first set of double-colon rules, so remove it if not needed.
9244 # If there is a colon in the path, we need to keep it.
9245 if test "x$srcdir" = x.; then
9246   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9247 fi
9248
9249 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9250
9251 DEFS=-DHAVE_CONFIG_H
9252
9253 # Without the "./", some shells look in PATH for config.status.
9254 : ${CONFIG_STATUS=./config.status}
9255
9256 echo creating $CONFIG_STATUS
9257 rm -f $CONFIG_STATUS
9258 cat > $CONFIG_STATUS <<EOF
9259 #! /bin/sh
9260 # Generated automatically by configure.
9261 # Run this file to recreate the current configuration.
9262 # This directory was configured as follows,
9263 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9264 #
9265 # $0 $ac_configure_args
9266 #
9267 # Compiler output produced by configure, useful for debugging
9268 # configure, is in ./config.log if it exists.
9269
9270 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9271 for ac_option
9272 do
9273   case "\$ac_option" in
9274   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9275     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9276     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9277   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9278     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9279     exit 0 ;;
9280   -help | --help | --hel | --he | --h)
9281     echo "\$ac_cs_usage"; exit 0 ;;
9282   *) echo "\$ac_cs_usage"; exit 1 ;;
9283   esac
9284 done
9285
9286 ac_given_srcdir=$srcdir
9287
9288 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9289 EOF
9290 cat >> $CONFIG_STATUS <<EOF
9291
9292 # Protect against being on the right side of a sed subst in config.status.
9293 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9294  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9295 $ac_vpsub
9296 $extrasub
9297 s%@SHELL@%$SHELL%g
9298 s%@CFLAGS@%$CFLAGS%g
9299 s%@CPPFLAGS@%$CPPFLAGS%g
9300 s%@CXXFLAGS@%$CXXFLAGS%g
9301 s%@FFLAGS@%$FFLAGS%g
9302 s%@DEFS@%$DEFS%g
9303 s%@LDFLAGS@%$LDFLAGS%g
9304 s%@LIBS@%$LIBS%g
9305 s%@exec_prefix@%$exec_prefix%g
9306 s%@prefix@%$prefix%g
9307 s%@program_transform_name@%$program_transform_name%g
9308 s%@bindir@%$bindir%g
9309 s%@sbindir@%$sbindir%g
9310 s%@libexecdir@%$libexecdir%g
9311 s%@datadir@%$datadir%g
9312 s%@sysconfdir@%$sysconfdir%g
9313 s%@sharedstatedir@%$sharedstatedir%g
9314 s%@localstatedir@%$localstatedir%g
9315 s%@libdir@%$libdir%g
9316 s%@includedir@%$includedir%g
9317 s%@oldincludedir@%$oldincludedir%g
9318 s%@infodir@%$infodir%g
9319 s%@mandir@%$mandir%g
9320 s%@host@%$host%g
9321 s%@host_alias@%$host_alias%g
9322 s%@host_cpu@%$host_cpu%g
9323 s%@host_vendor@%$host_vendor%g
9324 s%@host_os@%$host_os%g
9325 s%@target@%$target%g
9326 s%@target_alias@%$target_alias%g
9327 s%@target_cpu@%$target_cpu%g
9328 s%@target_vendor@%$target_vendor%g
9329 s%@target_os@%$target_os%g
9330 s%@build@%$build%g
9331 s%@build_alias@%$build_alias%g
9332 s%@build_cpu@%$build_cpu%g
9333 s%@build_vendor@%$build_vendor%g
9334 s%@build_os@%$build_os%g
9335 s%@CC@%$CC%g
9336 s%@stage1_warn_cflags@%$stage1_warn_cflags%g
9337 s%@SET_MAKE@%$SET_MAKE%g
9338 s%@AWK@%$AWK%g
9339 s%@LEX@%$LEX%g
9340 s%@LEXLIB@%$LEXLIB%g
9341 s%@LN@%$LN%g
9342 s%@LN_S@%$LN_S%g
9343 s%@RANLIB@%$RANLIB%g
9344 s%@YACC@%$YACC%g
9345 s%@INSTALL@%$INSTALL%g
9346 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9347 s%@INSTALL_DATA@%$INSTALL_DATA%g
9348 s%@CPP@%$CPP%g
9349 s%@gnat@%$gnat%g
9350 s%@vfprintf@%$vfprintf%g
9351 s%@doprint@%$doprint%g
9352 s%@manext@%$manext%g
9353 s%@objext@%$objext%g
9354 s%@PACKAGE@%$PACKAGE%g
9355 s%@VERSION@%$VERSION%g
9356 s%@ALLOCA@%$ALLOCA%g
9357 s%@USE_NLS@%$USE_NLS%g
9358 s%@MSGFMT@%$MSGFMT%g
9359 s%@GMSGFMT@%$GMSGFMT%g
9360 s%@XGETTEXT@%$XGETTEXT%g
9361 s%@GENCAT@%$GENCAT%g
9362 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9363 s%@CATALOGS@%$CATALOGS%g
9364 s%@CATOBJEXT@%$CATOBJEXT%g
9365 s%@DATADIRNAME@%$DATADIRNAME%g
9366 s%@GMOFILES@%$GMOFILES%g
9367 s%@INSTOBJEXT@%$INSTOBJEXT%g
9368 s%@INTLDEPS@%$INTLDEPS%g
9369 s%@INTLLIBS@%$INTLLIBS%g
9370 s%@INTLOBJS@%$INTLOBJS%g
9371 s%@POFILES@%$POFILES%g
9372 s%@POSUB@%$POSUB%g
9373 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
9374 s%@GT_NO@%$GT_NO%g
9375 s%@GT_YES@%$GT_YES%g
9376 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9377 s%@l@%$l%g
9378 s%@gthread_flags@%$gthread_flags%g
9379 s%@GGC@%$GGC%g
9380 s%@GXX_ABI_FLAG@%$GXX_ABI_FLAG%g
9381 s%@build_canonical@%$build_canonical%g
9382 s%@host_canonical@%$host_canonical%g
9383 s%@target_subdir@%$target_subdir%g
9384 s%@inhibit_libc@%$inhibit_libc%g
9385 s%@gcc_tooldir@%$gcc_tooldir%g
9386 s%@dollar@%$dollar%g
9387 s%@objdir@%$objdir%g
9388 s%@subdirs@%$subdirs%g
9389 s%@all_boot_languages@%$all_boot_languages%g
9390 s%@all_compilers@%$all_compilers%g
9391 s%@all_diff_excludes@%$all_diff_excludes%g
9392 s%@all_headers@%$all_headers%g
9393 s%@all_lang_makefiles@%$all_lang_makefiles%g
9394 s%@all_languages@%$all_languages%g
9395 s%@all_lib2funcs@%$all_lib2funcs%g
9396 s%@all_stagestuff@%$all_stagestuff%g
9397 s%@build_exeext@%$build_exeext%g
9398 s%@build_install_headers_dir@%$build_install_headers_dir%g
9399 s%@build_xm_file_list@%$build_xm_file_list%g
9400 s%@cc_set_by_configure@%$cc_set_by_configure%g
9401 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9402 s%@cpp_install_dir@%$cpp_install_dir%g
9403 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9404 s%@dep_tmake_file@%$dep_tmake_file%g
9405 s%@extra_c_flags@%$extra_c_flags%g
9406 s%@extra_c_objs@%$extra_c_objs%g
9407 s%@extra_cpp_objs@%$extra_cpp_objs%g
9408 s%@extra_cxx_objs@%$extra_cxx_objs%g
9409 s%@extra_headers_list@%$extra_headers_list%g
9410 s%@extra_objs@%$extra_objs%g
9411 s%@extra_parts@%$extra_parts%g
9412 s%@extra_passes@%$extra_passes%g
9413 s%@extra_programs@%$extra_programs%g
9414 s%@float_h_file@%$float_h_file%g
9415 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9416 s%@gcc_version@%$gcc_version%g
9417 s%@gcc_version_trigger@%$gcc_version_trigger%g
9418 s%@host_exeext@%$host_exeext%g
9419 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9420 s%@host_xm_file_list@%$host_xm_file_list%g
9421 s%@install@%$install%g
9422 s%@lang_options_files@%$lang_options_files%g
9423 s%@lang_specs_files@%$lang_specs_files%g
9424 s%@lang_tree_files@%$lang_tree_files%g
9425 s%@local_prefix@%$local_prefix%g
9426 s%@maybe_use_collect2@%$maybe_use_collect2%g
9427 s%@md_file@%$md_file%g
9428 s%@objc_boehm_gc@%$objc_boehm_gc%g
9429 s%@out_file@%$out_file%g
9430 s%@out_object_file@%$out_object_file%g
9431 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9432 s%@symbolic_link@%$symbolic_link%g
9433 s%@thread_file@%$thread_file%g
9434 s%@tm_file_list@%$tm_file_list%g
9435 s%@will_use_collect2@%$will_use_collect2%g
9436 /@target_overrides@/r $target_overrides
9437 s%@target_overrides@%%g
9438 /@host_overrides@/r $host_overrides
9439 s%@host_overrides@%%g
9440 s%@cross_defines@%$cross_defines%g
9441 /@cross_overrides@/r $cross_overrides
9442 s%@cross_overrides@%%g
9443 /@build_overrides@/r $build_overrides
9444 s%@build_overrides@%%g
9445 /@language_fragments@/r $language_fragments
9446 s%@language_fragments@%%g
9447 /@language_hooks@/r $language_hooks
9448 s%@language_hooks@%%g
9449
9450 CEOF
9451 EOF
9452
9453 cat >> $CONFIG_STATUS <<\EOF
9454
9455 # Split the substitutions into bite-sized pieces for seds with
9456 # small command number limits, like on Digital OSF/1 and HP-UX.
9457 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9458 ac_file=1 # Number of current file.
9459 ac_beg=1 # First line for current file.
9460 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9461 ac_more_lines=:
9462 ac_sed_cmds=""
9463 while $ac_more_lines; do
9464   if test $ac_beg -gt 1; then
9465     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9466   else
9467     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9468   fi
9469   if test ! -s conftest.s$ac_file; then
9470     ac_more_lines=false
9471     rm -f conftest.s$ac_file
9472   else
9473     if test -z "$ac_sed_cmds"; then
9474       ac_sed_cmds="sed -f conftest.s$ac_file"
9475     else
9476       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9477     fi
9478     ac_file=`expr $ac_file + 1`
9479     ac_beg=$ac_end
9480     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9481   fi
9482 done
9483 if test -z "$ac_sed_cmds"; then
9484   ac_sed_cmds=cat
9485 fi
9486 EOF
9487
9488 cat >> $CONFIG_STATUS <<EOF
9489
9490 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9491 EOF
9492 cat >> $CONFIG_STATUS <<\EOF
9493 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9494   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9495   case "$ac_file" in
9496   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9497        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9498   *) ac_file_in="${ac_file}.in" ;;
9499   esac
9500
9501   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9502
9503   # Remove last slash and all that follows it.  Not all systems have dirname.
9504   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9505   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9506     # The file is in a subdirectory.
9507     test ! -d "$ac_dir" && mkdir "$ac_dir"
9508     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9509     # A "../" for each directory in $ac_dir_suffix.
9510     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9511   else
9512     ac_dir_suffix= ac_dots=
9513   fi
9514
9515   case "$ac_given_srcdir" in
9516   .)  srcdir=.
9517       if test -z "$ac_dots"; then top_srcdir=.
9518       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9519   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9520   *) # Relative path.
9521     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9522     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9523   esac
9524
9525
9526   echo creating "$ac_file"
9527   rm -f "$ac_file"
9528   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9529   case "$ac_file" in
9530   *Makefile*) ac_comsub="1i\\
9531 # $configure_input" ;;
9532   *) ac_comsub= ;;
9533   esac
9534
9535   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9536   sed -e "$ac_comsub
9537 s%@configure_input@%$configure_input%g
9538 s%@srcdir@%$srcdir%g
9539 s%@top_srcdir@%$top_srcdir%g
9540 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9541 fi; done
9542 rm -f conftest.s*
9543
9544 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9545 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9546 #
9547 # ac_d sets the value in "#define NAME VALUE" lines.
9548 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9549 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9550 ac_dC='\3'
9551 ac_dD='%g'
9552 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9553 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9554 ac_uB='\([      ]\)%\1#\2define\3'
9555 ac_uC=' '
9556 ac_uD='\4%g'
9557 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9558 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9559 ac_eB='$%\1#\2define\3'
9560 ac_eC=' '
9561 ac_eD='%g'
9562
9563 if test "${CONFIG_HEADERS+set}" != set; then
9564 EOF
9565 cat >> $CONFIG_STATUS <<EOF
9566   CONFIG_HEADERS="auto-host.h:config.in"
9567 EOF
9568 cat >> $CONFIG_STATUS <<\EOF
9569 fi
9570 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9571   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9572   case "$ac_file" in
9573   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9574        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9575   *) ac_file_in="${ac_file}.in" ;;
9576   esac
9577
9578   echo creating $ac_file
9579
9580   rm -f conftest.frag conftest.in conftest.out
9581   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9582   cat $ac_file_inputs > conftest.in
9583
9584 EOF
9585
9586 # Transform confdefs.h into a sed script conftest.vals that substitutes
9587 # the proper values into config.h.in to produce config.h.  And first:
9588 # Protect against being on the right side of a sed subst in config.status.
9589 # Protect against being in an unquoted here document in config.status.
9590 rm -f conftest.vals
9591 cat > conftest.hdr <<\EOF
9592 s/[\\&%]/\\&/g
9593 s%[\\$`]%\\&%g
9594 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9595 s%ac_d%ac_u%gp
9596 s%ac_u%ac_e%gp
9597 EOF
9598 sed -n -f conftest.hdr confdefs.h > conftest.vals
9599 rm -f conftest.hdr
9600
9601 # This sed command replaces #undef with comments.  This is necessary, for
9602 # example, in the case of _POSIX_SOURCE, which is predefined and required
9603 # on some systems where configure will not decide to define it.
9604 cat >> conftest.vals <<\EOF
9605 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9606 EOF
9607
9608 # Break up conftest.vals because some shells have a limit on
9609 # the size of here documents, and old seds have small limits too.
9610
9611 rm -f conftest.tail
9612 while :
9613 do
9614   ac_lines=`grep -c . conftest.vals`
9615   # grep -c gives empty output for an empty file on some AIX systems.
9616   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9617   # Write a limited-size here document to conftest.frag.
9618   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9619   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9620   echo 'CEOF
9621   sed -f conftest.frag conftest.in > conftest.out
9622   rm -f conftest.in
9623   mv conftest.out conftest.in
9624 ' >> $CONFIG_STATUS
9625   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9626   rm -f conftest.vals
9627   mv conftest.tail conftest.vals
9628 done
9629 rm -f conftest.vals
9630
9631 cat >> $CONFIG_STATUS <<\EOF
9632   rm -f conftest.frag conftest.h
9633   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9634   cat conftest.in >> conftest.h
9635   rm -f conftest.in
9636   if cmp -s $ac_file conftest.h 2>/dev/null; then
9637     echo "$ac_file is unchanged"
9638     rm -f conftest.h
9639   else
9640     # Remove last slash and all that follows it.  Not all systems have dirname.
9641       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9642       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9643       # The file is in a subdirectory.
9644       test ! -d "$ac_dir" && mkdir "$ac_dir"
9645     fi
9646     rm -f $ac_file
9647     mv conftest.h $ac_file
9648   fi
9649 fi; done
9650
9651 EOF
9652
9653 cat >> $CONFIG_STATUS <<EOF
9654 ac_sources="$nls_cv_header_libgt"
9655 ac_dests="$nls_cv_header_intl"
9656 EOF
9657
9658 cat >> $CONFIG_STATUS <<\EOF
9659 srcdir=$ac_given_srcdir
9660 while test -n "$ac_sources"; do
9661   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9662   set $ac_sources; ac_source=$1; shift; ac_sources=$*
9663
9664   echo "linking $srcdir/$ac_source to $ac_dest"
9665
9666   if test ! -r $srcdir/$ac_source; then
9667     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9668   fi
9669   rm -f $ac_dest
9670
9671   # Make relative symlinks.
9672   # Remove last slash and all that follows it.  Not all systems have dirname.
9673   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9674   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9675     # The dest file is in a subdirectory.
9676     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9677     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9678     # A "../" for each directory in $ac_dest_dir_suffix.
9679     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9680   else
9681     ac_dest_dir_suffix= ac_dots=
9682   fi
9683
9684   case "$srcdir" in
9685   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9686   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9687   esac
9688
9689   # Make a symlink if possible; otherwise try a hard link.
9690   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9691     ln $srcdir/$ac_source $ac_dest; then :
9692   else
9693     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9694   fi
9695 done
9696 EOF
9697 cat >> $CONFIG_STATUS <<EOF
9698
9699
9700 host='${host}'
9701 build='${build}'
9702 target='${target}'
9703 target_alias='${target_alias}'
9704 srcdir='${srcdir}'
9705 subdirs='${subdirs}'
9706 oldstyle_subdirs='${oldstyle_subdirs}'
9707 symbolic_link='${symbolic_link}'
9708 program_transform_set='${program_transform_set}'
9709 program_transform_name='${program_transform_name}'
9710 dep_host_xmake_file='${dep_host_xmake_file}'
9711 host_xmake_file='${host_xmake_file}'
9712 dep_tmake_file='${dep_tmake_file}'
9713 tmake_file='${tmake_file}'
9714 thread_file='${thread_file}'
9715 gcc_version='${gcc_version}'
9716 gcc_version_trigger='${gcc_version_trigger}'
9717 local_prefix='${local_prefix}'
9718 build_install_headers_dir='${build_install_headers_dir}'
9719 build_exeext='${build_exeext}'
9720 host_exeext='${host_exeext}'
9721 out_file='${out_file}'
9722 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
9723 SET_MAKE='${SET_MAKE}'
9724 target_list='${target_list}'
9725 target_overrides='${target_overrides}'
9726 host_overrides='${host_overrides}'
9727 cross_defines='${cross_defines}'
9728 cross_overrides='${cross_overrides}'
9729 build_overrides='${build_overrides}'
9730 cpp_install_dir='${cpp_install_dir}'
9731
9732 EOF
9733 cat >> $CONFIG_STATUS <<\EOF
9734 case "$CONFIG_FILES" in *po/Makefile.in*)
9735         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
9736       esac
9737
9738 . $srcdir/configure.lang
9739 case x$CONFIG_HEADERS in
9740 xauto-host.h:config.in)
9741 echo > cstamp-h ;;
9742 esac
9743 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9744 # bootstrapping and the installation procedure can still use
9745 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
9746 # FLAGS_TO_PASS has been modified to solve the problem there.
9747 # This is virtually a duplicate of what happens in configure.lang; we do
9748 # an extra check to make sure this only happens if ln -s can be used.
9749 if test "$symbolic_link" = "ln -s"; then
9750  for d in .. ${subdirs} ; do
9751    if test $d != ..; then
9752         STARTDIR=`pwd`
9753         cd $d
9754         for t in stage1 stage2 stage3 stage4 include
9755         do
9756                 rm -f $t
9757                 $symbolic_link ../$t $t 2>/dev/null
9758         done
9759         cd $STARTDIR
9760    fi
9761  done
9762 else true ; fi
9763 # Avoid having to add intl to our include paths.
9764 if test -f intl/libintl.h; then
9765   echo creating libintl.h
9766   echo '#include "intl/libintl.h"' >libintl.h
9767 fi
9768
9769 exit 0
9770 EOF
9771 chmod +x $CONFIG_STATUS
9772 rm -fr confdefs* $ac_clean_files
9773 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9774