]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
rs6000.c (input_operand): Don't expect CONST around CONSTANT_P_RTX.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
861bb6c1
JL
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
d062c304 4# Generated automatically using autoconf version 2.12.1
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
MM
31ac_help="$ac_help
32 --enable-checking enable expensive run-time checks."
861bb6c1 33ac_help="$ac_help
f81a440f 34 --enable-cpplib use cpplib for the C preprocessor."
0b9d02c6 35ac_help="$ac_help
f81a440f
ZW
36 --enable-c-cpplib link cpplib directly into C and C++ compilers
37 (implies --enable-cpplib)."
9101297d 38ac_help="$ac_help
f81a440f
ZW
39 --enable-c-mbchar enable multibyte characters for C and C++."
40ac_help="$ac_help
41 --enable-haifa use the experimental scheduler.
42 --disable-haifa don't use the experimental scheduler for the
9101297d 43 targets which normally enable it."
4b104d6e 44ac_help="$ac_help
94878f15 45 --with-fast-fixincludes use a faster fixinclude program (experimental)"
2ce3c6c6 46ac_help="$ac_help
f81a440f 47 --enable-init-priority use attributes to assign initialization order
2ce3c6c6 48 for static objects.
f81a440f 49 --disable-init-priority conform to ISO C++ rules for ordering static objects
2ce3c6c6 50 (i.e. initialized in order of declaration). "
861bb6c1
JL
51ac_help="$ac_help
52 --enable-threads enable thread usage for target GCC.
53 --enable-threads=LIB use LIB thread package for target GCC."
d8bb17c8
OP
54ac_help="$ac_help
55 --enable-objc-gc enable the use of Boehm's garbage collector with
56 the GNU Objective-C runtime."
df37e3db
TT
57ac_help="$ac_help
58 --enable-java-gc=TYPE choose garbage collector [boehm]"
90e6a802
RL
59ac_help="$ac_help
60 --enable-dwarf2 enable DWARF2 debugging as default."
861bb6c1
JL
61
62# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
66cache_file=./config.cache
67exec_prefix=NONE
68host=NONE
69no_create=
70nonopt=NONE
71no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
76silent=
77site=
78srcdir=
79target=NONE
80verbose=
81x_includes=NONE
82x_libraries=NONE
83bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
95
96# Initialize some other variables.
97subdirs=
98MFLAGS= MAKEFLAGS=
6f144c9c 99SHELL=${CONFIG_SHELL-/bin/sh}
861bb6c1
JL
100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
102
103ac_prev=
104for ac_option
105do
106
107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
112 fi
113
114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
121 case "$ac_option" in
122
123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
129 ac_prev=build ;;
130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
131 build="$ac_optarg" ;;
132
133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
139
140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
145
146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
148 # Reject names that are not valid shell variable names.
149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
157 # Reject names that are not valid shell variable names.
158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
176
177 -gas | --gas | --ga | --g)
178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
180
181 -help | --help | --hel | --he)
182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
184 cat << EOF
185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
197 [same as prefix]
198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
230EOF
231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
279 -nfp | --nfp | --nf)
280 # Obsolete; use --without-fp.
281 with_fp=no ;;
282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
290
291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
366
367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
373
374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
d062c304 383 echo "configure generated by autoconf version 2.12.1"
861bb6c1
JL
384 exit 0 ;;
385
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
388 # Reject names that are not valid shell variable names.
389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
401 # Reject names that are not valid shell variable names.
402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
425
426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
427 ;;
428
429 *)
430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
431 echo "configure: warning: $ac_option: invalid host type" 1>&2
432 fi
433 if test "x$nonopt" != xNONE; then
434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
435 fi
436 nonopt="$ac_option"
437 ;;
438
439 esac
440done
441
442if test -n "$ac_prev"; then
443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
444fi
445
446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
447
448# File descriptor usage:
449# 0 standard input
450# 1 file creation
451# 2 errors and warnings
452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
457 exec 6>/dev/null
458else
459 exec 6>&1
460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
472do
473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
481 esac
482done
483
484# NLS nuisances.
485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
493
494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
498
499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
501ac_unique_file=tree.c
502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
505 ac_srcdir_defaulted=yes
506 # Try the directory containing this script, then its parent.
507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
512 srcdir=..
513 fi
514else
515 ac_srcdir_defaulted=no
516fi
517if test ! -r $srcdir/$ac_unique_file; then
518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
520 else
521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
522 fi
523fi
524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
543 . $cache_file
544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
549ac_ext=c
550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
551ac_cpp='$CPP $CPPFLAGS'
552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
d062c304 553ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
861bb6c1
JL
554cross_compiling=$ac_cv_prog_cc_cross
555
556if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
557 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
558 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
559 ac_n= ac_c='
560' ac_t=' '
561 else
562 ac_n=-n ac_c= ac_t=
563 fi
564else
565 ac_n= ac_c='\c' ac_t=
566fi
567
568
569
570
861bb6c1
JL
571remove=rm
572hard_link=ln
573symbolic_link='ln -s'
574copy=cp
575
75a39864
JL
576# Check for bogus environment variables.
577# Test if LIBRARY_PATH contains the notation for the current directory
578# since this would lead to problems installing/building glibc.
579# LIBRARY_PATH contains the current directory if one of the following
580# is true:
581# - one of the terminals (":" and ";") is the first or last sign
582# - two terminals occur directly after each other
583# - the path contains an element with a dot in it
584echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
d062c304 585echo "configure:586: checking LIBRARY_PATH variable" >&5
75a39864
JL
586case ${LIBRARY_PATH} in
587 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
588 library_path_setting="contains current directory"
589 ;;
590 *)
591 library_path_setting="ok"
592 ;;
593esac
594echo "$ac_t""$library_path_setting" 1>&6
595if test "$library_path_setting" != "ok"; then
596{ echo "configure: error:
597*** LIBRARY_PATH shouldn't contain the current directory when
598*** building egcs. Please change the environment variable
599*** and run configure again." 1>&2; exit 1; }
600fi
601
602# Test if GCC_EXEC_PREFIX contains the notation for the current directory
603# since this would lead to problems installing/building glibc.
604# GCC_EXEC_PREFIX contains the current directory if one of the following
605# is true:
606# - one of the terminals (":" and ";") is the first or last sign
607# - two terminals occur directly after each other
608# - the path contains an element with a dot in it
609echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
d062c304 610echo "configure:611: checking GCC_EXEC_PREFIX variable" >&5
75a39864
JL
611case ${GCC_EXEC_PREFIX} in
612 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
613 gcc_exec_prefix_setting="contains current directory"
614 ;;
615 *)
616 gcc_exec_prefix_setting="ok"
617 ;;
618esac
619echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
620if test "$gcc_exec_prefix_setting" != "ok"; then
621{ echo "configure: error:
622*** GCC_EXEC_PREFIX shouldn't contain the current directory when
623*** building egcs. Please change the environment variable
624*** and run configure again." 1>&2; exit 1; }
625fi
626
861bb6c1
JL
627# Check for additional parameters
628
629# With GNU ld
630# Check whether --with-gnu-ld or --without-gnu-ld was given.
631if test "${with_gnu_ld+set}" = set; then
632 withval="$with_gnu_ld"
df6faf79 633 gnu_ld_flag="$with_gnu_ld"
861bb6c1 634else
df6faf79 635 gnu_ld_flag=no
861bb6c1
JL
636fi
637
638
ab339d62
AO
639# With pre-defined ld
640# Check whether --with-ld or --without-ld was given.
641if test "${with_ld+set}" = set; then
642 withval="$with_ld"
3ccc3a56 643 DEFAULT_LINKER="$with_ld"
ab339d62
AO
644fi
645
3ccc3a56
AO
646if test x"${DEFAULT_LINKER+set}" = x"set"; then
647 if test ! -x "$DEFAULT_LINKER"; then
648 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
649 elif test "GNU" = `$DEFAULT_LINKER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
ab339d62
AO
650 gnu_ld_flag=yes
651 fi
652 cat >> confdefs.h <<EOF
3ccc3a56 653#define DEFAULT_LINKER "$DEFAULT_LINKER"
ab339d62
AO
654EOF
655
656fi
657
861bb6c1
JL
658# With GNU as
659# Check whether --with-gnu-as or --without-gnu-as was given.
660if test "${with_gnu_as+set}" = set; then
661 withval="$with_gnu_as"
df6faf79 662 gas_flag="$with_gnu_as"
861bb6c1 663else
df6faf79 664 gas_flag=no
861bb6c1
JL
665fi
666
667
ab339d62
AO
668# Check whether --with-as or --without-as was given.
669if test "${with_as+set}" = set; then
670 withval="$with_as"
3ccc3a56 671 DEFAULT_ASSEMBLER="$with_as"
ab339d62
AO
672fi
673
3ccc3a56
AO
674if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
675 if test ! -x "$DEFAULT_ASSEMBLER"; then
676 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
677 elif test "GNU" = `$DEFAULT_ASSEMBLER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
ab339d62
AO
678 gas_flag=yes
679 fi
680 cat >> confdefs.h <<EOF
3ccc3a56 681#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ab339d62
AO
682EOF
683
3ccc3a56 684fi
ab339d62 685
861bb6c1
JL
686# With stabs
687# Check whether --with-stabs or --without-stabs was given.
688if test "${with_stabs+set}" = set; then
689 withval="$with_stabs"
535b86ce 690 stabs="$with_stabs"
861bb6c1
JL
691else
692 stabs=no
693fi
694
695
696# With ELF
697# Check whether --with-elf or --without-elf was given.
698if test "${with_elf+set}" = set; then
699 withval="$with_elf"
535b86ce 700 elf="$with_elf"
861bb6c1
JL
701else
702 elf=no
703fi
704
705
706# Specify the local prefix
4e88d51b 707local_prefix=
861bb6c1
JL
708# Check whether --with-local-prefix or --without-local-prefix was given.
709if test "${with_local_prefix+set}" = set; then
710 withval="$with_local_prefix"
4e88d51b
JM
711 case "${withval}" in
712yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
713no) ;;
714*) local_prefix=$with_local_prefix ;;
715esac
861bb6c1
JL
716fi
717
718
719# Default local prefix if it is empty
75bffa71 720if test x$local_prefix = x; then
861bb6c1
JL
721 local_prefix=/usr/local
722fi
723
4e88d51b 724gxx_include_dir=
861bb6c1
JL
725# Specify the g++ header file directory
726# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
727if test "${with_gxx_include_dir+set}" = set; then
728 withval="$with_gxx_include_dir"
4e88d51b
JM
729 case "${withval}" in
730yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
731no) ;;
732*) gxx_include_dir=$with_gxx_include_dir ;;
733esac
861bb6c1
JL
734fi
735
736
4e88d51b
JM
737if test x${gxx_include_dir} = x; then
738 if test x${enable_version_specific_runtime_libs} = xyes; then
739 gxx_include_dir='${libsubdir}/include/g++'
740 else
a270b446 741 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
de82584d 742 gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
4e88d51b
JM
743 fi
744fi
745
a494747c
MM
746# Enable expensive internal checks
747# Check whether --enable-checking or --disable-checking was given.
748if test "${enable_checking+set}" = set; then
749 enableval="$enable_checking"
4e88d51b
JM
750 case "${enableval}" in
751yes) cat >> confdefs.h <<\EOF
a494747c
MM
752#define ENABLE_CHECKING 1
753EOF
4e88d51b
JM
754 ;;
755no) ;;
756*) { echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;;
757esac
a494747c
MM
758fi
759
760
f81a440f 761# Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
e061d1ce 762cpp_main=cccp
f81a440f
ZW
763# Check whether --enable-cpplib or --disable-cpplib was given.
764if test "${enable_cpplib+set}" = set; then
765 enableval="$enable_cpplib"
766 if test x$enable_cpplib != xno; then
767 cpp_main=cppmain
768fi
769fi
770
771
772# Link cpplib into the compiler proper, for C/C++/ObjC.
861bb6c1
JL
773# Check whether --enable-c-cpplib or --disable-c-cpplib was given.
774if test "${enable_c_cpplib+set}" = set; then
775 enableval="$enable_c_cpplib"
75bffa71 776 if test x$enable_c_cpplib != xno; then
19283265
RH
777 extra_c_objs="${extra_c_objs} libcpp.a"
778 extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
861bb6c1 779 extra_c_flags=-DUSE_CPPLIB=1
e061d1ce 780 cpp_main=cppmain
861bb6c1
JL
781fi
782fi
783
f81a440f 784
0b9d02c6
JL
785# Enable Multibyte Characters for C/C++
786# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
787if test "${enable_c_mbchar+set}" = set; then
788 enableval="$enable_c_mbchar"
75bffa71 789 if test x$enable_c_mbchar != xno; then
0b9d02c6
JL
790 extra_c_flags=-DMULTIBYTE_CHARS=1
791fi
792fi
793
794
9101297d
DL
795# Enable Haifa scheduler.
796# Check whether --enable-haifa or --disable-haifa was given.
797if test "${enable_haifa+set}" = set; then
798 enableval="$enable_haifa"
799 :
800fi
801
4b104d6e
JL
802# Fast fixincludes
803#
804# This is a work in progress...
34a4c466
JL
805# Check whether --with-fast-fixincludes or --without-fast-fixincludes was given.
806if test "${with_fast_fixincludes+set}" = set; then
807 withval="$with_fast_fixincludes"
808 fast_fixinc="$with_fast_fixincludes"
809else
4b104d6e
JL
810 fast_fixinc=no
811fi
812
861bb6c1 813
2ce3c6c6
JM
814# Enable init_priority.
815# Check whether --enable-init-priority or --disable-init-priority was given.
816if test "${enable_init_priority+set}" = set; then
817 enableval="$enable_init_priority"
75bffa71 818 if test x$enable_init_priority != xno; then
2ce3c6c6
JM
819 extra_c_flags=-DUSE_INIT_PRIORITY
820fi
821fi
822
823
861bb6c1
JL
824# Enable threads
825# Pass with no value to take the default
826# Pass with a value to specify a thread package
827# Check whether --enable-threads or --disable-threads was given.
828if test "${enable_threads+set}" = set; then
829 enableval="$enable_threads"
75bffa71 830 if test x$enable_threads = xno; then
861bb6c1
JL
831 enable_threads=''
832fi
833else
834 enable_threads=''
835fi
836
837
e445171e 838enable_threads_flag=$enable_threads
861bb6c1 839# Check if a valid thread package
e445171e 840case x${enable_threads_flag} in
861bb6c1
JL
841 x | xno)
842 # No threads
a851212a 843 target_thread_file='single'
861bb6c1
JL
844 ;;
845 xyes)
846 # default
a851212a 847 target_thread_file=''
861bb6c1
JL
848 ;;
849 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
7cc34889 850 xsolaris | xwin32 | xdce | xvxworks)
e445171e 851 target_thread_file=$enable_threads_flag
861bb6c1
JL
852 ;;
853 *)
854 echo "$enable_threads is an unknown thread package" 1>&2
855 exit 1
856 ;;
857esac
858
d8bb17c8
OP
859# Check whether --enable-objc-gc or --disable-objc-gc was given.
860if test "${enable_objc_gc+set}" = set; then
861 enableval="$enable_objc_gc"
862 if [ x$enable_objc_gc = xno ]; then
863 objc_boehm_gc=''
864else
865 objc_boehm_gc=1
866fi
867else
868 objc_boehm_gc=''
869fi
870
871
df37e3db
TT
872# Check whether --enable-java-gc or --disable-java-gc was given.
873if test "${enable_java_gc+set}" = set; then
874 enableval="$enable_java_gc"
875
876 JAVAGC=$enableval
877else
878 JAVAGC=boehm
879fi
880
881
90e6a802
RL
882# Check whether --with-dwarf2 or --without-dwarf2 was given.
883if test "${with_dwarf2+set}" = set; then
884 withval="$with_dwarf2"
885 dwarf2="$with_dwarf2"
886else
887 dwarf2=no
888fi
889
890
861bb6c1
JL
891# Determine the host, build, and target systems
892ac_aux_dir=
893for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
894 if test -f $ac_dir/install-sh; then
895 ac_aux_dir=$ac_dir
896 ac_install_sh="$ac_aux_dir/install-sh -c"
897 break
898 elif test -f $ac_dir/install.sh; then
899 ac_aux_dir=$ac_dir
900 ac_install_sh="$ac_aux_dir/install.sh -c"
901 break
902 fi
903done
904if test -z "$ac_aux_dir"; then
905 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
906fi
907ac_config_guess=$ac_aux_dir/config.guess
908ac_config_sub=$ac_aux_dir/config.sub
909ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
910
911
912# Do some error checking and defaulting for the host and target type.
913# The inputs are:
914# configure --host=HOST --target=TARGET --build=BUILD NONOPT
915#
916# The rules are:
917# 1. You are not allowed to specify --host, --target, and nonopt at the
918# same time.
919# 2. Host defaults to nonopt.
920# 3. If nonopt is not specified, then host defaults to the current host,
921# as determined by config.guess.
922# 4. Target and build default to nonopt.
923# 5. If nonopt is not specified, then target and build default to host.
924
925# The aliases save the names the user supplied, while $host etc.
926# will get canonicalized.
927case $host---$target---$nonopt in
928NONE---*---* | *---NONE---* | *---*---NONE) ;;
929*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
930esac
931
932
933# Make sure we can run config.sub.
6f144c9c 934if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
861bb6c1
JL
935else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936fi
937
938echo $ac_n "checking host system type""... $ac_c" 1>&6
d062c304 939echo "configure:940: checking host system type" >&5
861bb6c1
JL
940
941host_alias=$host
942case "$host_alias" in
943NONE)
944 case $nonopt in
945 NONE)
6f144c9c 946 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
861bb6c1
JL
947 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
948 fi ;;
949 *) host_alias=$nonopt ;;
950 esac ;;
951esac
952
6f144c9c 953host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861bb6c1
JL
954host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
955host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
956host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
957echo "$ac_t""$host" 1>&6
958
959echo $ac_n "checking target system type""... $ac_c" 1>&6
d062c304 960echo "configure:961: checking target system type" >&5
861bb6c1
JL
961
962target_alias=$target
963case "$target_alias" in
964NONE)
965 case $nonopt in
966 NONE) target_alias=$host_alias ;;
967 *) target_alias=$nonopt ;;
968 esac ;;
969esac
970
6f144c9c 971target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
861bb6c1
JL
972target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
973target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
974target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
975echo "$ac_t""$target" 1>&6
976
977echo $ac_n "checking build system type""... $ac_c" 1>&6
d062c304 978echo "configure:979: checking build system type" >&5
861bb6c1
JL
979
980build_alias=$build
981case "$build_alias" in
982NONE)
983 case $nonopt in
984 NONE) build_alias=$host_alias ;;
985 *) build_alias=$nonopt ;;
986 esac ;;
987esac
988
6f144c9c 989build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
861bb6c1
JL
990build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
991build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
992build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
993echo "$ac_t""$build" 1>&6
994
995test "$host_alias" != "$target_alias" &&
996 test "$program_prefix$program_suffix$program_transform_name" = \
997 NONENONEs,x,x, &&
998 program_prefix=${target_alias}-
999
1000
e9a25f70
JL
1001# Find the native compiler
1002# Extract the first word of "gcc", so it can be a program name with args.
1003set dummy gcc; ac_word=$2
1004echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1005echo "configure:1006: checking for $ac_word" >&5
e9a25f70
JL
1006if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1007 echo $ac_n "(cached) $ac_c" 1>&6
1008else
1009 if test -n "$CC"; then
1010 ac_cv_prog_CC="$CC" # Let the user override the test.
1011else
d062c304 1012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1013 for ac_dir in $PATH; do
e9a25f70
JL
1014 test -z "$ac_dir" && ac_dir=.
1015 if test -f $ac_dir/$ac_word; then
1016 ac_cv_prog_CC="gcc"
1017 break
1018 fi
1019 done
1020 IFS="$ac_save_ifs"
1021fi
1022fi
1023CC="$ac_cv_prog_CC"
1024if test -n "$CC"; then
1025 echo "$ac_t""$CC" 1>&6
1026else
1027 echo "$ac_t""no" 1>&6
1028fi
1029
1030if test -z "$CC"; then
1031 # Extract the first word of "cc", so it can be a program name with args.
1032set dummy cc; ac_word=$2
1033echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1034echo "configure:1035: checking for $ac_word" >&5
e9a25f70
JL
1035if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1036 echo $ac_n "(cached) $ac_c" 1>&6
1037else
1038 if test -n "$CC"; then
1039 ac_cv_prog_CC="$CC" # Let the user override the test.
1040else
d062c304 1041 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
e9a25f70 1042 ac_prog_rejected=no
d202e8aa 1043 for ac_dir in $PATH; do
e9a25f70
JL
1044 test -z "$ac_dir" && ac_dir=.
1045 if test -f $ac_dir/$ac_word; then
1046 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1047 ac_prog_rejected=yes
1048 continue
1049 fi
1050 ac_cv_prog_CC="cc"
1051 break
1052 fi
1053 done
1054 IFS="$ac_save_ifs"
1055if test $ac_prog_rejected = yes; then
1056 # We found a bogon in the path, so make sure we never use it.
1057 set dummy $ac_cv_prog_CC
1058 shift
1059 if test $# -gt 0; then
1060 # We chose a different compiler from the bogus one.
1061 # However, it has the same basename, so the bogon will be chosen
1062 # first if we set CC to just the basename; use the full file name.
1063 shift
1064 set dummy "$ac_dir/$ac_word" "$@"
1065 shift
1066 ac_cv_prog_CC="$@"
1067 fi
1068fi
1069fi
1070fi
1071CC="$ac_cv_prog_CC"
1072if test -n "$CC"; then
1073 echo "$ac_t""$CC" 1>&6
1074else
1075 echo "$ac_t""no" 1>&6
1076fi
1077
1078 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1079fi
1080
1081echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d062c304 1082echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
e9a25f70
JL
1083
1084ac_ext=c
1085# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1086ac_cpp='$CPP $CPPFLAGS'
1087ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
d062c304 1088ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
e9a25f70
JL
1089cross_compiling=$ac_cv_prog_cc_cross
1090
d202e8aa 1091cat > conftest.$ac_ext <<EOF
d062c304 1092#line 1093 "configure"
e9a25f70
JL
1093#include "confdefs.h"
1094main(){return(0);}
1095EOF
d062c304 1096if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e9a25f70
JL
1097 ac_cv_prog_cc_works=yes
1098 # If we can't run a trivial program, we are probably using a cross compiler.
1099 if (./conftest; exit) 2>/dev/null; then
1100 ac_cv_prog_cc_cross=no
1101 else
1102 ac_cv_prog_cc_cross=yes
1103 fi
1104else
1105 echo "configure: failed program was:" >&5
1106 cat conftest.$ac_ext >&5
1107 ac_cv_prog_cc_works=no
1108fi
1109rm -fr conftest*
1110
1111echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1112if test $ac_cv_prog_cc_works = no; then
1113 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1114fi
1115echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d062c304 1116echo "configure:1117: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
e9a25f70
JL
1117echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1118cross_compiling=$ac_cv_prog_cc_cross
1119
1120echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d062c304 1121echo "configure:1122: checking whether we are using GNU C" >&5
e9a25f70
JL
1122if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1123 echo $ac_n "(cached) $ac_c" 1>&6
1124else
1125 cat > conftest.c <<EOF
1126#ifdef __GNUC__
1127 yes;
1128#endif
1129EOF
d062c304 1130if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
e9a25f70
JL
1131 ac_cv_prog_gcc=yes
1132else
1133 ac_cv_prog_gcc=no
1134fi
1135fi
1136
1137echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1138
1139if test $ac_cv_prog_gcc = yes; then
1140 GCC=yes
d062c304
JL
1141 ac_test_CFLAGS="${CFLAGS+set}"
1142 ac_save_CFLAGS="$CFLAGS"
1143 CFLAGS=
1144 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1145echo "configure:1146: checking whether ${CC-cc} accepts -g" >&5
e9a25f70
JL
1146if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1147 echo $ac_n "(cached) $ac_c" 1>&6
1148else
1149 echo 'void f(){}' > conftest.c
1150if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1151 ac_cv_prog_cc_g=yes
1152else
1153 ac_cv_prog_cc_g=no
1154fi
1155rm -f conftest*
1156
1157fi
1158
1159echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
d062c304
JL
1160 if test "$ac_test_CFLAGS" = set; then
1161 CFLAGS="$ac_save_CFLAGS"
1162 elif test $ac_cv_prog_cc_g = yes; then
e9a25f70
JL
1163 CFLAGS="-g -O2"
1164 else
20fced2c 1165 CFLAGS="-O2"
20fced2c 1166 fi
d062c304
JL
1167else
1168 GCC=
1169 test "${CFLAGS+set}" = set || CFLAGS="-g"
e9a25f70
JL
1170fi
1171
61842080
MM
1172
1173# If the native compiler is GCC, we can enable warnings even in stage1.
1174# That's useful for people building cross-compilers, or just running a
1175# quick `make'.
1176if test "x$GCC" = "xyes"; then
1177 stage1_warn_cflags='$(WARN_CFLAGS)'
1178else
1179 stage1_warn_cflags=""
1180fi
1181
1182
e9a25f70 1183echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d062c304 1184echo "configure:1185: checking whether ${MAKE-make} sets \${MAKE}" >&5
e9a25f70
JL
1185set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1186if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1187 echo $ac_n "(cached) $ac_c" 1>&6
1188else
1189 cat > conftestmake <<\EOF
1190all:
1191 @echo 'ac_maketemp="${MAKE}"'
1192EOF
1193# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1194eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1195if test -n "$ac_maketemp"; then
1196 eval ac_cv_prog_make_${ac_make}_set=yes
1197else
1198 eval ac_cv_prog_make_${ac_make}_set=no
1199fi
1200rm -f conftestmake
1201fi
1202if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1203 echo "$ac_t""yes" 1>&6
1204 SET_MAKE=
1205else
1206 echo "$ac_t""no" 1>&6
1207 SET_MAKE="MAKE=${MAKE-make}"
1208fi
1209
1210
ab339d62 1211echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
d062c304 1212echo "configure:1213: checking whether a default assembler was specified" >&5
3ccc3a56 1213if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
ab339d62 1214 if test x"$with_gas" = x"no"; then
3ccc3a56 1215 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
ab339d62 1216 else
3ccc3a56 1217 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
ab339d62
AO
1218 fi
1219else
1220 echo "$ac_t""no" 1>&6
1221fi
1222
1223echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
d062c304 1224echo "configure:1225: checking whether a default linker was specified" >&5
3ccc3a56 1225if test x"${DEFAULT_LINKER+set}" = x"set"; then
ab339d62 1226 if test x"$with_gnu_ld" = x"no"; then
3ccc3a56 1227 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
ab339d62 1228 else
3ccc3a56 1229 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
ab339d62
AO
1230 fi
1231else
1232 echo "$ac_t""no" 1>&6
1233fi
1234
861bb6c1
JL
1235# Find some useful tools
1236for ac_prog in mawk gawk nawk awk
1237do
1238# Extract the first word of "$ac_prog", so it can be a program name with args.
1239set dummy $ac_prog; ac_word=$2
1240echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1241echo "configure:1242: checking for $ac_word" >&5
861bb6c1
JL
1242if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1243 echo $ac_n "(cached) $ac_c" 1>&6
1244else
1245 if test -n "$AWK"; then
1246 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1247else
d062c304 1248 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1249 for ac_dir in $PATH; do
861bb6c1
JL
1250 test -z "$ac_dir" && ac_dir=.
1251 if test -f $ac_dir/$ac_word; then
1252 ac_cv_prog_AWK="$ac_prog"
1253 break
1254 fi
1255 done
1256 IFS="$ac_save_ifs"
1257fi
1258fi
1259AWK="$ac_cv_prog_AWK"
1260if test -n "$AWK"; then
1261 echo "$ac_t""$AWK" 1>&6
1262else
1263 echo "$ac_t""no" 1>&6
1264fi
1265
1266test -n "$AWK" && break
1267done
1268
1269# Extract the first word of "flex", so it can be a program name with args.
1270set dummy flex; ac_word=$2
1271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1272echo "configure:1273: checking for $ac_word" >&5
861bb6c1
JL
1273if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1274 echo $ac_n "(cached) $ac_c" 1>&6
1275else
1276 if test -n "$LEX"; then
1277 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1278else
d062c304 1279 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1280 for ac_dir in $PATH; do
861bb6c1
JL
1281 test -z "$ac_dir" && ac_dir=.
1282 if test -f $ac_dir/$ac_word; then
1283 ac_cv_prog_LEX="flex"
1284 break
1285 fi
1286 done
1287 IFS="$ac_save_ifs"
1288 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1289fi
1290fi
1291LEX="$ac_cv_prog_LEX"
1292if test -n "$LEX"; then
1293 echo "$ac_t""$LEX" 1>&6
1294else
1295 echo "$ac_t""no" 1>&6
1296fi
1297
1298if test -z "$LEXLIB"
1299then
1300 case "$LEX" in
1301 flex*) ac_lib=fl ;;
1302 *) ac_lib=l ;;
1303 esac
1304 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
d062c304 1305echo "configure:1306: checking for yywrap in -l$ac_lib" >&5
861bb6c1
JL
1306ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1307if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
1309else
1310 ac_save_LIBS="$LIBS"
1311LIBS="-l$ac_lib $LIBS"
1312cat > conftest.$ac_ext <<EOF
d062c304 1313#line 1314 "configure"
861bb6c1
JL
1314#include "confdefs.h"
1315/* Override any gcc2 internal prototype to avoid an error. */
1316/* We use char because int might match the return type of a gcc2
1317 builtin and then its argument prototype would still apply. */
1318char yywrap();
1319
1320int main() {
1321yywrap()
1322; return 0; }
1323EOF
d062c304 1324if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
861bb6c1
JL
1325 rm -rf conftest*
1326 eval "ac_cv_lib_$ac_lib_var=yes"
1327else
1328 echo "configure: failed program was:" >&5
1329 cat conftest.$ac_ext >&5
1330 rm -rf conftest*
1331 eval "ac_cv_lib_$ac_lib_var=no"
1332fi
1333rm -f conftest*
1334LIBS="$ac_save_LIBS"
1335
1336fi
1337if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1338 echo "$ac_t""yes" 1>&6
1339 LEXLIB="-l$ac_lib"
1340else
1341 echo "$ac_t""no" 1>&6
1342fi
1343
1344fi
1345
0a4b6309 1346echo $ac_n "checking whether ln works""... $ac_c" 1>&6
d062c304 1347echo "configure:1348: checking whether ln works" >&5
0a4b6309
RL
1348if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350else
1351 rm -f conftestdata_t
1352echo >conftestdata_f
1353if ln conftestdata_f conftestdata_t 2>/dev/null
1354then
1355 gcc_cv_prog_LN="ln"
1356else
1357 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1358 then
1359 gcc_cv_prog_LN="ln -s"
1360 else
1361 gcc_cv_prog_LN=cp
1362 fi
1363fi
1364rm -f conftestdata_f conftestdata_t
1365
1366fi
1367LN="$gcc_cv_prog_LN"
1368if test "$gcc_cv_prog_LN" = "ln"; then
1369 echo "$ac_t""yes" 1>&6
1370else
1371 if test "$gcc_cv_prog_LN" = "ln -s"; then
1372 echo "$ac_t""no, using ln -s" 1>&6
1373 else
1374 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1375 fi
1376fi
1377
1378echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
d062c304 1379echo "configure:1380: checking whether ln -s works" >&5
0a4b6309
RL
1380if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1381 echo $ac_n "(cached) $ac_c" 1>&6
1382else
1383 rm -f conftestdata_t
1384echo >conftestdata_f
1385if ln -s conftestdata_f conftestdata_t 2>/dev/null
1386then
1387 gcc_cv_prog_LN_S="ln -s"
1388else
1389 if ln conftestdata_f conftestdata_t 2>/dev/null
1390 then
1391 gcc_cv_prog_LN_S=ln
1392 else
1393 gcc_cv_prog_LN_S=cp
1394 fi
1395fi
1396rm -f conftestdata_f conftestdata_t
1397
1398fi
1399LN_S="$gcc_cv_prog_LN_S"
1400if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1401 echo "$ac_t""yes" 1>&6
1402else
1403 if test "$gcc_cv_prog_LN_S" = "ln"; then
1404 echo "$ac_t""no, using ln" 1>&6
1405 else
1406 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1407 fi
1408fi
1409
1410echo $ac_n "checking for volatile""... $ac_c" 1>&6
d062c304 1411echo "configure:1412: checking for volatile" >&5
0a4b6309
RL
1412if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1413 echo $ac_n "(cached) $ac_c" 1>&6
1414else
1415 cat > conftest.$ac_ext <<EOF
d062c304 1416#line 1417 "configure"
0a4b6309
RL
1417#include "confdefs.h"
1418
1419int main() {
1420volatile int foo;
1421; return 0; }
1422EOF
d062c304 1423if { (eval echo configure:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
1424 rm -rf conftest*
1425 gcc_cv_c_volatile=yes
1426else
1427 echo "configure: failed program was:" >&5
1428 cat conftest.$ac_ext >&5
1429 rm -rf conftest*
1430 gcc_cv_c_volatile=no
1431fi
1432rm -f conftest*
1433fi
1434
1435echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1436if test $gcc_cv_c_volatile = yes ; then
1437 cat >> confdefs.h <<\EOF
1438#define HAVE_VOLATILE 1
1439EOF
1440
1441fi
1442
861bb6c1
JL
1443# Extract the first word of "ranlib", so it can be a program name with args.
1444set dummy ranlib; ac_word=$2
1445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1446echo "configure:1447: checking for $ac_word" >&5
861bb6c1
JL
1447if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1448 echo $ac_n "(cached) $ac_c" 1>&6
1449else
1450 if test -n "$RANLIB"; then
1451 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1452else
d062c304 1453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1454 for ac_dir in $PATH; do
861bb6c1
JL
1455 test -z "$ac_dir" && ac_dir=.
1456 if test -f $ac_dir/$ac_word; then
1457 ac_cv_prog_RANLIB="ranlib"
1458 break
1459 fi
1460 done
1461 IFS="$ac_save_ifs"
1462 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1463fi
1464fi
1465RANLIB="$ac_cv_prog_RANLIB"
1466if test -n "$RANLIB"; then
1467 echo "$ac_t""$RANLIB" 1>&6
1468else
1469 echo "$ac_t""no" 1>&6
1470fi
1471
1472for ac_prog in 'bison -y' byacc
1473do
1474# Extract the first word of "$ac_prog", so it can be a program name with args.
1475set dummy $ac_prog; ac_word=$2
1476echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1477echo "configure:1478: checking for $ac_word" >&5
861bb6c1
JL
1478if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1479 echo $ac_n "(cached) $ac_c" 1>&6
1480else
1481 if test -n "$YACC"; then
1482 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1483else
d062c304 1484 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1485 for ac_dir in $PATH; do
861bb6c1
JL
1486 test -z "$ac_dir" && ac_dir=.
1487 if test -f $ac_dir/$ac_word; then
1488 ac_cv_prog_YACC="$ac_prog"
1489 break
1490 fi
1491 done
1492 IFS="$ac_save_ifs"
1493fi
1494fi
1495YACC="$ac_cv_prog_YACC"
1496if test -n "$YACC"; then
1497 echo "$ac_t""$YACC" 1>&6
1498else
1499 echo "$ac_t""no" 1>&6
1500fi
1501
1502test -n "$YACC" && break
1503done
1504test -n "$YACC" || YACC="yacc"
1505
0a4b6309
RL
1506# Find a good install program. We prefer a C program (faster),
1507# so one script is as good as another. But avoid the broken or
1508# incompatible versions:
1509# SysV /etc/install, /usr/sbin/install
1510# SunOS /usr/etc/install
1511# IRIX /sbin/install
1512# AIX /bin/install
1513# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1514# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1515# ./install, which can be erroneously created by make from ./install.sh.
1516echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
d062c304 1517echo "configure:1518: checking for a BSD compatible install" >&5
0a4b6309
RL
1518if test -z "$INSTALL"; then
1519if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1521else
1522 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1523 for ac_dir in $PATH; do
1524 # Account for people who put trailing slashes in PATH elements.
1525 case "$ac_dir/" in
1526 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1527 *)
1528 # OSF1 and SCO ODT 3.0 have their own names for install.
1529 for ac_prog in ginstall scoinst install; do
1530 if test -f $ac_dir/$ac_prog; then
1531 if test $ac_prog = install &&
1532 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1533 # AIX install. It has an incompatible calling convention.
1534 # OSF/1 installbsd also uses dspmsg, but is usable.
1535 :
1536 else
1537 ac_cv_path_install="$ac_dir/$ac_prog -c"
1538 break 2
1539 fi
1540 fi
1541 done
1542 ;;
1543 esac
1544 done
1545 IFS="$ac_save_IFS"
1546
1547fi
1548 if test "${ac_cv_path_install+set}" = set; then
1549 INSTALL="$ac_cv_path_install"
1550 else
1551 # As a last resort, use the slow shell script. We don't cache a
1552 # path for INSTALL within a source directory, because that will
1553 # break other packages using the cache if that directory is
1554 # removed, or if the path is relative.
1555 INSTALL="$ac_install_sh"
1556 fi
1557fi
1558echo "$ac_t""$INSTALL" 1>&6
1559
1560# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1561# It thinks the first close brace ends the variable substitution.
1562test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1563
1564test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1565
861bb6c1 1566
861bb6c1 1567echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d062c304 1568echo "configure:1569: checking how to run the C preprocessor" >&5
861bb6c1
JL
1569# On Suns, sometimes $CPP names a directory.
1570if test -n "$CPP" && test -d "$CPP"; then
1571 CPP=
1572fi
1573if test -z "$CPP"; then
1574if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
1576else
1577 # This must be in double quotes, not single quotes, because CPP may get
1578 # substituted into the Makefile and "${CC-cc}" will confuse make.
1579 CPP="${CC-cc} -E"
1580 # On the NeXT, cc -E runs the code through the compiler's parser,
1581 # not just through cpp.
1582 cat > conftest.$ac_ext <<EOF
d062c304 1583#line 1584 "configure"
861bb6c1
JL
1584#include "confdefs.h"
1585#include <assert.h>
1586Syntax Error
1587EOF
1588ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1589{ (eval echo configure:1590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1590ac_err=`grep -v '^ *+' conftest.out`
861bb6c1
JL
1591if test -z "$ac_err"; then
1592 :
1593else
1594 echo "$ac_err" >&5
1595 echo "configure: failed program was:" >&5
1596 cat conftest.$ac_ext >&5
1597 rm -rf conftest*
1598 CPP="${CC-cc} -E -traditional-cpp"
1599 cat > conftest.$ac_ext <<EOF
d062c304 1600#line 1601 "configure"
20fced2c
MM
1601#include "confdefs.h"
1602#include <assert.h>
1603Syntax Error
1604EOF
1605ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1606{ (eval echo configure:1607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1607ac_err=`grep -v '^ *+' conftest.out`
861bb6c1
JL
1608if test -z "$ac_err"; then
1609 :
1610else
1611 echo "$ac_err" >&5
1612 echo "configure: failed program was:" >&5
1613 cat conftest.$ac_ext >&5
1614 rm -rf conftest*
1615 CPP=/lib/cpp
1616fi
1617rm -f conftest*
1618fi
1619rm -f conftest*
1620 ac_cv_prog_CPP="$CPP"
1621fi
1622 CPP="$ac_cv_prog_CPP"
1623else
1624 ac_cv_prog_CPP="$CPP"
1625fi
1626echo "$ac_t""$CPP" 1>&6
1627
956d6950 1628echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d062c304 1629echo "configure:1630: checking for ANSI C header files" >&5
956d6950
JL
1630if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1631 echo $ac_n "(cached) $ac_c" 1>&6
1632else
1633 cat > conftest.$ac_ext <<EOF
d062c304 1634#line 1635 "configure"
956d6950
JL
1635#include "confdefs.h"
1636#include <stdlib.h>
1637#include <stdarg.h>
1638#include <string.h>
1639#include <float.h>
1640EOF
1641ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1642{ (eval echo configure:1643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1643ac_err=`grep -v '^ *+' conftest.out`
956d6950
JL
1644if test -z "$ac_err"; then
1645 rm -rf conftest*
1646 ac_cv_header_stdc=yes
1647else
1648 echo "$ac_err" >&5
1649 echo "configure: failed program was:" >&5
1650 cat conftest.$ac_ext >&5
1651 rm -rf conftest*
1652 ac_cv_header_stdc=no
1653fi
1654rm -f conftest*
1655
1656if test $ac_cv_header_stdc = yes; then
1657 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1658cat > conftest.$ac_ext <<EOF
d062c304 1659#line 1660 "configure"
956d6950
JL
1660#include "confdefs.h"
1661#include <string.h>
1662EOF
1663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1664 egrep "memchr" >/dev/null 2>&1; then
1665 :
1666else
1667 rm -rf conftest*
1668 ac_cv_header_stdc=no
1669fi
1670rm -f conftest*
1671
1672fi
1673
1674if test $ac_cv_header_stdc = yes; then
1675 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1676cat > conftest.$ac_ext <<EOF
d062c304 1677#line 1678 "configure"
956d6950
JL
1678#include "confdefs.h"
1679#include <stdlib.h>
1680EOF
1681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1682 egrep "free" >/dev/null 2>&1; then
1683 :
1684else
1685 rm -rf conftest*
1686 ac_cv_header_stdc=no
1687fi
1688rm -f conftest*
1689
1690fi
1691
1692if test $ac_cv_header_stdc = yes; then
1693 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1694if test "$cross_compiling" = yes; then
1695 :
1696else
1697 cat > conftest.$ac_ext <<EOF
d062c304 1698#line 1699 "configure"
956d6950
JL
1699#include "confdefs.h"
1700#include <ctype.h>
1701#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1702#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1703#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1704int main () { int i; for (i = 0; i < 256; i++)
1705if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1706exit (0); }
1707
1708EOF
d062c304 1709if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
956d6950
JL
1710then
1711 :
1712else
1713 echo "configure: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1715 rm -fr conftest*
1716 ac_cv_header_stdc=no
1717fi
1718rm -fr conftest*
1719fi
1720
1721fi
1722fi
1723
1724echo "$ac_t""$ac_cv_header_stdc" 1>&6
1725if test $ac_cv_header_stdc = yes; then
1726 cat >> confdefs.h <<\EOF
1727#define STDC_HEADERS 1
1728EOF
1729
1730fi
1731
1732echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
d062c304 1733echo "configure:1734: checking whether time.h and sys/time.h may both be included" >&5
956d6950
JL
1734if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737 cat > conftest.$ac_ext <<EOF
d062c304 1738#line 1739 "configure"
956d6950
JL
1739#include "confdefs.h"
1740#include <sys/types.h>
1741#include <sys/time.h>
1742#include <time.h>
1743int main() {
1744struct tm *tp;
1745; return 0; }
1746EOF
d062c304 1747if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
1748 rm -rf conftest*
1749 ac_cv_header_time=yes
1750else
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 rm -rf conftest*
1754 ac_cv_header_time=no
1755fi
1756rm -f conftest*
1757fi
1758
1759echo "$ac_t""$ac_cv_header_time" 1>&6
1760if test $ac_cv_header_time = yes; then
1761 cat >> confdefs.h <<\EOF
1762#define TIME_WITH_SYS_TIME 1
1763EOF
1764
1765fi
1766
0a4b6309 1767echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
d062c304 1768echo "configure:1769: checking whether string.h and strings.h may both be included" >&5
0a4b6309
RL
1769if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
1770 echo $ac_n "(cached) $ac_c" 1>&6
1771else
1772 cat > conftest.$ac_ext <<EOF
d062c304 1773#line 1774 "configure"
0a4b6309
RL
1774#include "confdefs.h"
1775#include <string.h>
1776#include <strings.h>
1777int main() {
1778
1779; return 0; }
1780EOF
d062c304 1781if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
1782 rm -rf conftest*
1783 gcc_cv_header_string=yes
1784else
1785 echo "configure: failed program was:" >&5
1786 cat conftest.$ac_ext >&5
1787 rm -rf conftest*
1788 gcc_cv_header_string=no
1789fi
1790rm -f conftest*
1791fi
1792
1793echo "$ac_t""$gcc_cv_header_string" 1>&6
1794if test $gcc_cv_header_string = yes; then
1795 cat >> confdefs.h <<\EOF
1796#define STRING_WITH_STRINGS 1
1797EOF
1798
1799fi
1800
e9831ca0 1801echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
d062c304 1802echo "configure:1803: checking for sys/wait.h that is POSIX.1 compatible" >&5
e9831ca0
KG
1803if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1805else
1806 cat > conftest.$ac_ext <<EOF
d062c304 1807#line 1808 "configure"
e9831ca0
KG
1808#include "confdefs.h"
1809#include <sys/types.h>
1810#include <sys/wait.h>
1811#ifndef WEXITSTATUS
1812#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1813#endif
1814#ifndef WIFEXITED
1815#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1816#endif
1817int main() {
1818int s;
1819wait (&s);
1820s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1821; return 0; }
1822EOF
d062c304 1823if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e9831ca0
KG
1824 rm -rf conftest*
1825 ac_cv_header_sys_wait_h=yes
1826else
1827 echo "configure: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1829 rm -rf conftest*
1830 ac_cv_header_sys_wait_h=no
1831fi
1832rm -f conftest*
1833fi
1834
1835echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1836if test $ac_cv_header_sys_wait_h = yes; then
1837 cat >> confdefs.h <<\EOF
1838#define HAVE_SYS_WAIT_H 1
1839EOF
1840
1841fi
1842
a05e22b8 1843for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h
861bb6c1
JL
1844do
1845ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1846echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d062c304 1847echo "configure:1848: checking for $ac_hdr" >&5
861bb6c1
JL
1848if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1849 echo $ac_n "(cached) $ac_c" 1>&6
1850else
1851 cat > conftest.$ac_ext <<EOF
d062c304 1852#line 1853 "configure"
861bb6c1
JL
1853#include "confdefs.h"
1854#include <$ac_hdr>
1855EOF
956d6950 1856ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1857{ (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1858ac_err=`grep -v '^ *+' conftest.out`
956d6950
JL
1859if test -z "$ac_err"; then
1860 rm -rf conftest*
1861 eval "ac_cv_header_$ac_safe=yes"
1862else
1863 echo "$ac_err" >&5
1864 echo "configure: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 rm -rf conftest*
1867 eval "ac_cv_header_$ac_safe=no"
1868fi
1869rm -f conftest*
1870fi
1871if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1872 echo "$ac_t""yes" 1>&6
1873 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1874 cat >> confdefs.h <<EOF
1875#define $ac_tr_hdr 1
1876EOF
1877
1878else
1879 echo "$ac_t""no" 1>&6
1880fi
1881done
1882
1883
f24af81b
TT
1884# Check for thread headers.
1885ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
1886echo $ac_n "checking for thread.h""... $ac_c" 1>&6
d062c304 1887echo "configure:1888: checking for thread.h" >&5
f24af81b
TT
1888if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1889 echo $ac_n "(cached) $ac_c" 1>&6
1890else
1891 cat > conftest.$ac_ext <<EOF
d062c304 1892#line 1893 "configure"
f24af81b
TT
1893#include "confdefs.h"
1894#include <thread.h>
1895EOF
1896ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1897{ (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1898ac_err=`grep -v '^ *+' conftest.out`
f24af81b
TT
1899if test -z "$ac_err"; then
1900 rm -rf conftest*
1901 eval "ac_cv_header_$ac_safe=yes"
1902else
1903 echo "$ac_err" >&5
1904 echo "configure: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1906 rm -rf conftest*
1907 eval "ac_cv_header_$ac_safe=no"
1908fi
1909rm -f conftest*
1910fi
1911if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1912 echo "$ac_t""yes" 1>&6
1913 have_thread_h=yes
1914else
1915 echo "$ac_t""no" 1>&6
1916have_thread_h=
1917fi
1918
1919ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
1920echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
d062c304 1921echo "configure:1922: checking for pthread.h" >&5
f24af81b
TT
1922if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1923 echo $ac_n "(cached) $ac_c" 1>&6
1924else
1925 cat > conftest.$ac_ext <<EOF
d062c304 1926#line 1927 "configure"
f24af81b
TT
1927#include "confdefs.h"
1928#include <pthread.h>
1929EOF
1930ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
1931{ (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1932ac_err=`grep -v '^ *+' conftest.out`
f24af81b
TT
1933if test -z "$ac_err"; then
1934 rm -rf conftest*
1935 eval "ac_cv_header_$ac_safe=yes"
1936else
1937 echo "$ac_err" >&5
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1940 rm -rf conftest*
1941 eval "ac_cv_header_$ac_safe=no"
1942fi
1943rm -f conftest*
1944fi
1945if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1946 echo "$ac_t""yes" 1>&6
1947 have_pthread_h=yes
1948else
1949 echo "$ac_t""no" 1>&6
1950have_pthread_h=
1951fi
1952
1953
bcf12124
JL
1954# See if GNAT has been installed
1955# Extract the first word of "gnatbind", so it can be a program name with args.
1956set dummy gnatbind; ac_word=$2
1957echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d062c304 1958echo "configure:1959: checking for $ac_word" >&5
bcf12124
JL
1959if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
1960 echo $ac_n "(cached) $ac_c" 1>&6
1961else
1962 if test -n "$gnat"; then
1963 ac_cv_prog_gnat="$gnat" # Let the user override the test.
1964else
d062c304 1965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d202e8aa 1966 for ac_dir in $PATH; do
bcf12124
JL
1967 test -z "$ac_dir" && ac_dir=.
1968 if test -f $ac_dir/$ac_word; then
1969 ac_cv_prog_gnat="yes"
1970 break
1971 fi
1972 done
1973 IFS="$ac_save_ifs"
1974 test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
1975fi
1976fi
1977gnat="$ac_cv_prog_gnat"
1978if test -n "$gnat"; then
1979 echo "$ac_t""$gnat" 1>&6
1980else
1981 echo "$ac_t""no" 1>&6
1982fi
1983
1984
76844337
RH
1985# See if the system preprocessor understands the ANSI C preprocessor
1986# stringification operator.
1987echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
d062c304 1988echo "configure:1989: checking whether cpp understands the stringify operator" >&5
76844337
RH
1989if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
1990 echo $ac_n "(cached) $ac_c" 1>&6
1991else
1992 cat > conftest.$ac_ext <<EOF
d062c304 1993#line 1994 "configure"
76844337
RH
1994#include "confdefs.h"
1995
1996int main() {
1997#define S(x) #x
1998char *test = S(foo);
1999; return 0; }
2000EOF
d062c304 2001if { (eval echo configure:2002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
76844337
RH
2002 rm -rf conftest*
2003 gcc_cv_c_have_stringify=yes
2004else
2005 echo "configure: failed program was:" >&5
2006 cat conftest.$ac_ext >&5
2007 rm -rf conftest*
2008 gcc_cv_c_have_stringify=no
2009fi
2010rm -f conftest*
2011fi
2012
2013echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
2014if test $gcc_cv_c_have_stringify = yes; then
2015 cat >> confdefs.h <<\EOF
2016#define HAVE_CPP_STRINGIFY 1
2017EOF
2018
2019fi
2020
956d6950
JL
2021# Use <inttypes.h> only if it exists,
2022# doesn't clash with <sys/types.h>, and declares intmax_t.
2023echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
d062c304 2024echo "configure:2025: checking for inttypes.h" >&5
956d6950
JL
2025if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2026 echo $ac_n "(cached) $ac_c" 1>&6
2027else
2028 cat > conftest.$ac_ext <<EOF
d062c304 2029#line 2030 "configure"
956d6950
JL
2030#include "confdefs.h"
2031#include <sys/types.h>
2032#include <inttypes.h>
2033int main() {
2034intmax_t i = -1;
2035; return 0; }
2036EOF
d062c304 2037if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950 2038 rm -rf conftest*
0056a9b5 2039 gcc_cv_header_inttypes_h=yes
956d6950
JL
2040else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 gcc_cv_header_inttypes_h=no
2045fi
2046rm -f conftest*
2047fi
2048
2049echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
0056a9b5
KG
2050if test $gcc_cv_header_inttypes_h = yes; then
2051 cat >> confdefs.h <<\EOF
2052#define HAVE_INTTYPES_H 1
2053EOF
2054
2055fi
956d6950 2056
76b4b31e 2057for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
8f81384f 2058 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
54953b66
UD
2059 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2060 fputs_unlocked
956d6950
JL
2061do
2062echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d062c304 2063echo "configure:2064: checking for $ac_func" >&5
956d6950
JL
2064if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2065 echo $ac_n "(cached) $ac_c" 1>&6
2066else
2067 cat > conftest.$ac_ext <<EOF
d062c304 2068#line 2069 "configure"
956d6950
JL
2069#include "confdefs.h"
2070/* System header to define __stub macros and hopefully few prototypes,
2071 which can conflict with char $ac_func(); below. */
2072#include <assert.h>
2073/* Override any gcc2 internal prototype to avoid an error. */
2074/* We use char because int might match the return type of a gcc2
2075 builtin and then its argument prototype would still apply. */
2076char $ac_func();
2077
2078int main() {
2079
2080/* The GNU C library defines this for functions which it implements
2081 to always fail with ENOSYS. Some functions are actually named
2082 something starting with __ and the normal name is an alias. */
2083#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2084choke me
2085#else
4283012f 2086$ac_func();
956d6950
JL
2087#endif
2088
2089; return 0; }
2090EOF
d062c304 2091if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
956d6950
JL
2092 rm -rf conftest*
2093 eval "ac_cv_func_$ac_func=yes"
2094else
2095 echo "configure: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097 rm -rf conftest*
2098 eval "ac_cv_func_$ac_func=no"
2099fi
2100rm -f conftest*
2101fi
2102
2103if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2104 echo "$ac_t""yes" 1>&6
2105 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2106 cat >> confdefs.h <<EOF
2107#define $ac_tr_func 1
2108EOF
2109
2110else
2111 echo "$ac_t""no" 1>&6
2112fi
2113done
2114
6885fc87 2115
0b9d02c6
JL
2116# Make sure wchar_t is available
2117#AC_CHECK_TYPE(wchar_t, unsigned int)
2118
0a4b6309 2119echo $ac_n "checking for vprintf""... $ac_c" 1>&6
d062c304 2120echo "configure:2121: checking for vprintf" >&5
0a4b6309
RL
2121if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123else
2124 cat > conftest.$ac_ext <<EOF
d062c304 2125#line 2126 "configure"
0a4b6309
RL
2126#include "confdefs.h"
2127/* System header to define __stub macros and hopefully few prototypes,
2128 which can conflict with char vprintf(); below. */
2129#include <assert.h>
2130/* Override any gcc2 internal prototype to avoid an error. */
2131/* We use char because int might match the return type of a gcc2
2132 builtin and then its argument prototype would still apply. */
2133char vprintf();
2134
2135int main() {
2136
2137/* The GNU C library defines this for functions which it implements
2138 to always fail with ENOSYS. Some functions are actually named
2139 something starting with __ and the normal name is an alias. */
2140#if defined (__stub_vprintf) || defined (__stub___vprintf)
2141choke me
2142#else
4283012f 2143vprintf();
0a4b6309
RL
2144#endif
2145
2146; return 0; }
2147EOF
d062c304 2148if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
0a4b6309
RL
2149 rm -rf conftest*
2150 eval "ac_cv_func_vprintf=yes"
2151else
2152 echo "configure: failed program was:" >&5
2153 cat conftest.$ac_ext >&5
2154 rm -rf conftest*
2155 eval "ac_cv_func_vprintf=no"
2156fi
2157rm -f conftest*
2158fi
2159
2160if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2161 echo "$ac_t""yes" 1>&6
2162 cat >> confdefs.h <<\EOF
2163#define HAVE_VPRINTF 1
2164EOF
2165
2166else
2167 echo "$ac_t""no" 1>&6
2168fi
8fa1f09f 2169
0a4b6309
RL
2170if test "$ac_cv_func_vprintf" != yes; then
2171echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
d062c304 2172echo "configure:2173: checking for _doprnt" >&5
0a4b6309
RL
2173if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2174 echo $ac_n "(cached) $ac_c" 1>&6
2175else
2176 cat > conftest.$ac_ext <<EOF
d062c304 2177#line 2178 "configure"
0a4b6309
RL
2178#include "confdefs.h"
2179/* System header to define __stub macros and hopefully few prototypes,
2180 which can conflict with char _doprnt(); below. */
2181#include <assert.h>
2182/* Override any gcc2 internal prototype to avoid an error. */
2183/* We use char because int might match the return type of a gcc2
2184 builtin and then its argument prototype would still apply. */
2185char _doprnt();
2186
2187int main() {
2188
2189/* The GNU C library defines this for functions which it implements
2190 to always fail with ENOSYS. Some functions are actually named
2191 something starting with __ and the normal name is an alias. */
2192#if defined (__stub__doprnt) || defined (__stub____doprnt)
2193choke me
2194#else
4283012f 2195_doprnt();
0a4b6309
RL
2196#endif
2197
2198; return 0; }
2199EOF
d062c304 2200if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
0a4b6309
RL
2201 rm -rf conftest*
2202 eval "ac_cv_func__doprnt=yes"
2203else
2204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2206 rm -rf conftest*
2207 eval "ac_cv_func__doprnt=no"
2208fi
2209rm -f conftest*
2210fi
2211
2212if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2213 echo "$ac_t""yes" 1>&6
2214 cat >> confdefs.h <<\EOF
2215#define HAVE_DOPRNT 1
2216EOF
2217
2218else
2219 echo "$ac_t""no" 1>&6
2220fi
2221
2222fi
2223
2224vfprintf=
2225doprint=
2226if test $ac_cv_func_vprintf != yes ; then
2227 vfprintf=vfprintf.o
2228 if test $ac_cv_func__doprnt != yes ; then
2229 doprint=doprint.o
2230 fi
2231fi
2232
2233
2234
2235echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
d062c304 2236echo "configure:2237: checking whether the printf functions support %p" >&5
0a4b6309
RL
2237if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2239else
2240 if test "$cross_compiling" = yes; then
2241 gcc_cv_func_printf_ptr=no
2242else
2243 cat > conftest.$ac_ext <<EOF
d062c304 2244#line 2245 "configure"
0a4b6309
RL
2245#include "confdefs.h"
2246#include <stdio.h>
2247
2248main()
2249{
2250 char buf[64];
2251 char *p = buf, *q = NULL;
2252 sprintf(buf, "%p", p);
2253 sscanf(buf, "%p", &q);
2254 exit (p != q);
2255}
2256EOF
d062c304 2257if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
0a4b6309
RL
2258then
2259 gcc_cv_func_printf_ptr=yes
2260else
2261 echo "configure: failed program was:" >&5
2262 cat conftest.$ac_ext >&5
2263 rm -fr conftest*
2264 gcc_cv_func_printf_ptr=no
2265fi
2266rm -fr conftest*
2267fi
2268
2269rm -f core core.* *.core
2270fi
2271
2272echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
2273if test $gcc_cv_func_printf_ptr = yes ; then
2274 cat >> confdefs.h <<\EOF
2275#define HAVE_PRINTF_PTR 1
2276EOF
2277
2278fi
2279
c375c43b 2280echo $ac_n "checking for pid_t""... $ac_c" 1>&6
d062c304 2281echo "configure:2282: checking for pid_t" >&5
c375c43b
KG
2282if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2284else
2285 cat > conftest.$ac_ext <<EOF
d062c304 2286#line 2287 "configure"
c375c43b
KG
2287#include "confdefs.h"
2288#include <sys/types.h>
2289#if STDC_HEADERS
2290#include <stdlib.h>
2291#include <stddef.h>
2292#endif
2293EOF
2294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
d202e8aa 2295 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c375c43b
KG
2296 rm -rf conftest*
2297 ac_cv_type_pid_t=yes
2298else
2299 rm -rf conftest*
2300 ac_cv_type_pid_t=no
2301fi
2302rm -f conftest*
2303
2304fi
2305echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2306if test $ac_cv_type_pid_t = no; then
2307 cat >> confdefs.h <<\EOF
2308#define pid_t int
2309EOF
2310
2311fi
2312
2313ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2314echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
d062c304 2315echo "configure:2316: checking for vfork.h" >&5
c375c43b
KG
2316if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317 echo $ac_n "(cached) $ac_c" 1>&6
2318else
2319 cat > conftest.$ac_ext <<EOF
d062c304 2320#line 2321 "configure"
c375c43b
KG
2321#include "confdefs.h"
2322#include <vfork.h>
2323EOF
2324ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d062c304
JL
2325{ (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326ac_err=`grep -v '^ *+' conftest.out`
c375c43b
KG
2327if test -z "$ac_err"; then
2328 rm -rf conftest*
2329 eval "ac_cv_header_$ac_safe=yes"
2330else
2331 echo "$ac_err" >&5
2332 echo "configure: failed program was:" >&5
2333 cat conftest.$ac_ext >&5
2334 rm -rf conftest*
2335 eval "ac_cv_header_$ac_safe=no"
2336fi
2337rm -f conftest*
2338fi
2339if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340 echo "$ac_t""yes" 1>&6
2341 cat >> confdefs.h <<\EOF
2342#define HAVE_VFORK_H 1
2343EOF
2344
2345else
2346 echo "$ac_t""no" 1>&6
2347fi
2348
2349echo $ac_n "checking for working vfork""... $ac_c" 1>&6
d062c304 2350echo "configure:2351: checking for working vfork" >&5
c375c43b
KG
2351if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353else
2354 if test "$cross_compiling" = yes; then
2355 echo $ac_n "checking for vfork""... $ac_c" 1>&6
d062c304 2356echo "configure:2357: checking for vfork" >&5
c375c43b
KG
2357if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2358 echo $ac_n "(cached) $ac_c" 1>&6
2359else
2360 cat > conftest.$ac_ext <<EOF
d062c304 2361#line 2362 "configure"
c375c43b
KG
2362#include "confdefs.h"
2363/* System header to define __stub macros and hopefully few prototypes,
2364 which can conflict with char vfork(); below. */
2365#include <assert.h>
2366/* Override any gcc2 internal prototype to avoid an error. */
2367/* We use char because int might match the return type of a gcc2
2368 builtin and then its argument prototype would still apply. */
2369char vfork();
2370
2371int main() {
2372
2373/* The GNU C library defines this for functions which it implements
2374 to always fail with ENOSYS. Some functions are actually named
2375 something starting with __ and the normal name is an alias. */
2376#if defined (__stub_vfork) || defined (__stub___vfork)
2377choke me
2378#else
4283012f 2379vfork();
c375c43b
KG
2380#endif
2381
2382; return 0; }
2383EOF
d062c304 2384if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
c375c43b
KG
2385 rm -rf conftest*
2386 eval "ac_cv_func_vfork=yes"
2387else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -rf conftest*
2391 eval "ac_cv_func_vfork=no"
2392fi
2393rm -f conftest*
2394fi
2395
2396if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2397 echo "$ac_t""yes" 1>&6
2398 :
2399else
2400 echo "$ac_t""no" 1>&6
2401fi
2402
2403ac_cv_func_vfork_works=$ac_cv_func_vfork
2404else
2405 cat > conftest.$ac_ext <<EOF
d062c304 2406#line 2407 "configure"
c375c43b
KG
2407#include "confdefs.h"
2408/* Thanks to Paul Eggert for this test. */
2409#include <stdio.h>
2410#include <sys/types.h>
2411#include <sys/stat.h>
2412#ifdef HAVE_UNISTD_H
2413#include <unistd.h>
2414#endif
2415#ifdef HAVE_VFORK_H
2416#include <vfork.h>
2417#endif
2418/* On some sparc systems, changes by the child to local and incoming
2419 argument registers are propagated back to the parent.
2420 The compiler is told about this with #include <vfork.h>,
2421 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2422 Test for this by using a static variable whose address
2423 is put into a register that is clobbered by the vfork. */
2424static
2425#ifdef __cplusplus
2426sparc_address_test (int arg)
2427#else
2428sparc_address_test (arg) int arg;
2429#endif
2430{
2431 static pid_t child;
2432 if (!child) {
2433 child = vfork ();
2434 if (child < 0) {
2435 perror ("vfork");
2436 _exit(2);
2437 }
2438 if (!child) {
2439 arg = getpid();
2440 write(-1, "", 0);
2441 _exit (arg);
2442 }
2443 }
2444}
2445main() {
2446 pid_t parent = getpid ();
2447 pid_t child;
2448
2449 sparc_address_test ();
2450
2451 child = vfork ();
2452
2453 if (child == 0) {
2454 /* Here is another test for sparc vfork register problems.
2455 This test uses lots of local variables, at least
2456 as many local variables as main has allocated so far
2457 including compiler temporaries. 4 locals are enough for
2458 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2459 A buggy compiler should reuse the register of parent
2460 for one of the local variables, since it will think that
2461 parent can't possibly be used any more in this routine.
2462 Assigning to the local variable will thus munge parent
2463 in the parent process. */
2464 pid_t
2465 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2466 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2467 /* Convince the compiler that p..p7 are live; otherwise, it might
2468 use the same hardware register for all 8 local variables. */
2469 if (p != p1 || p != p2 || p != p3 || p != p4
2470 || p != p5 || p != p6 || p != p7)
2471 _exit(1);
2472
2473 /* On some systems (e.g. IRIX 3.3),
2474 vfork doesn't separate parent from child file descriptors.
2475 If the child closes a descriptor before it execs or exits,
2476 this munges the parent's descriptor as well.
2477 Test for this by closing stdout in the child. */
2478 _exit(close(fileno(stdout)) != 0);
2479 } else {
2480 int status;
2481 struct stat st;
2482
2483 while (wait(&status) != child)
2484 ;
2485 exit(
2486 /* Was there some problem with vforking? */
2487 child < 0
2488
2489 /* Did the child fail? (This shouldn't happen.) */
2490 || status
2491
2492 /* Did the vfork/compiler bug occur? */
2493 || parent != getpid()
2494
2495 /* Did the file descriptor bug occur? */
2496 || fstat(fileno(stdout), &st) != 0
2497 );
2498 }
2499}
2500EOF
d062c304 2501if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
c375c43b
KG
2502then
2503 ac_cv_func_vfork_works=yes
2504else
2505 echo "configure: failed program was:" >&5
2506 cat conftest.$ac_ext >&5
2507 rm -fr conftest*
2508 ac_cv_func_vfork_works=no
2509fi
2510rm -fr conftest*
2511fi
2512
2513fi
2514
2515echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2516if test $ac_cv_func_vfork_works = no; then
2517 cat >> confdefs.h <<\EOF
2518#define vfork fork
2519EOF
2520
2521fi
2522
0a4b6309
RL
2523
2524for ac_func in malloc realloc calloc free bcopy bzero bcmp \
007e8d2a 2525 index rindex getenv atol sbrk abort atof strerror getcwd getwd \
0a4b6309
RL
2526 strsignal
2527do
2528echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
d062c304 2529echo "configure:2530: checking whether $ac_func must be declared" >&5
0a4b6309
RL
2530if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2531 echo $ac_n "(cached) $ac_c" 1>&6
2532else
2533 cat > conftest.$ac_ext <<EOF
d062c304 2534#line 2535 "configure"
0a4b6309
RL
2535#include "confdefs.h"
2536
2537#include <stdio.h>
2538#ifdef STRING_WITH_STRINGS
2539# include <string.h>
2540# include <strings.h>
2541#else
2542# ifdef HAVE_STRING_H
2543# include <string.h>
2544# else
2545# ifdef HAVE_STRINGS_H
2546# include <strings.h>
2547# endif
2548# endif
2549#endif
2550#ifdef HAVE_STDLIB_H
2551#include <stdlib.h>
2552#endif
2553#ifdef HAVE_UNISTD_H
2554#include <unistd.h>
2555#endif
2556#ifndef HAVE_RINDEX
2557#define rindex strrchr
2558#endif
2559#ifndef HAVE_INDEX
2560#define index strchr
2561#endif
2562
2563int main() {
2564char *(*pfn) = (char *(*)) $ac_func
2565; return 0; }
2566EOF
d062c304 2567if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2568 rm -rf conftest*
2569 eval "gcc_cv_decl_needed_$ac_func=no"
2570else
2571 echo "configure: failed program was:" >&5
2572 cat conftest.$ac_ext >&5
2573 rm -rf conftest*
2574 eval "gcc_cv_decl_needed_$ac_func=yes"
2575fi
2576rm -f conftest*
2577fi
2578
2579if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2580 echo "$ac_t""yes" 1>&6
2581 gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2582 cat >> confdefs.h <<EOF
2583#define $gcc_tr_decl 1
2584EOF
2585
2586else
2587 echo "$ac_t""no" 1>&6
2588fi
2589
2590done
2591
2592
2593for ac_func in getrlimit setrlimit
2594do
2595echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
d062c304 2596echo "configure:2597: checking whether $ac_func must be declared" >&5
0a4b6309
RL
2597if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2598 echo $ac_n "(cached) $ac_c" 1>&6
2599else
2600 cat > conftest.$ac_ext <<EOF
d062c304 2601#line 2602 "configure"
0a4b6309 2602#include "confdefs.h"
8fa1f09f 2603
0a4b6309
RL
2604#include <stdio.h>
2605#ifdef STRING_WITH_STRINGS
2606# include <string.h>
2607# include <strings.h>
2608#else
2609# ifdef HAVE_STRING_H
2610# include <string.h>
2611# else
2612# ifdef HAVE_STRINGS_H
2613# include <strings.h>
2614# endif
2615# endif
2616#endif
2617#ifdef HAVE_STDLIB_H
2618#include <stdlib.h>
2619#endif
2620#ifdef HAVE_UNISTD_H
2621#include <unistd.h>
2622#endif
2623#ifndef HAVE_RINDEX
2624#define rindex strrchr
2625#endif
2626#ifndef HAVE_INDEX
2627#define index strchr
2628#endif
d2cabf16
KG
2629#include <sys/types.h>
2630#ifdef HAVE_SYS_RESOURCE_H
2631#include <sys/resource.h>
2632#endif
0a4b6309
RL
2633
2634int main() {
2635char *(*pfn) = (char *(*)) $ac_func
2636; return 0; }
2637EOF
d062c304 2638if { (eval echo configure:2639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2639 rm -rf conftest*
2640 eval "gcc_cv_decl_needed_$ac_func=no"
2641else
2642 echo "configure: failed program was:" >&5
2643 cat conftest.$ac_ext >&5
2644 rm -rf conftest*
2645 eval "gcc_cv_decl_needed_$ac_func=yes"
2646fi
2647rm -f conftest*
2648fi
2649
2650if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2651 echo "$ac_t""yes" 1>&6
2652 gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2653 cat >> confdefs.h <<EOF
2654#define $gcc_tr_decl 1
2655EOF
2656
2657else
2658 echo "$ac_t""no" 1>&6
2659fi
2660
2661done
2662
956d6950
JL
2663
2664echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
d062c304 2665echo "configure:2666: checking for sys_siglist declaration in signal.h or unistd.h" >&5
956d6950
JL
2666if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2667 echo $ac_n "(cached) $ac_c" 1>&6
a63d08e6 2668else
956d6950 2669 cat > conftest.$ac_ext <<EOF
d062c304 2670#line 2671 "configure"
956d6950
JL
2671#include "confdefs.h"
2672#include <sys/types.h>
2673#include <signal.h>
2674/* NetBSD declares sys_siglist in unistd.h. */
2675#ifdef HAVE_UNISTD_H
2676#include <unistd.h>
2677#endif
2678int main() {
2679char *msg = *(sys_siglist + 1);
2680; return 0; }
2681EOF
d062c304 2682if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
2683 rm -rf conftest*
2684 ac_cv_decl_sys_siglist=yes
2685else
2686 echo "configure: failed program was:" >&5
2687 cat conftest.$ac_ext >&5
2688 rm -rf conftest*
2689 ac_cv_decl_sys_siglist=no
2690fi
2691rm -f conftest*
2692fi
2693
2694echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2695if test $ac_cv_decl_sys_siglist = yes; then
2696 cat >> confdefs.h <<\EOF
2697#define SYS_SIGLIST_DECLARED 1
2698EOF
2699
a63d08e6 2700fi
a63d08e6
JL
2701
2702
861bb6c1
JL
2703# File extensions
2704manext='.1'
2705objext='.o'
2706
2707
2708
2709build_xm_file=
f6cb0e63 2710build_xm_defines=
861bb6c1
JL
2711build_install_headers_dir=install-headers-tar
2712build_exeext=
2713host_xm_file=
f6cb0e63 2714host_xm_defines=
861bb6c1
JL
2715host_xmake_file=
2716host_truncate_target=
6e26218f 2717host_exeext=
861bb6c1
JL
2718
2719# Decode the host machine, then the target machine.
2720# For the host machine, we save the xm_file variable as host_xm_file;
2721# then we decode the target machine and forget everything else
2722# that came from the host machine.
2723for machine in $build $host $target; do
2724
2725 out_file=
2726 xmake_file=
2727 tmake_file=
2728 extra_headers=
2729 extra_passes=
2730 extra_parts=
2731 extra_programs=
2732 extra_objs=
2733 extra_host_objs=
2734 extra_gcc_objs=
f6cb0e63 2735 xm_defines=
861bb6c1
JL
2736 float_format=
2737 # Set this to force installation and use of collect2.
2738 use_collect2=
2739 # Set this to override the default target model.
2740 target_cpu_default=
861bb6c1 2741 # Set this to control which fixincludes program to use.
75bffa71 2742 if test x$fast_fixinc != xyes; then
4b104d6e
JL
2743 fixincludes=fixincludes
2744 else fixincludes=fixinc.sh ; fi
861bb6c1
JL
2745 # Set this to control how the header file directory is installed.
2746 install_headers_dir=install-headers-tar
2747 # Set this to a non-empty list of args to pass to cpp if the target
2748 # wants its .md file passed through cpp.
2749 md_cppflags=
2750 # Set this if directory names should be truncated to 14 characters.
2751 truncate_target=
2752 # Set this if gdb needs a dir command with `dirname $out_file`
2753 gdb_needs_out_file_path=
2754 # Set this if the build machine requires executables to have a
2755 # file name suffix.
2756 exeext=
a851212a
JW
2757 # Set this to control which thread package will be used.
2758 thread_file=
df6faf79
JW
2759 # Reinitialize these from the flag values every loop pass, since some
2760 # configure entries modify them.
2761 gas="$gas_flag"
2762 gnu_ld="$gnu_ld_flag"
e445171e 2763 enable_threads=$enable_threads_flag
861bb6c1
JL
2764
2765 # Set default cpu_type, tm_file and xm_file so it can be updated in
2766 # each machine entry.
2767 cpu_type=`echo $machine | sed 's/-.*$//'`
2768 case $machine in
2769 alpha*-*-*)
2770 cpu_type=alpha
2771 ;;
2772 arm*-*-*)
2773 cpu_type=arm
2774 ;;
2775 c*-convex-*)
2776 cpu_type=convex
2777 ;;
f6cb0e63 2778 i[34567]86-*-*)
861bb6c1
JL
2779 cpu_type=i386
2780 ;;
2781 hppa*-*-*)
2782 cpu_type=pa
2783 ;;
2784 m68000-*-*)
2785 cpu_type=m68k
2786 ;;
2787 mips*-*-*)
2788 cpu_type=mips
2789 ;;
2790 powerpc*-*-*)
2791 cpu_type=rs6000
2792 ;;
2793 pyramid-*-*)
2794 cpu_type=pyr
2795 ;;
2796 sparc*-*-*)
2797 cpu_type=sparc
2798 ;;
2799 esac
2800
2801 tm_file=${cpu_type}/${cpu_type}.h
2802 xm_file=${cpu_type}/xm-${cpu_type}.h
2803
f6cb0e63
JL
2804 # Set the default macros to define for GNU/Linux systems.
2805 case $machine in
2806 *-*-linux-gnu*)
c7391272 2807 xm_defines="HAVE_ATEXIT POSIX BSTRING"
f6cb0e63
JL
2808 ;;
2809 esac
2810
861bb6c1
JL
2811 case $machine in
2812 # Support site-specific machine types.
2813 *local*)
2814 cpu_type=`echo $machine | sed -e 's/-.*//'`
2815 rest=`echo $machine | sed -e "s/$cpu_type-//"`
2816 xm_file=${cpu_type}/xm-$rest.h
2817 tm_file=${cpu_type}/$rest.h
75bffa71 2818 if test -f $srcdir/config/${cpu_type}/x-$rest; \
861bb6c1
JL
2819 then xmake_file=${cpu_type}/x-$rest; \
2820 else true; \
2821 fi
75bffa71 2822 if test -f $srcdir/config/${cpu_type}/t-$rest; \
861bb6c1
JL
2823 then tmake_file=${cpu_type}/t-$rest; \
2824 else true; \
2825 fi
2826 ;;
2827 1750a-*-*)
2828 ;;
2829 a29k-*-bsd* | a29k-*-sym1*)
2830 tm_file="${tm_file} a29k/unix.h"
f6cb0e63 2831 xm_defines=USG
861bb6c1
JL
2832 xmake_file=a29k/x-unix
2833 use_collect2=yes
2834 ;;
2835 a29k-*-udi | a29k-*-coff)
2836 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
2837 tmake_file=a29k/t-a29kbare
2838 ;;
7cc34889 2839 a29k-wrs-vxworks*)
861bb6c1
JL
2840 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
2841 tmake_file=a29k/t-vx29k
2842 extra_parts="crtbegin.o crtend.o"
7cc34889 2843 thread_file='vxworks'
861bb6c1
JL
2844 ;;
2845 a29k-*-*) # Default a29k environment.
2846 use_collect2=yes
2847 ;;
2848 alpha*-*-linux-gnuecoff*)
8983c716 2849 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
f6cb0e63 2850 target_cpu_default="MASK_GAS"
861bb6c1
JL
2851 gas=no
2852 xmake_file=none
861bb6c1
JL
2853 gas=yes gnu_ld=yes
2854 ;;
2601ebca 2855 alpha*-*-linux-gnulibc1*)
9d654bba 2856 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
f6cb0e63 2857 target_cpu_default="MASK_GAS"
574badbc
RH
2858 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
2859 extra_parts="crtbegin.o crtend.o"
9d654bba 2860 fixincludes=fixinc.wrap
2601ebca 2861 xmake_file=none
2601ebca 2862 gas=yes gnu_ld=yes
75bffa71 2863 if test x$enable_threads = xyes; then
2601ebca
JL
2864 thread_file='posix'
2865 fi
2866 ;;
861bb6c1 2867 alpha*-*-linux-gnu*)
9d654bba 2868 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
f6cb0e63 2869 target_cpu_default="MASK_GAS"
574badbc
RH
2870 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
2871 extra_parts="crtbegin.o crtend.o"
861bb6c1
JL
2872 xmake_file=none
2873 fixincludes=Makefile.in
861bb6c1 2874 gas=yes gnu_ld=yes
75bffa71 2875 if test x$enable_threads = xyes; then
861bb6c1
JL
2876 thread_file='posix'
2877 fi
2878 ;;
9d654bba 2879 alpha*-*-netbsd*)
66953094 2880 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
9d654bba
RH
2881 target_cpu_default="MASK_GAS"
2882 tmake_file="alpha/t-crtbe"
2883 extra_parts="crtbegin.o crtend.o"
2884 xmake_file=none
2885 fixincludes=fixinc.wrap
2886 gas=yes gnu_ld=yes
2887 ;;
2888
e9a25f70 2889 alpha*-dec-osf*)
75bffa71 2890 if test x$stabs = xyes
861bb6c1
JL
2891 then
2892 tm_file="${tm_file} dbx.h"
2893 fi
75bffa71 2894 if test x$gas != xyes
861bb6c1
JL
2895 then
2896 extra_passes="mips-tfile mips-tdump"
2897 fi
861bb6c1 2898 use_collect2=yes
861bb6c1 2899 case $machine in
6ecd4e53 2900 *-*-osf1*)
b0435cf4 2901 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
e9a25f70
JL
2902 ;;
2903 *-*-osf[23]*)
b0435cf4 2904 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
e9a25f70
JL
2905 ;;
2906 *-*-osf4*)
b0435cf4 2907 tm_file="${tm_file} alpha/osf.h"
e9a25f70
JL
2908 # Some versions of OSF4 (specifically X4.0-9 296.7) have
2909 # a broken tar, so we use cpio instead.
861bb6c1
JL
2910 install_headers_dir=install-headers-cpio
2911 ;;
2912 esac
e9a25f70
JL
2913 case $machine in
2914 *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
2915 target_cpu_default=MASK_SUPPORT_ARCH
2916 ;;
2917 esac
861bb6c1 2918 ;;
9ec36da5
JL
2919 alpha*-*-vxworks*)
2920 tm_file="${tm_file} dbx.h alpha/vxworks.h"
2921 if x$gas != xyes
2922 then
2923 extra_passes="mips-tfile mips-tdump"
2924 fi
2925 use_collect2=yes
2926 ;;
b0435cf4 2927 alpha*-*-winnt*)
861bb6c1 2928 tm_file="${tm_file} alpha/win-nt.h"
861bb6c1
JL
2929 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
2930 tmake_file=t-libc-ok
2931 xmake_file=winnt/x-winnt
2932 extra_host_objs=oldnames.o
2933 extra_gcc_objs="spawnv.o oldnames.o"
2934 fixincludes=fixinc.winnt
75bffa71 2935 if test x$gnu_ld != xyes
861bb6c1
JL
2936 then
2937 extra_programs=ld.exe
2938 fi
75bffa71 2939 if test x$enable_threads = xyes; then
861bb6c1
JL
2940 thread_file='win32'
2941 fi
2942 ;;
2943 alpha*-dec-vms*)
2944 tm_file=alpha/vms.h
2945 xm_file="${xm_file} alpha/xm-vms.h"
2946 tmake_file=alpha/t-vms
2947 fixincludes=Makefile.in
2948 ;;
66ed0683
JL
2949 arc-*-elf*)
2950 extra_parts="crtinit.o crtfini.o"
2951 ;;
861bb6c1
JL
2952 arm-*-coff* | armel-*-coff*)
2953 tm_file=arm/coff.h
2954 tmake_file=arm/t-bare
2955 ;;
2956 arm-*-riscix1.[01]*) # Acorn RISC machine (early versions)
2957 tm_file=arm/riscix1-1.h
2958 use_collect2=yes
2959 ;;
2960 arm-*-riscix*) # Acorn RISC machine
75bffa71 2961 if test x$gas = xyes
861bb6c1
JL
2962 then
2963 tm_file=arm/rix-gas.h
2964 else
2965 tm_file=arm/riscix.h
2966 fi
2967 xmake_file=arm/x-riscix
2968 tmake_file=arm/t-riscix
2969 use_collect2=yes
2970 ;;
2971 arm-semi-aout | armel-semi-aout)
2972 tm_file=arm/semi.h
2973 tmake_file=arm/t-semi
2974 fixincludes=Makefile.in # There is nothing to fix
2975 ;;
2976 arm-semi-aof | armel-semi-aof)
2977 tm_file=arm/semiaof.h
2978 tmake_file=arm/t-semiaof
2979 fixincludes=Makefile.in # There is nothing to fix
2980 ;;
58600d24 2981 arm*-*-netbsd*)
861bb6c1 2982 tm_file=arm/netbsd.h
641d4216 2983 xm_file="arm/xm-netbsd.h ${xm_file}"
e9a25f70 2984 tmake_file="t-netbsd arm/t-netbsd"
be1ed94f 2985 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 2986 fixincludes=fixinc.wrap
861bb6c1 2987 ;;
b355a481 2988 arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
861bb6c1 2989 cpu_type=arm
861bb6c1 2990 xmake_file=x-linux
b355a481 2991 tm_file=arm/linux-aout.h
861bb6c1
JL
2992 tmake_file=arm/t-linux
2993 fixincludes=Makefile.in
861bb6c1
JL
2994 gnu_ld=yes
2995 ;;
b355a481
NC
2996 arm*-*-linux-gnu*) # ARM GNU/Linux with ELF
2997 xm_file=arm/xm-linux.h
2998 xmake_file=x-linux
2999 case $machine in
3000 armv2*-*-*)
3001 tm_file=arm/linux-elf26.h
3002 ;;
3003 *)
3004 tm_file=arm/linux-elf.h
3005 ;;
3006 esac
3007 tmake_file="t-linux arm/t-linux"
3008 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3009 fixincludes=Makefile.in # Nothing to fix
3010 gnu_ld=yes
3011 ;;
3012 arm*-*-aout)
861bb6c1 3013 tm_file=arm/aout.h
e9a25f70 3014 tmake_file=arm/t-bare
861bb6c1 3015 ;;
e6592fff 3016 arm*-*-ecos-elf)
54953b66
UD
3017 tm_file=arm/ecos-elf.h
3018 tmake_file=arm/t-elf
3019 ;;
b355a481
NC
3020 arm*-*-elf)
3021 tm_file=arm/unknown-elf.h
3022 tmake_file=arm/t-arm-elf
3023 ;;
861bb6c1
JL
3024 c1-convex-*) # Convex C1
3025 target_cpu_default=1
3026 use_collect2=yes
3027 fixincludes=Makefile.in
3028 ;;
3029 c2-convex-*) # Convex C2
3030 target_cpu_default=2
3031 use_collect2=yes
3032 fixincludes=Makefile.in
3033 ;;
3034 c32-convex-*)
3035 target_cpu_default=4
3036 use_collect2=yes
3037 fixincludes=Makefile.in
3038 ;;
3039 c34-convex-*)
3040 target_cpu_default=8
3041 use_collect2=yes
3042 fixincludes=Makefile.in
3043 ;;
3044 c38-convex-*)
3045 target_cpu_default=16
3046 use_collect2=yes
3047 fixincludes=Makefile.in
3048 ;;
62616695
MH
3049 c4x-*)
3050 cpu_type=c4x
3051 tmake_file=c4x/t-c4x
3052 ;;
861bb6c1
JL
3053 clipper-intergraph-clix*)
3054 tm_file="${tm_file} svr3.h clipper/clix.h"
3055 xm_file=clipper/xm-clix.h
3056 xmake_file=clipper/x-clix
3057 extra_headers=va-clipper.h
3058 extra_parts="crtbegin.o crtend.o"
3059 install_headers_dir=install-headers-cpio
861bb6c1
JL
3060 ;;
3061 dsp16xx-*)
3062 ;;
3063 elxsi-elxsi-*)
3064 use_collect2=yes
3065 ;;
3066# This hasn't been upgraded to GCC 2.
3067# fx80-alliant-*) # Alliant FX/80
3068# ;;
3069 h8300-*-*)
3070 float_format=i32
3071 ;;
3072 hppa1.1-*-pro*)
3073 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
3074 xm_file=pa/xm-papro.h
3075 tmake_file=pa/t-pro
3076 ;;
3077 hppa1.1-*-osf*)
3078 target_cpu_default=1
3079 tm_file="${tm_file} pa/pa-osf.h"
3080 use_collect2=yes
3081 fixincludes=Makefile.in
3082 ;;
3083 hppa1.1-*-rtems*)
3084 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
3085 xm_file=pa/xm-papro.h
3086 tmake_file=pa/t-pro
3087 ;;
3088 hppa1.0-*-osf*)
3089 tm_file="${tm_file} pa/pa-osf.h"
3090 use_collect2=yes
3091 fixincludes=Makefile.in
3092 ;;
3093 hppa1.1-*-bsd*)
3094 target_cpu_default=1
3095 use_collect2=yes
3096 fixincludes=Makefile.in
3097 ;;
3098 hppa1.0-*-bsd*)
3099 use_collect2=yes
3100 fixincludes=Makefile.in
3101 ;;
3102 hppa1.0-*-hpux7*)
3103 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
3104 xm_file=pa/xm-pahpux.h
3105 xmake_file=pa/x-pa-hpux
75bffa71 3106 if test x$gas = xyes
861bb6c1
JL
3107 then
3108 tm_file="${tm_file} pa/gas.h"
3109 fi
861bb6c1
JL
3110 install_headers_dir=install-headers-cpio
3111 use_collect2=yes
3112 ;;
3113 hppa1.0-*-hpux8.0[0-2]*)
3114 tm_file="${tm_file} pa/pa-hpux.h"
3115 xm_file=pa/xm-pahpux.h
3116 xmake_file=pa/x-pa-hpux
75bffa71 3117 if test x$gas = xyes
861bb6c1
JL
3118 then
3119 tm_file="${tm_file} pa/pa-gas.h"
3120 else
3121 tm_file="pa/pa-oldas.h ${tm_file}"
3122 fi
861bb6c1
JL
3123 install_headers_dir=install-headers-cpio
3124 use_collect2=yes
3125 ;;
3126 hppa1.1-*-hpux8.0[0-2]*)
3127 target_cpu_default=1
3128 tm_file="${tm_file} pa/pa-hpux.h"
3129 xm_file=pa/xm-pahpux.h
3130 xmake_file=pa/x-pa-hpux
75bffa71 3131 if test x$gas = xyes
861bb6c1
JL
3132 then
3133 tm_file="${tm_file} pa/pa-gas.h"
3134 else
3135 tm_file="pa/pa-oldas.h ${tm_file}"
3136 fi
861bb6c1
JL
3137 install_headers_dir=install-headers-cpio
3138 use_collect2=yes
3139 ;;
3140 hppa1.1-*-hpux8*)
3141 target_cpu_default=1
3142 tm_file="${tm_file} pa/pa-hpux.h"
3143 xm_file=pa/xm-pahpux.h
3144 xmake_file=pa/x-pa-hpux
75bffa71 3145 if test x$gas = xyes
861bb6c1
JL
3146 then
3147 tm_file="${tm_file} pa/pa-gas.h"
3148 fi
861bb6c1
JL
3149 install_headers_dir=install-headers-cpio
3150 use_collect2=yes
3151 ;;
3152 hppa1.0-*-hpux8*)
3153 tm_file="${tm_file} pa/pa-hpux.h"
3154 xm_file=pa/xm-pahpux.h
3155 xmake_file=pa/x-pa-hpux
75bffa71 3156 if test x$gas = xyes
861bb6c1
JL
3157 then
3158 tm_file="${tm_file} pa/pa-gas.h"
3159 fi
861bb6c1
JL
3160 install_headers_dir=install-headers-cpio
3161 use_collect2=yes
3162 ;;
18cae839 3163 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
861bb6c1
JL
3164 target_cpu_default=1
3165 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3166 xm_file=pa/xm-pahpux.h
3167 xmake_file=pa/x-pa-hpux
f24af81b 3168 tmake_file=pa/t-pa
75bffa71 3169 if test x$gas = xyes
861bb6c1
JL
3170 then
3171 tm_file="${tm_file} pa/pa-gas.h"
3172 fi
75bffa71 3173 if test x$enable_threads = x; then
f24af81b
TT
3174 enable_threads=$have_pthread_h
3175 fi
75bffa71 3176 if test x$enable_threads = xyes; then
f24af81b
TT
3177 thread_file='dce'
3178 tmake_file="${tmake_file} pa/t-dce-thr"
3179 fi
861bb6c1
JL
3180 install_headers_dir=install-headers-cpio
3181 use_collect2=yes
3182 ;;
3183 hppa1.0-*-hpux10*)
3184 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3185 xm_file=pa/xm-pahpux.h
3186 xmake_file=pa/x-pa-hpux
75bffa71 3187 if test x$gas = xyes
861bb6c1
JL
3188 then
3189 tm_file="${tm_file} pa/pa-gas.h"
3190 fi
75bffa71 3191 if test x$enable_threads = x; then
d005a5a4
JL
3192 enable_threads=$have_pthread_h
3193 fi
75bffa71 3194 if test x$enable_threads = xyes; then
d005a5a4
JL
3195 thread_file='dce'
3196 tmake_file="${tmake_file} pa/t-dce-thr"
3197 fi
861bb6c1
JL
3198 install_headers_dir=install-headers-cpio
3199 use_collect2=yes
3200 ;;
18cae839 3201 hppa1.1-*-hpux* | hppa2*-*-hpux*)
861bb6c1
JL
3202 target_cpu_default=1
3203 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3204 xm_file=pa/xm-pahpux.h
3205 xmake_file=pa/x-pa-hpux
75bffa71 3206 if test x$gas = xyes
861bb6c1
JL
3207 then
3208 tm_file="${tm_file} pa/pa-gas.h"
3209 fi
861bb6c1
JL
3210 install_headers_dir=install-headers-cpio
3211 use_collect2=yes
3212 ;;
3213 hppa1.0-*-hpux*)
3214 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3215 xm_file=pa/xm-pahpux.h
3216 xmake_file=pa/x-pa-hpux
75bffa71 3217 if test x$gas = xyes
861bb6c1
JL
3218 then
3219 tm_file="${tm_file} pa/pa-gas.h"
3220 fi
861bb6c1
JL
3221 install_headers_dir=install-headers-cpio
3222 use_collect2=yes
3223 ;;
18cae839 3224 hppa1.1-*-hiux* | hppa2*-*-hiux*)
861bb6c1
JL
3225 target_cpu_default=1
3226 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3227 xm_file=pa/xm-pahpux.h
3228 xmake_file=pa/x-pa-hpux
75bffa71 3229 if test x$gas = xyes
861bb6c1
JL
3230 then
3231 tm_file="${tm_file} pa/pa-gas.h"
3232 fi
861bb6c1
JL
3233 install_headers_dir=install-headers-cpio
3234 use_collect2=yes
3235 ;;
3236 hppa1.0-*-hiux*)
3237 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3238 xm_file=pa/xm-pahpux.h
3239 xmake_file=pa/x-pa-hpux
75bffa71 3240 if test x$gas = xyes
861bb6c1
JL
3241 then
3242 tm_file="${tm_file} pa/pa-gas.h"
3243 fi
861bb6c1
JL
3244 install_headers_dir=install-headers-cpio
3245 use_collect2=yes
3246 ;;
3247 hppa*-*-lites*)
3248 target_cpu_default=1
3249 use_collect2=yes
3250 fixincludes=Makefile.in
3251 ;;
3252 i370-*-mvs*)
3253 ;;
f6cb0e63 3254 i[34567]86-ibm-aix*) # IBM PS/2 running AIX
75bffa71 3255 if test x$gas = xyes
861bb6c1
JL
3256 then
3257 tm_file=i386/aix386.h
3258 extra_parts="crtbegin.o crtend.o"
3259 tmake_file=i386/t-crtstuff
3260 else
3261 tm_file=i386/aix386ng.h
3262 use_collect2=yes
3263 fi
f6cb0e63
JL
3264 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
3265 xm_defines=USG
861bb6c1 3266 xmake_file=i386/x-aix
861bb6c1 3267 ;;
75bffa71 3268 i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
f6cb0e63
JL
3269 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3270 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1 3271 xmake_file=i386/x-ncr3000
75bffa71 3272 if test x$stabs = xyes -a x$gas = xyes
861bb6c1
JL
3273 then
3274 tm_file=i386/sysv4gdb.h
3275 else
3276 tm_file=i386/sysv4.h
3277 fi
3278 extra_parts="crtbegin.o crtend.o"
3279 tmake_file=i386/t-crtpic
3280 ;;
f6cb0e63 3281 i[34567]86-next-*)
861bb6c1
JL
3282 tm_file=i386/next.h
3283 xm_file=i386/xm-next.h
3284 tmake_file=i386/t-next
3285 xmake_file=i386/x-next
3286 extra_objs=nextstep.o
750930c1 3287 extra_parts="crtbegin.o crtend.o"
75bffa71 3288 if test x$enable_threads = xyes; then
861bb6c1
JL
3289 thread_file='mach'
3290 fi
3291 ;;
f6cb0e63 3292 i[34567]86-sequent-bsd*) # 80386 from Sequent
861bb6c1 3293 use_collect2=yes
75bffa71 3294 if test x$gas = xyes
861bb6c1
JL
3295 then
3296 tm_file=i386/seq-gas.h
3297 else
3298 tm_file=i386/sequent.h
3299 fi
3300 ;;
f6cb0e63
JL
3301 i[34567]86-sequent-ptx1*)
3302 xm_defines="USG SVR3"
861bb6c1
JL
3303 xmake_file=i386/x-sysv3
3304 tm_file=i386/seq-sysv3.h
3305 tmake_file=i386/t-crtstuff
3306 fixincludes=fixinc.ptx
3307 extra_parts="crtbegin.o crtend.o"
3308 install_headers_dir=install-headers-cpio
861bb6c1 3309 ;;
f6cb0e63
JL
3310 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
3311 xm_defines="USG SVR3"
861bb6c1
JL
3312 xmake_file=i386/x-sysv3
3313 tm_file=i386/seq2-sysv3.h
3314 tmake_file=i386/t-crtstuff
3315 extra_parts="crtbegin.o crtend.o"
3316 fixincludes=fixinc.ptx
3317 install_headers_dir=install-headers-cpio
861bb6c1 3318 ;;
f6cb0e63
JL
3319 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
3320 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3321 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1
JL
3322 xmake_file=x-svr4
3323 tm_file=i386/ptx4-i.h
3324 tmake_file=t-svr4
3325 extra_parts="crtbegin.o crtend.o"
3326 fixincludes=fixinc.ptx
3327 install_headers_dir=install-headers-cpio
861bb6c1
JL
3328 ;;
3329 i386-sun-sunos*) # Sun i386 roadrunner
f6cb0e63 3330 xm_defines=USG
861bb6c1
JL
3331 tm_file=i386/sun.h
3332 use_collect2=yes
3333 ;;
62db76ee 3334 i[34567]86-wrs-vxworks*)
9e89df50
MS
3335 tm_file=i386/vxi386.h
3336 tmake_file=i386/t-i386bare
3337 ;;
f6cb0e63 3338 i[34567]86-*-aout*)
861bb6c1
JL
3339 tm_file=i386/i386-aout.h
3340 tmake_file=i386/t-i386bare
3341 ;;
f6cb0e63 3342 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
861bb6c1 3343 tm_file=i386/bsd386.h
861bb6c1
JL
3344# tmake_file=t-libc-ok
3345 ;;
f6cb0e63 3346 i[34567]86-*-bsd*)
861bb6c1 3347 tm_file=i386/386bsd.h
861bb6c1
JL
3348# tmake_file=t-libc-ok
3349# Next line turned off because both 386BSD and BSD/386 use GNU ld.
3350# use_collect2=yes
3351 ;;
f6cb0e63 3352 i[34567]86-*-freebsdelf*)
861bb6c1 3353 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
be1ed94f 3354 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 3355 fixincludes=fixinc.wrap
56830143 3356 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
861bb6c1
JL
3357 tmake_file=i386/t-freebsd
3358 gas=yes
3359 gnu_ld=yes
3360 stabs=yes
3361 ;;
f6cb0e63 3362 i[34567]86-*-freebsd*)
861bb6c1 3363 tm_file=i386/freebsd.h
ca55abae 3364 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 3365 fixincludes=fixinc.wrap
861bb6c1
JL
3366 tmake_file=i386/t-freebsd
3367 ;;
31f0adf8
JL
3368 # We are hoping OpenBSD is still close enough to NetBSD that we can
3369 # share the configurations.
3370 i[34567]86-*-netbsd* | i[34567]86-*-openbsd*)
861bb6c1 3371 tm_file=i386/netbsd.h
be1ed94f 3372 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 3373 fixincludes=fixinc.wrap
861bb6c1
JL
3374 tmake_file=t-netbsd
3375 ;;
f6cb0e63 3376 i[34567]86-*-coff*)
861bb6c1
JL
3377 tm_file=i386/i386-coff.h
3378 tmake_file=i386/t-i386bare
3379 ;;
f6cb0e63
JL
3380 i[34567]86-*-isc*) # 80386 running ISC system
3381 xm_file="${xm_file} i386/xm-isc.h"
3382 xm_defines="USG SVR3"
861bb6c1 3383 case $machine in
f6cb0e63 3384 i[34567]86-*-isc[34]*)
861bb6c1
JL
3385 xmake_file=i386/x-isc3
3386 ;;
3387 *)
3388 xmake_file=i386/x-isc
3389 ;;
3390 esac
75bffa71 3391 if test x$gas = xyes -a x$stabs = xyes
861bb6c1
JL
3392 then
3393 tm_file=i386/iscdbx.h
3394 tmake_file=i386/t-svr3dbx
3395 extra_parts="svr3.ifile svr3z.ifile"
3396 else
3397 tm_file=i386/isccoff.h
3398 tmake_file=i386/t-crtstuff
3399 extra_parts="crtbegin.o crtend.o"
3400 fi
3401 install_headers_dir=install-headers-cpio
861bb6c1 3402 ;;
f6cb0e63 3403 i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
f6cb0e63 3404 # pre BFD linkers
861bb6c1
JL
3405 xmake_file=x-linux-aout
3406 tmake_file="t-linux-aout i386/t-crtstuff"
3407 tm_file=i386/linux-oldld.h
3408 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 3409 gnu_ld=yes
af39d8f5 3410 float_format=i386
861bb6c1 3411 ;;
f6cb0e63 3412 i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
861bb6c1
JL
3413 xmake_file=x-linux-aout
3414 tmake_file="t-linux-aout i386/t-crtstuff"
3415 tm_file=i386/linux-aout.h
3416 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 3417 gnu_ld=yes
af39d8f5 3418 float_format=i386
861bb6c1 3419 ;;
f6cb0e63 3420 i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
f6cb0e63
JL
3421 # GNU/Linux C library 5
3422 xmake_file=x-linux
3423 tm_file=i386/linux.h
861bb6c1
JL
3424 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
3425 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3426 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 3427 gnu_ld=yes
af39d8f5 3428 float_format=i386
75bffa71 3429 if test x$enable_threads = xyes; then
861bb6c1
JL
3430 thread_file='single'
3431 fi
3432 ;;
f6cb0e63 3433 i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
f6cb0e63
JL
3434 # aka GNU/Linux C library 6
3435 xmake_file=x-linux
861bb6c1
JL
3436 tm_file=i386/linux.h
3437 tmake_file="t-linux i386/t-crtstuff"
3438 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3439 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 3440 gnu_ld=yes
af39d8f5 3441 float_format=i386
75bffa71 3442 if test x$enable_threads = xyes; then
861bb6c1
JL
3443 thread_file='posix'
3444 fi
3445 ;;
f6cb0e63
JL
3446 i[34567]86-*-gnu*)
3447 ;;
3448 i[34567]86-go32-msdos | i[34567]86-*-go32*)
3449 xm_file=i386/xm-go32.h
3450 tm_file=i386/go32.h
3451 tmake_file=i386/t-go32
861bb6c1 3452 ;;
f6cb0e63 3453 i[34567]86-pc-msdosdjgpp*)
861bb6c1
JL
3454 xm_file=i386/xm-go32.h
3455 tm_file=i386/go32.h
3456 tmake_file=i386/t-go32
90e6a802 3457 xmake_file=i386/x-go32
f6cb0e63
JL
3458 gnu_ld=yes
3459 gas=yes
dedcc399
ME
3460 exeext=.exe
3461 case $host in
3462 *pc-msdosdjgpp*)
3463 target_alias=djgpp
3464 ;;
3465 esac
861bb6c1 3466 ;;
f6cb0e63 3467 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
861bb6c1
JL
3468 tm_file=i386/moss.h
3469 tmake_file=t-libc-ok
3470 fixincludes=Makefile.in
3471 gnu_ld=yes
3472 gas=yes
3473 ;;
f6cb0e63 3474 i[34567]86-*-lynxos*)
75bffa71 3475 if test x$gas = xyes
861bb6c1
JL
3476 then
3477 tm_file=i386/lynx.h
3478 else
3479 tm_file=i386/lynx-ng.h
3480 fi
3481 xm_file=i386/xm-lynx.h
3482 tmake_file=i386/t-i386bare
3483 xmake_file=x-lynx
3484 ;;
f6cb0e63 3485 i[34567]86-*-mach*)
861bb6c1
JL
3486 tm_file=i386/mach.h
3487# tmake_file=t-libc-ok
3488 use_collect2=yes
3489 ;;
f6cb0e63 3490 i[34567]86-*-osfrose*) # 386 using OSF/rose
75bffa71 3491 if test x$elf = xyes
861bb6c1
JL
3492 then
3493 tm_file=i386/osfelf.h
3494 use_collect2=
3495 else
3496 tm_file=i386/osfrose.h
3497 use_collect2=yes
3498 fi
f6cb0e63 3499 xm_file="i386/xm-osf.h ${xm_file}"
861bb6c1
JL
3500 xmake_file=i386/x-osfrose
3501 tmake_file=i386/t-osf
3502 extra_objs=halfpic.o
3503 ;;
f6cb0e63 3504 i[34567]86-go32-rtems*)
861bb6c1
JL
3505 cpu_type=i386
3506 xm_file=i386/xm-go32.h
3507 tm_file=i386/go32-rtems.h
3508 tmake_file="i386/t-go32 t-rtems"
3509 ;;
f5963e61
JL
3510 i[34567]86-*-rtemself*)
3511 cpu_type=i386
3512 tm_file=i386/rtemself.h
3513 tmake_file="i386/t-i386bare t-rtems"
3514 ;;
f6cb0e63 3515 i[34567]86-*-rtems*)
861bb6c1
JL
3516 cpu_type=i386
3517 tm_file=i386/rtems.h
3518 tmake_file="i386/t-i386bare t-rtems"
3519 ;;
f6cb0e63
JL
3520 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
3521 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
3522 xm_defines="USG SVR3"
861bb6c1
JL
3523 xmake_file=i386/x-sco5
3524 fixincludes=fixinc.sco
f6857708 3525 install_headers_dir=install-headers-cpio
861bb6c1 3526 tm_file=i386/sco5.h
75bffa71 3527 if test x$gas = xyes
44bb0e93
RL
3528 then
3529 tm_file="i386/sco5gas.h ${tm_file}"
3530 tmake_file=i386/t-sco5gas
3531 else
3532 tmake_file=i386/t-sco5
3533 fi
861bb6c1
JL
3534 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3535 ;;
f6cb0e63
JL
3536 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
3537 xm_file="${xm_file} i386/xm-sco.h"
3538 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
861bb6c1
JL
3539 xmake_file=i386/x-sco4
3540 fixincludes=fixinc.sco
861bb6c1 3541 install_headers_dir=install-headers-cpio
75bffa71 3542 if test x$stabs = xyes
861bb6c1
JL
3543 then
3544 tm_file=i386/sco4dbx.h
3545 tmake_file=i386/t-svr3dbx
3546 extra_parts="svr3.ifile svr3z.rfile"
3547 else
3548 tm_file=i386/sco4.h
3549 tmake_file=i386/t-crtstuff
3550 extra_parts="crtbegin.o crtend.o"
3551 fi
3552 truncate_target=yes
3553 ;;
f6cb0e63 3554 i[34567]86-*-sco*) # 80386 running SCO system
861bb6c1
JL
3555 xm_file=i386/xm-sco.h
3556 xmake_file=i386/x-sco
861bb6c1 3557 install_headers_dir=install-headers-cpio
75bffa71 3558 if test x$stabs = xyes
861bb6c1
JL
3559 then
3560 tm_file=i386/scodbx.h
3561 tmake_file=i386/t-svr3dbx
3562 extra_parts="svr3.ifile svr3z.rfile"
3563 else
3564 tm_file=i386/sco.h
3565 extra_parts="crtbegin.o crtend.o"
3566 tmake_file=i386/t-crtstuff
3567 fi
3568 truncate_target=yes
3569 ;;
f6cb0e63
JL
3570 i[34567]86-*-solaris2*)
3571 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3572 xm_defines="USG POSIX SMALL_ARG_MAX"
75bffa71 3573 if test x$stabs = xyes
861bb6c1
JL
3574 then
3575 tm_file=i386/sol2dbg.h
3576 else
3577 tm_file=i386/sol2.h
3578 fi
3579 tmake_file=i386/t-sol2
f6cb0e63 3580 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
861bb6c1 3581 xmake_file=x-svr4
f6cb0e63
JL
3582 case $machine in
3583 *-*-solaris2.[0-4])
3584 fixincludes=fixinc.svr4;;
3585 *)
32f65aa0 3586 fixincludes=fixinc.wrap;;
f6cb0e63 3587 esac
75bffa71 3588 if test x$enable_threads = xyes; then
861bb6c1
JL
3589 thread_file='solaris'
3590 fi
3591 ;;
f6cb0e63 3592 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
48a51bf4
RL
3593 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3594 xm_defines="USG POSIX"
fe07d4c1 3595 tm_file=i386/sysv4.h
75bffa71 3596 if test x$stabs = xyes
fe07d4c1
RL
3597 then
3598 tm_file="${tm_file} dbx.h"
3599 fi
3600 tmake_file=i386/t-crtpic
3601 xmake_file=x-svr4
3602 extra_parts="crtbegin.o crtend.o"
823642df 3603 fixincludes=fixinc.svr4
fe07d4c1 3604 ;;
f6cb0e63
JL
3605 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
3606 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3607 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1 3608 tm_file=i386/sysv4.h
75bffa71 3609 if test x$stabs = xyes
861bb6c1
JL
3610 then
3611 tm_file="${tm_file} dbx.h"
3612 fi
3613 tmake_file=i386/t-crtpic
3614 xmake_file=x-svr4
3615 extra_parts="crtbegin.o crtend.o"
3616 ;;
112674fa
RL
3617 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
3618 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3619 xm_defines="USG POSIX"
3620 tm_file=i386/udk.h
3621 tmake_file="i386/t-crtpic i386/t-udk"
3622 xmake_file=x-svr4
3623 extra_parts="crtbegin.o crtend.o"
3624 fixincludes="fixinc.svr4"
3625 ;;
f5963e61
JL
3626 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
3627 cpu_type=i386
3628 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
3629 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
3630 fixincludes=Makefile.in #Don't do it on OSF/1
75bffa71 3631 if test x$stabs = xyes
f5963e61
JL
3632 then
3633 tm_file=i386/osf1elfgdb.h
3634 else
3635 tm_file=i386/osf1elf.h
3636 fi
3637 tmake_file=i386/t-osf1elf
3638 xmake_file=i386/x-osf1elf
3639 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3640 ;;
f6cb0e63
JL
3641 i[34567]86-*-sysv*) # Intel 80386's running system V
3642 xm_defines="USG SVR3"
861bb6c1 3643 xmake_file=i386/x-sysv3
75bffa71 3644 if test x$gas = xyes
861bb6c1 3645 then
75bffa71 3646 if test x$stabs = xyes
861bb6c1
JL
3647 then
3648 tm_file=i386/svr3dbx.h
3649 tmake_file=i386/t-svr3dbx
3650 extra_parts="svr3.ifile svr3z.rfile"
3651 else
3652 tm_file=i386/svr3gas.h
3653 extra_parts="crtbegin.o crtend.o"
3654 tmake_file=i386/t-crtstuff
3655 fi
3656 else
3657 tm_file=i386/sysv3.h
3658 extra_parts="crtbegin.o crtend.o"
3659 tmake_file=i386/t-crtstuff
3660 fi
3661 ;;
3662 i386-*-vsta) # Intel 80386's running VSTa kernel
f5963e61 3663 xm_file="${xm_file} i386/xm-vsta.h"
861bb6c1
JL
3664 tm_file=i386/vsta.h
3665 tmake_file=i386/t-vsta
3666 xmake_file=i386/x-vsta
3667 ;;
84530511 3668 i[34567]86-*-win32)
cae21ae8
GN
3669 xm_file="${xm_file} i386/xm-cygwin.h"
3670 tmake_file=i386/t-cygwin
84530511 3671 tm_file=i386/win32.h
cae21ae8 3672 xmake_file=i386/x-cygwin
84530511
SC
3673 extra_objs=winnt.o
3674 fixincludes=Makefile.in
75bffa71 3675 if test x$enable_threads = xyes; then
84530511
SC
3676 thread_file='win32'
3677 fi
3678 exeext=.exe
3679 ;;
cae21ae8
GN
3680 i[34567]86-*-pe | i[34567]86-*-cygwin*)
3681 xm_file="${xm_file} i386/xm-cygwin.h"
3682 tmake_file=i386/t-cygwin
3683 tm_file=i386/cygwin.h
3684 xmake_file=i386/x-cygwin
861bb6c1
JL
3685 extra_objs=winnt.o
3686 fixincludes=Makefile.in
75bffa71 3687 if test x$enable_threads = xyes; then
861bb6c1
JL
3688 thread_file='win32'
3689 fi
3690 exeext=.exe
3691 ;;
f6cb0e63 3692 i[34567]86-*-mingw32*)
861bb6c1
JL
3693 tm_file=i386/mingw32.h
3694 xm_file="${xm_file} i386/xm-mingw32.h"
cae21ae8 3695 tmake_file="i386/t-cygwin i386/t-mingw32"
861bb6c1 3696 extra_objs=winnt.o
cae21ae8 3697 xmake_file=i386/x-cygwin
861bb6c1 3698 fixincludes=Makefile.in
75bffa71 3699 if test x$enable_threads = xyes; then
861bb6c1
JL
3700 thread_file='win32'
3701 fi
3702 exeext=.exe
f6cb0e63
JL
3703 case $machine in
3704 *mingw32msv*)
3705 ;;
3706 *minwg32crt* | *mingw32*)
3707 tm_file="${tm_file} i386/crtdll.h"
3708 ;;
3709 esac
861bb6c1 3710 ;;
f6cb0e63 3711 i[34567]86-*-winnt3*)
861bb6c1
JL
3712 tm_file=i386/win-nt.h
3713 out_file=i386/i386.c
f6cb0e63 3714 xm_file="xm-winnt.h ${xm_file}"
861bb6c1
JL
3715 xmake_file=winnt/x-winnt
3716 tmake_file=i386/t-winnt
3717 extra_host_objs="winnt.o oldnames.o"
3718 extra_gcc_objs="spawnv.o oldnames.o"
3719 fixincludes=fixinc.winnt
75bffa71 3720 if test x$gnu_ld != xyes
861bb6c1
JL
3721 then
3722 extra_programs=ld.exe
3723 fi
75bffa71 3724 if test x$enable_threads = xyes; then
861bb6c1
JL
3725 thread_file='win32'
3726 fi
3727 ;;
f6cb0e63
JL
3728 i[34567]86-dg-dgux*)
3729 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3730 xm_defines="USG POSIX"
861bb6c1
JL
3731 out_file=i386/dgux.c
3732 tm_file=i386/dgux.h
3733 tmake_file=i386/t-dgux
3734 xmake_file=i386/x-dgux
9590eb1b 3735 fixincludes=fixinc.dgux
861bb6c1
JL
3736 install_headers_dir=install-headers-cpio
3737 ;;
3738 i860-alliant-*) # Alliant FX/2800
3739 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
956d6950 3740 xm_file="${xm_file}"
861bb6c1
JL
3741 xmake_file=i860/x-fx2800
3742 tmake_file=i860/t-fx2800
3743 extra_parts="crtbegin.o crtend.o"
3744 ;;
3745 i860-*-bsd*)
3746 tm_file="${tm_file} i860/bsd.h"
75bffa71 3747 if test x$gas = xyes
861bb6c1
JL
3748 then
3749 tm_file="${tm_file} i860/bsd-gas.h"
3750 fi
3751 use_collect2=yes
3752 ;;
3753 i860-*-mach*)
3754 tm_file="${tm_file} i860/mach.h"
3755 tmake_file=t-libc-ok
3756 ;;
3757 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
3758 tm_file="${tm_file} svr3.h i860/paragon.h"
f6cb0e63 3759 xm_defines="USG SVR3"
861bb6c1 3760 tmake_file=t-osf
861bb6c1
JL
3761 ;;
3762 i860-*-sysv3*)
3763 tm_file="${tm_file} svr3.h i860/sysv3.h"
f6cb0e63 3764 xm_defines="USG SVR3"
861bb6c1
JL
3765 xmake_file=i860/x-sysv3
3766 extra_parts="crtbegin.o crtend.o"
3767 ;;
3768 i860-*-sysv4*)
3769 tm_file="${tm_file} svr4.h i860/sysv4.h"
f6cb0e63 3770 xm_defines="USG SVR3"
861bb6c1
JL
3771 xmake_file=i860/x-sysv4
3772 tmake_file=t-svr4
3773 extra_parts="crtbegin.o crtend.o"
3774 ;;
3775 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
3776 tm_file="${tm_file} i960/vx960.h"
3777 tmake_file=i960/t-vxworks960
3778 use_collect2=yes
7cc34889 3779 thread_file='vxworks'
861bb6c1 3780 ;;
a0372c94 3781 i960-wrs-vxworks5* | i960-wrs-vxworks)
861bb6c1
JL
3782 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
3783 tmake_file=i960/t-vxworks960
3784 use_collect2=yes
7cc34889 3785 thread_file='vxworks'
861bb6c1
JL
3786 ;;
3787 i960-wrs-vxworks*)
3788 tm_file="${tm_file} i960/vx960.h"
3789 tmake_file=i960/t-vxworks960
3790 use_collect2=yes
7cc34889 3791 thread_file='vxworks'
861bb6c1
JL
3792 ;;
3793 i960-*-coff*)
3794 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
3795 tmake_file=i960/t-960bare
3796 use_collect2=yes
3797 ;;
3798 i960-*-rtems)
3799 tmake_file="i960/t-960bare t-rtems"
3800 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
3801 use_collect2=yes
3802 ;;
3803 i960-*-*) # Default i960 environment.
3804 use_collect2=yes
3805 ;;
3806 m32r-*-elf*)
3807 extra_parts="crtinit.o crtfini.o"
3808 ;;
3809 m68000-convergent-sysv*)
3810 tm_file=m68k/ctix.h
f6cb0e63
JL
3811 xm_file="m68k/xm-3b1.h ${xm_file}"
3812 xm_defines=USG
861bb6c1
JL
3813 use_collect2=yes
3814 extra_headers=math-68881.h
3815 ;;
3816 m68000-hp-bsd*) # HP 9000/200 running BSD
3817 tm_file=m68k/hp2bsd.h
3818 xmake_file=m68k/x-hp2bsd
3819 use_collect2=yes
3820 extra_headers=math-68881.h
3821 ;;
3822 m68000-hp-hpux*) # HP 9000 series 300
f6cb0e63
JL
3823 xm_file="xm_alloca.h ${xm_file}"
3824 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 3825 if test x$gas = xyes
861bb6c1
JL
3826 then
3827 xmake_file=m68k/x-hp320g
3828 tm_file=m68k/hp310g.h
3829 else
3830 xmake_file=m68k/x-hp320
3831 tm_file=m68k/hp310.h
3832 fi
861bb6c1
JL
3833 install_headers_dir=install-headers-cpio
3834 use_collect2=yes
3835 extra_headers=math-68881.h
3836 ;;
3837 m68000-sun-sunos3*)
3838 tm_file=m68k/sun2.h
3839 use_collect2=yes
3840 extra_headers=math-68881.h
3841 ;;
3842 m68000-sun-sunos4*)
3843 tm_file=m68k/sun2o4.h
3844 use_collect2=yes
3845 extra_headers=math-68881.h
3846 ;;
3847 m68000-att-sysv*)
f6cb0e63
JL
3848 xm_file="m68k/xm-3b1.h ${xm_file}"
3849 xm_defines=USG
75bffa71 3850 if test x$gas = xyes
861bb6c1
JL
3851 then
3852 tm_file=m68k/3b1g.h
3853 else
3854 tm_file=m68k/3b1.h
3855 fi
3856 use_collect2=yes
3857 extra_headers=math-68881.h
3858 ;;
3859 m68k-apple-aux*) # Apple Macintosh running A/UX
f6cb0e63 3860 xm_defines="USG AUX"
861bb6c1 3861 tmake_file=m68k/t-aux
861bb6c1
JL
3862 install_headers_dir=install-headers-cpio
3863 extra_headers=math-68881.h
3864 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
3865 tm_file=
75bffa71 3866 if test "$gnu_ld" = yes
861bb6c1
JL
3867 then
3868 tm_file="${tm_file} m68k/auxgld.h"
3869 else
3870 tm_file="${tm_file} m68k/auxld.h"
3871 fi
75bffa71 3872 if test "$gas" = yes
861bb6c1
JL
3873 then
3874 tm_file="${tm_file} m68k/auxgas.h"
3875 else
3876 tm_file="${tm_file} m68k/auxas.h"
3877 fi
3878 tm_file="${tm_file} m68k/a-ux.h"
0a95276e 3879 float_format=m68k
861bb6c1
JL
3880 ;;
3881 m68k-apollo-*)
3882 tm_file=m68k/apollo68.h
3883 xmake_file=m68k/x-apollo68
3884 use_collect2=yes
3885 extra_headers=math-68881.h
0a95276e 3886 float_format=m68k
861bb6c1
JL
3887 ;;
3888 m68k-altos-sysv*) # Altos 3068
75bffa71 3889 if test x$gas = xyes
861bb6c1
JL
3890 then
3891 tm_file=m68k/altos3068.h
f6cb0e63 3892 xm_defines=USG
861bb6c1
JL
3893 else
3894 echo "The Altos is supported only with the GNU assembler" 1>&2
3895 exit 1
3896 fi
3897 extra_headers=math-68881.h
3898 ;;
3899 m68k-bull-sysv*) # Bull DPX/2
75bffa71 3900 if test x$gas = xyes
861bb6c1 3901 then
75bffa71 3902 if test x$stabs = xyes
861bb6c1
JL
3903 then
3904 tm_file=m68k/dpx2cdbx.h
3905 else
3906 tm_file=m68k/dpx2g.h
3907 fi
3908 else
3909 tm_file=m68k/dpx2.h
3910 fi
f6cb0e63
JL
3911 xm_file="xm-alloca.h ${xm_file}"
3912 xm_defines=USG
861bb6c1
JL
3913 xmake_file=m68k/x-dpx2
3914 use_collect2=yes
3915 extra_headers=math-68881.h
3916 ;;
3917 m68k-atari-sysv4*) # Atari variant of V.4.
3918 tm_file=m68k/atari.h
f6cb0e63
JL
3919 xm_file="xm-alloca.h ${xm_file}"
3920 xm_defines="USG FULL_PROTOTYPES"
861bb6c1
JL
3921 tmake_file=t-svr4
3922 extra_parts="crtbegin.o crtend.o"
3923 extra_headers=math-68881.h
0a95276e 3924 float_format=m68k
861bb6c1
JL
3925 ;;
3926 m68k-motorola-sysv*)
3927 tm_file=m68k/mot3300.h
f6cb0e63
JL
3928 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
3929 xm_defines=NO_SYS_SIGLIST
75bffa71 3930 if test x$gas = xyes
861bb6c1
JL
3931 then
3932 xmake_file=m68k/x-mot3300-gas
75bffa71 3933 if test x$gnu_ld = xyes
861bb6c1
JL
3934 then
3935 tmake_file=m68k/t-mot3300-gald
3936 else
3937 tmake_file=m68k/t-mot3300-gas
3938 use_collect2=yes
3939 fi
3940 else
3941 xmake_file=m68k/x-mot3300
75bffa71 3942 if test x$gnu_ld = xyes
861bb6c1
JL
3943 then
3944 tmake_file=m68k/t-mot3300-gld
3945 else
3946 tmake_file=m68k/t-mot3300
3947 use_collect2=yes
3948 fi
3949 fi
3950 gdb_needs_out_file_path=yes
3951 extra_parts="crt0.o mcrt0.o"
3952 extra_headers=math-68881.h
0a95276e 3953 float_format=m68k
861bb6c1
JL
3954 ;;
3955 m68k-ncr-sysv*) # NCR Tower 32 SVR3
3956 tm_file=m68k/tower-as.h
f6cb0e63 3957 xm_defines="USG SVR3"
861bb6c1
JL
3958 xmake_file=m68k/x-tower
3959 extra_parts="crtbegin.o crtend.o"
3960 extra_headers=math-68881.h
3961 ;;
3962 m68k-plexus-sysv*)
3963 tm_file=m68k/plexus.h
f6cb0e63
JL
3964 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
3965 xm_defines=USG
861bb6c1
JL
3966 use_collect2=yes
3967 extra_headers=math-68881.h
3968 ;;
3969 m68k-tti-*)
3970 tm_file=m68k/pbb.h
f6cb0e63
JL
3971 xm_file="xm-alloca.h ${xm_file}"
3972 xm_defines=USG
861bb6c1
JL
3973 extra_headers=math-68881.h
3974 ;;
3975 m68k-crds-unos*)
f6cb0e63
JL
3976 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
3977 xm_defines="USG unos"
861bb6c1
JL
3978 xmake_file=m68k/x-crds
3979 tm_file=m68k/crds.h
861bb6c1
JL
3980 use_collect2=yes
3981 extra_headers=math-68881.h
3982 ;;
3983 m68k-cbm-sysv4*) # Commodore variant of V.4.
3984 tm_file=m68k/amix.h
f6cb0e63
JL
3985 xm_file="xm-alloca.h ${xm_file}"
3986 xm_defines="USG FULL_PROTOTYPES"
861bb6c1
JL
3987 xmake_file=m68k/x-amix
3988 tmake_file=t-svr4
3989 extra_parts="crtbegin.o crtend.o"
3990 extra_headers=math-68881.h
0a95276e 3991 float_format=m68k
861bb6c1
JL
3992 ;;
3993 m68k-ccur-rtu)
3994 tm_file=m68k/ccur-GAS.h
3995 xmake_file=m68k/x-ccur
3996 extra_headers=math-68881.h
3997 use_collect2=yes
0a95276e 3998 float_format=m68k
861bb6c1
JL
3999 ;;
4000 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
4001 tm_file=m68k/hp3bsd44.h
4002 xmake_file=m68k/x-hp3bsd44
4003 use_collect2=yes
4004 extra_headers=math-68881.h
0a95276e 4005 float_format=m68k
861bb6c1
JL
4006 ;;
4007 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
4008 tm_file=m68k/hp3bsd.h
4009 use_collect2=yes
4010 extra_headers=math-68881.h
0a95276e 4011 float_format=m68k
861bb6c1
JL
4012 ;;
4013 m68k-isi-bsd*)
75bffa71 4014 if test x$with_fp = xno
861bb6c1
JL
4015 then
4016 tm_file=m68k/isi-nfp.h
4017 else
4018 tm_file=m68k/isi.h
0a95276e 4019 float_format=m68k
861bb6c1
JL
4020 fi
4021 use_collect2=yes
4022 extra_headers=math-68881.h
4023 ;;
4024 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
f6cb0e63
JL
4025 xm_file="xm_alloca.h ${xm_file}"
4026 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 4027 if test x$gas = xyes
861bb6c1
JL
4028 then
4029 xmake_file=m68k/x-hp320g
4030 tm_file=m68k/hp320g.h
4031 else
4032 xmake_file=m68k/x-hp320
4033 tm_file=m68k/hpux7.h
4034 fi
861bb6c1
JL
4035 install_headers_dir=install-headers-cpio
4036 use_collect2=yes
4037 extra_headers=math-68881.h
0a95276e 4038 float_format=m68k
861bb6c1
JL
4039 ;;
4040 m68k-hp-hpux*) # HP 9000 series 300
f6cb0e63
JL
4041 xm_file="xm_alloca.h ${xm_file}"
4042 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 4043 if test x$gas = xyes
861bb6c1
JL
4044 then
4045 xmake_file=m68k/x-hp320g
4046 tm_file=m68k/hp320g.h
4047 else
4048 xmake_file=m68k/x-hp320
4049 tm_file=m68k/hp320.h
4050 fi
861bb6c1
JL
4051 install_headers_dir=install-headers-cpio
4052 use_collect2=yes
4053 extra_headers=math-68881.h
0a95276e 4054 float_format=m68k
861bb6c1
JL
4055 ;;
4056 m68k-sun-mach*)
4057 tm_file=m68k/sun3mach.h
4058 use_collect2=yes
4059 extra_headers=math-68881.h
0a95276e 4060 float_format=m68k
861bb6c1
JL
4061 ;;
4062 m68k-sony-newsos3*)
75bffa71 4063 if test x$gas = xyes
861bb6c1
JL
4064 then
4065 tm_file=m68k/news3gas.h
4066 else
4067 tm_file=m68k/news3.h
4068 fi
4069 use_collect2=yes
4070 extra_headers=math-68881.h
0a95276e 4071 float_format=m68k
861bb6c1
JL
4072 ;;
4073 m68k-sony-bsd* | m68k-sony-newsos*)
75bffa71 4074 if test x$gas = xyes
861bb6c1
JL
4075 then
4076 tm_file=m68k/newsgas.h
4077 else
4078 tm_file=m68k/news.h
4079 fi
4080 use_collect2=yes
4081 extra_headers=math-68881.h
0a95276e 4082 float_format=m68k
861bb6c1
JL
4083 ;;
4084 m68k-next-nextstep2*)
4085 tm_file=m68k/next21.h
f6cb0e63 4086 xm_file="m68k/xm-next.h ${xm_file}"
861bb6c1
JL
4087 tmake_file=m68k/t-next
4088 xmake_file=m68k/x-next
4089 extra_objs=nextstep.o
4090 extra_headers=math-68881.h
4091 use_collect2=yes
0a95276e 4092 float_format=m68k
861bb6c1
JL
4093 ;;
4094 m68k-next-nextstep3*)
4095 tm_file=m68k/next.h
f6cb0e63 4096 xm_file="m68k/xm-next.h ${xm_file}"
861bb6c1
JL
4097 tmake_file=m68k/t-next
4098 xmake_file=m68k/x-next
4099 extra_objs=nextstep.o
750930c1 4100 extra_parts="crtbegin.o crtend.o"
861bb6c1 4101 extra_headers=math-68881.h
0a95276e 4102 float_format=m68k
75bffa71 4103 if test x$enable_threads = xyes; then
861bb6c1
JL
4104 thread_file='mach'
4105 fi
4106 ;;
4107 m68k-sun-sunos3*)
75bffa71 4108 if test x$with_fp = xno
861bb6c1
JL
4109 then
4110 tm_file=m68k/sun3n3.h
4111 else
4112 tm_file=m68k/sun3o3.h
0a95276e 4113 float_format=m68k
861bb6c1
JL
4114 fi
4115 use_collect2=yes
4116 extra_headers=math-68881.h
4117 ;;
4118 m68k-sun-sunos*) # For SunOS 4 (the default).
75bffa71 4119 if test x$with_fp = xno
861bb6c1
JL
4120 then
4121 tm_file=m68k/sun3n.h
4122 else
4123 tm_file=m68k/sun3.h
0a95276e 4124 float_format=m68k
861bb6c1 4125 fi
861bb6c1
JL
4126 use_collect2=yes
4127 extra_headers=math-68881.h
4128 ;;
4129 m68k-wrs-vxworks*)
4130 tm_file=m68k/vxm68k.h
4131 tmake_file=m68k/t-vxworks68
4132 extra_headers=math-68881.h
7cc34889 4133 thread_file='vxworks'
0a95276e 4134 float_format=m68k
861bb6c1
JL
4135 ;;
4136 m68k-*-aout*)
4137 tmake_file=m68k/t-m68kbare
4138 tm_file="m68k/m68k-aout.h libgloss.h"
4139 extra_headers=math-68881.h
0a95276e 4140 float_format=m68k
861bb6c1
JL
4141 ;;
4142 m68k-*-coff*)
4143 tmake_file=m68k/t-m68kbare
4144 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
4145 extra_headers=math-68881.h
0a95276e 4146 float_format=m68k
861bb6c1 4147 ;;
d1be3be3
JW
4148 m68020-*-elf* | m68k-*-elf*)
4149 tm_file="m68k/m68020-elf.h libgloss.h"
4150 xm_file=m68k/xm-m68kv.h
4151 tmake_file=m68k/t-m68kelf
4152 header_files=math-68881.h
4153 ;;
861bb6c1 4154 m68k-*-lynxos*)
75bffa71 4155 if test x$gas = xyes
861bb6c1
JL
4156 then
4157 tm_file=m68k/lynx.h
4158 else
4159 tm_file=m68k/lynx-ng.h
4160 fi
4161 xm_file=m68k/xm-lynx.h
4162 xmake_file=x-lynx
4163 tmake_file=m68k/t-lynx
4164 extra_headers=math-68881.h
0a95276e 4165 float_format=m68k
861bb6c1 4166 ;;
58600d24 4167 m68k*-*-netbsd*)
861bb6c1 4168 tm_file=m68k/netbsd.h
be1ed94f 4169 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4170 fixincludes=fixinc.wrap
861bb6c1 4171 tmake_file=t-netbsd
0a95276e 4172 float_format=m68k
861bb6c1
JL
4173 ;;
4174 m68k-*-sysv3*) # Motorola m68k's running system V.3
f6cb0e63
JL
4175 xm_file="xm-alloca.h ${xm_file}"
4176 xm_defines=USG
861bb6c1
JL
4177 xmake_file=m68k/x-m68kv
4178 extra_parts="crtbegin.o crtend.o"
4179 extra_headers=math-68881.h
0a95276e 4180 float_format=m68k
861bb6c1
JL
4181 ;;
4182 m68k-*-sysv4*) # Motorola m68k's running system V.4
4183 tm_file=m68k/m68kv4.h
f6cb0e63
JL
4184 xm_file="xm-alloca.h ${xm_file}"
4185 xm_defines=USG
861bb6c1
JL
4186 tmake_file=t-svr4
4187 extra_parts="crtbegin.o crtend.o"
4188 extra_headers=math-68881.h
0a95276e 4189 float_format=m68k
861bb6c1 4190 ;;
956d6950 4191 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
f6cb0e63 4192 # with a.out format
861bb6c1
JL
4193 xmake_file=x-linux
4194 tm_file=m68k/linux-aout.h
4195 tmake_file="t-linux-aout m68k/t-linux-aout"
956d6950 4196 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4197 extra_headers=math-68881.h
0a95276e 4198 float_format=m68k
861bb6c1
JL
4199 gnu_ld=yes
4200 ;;
956d6950 4201 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
f6cb0e63
JL
4202 # with ELF format using the
4203 # GNU/Linux C library 5
4204 xmake_file=x-linux
861bb6c1
JL
4205 tm_file=m68k/linux.h
4206 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
4207 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 4208 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4209 extra_headers=math-68881.h
0a95276e 4210 float_format=m68k
861bb6c1
JL
4211 gnu_ld=yes
4212 ;;
956d6950 4213 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
f6cb0e63
JL
4214 # with ELF format using glibc 2
4215 # aka the GNU/Linux C library 6.
4216 xmake_file=x-linux
861bb6c1
JL
4217 tm_file=m68k/linux.h
4218 tmake_file="t-linux m68k/t-linux"
4219 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 4220 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4221 extra_headers=math-68881.h
0a95276e 4222 float_format=m68k
861bb6c1 4223 gnu_ld=yes
75bffa71 4224 if test x$enable_threads = xyes; then
861bb6c1
JL
4225 thread_file='posix'
4226 fi
4227 ;;
4228 m68k-*-psos*)
4229 tmake_file=m68k/t-m68kbare
4230 tm_file=m68k/m68k-psos.h
4231 extra_headers=math-68881.h
0a95276e 4232 float_format=m68k
861bb6c1
JL
4233 ;;
4234 m68k-*-rtems*)
4235 tmake_file="m68k/t-m68kbare t-rtems"
4236 tm_file=m68k/rtems.h
4237 extra_headers=math-68881.h
0a95276e 4238 float_format=m68k
861bb6c1
JL
4239 ;;
4240
4241 m88k-dg-dgux*)
4242 case $machine in
4243 m88k-dg-dguxbcs*)
4244 tm_file=m88k/dguxbcs.h
4245 tmake_file=m88k/t-dguxbcs
4246 ;;
4247 *)
4248 tm_file=m88k/dgux.h
4249 tmake_file=m88k/t-dgux
4250 ;;
4251 esac
4252 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
861bb6c1 4253 xmake_file=m88k/x-dgux
75bffa71 4254 if test x$gas = xyes
861bb6c1
JL
4255 then
4256 tmake_file=m88k/t-dgux-gas
4257 fi
4258 fixincludes=fixinc.dgux
4259 ;;
4260 m88k-dolphin-sysv3*)
4261 tm_file=m88k/dolph.h
4262 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4263 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4264 xmake_file=m88k/x-dolph
75bffa71 4265 if test x$gas = xyes
861bb6c1
JL
4266 then
4267 tmake_file=m88k/t-m88k-gas
4268 fi
4269 ;;
4270 m88k-tektronix-sysv3)
4271 tm_file=m88k/tekXD88.h
4272 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4273 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4274 xmake_file=m88k/x-tekXD88
75bffa71 4275 if test x$gas = xyes
861bb6c1
JL
4276 then
4277 tmake_file=m88k/t-m88k-gas
4278 fi
4279 ;;
4280 m88k-*-aout*)
4281 tm_file=m88k/m88k-aout.h
4282 ;;
4283 m88k-*-coff*)
4284 tm_file=m88k/m88k-coff.h
4285 tmake_file=m88k/t-bug
4286 ;;
4287 m88k-*-luna*)
4288 tm_file=m88k/luna.h
4289 extra_parts="crtbegin.o crtend.o"
75bffa71 4290 if test x$gas = xyes
861bb6c1
JL
4291 then
4292 tmake_file=m88k/t-luna-gas
4293 else
4294 tmake_file=m88k/t-luna
4295 fi
4296 ;;
4297 m88k-*-sysv3*)
4298 tm_file=m88k/sysv3.h
4299 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4300 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4301 xmake_file=m88k/x-sysv3
75bffa71 4302 if test x$gas = xyes
861bb6c1
JL
4303 then
4304 tmake_file=m88k/t-m88k-gas
4305 fi
4306 ;;
4307 m88k-*-sysv4*)
4308 tm_file=m88k/sysv4.h
4309 extra_parts="crtbegin.o crtend.o"
4310 xmake_file=m88k/x-sysv4
4311 tmake_file=m88k/t-sysv4
4312 ;;
4313 mips-sgi-irix6*) # SGI System V.4., IRIX 6
4314 tm_file=mips/iris6.h
4315 xm_file=mips/xm-iris6.h
861bb6c1
JL
4316 fixincludes=fixinc.irix
4317 xmake_file=mips/x-iris6
4318 tmake_file=mips/t-iris6
04069e5c 4319# if test x$enable_threads = xyes; then
6e148807 4320# thread_file='irix'
04069e5c 4321# fi
861bb6c1 4322 ;;
98bd9f0f
DB
4323 mips-wrs-vxworks)
4324 tm_file="mips/elf.h libgloss.h"
4325 tmake_file=mips/t-ecoff
4326 gas=yes
4327 gnu_ld=yes
4328 extra_parts="crtbegin.o crtend.o"
4329# thread_file='vxworks'
4330 ;;
861bb6c1 4331 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
f6cb0e63 4332 tm_file="mips/iris6.h mips/cross64.h"
74c55ab0
JW
4333 xm_defines=USG
4334 xm_file="mips/xm-iris5.h"
861bb6c1
JL
4335 fixincludes=Makefile.in
4336 xmake_file=mips/x-iris
4337 tmake_file=mips/t-cross64
4338 # See comment in mips/iris[56].h files.
4339 use_collect2=yes
04069e5c 4340# if test x$enable_threads = xyes; then
6e148807 4341# thread_file='irix'
04069e5c 4342# fi
861bb6c1
JL
4343 ;;
4344 mips-sni-sysv4)
75bffa71 4345 if test x$gas = xyes
861bb6c1 4346 then
75bffa71 4347 if test x$stabs = xyes
861bb6c1
JL
4348 then
4349 tm_file=mips/iris5gdb.h
4350 else
f6cb0e63 4351 tm_file="mips/sni-svr4.h mips/sni-gas.h"
861bb6c1
JL
4352 fi
4353 else
4354 tm_file=mips/sni-svr4.h
4355 fi
f6cb0e63 4356 xm_defines=USG
861bb6c1
JL
4357 xmake_file=mips/x-sni-svr4
4358 tmake_file=mips/t-mips-gas
75bffa71 4359 if test x$gnu_ld != xyes
861bb6c1
JL
4360 then
4361 use_collect2=yes
4362 fi
861bb6c1
JL
4363 ;;
4364 mips-sgi-irix5*) # SGI System V.4., IRIX 5
75bffa71 4365 if test x$gas = xyes
861bb6c1 4366 then
f6cb0e63 4367 tm_file="mips/iris5.h mips/iris5gas.h"
75bffa71 4368 if test x$stabs = xyes
861bb6c1
JL
4369 then
4370 tm_file="${tm_file} dbx.h"
4371 fi
4372 else
4373 tm_file=mips/iris5.h
4374 fi
74c55ab0
JW
4375 xm_defines=USG
4376 xm_file="mips/xm-iris5.h"
861bb6c1
JL
4377 fixincludes=fixinc.irix
4378 xmake_file=mips/x-iris
4379 # mips-tfile doesn't work yet
4380 tmake_file=mips/t-mips-gas
4381 # See comment in mips/iris5.h file.
4382 use_collect2=yes
04069e5c 4383# if test x$enable_threads = xyes; then
6e148807 4384# thread_file='irix'
04069e5c 4385# fi
861bb6c1
JL
4386 ;;
4387 mips-sgi-irix4loser*) # Mostly like a MIPS.
f6cb0e63 4388 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 4389 if test x$stabs = xyes; then
861bb6c1
JL
4390 tm_file="${tm_file} dbx.h"
4391 fi
f6cb0e63 4392 xm_defines=USG
861bb6c1 4393 xmake_file=mips/x-iris
75bffa71 4394 if test x$gas = xyes
861bb6c1
JL
4395 then
4396 tmake_file=mips/t-mips-gas
4397 else
4398 extra_passes="mips-tfile mips-tdump"
4399 fi
75bffa71 4400 if test x$gnu_ld != xyes
861bb6c1
JL
4401 then
4402 use_collect2=yes
4403 fi
04069e5c 4404# if test x$enable_threads = xyes; then
6e148807 4405# thread_file='irix'
04069e5c 4406# fi
861bb6c1
JL
4407 ;;
4408 mips-sgi-irix4*) # Mostly like a MIPS.
f6cb0e63 4409 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 4410 if test x$stabs = xyes; then
861bb6c1
JL
4411 tm_file="${tm_file} dbx.h"
4412 fi
f6cb0e63 4413 xm_defines=USG
861bb6c1 4414 xmake_file=mips/x-iris
75bffa71 4415 if test x$gas = xyes
861bb6c1
JL
4416 then
4417 tmake_file=mips/t-mips-gas
4418 else
4419 extra_passes="mips-tfile mips-tdump"
4420 fi
75bffa71 4421 if test x$gnu_ld != xyes
861bb6c1
JL
4422 then
4423 use_collect2=yes
4424 fi
04069e5c 4425# if test x$enable_threads = xyes; then
6e148807 4426# thread_file='irix'
04069e5c 4427# fi
861bb6c1
JL
4428 ;;
4429 mips-sgi-*) # Mostly like a MIPS.
f6cb0e63 4430 tm_file="mips/iris3.h ${tm_file}"
75bffa71 4431 if test x$stabs = xyes; then
861bb6c1
JL
4432 tm_file="${tm_file} dbx.h"
4433 fi
f6cb0e63 4434 xm_defines=USG
861bb6c1 4435 xmake_file=mips/x-iris3
75bffa71 4436 if test x$gas = xyes
861bb6c1
JL
4437 then
4438 tmake_file=mips/t-mips-gas
4439 else
4440 extra_passes="mips-tfile mips-tdump"
4441 fi
75bffa71 4442 if test x$gnu_ld != xyes
861bb6c1
JL
4443 then
4444 use_collect2=yes
4445 fi
4446 ;;
4447 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
f6cb0e63 4448 tm_file="mips/osfrose.h ${tm_file}"
861bb6c1
JL
4449 xmake_file=mips/x-osfrose
4450 tmake_file=mips/t-osfrose
4451 extra_objs=halfpic.o
4452 use_collect2=yes
4453 ;;
4454 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
4455 tm_file=mips/dec-osf1.h
75bffa71 4456 if test x$stabs = xyes; then
861bb6c1
JL
4457 tm_file="${tm_file} dbx.h"
4458 fi
4459 xmake_file=mips/x-dec-osf1
75bffa71 4460 if test x$gas = xyes
861bb6c1
JL
4461 then
4462 tmake_file=mips/t-mips-gas
4463 else
4464 tmake_file=mips/t-ultrix
4465 extra_passes="mips-tfile mips-tdump"
4466 fi
75bffa71 4467 if test x$gnu_ld != xyes
861bb6c1
JL
4468 then
4469 use_collect2=yes
4470 fi
4471 ;;
4472 mips-dec-bsd*) # Decstation running 4.4 BSD
4473 tm_file=mips/dec-bsd.h
4474 fixincludes=
75bffa71 4475 if test x$gas = xyes
861bb6c1
JL
4476 then
4477 tmake_file=mips/t-mips-gas
4478 else
4479 tmake_file=mips/t-ultrix
4480 extra_passes="mips-tfile mips-tdump"
4481 fi
75bffa71 4482 if test x$gnu_ld != xyes
861bb6c1
JL
4483 then
4484 use_collect2=yes
4485 fi
4486 ;;
58600d24 4487 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
861bb6c1 4488 tm_file=mips/netbsd.h
be1ed94f 4489 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4490 fixincludes=fixinc.wrap
861bb6c1 4491 tmake_file=t-netbsd
861bb6c1 4492 ;;
54953b66 4493 mips*-*-linux*) # Linux MIPS, either endian.
18cae839
RL
4494 xmake_file=x-linux
4495 xm_file="xm-siglist.h ${xm_file}"
54953b66
UD
4496 case $machine in
4497 mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
4498 *) tm_file="mips/elf.h mips/linux.h" ;;
4499 esac
18cae839
RL
4500 extra_parts="crtbegin.o crtend.o"
4501 gnu_ld=yes
4502 gas=yes
4503 fixincludes=Makefile.in
4504 ;;
861bb6c1 4505 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
f6cb0e63 4506 tm_file="mips/news4.h ${tm_file}"
75bffa71 4507 if test x$stabs = xyes; then
861bb6c1
JL
4508 tm_file="${tm_file} dbx.h"
4509 fi
75bffa71 4510 if test x$gas = xyes
861bb6c1
JL
4511 then
4512 tmake_file=mips/t-mips-gas
4513 else
4514 extra_passes="mips-tfile mips-tdump"
4515 fi
75bffa71 4516 if test x$gnu_ld != xyes
861bb6c1
JL
4517 then
4518 use_collect2=yes
4519 fi
4520 xmake_file=mips/x-sony
4521 ;;
4522 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
4523 # That is based on svr4.
4524 # t-svr4 is not right because this system doesn't use ELF.
f6cb0e63 4525 tm_file="mips/news5.h ${tm_file}"
75bffa71 4526 if test x$stabs = xyes; then
861bb6c1
JL
4527 tm_file="${tm_file} dbx.h"
4528 fi
f6cb0e63
JL
4529 xm_file="xm-siglist.h ${xm_file}"
4530 xm_defines=USG
75bffa71 4531 if test x$gas = xyes
861bb6c1
JL
4532 then
4533 tmake_file=mips/t-mips-gas
4534 else
4535 extra_passes="mips-tfile mips-tdump"
4536 fi
75bffa71 4537 if test x$gnu_ld != xyes
861bb6c1
JL
4538 then
4539 use_collect2=yes
4540 fi
4541 ;;
4542 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
f6cb0e63 4543 tm_file="mips/svr4-5.h mips/svr4-t.h"
75bffa71 4544 if test x$stabs = xyes; then
861bb6c1
JL
4545 tm_file="${tm_file} dbx.h"
4546 fi
f6cb0e63
JL
4547 xm_file="xm-siglist.h ${xm_file}"
4548 xm_defines=USG
861bb6c1 4549 xmake_file=mips/x-sysv
75bffa71 4550 if test x$gas = xyes
861bb6c1
JL
4551 then
4552 tmake_file=mips/t-mips-gas
4553 extra_parts="crtbegin.o crtend.o"
4554 else
4555 tmake_file=mips/t-mips
4556 extra_passes="mips-tfile mips-tdump"
4557 fi
75bffa71 4558 if test x$gnu_ld != xyes
861bb6c1
JL
4559 then
4560 use_collect2=yes
4561 fi
861bb6c1
JL
4562 ;;
4563 mips-*-ultrix* | mips-dec-mach3) # Decstation.
f6cb0e63 4564 tm_file="mips/ultrix.h ${tm_file}"
75bffa71 4565 if test x$stabs = xyes; then
861bb6c1
JL
4566 tm_file="${tm_file} dbx.h"
4567 fi
4568 xmake_file=mips/x-ultrix
75bffa71 4569 if test x$gas = xyes
861bb6c1
JL
4570 then
4571 tmake_file=mips/t-mips-gas
4572 else
4573 tmake_file=mips/t-ultrix
4574 extra_passes="mips-tfile mips-tdump"
4575 fi
75bffa71 4576 if test x$gnu_ld != xyes
861bb6c1
JL
4577 then
4578 use_collect2=yes
4579 fi
4580 ;;
4581 mips-*-riscos[56789]bsd*)
4582 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
75bffa71 4583 if test x$stabs = xyes; then
861bb6c1
JL
4584 tm_file="${tm_file} dbx.h"
4585 fi
75bffa71 4586 if test x$gas = xyes
861bb6c1
JL
4587 then
4588 tmake_file=mips/t-bsd-gas
4589 else
4590 tmake_file=mips/t-bsd
4591 extra_passes="mips-tfile mips-tdump"
4592 fi
75bffa71 4593 if test x$gnu_ld != xyes
861bb6c1
JL
4594 then
4595 use_collect2=yes
4596 fi
861bb6c1
JL
4597 ;;
4598 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
f6cb0e63 4599 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
75bffa71 4600 if test x$stabs = xyes; then
861bb6c1
JL
4601 tm_file="${tm_file} dbx.h"
4602 fi
75bffa71 4603 if test x$gas = xyes
861bb6c1
JL
4604 then
4605 tmake_file=mips/t-bsd-gas
4606 else
4607 tmake_file=mips/t-bsd
4608 extra_passes="mips-tfile mips-tdump"
4609 fi
75bffa71 4610 if test x$gnu_ld != xyes
861bb6c1
JL
4611 then
4612 use_collect2=yes
4613 fi
861bb6c1
JL
4614 ;;
4615 mips-*-riscos[56789]sysv4*)
4616 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
75bffa71 4617 if test x$stabs = xyes; then
861bb6c1
JL
4618 tm_file="${tm_file} dbx.h"
4619 fi
f6cb0e63 4620 xm_file="xm-siglist.h ${xm_file}"
861bb6c1 4621 xmake_file=mips/x-sysv
75bffa71 4622 if test x$gas = xyes
861bb6c1
JL
4623 then
4624 tmake_file=mips/t-svr4-gas
4625 else
4626 tmake_file=mips/t-svr4
4627 extra_passes="mips-tfile mips-tdump"
4628 fi
75bffa71 4629 if test x$gnu_ld != xyes
861bb6c1
JL
4630 then
4631 use_collect2=yes
4632 fi
861bb6c1
JL
4633 ;;
4634 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
f6cb0e63 4635 tm_file="mips/svr4-4.h ${tm_file}"
75bffa71 4636 if test x$stabs = xyes; then
861bb6c1
JL
4637 tm_file="${tm_file} dbx.h"
4638 fi
f6cb0e63 4639 xm_defines=USG
861bb6c1 4640 xmake_file=mips/x-sysv
75bffa71 4641 if test x$gas = xyes
861bb6c1
JL
4642 then
4643 tmake_file=mips/t-svr4-gas
4644 else
4645 tmake_file=mips/t-svr4
4646 extra_passes="mips-tfile mips-tdump"
4647 fi
75bffa71 4648 if test x$gnu_ld != xyes
861bb6c1
JL
4649 then
4650 use_collect2=yes
4651 fi
861bb6c1
JL
4652 ;;
4653 mips-*-riscos[56789]sysv*)
4654 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
75bffa71 4655 if test x$stabs = xyes; then
861bb6c1
JL
4656 tm_file="${tm_file} dbx.h"
4657 fi
f6cb0e63 4658 xm_defines=USG
861bb6c1 4659 xmake_file=mips/x-sysv
75bffa71 4660 if test x$gas = xyes
861bb6c1
JL
4661 then
4662 tmake_file=mips/t-svr3-gas
4663 else
4664 tmake_file=mips/t-svr3
4665 extra_passes="mips-tfile mips-tdump"
4666 fi
75bffa71 4667 if test x$gnu_ld != xyes
861bb6c1
JL
4668 then
4669 use_collect2=yes
4670 fi
861bb6c1
JL
4671 ;;
4672 mips-*-sysv* | mips-*-riscos*sysv*)
f6cb0e63 4673 tm_file="mips/svr3-4.h ${tm_file}"
75bffa71 4674 if test x$stabs = xyes; then
861bb6c1
JL
4675 tm_file="${tm_file} dbx.h"
4676 fi
f6cb0e63 4677 xm_defines=USG
861bb6c1 4678 xmake_file=mips/x-sysv
75bffa71 4679 if test x$gas = xyes
861bb6c1
JL
4680 then
4681 tmake_file=mips/t-svr3-gas
4682 else
4683 tmake_file=mips/t-svr3
4684 extra_passes="mips-tfile mips-tdump"
4685 fi
75bffa71 4686 if test x$gnu_ld != xyes
861bb6c1
JL
4687 then
4688 use_collect2=yes
4689 fi
861bb6c1
JL
4690 ;;
4691 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
4692 tm_file=mips/mips-5.h
75bffa71 4693 if test x$stabs = xyes; then
861bb6c1
JL
4694 tm_file="${tm_file} dbx.h"
4695 fi
75bffa71 4696 if test x$gas = xyes
861bb6c1
JL
4697 then
4698 tmake_file=mips/t-mips-gas
4699 else
4700 extra_passes="mips-tfile mips-tdump"
4701 fi
75bffa71 4702 if test x$gnu_ld != xyes
861bb6c1
JL
4703 then
4704 use_collect2=yes
4705 fi
861bb6c1
JL
4706 ;;
4707 mips-*-gnu*)
4708 ;;
4709 mipsel-*-ecoff*)
4710 tm_file=mips/ecoffl.h
75bffa71 4711 if test x$stabs = xyes; then
861bb6c1
JL
4712 tm_file="${tm_file} dbx.h"
4713 fi
4714 tmake_file=mips/t-ecoff
4715 ;;
4716 mips-*-ecoff*)
1be12a4a 4717 tm_file="gofast.h mips/ecoff.h"
75bffa71 4718 if test x$stabs = xyes; then
861bb6c1
JL
4719 tm_file="${tm_file} dbx.h"
4720 fi
4721 tmake_file=mips/t-ecoff
861bb6c1
JL
4722 ;;
4723 mipsel-*-elf*)
4724 tm_file="mips/elfl.h libgloss.h"
4725 tmake_file=mips/t-ecoff
4726 ;;
4727 mips-*-elf*)
4728 tm_file="mips/elf.h libgloss.h"
4729 tmake_file=mips/t-ecoff
4730 ;;
4731 mips64el-*-elf*)
4732 tm_file="mips/elfl64.h libgloss.h"
4733 tmake_file=mips/t-ecoff
4734 ;;
4735 mips64orionel-*-elf*)
f6cb0e63 4736 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
861bb6c1
JL
4737 tmake_file=mips/t-ecoff
4738 ;;
4739 mips64-*-elf*)
4740 tm_file="mips/elf64.h libgloss.h"
4741 tmake_file=mips/t-ecoff
4742 ;;
4743 mips64orion-*-elf*)
f6cb0e63 4744 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
861bb6c1
JL
4745 tmake_file=mips/t-ecoff
4746 ;;
4747 mips64orion-*-rtems*)
6e9856ba 4748 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
861bb6c1
JL
4749 tmake_file="mips/t-ecoff t-rtems"
4750 ;;
e9a25f70
JL
4751 mipstx39el-*-elf*)
4752 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
09e4daf5 4753 tmake_file=mips/t-r3900
e9a25f70
JL
4754 ;;
4755 mipstx39-*-elf*)
4756 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
09e4daf5 4757 tmake_file=mips/t-r3900
2ce3c6c6
JM
4758 # FIXME mips-elf should be fixed to use crtstuff.
4759 use_collect2=yes
e9a25f70 4760 ;;
861bb6c1 4761 mips-*-*) # Default MIPS RISC-OS 4.0.
75bffa71 4762 if test x$stabs = xyes; then
861bb6c1
JL
4763 tm_file="${tm_file} dbx.h"
4764 fi
75bffa71 4765 if test x$gas = xyes
861bb6c1
JL
4766 then
4767 tmake_file=mips/t-mips-gas
4768 else
4769 extra_passes="mips-tfile mips-tdump"
4770 fi
75bffa71 4771 if test x$gnu_ld != xyes
861bb6c1
JL
4772 then
4773 use_collect2=yes
4774 fi
4775 ;;
4776 mn10200-*-*)
4777 cpu_type=mn10200
4778 tm_file="mn10200/mn10200.h"
75bffa71 4779 if test x$stabs = xyes
861bb6c1
JL
4780 then
4781 tm_file="${tm_file} dbx.h"
4782 fi
4783 use_collect2=no
4784 ;;
4785 mn10300-*-*)
4786 cpu_type=mn10300
4787 tm_file="mn10300/mn10300.h"
75bffa71 4788 if test x$stabs = xyes
861bb6c1
JL
4789 then
4790 tm_file="${tm_file} dbx.h"
4791 fi
4792 use_collect2=no
4793 ;;
4794 ns32k-encore-bsd*)
4795 tm_file=ns32k/encore.h
4796 use_collect2=yes
4797 ;;
4798 ns32k-sequent-bsd*)
4799 tm_file=ns32k/sequent.h
4800 use_collect2=yes
4801 ;;
4802 ns32k-tek6100-bsd*)
4803 tm_file=ns32k/tek6100.h
861bb6c1
JL
4804 use_collect2=yes
4805 ;;
4806 ns32k-tek6200-bsd*)
4807 tm_file=ns32k/tek6200.h
861bb6c1
JL
4808 use_collect2=yes
4809 ;;
4810# This has not been updated to GCC 2.
4811# ns32k-ns-genix*)
f6cb0e63 4812# xm_defines=USG
861bb6c1
JL
4813# xmake_file=ns32k/x-genix
4814# tm_file=ns32k/genix.h
861bb6c1
JL
4815# use_collect2=yes
4816# ;;
4817 ns32k-merlin-*)
4818 tm_file=ns32k/merlin.h
4819 use_collect2=yes
4820 ;;
4821 ns32k-pc532-mach*)
4822 tm_file=ns32k/pc532-mach.h
4823 use_collect2=yes
4824 ;;
4825 ns32k-pc532-minix*)
4826 tm_file=ns32k/pc532-min.h
f6cb0e63
JL
4827 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
4828 xm_defines=USG
861bb6c1
JL
4829 use_collect2=yes
4830 ;;
58600d24 4831 ns32k-*-netbsd*)
861bb6c1 4832 tm_file=ns32k/netbsd.h
641d4216 4833 xm_file="ns32k/xm-netbsd.h ${xm_file}"
be1ed94f 4834 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4835 fixincludes=fixinc.wrap
861bb6c1
JL
4836 tmake_file=t-netbsd
4837 ;;
4838 pdp11-*-bsd)
4839 tm_file="${tm_file} pdp11/2bsd.h"
4840 ;;
4841 pdp11-*-*)
4842 ;;
4843 pyramid-*-*)
4844 cpu_type=pyr
4845 xmake_file=pyr/x-pyr
4846 use_collect2=yes
4847 ;;
4848 romp-*-aos*)
4849 use_collect2=yes
4850 ;;
4851 romp-*-mach*)
4852 xmake_file=romp/x-mach
4853 use_collect2=yes
4854 ;;
c55dcc7d
FF
4855 powerpc-*-beos*)
4856 cpu_type=rs6000
4857 tm_file=rs6000/beos.h
4858 xm_file=rs6000/xm-beos.h
4859 tmake_file=rs6000/t-beos
4860 xmake_file=rs6000/x-beos
4861 ;;
861bb6c1
JL
4862 powerpc-*-sysv* | powerpc-*-elf*)
4863 tm_file=rs6000/sysv4.h
f6cb0e63
JL
4864 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4865 xm_defines="USG POSIX"
861bb6c1 4866 extra_headers=ppc-asm.h
75bffa71 4867 if test x$gas = xyes
861bb6c1
JL
4868 then
4869 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4870 else
4871 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4872 fi
4873 xmake_file=rs6000/x-sysv4
4874 ;;
4875 powerpc-*-eabiaix*)
4876 tm_file=rs6000/eabiaix.h
4877 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4878 fixincludes=Makefile.in
4879 extra_headers=ppc-asm.h
4880 ;;
4881 powerpc-*-eabisim*)
4882 tm_file=rs6000/eabisim.h
4883 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4884 fixincludes=Makefile.in
4885 extra_headers=ppc-asm.h
4886 ;;
4887 powerpc-*-eabi*)
4888 tm_file=rs6000/eabi.h
75bffa71 4889 if test x$gas = xyes
861bb6c1
JL
4890 then
4891 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4892 else
4893 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4894 fi
4895 fixincludes=Makefile.in
4896 extra_headers=ppc-asm.h
4897 ;;
4898 powerpc-*-rtems*)
4899 tm_file=rs6000/rtems.h
75bffa71 4900 if test x$gas = xyes
861bb6c1
JL
4901 then
4902 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
4903 else
4904 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
4905 fi
4906 fixincludes=Makefile.in
4907 extra_headers=ppc-asm.h
4908 ;;
ce514f57
FS
4909 powerpc-*-linux-gnulibc1)
4910 tm_file=rs6000/linux.h
4911 xm_file=rs6000/xm-sysv4.h
4912 out_file=rs6000/rs6000.c
75bffa71 4913 if test x$gas = xyes
ce514f57
FS
4914 then
4915 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
4916 else
4917 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
4918 fi
4919 xmake_file=x-linux
4920 fixincludes=Makefile.in
4921 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4922 extra_headers=ppc-asm.h
75bffa71 4923 if test x$enable_threads = xyes; then
ce514f57
FS
4924 thread_file='posix'
4925 fi
4926 ;;
861bb6c1
JL
4927 powerpc-*-linux-gnu*)
4928 tm_file=rs6000/linux.h
f6cb0e63
JL
4929 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4930 xm_defines="USG ${xm_defines}"
861bb6c1 4931 out_file=rs6000/rs6000.c
75bffa71 4932 if test x$gas = xyes
861bb6c1
JL
4933 then
4934 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
4935 else
4936 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
4937 fi
4938 xmake_file=x-linux
4939 fixincludes=Makefile.in
4940 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4941 extra_headers=ppc-asm.h
75bffa71 4942 if test x$enable_threads = xyes; then
861bb6c1
JL
4943 thread_file='posix'
4944 fi
4945 ;;
7cc34889 4946 powerpc-wrs-vxworks*)
861bb6c1 4947 cpu_type=rs6000
f6cb0e63
JL
4948 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4949 xm_defines="USG POSIX"
861bb6c1
JL
4950 tm_file=rs6000/vxppc.h
4951 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4952 extra_headers=ppc-asm.h
7cc34889 4953 thread_file='vxworks'
861bb6c1
JL
4954 ;;
4955 powerpcle-*-sysv* | powerpcle-*-elf*)
4956 tm_file=rs6000/sysv4le.h
f6cb0e63
JL
4957 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4958 xm_defines="USG POSIX"
75bffa71 4959 if test x$gas = xyes
861bb6c1
JL
4960 then
4961 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4962 else
4963 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4964 fi
4965 xmake_file=rs6000/x-sysv4
4966 extra_headers=ppc-asm.h
4967 ;;
4968 powerpcle-*-eabisim*)
4969 tm_file=rs6000/eabilesim.h
4970 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4971 fixincludes=Makefile.in
4972 extra_headers=ppc-asm.h
4973 ;;
4974 powerpcle-*-eabi*)
4975 tm_file=rs6000/eabile.h
75bffa71 4976 if test x$gas = xyes
861bb6c1
JL
4977 then
4978 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4979 else
4980 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4981 fi
4982 fixincludes=Makefile.in
4983 extra_headers=ppc-asm.h
4984 ;;
4985 powerpcle-*-winnt* )
4986 tm_file=rs6000/win-nt.h
4987 tmake_file=rs6000/t-winnt
4988# extra_objs=pe.o
4989 fixincludes=Makefile.in
75bffa71 4990 if test x$enable_threads = xyes; then
861bb6c1
JL
4991 thread_file='win32'
4992 fi
4993 extra_headers=ppc-asm.h
4994 ;;
cae21ae8
GN
4995 powerpcle-*-pe | powerpcle-*-cygwin*)
4996 tm_file=rs6000/cygwin.h
4997 xm_file="rs6000/xm-cygwin.h ${xm_file}"
861bb6c1 4998 tmake_file=rs6000/t-winnt
cae21ae8 4999 xmake_file=rs6000/x-cygwin
861bb6c1
JL
5000# extra_objs=pe.o
5001 fixincludes=Makefile.in
75bffa71 5002 if test x$enable_threads = xyes; then
861bb6c1
JL
5003 thread_file='win32'
5004 fi
5005 exeext=.exe
5006 extra_headers=ppc-asm.h
5007 ;;
5008 powerpcle-*-solaris2*)
5009 tm_file=rs6000/sol2.h
f6cb0e63
JL
5010 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
5011 xm_defines="USG POSIX"
75bffa71 5012 if test x$gas = xyes
861bb6c1
JL
5013 then
5014 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5015 else
5016 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5017 fi
5018 xmake_file=rs6000/x-sysv4
f6cb0e63
JL
5019 case $machine in
5020 *-*-solaris2.[0-4])
5021 fixincludes=fixinc.svr4;;
5022 *)
32f65aa0 5023 fixincludes=fixinc.wrap;;
f6cb0e63 5024 esac
861bb6c1
JL
5025 extra_headers=ppc-asm.h
5026 ;;
5027 rs6000-ibm-aix3.[01]*)
5028 tm_file=rs6000/aix31.h
5029 xmake_file=rs6000/x-aix31
5030 use_collect2=yes
5031 ;;
5032 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
5033 tm_file=rs6000/aix3newas.h
75bffa71 5034 if test x$host != x$target
861bb6c1
JL
5035 then
5036 tmake_file=rs6000/t-xnewas
5037 else
5038 tmake_file=rs6000/t-newas
5039 fi
5040 use_collect2=yes
5041 ;;
05cea40f 5042 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
20fced2c 5043 if test "$gnu_ld" = yes
d202e8aa 5044 then
20fced2c
MM
5045 tm_file=rs6000/aix41-gld.h
5046 else
5047 tm_file=rs6000/aix41.h
5048 fi
75bffa71 5049 if test x$host != x$target
861bb6c1
JL
5050 then
5051 tmake_file=rs6000/t-xnewas
5052 else
5053 tmake_file=rs6000/t-newas
5054 fi
0a95276e
JL
5055 xmake_file=rs6000/x-aix41
5056 use_collect2=yes
5057 ;;
5058 rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
5059 tm_file=rs6000/aix43.h
75bffa71 5060 if test x$host != x$target
0a95276e
JL
5061 then
5062 tmake_file=rs6000/t-xaix43
5063 else
5064 tmake_file=rs6000/t-aix43
5065 fi
5066 xmake_file=rs6000/x-aix43
5067 use_collect2=yes
5068 ;;
5069 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
5070 tm_file=rs6000/aix43.h
75bffa71 5071 if test x$host != x$target
0a95276e
JL
5072 then
5073 tmake_file=rs6000/t-xaix43
5074 else
5075 tmake_file=rs6000/t-aix43
5076 fi
5077 xmake_file=rs6000/x-aix43
861bb6c1
JL
5078 use_collect2=yes
5079 ;;
5080 rs6000-ibm-aix*)
5081 use_collect2=yes
5082 ;;
5083 rs6000-bull-bosx)
5084 use_collect2=yes
5085 ;;
5086 rs6000-*-mach*)
5087 tm_file=rs6000/mach.h
f6cb0e63 5088 xm_file="${xm_file} rs6000/xm-mach.h"
861bb6c1
JL
5089 xmake_file=rs6000/x-mach
5090 use_collect2=yes
5091 ;;
5092 rs6000-*-lynxos*)
5093 tm_file=rs6000/lynx.h
5094 xm_file=rs6000/xm-lynx.h
5095 tmake_file=rs6000/t-rs6000
5096 xmake_file=rs6000/x-lynx
5097 use_collect2=yes
5098 ;;
5099 sh-*-elf*)
5100 tm_file=sh/elf.h
5101 float_format=sh
5102 ;;
b098f56d
JS
5103 sh-*-rtemself*)
5104 tmake_file="sh/t-sh t-rtems"
5105 tm_file=sh/rtemself.h
5106 float_format=sh
5107 ;;
5d84b57e
JS
5108 sh-*-rtems*)
5109 tmake_file="sh/t-sh t-rtems"
5110 tm_file=sh/rtems.h
5111 float_format=sh
5112 ;;
861bb6c1
JL
5113 sh-*-*)
5114 float_format=sh
5115 ;;
5116 sparc-tti-*)
5117 tm_file=sparc/pbd.h
f6cb0e63
JL
5118 xm_file="xm-alloca.h ${xm_file}"
5119 xm_defines=USG
861bb6c1
JL
5120 ;;
5121 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
5122 tm_file=sparc/vxsparc.h
5123 tmake_file=sparc/t-vxsparc
5124 use_collect2=yes
7cc34889 5125 thread_file='vxworks'
861bb6c1
JL
5126 ;;
5127 sparc-*-aout*)
5128 tmake_file=sparc/t-sparcbare
5129 tm_file="sparc/aout.h libgloss.h"
5130 ;;
5131 sparc-*-netbsd*)
5132 tm_file=sparc/netbsd.h
be1ed94f 5133 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 5134 fixincludes=fixinc.wrap
861bb6c1
JL
5135 tmake_file=t-netbsd
5136 ;;
5137 sparc-*-bsd*)
5138 tm_file=sparc/bsd.h
5139 ;;
ac52b80b
DE
5140 sparc-*-elf*)
5141 tm_file=sparc/elf.h
5142 tmake_file=sparc/t-elf
5143 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5144 #float_format=i128
5145 float_format=i64
5146 ;;
956d6950 5147 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
f6cb0e63 5148 xm_file="${xm_file} sparc/xm-linux.h"
861bb6c1
JL
5149 tm_file=sparc/linux-aout.h
5150 xmake_file=x-linux
5151 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1
JL
5152 gnu_ld=yes
5153 ;;
956d6950 5154 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
f6cb0e63 5155 xm_file="${xm_file} sparc/xm-linux.h"
26b551af 5156 xmake_file=x-linux
861bb6c1 5157 tm_file=sparc/linux.h
3e88bbdb 5158 tmake_file="t-linux t-linux-gnulibc1"
861bb6c1
JL
5159 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5160 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1
JL
5161 gnu_ld=yes
5162 ;;
956d6950 5163 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
f6cb0e63 5164 xm_file="${xm_file} sparc/xm-linux.h"
26b551af 5165 xmake_file=x-linux
861bb6c1 5166 tm_file=sparc/linux.h
3e88bbdb 5167 tmake_file="t-linux"
861bb6c1
JL
5168 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5169 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 5170 gnu_ld=yes
75bffa71 5171 if test x$enable_threads = xyes; then
861bb6c1
JL
5172 thread_file='posix'
5173 fi
5174 ;;
5175 sparc-*-lynxos*)
75bffa71 5176 if test x$gas = xyes
861bb6c1
JL
5177 then
5178 tm_file=sparc/lynx.h
5179 else
5180 tm_file=sparc/lynx-ng.h
5181 fi
5182 xm_file=sparc/xm-lynx.h
5183 tmake_file=sparc/t-sunos41
5184 xmake_file=x-lynx
5185 ;;
5186 sparc-*-rtems*)
5187 tmake_file="sparc/t-sparcbare t-rtems"
5188 tm_file=sparc/rtems.h
5189 ;;
d559a4db
DM
5190 sparcv9-*-solaris2*)
5191 tm_file=sparc/sol2-sld-64.h
5192 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
5193 xm_defines="USG POSIX"
345a6161 5194 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
d559a4db
DM
5195 xmake_file=sparc/x-sysv4
5196 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
5197 fixincludes=fixinc.wrap
5198 float_format=i128
d7496fbb 5199 if test x${enable_threads} = x ; then
d559a4db 5200 enable_threads=$have_pthread_h
d7496fbb 5201 if test x${enable_threads} = x ; then
d559a4db
DM
5202 enable_threads=$have_thread_h
5203 fi
5204 fi
d7496fbb
DM
5205 if test x${enable_threads} = xyes ; then
5206 if test x${have_pthread_h} = xyes ; then
d559a4db
DM
5207 thread_file='posix'
5208 else
5209 thread_file='solaris'
5210 fi
5211 fi
5212 ;;
861bb6c1 5213 sparc-*-solaris2*)
75bffa71 5214 if test x$gnu_ld = xyes
0a9bdce3
PE
5215 then
5216 tm_file=sparc/sol2.h
5217 else
5218 tm_file=sparc/sol2-sld.h
5219 fi
0b3d64d2
JL
5220 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5221 xm_defines="USG POSIX"
861bb6c1
JL
5222 tmake_file=sparc/t-sol2
5223 xmake_file=sparc/x-sysv4
5224 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
f6cb0e63
JL
5225 case $machine in
5226 *-*-solaris2.[0-4])
5227 fixincludes=fixinc.svr4;;
5228 *)
32f65aa0 5229 fixincludes=fixinc.wrap;;
f6cb0e63 5230 esac
e9a25f70 5231 float_format=i128
75bffa71 5232 if test x${enable_threads} = x; then
f24af81b 5233 enable_threads=$have_pthread_h
75bffa71 5234 if test x${enable_threads} = x; then
f24af81b
TT
5235 enable_threads=$have_thread_h
5236 fi
5237 fi
75bffa71
ILT
5238 if test x${enable_threads} = xyes; then
5239 if test x${have_pthread_h} = xyes; then
f24af81b
TT
5240 thread_file='posix'
5241 else
861bb6c1 5242 thread_file='solaris'
f24af81b 5243 fi
861bb6c1
JL
5244 fi
5245 ;;
5246 sparc-*-sunos4.0*)
5247 tm_file=sparc/sunos4.h
5248 tmake_file=sparc/t-sunos40
5249 use_collect2=yes
5250 ;;
5251 sparc-*-sunos4*)
5252 tm_file=sparc/sunos4.h
5253 tmake_file=sparc/t-sunos41
5254 use_collect2=yes
75bffa71 5255 if test x$gas = xyes; then
ca55abae
JM
5256 tm_file="${tm_file} sparc/sun4gas.h"
5257 fi
861bb6c1
JL
5258 ;;
5259 sparc-*-sunos3*)
5260 tm_file=sparc/sun4o3.h
5261 use_collect2=yes
5262 ;;
5263 sparc-*-sysv4*)
5264 tm_file=sparc/sysv4.h
f6cb0e63
JL
5265 xm_file="xm-siglist.h sparc/xm-sysv4.h"
5266 xm_defines="USG POSIX"
861bb6c1
JL
5267 tmake_file=t-svr4
5268 xmake_file=sparc/x-sysv4
5269 extra_parts="crtbegin.o crtend.o"
5270 ;;
5271 sparc-*-vxsim*)
f5963e61
JL
5272 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5273 xm_defines="USG POSIX"
861bb6c1
JL
5274 tm_file=sparc/vxsim.h
5275 tmake_file=sparc/t-vxsparc
5276 xmake_file=sparc/x-sysv4
5277 ;;
5278 sparclet-*-aout*)
5279 tm_file="sparc/splet.h libgloss.h"
5280 tmake_file=sparc/t-splet
5281 ;;
5282 sparclite-*-coff*)
5283 tm_file="sparc/litecoff.h libgloss.h"
5284 tmake_file=sparc/t-sparclite
5285 ;;
5286 sparclite-*-aout*)
5287 tm_file="sparc/lite.h aoutos.h libgloss.h"
5288 tmake_file=sparc/t-sparclite
5289 ;;
5290 sparc64-*-aout*)
5291 tmake_file=sparc/t-sp64
5292 tm_file=sparc/sp64-aout.h
5293 ;;
5294 sparc64-*-elf*)
5295 tmake_file=sparc/t-sp64
5296 tm_file=sparc/sp64-elf.h
5297 extra_parts="crtbegin.o crtend.o"
5298 ;;
956d6950 5299 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
345a6161 5300 tmake_file="t-linux sparc/t-linux64"
26b551af
DE
5301 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
5302 tm_file=sparc/linux64.h
5303 xmake_file=x-linux
956d6950 5304 fixincludes=Makefile.in # The headers are ok already.
345a6161 5305 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
26b551af
DE
5306 gnu_ld=yes
5307 ;;
861bb6c1
JL
5308# This hasn't been upgraded to GCC 2.
5309# tahoe-harris-*) # Harris tahoe, using COFF.
5310# tm_file=tahoe/harris.h
5311# ;;
5312# tahoe-*-bsd*) # tahoe running BSD
5313# ;;
e98e406f
NC
5314 thumb-*-coff* | thumbel-*-coff*)
5315 tm_file=arm/tcoff.h
5316 out_file=arm/thumb.c
5317 xm_file=arm/xm-thumb.h
5318 md_file=arm/thumb.md
5319 tmake_file=arm/t-thumb
3ecb16a2 5320 fixincludes=Makefile.in # There is nothing to fix
e98e406f 5321 ;;
861bb6c1
JL
5322# This hasn't been upgraded to GCC 2.
5323# tron-*-*)
5324# cpu_type=gmicro
5325# use_collect2=yes
5326# ;;
f84271d9
JL
5327 v850-*-*)
5328 cpu_type=v850
5329 tm_file="v850/v850.h"
5330 xm_file="v850/xm-v850.h"
62db76ee 5331 tmake_file=v850/t-v850
75bffa71 5332 if test x$stabs = xyes
f84271d9
JL
5333 then
5334 tm_file="${tm_file} dbx.h"
5335 fi
5336 use_collect2=no
5337 ;;
861bb6c1
JL
5338 vax-*-bsd*) # vaxen running BSD
5339 use_collect2=yes
5340 float_format=vax
5341 ;;
5342 vax-*-sysv*) # vaxen running system V
5343 tm_file="${tm_file} vax/vaxv.h"
f6cb0e63 5344 xm_defines=USG
861bb6c1
JL
5345 float_format=vax
5346 ;;
5347 vax-*-netbsd*)
5348 tm_file="${tm_file} netbsd.h vax/netbsd.h"
be1ed94f 5349 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 5350 fixincludes=fixinc.wrap
861bb6c1
JL
5351 tmake_file=t-netbsd
5352 float_format=vax
5353 ;;
5354 vax-*-ultrix*) # vaxen running ultrix
5355 tm_file="${tm_file} vax/ultrix.h"
5356 use_collect2=yes
5357 float_format=vax
5358 ;;
5359 vax-*-vms*) # vaxen running VMS
5360 xm_file=vax/xm-vms.h
5361 tm_file=vax/vms.h
5362 float_format=vax
5363 ;;
5364 vax-*-*) # vax default entry
5365 float_format=vax
5366 ;;
5367 we32k-att-sysv*)
5368 xm_file="${xm_file} xm-svr3"
5369 use_collect2=yes
5370 ;;
5371 *)
5372 echo "Configuration $machine not supported" 1>&2
5373 exit 1
5374 ;;
5375 esac
5376
5377 case $machine in
5378 *-*-linux-gnu*)
f6cb0e63 5379 ;; # Existing GNU/Linux systems do not use the GNU setup.
861bb6c1
JL
5380 *-*-gnu*)
5381 # On the GNU system, the setup is just about the same on
5382 # each different CPU. The specific machines that GNU
5383 # supports are matched above and just set $cpu_type.
f6cb0e63 5384 xm_file="xm-gnu.h ${xm_file}"
861bb6c1
JL
5385 tm_file=${cpu_type}/gnu.h
5386 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
5387 # GNU always uses ELF.
5388 elf=yes
5389 # GNU tools are the only tools.
5390 gnu_ld=yes
5391 gas=yes
5392 # On GNU, the headers are already okay.
5393 fixincludes=Makefile.in
5394 xmake_file=x-linux # These details are the same as Linux.
5395 tmake_file=t-gnu # These are not.
5396 ;;
5397 *-*-sysv4*)
5398 fixincludes=fixinc.svr4
5399 xmake_try_sysv=x-sysv
861bb6c1
JL
5400 install_headers_dir=install-headers-cpio
5401 ;;
5402 *-*-sysv*)
861bb6c1
JL
5403 install_headers_dir=install-headers-cpio
5404 ;;
5405 esac
5406
f6cb0e63 5407 # Distinguish i[34567]86
861bb6c1
JL
5408 # Also, do not run mips-tfile on MIPS if using gas.
5409 # Process --with-cpu= for PowerPC/rs6000
5410 target_cpu_default2=
5411 case $machine in
5412 i486-*-*)
5413 target_cpu_default2=1
5414 ;;
5415 i586-*-*)
5416 target_cpu_default2=2
5417 ;;
f6cb0e63 5418 i686-*-* | i786-*-*)
861bb6c1
JL
5419 target_cpu_default2=3
5420 ;;
5421 alpha*-*-*)
5422 case $machine in
e9a25f70
JL
5423 alphaev6*)
5424 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
5425 ;;
5426 alphapca56*)
fbb5ed67 5427 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
e9a25f70 5428 ;;
861bb6c1 5429 alphaev56*)
e9a25f70 5430 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
861bb6c1
JL
5431 ;;
5432 alphaev5*)
5433 target_cpu_default2="MASK_CPU_EV5"
5434 ;;
5435 esac
5436
75bffa71 5437 if test x$gas = xyes
861bb6c1 5438 then
75bffa71 5439 if test "$target_cpu_default2" = ""
861bb6c1
JL
5440 then
5441 target_cpu_default2="MASK_GAS"
5442 else
5443 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
5444 fi
5445 fi
5446 ;;
956d6950
JL
5447 arm*-*-*)
5448 case "x$with_cpu" in
5449 x)
5450 # The most generic
5451 target_cpu_default2="TARGET_CPU_generic"
5452 ;;
5453
5454 # Distinguish cores, and major variants
5455 # arm7m doesn't exist, but D & I don't affect code
5456 xarm23678 | xarm250 | xarm67010 \
5457 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
5458 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
5459 | xstrongarm | xstrongarm110)
5460 target_cpu_default2="TARGET_CPU_$with_cpu"
5461 ;;
5462
5463 xyes | xno)
5464 echo "--with-cpu must be passed a value" 1>&2
5465 exit 1
5466 ;;
5467
5468 *)
75bffa71 5469 if test x$pass2done = xyes
956d6950
JL
5470 then
5471 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5472 exit 1
5473 fi
5474 ;;
5475 esac
5476 ;;
5477
861bb6c1 5478 mips*-*-ecoff* | mips*-*-elf*)
75bffa71 5479 if test x$gas = xyes
861bb6c1 5480 then
75bffa71 5481 if test x$gnu_ld = xyes
861bb6c1
JL
5482 then
5483 target_cpu_default2=20
5484 else
5485 target_cpu_default2=16
5486 fi
5487 fi
5488 ;;
5489 mips*-*-*)
75bffa71 5490 if test x$gas = xyes
861bb6c1
JL
5491 then
5492 target_cpu_default2=16
5493 fi
5494 ;;
5495 powerpc*-*-* | rs6000-*-*)
5496 case "x$with_cpu" in
5497 x)
5498 ;;
5499
5500 xcommon | xpower | xpower2 | xpowerpc | xrios \
5501 | xrios1 | xrios2 | xrsc | xrsc1 \
5502 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
5503 | x403 | x505 | x801 | x821 | x823 | x860)
f24b370a 5504 target_cpu_default2="\"$with_cpu\""
861bb6c1
JL
5505 ;;
5506
5507 xyes | xno)
5508 echo "--with-cpu must be passed a value" 1>&2
5509 exit 1
5510 ;;
5511
5512 *)
75bffa71 5513 if test x$pass2done = xyes
956d6950
JL
5514 then
5515 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5516 exit 1
5517 fi
861bb6c1
JL
5518 ;;
5519 esac
5520 ;;
5521 sparc*-*-*)
5522 case ".$with_cpu" in
5523 .)
5524 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
5525 ;;
8947065c 5526 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
861bb6c1
JL
5527 target_cpu_default2="TARGET_CPU_$with_cpu"
5528 ;;
5529 *)
75bffa71 5530 if test x$pass2done = xyes
956d6950
JL
5531 then
5532 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5533 exit 1
5534 fi
861bb6c1
JL
5535 ;;
5536 esac
5537 ;;
5538 esac
5539
75bffa71 5540 if test "$target_cpu_default2" != ""
861bb6c1 5541 then
75bffa71 5542 if test "$target_cpu_default" != ""
861bb6c1
JL
5543 then
5544 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5545 else
5546 target_cpu_default=$target_cpu_default2
5547 fi
5548 fi
5549
5550 # No need for collect2 if we have the GNU linker.
d460fb3c
JM
5551 # Actually, there is now; GNU ld doesn't handle the EH info or
5552 # collecting for shared libraries.
ca8c3b37
JM
5553 #case x$gnu_ld in
5554 #xyes)
5555 # use_collect2=
5556 # ;;
5557 #esac
861bb6c1
JL
5558
5559# Save data on machine being used to compile GCC in build_xm_file.
5560# Save data on host machine in vars host_xm_file and host_xmake_file.
75bffa71 5561 if test x$pass1done = x
861bb6c1 5562 then
75bffa71 5563 if test x"$xm_file" = x
861bb6c1
JL
5564 then build_xm_file=$cpu_type/xm-$cpu_type.h
5565 else build_xm_file=$xm_file
5566 fi
f6cb0e63 5567 build_xm_defines=$xm_defines
861bb6c1
JL
5568 build_install_headers_dir=$install_headers_dir
5569 build_exeext=$exeext
5570 pass1done=yes
5571 else
75bffa71 5572 if test x$pass2done = x
861bb6c1 5573 then
75bffa71 5574 if test x"$xm_file" = x
861bb6c1
JL
5575 then host_xm_file=$cpu_type/xm-$cpu_type.h
5576 else host_xm_file=$xm_file
5577 fi
f6cb0e63 5578 host_xm_defines=$xm_defines
75bffa71 5579 if test x"$xmake_file" = x
861bb6c1
JL
5580 then xmake_file=$cpu_type/x-$cpu_type
5581 fi
5582 host_xmake_file="$xmake_file"
5583 host_truncate_target=$truncate_target
5584 host_extra_gcc_objs=$extra_gcc_objs
5585 host_extra_objs=$extra_host_objs
6e26218f 5586 host_exeext=$exeext
861bb6c1
JL
5587 pass2done=yes
5588 fi
5589 fi
5590done
5591
5592extra_objs="${host_extra_objs} ${extra_objs}"
5593
5594# Default the target-machine variables that were not explicitly set.
75bffa71 5595if test x"$tm_file" = x
861bb6c1
JL
5596then tm_file=$cpu_type/$cpu_type.h; fi
5597
75bffa71 5598if test x$extra_headers = x
861bb6c1
JL
5599then extra_headers=; fi
5600
75bffa71 5601if test x"$xm_file" = x
861bb6c1
JL
5602then xm_file=$cpu_type/xm-$cpu_type.h; fi
5603
75bffa71 5604if test x$md_file = x
e98e406f 5605then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 5606
75bffa71 5607if test x$out_file = x
861bb6c1
JL
5608then out_file=$cpu_type/$cpu_type.c; fi
5609
75bffa71 5610if test x"$tmake_file" = x
861bb6c1
JL
5611then tmake_file=$cpu_type/t-$cpu_type
5612fi
5613
90e6a802
RL
5614if test x"$dwarf2" = xyes
5615then tm_file="tm-dwarf2.h $tm_file"
5616fi
5617
75bffa71 5618if test x$float_format = x
861bb6c1
JL
5619then float_format=i64
5620fi
5621
75bffa71 5622if test x$enable_haifa = x
128f7968
RH
5623then
5624 case $target in
18cae839 5625 alpha*-* | hppa*-* | powerpc*-* | rs6000-* | *sparc*-* | m32r*-*)
128f7968
RH
5626 enable_haifa=yes;;
5627 esac
5628fi
5629
861bb6c1
JL
5630# Say what files are being used for the output code and MD file.
5631echo "Using \`$srcdir/config/$out_file' to output insns."
5632echo "Using \`$srcdir/config/$md_file' as machine description file."
5633
5634count=a
5635for f in $tm_file; do
5636 count=${count}x
5637done
75bffa71 5638if test $count = ax; then
861bb6c1
JL
5639 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5640else
5641 echo "Using the following target machine macro files:"
5642 for f in $tm_file; do
5643 echo " $srcdir/config/$f"
5644 done
5645fi
5646
5647count=a
5648for f in $host_xm_file; do
5649 count=${count}x
5650done
75bffa71 5651if test $count = ax; then
861bb6c1
JL
5652 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5653else
5654 echo "Using the following host machine macro files:"
5655 for f in $host_xm_file; do
5656 echo " $srcdir/config/$f"
5657 done
5658fi
5659
75bffa71 5660if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
5661 count=a
5662 for f in $build_xm_file; do
5663 count=${count}x
5664 done
75bffa71 5665 if test $count = ax; then
861bb6c1
JL
5666 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5667 else
5668 echo "Using the following build machine macro files:"
5669 for f in $build_xm_file; do
5670 echo " $srcdir/config/$f"
5671 done
5672 fi
5673fi
5674
75bffa71
ILT
5675if test x$thread_file = x; then
5676 if test x$target_thread_file != x; then
a851212a
JW
5677 thread_file=$target_thread_file
5678 else
5679 thread_file='single'
5680 fi
861bb6c1
JL
5681fi
5682
5683# Set up the header files.
5684# $links is the list of header files to create.
5685# $vars is the list of shell variables with file names to include.
b7cb92ad 5686# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 5687# the first file included by config.h.
f6cb0e63 5688null_defines=
0056a9b5 5689host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
db81d74a 5690
b7cb92ad 5691# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
5692# as well. If host!=build, we are in error and need to do more
5693# work to find out the build config parameters.
75bffa71 5694if test x$host = x$build
db81d74a 5695then
0056a9b5 5696 build_xm_file="auto-host.h gansidecl.h ${build_xm_file}"
b7cb92ad
JL
5697else
5698 # We create a subdir, then run autoconf in the subdir.
5699 # To prevent recursion we set host and build for the new
5700 # invocation of configure to the build for this invocation
5701 # of configure.
5702 tempdir=build.$$
5703 rm -rf $tempdir
5704 mkdir $tempdir
5705 cd $tempdir
5706 case ${srcdir} in
5707 /*) realsrcdir=${srcdir};;
5708 *) realsrcdir=../${srcdir};;
5709 esac
fe81dd69 5710 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
b7cb92ad
JL
5711 --target=$target --host=$build --build=$build
5712
5713 # We just finished tests for the build machine, so rename
5714 # the file auto-build.h in the gcc directory.
5715 mv auto-host.h ../auto-build.h
5716 cd ..
5717 rm -rf $tempdir
0056a9b5 5718 build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
db81d74a
RH
5719fi
5720
0056a9b5
KG
5721xm_file="gansidecl.h ${xm_file}"
5722tm_file="gansidecl.h ${tm_file}"
5723
861bb6c1 5724vars="host_xm_file tm_file xm_file build_xm_file"
e9a25f70 5725links="config.h tm.h tconfig.h hconfig.h"
f6cb0e63 5726defines="host_xm_defines null_defines xm_defines build_xm_defines"
861bb6c1
JL
5727
5728rm -f config.bak
75bffa71 5729if test -f config.status; then mv -f config.status config.bak; fi
861bb6c1
JL
5730
5731# Make the links.
75bffa71 5732while test -n "$vars"
861bb6c1 5733do
861bb6c1
JL
5734 set $vars; var=$1; shift; vars=$*
5735 set $links; link=$1; shift; links=$*
f6cb0e63 5736 set $defines; define=$1; shift; defines=$*
861bb6c1
JL
5737
5738 rm -f $link
5739
5740 # Define TARGET_CPU_DEFAULT if the system wants one.
5741 # This substitutes for lots of *.h files.
75bffa71 5742 if test "$target_cpu_default" != "" -a $link = tm.h
861bb6c1 5743 then
8fbf199e 5744 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
861bb6c1
JL
5745 fi
5746
5747 for file in `eval echo '$'$var`; do
5748 echo "#include \"$file\"" >>$link
5749 done
f6cb0e63
JL
5750
5751 for def in `eval echo '$'$define`; do
5752 echo "#ifndef $def" >>$link
5753 echo "#define $def" >>$link
5754 echo "#endif" >>$link
5755 done
861bb6c1
JL
5756done
5757
5758# Truncate the target if necessary
75bffa71 5759if test x$host_truncate_target != x; then
861bb6c1
JL
5760 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5761fi
5762
f1943b77 5763# Get the version trigger filename from the toplevel
75bffa71 5764if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
5765 gcc_version_trigger=$with_gcc_version_trigger
5766else
5767 gcc_version_trigger=${srcdir}/version.c
5768fi
5769gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
861bb6c1 5770
861bb6c1
JL
5771# Get an absolute path to the GCC top-level source directory
5772holddir=`pwd`
5773cd $srcdir
5774topdir=`pwd`
5775cd $holddir
5776
5777# Conditionalize the makefile for this host machine.
5778# Make-host contains the concatenation of all host makefile fragments
5779# [there can be more than one]. This file is built by configure.frag.
5780host_overrides=Make-host
5781dep_host_xmake_file=
5782for f in .. ${host_xmake_file}
5783do
75bffa71 5784 if test -f ${srcdir}/config/$f
861bb6c1
JL
5785 then
5786 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
5787 fi
5788done
5789
5790# Conditionalize the makefile for this target machine.
5791# Make-target contains the concatenation of all host makefile fragments
5792# [there can be more than one]. This file is built by configure.frag.
5793target_overrides=Make-target
5794dep_tmake_file=
5795for f in .. ${tmake_file}
5796do
75bffa71 5797 if test -f ${srcdir}/config/$f
861bb6c1
JL
5798 then
5799 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
5800 fi
5801done
5802
5803# If the host doesn't support symlinks, modify CC in
5804# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5805# Otherwise, we can use "CC=$(CC)".
5806rm -f symtest.tem
f6cb0e63 5807if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
861bb6c1
JL
5808then
5809 cc_set_by_configure="\$(CC)"
5810 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5811else
f6cb0e63
JL
5812 rm -f symtest.tem
5813 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5814 then
5815 symbolic_link="cp -p"
5816 else
5817 symbolic_link="cp"
5818 fi
861bb6c1
JL
5819 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5820 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5821fi
5822rm -f symtest.tem
5823
5824out_object_file=`basename $out_file .c`.o
5825
5826tm_file_list=
5827for f in $tm_file; do
0056a9b5
KG
5828 if test $f != "gansidecl.h" ; then
5829 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
5830 else
5831 tm_file_list="${tm_file_list} $f"
5832 fi
861bb6c1
JL
5833done
5834
5835host_xm_file_list=
5836for f in $host_xm_file; do
0056a9b5 5837 if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
db81d74a
RH
5838 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
5839 else
0056a9b5 5840 host_xm_file_list="${host_xm_file_list} $f"
db81d74a 5841 fi
861bb6c1
JL
5842done
5843
5844build_xm_file_list=
5845for f in $build_xm_file; do
0056a9b5
KG
5846 if test $f != "auto-build.h" -a $f != "auto-host.h" -a $f != "gansidecl.h" ; then
5847 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
db81d74a 5848 else
0056a9b5 5849 build_xm_file_list="${build_xm_file_list} $f"
db81d74a 5850 fi
861bb6c1
JL
5851done
5852
5853# Define macro CROSS_COMPILE in compilation
5854# if this is a cross-compiler.
5855# Also use all.cross instead of all.internal
5856# and add cross-make to Makefile.
5857cross_overrides="/dev/null"
75bffa71 5858if test x$host != x$target
861bb6c1
JL
5859then
5860 cross_defines="CROSS=-DCROSS_COMPILE"
5861 cross_overrides="${topdir}/cross-make"
5862fi
5863
5864# When building gcc with a cross-compiler, we need to fix a few things.
5865# This must come after cross-make as we want all.build to override
5866# all.cross.
5867build_overrides="/dev/null"
75bffa71 5868if test x$build != x$host
861bb6c1
JL
5869then
5870 build_overrides="${topdir}/build-make"
5871fi
5872
5873# Expand extra_headers to include complete path.
5874# This substitutes for lots of t-* files.
5875extra_headers_list=
75bffa71 5876if test "x$extra_headers" = x
861bb6c1
JL
5877then true
5878else
5879 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
5880 for file in $extra_headers;
5881 do
5882 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
5883 done
5884fi
5885
75bffa71 5886if test x$use_collect2 = xno; then
2ce3c6c6
JM
5887 use_collect2=
5888fi
5889
861bb6c1
JL
5890# Add a definition of USE_COLLECT2 if system wants one.
5891# Also tell toplev.c what to do.
5892# This substitutes for lots of t-* files.
75bffa71 5893if test x$use_collect2 = x
861bb6c1
JL
5894then
5895 will_use_collect2=
5896 maybe_use_collect2=
5897else
10da1131 5898 will_use_collect2="collect2"
861bb6c1
JL
5899 maybe_use_collect2="-DUSE_COLLECT2"
5900fi
5901
5902# NEED TO CONVERT
5903# Set MD_DEPS if the real md file is in md.pre-cpp.
5904# Set MD_CPP to the cpp to pass the md file through. Md files use ';'
5905# for line oriented comments, so we must always use a GNU cpp. If
5906# building gcc with a cross compiler, use the cross compiler just
5907# built. Otherwise, we can use the cpp just built.
5908md_file_sub=
75bffa71 5909if test "x$md_cppflags" = x
861bb6c1
JL
5910then
5911 md_file_sub=$srcdir/config/$md_file
5912else
5913 md_file=md
5914fi
5915
5916# If we have gas in the build tree, make a link to it.
75bffa71 5917if test -f ../gas/Makefile; then
6e26218f 5918 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
861bb6c1
JL
5919fi
5920
4b95eb49 5921# If we have nm in the build tree, make a link to it.
75bffa71 5922if test -f ../binutils/Makefile; then
4b95eb49
JL
5923 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
5924fi
5925
861bb6c1 5926# If we have ld in the build tree, make a link to it.
75bffa71
ILT
5927if test -f ../ld/Makefile; then
5928# if test x$use_collect2 = x; then
6e26218f 5929# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
aa32d841 5930# else
6e26218f 5931 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
aa32d841 5932# fi
992d1248 5933fi
861bb6c1 5934
9e423e6d
JW
5935# Figure out what assembler alignment features are present.
5936echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
d062c304 5937echo "configure:5938: checking assembler alignment features" >&5
9e423e6d
JW
5938gcc_cv_as=
5939gcc_cv_as_alignment_features=
a2f319ea 5940gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
3ccc3a56
AO
5941if test -x "$DEFAULT_ASSEMBLER"; then
5942 gcc_cv_as="$DEFAULT_ASSEMBLER"
5943elif test -x "$AS"; then
5944 gcc_cv_as="$AS"
ab339d62 5945elif test -x as$host_exeext; then
9e423e6d
JW
5946 # Build using assembler in the current directory.
5947 gcc_cv_as=./as$host_exeext
5585c1bc 5948elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
9e423e6d 5949 # Single tree build which includes gas.
a2c9d57c 5950 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
9e423e6d
JW
5951 do
5952 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
75bffa71 5953 if test x$gcc_cv_gas_version != x; then
9e423e6d
JW
5954 break
5955 fi
5956 done
5957 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
5958 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
75bffa71 5959 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
0b9d02c6
JL
5960 # Gas version 2.6 and later support for .balign and .p2align.
5961 # bytes to skip when using .p2align.
75bffa71 5962 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
0b9d02c6
JL
5963 gcc_cv_as_alignment_features=".balign and .p2align"
5964 cat >> confdefs.h <<\EOF
00ccc16d
JL
5965#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5966EOF
5967
0b9d02c6
JL
5968 fi
5969 # Gas version 2.8 and later support specifying the maximum
5970 # bytes to skip when using .p2align.
75bffa71 5971 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
0b9d02c6
JL
5972 gcc_cv_as_alignment_features=".p2align including maximum skip"
5973 cat >> confdefs.h <<\EOF
9e423e6d
JW
5974#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
5975EOF
5976
0b9d02c6 5977 fi
9e423e6d 5978 fi
75bffa71 5979elif test x$host = x$target; then
9e423e6d
JW
5980 # Native build.
5981 gcc_cv_as=as$host_exeext
5982fi
75bffa71 5983if test x$gcc_cv_as != x; then
00ccc16d
JL
5984 # Check if we have .balign and .p2align
5985 echo ".balign 4" > conftest.s
5986 echo ".p2align 2" >> conftest.s
5987 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5988 gcc_cv_as_alignment_features=".balign and .p2align"
5989 cat >> confdefs.h <<\EOF
5990#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5991EOF
5992
5993 fi
5994 rm -f conftest.s conftest.o
9e423e6d
JW
5995 # Check if specifying the maximum bytes to skip when
5996 # using .p2align is supported.
5997 echo ".p2align 4,,7" > conftest.s
5998 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5999 gcc_cv_as_alignment_features=".p2align including maximum skip"
6000 cat >> confdefs.h <<\EOF
6001#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6002EOF
6003
6004 fi
6005 rm -f conftest.s conftest.o
6006fi
6007echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6008
d1accaa3 6009echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
d062c304 6010echo "configure:6011: checking assembler subsection support" >&5
d1accaa3
JJ
6011gcc_cv_as_subsections=
6012if test x$gcc_cv_as != x; then
6013 # Check if we have .subsection
6014 echo ".subsection 1" > conftest.s
6015 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6016 gcc_cv_as_subsections=".subsection"
6017 if test -x nm$host_exeext; then
6018 gcc_cv_nm=./nm$host_exeext
6019 elif test x$host = x$target; then
6020 # Native build.
6021 gcc_cv_nm=nm$host_exeext
6022 fi
6023 if test x$gcc_cv_nm != x; then
6024 cat > conftest.s <<EOF
6025conftest_label1: .word 0
6026.subsection -1
6027conftest_label2: .word 0
6028.previous
6029EOF
6030 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6031 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6032 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
1b015bec
AO
6033 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6034 :
6035 else
d1accaa3
JJ
6036 gcc_cv_as_subsections="working .subsection -1"
6037 cat >> confdefs.h <<\EOF
6038#define HAVE_GAS_SUBSECTION_ORDERING 1
6039EOF
6040
6041 fi
6042 fi
6043 fi
6044 fi
6045 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6046fi
6047echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6048
861bb6c1 6049# Figure out what language subdirectories are present.
71205e0b
MH
6050# Look if the user specified --enable-languages="..."; if not, use
6051# the environment variable $LANGUAGES if defined. $LANGUAGES might
6052# go away some day.
6053if test x"${enable_languages+set}" != xset; then
6054 if test x"${LANGUAGES+set}" = xset; then
6055 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6056 else
6057 enable_languages=all
6058 fi
6059fi
861bb6c1
JL
6060subdirs=
6061for lang in ${srcdir}/*/config-lang.in ..
6062do
6063 case $lang in
6064 ..) ;;
6065 # The odd quoting in the next line works around
6066 # an apparent bug in bash 1.12 on linux.
6067 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
6068 *)
6069 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6070 if test "x$lang_alias" = x
6071 then
6072 echo "$lang doesn't set \$language." 1>&2
6073 exit 1
6074 fi
6075 if test x"${enable_languages}" = xall; then
6076 add_this_lang=yes
6077 else
6078 case "${enable_languages}" in
6079 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
6080 add_this_lang=yes
6081 ;;
6082 * )
6083 add_this_lang=no
6084 ;;
6085 esac
6086 fi
6087 if test x"${add_this_lang}" = xyes; then
6088 case $lang in
6089 ${srcdir}/ada/config-lang.in)
6090 if test x$gnat = xyes ; then
6091 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6092 fi
6093 ;;
6094 *)
6095 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6096 ;;
6097 esac
6098 fi
6099 ;;
861bb6c1
JL
6100 esac
6101done
6102
f24af81b
TT
6103# Make gthr-default.h if we have a thread file.
6104gthread_flags=
75bffa71 6105if test $thread_file != single; then
f24af81b 6106 rm -f gthr-default.h
db0d1ed9 6107 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
6108 gthread_flags=-DHAVE_GTHR_DEFAULT
6109fi
6110
6111
861bb6c1
JL
6112# Make empty files to contain the specs and options for each language.
6113# Then add #include lines to for a compiler that has specs and/or options.
6114
6115lang_specs_files=
6116lang_options_files=
3103b7db
ML
6117lang_tree_files=
6118rm -f specs.h options.h gencheck.h
6119touch specs.h options.h gencheck.h
861bb6c1
JL
6120for subdir in . $subdirs
6121do
75bffa71 6122 if test -f $srcdir/$subdir/lang-specs.h; then
861bb6c1
JL
6123 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6124 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6125 fi
75bffa71 6126 if test -f $srcdir/$subdir/lang-options.h; then
861bb6c1
JL
6127 echo "#include \"$subdir/lang-options.h\"" >>options.h
6128 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6129 fi
3103b7db
ML
6130 if test -f $srcdir/$subdir/$subdir-tree.def; then
6131 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6132 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6133 fi
861bb6c1
JL
6134done
6135
6136# These (without "all_") are set in each config-lang.in.
6137# `language' must be a single word so is spelled singularly.
6138all_languages=
6139all_boot_languages=
6140all_compilers=
6141all_stagestuff=
6142all_diff_excludes=
6143all_outputs=Makefile
6144# List of language makefile fragments.
6145all_lang_makefiles=
6146all_headers=
6147all_lib2funcs=
6148
6149# Add the language fragments.
6150# Languages are added via two mechanisms. Some information must be
6151# recorded in makefile variables, these are defined in config-lang.in.
6152# We accumulate them and plug them into the main Makefile.
6153# The other mechanism is a set of hooks for each of the main targets
6154# like `clean', `install', etc.
6155
6156language_fragments="Make-lang"
6157language_hooks="Make-hooks"
6158oldstyle_subdirs=
6159
6160for s in .. $subdirs
6161do
75bffa71 6162 if test $s != ".."
861bb6c1
JL
6163 then
6164 language=
6165 boot_language=
6166 compilers=
6167 stagestuff=
6168 diff_excludes=
6169 headers=
6170 outputs=
6171 lib2funcs=
6172 . ${srcdir}/$s/config-lang.in
75bffa71 6173 if test "x$language" = x
861bb6c1
JL
6174 then
6175 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6176 exit 1
6177 fi
6178 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
6179 all_languages="$all_languages $language"
75bffa71 6180 if test "x$boot_language" = xyes
861bb6c1
JL
6181 then
6182 all_boot_languages="$all_boot_languages $language"
6183 fi
6184 all_compilers="$all_compilers $compilers"
6185 all_stagestuff="$all_stagestuff $stagestuff"
6186 all_diff_excludes="$all_diff_excludes $diff_excludes"
6187 all_headers="$all_headers $headers"
6188 all_outputs="$all_outputs $outputs"
75bffa71 6189 if test x$outputs = x
861bb6c1
JL
6190 then
6191 oldstyle_subdirs="$oldstyle_subdirs $s"
6192 fi
6193 all_lib2funcs="$all_lib2funcs $lib2funcs"
6194 fi
6195done
6196
6197# Since we can't use `::' targets, we link each language in
6198# with a set of hooks, reached indirectly via lang.${target}.
6199
6200rm -f Make-hooks
6201touch Make-hooks
6202target_list="all.build all.cross start.encap rest.encap \
6203 info dvi \
6204 install-normal install-common install-info install-man \
6205 uninstall distdir \
6206 mostlyclean clean distclean extraclean maintainer-clean \
6207 stage1 stage2 stage3 stage4"
6208for t in $target_list
6209do
6210 x=
6211 for l in .. $all_languages
6212 do
75bffa71 6213 if test $l != ".."; then
861bb6c1
JL
6214 x="$x $l.$t"
6215 fi
6216 done
6217 echo "lang.$t: $x" >> Make-hooks
6218done
6219
6220# If we're not building in srcdir, create .gdbinit.
6221
75bffa71 6222if test ! -f Makefile.in; then
861bb6c1
JL
6223 echo "dir ." > .gdbinit
6224 echo "dir ${srcdir}" >> .gdbinit
75bffa71 6225 if test x$gdb_needs_out_file_path = xyes
861bb6c1
JL
6226 then
6227 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6228 fi
75bffa71 6229 if test "x$subdirs" != x; then
861bb6c1
JL
6230 for s in $subdirs
6231 do
6232 echo "dir ${srcdir}/$s" >> .gdbinit
6233 done
6234 fi
6235 echo "source ${srcdir}/.gdbinit" >> .gdbinit
6236fi
6237
88111b26
JL
6238# Define variables host_canonical and build_canonical
6239# because some Cygnus local changes in the Makefile depend on them.
6240build_canonical=${build}
6241host_canonical=${host}
6242target_subdir=
75bffa71 6243if test "${host}" != "${target}" ; then
88111b26
JL
6244 target_subdir=${target}/
6245fi
6246
6247
6248
6249
dec88383
DE
6250# If this is using newlib, then define inhibit_libc in
6251# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
6252# libgcc.a, but that's OK because newib should have its own version of
6253# assert.h.
6254inhibit_libc=
75bffa71 6255if test x$with_newlib = xyes; then
dec88383
DE
6256 inhibit_libc=-Dinhibit_libc
6257fi
6258
6259
8c660648
JL
6260# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
6261sched_prefix=
6262sched_cflags=
75bffa71 6263if test x$enable_haifa = xyes; then
8c660648
JL
6264 echo "Using the Haifa scheduler."
6265 sched_prefix=haifa-
6266 sched_cflags=-DHAIFA
6267fi
6268
6269
75bffa71 6270if test x$enable_haifa != x; then
8c660648
JL
6271 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
6272 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
75bffa71 6273 if test -f $x; then
8c660648
JL
6274 echo "Removing $x"
6275 rm -f $x
6276 fi
6277 done
6278fi
6279
d062c304 6280# if $(exec_prefix) is not the same as $(prefix), then do not use a relative
5949a9fc
JL
6281# directory to get to $gcc_tooldir. Also handle the case where the user did
6282# not specify a value for exec_prefix.
82cbf8f7
JL
6283# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
6284# make and thus we'd get different behavior depending on where we built the
6285# sources.
5949a9fc 6286if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d062c304
JL
6287 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
6288else
82cbf8f7 6289 gcc_tooldir='$(exec_prefix)'/${target_alias}
d062c304
JL
6290fi
6291
6292
2ce3c6c6
JM
6293# Warn if using init_priority.
6294echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6
5949a9fc 6295echo "configure:6296: checking whether to enable init_priority by default" >&5
75bffa71 6296if test x$enable_init_priority != xyes; then
2ce3c6c6
JM
6297 enable_init_priority=no
6298fi
6299echo "$ac_t""$enable_init_priority" 1>&6
6300
7e717196
JL
6301# Nothing to do for FLOAT_H, float_format already handled.
6302objdir=`pwd`
6303
6304
861bb6c1
JL
6305# Process the language and host/target makefile fragments.
6306${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
6307
6308# Substitute configuration variables
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
9b16d2c4 6355
e9a25f70 6356
6e26218f 6357
c8724862 6358
e061d1ce 6359
f1943b77 6360
0b9d02c6 6361
3103b7db 6362
d8bb17c8 6363
df37e3db 6364
861bb6c1
JL
6365
6366
6367# Echo that links are built
75bffa71 6368if test x$host = x$target
861bb6c1
JL
6369then
6370 str1="native "
6371else
6372 str1="cross-"
6373 str2=" from $host"
6374fi
6375
75bffa71 6376if test x$host != x$build
861bb6c1
JL
6377then
6378 str3=" on a $build system"
6379fi
6380
75bffa71 6381if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
6382then
6383 str4=
6384fi
6385
6386echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
6387
75bffa71 6388if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
6389then
6390 echo " ${str2}${str3}." 1>&2
6391fi
6392
f6cb0e63 6393# Truncate the target if necessary
75bffa71 6394if test x$host_truncate_target != x; then
f6cb0e63
JL
6395 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
6396fi
6397
861bb6c1
JL
6398# Configure the subdirectories
6399# AC_CONFIG_SUBDIRS($subdirs)
6400
6401# Create the Makefile
6402# and configure language subdirectories
6403trap '' 1 2 15
6404cat > confcache <<\EOF
6405# This file is a shell script that caches the results of configure
6406# tests run on this system so they can be shared between configure
6407# scripts and configure runs. It is not useful on other systems.
6408# If it contains results you don't want to keep, you may remove or edit it.
6409#
6410# By default, configure uses ./config.cache as the cache file,
6411# creating it if it does not exist already. You can give configure
6412# the --cache-file=FILE option to use a different cache file; that is
6413# what configure does when it calls configure scripts in
6414# subdirectories, so they share the cache.
6415# Giving --cache-file=/dev/null disables caching, for debugging configure.
6416# config.status only pays attention to the cache file if you give it the
6417# --recheck option to rerun configure.
6418#
6419EOF
6420# The following way of writing the cache mishandles newlines in values,
6421# but we know of no workaround that is simple, portable, and efficient.
6422# So, don't put newlines in cache variables' values.
6423# Ultrix sh set writes to stderr and can't be redirected directly,
6424# and sets the high bit in the cache file unless we assign to the vars.
6425(set) 2>&1 |
d202e8aa 6426 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
861bb6c1
JL
6427 *ac_space=\ *)
6428 # `set' does not quote correctly, so add quotes (double-quote substitution
6429 # turns \\\\ into \\, and sed turns \\ into \).
6430 sed -n \
6431 -e "s/'/'\\\\''/g" \
6432 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6433 ;;
6434 *)
6435 # `set' quotes correctly as required by POSIX, so do not add quotes.
6436 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6437 ;;
6438 esac >> confcache
6439if cmp -s $cache_file confcache; then
6440 :
6441else
6442 if test -w $cache_file; then
6443 echo "updating cache $cache_file"
6444 cat confcache > $cache_file
6445 else
6446 echo "not updating unwritable cache $cache_file"
6447 fi
6448fi
6449rm -f confcache
6450
6451trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6452
6453test "x$prefix" = xNONE && prefix=$ac_default_prefix
6454# Let make expand exec_prefix.
6455test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6456
6457# Any assignment to VPATH causes Sun make to only execute
6458# the first set of double-colon rules, so remove it if not needed.
6459# If there is a colon in the path, we need to keep it.
6460if test "x$srcdir" = x.; then
6461 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6462fi
6463
6464trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6465
6466DEFS=-DHAVE_CONFIG_H
6467
6468# Without the "./", some shells look in PATH for config.status.
6469: ${CONFIG_STATUS=./config.status}
6470
6471echo creating $CONFIG_STATUS
6472rm -f $CONFIG_STATUS
6473cat > $CONFIG_STATUS <<EOF
6474#! /bin/sh
6475# Generated automatically by configure.
6476# Run this file to recreate the current configuration.
6477# This directory was configured as follows,
6478# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6479#
6480# $0 $ac_configure_args
6481#
6482# Compiler output produced by configure, useful for debugging
6483# configure, is in ./config.log if it exists.
6484
6485ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6486for ac_option
6487do
6488 case "\$ac_option" in
6489 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6490 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6491 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6492 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
d062c304 6493 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
861bb6c1
JL
6494 exit 0 ;;
6495 -help | --help | --hel | --he | --h)
6496 echo "\$ac_cs_usage"; exit 0 ;;
6497 *) echo "\$ac_cs_usage"; exit 1 ;;
6498 esac
6499done
6500
6501ac_given_srcdir=$srcdir
861bb6c1 6502
b7cb92ad 6503trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
861bb6c1
JL
6504EOF
6505cat >> $CONFIG_STATUS <<EOF
6506
6507# Protect against being on the right side of a sed subst in config.status.
6508sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6509 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6510$ac_vpsub
6511$extrasub
6f144c9c 6512s%@SHELL@%$SHELL%g
861bb6c1
JL
6513s%@CFLAGS@%$CFLAGS%g
6514s%@CPPFLAGS@%$CPPFLAGS%g
6515s%@CXXFLAGS@%$CXXFLAGS%g
6516s%@DEFS@%$DEFS%g
6517s%@LDFLAGS@%$LDFLAGS%g
6518s%@LIBS@%$LIBS%g
6519s%@exec_prefix@%$exec_prefix%g
6520s%@prefix@%$prefix%g
6521s%@program_transform_name@%$program_transform_name%g
6522s%@bindir@%$bindir%g
6523s%@sbindir@%$sbindir%g
6524s%@libexecdir@%$libexecdir%g
6525s%@datadir@%$datadir%g
6526s%@sysconfdir@%$sysconfdir%g
6527s%@sharedstatedir@%$sharedstatedir%g
6528s%@localstatedir@%$localstatedir%g
6529s%@libdir@%$libdir%g
6530s%@includedir@%$includedir%g
6531s%@oldincludedir@%$oldincludedir%g
6532s%@infodir@%$infodir%g
6533s%@mandir@%$mandir%g
6534s%@host@%$host%g
6535s%@host_alias@%$host_alias%g
6536s%@host_cpu@%$host_cpu%g
6537s%@host_vendor@%$host_vendor%g
6538s%@host_os@%$host_os%g
6539s%@target@%$target%g
6540s%@target_alias@%$target_alias%g
6541s%@target_cpu@%$target_cpu%g
6542s%@target_vendor@%$target_vendor%g
6543s%@target_os@%$target_os%g
6544s%@build@%$build%g
6545s%@build_alias@%$build_alias%g
6546s%@build_cpu@%$build_cpu%g
6547s%@build_vendor@%$build_vendor%g
6548s%@build_os@%$build_os%g
e9a25f70 6549s%@CC@%$CC%g
61842080 6550s%@stage1_warn_cflags@%$stage1_warn_cflags%g
e9a25f70 6551s%@SET_MAKE@%$SET_MAKE%g
861bb6c1
JL
6552s%@AWK@%$AWK%g
6553s%@LEX@%$LEX%g
6554s%@LEXLIB@%$LEXLIB%g
0a4b6309
RL
6555s%@LN@%$LN%g
6556s%@LN_S@%$LN_S%g
861bb6c1
JL
6557s%@RANLIB@%$RANLIB%g
6558s%@YACC@%$YACC%g
0a4b6309
RL
6559s%@INSTALL@%$INSTALL%g
6560s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6561s%@INSTALL_DATA@%$INSTALL_DATA%g
861bb6c1 6562s%@CPP@%$CPP%g
bcf12124 6563s%@gnat@%$gnat%g
0a4b6309
RL
6564s%@vfprintf@%$vfprintf%g
6565s%@doprint@%$doprint%g
861bb6c1 6566s%@manext@%$manext%g
992d1248 6567s%@objext@%$objext%g
f24af81b 6568s%@gthread_flags@%$gthread_flags%g
88111b26
JL
6569s%@build_canonical@%$build_canonical%g
6570s%@host_canonical@%$host_canonical%g
6571s%@target_subdir@%$target_subdir%g
dec88383 6572s%@inhibit_libc@%$inhibit_libc%g
8c660648
JL
6573s%@sched_prefix@%$sched_prefix%g
6574s%@sched_cflags@%$sched_cflags%g
d062c304 6575s%@gcc_tooldir@%$gcc_tooldir%g
7e717196 6576s%@objdir@%$objdir%g
861bb6c1
JL
6577s%@subdirs@%$subdirs%g
6578s%@all_languages@%$all_languages%g
6579s%@all_boot_languages@%$all_boot_languages%g
6580s%@all_compilers@%$all_compilers%g
6581s%@all_lang_makefiles@%$all_lang_makefiles%g
6582s%@all_stagestuff@%$all_stagestuff%g
6583s%@all_diff_excludes@%$all_diff_excludes%g
6584s%@all_lib2funcs@%$all_lib2funcs%g
6585s%@all_headers@%$all_headers%g
e061d1ce 6586s%@cpp_main@%$cpp_main%g
861bb6c1
JL
6587s%@extra_passes@%$extra_passes%g
6588s%@extra_programs@%$extra_programs%g
6589s%@extra_parts@%$extra_parts%g
6590s%@extra_c_objs@%$extra_c_objs%g
c8724862 6591s%@extra_cxx_objs@%$extra_cxx_objs%g
0b9d02c6 6592s%@extra_cpp_objs@%$extra_cpp_objs%g
861bb6c1
JL
6593s%@extra_c_flags@%$extra_c_flags%g
6594s%@extra_objs@%$extra_objs%g
6595s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
6596s%@extra_headers_list@%$extra_headers_list%g
6597s%@dep_host_xmake_file@%$dep_host_xmake_file%g
6598s%@dep_tmake_file@%$dep_tmake_file%g
6599s%@out_file@%$out_file%g
6600s%@out_object_file@%$out_object_file%g
6601s%@md_file@%$md_file%g
6602s%@tm_file_list@%$tm_file_list%g
6603s%@build_xm_file_list@%$build_xm_file_list%g
6604s%@host_xm_file_list@%$host_xm_file_list%g
6605s%@lang_specs_files@%$lang_specs_files%g
6606s%@lang_options_files@%$lang_options_files%g
3103b7db 6607s%@lang_tree_files@%$lang_tree_files%g
861bb6c1 6608s%@thread_file@%$thread_file%g
d8bb17c8 6609s%@objc_boehm_gc@%$objc_boehm_gc%g
df37e3db 6610s%@JAVAGC@%$JAVAGC%g
f1943b77
MH
6611s%@gcc_version@%$gcc_version%g
6612s%@gcc_version_trigger@%$gcc_version_trigger%g
861bb6c1
JL
6613s%@local_prefix@%$local_prefix%g
6614s%@gxx_include_dir@%$gxx_include_dir%g
6615s%@fixincludes@%$fixincludes%g
6616s%@build_install_headers_dir@%$build_install_headers_dir%g
6617s%@build_exeext@%$build_exeext%g
6e26218f 6618s%@host_exeext@%$host_exeext%g
861bb6c1
JL
6619s%@float_format@%$float_format%g
6620s%@will_use_collect2@%$will_use_collect2%g
6621s%@maybe_use_collect2@%$maybe_use_collect2%g
6622s%@cc_set_by_configure@%$cc_set_by_configure%g
6623s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9b16d2c4 6624s%@install@%$install%g
e9a25f70 6625s%@symbolic_link@%$symbolic_link%g
861bb6c1
JL
6626/@target_overrides@/r $target_overrides
6627s%@target_overrides@%%g
6628/@host_overrides@/r $host_overrides
6629s%@host_overrides@%%g
6630s%@cross_defines@%$cross_defines%g
6631/@cross_overrides@/r $cross_overrides
6632s%@cross_overrides@%%g
6633/@build_overrides@/r $build_overrides
6634s%@build_overrides@%%g
6635/@language_fragments@/r $language_fragments
6636s%@language_fragments@%%g
6637/@language_hooks@/r $language_hooks
6638s%@language_hooks@%%g
6639
6640CEOF
6641EOF
6642
6643cat >> $CONFIG_STATUS <<\EOF
6644
6645# Split the substitutions into bite-sized pieces for seds with
6646# small command number limits, like on Digital OSF/1 and HP-UX.
6647ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6648ac_file=1 # Number of current file.
6649ac_beg=1 # First line for current file.
6650ac_end=$ac_max_sed_cmds # Line after last line for current file.
6651ac_more_lines=:
6652ac_sed_cmds=""
6653while $ac_more_lines; do
6654 if test $ac_beg -gt 1; then
6655 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6656 else
6657 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6658 fi
6659 if test ! -s conftest.s$ac_file; then
6660 ac_more_lines=false
6661 rm -f conftest.s$ac_file
6662 else
6663 if test -z "$ac_sed_cmds"; then
6664 ac_sed_cmds="sed -f conftest.s$ac_file"
6665 else
6666 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6667 fi
6668 ac_file=`expr $ac_file + 1`
6669 ac_beg=$ac_end
6670 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6671 fi
6672done
6673if test -z "$ac_sed_cmds"; then
6674 ac_sed_cmds=cat
6675fi
6676EOF
6677
6678cat >> $CONFIG_STATUS <<EOF
6679
6680CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
6681EOF
6682cat >> $CONFIG_STATUS <<\EOF
6683for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6684 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6685 case "$ac_file" in
6686 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6687 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6688 *) ac_file_in="${ac_file}.in" ;;
6689 esac
6690
6691 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6692
6693 # Remove last slash and all that follows it. Not all systems have dirname.
6694 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6695 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6696 # The file is in a subdirectory.
6697 test ! -d "$ac_dir" && mkdir "$ac_dir"
6698 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6699 # A "../" for each directory in $ac_dir_suffix.
6700 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6701 else
6702 ac_dir_suffix= ac_dots=
6703 fi
6704
6705 case "$ac_given_srcdir" in
6706 .) srcdir=.
6707 if test -z "$ac_dots"; then top_srcdir=.
6708 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6709 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6710 *) # Relative path.
6711 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6712 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6713 esac
6714
861bb6c1
JL
6715
6716 echo creating "$ac_file"
6717 rm -f "$ac_file"
6718 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6719 case "$ac_file" in
6720 *Makefile*) ac_comsub="1i\\
6721# $configure_input" ;;
6722 *) ac_comsub= ;;
6723 esac
6724
6725 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6726 sed -e "$ac_comsub
6727s%@configure_input@%$configure_input%g
6728s%@srcdir@%$srcdir%g
6729s%@top_srcdir@%$top_srcdir%g
861bb6c1
JL
6730" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6731fi; done
6732rm -f conftest.s*
6733
6734# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6735# NAME is the cpp macro being defined and VALUE is the value it is being given.
6736#
6737# ac_d sets the value in "#define NAME VALUE" lines.
6738ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6739ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6740ac_dC='\3'
6741ac_dD='%g'
6742# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6743ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6744ac_uB='\([ ]\)%\1#\2define\3'
6745ac_uC=' '
6746ac_uD='\4%g'
6747# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6748ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6749ac_eB='$%\1#\2define\3'
6750ac_eC=' '
6751ac_eD='%g'
6752
6753if test "${CONFIG_HEADERS+set}" != set; then
6754EOF
6755cat >> $CONFIG_STATUS <<EOF
b7cb92ad 6756 CONFIG_HEADERS="auto-host.h:config.in"
861bb6c1
JL
6757EOF
6758cat >> $CONFIG_STATUS <<\EOF
6759fi
6760for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6761 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6762 case "$ac_file" in
6763 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6764 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6765 *) ac_file_in="${ac_file}.in" ;;
6766 esac
6767
6768 echo creating $ac_file
6769
6770 rm -f conftest.frag conftest.in conftest.out
6771 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6772 cat $ac_file_inputs > conftest.in
6773
6774EOF
6775
6776# Transform confdefs.h into a sed script conftest.vals that substitutes
6777# the proper values into config.h.in to produce config.h. And first:
6778# Protect against being on the right side of a sed subst in config.status.
6779# Protect against being in an unquoted here document in config.status.
6780rm -f conftest.vals
6781cat > conftest.hdr <<\EOF
6782s/[\\&%]/\\&/g
6783s%[\\$`]%\\&%g
6784s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6785s%ac_d%ac_u%gp
6786s%ac_u%ac_e%gp
6787EOF
6788sed -n -f conftest.hdr confdefs.h > conftest.vals
6789rm -f conftest.hdr
6790
6791# This sed command replaces #undef with comments. This is necessary, for
6792# example, in the case of _POSIX_SOURCE, which is predefined and required
6793# on some systems where configure will not decide to define it.
6794cat >> conftest.vals <<\EOF
6795s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6796EOF
6797
6798# Break up conftest.vals because some shells have a limit on
6799# the size of here documents, and old seds have small limits too.
6800
6801rm -f conftest.tail
6802while :
6803do
6804 ac_lines=`grep -c . conftest.vals`
6805 # grep -c gives empty output for an empty file on some AIX systems.
6806 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6807 # Write a limited-size here document to conftest.frag.
6808 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6809 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6810 echo 'CEOF
6811 sed -f conftest.frag conftest.in > conftest.out
6812 rm -f conftest.in
6813 mv conftest.out conftest.in
6814' >> $CONFIG_STATUS
6815 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6816 rm -f conftest.vals
6817 mv conftest.tail conftest.vals
6818done
6819rm -f conftest.vals
6820
6821cat >> $CONFIG_STATUS <<\EOF
6822 rm -f conftest.frag conftest.h
6823 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6824 cat conftest.in >> conftest.h
6825 rm -f conftest.in
6826 if cmp -s $ac_file conftest.h 2>/dev/null; then
6827 echo "$ac_file is unchanged"
6828 rm -f conftest.h
6829 else
6830 # Remove last slash and all that follows it. Not all systems have dirname.
6831 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6832 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6833 # The file is in a subdirectory.
6834 test ! -d "$ac_dir" && mkdir "$ac_dir"
6835 fi
6836 rm -f $ac_file
6837 mv conftest.h $ac_file
6838 fi
6839fi; done
6840
6841EOF
6842cat >> $CONFIG_STATUS <<EOF
6843
6844host='${host}'
6845build='${build}'
6846target='${target}'
6847target_alias='${target_alias}'
6848srcdir='${srcdir}'
6849subdirs='${subdirs}'
6850oldstyle_subdirs='${oldstyle_subdirs}'
6851symbolic_link='${symbolic_link}'
6852program_transform_set='${program_transform_set}'
6853program_transform_name='${program_transform_name}'
6854dep_host_xmake_file='${dep_host_xmake_file}'
6855host_xmake_file='${host_xmake_file}'
6856dep_tmake_file='${dep_tmake_file}'
6857tmake_file='${tmake_file}'
6858thread_file='${thread_file}'
f1943b77
MH
6859gcc_version='${gcc_version}'
6860gcc_version_trigger='${gcc_version_trigger}'
861bb6c1
JL
6861local_prefix='${local_prefix}'
6862build_install_headers_dir='${build_install_headers_dir}'
6863build_exeext='${build_exeext}'
6e26218f 6864host_exeext='${host_exeext}'
7ed46111 6865out_file='${out_file}'
861bb6c1
JL
6866gdb_needs_out_file_path='${gdb_needs_out_file_path}'
6867SET_MAKE='${SET_MAKE}'
861bb6c1
JL
6868target_list='${target_list}'
6869target_overrides='${target_overrides}'
6870host_overrides='${host_overrides}'
6871cross_defines='${cross_defines}'
6872cross_overrides='${cross_overrides}'
6873build_overrides='${build_overrides}'
6874
6875EOF
6876cat >> $CONFIG_STATUS <<\EOF
6877
6878. $srcdir/configure.lang
6879case x$CONFIG_HEADERS in
b7cb92ad 6880xauto-host.h:config.in)
861bb6c1
JL
6881echo > cstamp-h ;;
6882esac
93cf819d
BK
6883# If the host supports symlinks, point stage[1234] at ../stage[1234] so
6884# bootstrapping and the installation procedure can still use
6885# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
6886# FLAGS_TO_PASS has been modified to solve the problem there.
6887# This is virtually a duplicate of what happens in configure.lang; we do
6888# an extra check to make sure this only happens if ln -s can be used.
75bffa71 6889if test "$symbolic_link" = "ln -s"; then
93cf819d 6890 for d in .. ${subdirs} ; do
75bffa71 6891 if test $d != ..; then
4e8a434e
BK
6892 STARTDIR=`pwd`
6893 cd $d
6894 for t in stage1 stage2 stage3 stage4 include
6895 do
6896 rm -f $t
6897 $symbolic_link ../$t $t 2>/dev/null
6898 done
6899 cd $STARTDIR
93cf819d
BK
6900 fi
6901 done
6902else true ; fi
861bb6c1
JL
6903
6904exit 0
6905EOF
6906chmod +x $CONFIG_STATUS
6907rm -fr confdefs* $ac_clean_files
6908test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6909