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