OSDN Git Service

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