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