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