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