OSDN Git Service

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