OSDN Git Service

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