OSDN Git Service

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