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