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