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