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