OSDN Git Service

Applied Joel Sherrill's patch to add v850-rtems target
[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         powerpc*-*-*)
3315                 cpu_type=rs6000
3316                 ;;
3317         pyramid-*-*)
3318                 cpu_type=pyr
3319                 ;;
3320         sparc*-*-*)
3321                 cpu_type=sparc
3322                 ;;
3323         esac
3324
3325         tm_file=${cpu_type}/${cpu_type}.h
3326         xm_file=${cpu_type}/xm-${cpu_type}.h
3327         if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
3328         then
3329                 tm_p_file=${cpu_type}/${cpu_type}-protos.h;
3330         fi
3331         # On a.out targets, we need to use collect2.
3332         case $machine in
3333         *-*-*aout*)
3334                 use_collect2=yes
3335                 ;;
3336         esac    
3337
3338         # Common parts for linux-gnu and openbsd systems
3339         case $machine in
3340         *-*-linux-gnu*)
3341                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
3342                 ;;
3343         *-*-openbsd*)
3344                 tm_file=${cpu_type}/openbsd.h
3345                 tmake_file="t-libc-ok t-openbsd"
3346                 # avoid surprises, always provide an xm-openbsd file 
3347                 xm_file=${cpu_type}/xm-openbsd.h
3348                 # don't depend on processor x-fragments as well
3349                 xmake_file=none
3350                 if test x$enable_threads = xyes; then
3351                         thread_file='posix'
3352                         tmake_file="${tmake_file} t-openbsd-thread"
3353                 fi
3354                 ;;
3355         esac
3356
3357         case $machine in
3358         # Support site-specific machine types.
3359         *local*)
3360                 cpu_type=`echo $machine | sed -e 's/-.*//'`
3361                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
3362                 xm_file=${cpu_type}/xm-$rest.h
3363                 tm_file=${cpu_type}/$rest.h
3364                 if test -f $srcdir/config/${cpu_type}/x-$rest; \
3365                 then xmake_file=${cpu_type}/x-$rest; \
3366                 else true; \
3367                 fi
3368                 if test -f $srcdir/config/${cpu_type}/t-$rest; \
3369                 then tmake_file=${cpu_type}/t-$rest; \
3370                 else true; \
3371                 fi
3372                 ;;
3373         1750a-*-*)
3374                 ;;
3375         a29k-*-bsd* | a29k-*-sym1*)
3376                 tm_file="${tm_file} a29k/unix.h"
3377                 xm_defines=USG
3378                 xmake_file=a29k/x-unix
3379                 use_collect2=yes
3380                 ;;
3381         a29k-*-udi | a29k-*-coff)
3382                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
3383                 tmake_file=a29k/t-a29kbare
3384                 ;;
3385         a29k-wrs-vxworks*)
3386                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
3387                 tmake_file=a29k/t-vx29k
3388                 extra_parts="crtbegin.o crtend.o"
3389                 thread_file='vxworks'
3390                 ;;
3391         a29k-*-*)                       # Default a29k environment.
3392                 use_collect2=yes
3393                 ;;
3394         alpha-*-interix)
3395                 tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
3396
3397                 # GAS + IEEE_CONFORMANT+IEEE (no inexact);
3398                 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
3399
3400                 # GAS + IEEE_CONFORMANT
3401                 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
3402
3403                 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
3404                 xmake_file="x-interix alpha/t-pe"
3405                 tmake_file="alpha/t-interix alpha/t-ieee"
3406                 if test x$enable_threads = xyes ; then
3407                         thread_file='posix'
3408                 fi
3409                 if test x$stabs = xyes ; then
3410                         tm_file="${tm_file} dbxcoff.h"
3411                 fi
3412                 #prefix='$$INTERIX_ROOT'/usr/contrib
3413                 #local_prefix='$$INTERIX_ROOT'/usr/contrib
3414                 ;;
3415         alpha*-*-linux-gnuecoff*)
3416                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
3417                 target_cpu_default="MASK_GAS"
3418                 tmake_file="alpha/t-ieee"
3419                 gas=no
3420                 xmake_file=none
3421                 gas=yes gnu_ld=yes
3422                 ;;
3423         alpha*-*-linux-gnulibc1*)
3424                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
3425                 target_cpu_default="MASK_GAS"
3426                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
3427                 extra_parts="crtbegin.o crtend.o"
3428                 xmake_file=none
3429                 gas=yes gnu_ld=yes
3430                 if test x$enable_threads = xyes; then
3431                         thread_file='posix'
3432                 fi
3433                 ;;
3434         alpha*-*-linux-gnu*)
3435                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
3436                 target_cpu_default="MASK_GAS"
3437                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
3438                 extra_parts="crtbegin.o crtend.o"
3439                 xmake_file=none
3440                 gas=yes gnu_ld=yes
3441                 if test x$enable_threads = xyes; then
3442                         thread_file='posix'
3443                 fi
3444                 ;;
3445         alpha*-*-netbsd*)
3446                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
3447                 target_cpu_default="MASK_GAS"
3448                 tmake_file="alpha/t-crtbe alpha/t-ieee"
3449                 extra_parts="crtbegin.o crtend.o"
3450                 xmake_file=none
3451                 gas=yes gnu_ld=yes
3452                 ;;
3453
3454         alpha*-*-openbsd*)
3455                 # default x-alpha is only appropriate for dec-osf.
3456                 target_cpu_default="MASK_GAS"
3457                 tmake_file="alpha/t-ieee"
3458                 ;;
3459                 
3460         alpha*-dec-osf*)
3461                 if test x$stabs = xyes
3462                 then
3463                         tm_file="${tm_file} dbx.h"
3464                 fi
3465                 if test x$gas != xyes
3466                 then
3467                         extra_passes="mips-tfile mips-tdump"
3468                 fi
3469                 use_collect2=yes
3470                 tmake_file="alpha/t-ieee"
3471                 case $machine in
3472                   *-*-osf1*)
3473                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
3474                     ;;
3475                   *-*-osf[23]*)
3476                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
3477                     ;;
3478                   *-*-osf4*)
3479                     tm_file="${tm_file} alpha/osf.h"
3480                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
3481                     # a broken tar, so we use cpio instead.
3482                     install_headers_dir=install-headers-cpio
3483                     ;;
3484                   *-*-osf5*)
3485                     tm_file="${tm_file} alpha/osf.h"
3486                     ;;
3487                 esac
3488                 case $machine in
3489                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
3490                     target_cpu_default=MASK_SUPPORT_ARCH
3491                     ;;
3492                 esac
3493                 ;;
3494         alpha*-*-vxworks*)
3495                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
3496                 tmake_file="alpha/t-ieee"
3497                 if  x$gas != xyes 
3498                 then
3499                         extra_passes="mips-tfile mips-tdump"
3500                 fi
3501                 use_collect2=yes
3502                 thread_file='vxworks'
3503                 ;;
3504         alpha*-*-winnt*)
3505                 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
3506                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
3507                 tmake_file="t-libc-ok alpha/t-ieee"
3508                 xmake_file=winnt/x-winnt
3509                 extra_host_objs=oldnames.o
3510                 extra_gcc_objs="spawnv.o oldnames.o"
3511                 if test x$gnu_ld != xyes
3512                 then
3513                         extra_programs=ld.exe
3514                 fi
3515                 if test x$enable_threads = xyes; then
3516                         thread_file='win32'
3517                 fi
3518                 ;;
3519         alpha*-dec-vms*)
3520                 tm_file=alpha/vms.h
3521                 xm_file="${xm_file} alpha/xm-vms.h"
3522                 tmake_file="alpha/t-vms alpha/t-ieee"
3523                 ;;
3524         arc-*-elf*)
3525                 extra_parts="crtinit.o crtfini.o"
3526                 ;;
3527         arm-*-coff* | armel-*-coff*)
3528                 tm_file=arm/coff.h
3529                 tmake_file=arm/t-bare
3530                 ;;
3531         arm-*-vxworks*)
3532                 tm_file=arm/vxarm.h
3533                 tmake_file=arm/t-bare
3534                 thread_file='vxworks'
3535                 ;;
3536         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
3537                 tm_file=arm/riscix1-1.h
3538                 use_collect2=yes
3539                 ;;
3540         arm-*-riscix*)                  # Acorn RISC machine
3541                 if test x$gas = xyes
3542                 then
3543                     tm_file=arm/rix-gas.h
3544                 else
3545                     tm_file=arm/riscix.h
3546                 fi
3547                 xmake_file=arm/x-riscix
3548                 tmake_file=arm/t-riscix
3549                 use_collect2=yes
3550                 ;;
3551         arm-semi-aout | armel-semi-aout)
3552                 tm_file=arm/semi.h
3553                 tmake_file=arm/t-semi
3554                 ;;
3555         arm-semi-aof | armel-semi-aof)
3556                 tm_file=arm/semiaof.h
3557                 tmake_file=arm/t-semiaof
3558                 ;;
3559         arm*-*-netbsd*)
3560                 tm_file=arm/netbsd.h
3561                 tmake_file="t-netbsd arm/t-netbsd"
3562        use_collect2=yes
3563                 ;;
3564         arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
3565                 cpu_type=arm
3566                 xmake_file=x-linux
3567                 tm_file=arm/linux-aout.h
3568                 tmake_file=arm/t-linux
3569                 gnu_ld=yes
3570                 ;;
3571         arm*-*-linux-gnuoldld*)         # ARM GNU/Linux with old ELF linker
3572                 xm_file=arm/xm-linux.h
3573                 xmake_file=x-linux
3574                 tm_file="arm/linux-oldld.h arm/linux-elf.h"
3575                 case $machine in
3576                 armv2*-*-*)
3577                         tm_file="arm/linux-elf26.h $tm_file"
3578                         ;;
3579                 esac
3580                 tmake_file="t-linux arm/t-linux"
3581                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3582                 gnu_ld=yes
3583                 case x${enable_threads} in
3584                 x | xyes | xpthreads | xposix)
3585                         thread_file='posix'
3586                         ;;
3587                 esac
3588                 ;;
3589         arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
3590                 xm_file=arm/xm-linux.h
3591                 xmake_file=x-linux
3592                 tm_file="arm/linux-elf.h"
3593                 case $machine in
3594                 armv2*-*-*)
3595                         tm_file="arm/linux-elf26.h $tm_file"
3596                         ;;
3597                 esac
3598                 tmake_file="t-linux arm/t-linux"
3599                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3600                 gnu_ld=yes
3601                 case x${enable_threads} in
3602                 x | xyes | xpthreads | xposix)
3603                         thread_file='posix'
3604                         ;;
3605                 esac
3606                 ;;
3607         arm*-*-uclinux*)                # ARM ucLinux
3608                 tm_file=arm/uclinux-elf.h
3609                 tmake_file=arm/t-arm-elf
3610                 ;;
3611         arm*-*-aout)
3612                 tm_file=arm/aout.h
3613                 tmake_file=arm/t-bare
3614                 ;;
3615         arm*-*-ecos-elf)
3616                 tm_file=arm/ecos-elf.h
3617                 tmake_file=arm/t-elf
3618                 ;; 
3619         arm*-*-elf)
3620                 tm_file=arm/unknown-elf.h
3621                 tmake_file=arm/t-arm-elf
3622                 ;;
3623         arm*-*-oabi)
3624                 tm_file=arm/unknown-elf-oabi.h
3625                 tmake_file=arm/t-arm-elf
3626                 ;;
3627         arm-*-pe*)
3628                 tm_file=arm/pe.h
3629                 tmake_file=arm/t-pe
3630                 extra_objs=pe.o
3631                 ;;
3632         c1-convex-*)                    # Convex C1
3633                 target_cpu_default=1
3634                 use_collect2=yes
3635                 ;;
3636         c2-convex-*)                    # Convex C2
3637                 target_cpu_default=2
3638                 use_collect2=yes
3639                 ;;
3640         c32-convex-*)
3641                 target_cpu_default=4
3642                 use_collect2=yes
3643                 ;;
3644         c34-convex-*)
3645                 target_cpu_default=8
3646                 use_collect2=yes
3647                 ;;
3648         c38-convex-*)
3649                 target_cpu_default=16           
3650                 use_collect2=yes
3651                 ;;
3652         c4x-*)
3653                 cpu_type=c4x
3654                 tmake_file=c4x/t-c4x
3655                 ;;
3656         clipper-intergraph-clix*)
3657                 tm_file="${tm_file} svr3.h clipper/clix.h"
3658                 xm_file=clipper/xm-clix.h
3659                 xmake_file=clipper/x-clix
3660                 extra_headers=va-clipper.h
3661                 extra_parts="crtbegin.o crtend.o"
3662                 install_headers_dir=install-headers-cpio
3663                 ;;
3664         dsp16xx-*)
3665                 ;;
3666         elxsi-elxsi-*)
3667                 use_collect2=yes
3668                 ;;
3669         fr30-*-elf)
3670                 tm_file="fr30/fr30.h"
3671                 tmake_file=fr30/t-fr30
3672                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3673                 ;;
3674 # This hasn't been upgraded to GCC 2.
3675 #       fx80-alliant-*)                 # Alliant FX/80
3676 #               ;;
3677         h8300-*-*)
3678                 float_format=i32
3679                 ;;
3680         hppa*-*-linux*)
3681                 target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
3682                 tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
3683                 tmake_file="t-linux pa/t-linux"
3684                 extra_parts="crtbegin.o crtend.o"
3685                 xmake_file=none
3686                 gas=yes gnu_ld=yes
3687                 if test x$enable_threads = xyes; then
3688                         thread_file='posix'
3689                 fi
3690                 ;;
3691         hppa*-*-openbsd*)
3692                 target_cpu_default="MASK_PA_11"
3693                 tmake_file=pa/t-openbsd
3694                 ;;
3695         hppa1.1-*-pro*)
3696                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
3697                 tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
3698                 xm_file=pa/xm-papro.h
3699                 tmake_file=pa/t-pro
3700                 ;;
3701         hppa1.1-*-osf*)
3702                 target_cpu_default="MASK_PA_11"
3703                 tm_file="${tm_file} pa/som.h pa/pa-osf.h"
3704                 use_collect2=yes
3705                 ;;
3706         hppa1.1-*-rtems*)
3707                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
3708                 tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
3709                 xm_file=pa/xm-papro.h
3710                 tmake_file=pa/t-pro
3711                 ;;
3712         hppa1.0-*-osf*)
3713                 tm_file="${tm_file} pa/som.h pa/pa-osf.h"
3714                 use_collect2=yes
3715                 ;;
3716         hppa1.1-*-bsd*)
3717                 tm_file="${tm_file} pa/som.h"
3718                 target_cpu_default="MASK_PA_11"
3719                 use_collect2=yes
3720                 ;;
3721         hppa1.0-*-bsd*)
3722                 tm_file="${tm_file} pa/som.h"
3723                 use_collect2=yes
3724                 ;;
3725         hppa1.0-*-hpux7*)
3726                 tm_file="pa/pa-oldas.h ${tm_file} pa/som.h pa/pa-hpux7.h"
3727                 xm_file=pa/xm-pahpux.h
3728                 xmake_file=pa/x-pa-hpux
3729                 if test x$gas = xyes
3730                 then
3731                         tm_file="${tm_file} pa/gas.h"
3732                 fi
3733                 install_headers_dir=install-headers-cpio
3734                 use_collect2=yes
3735                 ;;
3736         hppa1.0-*-hpux8.0[0-2]*)
3737                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
3738                 xm_file=pa/xm-pahpux.h
3739                 xmake_file=pa/x-pa-hpux
3740                 if test x$gas = xyes
3741                 then
3742                         tm_file="${tm_file} pa/pa-gas.h"
3743                 else
3744                         tm_file="pa/pa-oldas.h ${tm_file}"
3745                 fi
3746                 install_headers_dir=install-headers-cpio
3747                 use_collect2=yes
3748                 ;;
3749         hppa1.1-*-hpux8.0[0-2]*)
3750                 target_cpu_default="MASK_PA_11"
3751                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
3752                 xm_file=pa/xm-pahpux.h
3753                 xmake_file=pa/x-pa-hpux
3754                 if test x$gas = xyes
3755                 then
3756                         tm_file="${tm_file} pa/pa-gas.h"
3757                 else
3758                         tm_file="pa/pa-oldas.h ${tm_file}"
3759                 fi
3760                 install_headers_dir=install-headers-cpio
3761                 use_collect2=yes
3762                 ;;
3763         hppa1.1-*-hpux8*)
3764                 target_cpu_default="MASK_PA_11"
3765                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
3766                 xm_file=pa/xm-pahpux.h
3767                 xmake_file=pa/x-pa-hpux
3768                 if test x$gas = xyes
3769                 then
3770                         tm_file="${tm_file} pa/pa-gas.h"
3771                 fi
3772                 install_headers_dir=install-headers-cpio
3773                 use_collect2=yes
3774                 ;;
3775         hppa1.0-*-hpux8*)
3776                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
3777                 xm_file=pa/xm-pahpux.h
3778                 xmake_file=pa/x-pa-hpux
3779                 if test x$gas = xyes
3780                 then
3781                         tm_file="${tm_file} pa/pa-gas.h"
3782                 fi
3783                 install_headers_dir=install-headers-cpio
3784                 use_collect2=yes
3785                 ;;
3786         hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
3787                 target_cpu_default="MASK_PA_11"
3788                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
3789                 xm_file=pa/xm-pahpux.h
3790                 xmake_file=pa/x-pa-hpux
3791                 tmake_file=pa/t-pa
3792                 if test x$gas = xyes
3793                 then
3794                         tm_file="${tm_file} pa/pa-gas.h"
3795                 fi
3796                 if test x$enable_threads = x; then
3797                     enable_threads=$have_pthread_h
3798                 fi
3799                 if test x$enable_threads = xyes; then
3800                         thread_file='dce'
3801                         tmake_file="${tmake_file} pa/t-dce-thr"
3802                 fi
3803                 install_headers_dir=install-headers-cpio
3804                 use_collect2=yes
3805                 ;;
3806         hppa1.0-*-hpux10*)
3807                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
3808                 xm_file=pa/xm-pahpux.h
3809                 xmake_file=pa/x-pa-hpux
3810                 tmake_file=pa/t-pa
3811                 if test x$gas = xyes
3812                 then
3813                         tm_file="${tm_file} pa/pa-gas.h"
3814                 fi
3815                 if test x$enable_threads = x; then
3816                     enable_threads=$have_pthread_h
3817                 fi
3818                 if test x$enable_threads = xyes; then
3819                         thread_file='dce'
3820                         tmake_file="${tmake_file} pa/t-dce-thr"
3821                 fi
3822                 install_headers_dir=install-headers-cpio
3823                 use_collect2=yes
3824                 ;;
3825         hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
3826                 target_cpu_default="MASK_PA_11"
3827                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
3828                 xm_file=pa/xm-pahpux.h
3829                 xmake_file=pa/x-pa-hpux
3830                 tmake_file=pa/t-pa
3831                 if test x$gas = xyes
3832                 then
3833                         tm_file="${tm_file} pa/pa-gas.h"
3834                 fi
3835 #               if test x$enable_threads = x; then
3836 #                   enable_threads=$have_pthread_h
3837 #               fi
3838 #               if test x$enable_threads = xyes; then
3839 #                       thread_file='dce'
3840 #                       tmake_file="${tmake_file} pa/t-dce-thr"
3841 #               fi
3842                 install_headers_dir=install-headers-cpio
3843                 use_collect2=yes
3844                 ;;
3845         hppa1.0-*-hpux11*)
3846                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
3847                 xm_file=pa/xm-pahpux.h
3848                 xmake_file=pa/x-pa-hpux
3849                 if test x$gas = xyes
3850                 then
3851                         tm_file="${tm_file} pa/pa-gas.h"
3852                 fi
3853 #               if test x$enable_threads = x; then
3854 #                   enable_threads=$have_pthread_h
3855 #               fi
3856 #               if test x$enable_threads = xyes; then
3857 #                       thread_file='dce'
3858 #                       tmake_file="${tmake_file} pa/t-dce-thr"
3859 #               fi
3860                 install_headers_dir=install-headers-cpio
3861                 use_collect2=yes
3862                 ;;
3863         hppa1.1-*-hpux* | hppa2*-*-hpux*)
3864                 target_cpu_default="MASK_PA_11"
3865                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
3866                 xm_file=pa/xm-pahpux.h
3867                 xmake_file=pa/x-pa-hpux
3868                 if test x$gas = xyes
3869                 then
3870                         tm_file="${tm_file} pa/pa-gas.h"
3871                 fi
3872                 install_headers_dir=install-headers-cpio
3873                 use_collect2=yes
3874                 ;;
3875         hppa1.0-*-hpux*)
3876                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
3877                 xm_file=pa/xm-pahpux.h
3878                 xmake_file=pa/x-pa-hpux
3879                 if test x$gas = xyes
3880                 then
3881                         tm_file="${tm_file} pa/pa-gas.h"
3882                 fi
3883                 install_headers_dir=install-headers-cpio
3884                 use_collect2=yes
3885                 ;;
3886         hppa1.1-*-hiux* | hppa2*-*-hiux*)
3887                 target_cpu_default="MASK_PA_11"
3888                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
3889                 xm_file=pa/xm-pahpux.h
3890                 xmake_file=pa/x-pa-hpux
3891                 if test x$gas = xyes
3892                 then
3893                         tm_file="${tm_file} pa/pa-gas.h"
3894                 fi
3895                 install_headers_dir=install-headers-cpio
3896                 use_collect2=yes
3897                 ;;
3898         hppa1.0-*-hiux*)
3899                 tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
3900                 xm_file=pa/xm-pahpux.h
3901                 xmake_file=pa/x-pa-hpux
3902                 if test x$gas = xyes
3903                 then
3904                         tm_file="${tm_file} pa/pa-gas.h"
3905                 fi
3906                 install_headers_dir=install-headers-cpio
3907                 use_collect2=yes
3908                 ;;
3909         hppa*-*-lites*)
3910                 tm_file="${tm_file} elfos.h pa/elf.h"
3911                 target_cpu_default="MASK_PA_11"
3912                 use_collect2=yes
3913                 ;;
3914         hppa*-*-mpeix*)
3915                 tm_file="${tm_file} pa/pa-mpeix.h"
3916                 xm_file=pa/xm-pampeix.h 
3917                 xmake_file=pa/x-pa-mpeix 
3918                 echo "You must use gas. Assuming it is already installed." 
3919                 install_headers_dir=install-headers-tar
3920                 fixincludes=Makefile.in
3921                 use_collect2=yes 
3922                 ;; 
3923         i370-*-opened*)                  # IBM 360/370/390 Architecture
3924                 xm_file=i370/xm-oe.h
3925                 tm_file=i370/oe.h
3926                 xmake_file=i370/x-oe
3927                 tmake_file=i370/t-oe
3928                 fixincludes=Makefile.in # Headers are wierd, don't mess with
3929                 ;;
3930         i370-*-mvs*)
3931                 xm_file=i370/xm-mvs.h
3932                 tm_file=i370/mvs.h
3933                 tmake_file=i370/t-mvs
3934                 fixincludes=Makefile.in # Headers are wierd, don't mess with
3935                 ;;
3936         i370-*-linux*)
3937                 xm_file="xm-linux.h i370/xm-linux.h"
3938                 xmake_file=x-linux
3939                 tm_file="i370/linux.h ${tm_file}"
3940                 tmake_file="t-linux i370/t-linux"
3941                 fixincludes=Makefile.in # The headers are ok already.
3942                 # broken_install=yes
3943                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3944                 # extra_parts="crtbegin.o crtend.o"
3945                 gnu_ld=yes
3946                 gas=yes
3947                 elf=yes
3948                 if test x$enable_threads = xyes; then
3949                         thread_file='posix'
3950                 fi
3951                 ;;
3952         i[34567]86-*-elf*)
3953                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
3954                 tm_file=i386/i386elf.h
3955                 tmake_file=i386/t-i386elf
3956                 xmake_file=x-svr4
3957                 ;;
3958         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
3959                 if test x$gas = xyes
3960                 then
3961                         tm_file=i386/aix386.h
3962                         extra_parts="crtbegin.o crtend.o"
3963                         tmake_file=i386/t-crtstuff
3964                 else
3965                         tm_file=i386/aix386ng.h
3966                         use_collect2=yes
3967                 fi
3968                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
3969                 xm_defines=USG
3970                 xmake_file=i386/x-aix
3971                 ;;
3972         i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
3973                 xm_file="xm-alloca.h ${xm_file}"
3974                 xm_defines="USG POSIX SMALL_ARG_MAX"
3975                 xmake_file=i386/x-ncr3000
3976                 if test x$stabs = xyes -a x$gas = xyes
3977                 then
3978                         tm_file=i386/sysv4gdb.h
3979                 else
3980                         tm_file=i386/sysv4.h
3981                 fi
3982                 extra_parts="crtbegin.o crtend.o"
3983                 tmake_file=i386/t-crtpic
3984                 ;;
3985         i[34567]86-next-*)
3986                 tm_file=i386/next.h
3987                 xm_file=i386/xm-next.h
3988                 tmake_file=i386/t-next
3989                 xmake_file=i386/x-next
3990                 extra_objs=nextstep.o
3991                 extra_parts="crtbegin.o crtend.o"
3992                 if test x$enable_threads = xyes; then
3993                         thread_file='mach'
3994                 fi
3995                 ;;
3996         i[34567]86-sequent-bsd*)                # 80386 from Sequent
3997                 use_collect2=yes
3998                 if test x$gas = xyes
3999                 then
4000                         tm_file=i386/seq-gas.h
4001                 else
4002                         tm_file=i386/sequent.h
4003                 fi
4004                 ;;
4005         i[34567]86-sequent-ptx1*)
4006                 xm_defines="USG SVR3"
4007                 xmake_file=i386/x-sysv3
4008                 tm_file=i386/seq-sysv3.h
4009                 tmake_file=i386/t-crtstuff
4010                 extra_parts="crtbegin.o crtend.o"
4011                 install_headers_dir=install-headers-cpio
4012                 ;;
4013         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
4014                 xm_defines="USG SVR3"
4015                 xmake_file=i386/x-sysv3
4016                 tm_file=i386/seq2-sysv3.h
4017                 tmake_file=i386/t-crtstuff
4018                 extra_parts="crtbegin.o crtend.o"
4019                 install_headers_dir=install-headers-cpio
4020                 ;;
4021         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
4022                 xm_file="xm-alloca.h ${xm_file}"
4023                 xm_defines="USG POSIX SMALL_ARG_MAX"
4024                 xmake_file=x-svr4
4025                 tm_file=i386/ptx4-i.h
4026                 tmake_file=t-svr4
4027                 extra_parts="crtbegin.o crtend.o"
4028                 install_headers_dir=install-headers-cpio
4029                 ;;
4030         i386-sun-sunos*)                # Sun i386 roadrunner
4031                 xm_defines=USG
4032                 tm_file=i386/sun.h
4033                 use_collect2=yes
4034                 ;;
4035         i[34567]86-wrs-vxworks*)
4036                 tm_file=i386/vxi386.h
4037                 tmake_file=i386/t-i386bare
4038                 thread_file='vxworks'
4039                 ;;
4040         i[34567]86-*-aout*)
4041                 tm_file=i386/i386-aout.h
4042                 tmake_file=i386/t-i386bare
4043                 ;;
4044         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
4045                 tm_file=i386/bsd386.h
4046 #               tmake_file=t-libc-ok
4047                 ;;
4048         i[34567]86-*-bsd*)
4049                 tm_file=i386/386bsd.h
4050 #               tmake_file=t-libc-ok
4051 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
4052 #               use_collect2=yes
4053                 ;;
4054         i[34567]86-*-freebsdelf*)
4055                 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
4056                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4057                 tmake_file=t-freebsd
4058                 gas=yes
4059                 gnu_ld=yes
4060                 stabs=yes
4061                 case x${enable_threads} in
4062                 xyes | xpthreads | xposix)
4063                         thread_file='posix'
4064                         tmake_file="${tmake_file} t-freebsd-thread"
4065                         ;;
4066                 esac
4067                 ;;
4068         i[34567]86-*-freebsd*)
4069                 tm_file="i386/freebsd.h i386/perform.h"
4070                 tmake_file=t-freebsd
4071                 ;;
4072         i[34567]86-*-netbsd*)
4073                 tm_file=i386/netbsd.h
4074                 tmake_file=t-netbsd
4075        use_collect2=yes
4076                 ;;
4077         i[34567]86-*-openbsd*)
4078                 # we need collect2 until our bug is fixed...
4079                 use_collect2=yes
4080                 ;;
4081         i[34567]86-*-coff*)
4082                 tm_file=i386/i386-coff.h
4083                 tmake_file=i386/t-i386bare
4084                 ;;
4085         i[34567]86-*-isc*)              # 80386 running ISC system
4086                 xm_file="${xm_file} i386/xm-isc.h"
4087                 xm_defines="USG SVR3"
4088                 case $machine in
4089                   i[34567]86-*-isc[34]*)
4090                     xmake_file=i386/x-isc3
4091                     ;;
4092                   *)
4093                     xmake_file=i386/x-isc
4094                     ;;
4095                 esac
4096                 if test x$gas = xyes -a x$stabs = xyes
4097                 then
4098                         tm_file=i386/iscdbx.h
4099                         tmake_file=i386/t-svr3dbx
4100                         extra_parts="svr3.ifile svr3z.ifile"
4101                 else
4102                         tm_file=i386/isccoff.h
4103                         tmake_file=i386/t-crtstuff
4104                         extra_parts="crtbegin.o crtend.o"
4105                 fi
4106                 install_headers_dir=install-headers-cpio
4107                 ;;
4108         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
4109                                         # pre BFD linkers
4110                 xmake_file=x-linux-aout
4111                 tmake_file="t-linux-aout i386/t-crtstuff"
4112                 tm_file=i386/linux-oldld.h
4113                 gnu_ld=yes
4114                 float_format=i386
4115                 ;;
4116         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
4117                 xmake_file=x-linux-aout
4118                 tmake_file="t-linux-aout i386/t-crtstuff"
4119                 tm_file=i386/linux-aout.h
4120                 gnu_ld=yes
4121                 float_format=i386
4122                 ;;
4123         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
4124                                         # GNU/Linux C library 5
4125                 xmake_file=x-linux      
4126                 tm_file=i386/linux.h    
4127                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
4128                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4129                 gnu_ld=yes
4130                 float_format=i386
4131                 if test x$enable_threads = xyes; then
4132                         thread_file='single'
4133                 fi
4134                 ;;
4135         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
4136                                         # aka GNU/Linux C library 6
4137                 xmake_file=x-linux
4138                 tm_file=i386/linux.h
4139                 tmake_file="t-linux i386/t-crtstuff"
4140                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4141                 gnu_ld=yes
4142                 float_format=i386
4143                 if test x$enable_threads = xyes; then
4144                         thread_file='posix'
4145                 fi
4146                 ;;
4147         i[34567]86-*-gnu*)
4148                 float_format=i386
4149                 ;;
4150         i[34567]86-go32-msdos | i[34567]86-*-go32*)
4151                 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
4152                 exit 1
4153                 ;;
4154         i[34567]86-pc-msdosdjgpp*)
4155                 xm_file=i386/xm-djgpp.h
4156                 tm_file=i386/djgpp.h
4157                 tmake_file=i386/t-djgpp
4158                 xmake_file=i386/x-djgpp
4159                 gnu_ld=yes
4160                 gas=yes
4161                 exeext=.exe
4162                 case $host in *pc-msdosdjgpp*)
4163                         target_alias=djgpp
4164                         ;;
4165                 esac
4166                 ;;
4167         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
4168                 tm_file=i386/moss.h
4169                 tmake_file=t-libc-ok
4170                 gnu_ld=yes
4171                 gas=yes
4172                 ;;
4173         i[34567]86-*-lynxos*)
4174                 if test x$gas = xyes
4175                 then
4176                         tm_file=i386/lynx.h
4177                 else
4178                         tm_file=i386/lynx-ng.h
4179                 fi
4180                 xm_file=i386/xm-lynx.h
4181                 tmake_file=i386/t-i386bare
4182                 xmake_file=x-lynx
4183                 ;;
4184         i[34567]86-*-mach*)
4185                 tm_file=i386/mach.h
4186 #               tmake_file=t-libc-ok
4187                 use_collect2=yes
4188                 ;;
4189         i[34567]86-*-osfrose*)          # 386 using OSF/rose
4190                 if test x$elf = xyes
4191                 then
4192                         tm_file=i386/osfelf.h
4193                         use_collect2=
4194                 else
4195                         tm_file=i386/osfrose.h
4196                         use_collect2=yes
4197                 fi
4198                 xm_file="i386/xm-osf.h ${xm_file}"
4199                 xmake_file=i386/x-osfrose
4200                 tmake_file=i386/t-osf
4201                 extra_objs=halfpic.o
4202                 ;;
4203         i[34567]86-go32-rtems*)
4204                 cpu_type=i386
4205                 xm_file=i386/xm-go32.h
4206                 tm_file=i386/go32-rtems.h
4207                 tmake_file="i386/t-go32 t-rtems"
4208                 ;;
4209         i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
4210                 cpu_type=i386
4211                 tm_file=i386/rtemself.h
4212                 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
4213                 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
4214                 ;;
4215         i[34567]86-*-rtemscoff*)
4216                 cpu_type=i386
4217                 tm_file=i386/rtems.h
4218                 tmake_file="i386/t-i386bare t-rtems"
4219                 ;;
4220         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
4221                 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
4222                 xm_defines="USG SVR3"
4223                 xmake_file=i386/x-sco5
4224                 install_headers_dir=install-headers-cpio
4225                 tm_file=i386/sco5.h
4226                 if test x$gas = xyes
4227                 then
4228                         tm_file="i386/sco5gas.h ${tm_file}"
4229                         tmake_file=i386/t-sco5gas
4230                 else
4231                         tmake_file=i386/t-sco5
4232                 fi
4233                 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
4234                 ;;
4235         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
4236                 xm_file="${xm_file} i386/xm-sco.h"
4237                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
4238                 xmake_file=i386/x-sco4
4239                 install_headers_dir=install-headers-cpio
4240                 if test x$stabs = xyes
4241                 then
4242                         tm_file=i386/sco4dbx.h
4243                         tmake_file=i386/t-svr3dbx
4244                         extra_parts="svr3.ifile svr3z.rfile"
4245                 else
4246                         tm_file=i386/sco4.h
4247                         tmake_file=i386/t-crtstuff
4248                         extra_parts="crtbegin.o crtend.o"
4249                 fi
4250                 # The default EAFS filesystem supports long file names.
4251                 # Truncating the target makes $host != $target which
4252                 # makes gcc think it is doing a cross-compile.
4253                 # truncate_target=yes
4254                 ;;
4255         i[34567]86-*-sco*)              # 80386 running SCO system
4256                 xm_file=i386/xm-sco.h
4257                 xmake_file=i386/x-sco
4258                 install_headers_dir=install-headers-cpio
4259                 if test x$stabs = xyes
4260                 then
4261                         tm_file=i386/scodbx.h
4262                         tmake_file=i386/t-svr3dbx
4263                         extra_parts="svr3.ifile svr3z.rfile"
4264                 else
4265                         tm_file=i386/sco.h
4266                         extra_parts="crtbegin.o crtend.o"
4267                         tmake_file=i386/t-crtstuff
4268                 fi
4269                 truncate_target=yes
4270                 ;;
4271         i[34567]86-*-solaris2*)
4272                 xm_file="xm-alloca.h ${xm_file}"
4273                 xm_defines="USG POSIX SMALL_ARG_MAX"
4274                 tm_file=i386/sol2.h
4275                 if test x$gas = xyes; then
4276                         # Only needed if gas does not support -s
4277                         tm_file="i386/sol2gas.h ${tm_file}"
4278                 fi
4279                 tmake_file=i386/t-sol2
4280                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
4281                 xmake_file=x-svr4
4282                 if test x${enable_threads} = x; then
4283                     enable_threads=$have_pthread_h
4284                     if test x${enable_threads} = x; then
4285                         enable_threads=$have_thread_h
4286                     fi
4287                 fi
4288                 if test x${enable_threads} = xyes; then
4289                     if test x${have_pthread_h} = xyes; then
4290                         thread_file='posix'
4291                     else
4292                         thread_file='solaris'
4293                     fi
4294                 fi
4295                 ;;
4296        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
4297                xm_file="xm-alloca.h ${xm_file}"
4298                xm_defines="USG POSIX"
4299                tm_file=i386/sysv5.h
4300                if test x$stabs = xyes
4301                then
4302                        tm_file="${tm_file} dbx.h"
4303                fi
4304                tmake_file=i386/t-crtpic
4305                xmake_file=x-svr4
4306                extra_parts="crtbegin.o crtend.o"
4307                if test x$enable_threads = xyes; then
4308                        thread_file='posix'
4309                fi
4310                ;;
4311         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
4312                 xm_file="xm-alloca.h ${xm_file}"
4313                 xm_defines="USG POSIX SMALL_ARG_MAX"
4314                 tm_file=i386/sysv4.h
4315                 if test x$stabs = xyes
4316                 then
4317                         tm_file="${tm_file} dbx.h"
4318                 fi
4319                 tmake_file=i386/t-crtpic
4320                 xmake_file=x-svr4
4321                 extra_parts="crtbegin.o crtend.o"
4322                 ;;
4323         i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
4324                 xm_file="xm-alloca.h ${xm_file}"
4325                 xm_defines="USG POSIX"
4326                 tm_file=i386/udk.h
4327                 tmake_file="i386/t-crtpic i386/t-udk"
4328                 xmake_file=x-svr4
4329                 extra_parts="crtbegin.o crtend.o"
4330                 install_headers_dir=install-headers-cpio
4331                 ;;
4332         i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
4333                 cpu_type=i386
4334                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
4335                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
4336                 if test x$stabs = xyes
4337                 then
4338                         tm_file=i386/osf1elfgdb.h
4339                 else
4340                         tm_file=i386/osf1elf.h
4341                 fi
4342                 tmake_file=i386/t-osf1elf
4343                 xmake_file=i386/x-osf1elf
4344                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
4345                 ;;
4346         i[34567]86-*-sysv*)             # Intel 80386's running system V
4347                 xm_defines="USG SVR3"
4348                 xmake_file=i386/x-sysv3
4349                 if test x$gas = xyes
4350                 then
4351                         if test x$stabs = xyes
4352                         then
4353                                 tm_file=i386/svr3dbx.h
4354                                 tmake_file=i386/t-svr3dbx
4355                                 extra_parts="svr3.ifile svr3z.rfile"
4356                         else
4357                                 tm_file=i386/svr3gas.h
4358                                 extra_parts="crtbegin.o crtend.o"
4359                                 tmake_file=i386/t-crtstuff
4360                         fi
4361                 else
4362                         tm_file=i386/sysv3.h
4363                         extra_parts="crtbegin.o crtend.o"
4364                         tmake_file=i386/t-crtstuff
4365                 fi
4366                 ;;
4367         i386-*-vsta)                    # Intel 80386's running VSTa kernel
4368                 xm_file="${xm_file} i386/xm-vsta.h"
4369                 tm_file=i386/vsta.h
4370                 tmake_file=i386/t-vsta
4371                 xmake_file=i386/x-vsta
4372                 ;;
4373         i[34567]86-*-win32)
4374                 xm_file="${xm_file} i386/xm-cygwin.h"
4375                 tmake_file=i386/t-cygwin
4376                 tm_file=i386/win32.h
4377                 xmake_file=i386/x-cygwin
4378                 extra_objs=winnt.o
4379                 if test x$enable_threads = xyes; then
4380                         thread_file='win32'
4381                 fi
4382                 exeext=.exe
4383                 ;;
4384         i[34567]86-*-pe | i[34567]86-*-cygwin*)
4385                 xm_file="${xm_file} i386/xm-cygwin.h"
4386                 tmake_file=i386/t-cygwin
4387                 tm_file=i386/cygwin.h
4388                 xmake_file=i386/x-cygwin
4389                 extra_objs=winnt.o
4390                 if test x$enable_threads = xyes; then
4391                         thread_file='win32'
4392                 fi
4393                 exeext=.exe
4394                 ;;
4395         i[34567]86-*-mingw32*)
4396                 tm_file=i386/mingw32.h
4397                 xm_file="${xm_file} i386/xm-mingw32.h"
4398                 tmake_file="i386/t-cygwin i386/t-mingw32"
4399                 extra_objs=winnt.o
4400                 xmake_file=i386/x-cygwin
4401                 if test x$enable_threads = xyes; then
4402                         thread_file='win32'
4403                 fi
4404                 exeext=.exe
4405                 case $machine in
4406                         *mingw32msv*)
4407                                 ;;
4408                         *minwg32crt* | *mingw32*)
4409                                 tm_file="${tm_file} i386/crtdll.h"
4410                                 ;;
4411                 esac
4412                 ;;
4413         i[34567]86-*-uwin*)
4414                 tm_file=i386/uwin.h
4415                 xm_file="${xm_file} i386/xm-uwin.h"
4416                 xm_defines="USG NO_STAB_H"
4417                 tmake_file="i386/t-cygwin i386/t-uwin"
4418                 extra_objs=winnt.o
4419                 xmake_file=i386/x-cygwin
4420                 if test x$enable_threads = xyes; then
4421                         thread_file='win32'
4422                 fi
4423                 exeext=.exe
4424                 ;;
4425         i[34567]86-*-interix*)
4426                 tm_file="i386/i386-interix.h interix.h"
4427                 xm_file="i386/xm-i386-interix.h xm-interix.h"
4428                 xm_defines="USG"
4429                 tmake_file="i386/t-interix"
4430                 extra_objs=interix.o
4431                 xmake_file=x-interix
4432                 if test x$enable_threads = xyes ; then
4433                         thread_file='posix'
4434                 fi
4435                 if test x$stabs = xyes ; then
4436                         tm_file="${tm_file} dbxcoff.h"
4437                 fi
4438                 ;;
4439         i[34567]86-*-winnt3*)
4440                 tm_file=i386/win-nt.h
4441                 out_file=i386/i386.c
4442                 xm_file="xm-winnt.h ${xm_file}"
4443                 xmake_file=winnt/x-winnt
4444                 tmake_file=i386/t-winnt
4445                 extra_host_objs="winnt.o oldnames.o"
4446                 extra_gcc_objs="spawnv.o oldnames.o"
4447                 if test x$gnu_ld != xyes
4448                 then
4449                         extra_programs=ld.exe
4450                 fi
4451                 if test x$enable_threads = xyes; then
4452                         thread_file='win32'
4453                 fi
4454                 ;;
4455         i[34567]86-dg-dgux*)
4456                 xm_file="xm-alloca.h ${xm_file}"
4457                 xm_defines="USG POSIX"
4458                 out_file=i386/dgux.c
4459                 tm_file=i386/dgux.h
4460                 tmake_file=i386/t-dgux
4461                 xmake_file=i386/x-dgux
4462                 install_headers_dir=install-headers-cpio
4463               ;;
4464         i860-alliant-*)         # Alliant FX/2800
4465                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
4466                 xm_file="${xm_file}"
4467                 xmake_file=i860/x-fx2800
4468                 tmake_file=i860/t-fx2800
4469                 extra_parts="crtbegin.o crtend.o"
4470                 ;;
4471         i860-*-bsd*)
4472                 tm_file="${tm_file} i860/bsd.h"
4473                 if test x$gas = xyes
4474                 then
4475                         tm_file="${tm_file} i860/bsd-gas.h"
4476                 fi
4477                 use_collect2=yes
4478                 ;;
4479         i860-*-mach*)
4480                 tm_file="${tm_file} i860/mach.h"
4481                 tmake_file=t-libc-ok
4482                 ;;
4483         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
4484                 tm_file="${tm_file} svr3.h i860/paragon.h"
4485                 xm_defines="USG SVR3"
4486                 tmake_file=t-osf
4487                 ;;
4488         i860-*-sysv3*)
4489                 tm_file="${tm_file} svr3.h i860/sysv3.h"
4490                 xm_defines="USG SVR3"
4491                 xmake_file=i860/x-sysv3
4492                 extra_parts="crtbegin.o crtend.o"
4493                 ;;
4494         i860-*-sysv4*)
4495                 tm_file="${tm_file} svr4.h i860/sysv4.h"
4496                 xm_defines="USG SVR3"
4497                 xmake_file=i860/x-sysv4
4498                 tmake_file=t-svr4
4499                 extra_parts="crtbegin.o crtend.o"
4500                 ;;
4501         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
4502                 tm_file="${tm_file} i960/vx960.h"
4503                 tmake_file=i960/t-vxworks960
4504                 use_collect2=yes
4505                 thread_file='vxworks'
4506                 ;;
4507         i960-wrs-vxworks5* | i960-wrs-vxworks)
4508                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
4509                 tmake_file=i960/t-vxworks960
4510                 use_collect2=yes
4511                 thread_file='vxworks'
4512                 ;;
4513         i960-wrs-vxworks*)
4514                 tm_file="${tm_file} i960/vx960.h"
4515                 tmake_file=i960/t-vxworks960
4516                 use_collect2=yes
4517                 thread_file='vxworks'
4518                 ;;
4519         i960-*-coff*)
4520                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
4521                 tmake_file=i960/t-960bare
4522                 use_collect2=yes
4523                 ;;
4524         i960-*-rtems)
4525                 tmake_file="i960/t-960bare t-rtems"
4526                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
4527                 use_collect2=yes
4528                 ;;
4529         i960-*-*)                       # Default i960 environment.
4530                 use_collect2=yes
4531                 ;;
4532         m32r-*-elf*)
4533                 extra_parts="crtinit.o crtfini.o"
4534                 ;;
4535         m68000-convergent-sysv*)
4536                 tm_file=m68k/ctix.h
4537                 xm_file="m68k/xm-3b1.h ${xm_file}"
4538                 xm_defines=USG
4539                 use_collect2=yes
4540                 extra_headers=math-68881.h
4541                 ;;
4542         m68000-hp-bsd*)                 # HP 9000/200 running BSD
4543                 tm_file=m68k/hp2bsd.h
4544                 xmake_file=m68k/x-hp2bsd
4545                 use_collect2=yes
4546                 extra_headers=math-68881.h
4547                 ;;
4548         m68000-hp-hpux*)                # HP 9000 series 300
4549                 xm_file="xm-alloca.h ${xm_file}"
4550                 xm_defines="USG"
4551                 if test x$gas = xyes
4552                 then
4553                         xmake_file=m68k/x-hp320g
4554                         tm_file=m68k/hp310g.h
4555                 else
4556                         xmake_file=m68k/x-hp320
4557                         tm_file=m68k/hp310.h
4558                 fi
4559                 install_headers_dir=install-headers-cpio
4560                 use_collect2=yes
4561                 extra_headers=math-68881.h
4562                 ;;
4563         m68000-sun-sunos3*)
4564                 tm_file=m68k/sun2.h
4565                 use_collect2=yes
4566                 extra_headers=math-68881.h
4567                 ;;
4568         m68000-sun-sunos4*)
4569                 tm_file=m68k/sun2o4.h
4570                 use_collect2=yes
4571                 extra_headers=math-68881.h
4572                 ;;
4573         m68000-att-sysv*)
4574                 xm_file="m68k/xm-3b1.h ${xm_file}"
4575                 xm_defines=USG
4576                 if test x$gas = xyes
4577                 then
4578                         tm_file=m68k/3b1g.h
4579                 else
4580                         tm_file=m68k/3b1.h
4581                 fi
4582                 use_collect2=yes
4583                 extra_headers=math-68881.h
4584                 ;;
4585         m68k-apple-aux*)                # Apple Macintosh running A/UX
4586                 xm_defines="USG AUX"
4587                 tmake_file=m68k/t-aux
4588                 install_headers_dir=install-headers-cpio
4589                 extra_headers=math-68881.h
4590                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
4591                 tm_file=
4592                 if test "$gnu_ld" = yes
4593                 then
4594                         tm_file="${tm_file} m68k/auxgld.h"
4595                 else
4596                         tm_file="${tm_file} m68k/auxld.h"
4597                 fi
4598                 if test "$gas" = yes
4599                 then
4600                         tm_file="${tm_file} m68k/auxgas.h"
4601                 else
4602                         tm_file="${tm_file} m68k/auxas.h"
4603                 fi
4604                 tm_file="${tm_file} m68k/a-ux.h"
4605                 float_format=m68k
4606                 ;;
4607         m68k-apollo-*)
4608                 tm_file=m68k/apollo68.h
4609                 xmake_file=m68k/x-apollo68
4610                 use_collect2=yes
4611                 extra_headers=math-68881.h
4612                 float_format=m68k
4613                 ;;
4614         m68k-altos-sysv*)                  # Altos 3068
4615                 if test x$gas = xyes
4616                 then
4617                         tm_file=m68k/altos3068.h
4618                         xm_defines=USG
4619                 else
4620                         echo "The Altos is supported only with the GNU assembler" 1>&2
4621                         exit 1
4622                 fi
4623                 extra_headers=math-68881.h
4624                 ;;
4625         m68k-bull-sysv*)                # Bull DPX/2
4626                 if test x$gas = xyes
4627                 then
4628                         if test x$stabs = xyes
4629                         then
4630                                 tm_file=m68k/dpx2cdbx.h
4631                         else
4632                                 tm_file=m68k/dpx2g.h
4633                         fi
4634                 else
4635                         tm_file=m68k/dpx2.h
4636                 fi
4637                 xm_file="xm-alloca.h ${xm_file}"
4638                 xm_defines=USG
4639                 xmake_file=m68k/x-dpx2
4640                 use_collect2=yes
4641                 extra_headers=math-68881.h
4642                 ;;
4643         m68k-atari-sysv4*)              # Atari variant of V.4.
4644                 tm_file=m68k/atari.h
4645                 xm_file="xm-alloca.h ${xm_file}"
4646                 xm_defines="USG FULL_PROTOTYPES"
4647                 tmake_file=t-svr4
4648                 extra_parts="crtbegin.o crtend.o"
4649                 extra_headers=math-68881.h
4650                 float_format=m68k
4651                 ;;
4652         m68k-motorola-sysv*)
4653                 tm_file=m68k/mot3300.h
4654                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
4655                 if test x$gas = xyes
4656                 then
4657                         xmake_file=m68k/x-mot3300-gas
4658                         if test x$gnu_ld = xyes
4659                         then
4660                                 tmake_file=m68k/t-mot3300-gald
4661                         else
4662                                 tmake_file=m68k/t-mot3300-gas
4663                                 use_collect2=yes
4664                         fi
4665                 else
4666                         xmake_file=m68k/x-mot3300
4667                         if test x$gnu_ld = xyes
4668                         then
4669                                 tmake_file=m68k/t-mot3300-gld
4670                         else
4671                                 tmake_file=m68k/t-mot3300
4672                                 use_collect2=yes
4673                         fi
4674                 fi
4675                 gdb_needs_out_file_path=yes
4676                 extra_parts="crt0.o mcrt0.o"
4677                 extra_headers=math-68881.h
4678                 float_format=m68k
4679                 ;;
4680         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
4681                 tm_file=m68k/tower-as.h
4682                 xm_defines="USG SVR3"
4683                 xmake_file=m68k/x-tower
4684                 extra_parts="crtbegin.o crtend.o"
4685                 extra_headers=math-68881.h
4686                 ;;
4687         m68k-plexus-sysv*)
4688                 tm_file=m68k/plexus.h
4689                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
4690                 xm_defines=USG
4691                 use_collect2=yes
4692                 extra_headers=math-68881.h
4693                 ;;
4694         m68k-tti-*)
4695                 tm_file=m68k/pbb.h
4696                 xm_file="xm-alloca.h ${xm_file}"
4697                 xm_defines=USG
4698                 extra_headers=math-68881.h
4699                 ;;
4700         m68k-crds-unos*)
4701                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
4702                 xm_defines="USG unos"
4703                 xmake_file=m68k/x-crds
4704                 tm_file=m68k/crds.h
4705                 use_collect2=yes
4706                 extra_headers=math-68881.h
4707                 ;;
4708         m68k-cbm-sysv4*)                # Commodore variant of V.4.
4709                 tm_file=m68k/amix.h
4710                 xm_file="xm-alloca.h ${xm_file}"
4711                 xm_defines="USG FULL_PROTOTYPES"
4712                 xmake_file=m68k/x-amix
4713                 tmake_file=t-svr4
4714                 extra_parts="crtbegin.o crtend.o"
4715                 extra_headers=math-68881.h
4716                 float_format=m68k
4717                 ;;
4718         m68k-ccur-rtu)
4719                 tm_file=m68k/ccur-GAS.h
4720                 xmake_file=m68k/x-ccur
4721                 extra_headers=math-68881.h
4722                 use_collect2=yes
4723                 float_format=m68k
4724                 ;;
4725         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
4726                 tm_file=m68k/hp3bsd44.h
4727                 xmake_file=m68k/x-hp3bsd44
4728                 use_collect2=yes
4729                 extra_headers=math-68881.h
4730                 float_format=m68k
4731                 ;;
4732         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
4733                 tm_file=m68k/hp3bsd.h
4734                 use_collect2=yes
4735                 extra_headers=math-68881.h
4736                 float_format=m68k
4737                 ;;
4738         m68k-isi-bsd*)
4739                 if test x$with_fp = xno
4740                 then
4741                         tm_file=m68k/isi-nfp.h
4742                 else
4743                         tm_file=m68k/isi.h
4744                         float_format=m68k
4745                 fi
4746                 use_collect2=yes
4747                 extra_headers=math-68881.h
4748                 ;;
4749         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
4750                 xm_file="xm-alloca.h ${xm_file}"
4751                 xm_defines="USG"
4752                 if test x$gas = xyes
4753                 then
4754                         xmake_file=m68k/x-hp320g
4755                         tm_file=m68k/hp320g.h
4756                 else
4757                         xmake_file=m68k/x-hp320
4758                         tm_file=m68k/hpux7.h
4759                 fi
4760                 install_headers_dir=install-headers-cpio
4761                 use_collect2=yes
4762                 extra_headers=math-68881.h
4763                 float_format=m68k
4764                 ;;
4765         m68k-hp-hpux*)  # HP 9000 series 300
4766                 xm_file="xm-alloca.h ${xm_file}"
4767                 xm_defines="USG"
4768                 if test x$gas = xyes
4769                 then
4770                         xmake_file=m68k/x-hp320g
4771                         tm_file=m68k/hp320g.h
4772                 else
4773                         xmake_file=m68k/x-hp320
4774                         tm_file=m68k/hp320.h
4775                 fi
4776                 install_headers_dir=install-headers-cpio
4777                 use_collect2=yes
4778                 extra_headers=math-68881.h
4779                 float_format=m68k
4780                 ;;
4781         m68k-sun-mach*)
4782                 tm_file=m68k/sun3mach.h
4783                 use_collect2=yes
4784                 extra_headers=math-68881.h
4785                 float_format=m68k
4786                 ;;
4787         m68k-sony-newsos3*)
4788                 if test x$gas = xyes
4789                 then
4790                         tm_file=m68k/news3gas.h
4791                 else
4792                         tm_file=m68k/news3.h
4793                 fi
4794                 use_collect2=yes
4795                 extra_headers=math-68881.h
4796                 float_format=m68k
4797                 ;;
4798         m68k-sony-bsd* | m68k-sony-newsos*)
4799                 if test x$gas = xyes
4800                 then
4801                         tm_file=m68k/newsgas.h
4802                 else
4803                         tm_file=m68k/news.h
4804                 fi
4805                 use_collect2=yes
4806                 extra_headers=math-68881.h
4807                 float_format=m68k
4808                 ;;
4809         m68k-next-nextstep2*)
4810                 tm_file=m68k/next21.h
4811                 xm_file="m68k/xm-next.h ${xm_file}"
4812                 tmake_file=m68k/t-next
4813                 xmake_file=m68k/x-next
4814                 extra_objs=nextstep.o
4815                 extra_headers=math-68881.h
4816                 use_collect2=yes
4817                 float_format=m68k
4818                 ;;
4819         m68k-next-nextstep[34]*)
4820                 tm_file=m68k/next.h
4821                 xm_file="m68k/xm-next.h ${xm_file}"
4822                 tmake_file=m68k/t-next
4823                 xmake_file=m68k/x-next
4824                 extra_objs=nextstep.o
4825                 extra_parts="crtbegin.o crtend.o"
4826                 extra_headers=math-68881.h
4827                 float_format=m68k
4828                 if test x$enable_threads = xyes; then
4829                         thread_file='mach'
4830                 fi
4831                 ;;
4832         m68k-sun-sunos3*)
4833                 if test x$with_fp = xno
4834                 then
4835                         tm_file=m68k/sun3n3.h
4836                 else
4837                         tm_file=m68k/sun3o3.h
4838                         float_format=m68k
4839                 fi
4840                 use_collect2=yes
4841                 extra_headers=math-68881.h
4842                 ;;
4843         m68k-sun-sunos*)                        # For SunOS 4 (the default).
4844                 if test x$with_fp = xno
4845                 then
4846                         tm_file=m68k/sun3n.h
4847                 else
4848                         tm_file=m68k/sun3.h
4849                         float_format=m68k
4850                 fi
4851                 use_collect2=yes
4852                 extra_headers=math-68881.h
4853                 ;;
4854         m68k-wrs-vxworks*)
4855                 tm_file=m68k/vxm68k.h
4856                 tmake_file=m68k/t-vxworks68
4857                 extra_headers=math-68881.h
4858                 thread_file='vxworks'
4859                 float_format=m68k
4860                 ;;
4861         m68k-*-aout*)
4862                 tmake_file=m68k/t-m68kbare
4863                 tm_file="m68k/m68k-aout.h libgloss.h"
4864                 extra_headers=math-68881.h
4865                 float_format=m68k
4866                 ;;
4867         m68k-*-coff*)
4868                 tmake_file=m68k/t-m68kbare
4869                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
4870                 extra_headers=math-68881.h
4871                 float_format=m68k
4872                 ;;
4873         m68020-*-elf* | m68k-*-elf*)
4874                 tm_file="m68k/m68020-elf.h"
4875                 xm_file=m68k/xm-m68kv.h
4876                 tmake_file=m68k/t-m68kelf
4877                 header_files=math-68881.h
4878                 ;;
4879         m68k-*-lynxos*)
4880                 if test x$gas = xyes
4881                 then
4882                         tm_file=m68k/lynx.h
4883                 else
4884                         tm_file=m68k/lynx-ng.h
4885                 fi
4886                 xm_file=m68k/xm-lynx.h
4887                 xmake_file=x-lynx
4888                 tmake_file=m68k/t-lynx
4889                 extra_headers=math-68881.h
4890                 float_format=m68k
4891                 ;;
4892         m68k*-*-netbsd*)
4893                 tm_file=m68k/netbsd.h
4894                 tmake_file=t-netbsd
4895                 float_format=m68k
4896        use_collect2=yes
4897                 ;;
4898         m68k*-*-openbsd*)
4899                 float_format=m68k
4900                 # we need collect2 until our bug is fixed...
4901                 use_collect2=yes
4902                 ;;
4903         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
4904                 xm_file="xm-alloca.h ${xm_file}"
4905                 xm_defines=USG
4906                 xmake_file=m68k/x-m68kv
4907                 extra_parts="crtbegin.o crtend.o"
4908                 extra_headers=math-68881.h
4909                 float_format=m68k
4910                 ;;
4911         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
4912                 tm_file=m68k/m68kv4.h
4913                 xm_file="xm-alloca.h ${xm_file}"
4914                 xm_defines=USG
4915                 tmake_file=t-svr4
4916                 extra_parts="crtbegin.o crtend.o"
4917                 extra_headers=math-68881.h
4918                 float_format=m68k
4919                 ;;
4920         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
4921                                         # with a.out format
4922                 xmake_file=x-linux
4923                 tm_file=m68k/linux-aout.h
4924                 tmake_file="t-linux-aout m68k/t-linux-aout"
4925                 extra_headers=math-68881.h
4926                 float_format=m68k
4927                 gnu_ld=yes
4928                 ;;
4929         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
4930                                         # with ELF format using the
4931                                         # GNU/Linux C library 5
4932                 xmake_file=x-linux
4933                 tm_file=m68k/linux.h
4934                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
4935                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4936                 extra_headers=math-68881.h
4937                 float_format=m68k
4938                 gnu_ld=yes
4939                 ;;
4940         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
4941                                         # with ELF format using glibc 2
4942                                         # aka the GNU/Linux C library 6.
4943                 xmake_file=x-linux
4944                 tm_file=m68k/linux.h
4945                 tmake_file="t-linux m68k/t-linux"
4946                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4947                 extra_headers=math-68881.h
4948                 float_format=m68k
4949                 gnu_ld=yes
4950                 if test x$enable_threads = xyes; then
4951                         thread_file='posix'
4952                 fi
4953                 ;;
4954         m68k-*-psos*)
4955                 tmake_file=m68k/t-m68kbare
4956                 tm_file=m68k/m68k-psos.h
4957                 extra_headers=math-68881.h
4958                 float_format=m68k
4959                 ;;
4960         m68k-*-rtemscoff*|m68k-*-rtems*)
4961                 tmake_file="m68k/t-m68kbare t-rtems"
4962                 tm_file=m68k/rtems.h
4963                 extra_headers=math-68881.h
4964                 float_format=m68k
4965                 ;;
4966         m68k-*-rtemself*)
4967                 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
4968                 tm_file=m68k/rtemself.h
4969                 extra_headers=math-68881.h
4970                 float_format=m68k
4971                 ;;
4972         m88k-dg-dgux*)
4973                 case $machine in
4974                   m88k-dg-dguxbcs*)
4975                     tm_file=m88k/dguxbcs.h
4976                     tmake_file=m88k/t-dguxbcs
4977                     ;;
4978                   *)
4979                     tm_file=m88k/dgux.h
4980                     tmake_file=m88k/t-dgux
4981                     ;;
4982                 esac
4983                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
4984                 xmake_file=m88k/x-dgux
4985                 if test x$gas = xyes
4986                 then
4987                         tmake_file=m88k/t-dgux-gas
4988                 fi
4989                 ;;
4990         m88k-dolphin-sysv3*)
4991                 tm_file=m88k/dolph.h
4992                 extra_parts="crtbegin.o crtend.o"
4993                 xm_file="m88k/xm-sysv3.h ${xm_file}"
4994                 xmake_file=m88k/x-dolph
4995                 if test x$gas = xyes
4996                 then
4997                         tmake_file=m88k/t-m88k-gas
4998                 fi
4999                 ;;
5000         m88k-tektronix-sysv3)
5001                 tm_file=m88k/tekXD88.h
5002                 extra_parts="crtbegin.o crtend.o"
5003                 xm_file="m88k/xm-sysv3.h ${xm_file}"
5004                 xmake_file=m88k/x-tekXD88
5005                 if test x$gas = xyes
5006                 then
5007                         tmake_file=m88k/t-m88k-gas
5008                 fi
5009                 ;;
5010         m88k-*-aout*)
5011                 tm_file=m88k/m88k-aout.h
5012                 ;;
5013         m88k-*-coff*)
5014                 tm_file=m88k/m88k-coff.h
5015                 tmake_file=m88k/t-bug
5016                 ;;
5017         m88k-*-luna*)
5018                 tm_file=m88k/luna.h
5019                 extra_parts="crtbegin.o crtend.o"
5020                 if test x$gas = xyes
5021                 then
5022                         tmake_file=m88k/t-luna-gas
5023                 else
5024                         tmake_file=m88k/t-luna
5025                 fi
5026                 ;;
5027         m88k-*-openbsd*)
5028                 tmake_file="${tmake_file} m88k/t-luna-gas"
5029                 ;;
5030         m88k-*-sysv3*)
5031                 tm_file=m88k/sysv3.h
5032                 extra_parts="crtbegin.o crtend.o"
5033                 xm_file="m88k/xm-sysv3.h ${xm_file}"
5034                 xmake_file=m88k/x-sysv3
5035                 if test x$gas = xyes
5036                 then
5037                         tmake_file=m88k/t-m88k-gas
5038                 fi
5039                 ;;
5040         m88k-*-sysv4*)
5041                 tm_file=m88k/sysv4.h
5042                 extra_parts="crtbegin.o crtend.o"
5043                 xmake_file=m88k/x-sysv4
5044                 tmake_file=m88k/t-sysv4
5045                 ;;
5046         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
5047                 if test "x$gnu_ld" = xyes
5048                 then
5049                         tm_file="mips/iris6.h mips/iris6gld.h"
5050                 else
5051                         tm_file=mips/iris6.h
5052                 fi
5053                 tmake_file=mips/t-iris6
5054                 xm_file=mips/xm-iris6.h
5055                 xmake_file=mips/x-iris6
5056 #               if test x$enable_threads = xyes; then
5057 #                       thread_file='irix'
5058 #               fi
5059                 ;;
5060         mips-wrs-vxworks)
5061                 tm_file="mips/elf.h mips/vxworks.h"
5062                 tmake_file=mips/t-ecoff
5063                 gas=yes
5064                 gnu_ld=yes
5065                 extra_parts="crtbegin.o crtend.o"
5066                 thread_file='vxworks'
5067                 ;;
5068         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
5069                 tm_file="mips/iris6.h mips/cross64.h"
5070                 xm_defines=USG
5071                 xm_file="mips/xm-iris5.h"
5072                 xmake_file=mips/x-iris
5073                 tmake_file=mips/t-cross64
5074                 # See comment in mips/iris[56].h files.
5075                 use_collect2=yes
5076 #               if test x$enable_threads = xyes; then
5077 #                       thread_file='irix'
5078 #               fi
5079                 ;;
5080         mips-sni-sysv4)
5081                 if test x$gas = xyes
5082                 then
5083                         if test x$stabs = xyes
5084                         then
5085                                 tm_file=mips/iris5gdb.h
5086                         else
5087                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
5088                         fi
5089                 else
5090                         tm_file=mips/sni-svr4.h
5091                 fi
5092                 xm_defines=USG
5093                 xmake_file=mips/x-sni-svr4
5094                 tmake_file=mips/t-mips-gas
5095                 if test x$gnu_ld != xyes
5096                 then
5097                         use_collect2=yes
5098                 fi
5099                 ;;
5100         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
5101                 if test x$gas = xyes
5102                 then
5103                         tm_file="mips/iris5.h mips/iris5gas.h"
5104                         if test x$stabs = xyes
5105                         then
5106                                 tm_file="${tm_file} dbx.h"
5107                         fi
5108                 else
5109                         tm_file=mips/iris5.h
5110                 fi
5111                 xm_defines=USG
5112                 xm_file="mips/xm-iris5.h"
5113                 xmake_file=mips/x-iris
5114                 # mips-tfile doesn't work yet
5115                 tmake_file=mips/t-mips-gas
5116                 # See comment in mips/iris5.h file.
5117                 use_collect2=yes
5118 #               if test x$enable_threads = xyes; then
5119 #                       thread_file='irix'
5120 #               fi
5121                 ;;
5122         mips-sgi-irix4loser*)           # Mostly like a MIPS.
5123                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
5124                 if test x$stabs = xyes; then
5125                         tm_file="${tm_file} dbx.h"
5126                 fi
5127                 xm_defines=USG
5128                 xmake_file=mips/x-iris
5129                 if test x$gas = xyes
5130                 then
5131                         tmake_file=mips/t-mips-gas
5132                 else
5133                         extra_passes="mips-tfile mips-tdump"
5134                 fi
5135                 if test x$gnu_ld != xyes
5136                 then
5137                         use_collect2=yes
5138                 fi
5139 #               if test x$enable_threads = xyes; then
5140 #                       thread_file='irix'
5141 #               fi
5142                 ;;
5143         mips-sgi-irix4*)                # Mostly like a MIPS.
5144                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
5145                 if test x$stabs = xyes; then
5146                         tm_file="${tm_file} dbx.h"
5147                 fi
5148                 xm_defines=USG
5149                 xmake_file=mips/x-iris
5150                 if test x$gas = xyes
5151                 then
5152                         tmake_file=mips/t-mips-gas
5153                 else
5154                         extra_passes="mips-tfile mips-tdump"
5155                 fi
5156                 if test x$gnu_ld != xyes
5157                 then
5158                         use_collect2=yes
5159                 fi
5160 #               if test x$enable_threads = xyes; then
5161 #                       thread_file='irix'
5162 #               fi
5163                 ;;
5164         mips-sgi-*)                     # Mostly like a MIPS.
5165                 tm_file="mips/iris3.h ${tm_file}"
5166                 if test x$stabs = xyes; then
5167                         tm_file="${tm_file} dbx.h"
5168                 fi
5169                 xm_defines=USG
5170                 xmake_file=mips/x-iris3
5171                 if test x$gas = xyes
5172                 then
5173                         tmake_file=mips/t-mips-gas
5174                 else
5175                         extra_passes="mips-tfile mips-tdump"
5176                 fi
5177                 if test x$gnu_ld != xyes
5178                 then
5179                         use_collect2=yes
5180                 fi
5181                 ;;
5182         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
5183                 tm_file="mips/osfrose.h ${tm_file}"
5184                 xmake_file=mips/x-osfrose
5185                 tmake_file=mips/t-osfrose
5186                 extra_objs=halfpic.o
5187                 use_collect2=yes
5188                 ;;
5189         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
5190                 tm_file=mips/dec-osf1.h
5191                 if test x$stabs = xyes; then
5192                         tm_file="${tm_file} dbx.h"
5193                 fi
5194                 xmake_file=mips/x-dec-osf1
5195                 if test x$gas = xyes
5196                 then
5197                         tmake_file=mips/t-mips-gas
5198                 else
5199                         tmake_file=mips/t-ultrix
5200                         extra_passes="mips-tfile mips-tdump"
5201                 fi
5202                 if test x$gnu_ld != xyes
5203                 then
5204                         use_collect2=yes
5205                 fi
5206                 ;;
5207         mips-dec-bsd*)                  # Decstation running 4.4 BSD
5208               tm_file=mips/dec-bsd.h
5209               if test x$gas = xyes
5210               then
5211                         tmake_file=mips/t-mips-gas
5212               else
5213                         tmake_file=mips/t-ultrix
5214                         extra_passes="mips-tfile mips-tdump"
5215               fi
5216               if test x$gnu_ld != xyes
5217               then
5218                         use_collect2=yes
5219               fi
5220               ;;
5221         mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
5222                 tm_file=mips/netbsd.h
5223                 # On NetBSD, the headers are already okay, except for math.h.
5224                 tmake_file=t-netbsd
5225                 ;;
5226        mips*-*-linux*)                         # Linux MIPS, either endian.
5227                 xmake_file=x-linux
5228                case $machine in
5229                        mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
5230                        *)         tm_file="mips/elf.h mips/linux.h" ;;
5231                esac
5232                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5233                 gnu_ld=yes
5234                 gas=yes
5235                 if test x$enable_threads = xyes; then
5236                         thread_file='posix'
5237                 fi
5238                 ;;
5239         mips*el-*-openbsd*)     # mips little endian
5240                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
5241                 ;;
5242         mips*-*-openbsd*)               # mips big endian
5243                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
5244                 tm_file="mips/openbsd-be.h ${tm_file}"
5245                 ;;
5246         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
5247                 tm_file="mips/news4.h ${tm_file}"
5248                 if test x$stabs = xyes; then
5249                         tm_file="${tm_file} dbx.h"
5250                 fi
5251                 if test x$gas = xyes
5252                 then
5253                         tmake_file=mips/t-mips-gas
5254                 else
5255                         extra_passes="mips-tfile mips-tdump"
5256                 fi
5257                 if test x$gnu_ld != xyes
5258                 then
5259                         use_collect2=yes
5260                 fi
5261                 xmake_file=mips/x-sony
5262                 ;;
5263         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
5264                                         # That is based on svr4.
5265                 # t-svr4 is not right because this system doesn't use ELF.
5266                 tm_file="mips/news5.h ${tm_file}"
5267                 if test x$stabs = xyes; then
5268                         tm_file="${tm_file} dbx.h"
5269                 fi
5270                 xm_defines=USG
5271                 if test x$gas = xyes
5272                 then
5273                         tmake_file=mips/t-mips-gas
5274                 else
5275                         extra_passes="mips-tfile mips-tdump"
5276                 fi
5277                 if test x$gnu_ld != xyes
5278                 then
5279                         use_collect2=yes
5280                 fi
5281                 ;;
5282         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
5283                 tm_file="mips/svr4-5.h mips/svr4-t.h"
5284                 if test x$stabs = xyes; then
5285                         tm_file="${tm_file} dbx.h"
5286                 fi
5287                 xm_defines=USG
5288                 xmake_file=mips/x-sysv
5289                 if test x$gas = xyes
5290                 then
5291                         tmake_file=mips/t-mips-gas
5292                         extra_parts="crtbegin.o crtend.o"
5293                 else
5294                         tmake_file=mips/t-mips
5295                         extra_passes="mips-tfile mips-tdump"
5296                 fi
5297                 if test x$gnu_ld != xyes
5298                 then
5299                         use_collect2=yes
5300                 fi
5301                 ;;
5302         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
5303                 tm_file="mips/ultrix.h ${tm_file}"
5304                 if test x$stabs = xyes; then
5305                         tm_file="${tm_file} dbx.h"
5306                 fi
5307                 xmake_file=mips/x-ultrix
5308                 if test x$gas = xyes
5309                 then
5310                         tmake_file=mips/t-mips-gas
5311                 else
5312                         tmake_file=mips/t-ultrix
5313                         extra_passes="mips-tfile mips-tdump"
5314                 fi
5315                 if test x$gnu_ld != xyes
5316                 then
5317                         use_collect2=yes
5318                 fi
5319                 ;;
5320         mips-*-riscos[56789]bsd*)
5321                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
5322                 if test x$stabs = xyes; then
5323                         tm_file="${tm_file} dbx.h"
5324                 fi
5325                 if test x$gas = xyes
5326                 then
5327                         tmake_file=mips/t-bsd-gas
5328                 else
5329                         tmake_file=mips/t-bsd
5330                         extra_passes="mips-tfile mips-tdump"
5331                 fi
5332                 if test x$gnu_ld != xyes
5333                 then
5334                         use_collect2=yes
5335                 fi
5336                 ;;
5337         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
5338                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
5339                 if test x$stabs = xyes; then
5340                         tm_file="${tm_file} dbx.h"
5341                 fi
5342                 if test x$gas = xyes
5343                 then
5344                         tmake_file=mips/t-bsd-gas
5345                 else
5346                         tmake_file=mips/t-bsd
5347                         extra_passes="mips-tfile mips-tdump"
5348                 fi
5349                 if test x$gnu_ld != xyes
5350                 then
5351                         use_collect2=yes
5352                 fi
5353                 ;;
5354         mips-*-riscos[56789]sysv4*)
5355                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
5356                 if test x$stabs = xyes; then
5357                         tm_file="${tm_file} dbx.h"
5358                 fi
5359                 xmake_file=mips/x-sysv
5360                 if test x$gas = xyes
5361                 then
5362                         tmake_file=mips/t-svr4-gas
5363                 else
5364                         tmake_file=mips/t-svr4
5365                         extra_passes="mips-tfile mips-tdump"
5366                 fi
5367                 if test x$gnu_ld != xyes
5368                 then
5369                         use_collect2=yes
5370                 fi
5371                 ;;
5372         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
5373                 tm_file="mips/svr4-4.h ${tm_file}"
5374                 if test x$stabs = xyes; then
5375                         tm_file="${tm_file} dbx.h"
5376                 fi
5377                 xm_defines=USG
5378                 xmake_file=mips/x-sysv
5379                 if test x$gas = xyes
5380                 then
5381                         tmake_file=mips/t-svr4-gas
5382                 else
5383                         tmake_file=mips/t-svr4
5384                         extra_passes="mips-tfile mips-tdump"
5385                 fi
5386                 if test x$gnu_ld != xyes
5387                 then
5388                         use_collect2=yes
5389                 fi
5390                 ;;
5391         mips-*-riscos[56789]sysv*)
5392                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
5393                 if test x$stabs = xyes; then
5394                         tm_file="${tm_file} dbx.h"
5395                 fi
5396                 xm_defines=USG
5397                 xmake_file=mips/x-sysv
5398                 if test x$gas = xyes
5399                 then
5400                         tmake_file=mips/t-svr3-gas
5401                 else
5402                         tmake_file=mips/t-svr3
5403                         extra_passes="mips-tfile mips-tdump"
5404                 fi
5405                 if test x$gnu_ld != xyes
5406                 then
5407                         use_collect2=yes
5408                 fi
5409                 ;;
5410         mips-*-sysv* | mips-*-riscos*sysv*)
5411                 tm_file="mips/svr3-4.h ${tm_file}"
5412                 if test x$stabs = xyes; then
5413                         tm_file="${tm_file} dbx.h"
5414                 fi
5415                 xm_defines=USG
5416                 xmake_file=mips/x-sysv
5417                 if test x$gas = xyes
5418                 then
5419                         tmake_file=mips/t-svr3-gas
5420                 else
5421                         tmake_file=mips/t-svr3
5422                         extra_passes="mips-tfile mips-tdump"
5423                 fi
5424                 if test x$gnu_ld != xyes
5425                 then
5426                         use_collect2=yes
5427                 fi
5428                 ;;
5429         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
5430                 tm_file=mips/mips-5.h
5431                 if test x$stabs = xyes; then
5432                         tm_file="${tm_file} dbx.h"
5433                 fi
5434                 if test x$gas = xyes
5435                 then
5436                         tmake_file=mips/t-mips-gas
5437                 else
5438                         extra_passes="mips-tfile mips-tdump"
5439                 fi
5440                 if test x$gnu_ld != xyes
5441                 then
5442                         use_collect2=yes
5443                 fi
5444                 ;;
5445         mips-*-gnu*)
5446                 ;;
5447         mipsel-*-ecoff*)
5448                 tm_file=mips/ecoffl.h
5449                 if test x$stabs = xyes; then
5450                         tm_file="${tm_file} dbx.h"
5451                 fi
5452                 tmake_file=mips/t-ecoff
5453                 ;;
5454         mips-*-ecoff*)
5455                 tm_file="gofast.h mips/ecoff.h"
5456                 if test x$stabs = xyes; then
5457                         tm_file="${tm_file} dbx.h"
5458                 fi
5459                 tmake_file=mips/t-ecoff
5460                 ;;
5461         mipsel-*-elf*)
5462                 tm_file="mips/elfl.h"
5463                 tmake_file=mips/t-elf
5464                 ;;
5465         mips-*-elf*)
5466                 tm_file="mips/elf.h"
5467                 tmake_file=mips/t-elf
5468                 ;;
5469         mips64el-*-elf*)
5470                 tm_file="mips/elfl64.h"
5471                 tmake_file=mips/t-elf
5472                 ;;
5473         mips64orionel-*-elf*)
5474                 tm_file="mips/elforion.h mips/elfl64.h"
5475                 tmake_file=mips/t-elf
5476                 ;;
5477         mips64-*-elf*)
5478                 tm_file="mips/elf64.h"
5479                 tmake_file=mips/t-elf
5480                 ;;
5481         mips64orion-*-elf*)
5482                 tm_file="mips/elforion.h mips/elf64.h"
5483                 tmake_file=mips/t-elf
5484                 ;;
5485         mips64orion-*-rtems*)
5486                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
5487                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
5488                 tmake_file="mips/t-elf t-rtems"
5489                 ;;
5490         mipstx39el-*-elf*)
5491                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
5492                 tmake_file=mips/t-r3900
5493                 ;;
5494         mipstx39-*-elf*)
5495                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
5496                 tmake_file=mips/t-r3900
5497                 ;;
5498         mips-*-*)                               # Default MIPS RISC-OS 4.0.
5499                 if test x$stabs = xyes; then
5500                         tm_file="${tm_file} dbx.h"
5501                 fi
5502                 if test x$gas = xyes
5503                 then
5504                         tmake_file=mips/t-mips-gas
5505                 else
5506                         extra_passes="mips-tfile mips-tdump"
5507                 fi
5508                 if test x$gnu_ld != xyes
5509                 then
5510                         use_collect2=yes
5511                 fi
5512                 ;;
5513         mn10200-*-*)
5514                 float_format=i32
5515                 cpu_type=mn10200
5516                 tm_file="mn10200/mn10200.h"
5517                 if test x$stabs = xyes
5518                 then
5519                         tm_file="${tm_file} dbx.h"
5520                 fi
5521                 use_collect2=no
5522                 ;;
5523         mn10300-*-*)
5524                 cpu_type=mn10300
5525                 tm_file="mn10300/mn10300.h"
5526                 if test x$stabs = xyes
5527                 then
5528                         tm_file="${tm_file} dbx.h"
5529                 fi
5530                 use_collect2=no
5531                 ;;
5532         ns32k-encore-bsd*)
5533                 tm_file=ns32k/encore.h
5534                 use_collect2=yes
5535                 ;;
5536         ns32k-sequent-bsd*)
5537                 tm_file=ns32k/sequent.h
5538                 use_collect2=yes
5539                 ;;
5540         ns32k-tek6100-bsd*)
5541                 tm_file=ns32k/tek6100.h
5542                 use_collect2=yes
5543                 ;;
5544         ns32k-tek6200-bsd*)
5545                 tm_file=ns32k/tek6200.h
5546                 use_collect2=yes
5547                 ;;
5548 # This has not been updated to GCC 2.
5549 #       ns32k-ns-genix*)
5550 #               xm_defines=USG
5551 #               xmake_file=ns32k/x-genix
5552 #               tm_file=ns32k/genix.h
5553 #               use_collect2=yes
5554 #               ;;
5555         ns32k-merlin-*)
5556                 tm_file=ns32k/merlin.h
5557                 use_collect2=yes
5558                 ;;
5559         ns32k-pc532-mach*)
5560                 tm_file=ns32k/pc532-mach.h
5561                 use_collect2=yes
5562                 ;;
5563         ns32k-pc532-minix*)
5564                 tm_file=ns32k/pc532-min.h
5565                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
5566                 xm_defines=USG
5567                 use_collect2=yes
5568                 ;;
5569         ns32k-*-netbsd*)
5570                 tm_file=ns32k/netbsd.h
5571                 xm_file="ns32k/xm-netbsd.h ${xm_file}"
5572                 # On NetBSD, the headers are already okay, except for math.h.
5573                 tmake_file=t-netbsd
5574        use_collect2=yes
5575                 ;;
5576         pdp11-*-bsd)
5577                 tm_file="${tm_file} pdp11/2bsd.h"
5578                 ;;
5579         pdp11-*-*)
5580                 ;;
5581         ns32k-*-openbsd*)
5582                 # Nothing special
5583                 ;;
5584 # This has not been updated to GCC 2.
5585 #       pyramid-*-*)
5586 #               cpu_type=pyr
5587 #               xmake_file=pyr/x-pyr
5588 #               use_collect2=yes
5589 #               ;;
5590         romp-*-aos*)
5591                 use_collect2=yes
5592                 ;;
5593         romp-*-mach*)
5594                 xmake_file=romp/x-mach
5595                 use_collect2=yes
5596                 ;;
5597         romp-*-openbsd*)
5598                 # Nothing special
5599                 ;;
5600         powerpc-*-openbsd*)
5601                 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
5602                 ;;
5603         powerpc-*-beos*)
5604                 cpu_type=rs6000
5605                 tm_file=rs6000/beos.h
5606                 xm_file=rs6000/xm-beos.h
5607                 tmake_file=rs6000/t-beos
5608                 xmake_file=rs6000/x-beos
5609                 ;;
5610         powerpc-*-sysv* | powerpc-*-elf*)
5611                 tm_file=rs6000/sysv4.h
5612                 xm_file="rs6000/xm-sysv4.h"
5613                 xm_defines="USG POSIX"
5614                 extra_headers=ppc-asm.h
5615                 if test x$gas = xyes
5616                 then
5617                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5618                 else
5619                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5620                 fi
5621                 xmake_file=rs6000/x-sysv4
5622                 ;;
5623         powerpc-*-eabiaix*)
5624                 tm_file=rs6000/eabiaix.h
5625                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5626                 extra_headers=ppc-asm.h
5627                 ;;
5628         powerpc-*-eabisim*)
5629                 tm_file=rs6000/eabisim.h
5630                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5631                 extra_headers=ppc-asm.h
5632                 ;;
5633         powerpc-*-eabi*)
5634                 tm_file=rs6000/eabi.h
5635                 if test x$gas = xyes
5636                 then
5637                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5638                 else
5639                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5640                 fi
5641                 extra_headers=ppc-asm.h
5642                 ;;
5643         powerpc-*-rtems*)
5644                 tm_file=rs6000/rtems.h
5645                 if test x$gas = xyes
5646                 then
5647                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
5648                 else
5649                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
5650                 fi
5651                 extra_headers=ppc-asm.h
5652                 ;;
5653         powerpc-*-linux-gnulibc1)
5654                 tm_file=rs6000/linux.h
5655                 xm_file=rs6000/xm-sysv4.h
5656                 out_file=rs6000/rs6000.c
5657                 if test x$gas = xyes
5658                 then
5659                         tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
5660                 else
5661                         tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
5662                 fi
5663                 xmake_file=x-linux
5664                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5665                 extra_headers=ppc-asm.h
5666                 if test x$enable_threads = xyes; then
5667                         thread_file='posix'
5668                 fi
5669                 ;;
5670         powerpc-*-linux-gnu*)
5671                 tm_file=rs6000/linux.h
5672                 xm_file="rs6000/xm-sysv4.h"
5673                 xm_defines="USG ${xm_defines}"
5674                 out_file=rs6000/rs6000.c
5675                 if test x$gas = xyes
5676                 then
5677                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
5678                 else
5679                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
5680                 fi
5681                 xmake_file=x-linux
5682                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5683                 extra_headers=ppc-asm.h
5684                 if test x$enable_threads = xyes; then
5685                         thread_file='posix'
5686                 fi
5687                 ;;
5688         powerpc-wrs-vxworks*)
5689                 cpu_type=rs6000
5690                 xm_file="rs6000/xm-sysv4.h"
5691                 xm_defines="USG POSIX"
5692                 tm_file=rs6000/vxppc.h
5693                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5694                 extra_headers=ppc-asm.h
5695                 thread_file='vxworks'
5696                 ;;
5697         powerpcle-*-sysv* | powerpcle-*-elf*)
5698                 tm_file=rs6000/sysv4le.h
5699                 xm_file="rs6000/xm-sysv4.h"
5700                 xm_defines="USG POSIX"
5701                 if test x$gas = xyes
5702                 then
5703                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5704                 else
5705                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5706                 fi
5707                 xmake_file=rs6000/x-sysv4
5708                 extra_headers=ppc-asm.h
5709                 ;;
5710         powerpcle-*-eabisim*)
5711                 tm_file=rs6000/eabilesim.h
5712                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5713                 extra_headers=ppc-asm.h
5714                 ;;
5715         powerpcle-*-eabi*)
5716                 tm_file=rs6000/eabile.h
5717                 if test x$gas = xyes
5718                 then
5719                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5720                 else
5721                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5722                 fi
5723                 extra_headers=ppc-asm.h
5724                 ;;
5725         powerpcle-*-winnt* )
5726                 tm_file=rs6000/win-nt.h
5727                 tmake_file=rs6000/t-winnt
5728 #               extra_objs=pe.o
5729                 if test x$enable_threads = xyes; then
5730                         thread_file='win32'
5731                 fi
5732                 extra_headers=ppc-asm.h
5733                 ;;
5734         powerpcle-*-pe | powerpcle-*-cygwin*)
5735                 tm_file=rs6000/cygwin.h
5736                 xm_file="rs6000/xm-cygwin.h ${xm_file}"
5737                 tmake_file=rs6000/t-winnt
5738                 xmake_file=rs6000/x-cygwin
5739 #               extra_objs=pe.o
5740                 if test x$enable_threads = xyes; then
5741                         thread_file='win32'
5742                 fi
5743                 exeext=.exe
5744                 extra_headers=ppc-asm.h
5745                 ;;
5746         powerpcle-*-solaris2*)
5747                 tm_file=rs6000/sol2.h
5748                 xm_file="rs6000/xm-sysv4.h"
5749                 xm_defines="USG POSIX"
5750                 if test x$gas = xyes
5751                 then
5752                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5753                 else
5754                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5755                 fi
5756                 xmake_file=rs6000/x-sysv4
5757                 extra_headers=ppc-asm.h
5758                 ;;
5759         rs6000-ibm-aix3.[01]*)
5760                 tm_file=rs6000/aix31.h
5761                 xmake_file=rs6000/x-aix31
5762                 float_format=none
5763                 use_collect2=yes
5764                 ;;
5765         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
5766                 tm_file=rs6000/aix3newas.h
5767                 if test x$host != x$target
5768                 then
5769                         tmake_file=rs6000/t-xnewas
5770                 else
5771                         tmake_file=rs6000/t-newas
5772                 fi
5773                 float_format=none
5774                 use_collect2=yes
5775                 ;;
5776         rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
5777                 tm_file=rs6000/aix41.h
5778                 if test x$host != x$target
5779                 then
5780                         tmake_file=rs6000/t-xnewas
5781                 else
5782                         tmake_file=rs6000/t-newas
5783                 fi
5784                 if test "$gnu_ld" = yes
5785                 then
5786                         xmake_file=rs6000/x-aix41-gld
5787                 else
5788                         xmake_file=rs6000/x-aix41
5789                 fi
5790                 float_format=none
5791                 use_collect2=yes
5792                 ;;
5793         rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
5794                 tm_file=rs6000/aix43.h
5795                 if test x$host != x$target
5796                 then
5797                         tmake_file=rs6000/t-xaix43
5798                 else
5799                         tmake_file=rs6000/t-aix43
5800                 fi
5801                 xmake_file=rs6000/x-aix43
5802                 float_format=none
5803                 use_collect2=yes
5804                 ;;
5805         rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
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*)
5818                 float_format=none
5819                 use_collect2=yes
5820                 ;;
5821         rs6000-bull-bosx)
5822                 float_format=none
5823                 use_collect2=yes
5824                 ;;
5825         rs6000-*-mach*)
5826                 tm_file=rs6000/mach.h
5827                 xm_file="${xm_file} rs6000/xm-mach.h"
5828                 xmake_file=rs6000/x-mach
5829                 use_collect2=yes
5830                 ;;
5831         rs6000-*-lynxos*)
5832                 tm_file=rs6000/lynx.h
5833                 xm_file=rs6000/xm-lynx.h
5834                 tmake_file=rs6000/t-rs6000
5835                 xmake_file=rs6000/x-lynx
5836                 use_collect2=yes
5837                 ;;
5838         sh-*-elf*)
5839                 tm_file=sh/elf.h
5840                 float_format=sh
5841                 ;;
5842         sh-*-rtemself*)
5843                 tmake_file="sh/t-sh t-rtems"
5844                 tm_file=sh/rtemself.h
5845                 float_format=sh
5846                 ;;
5847         sh-*-rtems*)
5848                 tmake_file="sh/t-sh t-rtems"
5849                 tm_file=sh/rtems.h
5850                 float_format=sh
5851                 ;;
5852         sh-*-*)
5853                 float_format=sh
5854                 ;;
5855         sparc-tti-*)
5856                 tm_file=sparc/pbd.h
5857                 xm_file="xm-alloca.h ${xm_file}"
5858                 xm_defines=USG
5859                 ;;
5860         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
5861                 tm_file=sparc/vxsparc.h
5862                 tmake_file=sparc/t-vxsparc
5863                 use_collect2=yes
5864                 thread_file='vxworks'
5865                 ;;
5866         sparc-*-aout*)
5867                 tmake_file=sparc/t-sparcbare
5868                 tm_file="sparc/aout.h libgloss.h"
5869                 ;;
5870         sparc-*-netbsd*)
5871                 tm_file=sparc/netbsd.h
5872                 tmake_file=t-netbsd
5873        use_collect2=yes
5874                 ;;
5875         sparc-*-openbsd*)
5876                 # we need collect2 until our bug is fixed...
5877                 use_collect2=yes
5878                 ;;
5879         sparc-*-bsd*)
5880                 tm_file=sparc/bsd.h
5881                 ;;
5882         sparc-*-elf*)
5883                 tm_file=sparc/elf.h
5884                 tmake_file=sparc/t-elf
5885                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5886                 #float_format=i128
5887                 float_format=i64
5888                 ;;
5889         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
5890                 xm_file="${xm_file} sparc/xm-linux.h"
5891                 tm_file=sparc/linux-aout.h
5892                 xmake_file=x-linux
5893                 gnu_ld=yes
5894                 ;;
5895         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
5896                 xm_file="${xm_file} sparc/xm-linux.h"
5897                 xmake_file=x-linux
5898                 tm_file=sparc/linux.h
5899                 tmake_file="t-linux t-linux-gnulibc1"
5900                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5901                 gnu_ld=yes
5902                 float_format=sparc
5903                 ;;
5904         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
5905                 xm_file="${xm_file} sparc/xm-linux.h"
5906                 xmake_file=x-linux
5907                 tm_file=sparc/linux.h
5908                 tmake_file="t-linux"
5909                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5910                 gnu_ld=yes
5911                 if test x$enable_threads = xyes; then
5912                         thread_file='posix'
5913                 fi
5914                 float_format=sparc
5915                 ;;
5916         sparc-*-lynxos*)
5917                 if test x$gas = xyes
5918                 then
5919                         tm_file=sparc/lynx.h
5920                 else
5921                         tm_file=sparc/lynx-ng.h
5922                 fi
5923                 xm_file=sparc/xm-lynx.h
5924                 tmake_file=sparc/t-sunos41
5925                 xmake_file=x-lynx
5926                 ;;
5927         sparc-*-rtems*|sparc-*-rtemself*)
5928                 tm_file="sparc/rtemself.h"
5929                 tmake_file="sparc/t-elf t-rtems"
5930                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5931                 #float_format=i128
5932                 float_format=i64
5933                 ;;
5934         sparc-*-rtemsaout*)
5935                 tmake_file="sparc/t-sparcbare t-rtems"
5936                 tm_file=sparc/rtems.h
5937                 ;;
5938         sparcv9-*-solaris2*)
5939                 if test x$gnu_ld = xyes
5940                 then
5941                         tm_file=sparc/sol2-64.h
5942                 else
5943                         tm_file=sparc/sol2-sld-64.h
5944                 fi
5945                 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
5946                 xm_defines="USG POSIX"
5947                 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
5948                 xmake_file=sparc/x-sysv4
5949                 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
5950                 float_format=none
5951                 if test x${enable_threads} = x ; then
5952                     enable_threads=$have_pthread_h
5953                     if test x${enable_threads} = x ; then
5954                         enable_threads=$have_thread_h
5955                     fi
5956                 fi
5957                 if test x${enable_threads} = xyes ; then
5958                     if test x${have_pthread_h} = xyes ; then
5959                         thread_file='posix'
5960                     else
5961                         thread_file='solaris'
5962                     fi
5963                 fi
5964                 ;;
5965         sparc-hal-solaris2*)
5966                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
5967                 xm_defines="USG POSIX"
5968                 tm_file="sparc/sol2.h sparc/hal.h"
5969                 tmake_file="sparc/t-halos sparc/t-sol2"
5970                 xmake_file=sparc/x-sysv4
5971                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
5972                 case $machine in
5973                 *-*-solaris2.0-4)
5974                         float_format=i128
5975                 ;;
5976                 *)
5977                         float_format=none
5978                         ;;
5979                 esac
5980                 thread_file='solaris'
5981                 ;;
5982         sparc-*-solaris2*)
5983                 if test x$gnu_ld = xyes
5984                 then
5985                         tm_file=sparc/sol2.h
5986                 else
5987                         tm_file=sparc/sol2-sld.h
5988                 fi
5989                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
5990                 xm_defines="USG POSIX"
5991                 tmake_file=sparc/t-sol2
5992                 xmake_file=sparc/x-sysv4
5993                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
5994                 case $machine in
5995                 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
5996                 *-*-solaris2*)
5997                         if test x$gnu_ld = xyes
5998                         then
5999                                 tm_file=sparc/sol2-64.h
6000                         else
6001                                 tm_file=sparc/sol2-sld-64.h
6002                         fi
6003                         tmake_file="$tmake_file sparc/t-sol2-64"
6004                         ;;
6005                 esac
6006                 case $machine in
6007                 *-*-solaris2.[0-4])
6008                         float_format=i128
6009                         ;;
6010                 *)
6011                         float_format=none
6012                         ;;
6013                 esac
6014                 if test x${enable_threads} = x; then
6015                     enable_threads=$have_pthread_h
6016                     if test x${enable_threads} = x; then
6017                         enable_threads=$have_thread_h
6018                     fi
6019                 fi
6020                 if test x${enable_threads} = xyes; then
6021                     if test x${have_pthread_h} = xyes; then
6022                         thread_file='posix'
6023                     else
6024                         thread_file='solaris'
6025                     fi
6026                 fi
6027                 ;;
6028         sparc-*-sunos4.0*)
6029                 tm_file=sparc/sunos4.h
6030                 tmake_file=sparc/t-sunos40
6031                 use_collect2=yes
6032                 ;;
6033         sparc-*-sunos4*)
6034                 tm_file=sparc/sunos4.h
6035                 tmake_file=sparc/t-sunos41
6036                 use_collect2=yes
6037                 if test x$gas = xyes; then
6038                         tm_file="${tm_file} sparc/sun4gas.h"
6039                 fi
6040                 ;;
6041         sparc-*-sunos3*)
6042                 tm_file=sparc/sun4o3.h
6043                 use_collect2=yes
6044                 ;;
6045         sparc-*-sysv4*)
6046                 tm_file=sparc/sysv4.h
6047                 xm_file="sparc/xm-sysv4.h"
6048                 xm_defines="USG POSIX"
6049                 tmake_file=t-svr4
6050                 xmake_file=sparc/x-sysv4
6051                 extra_parts="crtbegin.o crtend.o"
6052                 ;;
6053         sparc-*-vxsim*)
6054                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
6055                 xm_defines="USG POSIX"
6056                 tm_file=sparc/vxsim.h
6057                 tmake_file=sparc/t-vxsparc
6058                 xmake_file=sparc/x-sysv4
6059                 ;;
6060         sparclet-*-aout*)
6061                 tm_file="sparc/splet.h libgloss.h"
6062                 tmake_file=sparc/t-splet
6063                 ;;
6064         sparclite-*-coff*)
6065                 tm_file="sparc/litecoff.h libgloss.h"
6066                 tmake_file=sparc/t-sparclite
6067                 ;;
6068         sparclite-*-aout*)
6069                 tm_file="sparc/lite.h aoutos.h libgloss.h"
6070                 tmake_file=sparc/t-sparclite
6071                 ;;
6072         sparclite-*-elf*)
6073                 tm_file="sparc/liteelf.h"
6074                 tmake_file=sparc/t-sparclite
6075                 extra_parts="crtbegin.o crtend.o"
6076                 ;;
6077         sparc86x-*-aout*)
6078                 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
6079                 tmake_file=sparc/t-sp86x
6080                 ;;
6081         sparc86x-*-elf*)        
6082                 tm_file="sparc/sp86x-elf.h"
6083                 tmake_file=sparc/t-sp86x
6084                 extra_parts="crtbegin.o crtend.o"
6085                 ;;
6086         sparc64-*-aout*)
6087                 tmake_file=sparc/t-sp64
6088                 tm_file=sparc/sp64-aout.h
6089                 ;;
6090         sparc64-*-elf*)
6091                 tmake_file=sparc/t-sp64
6092                 tm_file=sparc/sp64-elf.h
6093                 extra_parts="crtbegin.o crtend.o"
6094                 ;;
6095         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
6096                 tmake_file="t-linux sparc/t-linux64"
6097                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
6098                 tm_file=sparc/linux64.h
6099                 xmake_file=x-linux
6100                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6101                 gnu_ld=yes
6102                 if test x$enable_threads = xyes; then
6103                         thread_file='posix'
6104                 fi
6105                 float_format=sparc
6106                 ;;
6107 # This hasn't been upgraded to GCC 2.
6108 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
6109 #               tm_file=tahoe/harris.h
6110 #               ;;
6111 #       tahoe-*-bsd*)                   # tahoe running BSD
6112 #               ;;
6113         thumb-*-coff* | thumbel-*-coff*)
6114                 tm_file=arm/tcoff.h
6115                 out_file=arm/thumb.c
6116                 xm_file=arm/xm-thumb.h
6117                 md_file=arm/thumb.md
6118                 tmake_file=arm/t-thumb
6119                 ;;
6120         thumb-*-elf* | thumbel-*-elf*)
6121                 tm_file=arm/telf.h
6122                 out_file=arm/thumb.c
6123                 xm_file=arm/xm-thumb.h
6124                 md_file=arm/thumb.md
6125                 tmake_file=arm/t-thumb-elf
6126                 ;;
6127         thumb-*-linux-gnu*)
6128                 tm_file=arm/linux-telf.h
6129                 out_file=arm/thumb.c
6130                 xm_file=arm/xm-thumb.h
6131                 md_file=arm/thumb.md
6132                 tmake_file=arm/t-thumb-linux
6133                 ;;
6134         thumb-*-uclinux*)
6135                 tm_file=arm/uclinux-telf.h
6136                 out_file=arm/thumb.c
6137                 md_file=arm/thumb.md
6138                 tmake_file=arm/t-thumb-linux
6139                 xm_file=arm/xm-thumb.h
6140                 ;;
6141         thumb-wrs-vxworks)
6142                 tm_file=arm/tcoff.h
6143                 out_file=arm/thumb.c
6144                 xm_file=arm/xm-thumb.h
6145                 md_file=arm/thumb.md
6146                 tmake_file=arm/t-thumb
6147                 thread_file='vxworks'
6148                 ;;
6149         thumb-*-pe)
6150                 tm_file=arm/tpe.h
6151                 out_file=arm/thumb.c
6152                 xm_file=arm/xm-thumb.h
6153                 md_file=arm/thumb.md
6154                 tmake_file=arm/t-pe-thumb
6155                 extra_objs=pe.o
6156                 ;;
6157 # This hasn't been upgraded to GCC 2.
6158 #       tron-*-*)
6159 #               cpu_type=gmicro
6160 #               use_collect2=yes
6161 #               ;;
6162         v850-*-rtems*)
6163                 cpu_type=v850
6164                 tm_file="v850/rtems.h"
6165                 xm_file="v850/xm-v850.h"
6166                 tmake_file="v850/t-v850 t-rtems"
6167                 if test x$stabs = xyes
6168                 then
6169                         tm_file="${tm_file} dbx.h"
6170                 fi
6171                 use_collect2=no
6172                 ;;
6173         v850-*-*)
6174                 target_cpu_default="TARGET_CPU_generic"
6175                 cpu_type=v850
6176                 tm_file="v850/v850.h"
6177                 xm_file="v850/xm-v850.h"
6178                 tmake_file=v850/t-v850
6179                 if test x$stabs = xyes
6180                 then
6181                         tm_file="${tm_file} dbx.h"
6182                 fi
6183                 use_collect2=no
6184                 ;;
6185         vax-*-bsd*)                     # vaxen running BSD
6186                 use_collect2=yes
6187                 float_format=vax
6188                 ;;
6189         vax-*-sysv*)                    # vaxen running system V
6190                 tm_file="${tm_file} vax/vaxv.h"
6191                 xm_defines=USG
6192                 float_format=vax
6193                 ;;
6194         vax-*-netbsd*)
6195                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
6196                 tmake_file=t-netbsd
6197                 float_format=vax
6198        use_collect2=yes
6199                 ;;
6200         vax-*-openbsd*)
6201                 tmake_file="${tmake_file} vax/t-openbsd"
6202                 ;;
6203         vax-*-ultrix*)                  # vaxen running ultrix
6204                 tm_file="${tm_file} vax/ultrix.h"
6205                 use_collect2=yes
6206                 float_format=vax
6207                 ;;
6208         vax-*-vms*)                     # vaxen running VMS
6209                 xm_file=vax/xm-vms.h
6210                 tm_file=vax/vms.h
6211                 float_format=vax
6212                 ;;
6213         vax-*-*)                        # vax default entry
6214                 float_format=vax
6215                 ;;
6216         we32k-att-sysv*)
6217                 xm_file="${xm_file} xm-svr3"
6218                 use_collect2=yes
6219                 ;;
6220         *)
6221                 echo "Configuration $machine not supported" 1>&2
6222                 exit 1
6223                 ;;
6224         esac
6225
6226         case $machine in
6227         *-*-linux-gnu*)
6228                 ;; # Existing GNU/Linux systems do not use the GNU setup.
6229         *-*-gnu*)
6230                 # On the GNU system, the setup is just about the same on
6231                 # each different CPU.  The specific machines that GNU
6232                 # supports are matched above and just set $cpu_type.
6233                 xm_file="xm-gnu.h ${xm_file}"
6234                 tm_file=${cpu_type}/gnu.h
6235                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
6236                 # GNU always uses ELF.
6237                 elf=yes
6238                 # GNU tools are the only tools.
6239                 gnu_ld=yes
6240                 gas=yes
6241                 xmake_file=x-linux      # These details are the same as Linux.
6242                 tmake_file=t-gnu        # These are not.
6243                 ;;
6244         *-*-sysv4*)
6245                 xmake_try_sysv=x-sysv
6246                 install_headers_dir=install-headers-cpio
6247                 ;;
6248         *-*-sysv*)
6249                 install_headers_dir=install-headers-cpio
6250                 ;;
6251         esac
6252
6253         # Distinguish i[34567]86
6254         # Also, do not run mips-tfile on MIPS if using gas.
6255         # Process --with-cpu= for PowerPC/rs6000
6256         target_cpu_default2=
6257         case $machine in
6258         i486-*-*)
6259                 target_cpu_default2=1
6260                 ;;
6261         i586-*-*)
6262                 case $target_alias in
6263                         k6-*)
6264                                 target_cpu_default2=4
6265                                 ;;
6266                         *)
6267                                 target_cpu_default2=2
6268                                 ;;
6269                 esac
6270                 ;;
6271         i686-*-* | i786-*-*)
6272                 target_cpu_default2=3
6273                 ;;
6274         alpha*-*-*)
6275                 case $machine in
6276                         alphaev6[78]*)
6277                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
6278                                 ;;
6279                         alphaev6*)
6280                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
6281                                 ;;
6282                         alphapca56*)
6283                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
6284                                 ;;
6285                         alphaev56*)
6286                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
6287                                 ;;
6288                         alphaev5*)
6289                                 target_cpu_default2="MASK_CPU_EV5"
6290                                 ;;
6291                 esac
6292                                 
6293                 if test x$gas = xyes
6294                 then
6295                         if test "$target_cpu_default2" = ""
6296                         then
6297                                 target_cpu_default2="MASK_GAS"
6298                         else
6299                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
6300                         fi
6301                 fi
6302                 ;;
6303         arm*-*-*)
6304                 case "x$with_cpu" in
6305                         x)
6306                                 # The most generic
6307                                 target_cpu_default2="TARGET_CPU_generic"
6308                                 ;;
6309
6310                         # Distinguish cores, and major variants
6311                         # arm7m doesn't exist, but D & I don't affect code
6312                         xarm[23678] | xarm250 | xarm[67][01]0 \
6313                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
6314                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
6315                         | xstrongarm | xstrongarm110 | xstrongarm1100)
6316                                 target_cpu_default2="TARGET_CPU_$with_cpu"
6317                                 ;;
6318
6319                         xyes | xno)
6320                                 echo "--with-cpu must be passed a value" 1>&2
6321                                 exit 1
6322                                 ;;
6323
6324                         *)
6325                                 if test x$pass2done = xyes
6326                                 then
6327                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6328                                         exit 1
6329                                 fi
6330                                 ;;
6331                 esac
6332                 ;;
6333
6334         mips*-*-ecoff* | mips*-*-elf*)
6335                 if test x$gas = xyes
6336                 then
6337                         if test x$gnu_ld = xyes
6338                         then
6339                                 target_cpu_default2=20
6340                         else
6341                                 target_cpu_default2=16
6342                         fi
6343                 fi
6344                 ;;
6345         mips*-*-*)
6346                 if test x$gas = xyes
6347                 then
6348                         target_cpu_default2=16
6349                 fi
6350                 ;;
6351         powerpc*-*-* | rs6000-*-*)
6352                 case "x$with_cpu" in
6353                         x)
6354                                 ;;
6355
6356                         xcommon | xpower | xpower2 | xpowerpc | xrios \
6357                           | xrios1 | xrios2 | xrsc | xrsc1 \
6358                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
6359                           | xec603e | x740 | x750 | x401 \
6360                           | x403 | x505 | x801 | x821 | x823 | x860)
6361                                 target_cpu_default2="\"$with_cpu\""
6362                                 ;;
6363
6364                         xyes | xno)
6365                                 echo "--with-cpu must be passed a value" 1>&2
6366                                 exit 1
6367                                 ;;
6368
6369                         *)
6370                                 if test x$pass2done = xyes
6371                                 then
6372                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6373                                         exit 1
6374                                 fi
6375                                 ;;
6376                 esac
6377                 ;;
6378         sparc*-*-*)
6379                 case ".$with_cpu" in
6380                         .)
6381                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
6382                                 ;;
6383                         .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
6384                                 target_cpu_default2="TARGET_CPU_$with_cpu"
6385                                 ;;
6386                         *)
6387                                 if test x$pass2done = xyes
6388                                 then
6389                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
6390                                         exit 1
6391                                 fi
6392                                 ;;
6393                 esac
6394                 ;;
6395         esac
6396
6397         if test "$target_cpu_default2" != ""
6398         then
6399                 if test "$target_cpu_default" != ""
6400                 then
6401                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
6402                 else
6403                         target_cpu_default=$target_cpu_default2
6404                 fi
6405         fi
6406
6407         # No need for collect2 if we have the GNU linker.
6408         # Actually, there is now; GNU ld doesn't handle the EH info or
6409         # collecting for shared libraries.
6410         #case x$gnu_ld in
6411         #xyes)
6412         #       use_collect2=
6413         #       ;;
6414         #esac
6415
6416 # Save data on machine being used to compile GCC in build_xm_file.
6417 # Save data on host machine in vars host_xm_file and host_xmake_file.
6418         if test x$pass1done = x
6419         then
6420                 if test x"$xm_file" = x
6421                 then build_xm_file=$cpu_type/xm-$cpu_type.h
6422                 else build_xm_file=$xm_file
6423                 fi
6424                 build_xm_defines=$xm_defines
6425                 build_install_headers_dir=$install_headers_dir
6426                 build_exeext=$exeext
6427                 pass1done=yes
6428         else
6429                 if test x$pass2done = x
6430                 then
6431                         if test x"$xm_file" = x
6432                         then host_xm_file=$cpu_type/xm-$cpu_type.h
6433                         else host_xm_file=$xm_file
6434                         fi
6435                         host_xm_defines=$xm_defines
6436                         if test x"$xmake_file" = x
6437                         then xmake_file=$cpu_type/x-$cpu_type
6438                         fi
6439                         host_xmake_file="$xmake_file"
6440                         host_truncate_target=$truncate_target
6441                         host_extra_gcc_objs=$extra_gcc_objs
6442                         host_extra_objs=$extra_host_objs
6443                         host_exeext=$exeext
6444                         pass2done=yes
6445                 fi
6446         fi
6447 done
6448
6449 extra_objs="${host_extra_objs} ${extra_objs}"
6450
6451 # Default the target-machine variables that were not explicitly set.
6452 if test x"$tm_file" = x
6453 then tm_file=$cpu_type/$cpu_type.h; fi
6454
6455 if test x$extra_headers = x
6456 then extra_headers=; fi
6457
6458 if test x"$xm_file" = x
6459 then xm_file=$cpu_type/xm-$cpu_type.h; fi
6460
6461 if test x$md_file = x
6462 then md_file=$cpu_type/$cpu_type.md; fi
6463
6464 if test x$out_file = x
6465 then out_file=$cpu_type/$cpu_type.c; fi
6466
6467 if test x"$tmake_file" = x
6468 then tmake_file=$cpu_type/t-$cpu_type
6469 fi
6470
6471 if test x"$dwarf2" = xyes
6472 then tm_file="tm-dwarf2.h $tm_file"
6473 fi
6474
6475 if test x$float_format = x
6476 then float_format=i64
6477 fi
6478
6479 if test $float_format = none
6480 then float_h_file=Makefile.in
6481 else float_h_file=float-$float_format.h
6482 fi
6483
6484 # Handle cpp installation.
6485 if test x$enable_cpp != xno
6486 then
6487   tmake_file="$tmake_file t-install-cpp"
6488 fi
6489
6490 # Say what files are being used for the output code and MD file.
6491 echo "Using \`$srcdir/config/$out_file' to output insns."
6492 echo "Using \`$srcdir/config/$md_file' as machine description file."
6493
6494 count=a
6495 for f in $tm_file; do
6496         count=${count}x
6497 done
6498 if test $count = ax; then
6499         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
6500 else
6501         echo "Using the following target machine macro files:"
6502         for f in $tm_file; do
6503                 echo "  $srcdir/config/$f"
6504         done
6505 fi
6506
6507 count=a
6508 for f in $host_xm_file; do
6509         count=${count}x
6510 done
6511 if test $count = ax; then
6512         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
6513 else
6514         echo "Using the following host machine macro files:"
6515         for f in $host_xm_file; do
6516                 echo "  $srcdir/config/$f"
6517         done
6518 fi
6519
6520 if test "$host_xm_file" != "$build_xm_file"; then
6521         count=a
6522         for f in $build_xm_file; do
6523                 count=${count}x
6524         done
6525         if test $count = ax; then
6526                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
6527         else
6528                 echo "Using the following build machine macro files:"
6529                 for f in $build_xm_file; do
6530                         echo "  $srcdir/config/$f"
6531                 done
6532         fi
6533 fi
6534
6535 if test x$thread_file = x; then
6536         if test x$target_thread_file != x; then
6537                 thread_file=$target_thread_file
6538         else
6539                 thread_file='single'
6540         fi
6541 fi
6542
6543 # Set up the header files.
6544 # $links is the list of header files to create.
6545 # $vars is the list of shell variables with file names to include.
6546 # auto-host.h is the file containing items generated by autoconf and is
6547 # the first file included by config.h.
6548 null_defines=
6549 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
6550
6551 # If host=build, it is correct to have hconfig include auto-host.h
6552 # as well.  If host!=build, we are in error and need to do more 
6553 # work to find out the build config parameters.
6554 if test x$host = x$build
6555 then
6556         build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
6557 else
6558         # We create a subdir, then run autoconf in the subdir.
6559         # To prevent recursion we set host and build for the new
6560         # invocation of configure to the build for this invocation
6561         # of configure. 
6562         tempdir=build.$$
6563         rm -rf $tempdir
6564         mkdir $tempdir
6565         cd $tempdir
6566         case ${srcdir} in
6567         /*) realsrcdir=${srcdir};;
6568         *) realsrcdir=../${srcdir};;
6569         esac
6570         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
6571                 --target=$target --host=$build --build=$build
6572
6573         # We just finished tests for the build machine, so rename
6574         # the file auto-build.h in the gcc directory.
6575         mv auto-host.h ../auto-build.h
6576         cd ..
6577         rm -rf $tempdir
6578         build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
6579 fi
6580
6581 xm_file="gansidecl.h ${xm_file}"
6582 tm_file="gansidecl.h ${tm_file}"
6583
6584 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
6585 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
6586 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
6587
6588 rm -f config.bak
6589 if test -f config.status; then mv -f config.status config.bak; fi
6590
6591 # Make the links.
6592 while test -n "$vars"
6593 do
6594         set $vars; var=$1; shift; vars=$*
6595         set $links; link=$1; shift; links=$*
6596         set $defines; define=$1; shift; defines=$*
6597
6598         rm -f $link
6599         # Make sure the file is created, even if it is empty.
6600         echo >$link
6601
6602         # Define TARGET_CPU_DEFAULT if the system wants one.
6603         # This substitutes for lots of *.h files.
6604         if test "$target_cpu_default" != "" -a $link = tm.h
6605         then
6606                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
6607         fi
6608
6609         for file in `eval echo '$'$var`; do
6610                 case $file in
6611                 auto-config.h)
6612                         ;;
6613                 *)
6614                         echo '#ifdef IN_GCC' >>$link
6615                         ;;
6616                 esac
6617                 echo "#include \"$file\"" >>$link
6618                 case $file in
6619                 auto-config.h)
6620                         ;;
6621                 *)
6622                         echo '#endif' >>$link
6623                         ;;
6624                 esac
6625         done
6626
6627         for def in `eval echo '$'$define`; do
6628                 echo "#ifndef $def" >>$link
6629                 echo "#define $def" >>$link
6630                 echo "#endif" >>$link
6631         done
6632 done
6633
6634 # Truncate the target if necessary
6635 if test x$host_truncate_target != x; then
6636         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
6637 fi
6638
6639 # Get the version trigger filename from the toplevel
6640 if test "${with_gcc_version_trigger+set}" = set; then
6641         gcc_version_trigger=$with_gcc_version_trigger
6642 else
6643         gcc_version_trigger=${srcdir}/version.c
6644 fi
6645 gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
6646
6647 # Internationalization
6648 PACKAGE=gcc
6649 VERSION="$gcc_version"
6650 cat >> confdefs.h <<EOF
6651 #define PACKAGE "$PACKAGE"
6652 EOF
6653
6654 cat >> confdefs.h <<EOF
6655 #define VERSION "$VERSION"
6656 EOF
6657
6658
6659
6660
6661 ALL_LINGUAS="en_UK"
6662
6663 # NLS support is still experimental, so disable it by default for now.
6664 # Check whether --enable-nls or --disable-nls was given.
6665 if test "${enable_nls+set}" = set; then
6666   enableval="$enable_nls"
6667   :
6668 else
6669   enable_nls=no
6670 fi
6671
6672
6673
6674         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
6675 echo "configure:6665: checking for strerror in -lcposix" >&5
6676 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
6677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   ac_save_LIBS="$LIBS"
6681 LIBS="-lcposix  $LIBS"
6682 cat > conftest.$ac_ext <<EOF
6683 #line 6673 "configure"
6684 #include "confdefs.h"
6685 /* Override any gcc2 internal prototype to avoid an error.  */
6686 /* We use char because int might match the return type of a gcc2
6687     builtin and then its argument prototype would still apply.  */
6688 char strerror();
6689
6690 int main() {
6691 strerror()
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_lib_$ac_lib_var=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_lib_$ac_lib_var=no"
6702 fi
6703 rm -f conftest*
6704 LIBS="$ac_save_LIBS"
6705
6706 fi
6707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6708   echo "$ac_t""yes" 1>&6
6709   LIBS="$LIBS -lcposix"
6710 else
6711   echo "$ac_t""no" 1>&6
6712 fi
6713
6714   
6715
6716 echo $ac_n "checking for working const""... $ac_c" 1>&6
6717 echo "configure:6707: checking for working const" >&5
6718 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   cat > conftest.$ac_ext <<EOF
6722 #line 6712 "configure"
6723 #include "confdefs.h"
6724
6725 int main() {
6726
6727 /* Ultrix mips cc rejects this.  */
6728 typedef int charset[2]; const charset x;
6729 /* SunOS 4.1.1 cc rejects this.  */
6730 char const *const *ccp;
6731 char **p;
6732 /* NEC SVR4.0.2 mips cc rejects this.  */
6733 struct point {int x, y;};
6734 static struct point const zero = {0,0};
6735 /* AIX XL C 1.02.0.0 rejects this.
6736    It does not let you subtract one const X* pointer from another in an arm
6737    of an if-expression whose if-part is not a constant expression */
6738 const char *g = "string";
6739 ccp = &g + (g ? g-g : 0);
6740 /* HPUX 7.0 cc rejects these. */
6741 ++ccp;
6742 p = (char**) ccp;
6743 ccp = (char const *const *) p;
6744 { /* SCO 3.2v4 cc rejects this.  */
6745   char *t;
6746   char const *s = 0 ? (char *) 0 : (char const *) 0;
6747
6748   *t++ = 0;
6749 }
6750 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6751   int x[] = {25, 17};
6752   const int *foo = &x[0];
6753   ++foo;
6754 }
6755 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6756   typedef const int *iptr;
6757   iptr p = 0;
6758   ++p;
6759 }
6760 { /* AIX XL C 1.02.0.0 rejects this saying
6761      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6762   struct s { int j; const int *ap[3]; };
6763   struct s *b; b->j = 5;
6764 }
6765 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6766   const int foo = 10;
6767 }
6768
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6772   rm -rf conftest*
6773   ac_cv_c_const=yes
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   ac_cv_c_const=no
6779 fi
6780 rm -f conftest*
6781 fi
6782
6783 echo "$ac_t""$ac_cv_c_const" 1>&6
6784 if test $ac_cv_c_const = no; then
6785   cat >> confdefs.h <<\EOF
6786 #define const 
6787 EOF
6788
6789 fi
6790
6791 echo $ac_n "checking for inline""... $ac_c" 1>&6
6792 echo "configure:6782: checking for inline" >&5
6793 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
6794   echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796   ac_cv_c_inline=no
6797 for ac_kw in inline __inline__ __inline; do
6798   cat > conftest.$ac_ext <<EOF
6799 #line 6789 "configure"
6800 #include "confdefs.h"
6801
6802 int main() {
6803 } $ac_kw foo() {
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6807   rm -rf conftest*
6808   ac_cv_c_inline=$ac_kw; break
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812 fi
6813 rm -f conftest*
6814 done
6815
6816 fi
6817
6818 echo "$ac_t""$ac_cv_c_inline" 1>&6
6819 case "$ac_cv_c_inline" in
6820   inline | yes) ;;
6821   no) cat >> confdefs.h <<\EOF
6822 #define inline 
6823 EOF
6824  ;;
6825   *)  cat >> confdefs.h <<EOF
6826 #define inline $ac_cv_c_inline
6827 EOF
6828  ;;
6829 esac
6830
6831 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6832 echo "configure:6822: checking for off_t" >&5
6833 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6834   echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836   cat > conftest.$ac_ext <<EOF
6837 #line 6827 "configure"
6838 #include "confdefs.h"
6839 #include <sys/types.h>
6840 #if STDC_HEADERS
6841 #include <stdlib.h>
6842 #include <stddef.h>
6843 #endif
6844 EOF
6845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6846   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6847   rm -rf conftest*
6848   ac_cv_type_off_t=yes
6849 else
6850   rm -rf conftest*
6851   ac_cv_type_off_t=no
6852 fi
6853 rm -f conftest*
6854
6855 fi
6856 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6857 if test $ac_cv_type_off_t = no; then
6858   cat >> confdefs.h <<\EOF
6859 #define off_t long
6860 EOF
6861
6862 fi
6863
6864 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6865 echo "configure:6855: checking for size_t" >&5
6866 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6860 "configure"
6871 #include "confdefs.h"
6872 #include <sys/types.h>
6873 #if STDC_HEADERS
6874 #include <stdlib.h>
6875 #include <stddef.h>
6876 #endif
6877 EOF
6878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6879   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6880   rm -rf conftest*
6881   ac_cv_type_size_t=yes
6882 else
6883   rm -rf conftest*
6884   ac_cv_type_size_t=no
6885 fi
6886 rm -f conftest*
6887
6888 fi
6889 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6890 if test $ac_cv_type_size_t = no; then
6891   cat >> confdefs.h <<\EOF
6892 #define size_t unsigned
6893 EOF
6894
6895 fi
6896
6897 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6898 # for constant arguments.  Useless!
6899 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6900 echo "configure:6890: checking for working alloca.h" >&5
6901 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6902   echo $ac_n "(cached) $ac_c" 1>&6
6903 else
6904   cat > conftest.$ac_ext <<EOF
6905 #line 6895 "configure"
6906 #include "confdefs.h"
6907 #include <alloca.h>
6908 int main() {
6909 char *p = alloca(2 * sizeof(int));
6910 ; return 0; }
6911 EOF
6912 if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6913   rm -rf conftest*
6914   ac_cv_header_alloca_h=yes
6915 else
6916   echo "configure: failed program was:" >&5
6917   cat conftest.$ac_ext >&5
6918   rm -rf conftest*
6919   ac_cv_header_alloca_h=no
6920 fi
6921 rm -f conftest*
6922 fi
6923
6924 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6925 if test $ac_cv_header_alloca_h = yes; then
6926   cat >> confdefs.h <<\EOF
6927 #define HAVE_ALLOCA_H 1
6928 EOF
6929
6930 fi
6931
6932 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6933 echo "configure:6923: checking for alloca" >&5
6934 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6935   echo $ac_n "(cached) $ac_c" 1>&6
6936 else
6937   cat > conftest.$ac_ext <<EOF
6938 #line 6928 "configure"
6939 #include "confdefs.h"
6940
6941 #ifdef __GNUC__
6942 # define alloca __builtin_alloca
6943 #else
6944 # ifdef _MSC_VER
6945 #  include <malloc.h>
6946 #  define alloca _alloca
6947 # else
6948 #  if HAVE_ALLOCA_H
6949 #   include <alloca.h>
6950 #  else
6951 #   ifdef _AIX
6952  #pragma alloca
6953 #   else
6954 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6955 char *alloca ();
6956 #    endif
6957 #   endif
6958 #  endif
6959 # endif
6960 #endif
6961
6962 int main() {
6963 char *p = (char *) alloca(1);
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967   rm -rf conftest*
6968   ac_cv_func_alloca_works=yes
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   ac_cv_func_alloca_works=no
6974 fi
6975 rm -f conftest*
6976 fi
6977
6978 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6979 if test $ac_cv_func_alloca_works = yes; then
6980   cat >> confdefs.h <<\EOF
6981 #define HAVE_ALLOCA 1
6982 EOF
6983
6984 fi
6985
6986 if test $ac_cv_func_alloca_works = no; then
6987   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6988   # that cause trouble.  Some versions do not even contain alloca or
6989   # contain a buggy version.  If you still want to use their alloca,
6990   # use ar to extract alloca.o from them instead of compiling alloca.c.
6991   ALLOCA=alloca.${ac_objext}
6992   cat >> confdefs.h <<\EOF
6993 #define C_ALLOCA 1
6994 EOF
6995
6996
6997 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6998 echo "configure:6988: checking whether alloca needs Cray hooks" >&5
6999 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
7000   echo $ac_n "(cached) $ac_c" 1>&6
7001 else
7002   cat > conftest.$ac_ext <<EOF
7003 #line 6993 "configure"
7004 #include "confdefs.h"
7005 #if defined(CRAY) && ! defined(CRAY2)
7006 webecray
7007 #else
7008 wenotbecray
7009 #endif
7010
7011 EOF
7012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7013   egrep "webecray" >/dev/null 2>&1; then
7014   rm -rf conftest*
7015   ac_cv_os_cray=yes
7016 else
7017   rm -rf conftest*
7018   ac_cv_os_cray=no
7019 fi
7020 rm -f conftest*
7021
7022 fi
7023
7024 echo "$ac_t""$ac_cv_os_cray" 1>&6
7025 if test $ac_cv_os_cray = yes; then
7026 for ac_func in _getb67 GETB67 getb67; do
7027   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7028 echo "configure:7018: checking for $ac_func" >&5
7029 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7030   echo $ac_n "(cached) $ac_c" 1>&6
7031 else
7032   cat > conftest.$ac_ext <<EOF
7033 #line 7023 "configure"
7034 #include "confdefs.h"
7035 /* System header to define __stub macros and hopefully few prototypes,
7036     which can conflict with char $ac_func(); below.  */
7037 #include <assert.h>
7038 /* Override any gcc2 internal prototype to avoid an error.  */
7039 /* We use char because int might match the return type of a gcc2
7040     builtin and then its argument prototype would still apply.  */
7041 char $ac_func();
7042
7043 int main() {
7044
7045 /* The GNU C library defines this for functions which it implements
7046     to always fail with ENOSYS.  Some functions are actually named
7047     something starting with __ and the normal name is an alias.  */
7048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7049 choke me
7050 #else
7051 $ac_func();
7052 #endif
7053
7054 ; return 0; }
7055 EOF
7056 if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7057   rm -rf conftest*
7058   eval "ac_cv_func_$ac_func=yes"
7059 else
7060   echo "configure: failed program was:" >&5
7061   cat conftest.$ac_ext >&5
7062   rm -rf conftest*
7063   eval "ac_cv_func_$ac_func=no"
7064 fi
7065 rm -f conftest*
7066 fi
7067
7068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7069   echo "$ac_t""yes" 1>&6
7070   cat >> confdefs.h <<EOF
7071 #define CRAY_STACKSEG_END $ac_func
7072 EOF
7073
7074   break
7075 else
7076   echo "$ac_t""no" 1>&6
7077 fi
7078
7079 done
7080 fi
7081
7082 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
7083 echo "configure:7073: checking stack direction for C alloca" >&5
7084 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
7085   echo $ac_n "(cached) $ac_c" 1>&6
7086 else
7087   if test "$cross_compiling" = yes; then
7088   ac_cv_c_stack_direction=0
7089 else
7090   cat > conftest.$ac_ext <<EOF
7091 #line 7081 "configure"
7092 #include "confdefs.h"
7093 find_stack_direction ()
7094 {
7095   static char *addr = 0;
7096   auto char dummy;
7097   if (addr == 0)
7098     {
7099       addr = &dummy;
7100       return find_stack_direction ();
7101     }
7102   else
7103     return (&dummy > addr) ? 1 : -1;
7104 }
7105 main ()
7106 {
7107   exit (find_stack_direction() < 0);
7108 }
7109 EOF
7110 if { (eval echo configure:7100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7111 then
7112   ac_cv_c_stack_direction=1
7113 else
7114   echo "configure: failed program was:" >&5
7115   cat conftest.$ac_ext >&5
7116   rm -fr conftest*
7117   ac_cv_c_stack_direction=-1
7118 fi
7119 rm -fr conftest*
7120 fi
7121
7122 fi
7123
7124 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
7125 cat >> confdefs.h <<EOF
7126 #define STACK_DIRECTION $ac_cv_c_stack_direction
7127 EOF
7128
7129 fi
7130
7131                               
7132    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7133 unistd.h sys/param.h
7134 do
7135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7137 echo "configure:7127: checking for $ac_hdr" >&5
7138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7139   echo $ac_n "(cached) $ac_c" 1>&6
7140 else
7141   cat > conftest.$ac_ext <<EOF
7142 #line 7132 "configure"
7143 #include "confdefs.h"
7144 #include <$ac_hdr>
7145 EOF
7146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7147 { (eval echo configure:7137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7149 if test -z "$ac_err"; then
7150   rm -rf conftest*
7151   eval "ac_cv_header_$ac_safe=yes"
7152 else
7153   echo "$ac_err" >&5
7154   echo "configure: failed program was:" >&5
7155   cat conftest.$ac_ext >&5
7156   rm -rf conftest*
7157   eval "ac_cv_header_$ac_safe=no"
7158 fi
7159 rm -f conftest*
7160 fi
7161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7162   echo "$ac_t""yes" 1>&6
7163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7164   cat >> confdefs.h <<EOF
7165 #define $ac_tr_hdr 1
7166 EOF
7167  
7168 else
7169   echo "$ac_t""no" 1>&6
7170 fi
7171 done
7172
7173    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7174 strdup __argz_count __argz_stringify __argz_next
7175 do
7176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7177 echo "configure:7167: checking for $ac_func" >&5
7178 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7179   echo $ac_n "(cached) $ac_c" 1>&6
7180 else
7181   cat > conftest.$ac_ext <<EOF
7182 #line 7172 "configure"
7183 #include "confdefs.h"
7184 /* System header to define __stub macros and hopefully few prototypes,
7185     which can conflict with char $ac_func(); below.  */
7186 #include <assert.h>
7187 /* Override any gcc2 internal prototype to avoid an error.  */
7188 /* We use char because int might match the return type of a gcc2
7189     builtin and then its argument prototype would still apply.  */
7190 char $ac_func();
7191
7192 int main() {
7193
7194 /* The GNU C library defines this for functions which it implements
7195     to always fail with ENOSYS.  Some functions are actually named
7196     something starting with __ and the normal name is an alias.  */
7197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7198 choke me
7199 #else
7200 $ac_func();
7201 #endif
7202
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   eval "ac_cv_func_$ac_func=yes"
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   eval "ac_cv_func_$ac_func=no"
7213 fi
7214 rm -f conftest*
7215 fi
7216
7217 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7220   cat >> confdefs.h <<EOF
7221 #define $ac_tr_func 1
7222 EOF
7223  
7224 else
7225   echo "$ac_t""no" 1>&6
7226 fi
7227 done
7228
7229
7230    if test "${ac_cv_func_stpcpy+set}" != "set"; then
7231      for ac_func in stpcpy
7232 do
7233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7234 echo "configure:7224: checking for $ac_func" >&5
7235 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7236   echo $ac_n "(cached) $ac_c" 1>&6
7237 else
7238   cat > conftest.$ac_ext <<EOF
7239 #line 7229 "configure"
7240 #include "confdefs.h"
7241 /* System header to define __stub macros and hopefully few prototypes,
7242     which can conflict with char $ac_func(); below.  */
7243 #include <assert.h>
7244 /* Override any gcc2 internal prototype to avoid an error.  */
7245 /* We use char because int might match the return type of a gcc2
7246     builtin and then its argument prototype would still apply.  */
7247 char $ac_func();
7248
7249 int main() {
7250
7251 /* The GNU C library defines this for functions which it implements
7252     to always fail with ENOSYS.  Some functions are actually named
7253     something starting with __ and the normal name is an alias.  */
7254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7255 choke me
7256 #else
7257 $ac_func();
7258 #endif
7259
7260 ; return 0; }
7261 EOF
7262 if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7263   rm -rf conftest*
7264   eval "ac_cv_func_$ac_func=yes"
7265 else
7266   echo "configure: failed program was:" >&5
7267   cat conftest.$ac_ext >&5
7268   rm -rf conftest*
7269   eval "ac_cv_func_$ac_func=no"
7270 fi
7271 rm -f conftest*
7272 fi
7273
7274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7275   echo "$ac_t""yes" 1>&6
7276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7277   cat >> confdefs.h <<EOF
7278 #define $ac_tr_func 1
7279 EOF
7280  
7281 else
7282   echo "$ac_t""no" 1>&6
7283 fi
7284 done
7285
7286    fi
7287    if test "${ac_cv_func_stpcpy}" = "yes"; then
7288      cat >> confdefs.h <<\EOF
7289 #define HAVE_STPCPY 1
7290 EOF
7291
7292    fi
7293
7294    if test $ac_cv_header_locale_h = yes; then
7295     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
7296 echo "configure:7286: checking for LC_MESSAGES" >&5
7297 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
7298   echo $ac_n "(cached) $ac_c" 1>&6
7299 else
7300   cat > conftest.$ac_ext <<EOF
7301 #line 7291 "configure"
7302 #include "confdefs.h"
7303 #include <locale.h>
7304 int main() {
7305 return LC_MESSAGES
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7309   rm -rf conftest*
7310   am_cv_val_LC_MESSAGES=yes
7311 else
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   am_cv_val_LC_MESSAGES=no
7316 fi
7317 rm -f conftest*
7318 fi
7319
7320 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
7321     if test $am_cv_val_LC_MESSAGES = yes; then
7322       cat >> confdefs.h <<\EOF
7323 #define HAVE_LC_MESSAGES 1
7324 EOF
7325
7326     fi
7327   fi
7328    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
7329 echo "configure:7319: checking whether NLS is requested" >&5
7330         # Check whether --enable-nls or --disable-nls was given.
7331 if test "${enable_nls+set}" = set; then
7332   enableval="$enable_nls"
7333   USE_NLS=$enableval
7334 else
7335   USE_NLS=yes
7336 fi
7337
7338     echo "$ac_t""$USE_NLS" 1>&6
7339     
7340
7341     USE_INCLUDED_LIBINTL=no
7342
7343         if test "$USE_NLS" = "yes"; then
7344       cat >> confdefs.h <<\EOF
7345 #define ENABLE_NLS 1
7346 EOF
7347
7348       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
7349 echo "configure:7339: checking whether included gettext is requested" >&5
7350       # Check whether --with-included-gettext or --without-included-gettext was given.
7351 if test "${with_included_gettext+set}" = set; then
7352   withval="$with_included_gettext"
7353   nls_cv_force_use_gnu_gettext=$withval
7354 else
7355   nls_cv_force_use_gnu_gettext=no
7356 fi
7357
7358       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
7359
7360       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7361       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7362                                         nls_cv_header_intl=
7363         nls_cv_header_libgt=
7364         CATOBJEXT=NONE
7365
7366         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
7367 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
7368 echo "configure:7358: checking for libintl.h" >&5
7369 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7370   echo $ac_n "(cached) $ac_c" 1>&6
7371 else
7372   cat > conftest.$ac_ext <<EOF
7373 #line 7363 "configure"
7374 #include "confdefs.h"
7375 #include <libintl.h>
7376 EOF
7377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7378 { (eval echo configure:7368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7380 if test -z "$ac_err"; then
7381   rm -rf conftest*
7382   eval "ac_cv_header_$ac_safe=yes"
7383 else
7384   echo "$ac_err" >&5
7385   echo "configure: failed program was:" >&5
7386   cat conftest.$ac_ext >&5
7387   rm -rf conftest*
7388   eval "ac_cv_header_$ac_safe=no"
7389 fi
7390 rm -f conftest*
7391 fi
7392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7393   echo "$ac_t""yes" 1>&6
7394   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
7395 echo "configure:7385: checking for gettext in libc" >&5
7396 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
7397   echo $ac_n "(cached) $ac_c" 1>&6
7398 else
7399   cat > conftest.$ac_ext <<EOF
7400 #line 7390 "configure"
7401 #include "confdefs.h"
7402 #include <libintl.h>
7403 int main() {
7404 return (int) gettext ("")
7405 ; return 0; }
7406 EOF
7407 if { (eval echo configure:7397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7408   rm -rf conftest*
7409   gt_cv_func_gettext_libc=yes
7410 else
7411   echo "configure: failed program was:" >&5
7412   cat conftest.$ac_ext >&5
7413   rm -rf conftest*
7414   gt_cv_func_gettext_libc=no
7415 fi
7416 rm -f conftest*
7417 fi
7418
7419 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
7420
7421            if test "$gt_cv_func_gettext_libc" != "yes"; then
7422              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
7423 echo "configure:7413: checking for bindtextdomain in -lintl" >&5
7424 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
7425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7426   echo $ac_n "(cached) $ac_c" 1>&6
7427 else
7428   ac_save_LIBS="$LIBS"
7429 LIBS="-lintl  $LIBS"
7430 cat > conftest.$ac_ext <<EOF
7431 #line 7421 "configure"
7432 #include "confdefs.h"
7433 /* Override any gcc2 internal prototype to avoid an error.  */
7434 /* We use char because int might match the return type of a gcc2
7435     builtin and then its argument prototype would still apply.  */
7436 char bindtextdomain();
7437
7438 int main() {
7439 bindtextdomain()
7440 ; return 0; }
7441 EOF
7442 if { (eval echo configure:7432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7443   rm -rf conftest*
7444   eval "ac_cv_lib_$ac_lib_var=yes"
7445 else
7446   echo "configure: failed program was:" >&5
7447   cat conftest.$ac_ext >&5
7448   rm -rf conftest*
7449   eval "ac_cv_lib_$ac_lib_var=no"
7450 fi
7451 rm -f conftest*
7452 LIBS="$ac_save_LIBS"
7453
7454 fi
7455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7456   echo "$ac_t""yes" 1>&6
7457   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
7458 echo "configure:7448: checking for gettext in libintl" >&5
7459 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
7460   echo $ac_n "(cached) $ac_c" 1>&6
7461 else
7462   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
7463 echo "configure:7453: checking for gettext in -lintl" >&5
7464 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
7465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   ac_save_LIBS="$LIBS"
7469 LIBS="-lintl  $LIBS"
7470 cat > conftest.$ac_ext <<EOF
7471 #line 7461 "configure"
7472 #include "confdefs.h"
7473 /* Override any gcc2 internal prototype to avoid an error.  */
7474 /* We use char because int might match the return type of a gcc2
7475     builtin and then its argument prototype would still apply.  */
7476 char gettext();
7477
7478 int main() {
7479 gettext()
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7483   rm -rf conftest*
7484   eval "ac_cv_lib_$ac_lib_var=yes"
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=no"
7490 fi
7491 rm -f conftest*
7492 LIBS="$ac_save_LIBS"
7493
7494 fi
7495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7496   echo "$ac_t""yes" 1>&6
7497   gt_cv_func_gettext_libintl=yes
7498 else
7499   echo "$ac_t""no" 1>&6
7500 gt_cv_func_gettext_libintl=no
7501 fi
7502
7503 fi
7504
7505 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
7506 else
7507   echo "$ac_t""no" 1>&6
7508 fi
7509
7510            fi
7511
7512            if test "$gt_cv_func_gettext_libc" = "yes" \
7513               || test "$gt_cv_func_gettext_libintl" = "yes"; then
7514               cat >> confdefs.h <<\EOF
7515 #define HAVE_GETTEXT 1
7516 EOF
7517
7518               # Extract the first word of "msgfmt", so it can be a program name with args.
7519 set dummy msgfmt; ac_word=$2
7520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7521 echo "configure:7511: checking for $ac_word" >&5
7522 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7523   echo $ac_n "(cached) $ac_c" 1>&6
7524 else
7525   case "$MSGFMT" in
7526   /*)
7527   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7528   ;;
7529   *)
7530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7531   for ac_dir in $PATH; do
7532     test -z "$ac_dir" && ac_dir=.
7533     if test -f $ac_dir/$ac_word; then
7534       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7535         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7536         break
7537       fi
7538     fi
7539   done
7540   IFS="$ac_save_ifs"
7541   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7542   ;;
7543 esac
7544 fi
7545 MSGFMT="$ac_cv_path_MSGFMT"
7546 if test -n "$MSGFMT"; then
7547   echo "$ac_t""$MSGFMT" 1>&6
7548 else
7549   echo "$ac_t""no" 1>&6
7550 fi
7551               if test "$MSGFMT" != "no"; then
7552                 for ac_func in dcgettext
7553 do
7554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7555 echo "configure:7545: checking for $ac_func" >&5
7556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7557   echo $ac_n "(cached) $ac_c" 1>&6
7558 else
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7550 "configure"
7561 #include "confdefs.h"
7562 /* System header to define __stub macros and hopefully few prototypes,
7563     which can conflict with char $ac_func(); below.  */
7564 #include <assert.h>
7565 /* Override any gcc2 internal prototype to avoid an error.  */
7566 /* We use char because int might match the return type of a gcc2
7567     builtin and then its argument prototype would still apply.  */
7568 char $ac_func();
7569
7570 int main() {
7571
7572 /* The GNU C library defines this for functions which it implements
7573     to always fail with ENOSYS.  Some functions are actually named
7574     something starting with __ and the normal name is an alias.  */
7575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7576 choke me
7577 #else
7578 $ac_func();
7579 #endif
7580
7581 ; return 0; }
7582 EOF
7583 if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7584   rm -rf conftest*
7585   eval "ac_cv_func_$ac_func=yes"
7586 else
7587   echo "configure: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   rm -rf conftest*
7590   eval "ac_cv_func_$ac_func=no"
7591 fi
7592 rm -f conftest*
7593 fi
7594
7595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7596   echo "$ac_t""yes" 1>&6
7597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7598   cat >> confdefs.h <<EOF
7599 #define $ac_tr_func 1
7600 EOF
7601  
7602 else
7603   echo "$ac_t""no" 1>&6
7604 fi
7605 done
7606
7607                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7608 set dummy gmsgfmt; ac_word=$2
7609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7610 echo "configure:7600: checking for $ac_word" >&5
7611 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7612   echo $ac_n "(cached) $ac_c" 1>&6
7613 else
7614   case "$GMSGFMT" in
7615   /*)
7616   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7617   ;;
7618   ?:/*)                  
7619   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7620   ;;
7621   *)
7622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7623   ac_dummy="$PATH"
7624   for ac_dir in $ac_dummy; do 
7625     test -z "$ac_dir" && ac_dir=.
7626     if test -f $ac_dir/$ac_word; then
7627       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7628       break
7629     fi
7630   done
7631   IFS="$ac_save_ifs"
7632   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7633   ;;
7634 esac
7635 fi
7636 GMSGFMT="$ac_cv_path_GMSGFMT"
7637 if test -n "$GMSGFMT"; then
7638   echo "$ac_t""$GMSGFMT" 1>&6
7639 else
7640   echo "$ac_t""no" 1>&6
7641 fi
7642
7643                 # Extract the first word of "xgettext", so it can be a program name with args.
7644 set dummy xgettext; ac_word=$2
7645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7646 echo "configure:7636: checking for $ac_word" >&5
7647 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7648   echo $ac_n "(cached) $ac_c" 1>&6
7649 else
7650   case "$XGETTEXT" in
7651   /*)
7652   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7653   ;;
7654   *)
7655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7656   for ac_dir in $PATH; do
7657     test -z "$ac_dir" && ac_dir=.
7658     if test -f $ac_dir/$ac_word; then
7659       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7660         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7661         break
7662       fi
7663     fi
7664   done
7665   IFS="$ac_save_ifs"
7666   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7667   ;;
7668 esac
7669 fi
7670 XGETTEXT="$ac_cv_path_XGETTEXT"
7671 if test -n "$XGETTEXT"; then
7672   echo "$ac_t""$XGETTEXT" 1>&6
7673 else
7674   echo "$ac_t""no" 1>&6
7675 fi
7676
7677                 cat > conftest.$ac_ext <<EOF
7678 #line 7668 "configure"
7679 #include "confdefs.h"
7680
7681 int main() {
7682 extern int _nl_msg_cat_cntr;
7683                                return _nl_msg_cat_cntr
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   CATOBJEXT=.gmo
7689                    DATADIRNAME=share
7690 else
7691   echo "configure: failed program was:" >&5
7692   cat conftest.$ac_ext >&5
7693   rm -rf conftest*
7694   CATOBJEXT=.mo
7695                    DATADIRNAME=lib
7696 fi
7697 rm -f conftest*
7698                 INSTOBJEXT=.mo
7699               fi
7700             fi
7701         
7702 else
7703   echo "$ac_t""no" 1>&6
7704 fi
7705
7706
7707         if test "$CATOBJEXT" = "NONE"; then
7708           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
7709 echo "configure:7699: checking whether catgets can be used" >&5
7710           # Check whether --with-catgets or --without-catgets was given.
7711 if test "${with_catgets+set}" = set; then
7712   withval="$with_catgets"
7713   nls_cv_use_catgets=$withval
7714 else
7715   nls_cv_use_catgets=no
7716 fi
7717
7718           echo "$ac_t""$nls_cv_use_catgets" 1>&6
7719
7720           if test "$nls_cv_use_catgets" = "yes"; then
7721                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
7722 echo "configure:7712: checking for main in -li" >&5
7723 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
7724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7725   echo $ac_n "(cached) $ac_c" 1>&6
7726 else
7727   ac_save_LIBS="$LIBS"
7728 LIBS="-li  $LIBS"
7729 cat > conftest.$ac_ext <<EOF
7730 #line 7720 "configure"
7731 #include "confdefs.h"
7732
7733 int main() {
7734 main()
7735 ; return 0; }
7736 EOF
7737 if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7738   rm -rf conftest*
7739   eval "ac_cv_lib_$ac_lib_var=yes"
7740 else
7741   echo "configure: failed program was:" >&5
7742   cat conftest.$ac_ext >&5
7743   rm -rf conftest*
7744   eval "ac_cv_lib_$ac_lib_var=no"
7745 fi
7746 rm -f conftest*
7747 LIBS="$ac_save_LIBS"
7748
7749 fi
7750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7751   echo "$ac_t""yes" 1>&6
7752     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7753     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7754   cat >> confdefs.h <<EOF
7755 #define $ac_tr_lib 1
7756 EOF
7757
7758   LIBS="-li $LIBS"
7759
7760 else
7761   echo "$ac_t""no" 1>&6
7762 fi
7763
7764             echo $ac_n "checking for catgets""... $ac_c" 1>&6
7765 echo "configure:7755: checking for catgets" >&5
7766 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769   cat > conftest.$ac_ext <<EOF
7770 #line 7760 "configure"
7771 #include "confdefs.h"
7772 /* System header to define __stub macros and hopefully few prototypes,
7773     which can conflict with char catgets(); below.  */
7774 #include <assert.h>
7775 /* Override any gcc2 internal prototype to avoid an error.  */
7776 /* We use char because int might match the return type of a gcc2
7777     builtin and then its argument prototype would still apply.  */
7778 char catgets();
7779
7780 int main() {
7781
7782 /* The GNU C library defines this for functions which it implements
7783     to always fail with ENOSYS.  Some functions are actually named
7784     something starting with __ and the normal name is an alias.  */
7785 #if defined (__stub_catgets) || defined (__stub___catgets)
7786 choke me
7787 #else
7788 catgets();
7789 #endif
7790
7791 ; return 0; }
7792 EOF
7793 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7794   rm -rf conftest*
7795   eval "ac_cv_func_catgets=yes"
7796 else
7797   echo "configure: failed program was:" >&5
7798   cat conftest.$ac_ext >&5
7799   rm -rf conftest*
7800   eval "ac_cv_func_catgets=no"
7801 fi
7802 rm -f conftest*
7803 fi
7804
7805 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
7806   echo "$ac_t""yes" 1>&6
7807   cat >> confdefs.h <<\EOF
7808 #define HAVE_CATGETS 1
7809 EOF
7810
7811                INTLOBJS="\$(CATOBJS)"
7812                # Extract the first word of "gencat", so it can be a program name with args.
7813 set dummy gencat; ac_word=$2
7814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7815 echo "configure:7805: checking for $ac_word" >&5
7816 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
7817   echo $ac_n "(cached) $ac_c" 1>&6
7818 else
7819   case "$GENCAT" in
7820   /*)
7821   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
7822   ;;
7823   ?:/*)                  
7824   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
7825   ;;
7826   *)
7827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7828   ac_dummy="$PATH"
7829   for ac_dir in $ac_dummy; do 
7830     test -z "$ac_dir" && ac_dir=.
7831     if test -f $ac_dir/$ac_word; then
7832       ac_cv_path_GENCAT="$ac_dir/$ac_word"
7833       break
7834     fi
7835   done
7836   IFS="$ac_save_ifs"
7837   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
7838   ;;
7839 esac
7840 fi
7841 GENCAT="$ac_cv_path_GENCAT"
7842 if test -n "$GENCAT"; then
7843   echo "$ac_t""$GENCAT" 1>&6
7844 else
7845   echo "$ac_t""no" 1>&6
7846 fi
7847                if test "$GENCAT" != "no"; then
7848                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
7849 set dummy gmsgfmt; ac_word=$2
7850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7851 echo "configure:7841: checking for $ac_word" >&5
7852 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   case "$GMSGFMT" in
7856   /*)
7857   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7858   ;;
7859   ?:/*)                  
7860   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7861   ;;
7862   *)
7863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7864   ac_dummy="$PATH"
7865   for ac_dir in $ac_dummy; do 
7866     test -z "$ac_dir" && ac_dir=.
7867     if test -f $ac_dir/$ac_word; then
7868       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7869       break
7870     fi
7871   done
7872   IFS="$ac_save_ifs"
7873   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7874   ;;
7875 esac
7876 fi
7877 GMSGFMT="$ac_cv_path_GMSGFMT"
7878 if test -n "$GMSGFMT"; then
7879   echo "$ac_t""$GMSGFMT" 1>&6
7880 else
7881   echo "$ac_t""no" 1>&6
7882 fi
7883
7884                  if test "$GMSGFMT" = "no"; then
7885                    # Extract the first word of "msgfmt", so it can be a program name with args.
7886 set dummy msgfmt; ac_word=$2
7887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7888 echo "configure:7878: checking for $ac_word" >&5
7889 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7890   echo $ac_n "(cached) $ac_c" 1>&6
7891 else
7892   case "$GMSGFMT" in
7893   /*)
7894   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7895   ;;
7896   *)
7897   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7898   for ac_dir in $PATH; do
7899     test -z "$ac_dir" && ac_dir=.
7900     if test -f $ac_dir/$ac_word; then
7901       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7902         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7903         break
7904       fi
7905     fi
7906   done
7907   IFS="$ac_save_ifs"
7908   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7909   ;;
7910 esac
7911 fi
7912 GMSGFMT="$ac_cv_path_GMSGFMT"
7913 if test -n "$GMSGFMT"; then
7914   echo "$ac_t""$GMSGFMT" 1>&6
7915 else
7916   echo "$ac_t""no" 1>&6
7917 fi
7918
7919                  fi
7920                  # Extract the first word of "xgettext", so it can be a program name with args.
7921 set dummy xgettext; ac_word=$2
7922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7923 echo "configure:7913: checking for $ac_word" >&5
7924 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7925   echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927   case "$XGETTEXT" in
7928   /*)
7929   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7930   ;;
7931   *)
7932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7933   for ac_dir in $PATH; do
7934     test -z "$ac_dir" && ac_dir=.
7935     if test -f $ac_dir/$ac_word; then
7936       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7937         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7938         break
7939       fi
7940     fi
7941   done
7942   IFS="$ac_save_ifs"
7943   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7944   ;;
7945 esac
7946 fi
7947 XGETTEXT="$ac_cv_path_XGETTEXT"
7948 if test -n "$XGETTEXT"; then
7949   echo "$ac_t""$XGETTEXT" 1>&6
7950 else
7951   echo "$ac_t""no" 1>&6
7952 fi
7953
7954                  USE_INCLUDED_LIBINTL=yes
7955                  CATOBJEXT=.cat
7956                  INSTOBJEXT=.cat
7957                  DATADIRNAME=lib
7958                  INTLDEPS='$(top_builddir)/intl/libintl.a'
7959                  INTLLIBS=$INTLDEPS
7960                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7961                  nls_cv_header_intl=intl/libintl.h
7962                  nls_cv_header_libgt=intl/libgettext.h
7963                fi
7964 else
7965   echo "$ac_t""no" 1>&6
7966 fi
7967
7968           fi
7969         fi
7970
7971         if test "$CATOBJEXT" = "NONE"; then
7972                           nls_cv_use_gnu_gettext=yes
7973         fi
7974       fi
7975
7976       if test "$nls_cv_use_gnu_gettext" = "yes"; then
7977                 INTLOBJS="\$(GETTOBJS)"
7978         # Extract the first word of "msgfmt", so it can be a program name with args.
7979 set dummy msgfmt; ac_word=$2
7980 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7981 echo "configure:7971: checking for $ac_word" >&5
7982 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985   case "$MSGFMT" in
7986   /*)
7987   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7988   ;;
7989   *)
7990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7991   for ac_dir in $PATH; do
7992     test -z "$ac_dir" && ac_dir=.
7993     if test -f $ac_dir/$ac_word; then
7994       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7995         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7996         break
7997       fi
7998     fi
7999   done
8000   IFS="$ac_save_ifs"
8001   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
8002   ;;
8003 esac
8004 fi
8005 MSGFMT="$ac_cv_path_MSGFMT"
8006 if test -n "$MSGFMT"; then
8007   echo "$ac_t""$MSGFMT" 1>&6
8008 else
8009   echo "$ac_t""no" 1>&6
8010 fi
8011
8012         # Extract the first word of "gmsgfmt", so it can be a program name with args.
8013 set dummy gmsgfmt; ac_word=$2
8014 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8015 echo "configure:8005: checking for $ac_word" >&5
8016 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
8017   echo $ac_n "(cached) $ac_c" 1>&6
8018 else
8019   case "$GMSGFMT" in
8020   /*)
8021   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8022   ;;
8023   ?:/*)                  
8024   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
8025   ;;
8026   *)
8027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8028   ac_dummy="$PATH"
8029   for ac_dir in $ac_dummy; do 
8030     test -z "$ac_dir" && ac_dir=.
8031     if test -f $ac_dir/$ac_word; then
8032       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8033       break
8034     fi
8035   done
8036   IFS="$ac_save_ifs"
8037   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8038   ;;
8039 esac
8040 fi
8041 GMSGFMT="$ac_cv_path_GMSGFMT"
8042 if test -n "$GMSGFMT"; then
8043   echo "$ac_t""$GMSGFMT" 1>&6
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047
8048         # Extract the first word of "xgettext", so it can be a program name with args.
8049 set dummy xgettext; ac_word=$2
8050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8051 echo "configure:8041: checking for $ac_word" >&5
8052 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   case "$XGETTEXT" in
8056   /*)
8057   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8058   ;;
8059   *)
8060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8061   for ac_dir in $PATH; do
8062     test -z "$ac_dir" && ac_dir=.
8063     if test -f $ac_dir/$ac_word; then
8064       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8065         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8066         break
8067       fi
8068     fi
8069   done
8070   IFS="$ac_save_ifs"
8071   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8072   ;;
8073 esac
8074 fi
8075 XGETTEXT="$ac_cv_path_XGETTEXT"
8076 if test -n "$XGETTEXT"; then
8077   echo "$ac_t""$XGETTEXT" 1>&6
8078 else
8079   echo "$ac_t""no" 1>&6
8080 fi
8081
8082         
8083         USE_INCLUDED_LIBINTL=yes
8084         CATOBJEXT=.gmo
8085         INSTOBJEXT=.mo
8086         DATADIRNAME=share
8087         INTLDEPS='$(top_builddir)/intl/libintl.a'
8088         INTLLIBS=$INTLDEPS
8089         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8090         nls_cv_header_intl=intl/libintl.h
8091         nls_cv_header_libgt=intl/libgettext.h
8092       fi
8093
8094             if test "$XGETTEXT" != ":"; then
8095                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8096           : ;
8097         else
8098           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
8099           XGETTEXT=":"
8100         fi
8101       fi
8102
8103       # We need to process the po/ directory.
8104       POSUB=po
8105     else
8106       DATADIRNAME=share
8107       nls_cv_header_intl=intl/libintl.h
8108       nls_cv_header_libgt=intl/libgettext.h
8109     fi
8110     
8111     
8112
8113
8114     # If this is used in GNU gettext we have to set USE_NLS to `yes'
8115     # because some of the sources are only built for this goal.
8116     if test "$PACKAGE" = gettext; then
8117       USE_NLS=yes
8118       USE_INCLUDED_LIBINTL=yes
8119     fi
8120
8121                 for lang in $ALL_LINGUAS; do
8122       GMOFILES="$GMOFILES $lang.gmo"
8123       POFILES="$POFILES $lang.po"
8124     done
8125
8126         
8127     
8128     
8129     
8130     
8131     
8132     
8133     
8134     
8135     
8136     
8137   
8138
8139    if test "x$CATOBJEXT" != "x"; then
8140      if test "x$ALL_LINGUAS" = "x"; then
8141        LINGUAS=
8142      else
8143        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
8144 echo "configure:8134: checking for catalogs to be installed" >&5
8145        NEW_LINGUAS=
8146        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8147          case "$ALL_LINGUAS" in
8148           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8149          esac
8150        done
8151        LINGUAS=$NEW_LINGUAS
8152        echo "$ac_t""$LINGUAS" 1>&6
8153      fi
8154
8155           if test -n "$LINGUAS"; then
8156        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8157      fi
8158    fi
8159
8160             if test $ac_cv_header_locale_h = yes; then
8161      INCLUDE_LOCALE_H="#include <locale.h>"
8162    else
8163      INCLUDE_LOCALE_H="\
8164 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
8165    fi
8166    
8167
8168             test -d intl || mkdir intl
8169    if test "$CATOBJEXT" = ".cat"; then
8170      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
8171 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
8172 echo "configure:8162: checking for linux/version.h" >&5
8173 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8174   echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8176   cat > conftest.$ac_ext <<EOF
8177 #line 8167 "configure"
8178 #include "confdefs.h"
8179 #include <linux/version.h>
8180 EOF
8181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8182 { (eval echo configure:8172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8184 if test -z "$ac_err"; then
8185   rm -rf conftest*
8186   eval "ac_cv_header_$ac_safe=yes"
8187 else
8188   echo "$ac_err" >&5
8189   echo "configure: failed program was:" >&5
8190   cat conftest.$ac_ext >&5
8191   rm -rf conftest*
8192   eval "ac_cv_header_$ac_safe=no"
8193 fi
8194 rm -f conftest*
8195 fi
8196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8197   echo "$ac_t""yes" 1>&6
8198   msgformat=linux
8199 else
8200   echo "$ac_t""no" 1>&6
8201 msgformat=xopen
8202 fi
8203
8204
8205                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
8206    fi
8207       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
8208      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
8209
8210             if test "$PACKAGE" = "gettext"; then
8211      GT_NO="#NO#"
8212      GT_YES=
8213    else
8214      GT_NO=
8215      GT_YES="#YES#"
8216    fi
8217    
8218    
8219
8220             MKINSTALLDIRS=
8221    if test -n "$ac_aux_dir"; then
8222      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8223    fi
8224    if test -z "$MKINSTALLDIRS"; then
8225      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8226    fi
8227    
8228
8229       l=
8230    
8231
8232          test -d po || mkdir po
8233    if test "x$srcdir" != "x."; then
8234      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8235        posrcprefix="$srcdir/"
8236      else
8237        posrcprefix="../$srcdir/"
8238      fi
8239    else
8240      posrcprefix="../"
8241    fi
8242    rm -f po/POTFILES
8243    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8244         < $srcdir/po/POTFILES.in > po/POTFILES
8245   
8246 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
8247
8248 # Windows32 Registry support for specifying GCC installation paths.
8249 # Check whether --enable-win32-registry or --disable-win32-registry was given.
8250 if test "${enable_win32_registry+set}" = set; then
8251   enableval="$enable_win32_registry"
8252   :
8253 fi
8254
8255
8256 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
8257 echo "configure:8247: checking whether windows registry support is requested" >&5
8258 if test x$enable_win32_registry != xno; then
8259   cat >> confdefs.h <<\EOF
8260 #define ENABLE_WIN32_REGISTRY 1
8261 EOF
8262
8263   echo "$ac_t""yes" 1>&6
8264 else
8265   echo "$ac_t""no" 1>&6
8266 fi
8267
8268 # Check if user specified a different registry key.
8269 case x${enable_win32_registry} in
8270 x | xyes)
8271   # default.
8272   gcc_cv_win32_registry_key="$VERSION"
8273   ;;
8274 xno)
8275   # no registry lookup.
8276   gcc_cv_win32_registry_key=''
8277   ;;
8278 *)
8279   # user-specified key.
8280   gcc_cv_win32_registry_key="$enable_win32_registry"
8281   ;;
8282 esac
8283
8284 if test x$enable_win32_registry != xno; then
8285   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
8286 echo "configure:8276: checking registry key on windows hosts" >&5
8287   cat >> confdefs.h <<EOF
8288 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
8289 EOF
8290
8291   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
8292 fi
8293
8294 # Get an absolute path to the GCC top-level source directory
8295 holddir=`pwd`
8296 cd $srcdir
8297 topdir=`pwd`
8298 cd $holddir
8299
8300 # Conditionalize the makefile for this host machine.
8301 # Make-host contains the concatenation of all host makefile fragments
8302 # [there can be more than one].  This file is built by configure.frag.
8303 host_overrides=Make-host
8304 dep_host_xmake_file=
8305 for f in .. ${host_xmake_file}
8306 do
8307         if test -f ${srcdir}/config/$f
8308         then
8309                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
8310         fi
8311 done
8312
8313 # Conditionalize the makefile for this target machine.
8314 # Make-target contains the concatenation of all host makefile fragments
8315 # [there can be more than one].  This file is built by configure.frag.
8316 target_overrides=Make-target
8317 dep_tmake_file=
8318 for f in .. ${tmake_file}
8319 do
8320         if test -f ${srcdir}/config/$f
8321         then
8322                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
8323         fi
8324 done
8325
8326 # If the host doesn't support symlinks, modify CC in
8327 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
8328 # Otherwise, we can use "CC=$(CC)".
8329 rm -f symtest.tem
8330 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
8331 then
8332         cc_set_by_configure="\$(CC)"
8333         quoted_cc_set_by_configure="\$(CC)"
8334         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
8335 else
8336         rm -f symtest.tem
8337         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
8338         then
8339                 symbolic_link="cp -p"
8340         else
8341                 symbolic_link="cp"
8342         fi
8343         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
8344         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
8345         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
8346 fi
8347 rm -f symtest.tem
8348
8349 out_object_file=`basename $out_file .c`.o
8350
8351 tm_file_list=
8352 for f in $tm_file; do
8353   case $f in
8354     gansidecl.h )
8355        tm_file_list="${tm_file_list} $f" ;;
8356     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
8357   esac
8358 done
8359
8360 host_xm_file_list=
8361 for f in $host_xm_file; do
8362   case $f in
8363     auto-host.h | gansidecl.h | hwint.h )
8364        host_xm_file_list="${host_xm_file_list} $f" ;;
8365     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
8366   esac
8367 done
8368
8369 build_xm_file_list=
8370 for f in $build_xm_file; do
8371   case $f in
8372     auto-build.h | auto-host.h | gansidecl.h | hwint.h )
8373        build_xm_file_list="${build_xm_file_list} $f" ;;
8374     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
8375   esac
8376 done
8377
8378 # Define macro CROSS_COMPILE in compilation
8379 # if this is a cross-compiler.
8380 # Also use all.cross instead of all.internal
8381 # and add cross-make to Makefile.
8382 cross_overrides="/dev/null"
8383 if test x$host != x$target
8384 then
8385         cross_defines="CROSS=-DCROSS_COMPILE"
8386         cross_overrides="${topdir}/cross-make"
8387 fi
8388
8389 # When building gcc with a cross-compiler, we need to fix a few things.
8390 # This must come after cross-make as we want all.build to override
8391 # all.cross.
8392 build_overrides="/dev/null"
8393 if test x$build != x$host
8394 then
8395         build_overrides="${topdir}/build-make"
8396 fi
8397
8398 # Expand extra_headers to include complete path.
8399 # This substitutes for lots of t-* files.
8400 extra_headers_list=
8401 if test "x$extra_headers" = x
8402 then true
8403 else
8404         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
8405         for file in $extra_headers;
8406         do
8407                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
8408         done
8409 fi
8410
8411 if test x$use_collect2 = xno; then
8412         use_collect2=
8413 fi
8414
8415 # Add a definition of USE_COLLECT2 if system wants one.
8416 # Also tell toplev.c what to do.
8417 # This substitutes for lots of t-* files.
8418 if test x$use_collect2 = x
8419 then
8420         will_use_collect2=
8421         maybe_use_collect2=
8422 else
8423         will_use_collect2="collect2"
8424         maybe_use_collect2="-DUSE_COLLECT2"
8425 fi
8426
8427 # NEED TO CONVERT
8428 # Set MD_DEPS if the real md file is in md.pre-cpp.
8429 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
8430 # for line oriented comments, so we must always use a GNU cpp.  If
8431 # building gcc with a cross compiler, use the cross compiler just
8432 # built.  Otherwise, we can use the cpp just built.
8433 md_file_sub=
8434 if test "x$md_cppflags" = x
8435 then
8436         md_file_sub=$srcdir/config/$md_file
8437 else
8438         md_file=md
8439 fi
8440
8441 # If we have gas in the build tree, make a link to it.
8442 if test -f ../gas/Makefile; then
8443         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
8444 fi
8445
8446 # If we have nm in the build tree, make a link to it.
8447 if test -f ../binutils/Makefile; then
8448         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
8449 fi
8450
8451 # If we have ld in the build tree, make a link to it.
8452 if test -f ../ld/Makefile; then
8453 #       if test x$use_collect2 = x; then
8454 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
8455 #       else
8456                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
8457 #       fi
8458 fi
8459
8460 # Figure out what assembler alignment features are present.
8461 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
8462 echo "configure:8452: checking assembler alignment features" >&5
8463 gcc_cv_as=
8464 gcc_cv_as_alignment_features=
8465 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
8466 if test -x "$DEFAULT_ASSEMBLER"; then
8467         gcc_cv_as="$DEFAULT_ASSEMBLER"
8468 elif test -x "$AS"; then
8469         gcc_cv_as="$AS"
8470 elif test -x as$host_exeext; then
8471         # Build using assembler in the current directory.
8472         gcc_cv_as=./as$host_exeext
8473 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
8474         # Single tree build which includes gas.
8475         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
8476         do
8477                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
8478                 if test x$gcc_cv_gas_version != x; then
8479                         break
8480                 fi
8481         done
8482         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
8483         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
8484         if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
8485                 # Gas version 2.6 and later support for .balign and .p2align.
8486                 # bytes to skip when using .p2align.
8487                 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
8488                         gcc_cv_as_alignment_features=".balign and .p2align"
8489                         cat >> confdefs.h <<\EOF
8490 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
8491 EOF
8492
8493                 fi
8494                 # Gas version 2.8 and later support specifying the maximum
8495                 # bytes to skip when using .p2align.
8496                 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
8497                         gcc_cv_as_alignment_features=".p2align including maximum skip"
8498                         cat >> confdefs.h <<\EOF
8499 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
8500 EOF
8501
8502                 fi
8503         fi
8504 elif test x$host = x$target; then
8505         # Native build.
8506         # Search the same directories that the installed compiler will
8507         # search.  Else we may find the wrong assembler and lose.  If we
8508         # do not find a suitable assembler binary, then try the user's
8509         # path.
8510         #
8511         # Also note we have to check MD_EXEC_PREFIX before checking the
8512         # user's path.  Unfortunately, there is no good way to get at the
8513         # value of MD_EXEC_PREFIX here.  So we do a brute force search
8514         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
8515         # to be fixed as part of the make/configure rewrite too.
8516
8517         if test "x$exec_prefix" = xNONE; then
8518                 if test "x$prefix" = xNONE; then
8519                         test_prefix=/usr/local
8520                 else
8521                         test_prefix=$prefix
8522                 fi
8523         else
8524                 test_prefix=$exec_prefix
8525         fi
8526
8527         # If the loop below does not find an assembler, then use whatever
8528         # one we can find in the users's path.
8529         # user's path.
8530         as=as$host_exeext
8531
8532         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
8533                    $test_prefix/lib/gcc-lib/$target \
8534                    /usr/lib/gcc/$target/$gcc_version \
8535                    /usr/lib/gcc/$target \
8536                    $test_prefix/$target/bin/$target/$gcc_version \
8537                    $test_prefix/$target/bin \
8538                    /usr/libexec \
8539                    /usr/ccs/gcc \
8540                    /usr/ccs/bin \
8541                    /udk/usr/ccs/bin \
8542                    /bsd43/usr/lib/cmplrs/cc \
8543                    /usr/cross64/usr/bin \
8544                    /usr/lib/cmplrs/cc \
8545                    /sysv/usr/lib/cmplrs/cc \
8546                    /svr4/usr/lib/cmplrs/cc \
8547                    /usr/bin"
8548
8549         for dir in $test_dirs; do
8550                 if test -f $dir/as$host_exeext; then
8551                         gcc_cv_as=$dir/as$host_exeext
8552                         break;
8553                 fi
8554         done
8555 fi
8556 if test x$gcc_cv_as != x; then
8557         # Check if we have .balign and .p2align
8558         echo ".balign  4" > conftest.s
8559         echo ".p2align  2" >> conftest.s
8560         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8561                 gcc_cv_as_alignment_features=".balign and .p2align"
8562                 cat >> confdefs.h <<\EOF
8563 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
8564 EOF
8565
8566         fi
8567         rm -f conftest.s conftest.o
8568         # Check if specifying the maximum bytes to skip when
8569         # using .p2align is supported.
8570         echo ".p2align 4,,7" > conftest.s
8571         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8572                 gcc_cv_as_alignment_features=".p2align including maximum skip"
8573                 cat >> confdefs.h <<\EOF
8574 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
8575 EOF
8576
8577         fi
8578         rm -f conftest.s conftest.o
8579 fi
8580 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
8581
8582 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
8583 echo "configure:8573: checking assembler subsection support" >&5
8584 gcc_cv_as_subsections=
8585 if test x$gcc_cv_as != x; then
8586         # Check if we have .subsection
8587         echo ".subsection 1" > conftest.s
8588         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8589                 gcc_cv_as_subsections=".subsection"
8590                 if test -x nm$host_exeext; then
8591                         gcc_cv_nm=./nm$host_exeext
8592                 elif test x$host = x$target; then
8593                         # Native build.
8594                         gcc_cv_nm=nm$host_exeext
8595                 fi
8596                 if test x$gcc_cv_nm != x; then
8597                         cat > conftest.s <<EOF
8598 conftest_label1: .word 0
8599 .subsection -1
8600 conftest_label2: .word 0
8601 .previous
8602 EOF
8603                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8604                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
8605                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
8606                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
8607                                         :
8608                                 else
8609                                         gcc_cv_as_subsections="working .subsection -1"
8610                                         cat >> confdefs.h <<\EOF
8611 #define HAVE_GAS_SUBSECTION_ORDERING 1
8612 EOF
8613
8614                                 fi
8615                         fi
8616                 fi
8617         fi
8618         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8619 fi
8620 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
8621
8622 case "$target" in 
8623   sparc*-*-*)
8624     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8625 echo "configure:8615: checking assembler .register pseudo-op support" >&5
8626 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8627   echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629   
8630         gcc_cv_as_register_pseudo_op=unknown
8631         if test x$gcc_cv_as != x; then
8632             # Check if we have .register
8633             echo ".register %g2, #scratch" > conftest.s
8634             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8635                 gcc_cv_as_register_pseudo_op=yes
8636             else
8637                 gcc_cv_as_register_pseudo_op=no
8638             fi
8639             rm -f conftest.s conftest.o
8640         fi
8641     
8642 fi
8643
8644 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8645     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8646         cat >> confdefs.h <<\EOF
8647 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8648 EOF
8649
8650     fi
8651
8652     case "$tm_file" in
8653     *64*)
8654         echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
8655 echo "configure:8645: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
8656 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
8657   echo $ac_n "(cached) $ac_c" 1>&6
8658 else
8659   
8660                 if test -n "$gcc_cv_as"; then
8661                     echo ".xword foo" > conftest.s
8662                     gcc_cv_as_flags64=no
8663                     for flag in "-xarch=v9" "-64 -Av9"; do
8664                         if $gcc_cv_as $flag -o conftest.o conftest.s \
8665                             > /dev/null 2>&1; then
8666                             gcc_cv_as_flags64=$flag
8667                             break
8668                         fi
8669                     done
8670                     rm -f conftest.s conftest.o
8671                 else
8672                     if test "$gas" = yes; then
8673                         gcc_cv_as_flags64="-64 -Av9"
8674                     else
8675                         gcc_cv_as_flags64="-xarch=v9"
8676                     fi
8677                 fi
8678         
8679 fi
8680
8681 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
8682         if test "x$gcc_cv_as_flags64" = xno; then
8683
8684             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
8685             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
8686
8687         else
8688             cat >> confdefs.h <<EOF
8689 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
8690 EOF
8691
8692         fi
8693         ;;
8694     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
8695         ;;
8696     esac
8697
8698     if test "x$gcc_cv_as_flags64" != xno; then
8699         echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8700 echo "configure:8690: checking for assembler offsetable %lo() support" >&5
8701 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8702   echo $ac_n "(cached) $ac_c" 1>&6
8703 else
8704   
8705             gcc_cv_as_offsetable_lo10=unknown
8706             if test "x$gcc_cv_as" != x; then
8707                 # Check if assembler has offsetable %lo()
8708                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8709                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8710                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
8711                         > /dev/null 2>&1 &&
8712                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
8713                         > /dev/null 2>&1; then
8714                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8715                         gcc_cv_as_offsetable_lo10=no
8716                     else
8717                         gcc_cv_as_offsetable_lo10=yes
8718                     fi
8719                 else
8720                     gcc_cv_as_offsetable_lo10=no
8721                 fi
8722                 rm -f conftest.s conftest.o conftest1.s conftest1.o
8723             fi
8724         
8725 fi
8726
8727 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8728         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8729             cat >> confdefs.h <<\EOF
8730 #define HAVE_AS_OFFSETABLE_LO10 1
8731 EOF
8732
8733         fi
8734     fi
8735     ;;
8736
8737   i[34567]86-*-*)
8738     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8739 echo "configure:8729: checking assembler instructions" >&5
8740     gcc_cv_as_instructions=
8741     if test x$gcc_cv_as != x; then
8742         set "filds fists" "filds mem; fists mem"
8743         while test $# -gt 0
8744         do
8745                 echo "$2" > conftest.s
8746                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8747                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8748                         cat >> confdefs.h <<EOF
8749 #define HAVE_GAS_`echo "$1" | tr 'a-z ' 'A-Z_'` 1
8750 EOF
8751
8752                 fi
8753                 shift 2
8754         done
8755         rm -f conftest.s conftest.o
8756     fi
8757     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8758     ;;
8759 esac
8760
8761 # Figure out what language subdirectories are present.
8762 # Look if the user specified --enable-languages="..."; if not, use
8763 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8764 # go away some day.
8765 if test x"${enable_languages+set}" != xset; then
8766         if test x"${LANGUAGES+set}" = xset; then
8767                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
8768         else
8769                 enable_languages=all
8770         fi
8771 fi
8772 subdirs=
8773 for lang in ${srcdir}/*/config-lang.in ..
8774 do
8775         case $lang in
8776         ..) ;;
8777         # The odd quoting in the next line works around
8778         # an apparent bug in bash 1.12 on linux.
8779         ${srcdir}/[*]/config-lang.in) ;;
8780         *)
8781           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
8782           if test "x$lang_alias" = x
8783           then
8784                 echo "$lang doesn't set \$language." 1>&2
8785                 exit 1
8786           fi
8787           if test x"${enable_languages}" = xall; then
8788                 add_this_lang=yes
8789           else
8790                 case "${enable_languages}" in
8791                     ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
8792                         add_this_lang=yes
8793                         ;;
8794                     * )
8795                         add_this_lang=no
8796                         ;;
8797                 esac
8798           fi
8799           if test x"${add_this_lang}" = xyes; then
8800                 case $lang in
8801                     ${srcdir}/ada/config-lang.in)
8802                         if test x$gnat = xyes ; then
8803                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8804                         fi
8805                         ;;
8806                     *)
8807                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8808                         ;;
8809                 esac
8810           fi
8811           ;;
8812         esac
8813 done
8814
8815 # Make gthr-default.h if we have a thread file.
8816 gthread_flags=
8817 if test $thread_file != single; then
8818     rm -f gthr-default.h
8819     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8820     gthread_flags=-DHAVE_GTHR_DEFAULT
8821 fi
8822
8823
8824 # Find out what GC implementation we want, or may, use.
8825 # Check whether --with-gc or --without-gc was given.
8826 if test "${with_gc+set}" = set; then
8827   withval="$with_gc"
8828   case "$withval" in
8829   simple | page)
8830     GGC=ggc-$withval
8831     ;;
8832   *)
8833     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8834     ;;
8835 esac
8836 else
8837   if test $ac_cv_func_mmap_fixed_mapped = yes; then
8838   GGC=ggc-page
8839 elif test $ac_cv_func_valloc = yes; then
8840   GGC=ggc-page
8841 else
8842   GGC=ggc-simple
8843 fi
8844 fi
8845
8846
8847 echo "Using $GGC for garbage collection."
8848
8849 # Make empty files to contain the specs and options for each language.
8850 # Then add #include lines to for a compiler that has specs and/or options.
8851
8852 lang_specs_files=
8853 lang_options_files=
8854 lang_tree_files=
8855 rm -f specs.h options.h gencheck.h
8856 touch specs.h options.h gencheck.h
8857 for subdir in . $subdirs
8858 do
8859         if test -f $srcdir/$subdir/lang-specs.h; then
8860                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
8861                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8862         fi
8863         if test -f $srcdir/$subdir/lang-options.h; then
8864                 echo "#include \"$subdir/lang-options.h\"" >>options.h
8865                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8866         fi
8867         if test -f $srcdir/$subdir/$subdir-tree.def; then
8868                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
8869                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8870         fi
8871 done
8872
8873 # These (without "all_") are set in each config-lang.in.
8874 # `language' must be a single word so is spelled singularly.
8875 all_languages=
8876 all_boot_languages=
8877 all_compilers=
8878 all_stagestuff=
8879 all_diff_excludes=
8880 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile'
8881 # List of language makefile fragments.
8882 all_lang_makefiles=
8883 all_headers=
8884 all_lib2funcs=
8885
8886 # Add the language fragments.
8887 # Languages are added via two mechanisms.  Some information must be
8888 # recorded in makefile variables, these are defined in config-lang.in.
8889 # We accumulate them and plug them into the main Makefile.
8890 # The other mechanism is a set of hooks for each of the main targets
8891 # like `clean', `install', etc.
8892
8893 language_fragments="Make-lang"
8894 language_hooks="Make-hooks"
8895 oldstyle_subdirs=
8896
8897 for s in .. $subdirs
8898 do
8899         if test $s != ".."
8900         then
8901                 language=
8902                 boot_language=
8903                 compilers=
8904                 stagestuff=
8905                 diff_excludes=
8906                 headers=
8907                 outputs=
8908                 lib2funcs=
8909                 . ${srcdir}/$s/config-lang.in
8910                 if test "x$language" = x
8911                 then
8912                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8913                         exit 1
8914                 fi
8915                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
8916                 all_languages="$all_languages $language"
8917                 if test "x$boot_language" = xyes
8918                 then
8919                         all_boot_languages="$all_boot_languages $language"
8920                 fi
8921                 all_compilers="$all_compilers $compilers"
8922                 all_stagestuff="$all_stagestuff $stagestuff"
8923                 all_diff_excludes="$all_diff_excludes $diff_excludes"
8924                 all_headers="$all_headers $headers"
8925                 all_outputs="$all_outputs $outputs"
8926                 if test x$outputs = x
8927                 then
8928                         oldstyle_subdirs="$oldstyle_subdirs $s"
8929                 fi
8930                 all_lib2funcs="$all_lib2funcs $lib2funcs"
8931         fi
8932 done
8933
8934 # Since we can't use `::' targets, we link each language in
8935 # with a set of hooks, reached indirectly via lang.${target}.
8936
8937 rm -f Make-hooks
8938 touch Make-hooks
8939 target_list="all.build all.cross start.encap rest.encap \
8940         info dvi \
8941         install-normal install-common install-info install-man \
8942         uninstall distdir \
8943         mostlyclean clean distclean extraclean maintainer-clean \
8944         stage1 stage2 stage3 stage4"
8945 for t in $target_list
8946 do
8947         x=
8948         for lang in .. $all_languages
8949         do
8950                 if test $lang != ".."; then
8951                         x="$x $lang.$t"
8952                 fi
8953         done
8954         echo "lang.$t: $x" >> Make-hooks
8955 done
8956
8957 # If we're not building in srcdir, create .gdbinit.
8958
8959 if test ! -f Makefile.in; then
8960         echo "dir ." > .gdbinit
8961         echo "dir ${srcdir}" >> .gdbinit
8962         if test x$gdb_needs_out_file_path = xyes
8963         then
8964                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8965         fi
8966         if test "x$subdirs" != x; then
8967                 for s in $subdirs
8968                 do
8969                         echo "dir ${srcdir}/$s" >> .gdbinit
8970                 done
8971         fi
8972         echo "source ${srcdir}/.gdbinit" >> .gdbinit
8973 fi
8974
8975 # Define variables host_canonical and build_canonical
8976 # because some Cygnus local changes in the Makefile depend on them.
8977 build_canonical=${build}
8978 host_canonical=${host}
8979 target_subdir=
8980 if test "${host}" != "${target}" ; then
8981     target_subdir=${target}/
8982 fi
8983
8984
8985
8986         
8987 # If this is using newlib, then define inhibit_libc in
8988 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
8989 # libgcc.a, but that's OK because newib should have its own version of
8990 # assert.h.
8991 inhibit_libc=
8992 if test x$with_newlib = xyes; then
8993         inhibit_libc=-Dinhibit_libc
8994 fi
8995
8996
8997 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8998 # absolute path for gcc_tooldir based on inserting the number of up-directory
8999 # movements required to get from $(exec_prefix) to $(prefix) into the basic
9000 # $(libsubdir)/@(unlibsubdir) based path.
9001 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
9002 # make and thus we'd get different behavior depending on where we built the
9003 # sources.
9004 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
9005     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
9006 else
9007 # An explanation of the sed strings:
9008 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
9009 #  -e 's|/$||'            match a trailing forward slash and eliminates it
9010 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
9011 #  -e 's|/[^/]*|../|g'    replaces each occurance of /<directory> with ../
9012 #
9013 # (*) Note this pattern overwrites the first character of the string
9014 # with a forward slash if one is not already present.  This is not a
9015 # problem because the exact names of the sub-directories concerned is
9016 # unimportant, just the number of them matters.
9017 #
9018 # The practical upshot of these patterns is like this:
9019 #
9020 #  prefix     exec_prefix        result
9021 #  ------     -----------        ------
9022 #   /foo        /foo/bar          ../
9023 #   /foo/       /foo/bar          ../
9024 #   /foo        /foo/bar/         ../
9025 #   /foo/       /foo/bar/         ../
9026 #   /foo        /foo/bar/ugg      ../../
9027 #
9028     dollar='$$'
9029     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
9030 fi
9031
9032
9033
9034 # Nothing to do for FLOAT_H, float_format already handled.
9035 objdir=`pwd`
9036
9037
9038 # Process the language and host/target makefile fragments.
9039 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9040
9041 # Substitute configuration variables
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
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 # Echo that links are built
9103 if test x$host = x$target
9104 then
9105         str1="native "
9106 else
9107         str1="cross-"
9108         str2=" from $host"
9109 fi
9110
9111 if test x$host != x$build
9112 then
9113         str3=" on a $build system"
9114 fi
9115
9116 if test "x$str2" != x || test "x$str3" != x
9117 then
9118         str4=
9119 fi
9120
9121 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9122
9123 if test "x$str2" != x || test "x$str3" != x
9124 then
9125         echo " ${str2}${str3}." 1>&2
9126 fi
9127
9128 # Truncate the target if necessary
9129 if test x$host_truncate_target != x; then
9130         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9131 fi
9132
9133 # Configure the subdirectories
9134 # AC_CONFIG_SUBDIRS($subdirs)
9135
9136 # Create the Makefile
9137 # and configure language subdirectories
9138 trap '' 1 2 15
9139 cat > confcache <<\EOF
9140 # This file is a shell script that caches the results of configure
9141 # tests run on this system so they can be shared between configure
9142 # scripts and configure runs.  It is not useful on other systems.
9143 # If it contains results you don't want to keep, you may remove or edit it.
9144 #
9145 # By default, configure uses ./config.cache as the cache file,
9146 # creating it if it does not exist already.  You can give configure
9147 # the --cache-file=FILE option to use a different cache file; that is
9148 # what configure does when it calls configure scripts in
9149 # subdirectories, so they share the cache.
9150 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9151 # config.status only pays attention to the cache file if you give it the
9152 # --recheck option to rerun configure.
9153 #
9154 EOF
9155 # The following way of writing the cache mishandles newlines in values,
9156 # but we know of no workaround that is simple, portable, and efficient.
9157 # So, don't put newlines in cache variables' values.
9158 # Ultrix sh set writes to stderr and can't be redirected directly,
9159 # and sets the high bit in the cache file unless we assign to the vars.
9160 (set) 2>&1 |
9161   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9162   *ac_space=\ *)
9163     # `set' does not quote correctly, so add quotes (double-quote substitution
9164     # turns \\\\ into \\, and sed turns \\ into \).
9165     sed -n \
9166       -e "s/'/'\\\\''/g" \
9167       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9168     ;;
9169   *)
9170     # `set' quotes correctly as required by POSIX, so do not add quotes.
9171     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9172     ;;
9173   esac >> confcache
9174 if cmp -s $cache_file confcache; then
9175   :
9176 else
9177   if test -w $cache_file; then
9178     echo "updating cache $cache_file"
9179     cat confcache > $cache_file
9180   else
9181     echo "not updating unwritable cache $cache_file"
9182   fi
9183 fi
9184 rm -f confcache
9185
9186 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9187
9188 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9189 # Let make expand exec_prefix.
9190 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9191
9192 # Any assignment to VPATH causes Sun make to only execute
9193 # the first set of double-colon rules, so remove it if not needed.
9194 # If there is a colon in the path, we need to keep it.
9195 if test "x$srcdir" = x.; then
9196   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9197 fi
9198
9199 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9200
9201 DEFS=-DHAVE_CONFIG_H
9202
9203 # Without the "./", some shells look in PATH for config.status.
9204 : ${CONFIG_STATUS=./config.status}
9205
9206 echo creating $CONFIG_STATUS
9207 rm -f $CONFIG_STATUS
9208 cat > $CONFIG_STATUS <<EOF
9209 #! /bin/sh
9210 # Generated automatically by configure.
9211 # Run this file to recreate the current configuration.
9212 # This directory was configured as follows,
9213 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9214 #
9215 # $0 $ac_configure_args
9216 #
9217 # Compiler output produced by configure, useful for debugging
9218 # configure, is in ./config.log if it exists.
9219
9220 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9221 for ac_option
9222 do
9223   case "\$ac_option" in
9224   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9225     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9226     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9227   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9228     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9229     exit 0 ;;
9230   -help | --help | --hel | --he | --h)
9231     echo "\$ac_cs_usage"; exit 0 ;;
9232   *) echo "\$ac_cs_usage"; exit 1 ;;
9233   esac
9234 done
9235
9236 ac_given_srcdir=$srcdir
9237
9238 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9239 EOF
9240 cat >> $CONFIG_STATUS <<EOF
9241
9242 # Protect against being on the right side of a sed subst in config.status.
9243 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9244  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9245 $ac_vpsub
9246 $extrasub
9247 s%@SHELL@%$SHELL%g
9248 s%@CFLAGS@%$CFLAGS%g
9249 s%@CPPFLAGS@%$CPPFLAGS%g
9250 s%@CXXFLAGS@%$CXXFLAGS%g
9251 s%@FFLAGS@%$FFLAGS%g
9252 s%@DEFS@%$DEFS%g
9253 s%@LDFLAGS@%$LDFLAGS%g
9254 s%@LIBS@%$LIBS%g
9255 s%@exec_prefix@%$exec_prefix%g
9256 s%@prefix@%$prefix%g
9257 s%@program_transform_name@%$program_transform_name%g
9258 s%@bindir@%$bindir%g
9259 s%@sbindir@%$sbindir%g
9260 s%@libexecdir@%$libexecdir%g
9261 s%@datadir@%$datadir%g
9262 s%@sysconfdir@%$sysconfdir%g
9263 s%@sharedstatedir@%$sharedstatedir%g
9264 s%@localstatedir@%$localstatedir%g
9265 s%@libdir@%$libdir%g
9266 s%@includedir@%$includedir%g
9267 s%@oldincludedir@%$oldincludedir%g
9268 s%@infodir@%$infodir%g
9269 s%@mandir@%$mandir%g
9270 s%@host@%$host%g
9271 s%@host_alias@%$host_alias%g
9272 s%@host_cpu@%$host_cpu%g
9273 s%@host_vendor@%$host_vendor%g
9274 s%@host_os@%$host_os%g
9275 s%@target@%$target%g
9276 s%@target_alias@%$target_alias%g
9277 s%@target_cpu@%$target_cpu%g
9278 s%@target_vendor@%$target_vendor%g
9279 s%@target_os@%$target_os%g
9280 s%@build@%$build%g
9281 s%@build_alias@%$build_alias%g
9282 s%@build_cpu@%$build_cpu%g
9283 s%@build_vendor@%$build_vendor%g
9284 s%@build_os@%$build_os%g
9285 s%@CC@%$CC%g
9286 s%@stage1_warn_cflags@%$stage1_warn_cflags%g
9287 s%@SET_MAKE@%$SET_MAKE%g
9288 s%@AWK@%$AWK%g
9289 s%@LEX@%$LEX%g
9290 s%@LEXLIB@%$LEXLIB%g
9291 s%@LN@%$LN%g
9292 s%@LN_S@%$LN_S%g
9293 s%@RANLIB@%$RANLIB%g
9294 s%@YACC@%$YACC%g
9295 s%@INSTALL@%$INSTALL%g
9296 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9297 s%@INSTALL_DATA@%$INSTALL_DATA%g
9298 s%@CPP@%$CPP%g
9299 s%@gnat@%$gnat%g
9300 s%@vfprintf@%$vfprintf%g
9301 s%@doprint@%$doprint%g
9302 s%@manext@%$manext%g
9303 s%@objext@%$objext%g
9304 s%@PACKAGE@%$PACKAGE%g
9305 s%@VERSION@%$VERSION%g
9306 s%@ALLOCA@%$ALLOCA%g
9307 s%@USE_NLS@%$USE_NLS%g
9308 s%@MSGFMT@%$MSGFMT%g
9309 s%@GMSGFMT@%$GMSGFMT%g
9310 s%@XGETTEXT@%$XGETTEXT%g
9311 s%@GENCAT@%$GENCAT%g
9312 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9313 s%@CATALOGS@%$CATALOGS%g
9314 s%@CATOBJEXT@%$CATOBJEXT%g
9315 s%@DATADIRNAME@%$DATADIRNAME%g
9316 s%@GMOFILES@%$GMOFILES%g
9317 s%@INSTOBJEXT@%$INSTOBJEXT%g
9318 s%@INTLDEPS@%$INTLDEPS%g
9319 s%@INTLLIBS@%$INTLLIBS%g
9320 s%@INTLOBJS@%$INTLOBJS%g
9321 s%@POFILES@%$POFILES%g
9322 s%@POSUB@%$POSUB%g
9323 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
9324 s%@GT_NO@%$GT_NO%g
9325 s%@GT_YES@%$GT_YES%g
9326 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9327 s%@l@%$l%g
9328 s%@gthread_flags@%$gthread_flags%g
9329 s%@GGC@%$GGC%g
9330 s%@build_canonical@%$build_canonical%g
9331 s%@host_canonical@%$host_canonical%g
9332 s%@target_subdir@%$target_subdir%g
9333 s%@inhibit_libc@%$inhibit_libc%g
9334 s%@gcc_tooldir@%$gcc_tooldir%g
9335 s%@dollar@%$dollar%g
9336 s%@objdir@%$objdir%g
9337 s%@subdirs@%$subdirs%g
9338 s%@all_boot_languages@%$all_boot_languages%g
9339 s%@all_compilers@%$all_compilers%g
9340 s%@all_diff_excludes@%$all_diff_excludes%g
9341 s%@all_headers@%$all_headers%g
9342 s%@all_lang_makefiles@%$all_lang_makefiles%g
9343 s%@all_languages@%$all_languages%g
9344 s%@all_lib2funcs@%$all_lib2funcs%g
9345 s%@all_stagestuff@%$all_stagestuff%g
9346 s%@build_exeext@%$build_exeext%g
9347 s%@build_install_headers_dir@%$build_install_headers_dir%g
9348 s%@build_xm_file_list@%$build_xm_file_list%g
9349 s%@cc_set_by_configure@%$cc_set_by_configure%g
9350 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9351 s%@cpp_install_dir@%$cpp_install_dir%g
9352 s%@cpp_main@%$cpp_main%g
9353 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9354 s%@dep_tmake_file@%$dep_tmake_file%g
9355 s%@extra_c_flags@%$extra_c_flags%g
9356 s%@extra_c_objs@%$extra_c_objs%g
9357 s%@extra_cpp_objs@%$extra_cpp_objs%g
9358 s%@extra_cxx_objs@%$extra_cxx_objs%g
9359 s%@extra_headers_list@%$extra_headers_list%g
9360 s%@extra_objs@%$extra_objs%g
9361 s%@extra_parts@%$extra_parts%g
9362 s%@extra_passes@%$extra_passes%g
9363 s%@extra_programs@%$extra_programs%g
9364 s%@fixinc_defs@%$fixinc_defs%g
9365 s%@float_h_file@%$float_h_file%g
9366 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9367 s%@gcc_version@%$gcc_version%g
9368 s%@gcc_version_trigger@%$gcc_version_trigger%g
9369 s%@host_exeext@%$host_exeext%g
9370 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9371 s%@host_xm_file_list@%$host_xm_file_list%g
9372 s%@install@%$install%g
9373 s%@lang_options_files@%$lang_options_files%g
9374 s%@lang_specs_files@%$lang_specs_files%g
9375 s%@lang_tree_files@%$lang_tree_files%g
9376 s%@local_prefix@%$local_prefix%g
9377 s%@maybe_use_collect2@%$maybe_use_collect2%g
9378 s%@md_file@%$md_file%g
9379 s%@objc_boehm_gc@%$objc_boehm_gc%g
9380 s%@out_file@%$out_file%g
9381 s%@out_object_file@%$out_object_file%g
9382 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9383 s%@symbolic_link@%$symbolic_link%g
9384 s%@thread_file@%$thread_file%g
9385 s%@tm_file_list@%$tm_file_list%g
9386 s%@will_use_collect2@%$will_use_collect2%g
9387 /@target_overrides@/r $target_overrides
9388 s%@target_overrides@%%g
9389 /@host_overrides@/r $host_overrides
9390 s%@host_overrides@%%g
9391 s%@cross_defines@%$cross_defines%g
9392 /@cross_overrides@/r $cross_overrides
9393 s%@cross_overrides@%%g
9394 /@build_overrides@/r $build_overrides
9395 s%@build_overrides@%%g
9396 /@language_fragments@/r $language_fragments
9397 s%@language_fragments@%%g
9398 /@language_hooks@/r $language_hooks
9399 s%@language_hooks@%%g
9400
9401 CEOF
9402 EOF
9403
9404 cat >> $CONFIG_STATUS <<\EOF
9405
9406 # Split the substitutions into bite-sized pieces for seds with
9407 # small command number limits, like on Digital OSF/1 and HP-UX.
9408 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9409 ac_file=1 # Number of current file.
9410 ac_beg=1 # First line for current file.
9411 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9412 ac_more_lines=:
9413 ac_sed_cmds=""
9414 while $ac_more_lines; do
9415   if test $ac_beg -gt 1; then
9416     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9417   else
9418     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9419   fi
9420   if test ! -s conftest.s$ac_file; then
9421     ac_more_lines=false
9422     rm -f conftest.s$ac_file
9423   else
9424     if test -z "$ac_sed_cmds"; then
9425       ac_sed_cmds="sed -f conftest.s$ac_file"
9426     else
9427       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9428     fi
9429     ac_file=`expr $ac_file + 1`
9430     ac_beg=$ac_end
9431     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9432   fi
9433 done
9434 if test -z "$ac_sed_cmds"; then
9435   ac_sed_cmds=cat
9436 fi
9437 EOF
9438
9439 cat >> $CONFIG_STATUS <<EOF
9440
9441 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9442 EOF
9443 cat >> $CONFIG_STATUS <<\EOF
9444 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9445   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9446   case "$ac_file" in
9447   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9448        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9449   *) ac_file_in="${ac_file}.in" ;;
9450   esac
9451
9452   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9453
9454   # Remove last slash and all that follows it.  Not all systems have dirname.
9455   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9456   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9457     # The file is in a subdirectory.
9458     test ! -d "$ac_dir" && mkdir "$ac_dir"
9459     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9460     # A "../" for each directory in $ac_dir_suffix.
9461     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9462   else
9463     ac_dir_suffix= ac_dots=
9464   fi
9465
9466   case "$ac_given_srcdir" in
9467   .)  srcdir=.
9468       if test -z "$ac_dots"; then top_srcdir=.
9469       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9470   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9471   *) # Relative path.
9472     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9473     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9474   esac
9475
9476
9477   echo creating "$ac_file"
9478   rm -f "$ac_file"
9479   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9480   case "$ac_file" in
9481   *Makefile*) ac_comsub="1i\\
9482 # $configure_input" ;;
9483   *) ac_comsub= ;;
9484   esac
9485
9486   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9487   sed -e "$ac_comsub
9488 s%@configure_input@%$configure_input%g
9489 s%@srcdir@%$srcdir%g
9490 s%@top_srcdir@%$top_srcdir%g
9491 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9492 fi; done
9493 rm -f conftest.s*
9494
9495 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9496 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9497 #
9498 # ac_d sets the value in "#define NAME VALUE" lines.
9499 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9500 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9501 ac_dC='\3'
9502 ac_dD='%g'
9503 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9504 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9505 ac_uB='\([      ]\)%\1#\2define\3'
9506 ac_uC=' '
9507 ac_uD='\4%g'
9508 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9509 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9510 ac_eB='$%\1#\2define\3'
9511 ac_eC=' '
9512 ac_eD='%g'
9513
9514 if test "${CONFIG_HEADERS+set}" != set; then
9515 EOF
9516 cat >> $CONFIG_STATUS <<EOF
9517   CONFIG_HEADERS="auto-host.h:config.in"
9518 EOF
9519 cat >> $CONFIG_STATUS <<\EOF
9520 fi
9521 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9522   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9523   case "$ac_file" in
9524   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9525        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9526   *) ac_file_in="${ac_file}.in" ;;
9527   esac
9528
9529   echo creating $ac_file
9530
9531   rm -f conftest.frag conftest.in conftest.out
9532   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9533   cat $ac_file_inputs > conftest.in
9534
9535 EOF
9536
9537 # Transform confdefs.h into a sed script conftest.vals that substitutes
9538 # the proper values into config.h.in to produce config.h.  And first:
9539 # Protect against being on the right side of a sed subst in config.status.
9540 # Protect against being in an unquoted here document in config.status.
9541 rm -f conftest.vals
9542 cat > conftest.hdr <<\EOF
9543 s/[\\&%]/\\&/g
9544 s%[\\$`]%\\&%g
9545 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9546 s%ac_d%ac_u%gp
9547 s%ac_u%ac_e%gp
9548 EOF
9549 sed -n -f conftest.hdr confdefs.h > conftest.vals
9550 rm -f conftest.hdr
9551
9552 # This sed command replaces #undef with comments.  This is necessary, for
9553 # example, in the case of _POSIX_SOURCE, which is predefined and required
9554 # on some systems where configure will not decide to define it.
9555 cat >> conftest.vals <<\EOF
9556 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9557 EOF
9558
9559 # Break up conftest.vals because some shells have a limit on
9560 # the size of here documents, and old seds have small limits too.
9561
9562 rm -f conftest.tail
9563 while :
9564 do
9565   ac_lines=`grep -c . conftest.vals`
9566   # grep -c gives empty output for an empty file on some AIX systems.
9567   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9568   # Write a limited-size here document to conftest.frag.
9569   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9570   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9571   echo 'CEOF
9572   sed -f conftest.frag conftest.in > conftest.out
9573   rm -f conftest.in
9574   mv conftest.out conftest.in
9575 ' >> $CONFIG_STATUS
9576   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9577   rm -f conftest.vals
9578   mv conftest.tail conftest.vals
9579 done
9580 rm -f conftest.vals
9581
9582 cat >> $CONFIG_STATUS <<\EOF
9583   rm -f conftest.frag conftest.h
9584   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9585   cat conftest.in >> conftest.h
9586   rm -f conftest.in
9587   if cmp -s $ac_file conftest.h 2>/dev/null; then
9588     echo "$ac_file is unchanged"
9589     rm -f conftest.h
9590   else
9591     # Remove last slash and all that follows it.  Not all systems have dirname.
9592       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9593       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9594       # The file is in a subdirectory.
9595       test ! -d "$ac_dir" && mkdir "$ac_dir"
9596     fi
9597     rm -f $ac_file
9598     mv conftest.h $ac_file
9599   fi
9600 fi; done
9601
9602 EOF
9603
9604 cat >> $CONFIG_STATUS <<EOF
9605 ac_sources="$nls_cv_header_libgt"
9606 ac_dests="$nls_cv_header_intl"
9607 EOF
9608
9609 cat >> $CONFIG_STATUS <<\EOF
9610 srcdir=$ac_given_srcdir
9611 while test -n "$ac_sources"; do
9612   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9613   set $ac_sources; ac_source=$1; shift; ac_sources=$*
9614
9615   echo "linking $srcdir/$ac_source to $ac_dest"
9616
9617   if test ! -r $srcdir/$ac_source; then
9618     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9619   fi
9620   rm -f $ac_dest
9621
9622   # Make relative symlinks.
9623   # Remove last slash and all that follows it.  Not all systems have dirname.
9624   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9625   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9626     # The dest file is in a subdirectory.
9627     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9628     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9629     # A "../" for each directory in $ac_dest_dir_suffix.
9630     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9631   else
9632     ac_dest_dir_suffix= ac_dots=
9633   fi
9634
9635   case "$srcdir" in
9636   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9637   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9638   esac
9639
9640   # Make a symlink if possible; otherwise try a hard link.
9641   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9642     ln $srcdir/$ac_source $ac_dest; then :
9643   else
9644     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9645   fi
9646 done
9647 EOF
9648 cat >> $CONFIG_STATUS <<EOF
9649
9650
9651 host='${host}'
9652 build='${build}'
9653 target='${target}'
9654 target_alias='${target_alias}'
9655 srcdir='${srcdir}'
9656 subdirs='${subdirs}'
9657 oldstyle_subdirs='${oldstyle_subdirs}'
9658 symbolic_link='${symbolic_link}'
9659 program_transform_set='${program_transform_set}'
9660 program_transform_name='${program_transform_name}'
9661 dep_host_xmake_file='${dep_host_xmake_file}'
9662 host_xmake_file='${host_xmake_file}'
9663 dep_tmake_file='${dep_tmake_file}'
9664 tmake_file='${tmake_file}'
9665 thread_file='${thread_file}'
9666 gcc_version='${gcc_version}'
9667 gcc_version_trigger='${gcc_version_trigger}'
9668 local_prefix='${local_prefix}'
9669 build_install_headers_dir='${build_install_headers_dir}'
9670 build_exeext='${build_exeext}'
9671 host_exeext='${host_exeext}'
9672 out_file='${out_file}'
9673 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
9674 SET_MAKE='${SET_MAKE}'
9675 target_list='${target_list}'
9676 target_overrides='${target_overrides}'
9677 host_overrides='${host_overrides}'
9678 cross_defines='${cross_defines}'
9679 cross_overrides='${cross_overrides}'
9680 build_overrides='${build_overrides}'
9681 cpp_install_dir='${cpp_install_dir}'
9682
9683 EOF
9684 cat >> $CONFIG_STATUS <<\EOF
9685 case "$CONFIG_FILES" in *po/Makefile.in*)
9686         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
9687       esac
9688
9689 . $srcdir/configure.lang
9690 case x$CONFIG_HEADERS in
9691 xauto-host.h:config.in)
9692 echo > cstamp-h ;;
9693 esac
9694 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9695 # bootstrapping and the installation procedure can still use
9696 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
9697 # FLAGS_TO_PASS has been modified to solve the problem there.
9698 # This is virtually a duplicate of what happens in configure.lang; we do
9699 # an extra check to make sure this only happens if ln -s can be used.
9700 if test "$symbolic_link" = "ln -s"; then
9701  for d in .. ${subdirs} ; do
9702    if test $d != ..; then
9703         STARTDIR=`pwd`
9704         cd $d
9705         for t in stage1 stage2 stage3 stage4 include
9706         do
9707                 rm -f $t
9708                 $symbolic_link ../$t $t 2>/dev/null
9709         done
9710         cd $STARTDIR
9711    fi
9712  done
9713 else true ; fi
9714 # Avoid having to add intl to our include paths.
9715 if test -f intl/libintl.h; then
9716   echo creating libintl.h
9717   echo '#include "intl/libintl.h"' >libintl.h
9718 fi
9719
9720 exit 0
9721 EOF
9722 chmod +x $CONFIG_STATUS
9723 rm -fr confdefs* $ac_clean_files
9724 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9725