OSDN Git Service

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