OSDN Git Service

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