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