OSDN Git Service

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