OSDN Git Service

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