OSDN Git Service

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