]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
Daily bump.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
861bb6c1
JL
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4525d757 4# Generated automatically using autoconf version 2.12.2
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."
ab339d62
AO
16ac_help="$ac_help
17 --with-ld arrange to use the specified ld (full pathname)."
861bb6c1
JL
18ac_help="$ac_help
19 --with-gnu-as arrange to work with GNU as."
ab339d62
AO
20ac_help="$ac_help
21 --with-as arrange to use the specified as (full pathname)."
861bb6c1
JL
22ac_help="$ac_help
23 --with-stabs arrange to use stabs instead of host debug format."
24ac_help="$ac_help
25 --with-elf arrange to use ELF instead of host debug format."
26ac_help="$ac_help
27 --with-local-prefix=DIR specifies directory to put local include."
28ac_help="$ac_help
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files."
a494747c
MM
31ac_help="$ac_help
32 --enable-checking enable expensive run-time checks."
861bb6c1 33ac_help="$ac_help
f81a440f 34 --enable-cpplib use cpplib for the C preprocessor."
0b9d02c6 35ac_help="$ac_help
f81a440f
ZW
36 --enable-c-cpplib link cpplib directly into C and C++ compilers
37 (implies --enable-cpplib)."
9101297d 38ac_help="$ac_help
f81a440f
ZW
39 --enable-c-mbchar enable multibyte characters for C and C++."
40ac_help="$ac_help
41 --enable-haifa use the experimental scheduler.
42 --disable-haifa don't use the experimental scheduler for the
9101297d 43 targets which normally enable it."
4b104d6e 44ac_help="$ac_help
94878f15 45 --with-fast-fixincludes use a faster fixinclude program (experimental)"
861bb6c1
JL
46ac_help="$ac_help
47 --enable-threads enable thread usage for target GCC.
48 --enable-threads=LIB use LIB thread package for target GCC."
d8bb17c8
OP
49ac_help="$ac_help
50 --enable-objc-gc enable the use of Boehm's garbage collector with
51 the GNU Objective-C runtime."
df37e3db
TT
52ac_help="$ac_help
53 --enable-java-gc=TYPE choose garbage collector [boehm]"
90e6a802
RL
54ac_help="$ac_help
55 --enable-dwarf2 enable DWARF2 debugging as default."
ab87f8c8
JL
56ac_help="$ac_help
57 --enable-nls use Native Language Support (disabled by default)"
58ac_help="$ac_help
59 --disable-nls do not use Native Language Support"
60ac_help="$ac_help
61 --with-included-gettext use the GNU gettext library included here"
62ac_help="$ac_help
63 --with-catgets use catgets functions if available"
861bb6c1
JL
64
65# Initialize some variables set by options.
66# The variables have the same names as the options, with
67# dashes changed to underlines.
68build=NONE
69cache_file=./config.cache
70exec_prefix=NONE
71host=NONE
72no_create=
73nonopt=NONE
74no_recursion=
75prefix=NONE
76program_prefix=NONE
77program_suffix=NONE
78program_transform_name=s,x,x,
79silent=
80site=
81srcdir=
82target=NONE
83verbose=
84x_includes=NONE
85x_libraries=NONE
86bindir='${exec_prefix}/bin'
87sbindir='${exec_prefix}/sbin'
88libexecdir='${exec_prefix}/libexec'
89datadir='${prefix}/share'
90sysconfdir='${prefix}/etc'
91sharedstatedir='${prefix}/com'
92localstatedir='${prefix}/var'
93libdir='${exec_prefix}/lib'
94includedir='${prefix}/include'
95oldincludedir='/usr/include'
96infodir='${prefix}/info'
97mandir='${prefix}/man'
98
99# Initialize some other variables.
100subdirs=
101MFLAGS= MAKEFLAGS=
6f144c9c 102SHELL=${CONFIG_SHELL-/bin/sh}
861bb6c1
JL
103# Maximum number of lines to put in a shell here document.
104ac_max_here_lines=12
105
106ac_prev=
107for ac_option
108do
109
110 # If the previous option needs an argument, assign it.
111 if test -n "$ac_prev"; then
112 eval "$ac_prev=\$ac_option"
113 ac_prev=
114 continue
115 fi
116
117 case "$ac_option" in
118 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
119 *) ac_optarg= ;;
120 esac
121
122 # Accept the important Cygnus configure options, so we can diagnose typos.
123
124 case "$ac_option" in
125
126 -bindir | --bindir | --bindi | --bind | --bin | --bi)
127 ac_prev=bindir ;;
128 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
129 bindir="$ac_optarg" ;;
130
131 -build | --build | --buil | --bui | --bu)
132 ac_prev=build ;;
133 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
134 build="$ac_optarg" ;;
135
136 -cache-file | --cache-file | --cache-fil | --cache-fi \
137 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
138 ac_prev=cache_file ;;
139 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
140 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
141 cache_file="$ac_optarg" ;;
142
143 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
144 ac_prev=datadir ;;
145 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
146 | --da=*)
147 datadir="$ac_optarg" ;;
148
149 -disable-* | --disable-*)
150 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
151 # Reject names that are not valid shell variable names.
152 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
153 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
154 fi
155 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
156 eval "enable_${ac_feature}=no" ;;
157
158 -enable-* | --enable-*)
159 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
160 # Reject names that are not valid shell variable names.
161 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
162 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
163 fi
164 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
165 case "$ac_option" in
166 *=*) ;;
167 *) ac_optarg=yes ;;
168 esac
169 eval "enable_${ac_feature}='$ac_optarg'" ;;
170
171 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
172 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
173 | --exec | --exe | --ex)
174 ac_prev=exec_prefix ;;
175 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
176 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
177 | --exec=* | --exe=* | --ex=*)
178 exec_prefix="$ac_optarg" ;;
179
180 -gas | --gas | --ga | --g)
181 # Obsolete; use --with-gas.
182 with_gas=yes ;;
183
184 -help | --help | --hel | --he)
185 # Omit some internal or obsolete options to make the list less imposing.
186 # This message is too long to be a string in the A/UX 3.1 sh.
187 cat << EOF
188Usage: configure [options] [host]
189Options: [defaults in brackets after descriptions]
190Configuration:
191 --cache-file=FILE cache test results in FILE
192 --help print this message
193 --no-create do not create output files
194 --quiet, --silent do not print \`checking...' messages
195 --version print the version of autoconf that created configure
196Directory and file names:
197 --prefix=PREFIX install architecture-independent files in PREFIX
198 [$ac_default_prefix]
199 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
200 [same as prefix]
201 --bindir=DIR user executables in DIR [EPREFIX/bin]
202 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
203 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
204 --datadir=DIR read-only architecture-independent data in DIR
205 [PREFIX/share]
206 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
207 --sharedstatedir=DIR modifiable architecture-independent data in DIR
208 [PREFIX/com]
209 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
210 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
211 --includedir=DIR C header files in DIR [PREFIX/include]
212 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
213 --infodir=DIR info documentation in DIR [PREFIX/info]
214 --mandir=DIR man documentation in DIR [PREFIX/man]
215 --srcdir=DIR find the sources in DIR [configure dir or ..]
216 --program-prefix=PREFIX prepend PREFIX to installed program names
217 --program-suffix=SUFFIX append SUFFIX to installed program names
218 --program-transform-name=PROGRAM
219 run sed PROGRAM on installed program names
220EOF
221 cat << EOF
222Host type:
223 --build=BUILD configure for building on BUILD [BUILD=HOST]
224 --host=HOST configure for HOST [guessed]
225 --target=TARGET configure for TARGET [TARGET=HOST]
226Features and packages:
227 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
228 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
229 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
230 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
231 --x-includes=DIR X include files are in DIR
232 --x-libraries=DIR X library files are in DIR
233EOF
234 if test -n "$ac_help"; then
235 echo "--enable and --with options recognized:$ac_help"
236 fi
237 exit 0 ;;
238
239 -host | --host | --hos | --ho)
240 ac_prev=host ;;
241 -host=* | --host=* | --hos=* | --ho=*)
242 host="$ac_optarg" ;;
243
244 -includedir | --includedir | --includedi | --included | --include \
245 | --includ | --inclu | --incl | --inc)
246 ac_prev=includedir ;;
247 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248 | --includ=* | --inclu=* | --incl=* | --inc=*)
249 includedir="$ac_optarg" ;;
250
251 -infodir | --infodir | --infodi | --infod | --info | --inf)
252 ac_prev=infodir ;;
253 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254 infodir="$ac_optarg" ;;
255
256 -libdir | --libdir | --libdi | --libd)
257 ac_prev=libdir ;;
258 -libdir=* | --libdir=* | --libdi=* | --libd=*)
259 libdir="$ac_optarg" ;;
260
261 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262 | --libexe | --libex | --libe)
263 ac_prev=libexecdir ;;
264 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265 | --libexe=* | --libex=* | --libe=*)
266 libexecdir="$ac_optarg" ;;
267
268 -localstatedir | --localstatedir | --localstatedi | --localstated \
269 | --localstate | --localstat | --localsta | --localst \
270 | --locals | --local | --loca | --loc | --lo)
271 ac_prev=localstatedir ;;
272 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275 localstatedir="$ac_optarg" ;;
276
277 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278 ac_prev=mandir ;;
279 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280 mandir="$ac_optarg" ;;
281
282 -nfp | --nfp | --nf)
283 # Obsolete; use --without-fp.
284 with_fp=no ;;
285
286 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287 | --no-cr | --no-c)
288 no_create=yes ;;
289
290 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292 no_recursion=yes ;;
293
294 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296 | --oldin | --oldi | --old | --ol | --o)
297 ac_prev=oldincludedir ;;
298 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301 oldincludedir="$ac_optarg" ;;
302
303 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304 ac_prev=prefix ;;
305 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306 prefix="$ac_optarg" ;;
307
308 -program-prefix | --program-prefix | --program-prefi | --program-pref \
309 | --program-pre | --program-pr | --program-p)
310 ac_prev=program_prefix ;;
311 -program-prefix=* | --program-prefix=* | --program-prefi=* \
312 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313 program_prefix="$ac_optarg" ;;
314
315 -program-suffix | --program-suffix | --program-suffi | --program-suff \
316 | --program-suf | --program-su | --program-s)
317 ac_prev=program_suffix ;;
318 -program-suffix=* | --program-suffix=* | --program-suffi=* \
319 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320 program_suffix="$ac_optarg" ;;
321
322 -program-transform-name | --program-transform-name \
323 | --program-transform-nam | --program-transform-na \
324 | --program-transform-n | --program-transform- \
325 | --program-transform | --program-transfor \
326 | --program-transfo | --program-transf \
327 | --program-trans | --program-tran \
328 | --progr-tra | --program-tr | --program-t)
329 ac_prev=program_transform_name ;;
330 -program-transform-name=* | --program-transform-name=* \
331 | --program-transform-nam=* | --program-transform-na=* \
332 | --program-transform-n=* | --program-transform-=* \
333 | --program-transform=* | --program-transfor=* \
334 | --program-transfo=* | --program-transf=* \
335 | --program-trans=* | --program-tran=* \
336 | --progr-tra=* | --program-tr=* | --program-t=*)
337 program_transform_name="$ac_optarg" ;;
338
339 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340 | -silent | --silent | --silen | --sile | --sil)
341 silent=yes ;;
342
343 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344 ac_prev=sbindir ;;
345 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346 | --sbi=* | --sb=*)
347 sbindir="$ac_optarg" ;;
348
349 -sharedstatedir | --sharedstatedir | --sharedstatedi \
350 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351 | --sharedst | --shareds | --shared | --share | --shar \
352 | --sha | --sh)
353 ac_prev=sharedstatedir ;;
354 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357 | --sha=* | --sh=*)
358 sharedstatedir="$ac_optarg" ;;
359
360 -site | --site | --sit)
361 ac_prev=site ;;
362 -site=* | --site=* | --sit=*)
363 site="$ac_optarg" ;;
364
365 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366 ac_prev=srcdir ;;
367 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368 srcdir="$ac_optarg" ;;
369
370 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371 | --syscon | --sysco | --sysc | --sys | --sy)
372 ac_prev=sysconfdir ;;
373 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375 sysconfdir="$ac_optarg" ;;
376
377 -target | --target | --targe | --targ | --tar | --ta | --t)
378 ac_prev=target ;;
379 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380 target="$ac_optarg" ;;
381
382 -v | -verbose | --verbose | --verbos | --verbo | --verb)
383 verbose=yes ;;
384
385 -version | --version | --versio | --versi | --vers)
4525d757 386 echo "configure generated by autoconf version 2.12.2"
861bb6c1
JL
387 exit 0 ;;
388
389 -with-* | --with-*)
390 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
391 # Reject names that are not valid shell variable names.
392 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
393 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
394 fi
395 ac_package=`echo $ac_package| sed 's/-/_/g'`
396 case "$ac_option" in
397 *=*) ;;
398 *) ac_optarg=yes ;;
399 esac
400 eval "with_${ac_package}='$ac_optarg'" ;;
401
402 -without-* | --without-*)
403 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
404 # Reject names that are not valid shell variable names.
405 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
406 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407 fi
408 ac_package=`echo $ac_package| sed 's/-/_/g'`
409 eval "with_${ac_package}=no" ;;
410
411 --x)
412 # Obsolete; use --with-x.
413 with_x=yes ;;
414
415 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
416 | --x-incl | --x-inc | --x-in | --x-i)
417 ac_prev=x_includes ;;
418 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
419 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
420 x_includes="$ac_optarg" ;;
421
422 -x-libraries | --x-libraries | --x-librarie | --x-librari \
423 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
424 ac_prev=x_libraries ;;
425 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
426 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
427 x_libraries="$ac_optarg" ;;
428
429 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
430 ;;
431
432 *)
433 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
434 echo "configure: warning: $ac_option: invalid host type" 1>&2
435 fi
436 if test "x$nonopt" != xNONE; then
437 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
438 fi
439 nonopt="$ac_option"
440 ;;
441
442 esac
443done
444
445if test -n "$ac_prev"; then
446 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
447fi
448
449trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
450
451# File descriptor usage:
452# 0 standard input
453# 1 file creation
454# 2 errors and warnings
455# 3 some systems may open it to /dev/tty
456# 4 used on the Kubota Titan
457# 6 checking for... messages and results
458# 5 compiler messages saved in config.log
459if test "$silent" = yes; then
460 exec 6>/dev/null
461else
462 exec 6>&1
463fi
464exec 5>./config.log
465
466echo "\
467This file contains any messages produced by compilers while
468running configure, to aid debugging if configure makes a mistake.
469" 1>&5
470
471# Strip out --no-create and --no-recursion so they do not pile up.
472# Also quote any args containing shell metacharacters.
473ac_configure_args=
474for ac_arg
475do
476 case "$ac_arg" in
477 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
478 | --no-cr | --no-c) ;;
479 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
480 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
481 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
482 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
483 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
484 esac
485done
486
487# NLS nuisances.
488# Only set these to C if already set. These must not be set unconditionally
489# because not all systems understand e.g. LANG=C (notably SCO).
490# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
491# Non-C LC_CTYPE values break the ctype check.
492if test "${LANG+set}" = set; then LANG=C; export LANG; fi
493if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
494if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
495if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
496
497# confdefs.h avoids OS command line length limits that DEFS can exceed.
498rm -rf conftest* confdefs.h
499# AIX cpp loses on an empty file, so make sure it contains at least a newline.
500echo > confdefs.h
501
502# A filename unique to this package, relative to the directory that
503# configure is in, which we can look for to find out if srcdir is correct.
504ac_unique_file=tree.c
505
506# Find the source files, if location was not specified.
507if test -z "$srcdir"; then
508 ac_srcdir_defaulted=yes
509 # Try the directory containing this script, then its parent.
510 ac_prog=$0
511 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
512 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
513 srcdir=$ac_confdir
514 if test ! -r $srcdir/$ac_unique_file; then
515 srcdir=..
516 fi
517else
518 ac_srcdir_defaulted=no
519fi
520if test ! -r $srcdir/$ac_unique_file; then
521 if test "$ac_srcdir_defaulted" = yes; then
522 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
523 else
524 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
525 fi
526fi
527srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
528
529# Prefer explicitly selected file to automatically selected ones.
530if test -z "$CONFIG_SITE"; then
531 if test "x$prefix" != xNONE; then
532 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
533 else
534 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
535 fi
536fi
537for ac_site_file in $CONFIG_SITE; do
538 if test -r "$ac_site_file"; then
539 echo "loading site script $ac_site_file"
540 . "$ac_site_file"
541 fi
542done
543
544if test -r "$cache_file"; then
545 echo "loading cache $cache_file"
546 . $cache_file
547else
548 echo "creating cache $cache_file"
549 > $cache_file
550fi
551
552ac_ext=c
553# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
554ac_cpp='$CPP $CPPFLAGS'
555ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 556ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
861bb6c1
JL
557cross_compiling=$ac_cv_prog_cc_cross
558
cd9e5e7c
MK
559ac_exeext=
560ac_objext=o
861bb6c1
JL
561if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
562 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
563 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
564 ac_n= ac_c='
565' ac_t=' '
566 else
567 ac_n=-n ac_c= ac_t=
568 fi
569else
570 ac_n= ac_c='\c' ac_t=
571fi
572
573
574
575
861bb6c1
JL
576remove=rm
577hard_link=ln
578symbolic_link='ln -s'
579copy=cp
580
75a39864
JL
581# Check for bogus environment variables.
582# Test if LIBRARY_PATH contains the notation for the current directory
583# since this would lead to problems installing/building glibc.
584# LIBRARY_PATH contains the current directory if one of the following
585# is true:
586# - one of the terminals (":" and ";") is the first or last sign
587# - two terminals occur directly after each other
588# - the path contains an element with a dot in it
589echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
4525d757 590echo "configure:591: checking LIBRARY_PATH variable" >&5
75a39864
JL
591case ${LIBRARY_PATH} in
592 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
593 library_path_setting="contains current directory"
594 ;;
595 *)
596 library_path_setting="ok"
597 ;;
598esac
599echo "$ac_t""$library_path_setting" 1>&6
600if test "$library_path_setting" != "ok"; then
601{ echo "configure: error:
602*** LIBRARY_PATH shouldn't contain the current directory when
603*** building egcs. Please change the environment variable
604*** and run configure again." 1>&2; exit 1; }
605fi
606
607# Test if GCC_EXEC_PREFIX contains the notation for the current directory
608# since this would lead to problems installing/building glibc.
609# GCC_EXEC_PREFIX contains the current directory if one of the following
610# is true:
611# - one of the terminals (":" and ";") is the first or last sign
612# - two terminals occur directly after each other
613# - the path contains an element with a dot in it
614echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
4525d757 615echo "configure:616: checking GCC_EXEC_PREFIX variable" >&5
75a39864
JL
616case ${GCC_EXEC_PREFIX} in
617 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
618 gcc_exec_prefix_setting="contains current directory"
619 ;;
620 *)
621 gcc_exec_prefix_setting="ok"
622 ;;
623esac
624echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
625if test "$gcc_exec_prefix_setting" != "ok"; then
626{ echo "configure: error:
627*** GCC_EXEC_PREFIX shouldn't contain the current directory when
628*** building egcs. Please change the environment variable
629*** and run configure again." 1>&2; exit 1; }
630fi
631
861bb6c1
JL
632# Check for additional parameters
633
634# With GNU ld
635# Check whether --with-gnu-ld or --without-gnu-ld was given.
636if test "${with_gnu_ld+set}" = set; then
637 withval="$with_gnu_ld"
df6faf79 638 gnu_ld_flag="$with_gnu_ld"
861bb6c1 639else
df6faf79 640 gnu_ld_flag=no
861bb6c1
JL
641fi
642
643
ab339d62
AO
644# With pre-defined ld
645# Check whether --with-ld or --without-ld was given.
646if test "${with_ld+set}" = set; then
647 withval="$with_ld"
3ccc3a56 648 DEFAULT_LINKER="$with_ld"
ab339d62
AO
649fi
650
3ccc3a56
AO
651if test x"${DEFAULT_LINKER+set}" = x"set"; then
652 if test ! -x "$DEFAULT_LINKER"; then
653 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
654 elif test "GNU" = `$DEFAULT_LINKER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
ab339d62
AO
655 gnu_ld_flag=yes
656 fi
657 cat >> confdefs.h <<EOF
3ccc3a56 658#define DEFAULT_LINKER "$DEFAULT_LINKER"
ab339d62
AO
659EOF
660
661fi
662
861bb6c1
JL
663# With GNU as
664# Check whether --with-gnu-as or --without-gnu-as was given.
665if test "${with_gnu_as+set}" = set; then
666 withval="$with_gnu_as"
df6faf79 667 gas_flag="$with_gnu_as"
861bb6c1 668else
df6faf79 669 gas_flag=no
861bb6c1
JL
670fi
671
672
ab339d62
AO
673# Check whether --with-as or --without-as was given.
674if test "${with_as+set}" = set; then
675 withval="$with_as"
3ccc3a56 676 DEFAULT_ASSEMBLER="$with_as"
ab339d62
AO
677fi
678
3ccc3a56
AO
679if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
680 if test ! -x "$DEFAULT_ASSEMBLER"; then
681 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
682 elif test "GNU" = `$DEFAULT_ASSEMBLER -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
ab339d62
AO
683 gas_flag=yes
684 fi
685 cat >> confdefs.h <<EOF
3ccc3a56 686#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ab339d62
AO
687EOF
688
3ccc3a56 689fi
ab339d62 690
861bb6c1
JL
691# With stabs
692# Check whether --with-stabs or --without-stabs was given.
693if test "${with_stabs+set}" = set; then
694 withval="$with_stabs"
535b86ce 695 stabs="$with_stabs"
861bb6c1
JL
696else
697 stabs=no
698fi
699
700
701# With ELF
702# Check whether --with-elf or --without-elf was given.
703if test "${with_elf+set}" = set; then
704 withval="$with_elf"
535b86ce 705 elf="$with_elf"
861bb6c1
JL
706else
707 elf=no
708fi
709
710
711# Specify the local prefix
4e88d51b 712local_prefix=
861bb6c1
JL
713# Check whether --with-local-prefix or --without-local-prefix was given.
714if test "${with_local_prefix+set}" = set; then
715 withval="$with_local_prefix"
4e88d51b
JM
716 case "${withval}" in
717yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
718no) ;;
719*) local_prefix=$with_local_prefix ;;
720esac
861bb6c1
JL
721fi
722
723
724# Default local prefix if it is empty
75bffa71 725if test x$local_prefix = x; then
861bb6c1
JL
726 local_prefix=/usr/local
727fi
728
8f8d3278
NC
729# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
730# passed in by the toplevel make and thus we'd get different behavior
731# depending on where we built the sources.
732gcc_gxx_include_dir=
861bb6c1
JL
733# Specify the g++ header file directory
734# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
735if test "${with_gxx_include_dir+set}" = set; then
736 withval="$with_gxx_include_dir"
4e88d51b
JM
737 case "${withval}" in
738yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
739no) ;;
8f8d3278 740*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
4e88d51b 741esac
861bb6c1
JL
742fi
743
744
8f8d3278 745if test x${gcc_gxx_include_dir} = x; then
4e88d51b 746 if test x${enable_version_specific_runtime_libs} = xyes; then
8f8d3278 747 gcc_gxx_include_dir='${libsubdir}/include/g++'
4e88d51b 748 else
a270b446 749 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
8f8d3278 750 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
4e88d51b
JM
751 fi
752fi
753
a494747c
MM
754# Enable expensive internal checks
755# Check whether --enable-checking or --disable-checking was given.
756if test "${enable_checking+set}" = set; then
757 enableval="$enable_checking"
4e88d51b
JM
758 case "${enableval}" in
759yes) cat >> confdefs.h <<\EOF
a494747c
MM
760#define ENABLE_CHECKING 1
761EOF
4e88d51b
JM
762 ;;
763no) ;;
764*) { echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;;
765esac
a494747c
MM
766fi
767
768
f81a440f 769# Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
e061d1ce 770cpp_main=cccp
f81a440f
ZW
771# Check whether --enable-cpplib or --disable-cpplib was given.
772if test "${enable_cpplib+set}" = set; then
773 enableval="$enable_cpplib"
774 if test x$enable_cpplib != xno; then
775 cpp_main=cppmain
776fi
777fi
778
779
780# Link cpplib into the compiler proper, for C/C++/ObjC.
861bb6c1
JL
781# Check whether --enable-c-cpplib or --disable-c-cpplib was given.
782if test "${enable_c_cpplib+set}" = set; then
783 enableval="$enable_c_cpplib"
75bffa71 784 if test x$enable_c_cpplib != xno; then
19283265
RH
785 extra_c_objs="${extra_c_objs} libcpp.a"
786 extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
4525d757 787 extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
e061d1ce 788 cpp_main=cppmain
861bb6c1
JL
789fi
790fi
791
f81a440f 792
0b9d02c6
JL
793# Enable Multibyte Characters for C/C++
794# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
795if test "${enable_c_mbchar+set}" = set; then
796 enableval="$enable_c_mbchar"
75bffa71 797 if test x$enable_c_mbchar != xno; then
0b9d02c6
JL
798 extra_c_flags=-DMULTIBYTE_CHARS=1
799fi
800fi
801
802
9101297d
DL
803# Enable Haifa scheduler.
804# Check whether --enable-haifa or --disable-haifa was given.
805if test "${enable_haifa+set}" = set; then
806 enableval="$enable_haifa"
807 :
808fi
809
4b104d6e
JL
810# Fast fixincludes
811#
812# This is a work in progress...
34a4c466
JL
813# Check whether --with-fast-fixincludes or --without-fast-fixincludes was given.
814if test "${with_fast_fixincludes+set}" = set; then
815 withval="$with_fast_fixincludes"
816 fast_fixinc="$with_fast_fixincludes"
817else
4b104d6e
JL
818 fast_fixinc=no
819fi
820
861bb6c1
JL
821
822# Enable threads
823# Pass with no value to take the default
824# Pass with a value to specify a thread package
825# Check whether --enable-threads or --disable-threads was given.
826if test "${enable_threads+set}" = set; then
827 enableval="$enable_threads"
75bffa71 828 if test x$enable_threads = xno; then
861bb6c1
JL
829 enable_threads=''
830fi
831else
832 enable_threads=''
833fi
834
835
e445171e 836enable_threads_flag=$enable_threads
861bb6c1 837# Check if a valid thread package
e445171e 838case x${enable_threads_flag} in
861bb6c1
JL
839 x | xno)
840 # No threads
a851212a 841 target_thread_file='single'
861bb6c1
JL
842 ;;
843 xyes)
844 # default
a851212a 845 target_thread_file=''
861bb6c1
JL
846 ;;
847 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
7cc34889 848 xsolaris | xwin32 | xdce | xvxworks)
e445171e 849 target_thread_file=$enable_threads_flag
861bb6c1
JL
850 ;;
851 *)
852 echo "$enable_threads is an unknown thread package" 1>&2
853 exit 1
854 ;;
855esac
856
d8bb17c8
OP
857# Check whether --enable-objc-gc or --disable-objc-gc was given.
858if test "${enable_objc_gc+set}" = set; then
859 enableval="$enable_objc_gc"
860 if [ x$enable_objc_gc = xno ]; then
861 objc_boehm_gc=''
862else
863 objc_boehm_gc=1
864fi
865else
866 objc_boehm_gc=''
867fi
868
869
df37e3db
TT
870# Check whether --enable-java-gc or --disable-java-gc was given.
871if test "${enable_java_gc+set}" = set; then
872 enableval="$enable_java_gc"
873
874 JAVAGC=$enableval
875else
876 JAVAGC=boehm
877fi
878
879
90e6a802
RL
880# Check whether --with-dwarf2 or --without-dwarf2 was given.
881if test "${with_dwarf2+set}" = set; then
882 withval="$with_dwarf2"
883 dwarf2="$with_dwarf2"
884else
885 dwarf2=no
886fi
887
888
861bb6c1
JL
889# Determine the host, build, and target systems
890ac_aux_dir=
891for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
892 if test -f $ac_dir/install-sh; then
893 ac_aux_dir=$ac_dir
894 ac_install_sh="$ac_aux_dir/install-sh -c"
895 break
896 elif test -f $ac_dir/install.sh; then
897 ac_aux_dir=$ac_dir
898 ac_install_sh="$ac_aux_dir/install.sh -c"
899 break
900 fi
901done
902if test -z "$ac_aux_dir"; then
903 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
904fi
905ac_config_guess=$ac_aux_dir/config.guess
906ac_config_sub=$ac_aux_dir/config.sub
907ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
908
909
910# Do some error checking and defaulting for the host and target type.
911# The inputs are:
912# configure --host=HOST --target=TARGET --build=BUILD NONOPT
913#
914# The rules are:
915# 1. You are not allowed to specify --host, --target, and nonopt at the
916# same time.
917# 2. Host defaults to nonopt.
918# 3. If nonopt is not specified, then host defaults to the current host,
919# as determined by config.guess.
920# 4. Target and build default to nonopt.
921# 5. If nonopt is not specified, then target and build default to host.
922
923# The aliases save the names the user supplied, while $host etc.
924# will get canonicalized.
925case $host---$target---$nonopt in
926NONE---*---* | *---NONE---* | *---*---NONE) ;;
927*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
928esac
929
930
931# Make sure we can run config.sub.
6f144c9c 932if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
861bb6c1
JL
933else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
934fi
935
936echo $ac_n "checking host system type""... $ac_c" 1>&6
4525d757 937echo "configure:938: checking host system type" >&5
861bb6c1
JL
938
939host_alias=$host
940case "$host_alias" in
941NONE)
942 case $nonopt in
943 NONE)
6f144c9c 944 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
861bb6c1
JL
945 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
946 fi ;;
947 *) host_alias=$nonopt ;;
948 esac ;;
949esac
950
6f144c9c 951host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861bb6c1
JL
952host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
953host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
954host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
955echo "$ac_t""$host" 1>&6
956
957echo $ac_n "checking target system type""... $ac_c" 1>&6
4525d757 958echo "configure:959: checking target system type" >&5
861bb6c1
JL
959
960target_alias=$target
961case "$target_alias" in
962NONE)
963 case $nonopt in
964 NONE) target_alias=$host_alias ;;
965 *) target_alias=$nonopt ;;
966 esac ;;
967esac
968
6f144c9c 969target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
861bb6c1
JL
970target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
971target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
972target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
973echo "$ac_t""$target" 1>&6
974
975echo $ac_n "checking build system type""... $ac_c" 1>&6
4525d757 976echo "configure:977: checking build system type" >&5
861bb6c1
JL
977
978build_alias=$build
979case "$build_alias" in
980NONE)
981 case $nonopt in
982 NONE) build_alias=$host_alias ;;
983 *) build_alias=$nonopt ;;
984 esac ;;
985esac
986
6f144c9c 987build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
861bb6c1
JL
988build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991echo "$ac_t""$build" 1>&6
992
993test "$host_alias" != "$target_alias" &&
994 test "$program_prefix$program_suffix$program_transform_name" = \
995 NONENONEs,x,x, &&
996 program_prefix=${target_alias}-
997
998
e9a25f70
JL
999# Find the native compiler
1000# Extract the first word of "gcc", so it can be a program name with args.
1001set dummy gcc; ac_word=$2
1002echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1003echo "configure:1004: checking for $ac_word" >&5
e9a25f70
JL
1004if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1005 echo $ac_n "(cached) $ac_c" 1>&6
1006else
1007 if test -n "$CC"; then
1008 ac_cv_prog_CC="$CC" # Let the user override the test.
1009else
cd9e5e7c 1010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1011 for ac_dir in $PATH; do
e9a25f70
JL
1012 test -z "$ac_dir" && ac_dir=.
1013 if test -f $ac_dir/$ac_word; then
1014 ac_cv_prog_CC="gcc"
1015 break
1016 fi
1017 done
1018 IFS="$ac_save_ifs"
1019fi
1020fi
1021CC="$ac_cv_prog_CC"
1022if test -n "$CC"; then
1023 echo "$ac_t""$CC" 1>&6
1024else
1025 echo "$ac_t""no" 1>&6
1026fi
1027
1028if test -z "$CC"; then
1029 # Extract the first word of "cc", so it can be a program name with args.
1030set dummy cc; ac_word=$2
1031echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1032echo "configure:1033: checking for $ac_word" >&5
e9a25f70
JL
1033if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1034 echo $ac_n "(cached) $ac_c" 1>&6
1035else
1036 if test -n "$CC"; then
1037 ac_cv_prog_CC="$CC" # Let the user override the test.
1038else
cd9e5e7c 1039 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
e9a25f70 1040 ac_prog_rejected=no
4525d757 1041 for ac_dir in $PATH; do
e9a25f70
JL
1042 test -z "$ac_dir" && ac_dir=.
1043 if test -f $ac_dir/$ac_word; then
1044 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1045 ac_prog_rejected=yes
1046 continue
1047 fi
1048 ac_cv_prog_CC="cc"
1049 break
1050 fi
1051 done
1052 IFS="$ac_save_ifs"
1053if test $ac_prog_rejected = yes; then
1054 # We found a bogon in the path, so make sure we never use it.
1055 set dummy $ac_cv_prog_CC
1056 shift
1057 if test $# -gt 0; then
1058 # We chose a different compiler from the bogus one.
1059 # However, it has the same basename, so the bogon will be chosen
1060 # first if we set CC to just the basename; use the full file name.
1061 shift
1062 set dummy "$ac_dir/$ac_word" "$@"
1063 shift
1064 ac_cv_prog_CC="$@"
1065 fi
1066fi
1067fi
1068fi
1069CC="$ac_cv_prog_CC"
1070if test -n "$CC"; then
1071 echo "$ac_t""$CC" 1>&6
1072else
1073 echo "$ac_t""no" 1>&6
1074fi
1075
cd9e5e7c
MK
1076 if test -z "$CC"; then
1077 case "`uname -s`" in
1078 *win32* | *WIN32*)
1079 # Extract the first word of "cl", so it can be a program name with args.
1080set dummy cl; ac_word=$2
1081echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1082echo "configure:1083: checking for $ac_word" >&5
cd9e5e7c
MK
1083if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1084 echo $ac_n "(cached) $ac_c" 1>&6
1085else
1086 if test -n "$CC"; then
1087 ac_cv_prog_CC="$CC" # Let the user override the test.
1088else
1089 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1090 for ac_dir in $PATH; do
cd9e5e7c
MK
1091 test -z "$ac_dir" && ac_dir=.
1092 if test -f $ac_dir/$ac_word; then
1093 ac_cv_prog_CC="cl"
1094 break
1095 fi
1096 done
1097 IFS="$ac_save_ifs"
1098fi
1099fi
1100CC="$ac_cv_prog_CC"
1101if test -n "$CC"; then
1102 echo "$ac_t""$CC" 1>&6
1103else
1104 echo "$ac_t""no" 1>&6
1105fi
1106 ;;
1107 esac
1108 fi
e9a25f70
JL
1109 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1110fi
1111
1112echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
4525d757 1113echo "configure:1114: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
e9a25f70
JL
1114
1115ac_ext=c
1116# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1117ac_cpp='$CPP $CPPFLAGS'
1118ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 1119ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
e9a25f70
JL
1120cross_compiling=$ac_cv_prog_cc_cross
1121
4525d757
JM
1122cat > conftest.$ac_ext <<EOF
1123#line 1124 "configure"
e9a25f70
JL
1124#include "confdefs.h"
1125main(){return(0);}
1126EOF
4525d757 1127if { (eval echo configure:1128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e9a25f70
JL
1128 ac_cv_prog_cc_works=yes
1129 # If we can't run a trivial program, we are probably using a cross compiler.
1130 if (./conftest; exit) 2>/dev/null; then
1131 ac_cv_prog_cc_cross=no
1132 else
1133 ac_cv_prog_cc_cross=yes
1134 fi
1135else
1136 echo "configure: failed program was:" >&5
1137 cat conftest.$ac_ext >&5
1138 ac_cv_prog_cc_works=no
1139fi
1140rm -fr conftest*
1141
1142echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1143if test $ac_cv_prog_cc_works = no; then
1144 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1145fi
1146echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
4525d757 1147echo "configure:1148: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
e9a25f70
JL
1148echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1149cross_compiling=$ac_cv_prog_cc_cross
1150
1151echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
4525d757 1152echo "configure:1153: checking whether we are using GNU C" >&5
e9a25f70
JL
1153if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155else
1156 cat > conftest.c <<EOF
1157#ifdef __GNUC__
1158 yes;
1159#endif
1160EOF
4525d757 1161if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
e9a25f70
JL
1162 ac_cv_prog_gcc=yes
1163else
1164 ac_cv_prog_gcc=no
1165fi
1166fi
1167
1168echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1169
1170if test $ac_cv_prog_gcc = yes; then
1171 GCC=yes
cd9e5e7c
MK
1172else
1173 GCC=
1174fi
1175
1176ac_test_CFLAGS="${CFLAGS+set}"
1177ac_save_CFLAGS="$CFLAGS"
1178CFLAGS=
1179echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
4525d757 1180echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5
e9a25f70
JL
1181if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184 echo 'void f(){}' > conftest.c
1185if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1186 ac_cv_prog_cc_g=yes
1187else
1188 ac_cv_prog_cc_g=no
1189fi
1190rm -f conftest*
1191
1192fi
1193
1194echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
cd9e5e7c
MK
1195if test "$ac_test_CFLAGS" = set; then
1196 CFLAGS="$ac_save_CFLAGS"
1197elif test $ac_cv_prog_cc_g = yes; then
1198 if test "$GCC" = yes; then
e9a25f70
JL
1199 CFLAGS="-g -O2"
1200 else
cd9e5e7c 1201 CFLAGS="-g"
81814e35 1202 fi
3723cad9 1203else
cd9e5e7c
MK
1204 if test "$GCC" = yes; then
1205 CFLAGS="-O2"
1206 else
1207 CFLAGS=
1208 fi
e9a25f70
JL
1209fi
1210
61842080
MM
1211
1212# If the native compiler is GCC, we can enable warnings even in stage1.
1213# That's useful for people building cross-compilers, or just running a
1214# quick `make'.
1215if test "x$GCC" = "xyes"; then
1216 stage1_warn_cflags='$(WARN_CFLAGS)'
1217else
1218 stage1_warn_cflags=""
1219fi
1220
1221
e9a25f70 1222echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4525d757 1223echo "configure:1224: checking whether ${MAKE-make} sets \${MAKE}" >&5
e9a25f70
JL
1224set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1225if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1227else
1228 cat > conftestmake <<\EOF
1229all:
1230 @echo 'ac_maketemp="${MAKE}"'
1231EOF
1232# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1233eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1234if test -n "$ac_maketemp"; then
1235 eval ac_cv_prog_make_${ac_make}_set=yes
1236else
1237 eval ac_cv_prog_make_${ac_make}_set=no
1238fi
1239rm -f conftestmake
1240fi
1241if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1242 echo "$ac_t""yes" 1>&6
1243 SET_MAKE=
1244else
1245 echo "$ac_t""no" 1>&6
1246 SET_MAKE="MAKE=${MAKE-make}"
1247fi
1248
1249
ab339d62 1250echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
4525d757 1251echo "configure:1252: checking whether a default assembler was specified" >&5
3ccc3a56 1252if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
ab339d62 1253 if test x"$with_gas" = x"no"; then
3ccc3a56 1254 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
ab339d62 1255 else
3ccc3a56 1256 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
ab339d62
AO
1257 fi
1258else
1259 echo "$ac_t""no" 1>&6
1260fi
1261
1262echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
4525d757 1263echo "configure:1264: checking whether a default linker was specified" >&5
3ccc3a56 1264if test x"${DEFAULT_LINKER+set}" = x"set"; then
ab339d62 1265 if test x"$with_gnu_ld" = x"no"; then
3ccc3a56 1266 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
ab339d62 1267 else
3ccc3a56 1268 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
ab339d62
AO
1269 fi
1270else
1271 echo "$ac_t""no" 1>&6
1272fi
1273
861bb6c1
JL
1274# Find some useful tools
1275for ac_prog in mawk gawk nawk awk
1276do
1277# Extract the first word of "$ac_prog", so it can be a program name with args.
1278set dummy $ac_prog; ac_word=$2
1279echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1280echo "configure:1281: checking for $ac_word" >&5
861bb6c1
JL
1281if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1283else
1284 if test -n "$AWK"; then
1285 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1286else
cd9e5e7c 1287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1288 for ac_dir in $PATH; do
861bb6c1
JL
1289 test -z "$ac_dir" && ac_dir=.
1290 if test -f $ac_dir/$ac_word; then
1291 ac_cv_prog_AWK="$ac_prog"
1292 break
1293 fi
1294 done
1295 IFS="$ac_save_ifs"
1296fi
1297fi
1298AWK="$ac_cv_prog_AWK"
1299if test -n "$AWK"; then
1300 echo "$ac_t""$AWK" 1>&6
1301else
1302 echo "$ac_t""no" 1>&6
1303fi
1304
1305test -n "$AWK" && break
1306done
1307
1308# Extract the first word of "flex", so it can be a program name with args.
1309set dummy flex; ac_word=$2
1310echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1311echo "configure:1312: checking for $ac_word" >&5
861bb6c1
JL
1312if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1314else
1315 if test -n "$LEX"; then
1316 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1317else
cd9e5e7c 1318 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1319 for ac_dir in $PATH; do
861bb6c1
JL
1320 test -z "$ac_dir" && ac_dir=.
1321 if test -f $ac_dir/$ac_word; then
1322 ac_cv_prog_LEX="flex"
1323 break
1324 fi
1325 done
1326 IFS="$ac_save_ifs"
1327 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1328fi
1329fi
1330LEX="$ac_cv_prog_LEX"
1331if test -n "$LEX"; then
1332 echo "$ac_t""$LEX" 1>&6
1333else
1334 echo "$ac_t""no" 1>&6
1335fi
1336
1337if test -z "$LEXLIB"
1338then
1339 case "$LEX" in
1340 flex*) ac_lib=fl ;;
1341 *) ac_lib=l ;;
1342 esac
1343 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
4525d757 1344echo "configure:1345: checking for yywrap in -l$ac_lib" >&5
861bb6c1
JL
1345ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1346if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1348else
1349 ac_save_LIBS="$LIBS"
1350LIBS="-l$ac_lib $LIBS"
1351cat > conftest.$ac_ext <<EOF
4525d757 1352#line 1353 "configure"
861bb6c1
JL
1353#include "confdefs.h"
1354/* Override any gcc2 internal prototype to avoid an error. */
1355/* We use char because int might match the return type of a gcc2
1356 builtin and then its argument prototype would still apply. */
1357char yywrap();
1358
1359int main() {
1360yywrap()
1361; return 0; }
1362EOF
4525d757 1363if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
861bb6c1
JL
1364 rm -rf conftest*
1365 eval "ac_cv_lib_$ac_lib_var=yes"
1366else
1367 echo "configure: failed program was:" >&5
1368 cat conftest.$ac_ext >&5
1369 rm -rf conftest*
1370 eval "ac_cv_lib_$ac_lib_var=no"
1371fi
1372rm -f conftest*
1373LIBS="$ac_save_LIBS"
1374
1375fi
1376if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1377 echo "$ac_t""yes" 1>&6
1378 LEXLIB="-l$ac_lib"
1379else
1380 echo "$ac_t""no" 1>&6
1381fi
1382
1383fi
1384
0a4b6309 1385echo $ac_n "checking whether ln works""... $ac_c" 1>&6
4525d757 1386echo "configure:1387: checking whether ln works" >&5
0a4b6309
RL
1387if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389else
1390 rm -f conftestdata_t
1391echo >conftestdata_f
1392if ln conftestdata_f conftestdata_t 2>/dev/null
1393then
1394 gcc_cv_prog_LN="ln"
1395else
1396 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1397 then
1398 gcc_cv_prog_LN="ln -s"
1399 else
1400 gcc_cv_prog_LN=cp
1401 fi
1402fi
1403rm -f conftestdata_f conftestdata_t
1404
1405fi
1406LN="$gcc_cv_prog_LN"
1407if test "$gcc_cv_prog_LN" = "ln"; then
1408 echo "$ac_t""yes" 1>&6
1409else
1410 if test "$gcc_cv_prog_LN" = "ln -s"; then
1411 echo "$ac_t""no, using ln -s" 1>&6
1412 else
1413 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1414 fi
1415fi
1416
1417echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
4525d757 1418echo "configure:1419: checking whether ln -s works" >&5
0a4b6309
RL
1419if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1420 echo $ac_n "(cached) $ac_c" 1>&6
1421else
1422 rm -f conftestdata_t
1423echo >conftestdata_f
1424if ln -s conftestdata_f conftestdata_t 2>/dev/null
1425then
1426 gcc_cv_prog_LN_S="ln -s"
1427else
1428 if ln conftestdata_f conftestdata_t 2>/dev/null
1429 then
1430 gcc_cv_prog_LN_S=ln
1431 else
1432 gcc_cv_prog_LN_S=cp
1433 fi
1434fi
1435rm -f conftestdata_f conftestdata_t
1436
1437fi
1438LN_S="$gcc_cv_prog_LN_S"
1439if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1440 echo "$ac_t""yes" 1>&6
1441else
1442 if test "$gcc_cv_prog_LN_S" = "ln"; then
1443 echo "$ac_t""no, using ln" 1>&6
1444 else
1445 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1446 fi
1447fi
1448
1449echo $ac_n "checking for volatile""... $ac_c" 1>&6
4525d757 1450echo "configure:1451: checking for volatile" >&5
0a4b6309
RL
1451if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1452 echo $ac_n "(cached) $ac_c" 1>&6
1453else
1454 cat > conftest.$ac_ext <<EOF
4525d757 1455#line 1456 "configure"
0a4b6309
RL
1456#include "confdefs.h"
1457
1458int main() {
1459volatile int foo;
1460; return 0; }
1461EOF
4525d757 1462if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
1463 rm -rf conftest*
1464 gcc_cv_c_volatile=yes
1465else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 gcc_cv_c_volatile=no
1470fi
1471rm -f conftest*
1472fi
1473
1474echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1475if test $gcc_cv_c_volatile = yes ; then
1476 cat >> confdefs.h <<\EOF
1477#define HAVE_VOLATILE 1
1478EOF
1479
1480fi
1481
861bb6c1
JL
1482# Extract the first word of "ranlib", so it can be a program name with args.
1483set dummy ranlib; ac_word=$2
1484echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1485echo "configure:1486: checking for $ac_word" >&5
861bb6c1
JL
1486if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1487 echo $ac_n "(cached) $ac_c" 1>&6
1488else
1489 if test -n "$RANLIB"; then
1490 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1491else
cd9e5e7c 1492 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1493 for ac_dir in $PATH; do
861bb6c1
JL
1494 test -z "$ac_dir" && ac_dir=.
1495 if test -f $ac_dir/$ac_word; then
1496 ac_cv_prog_RANLIB="ranlib"
1497 break
1498 fi
1499 done
1500 IFS="$ac_save_ifs"
1501 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1502fi
1503fi
1504RANLIB="$ac_cv_prog_RANLIB"
1505if test -n "$RANLIB"; then
1506 echo "$ac_t""$RANLIB" 1>&6
1507else
1508 echo "$ac_t""no" 1>&6
1509fi
1510
1511for ac_prog in 'bison -y' byacc
1512do
1513# Extract the first word of "$ac_prog", so it can be a program name with args.
1514set dummy $ac_prog; ac_word=$2
1515echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 1516echo "configure:1517: checking for $ac_word" >&5
861bb6c1
JL
1517if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1518 echo $ac_n "(cached) $ac_c" 1>&6
1519else
1520 if test -n "$YACC"; then
1521 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1522else
cd9e5e7c 1523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 1524 for ac_dir in $PATH; do
861bb6c1
JL
1525 test -z "$ac_dir" && ac_dir=.
1526 if test -f $ac_dir/$ac_word; then
1527 ac_cv_prog_YACC="$ac_prog"
1528 break
1529 fi
1530 done
1531 IFS="$ac_save_ifs"
1532fi
1533fi
1534YACC="$ac_cv_prog_YACC"
1535if test -n "$YACC"; then
1536 echo "$ac_t""$YACC" 1>&6
1537else
1538 echo "$ac_t""no" 1>&6
1539fi
1540
1541test -n "$YACC" && break
1542done
1543test -n "$YACC" || YACC="yacc"
1544
0a4b6309
RL
1545# Find a good install program. We prefer a C program (faster),
1546# so one script is as good as another. But avoid the broken or
1547# incompatible versions:
1548# SysV /etc/install, /usr/sbin/install
1549# SunOS /usr/etc/install
1550# IRIX /sbin/install
1551# AIX /bin/install
1552# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1553# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1554# ./install, which can be erroneously created by make from ./install.sh.
1555echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4525d757 1556echo "configure:1557: checking for a BSD compatible install" >&5
0a4b6309
RL
1557if test -z "$INSTALL"; then
1558if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1559 echo $ac_n "(cached) $ac_c" 1>&6
1560else
1561 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1562 for ac_dir in $PATH; do
1563 # Account for people who put trailing slashes in PATH elements.
1564 case "$ac_dir/" in
1565 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1566 *)
1567 # OSF1 and SCO ODT 3.0 have their own names for install.
1568 for ac_prog in ginstall scoinst install; do
1569 if test -f $ac_dir/$ac_prog; then
1570 if test $ac_prog = install &&
1571 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1572 # AIX install. It has an incompatible calling convention.
1573 # OSF/1 installbsd also uses dspmsg, but is usable.
1574 :
1575 else
1576 ac_cv_path_install="$ac_dir/$ac_prog -c"
1577 break 2
1578 fi
1579 fi
1580 done
1581 ;;
1582 esac
1583 done
1584 IFS="$ac_save_IFS"
1585
1586fi
1587 if test "${ac_cv_path_install+set}" = set; then
1588 INSTALL="$ac_cv_path_install"
1589 else
1590 # As a last resort, use the slow shell script. We don't cache a
1591 # path for INSTALL within a source directory, because that will
1592 # break other packages using the cache if that directory is
1593 # removed, or if the path is relative.
1594 INSTALL="$ac_install_sh"
1595 fi
1596fi
1597echo "$ac_t""$INSTALL" 1>&6
1598
1599# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1600# It thinks the first close brace ends the variable substitution.
1601test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1602
1603test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1604
861bb6c1 1605
861bb6c1 1606echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
4525d757 1607echo "configure:1608: checking how to run the C preprocessor" >&5
861bb6c1
JL
1608# On Suns, sometimes $CPP names a directory.
1609if test -n "$CPP" && test -d "$CPP"; then
1610 CPP=
1611fi
1612if test -z "$CPP"; then
1613if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1614 echo $ac_n "(cached) $ac_c" 1>&6
1615else
1616 # This must be in double quotes, not single quotes, because CPP may get
1617 # substituted into the Makefile and "${CC-cc}" will confuse make.
1618 CPP="${CC-cc} -E"
1619 # On the NeXT, cc -E runs the code through the compiler's parser,
1620 # not just through cpp.
1621 cat > conftest.$ac_ext <<EOF
4525d757 1622#line 1623 "configure"
861bb6c1
JL
1623#include "confdefs.h"
1624#include <assert.h>
1625Syntax Error
1626EOF
1627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1628{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
861bb6c1
JL
1630if test -z "$ac_err"; then
1631 :
1632else
1633 echo "$ac_err" >&5
1634 echo "configure: failed program was:" >&5
1635 cat conftest.$ac_ext >&5
1636 rm -rf conftest*
1637 CPP="${CC-cc} -E -traditional-cpp"
1638 cat > conftest.$ac_ext <<EOF
4525d757 1639#line 1640 "configure"
cd9e5e7c
MK
1640#include "confdefs.h"
1641#include <assert.h>
1642Syntax Error
1643EOF
1644ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1645{ (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c
MK
1646ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1647if test -z "$ac_err"; then
1648 :
1649else
1650 echo "$ac_err" >&5
1651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 rm -rf conftest*
1654 CPP="${CC-cc} -nologo -E"
1655 cat > conftest.$ac_ext <<EOF
4525d757 1656#line 1657 "configure"
20fced2c
MM
1657#include "confdefs.h"
1658#include <assert.h>
1659Syntax Error
1660EOF
1661ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1662{ (eval echo configure:1663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1663ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
861bb6c1
JL
1664if test -z "$ac_err"; then
1665 :
1666else
1667 echo "$ac_err" >&5
1668 echo "configure: failed program was:" >&5
1669 cat conftest.$ac_ext >&5
1670 rm -rf conftest*
1671 CPP=/lib/cpp
1672fi
1673rm -f conftest*
1674fi
cd9e5e7c
MK
1675rm -f conftest*
1676fi
861bb6c1
JL
1677rm -f conftest*
1678 ac_cv_prog_CPP="$CPP"
1679fi
1680 CPP="$ac_cv_prog_CPP"
1681else
1682 ac_cv_prog_CPP="$CPP"
1683fi
1684echo "$ac_t""$CPP" 1>&6
1685
956d6950 1686echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4525d757 1687echo "configure:1688: checking for ANSI C header files" >&5
956d6950
JL
1688if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1689 echo $ac_n "(cached) $ac_c" 1>&6
1690else
1691 cat > conftest.$ac_ext <<EOF
4525d757 1692#line 1693 "configure"
956d6950
JL
1693#include "confdefs.h"
1694#include <stdlib.h>
1695#include <stdarg.h>
1696#include <string.h>
1697#include <float.h>
1698EOF
1699ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1700{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1701ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
1702if test -z "$ac_err"; then
1703 rm -rf conftest*
1704 ac_cv_header_stdc=yes
1705else
1706 echo "$ac_err" >&5
1707 echo "configure: failed program was:" >&5
1708 cat conftest.$ac_ext >&5
1709 rm -rf conftest*
1710 ac_cv_header_stdc=no
1711fi
1712rm -f conftest*
1713
1714if test $ac_cv_header_stdc = yes; then
1715 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1716cat > conftest.$ac_ext <<EOF
4525d757 1717#line 1718 "configure"
956d6950
JL
1718#include "confdefs.h"
1719#include <string.h>
1720EOF
1721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1722 egrep "memchr" >/dev/null 2>&1; then
1723 :
1724else
1725 rm -rf conftest*
1726 ac_cv_header_stdc=no
1727fi
1728rm -f conftest*
1729
1730fi
1731
1732if test $ac_cv_header_stdc = yes; then
1733 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1734cat > conftest.$ac_ext <<EOF
4525d757 1735#line 1736 "configure"
956d6950
JL
1736#include "confdefs.h"
1737#include <stdlib.h>
1738EOF
1739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1740 egrep "free" >/dev/null 2>&1; then
1741 :
1742else
1743 rm -rf conftest*
1744 ac_cv_header_stdc=no
1745fi
1746rm -f conftest*
1747
1748fi
1749
1750if test $ac_cv_header_stdc = yes; then
1751 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1752if test "$cross_compiling" = yes; then
1753 :
1754else
1755 cat > conftest.$ac_ext <<EOF
4525d757 1756#line 1757 "configure"
956d6950
JL
1757#include "confdefs.h"
1758#include <ctype.h>
1759#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1760#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1761#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1762int main () { int i; for (i = 0; i < 256; i++)
1763if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1764exit (0); }
1765
1766EOF
4525d757 1767if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
956d6950
JL
1768then
1769 :
1770else
1771 echo "configure: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1773 rm -fr conftest*
1774 ac_cv_header_stdc=no
1775fi
1776rm -fr conftest*
1777fi
1778
1779fi
1780fi
1781
1782echo "$ac_t""$ac_cv_header_stdc" 1>&6
1783if test $ac_cv_header_stdc = yes; then
1784 cat >> confdefs.h <<\EOF
1785#define STDC_HEADERS 1
1786EOF
1787
1788fi
1789
1790echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4525d757 1791echo "configure:1792: checking whether time.h and sys/time.h may both be included" >&5
956d6950
JL
1792if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794else
1795 cat > conftest.$ac_ext <<EOF
4525d757 1796#line 1797 "configure"
956d6950
JL
1797#include "confdefs.h"
1798#include <sys/types.h>
1799#include <sys/time.h>
1800#include <time.h>
1801int main() {
1802struct tm *tp;
1803; return 0; }
1804EOF
4525d757 1805if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
1806 rm -rf conftest*
1807 ac_cv_header_time=yes
1808else
1809 echo "configure: failed program was:" >&5
1810 cat conftest.$ac_ext >&5
1811 rm -rf conftest*
1812 ac_cv_header_time=no
1813fi
1814rm -f conftest*
1815fi
1816
1817echo "$ac_t""$ac_cv_header_time" 1>&6
1818if test $ac_cv_header_time = yes; then
1819 cat >> confdefs.h <<\EOF
1820#define TIME_WITH_SYS_TIME 1
1821EOF
1822
1823fi
1824
0a4b6309 1825echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
4525d757 1826echo "configure:1827: checking whether string.h and strings.h may both be included" >&5
0a4b6309
RL
1827if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
1828 echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830 cat > conftest.$ac_ext <<EOF
4525d757 1831#line 1832 "configure"
0a4b6309
RL
1832#include "confdefs.h"
1833#include <string.h>
1834#include <strings.h>
1835int main() {
1836
1837; return 0; }
1838EOF
4525d757 1839if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
1840 rm -rf conftest*
1841 gcc_cv_header_string=yes
1842else
1843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 rm -rf conftest*
1846 gcc_cv_header_string=no
1847fi
1848rm -f conftest*
1849fi
1850
1851echo "$ac_t""$gcc_cv_header_string" 1>&6
1852if test $gcc_cv_header_string = yes; then
1853 cat >> confdefs.h <<\EOF
1854#define STRING_WITH_STRINGS 1
1855EOF
1856
1857fi
1858
e9831ca0 1859echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4525d757 1860echo "configure:1861: checking for sys/wait.h that is POSIX.1 compatible" >&5
e9831ca0
KG
1861if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863else
1864 cat > conftest.$ac_ext <<EOF
4525d757 1865#line 1866 "configure"
e9831ca0
KG
1866#include "confdefs.h"
1867#include <sys/types.h>
1868#include <sys/wait.h>
1869#ifndef WEXITSTATUS
1870#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1871#endif
1872#ifndef WIFEXITED
1873#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1874#endif
1875int main() {
1876int s;
1877wait (&s);
1878s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1879; return 0; }
1880EOF
4525d757 1881if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e9831ca0
KG
1882 rm -rf conftest*
1883 ac_cv_header_sys_wait_h=yes
1884else
1885 echo "configure: failed program was:" >&5
1886 cat conftest.$ac_ext >&5
1887 rm -rf conftest*
1888 ac_cv_header_sys_wait_h=no
1889fi
1890rm -f conftest*
1891fi
1892
1893echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1894if test $ac_cv_header_sys_wait_h = yes; then
1895 cat >> confdefs.h <<\EOF
1896#define HAVE_SYS_WAIT_H 1
1897EOF
1898
1899fi
1900
a05e22b8 1901for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h
861bb6c1
JL
1902do
1903ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1904echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4525d757 1905echo "configure:1906: checking for $ac_hdr" >&5
861bb6c1
JL
1906if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1908else
1909 cat > conftest.$ac_ext <<EOF
4525d757 1910#line 1911 "configure"
861bb6c1
JL
1911#include "confdefs.h"
1912#include <$ac_hdr>
1913EOF
956d6950 1914ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1915{ (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1916ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
1917if test -z "$ac_err"; then
1918 rm -rf conftest*
1919 eval "ac_cv_header_$ac_safe=yes"
1920else
1921 echo "$ac_err" >&5
1922 echo "configure: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 rm -rf conftest*
1925 eval "ac_cv_header_$ac_safe=no"
1926fi
1927rm -f conftest*
1928fi
1929if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1930 echo "$ac_t""yes" 1>&6
1931 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1932 cat >> confdefs.h <<EOF
1933#define $ac_tr_hdr 1
1934EOF
1935
1936else
1937 echo "$ac_t""no" 1>&6
1938fi
1939done
1940
1941
f24af81b
TT
1942# Check for thread headers.
1943ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
1944echo $ac_n "checking for thread.h""... $ac_c" 1>&6
4525d757 1945echo "configure:1946: checking for thread.h" >&5
f24af81b
TT
1946if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1947 echo $ac_n "(cached) $ac_c" 1>&6
1948else
1949 cat > conftest.$ac_ext <<EOF
4525d757 1950#line 1951 "configure"
f24af81b
TT
1951#include "confdefs.h"
1952#include <thread.h>
1953EOF
1954ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1955{ (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1956ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
1957if test -z "$ac_err"; then
1958 rm -rf conftest*
1959 eval "ac_cv_header_$ac_safe=yes"
1960else
1961 echo "$ac_err" >&5
1962 echo "configure: failed program was:" >&5
1963 cat conftest.$ac_ext >&5
1964 rm -rf conftest*
1965 eval "ac_cv_header_$ac_safe=no"
1966fi
1967rm -f conftest*
1968fi
1969if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1970 echo "$ac_t""yes" 1>&6
1971 have_thread_h=yes
1972else
1973 echo "$ac_t""no" 1>&6
1974have_thread_h=
1975fi
1976
1977ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
1978echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
4525d757 1979echo "configure:1980: checking for pthread.h" >&5
f24af81b
TT
1980if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1981 echo $ac_n "(cached) $ac_c" 1>&6
1982else
1983 cat > conftest.$ac_ext <<EOF
4525d757 1984#line 1985 "configure"
f24af81b
TT
1985#include "confdefs.h"
1986#include <pthread.h>
1987EOF
1988ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 1989{ (eval echo configure:1990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 1990ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
1991if test -z "$ac_err"; then
1992 rm -rf conftest*
1993 eval "ac_cv_header_$ac_safe=yes"
1994else
1995 echo "$ac_err" >&5
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1998 rm -rf conftest*
1999 eval "ac_cv_header_$ac_safe=no"
2000fi
2001rm -f conftest*
2002fi
2003if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2004 echo "$ac_t""yes" 1>&6
2005 have_pthread_h=yes
2006else
2007 echo "$ac_t""no" 1>&6
2008have_pthread_h=
2009fi
2010
2011
bcf12124
JL
2012# See if GNAT has been installed
2013# Extract the first word of "gnatbind", so it can be a program name with args.
2014set dummy gnatbind; ac_word=$2
2015echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 2016echo "configure:2017: checking for $ac_word" >&5
bcf12124
JL
2017if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
2018 echo $ac_n "(cached) $ac_c" 1>&6
2019else
2020 if test -n "$gnat"; then
2021 ac_cv_prog_gnat="$gnat" # Let the user override the test.
2022else
cd9e5e7c 2023 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 2024 for ac_dir in $PATH; do
bcf12124
JL
2025 test -z "$ac_dir" && ac_dir=.
2026 if test -f $ac_dir/$ac_word; then
2027 ac_cv_prog_gnat="yes"
2028 break
2029 fi
2030 done
2031 IFS="$ac_save_ifs"
2032 test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
2033fi
2034fi
2035gnat="$ac_cv_prog_gnat"
2036if test -n "$gnat"; then
2037 echo "$ac_t""$gnat" 1>&6
2038else
2039 echo "$ac_t""no" 1>&6
2040fi
2041
2042
76844337
RH
2043# See if the system preprocessor understands the ANSI C preprocessor
2044# stringification operator.
2045echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
4525d757 2046echo "configure:2047: checking whether cpp understands the stringify operator" >&5
76844337
RH
2047if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2049else
2050 cat > conftest.$ac_ext <<EOF
4525d757 2051#line 2052 "configure"
76844337
RH
2052#include "confdefs.h"
2053
2054int main() {
2055#define S(x) #x
2056char *test = S(foo);
2057; return 0; }
2058EOF
4525d757 2059if { (eval echo configure:2060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
76844337
RH
2060 rm -rf conftest*
2061 gcc_cv_c_have_stringify=yes
2062else
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 rm -rf conftest*
2066 gcc_cv_c_have_stringify=no
2067fi
2068rm -f conftest*
2069fi
2070
2071echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
2072if test $gcc_cv_c_have_stringify = yes; then
2073 cat >> confdefs.h <<\EOF
2074#define HAVE_CPP_STRINGIFY 1
2075EOF
2076
2077fi
2078
956d6950
JL
2079# Use <inttypes.h> only if it exists,
2080# doesn't clash with <sys/types.h>, and declares intmax_t.
2081echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
4525d757 2082echo "configure:2083: checking for inttypes.h" >&5
956d6950
JL
2083if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2084 echo $ac_n "(cached) $ac_c" 1>&6
2085else
2086 cat > conftest.$ac_ext <<EOF
4525d757 2087#line 2088 "configure"
956d6950
JL
2088#include "confdefs.h"
2089#include <sys/types.h>
2090#include <inttypes.h>
2091int main() {
2092intmax_t i = -1;
2093; return 0; }
2094EOF
4525d757 2095if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950 2096 rm -rf conftest*
0056a9b5 2097 gcc_cv_header_inttypes_h=yes
956d6950
JL
2098else
2099 echo "configure: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 rm -rf conftest*
2102 gcc_cv_header_inttypes_h=no
2103fi
2104rm -f conftest*
2105fi
2106
2107echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
0056a9b5
KG
2108if test $gcc_cv_header_inttypes_h = yes; then
2109 cat >> confdefs.h <<\EOF
2110#define HAVE_INTTYPES_H 1
2111EOF
2112
2113fi
956d6950 2114
76b4b31e 2115for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
8f81384f 2116 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
54953b66
UD
2117 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2118 fputs_unlocked
956d6950
JL
2119do
2120echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 2121echo "configure:2122: checking for $ac_func" >&5
956d6950
JL
2122if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2123 echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125 cat > conftest.$ac_ext <<EOF
4525d757 2126#line 2127 "configure"
956d6950
JL
2127#include "confdefs.h"
2128/* System header to define __stub macros and hopefully few prototypes,
2129 which can conflict with char $ac_func(); below. */
2130#include <assert.h>
2131/* Override any gcc2 internal prototype to avoid an error. */
2132/* We use char because int might match the return type of a gcc2
2133 builtin and then its argument prototype would still apply. */
2134char $ac_func();
2135
2136int main() {
2137
2138/* The GNU C library defines this for functions which it implements
2139 to always fail with ENOSYS. Some functions are actually named
2140 something starting with __ and the normal name is an alias. */
2141#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2142choke me
2143#else
027ea2a7 2144$ac_func();
956d6950
JL
2145#endif
2146
2147; return 0; }
2148EOF
4525d757 2149if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
956d6950
JL
2150 rm -rf conftest*
2151 eval "ac_cv_func_$ac_func=yes"
2152else
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 rm -rf conftest*
2156 eval "ac_cv_func_$ac_func=no"
2157fi
2158rm -f conftest*
2159fi
2160
2161if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2162 echo "$ac_t""yes" 1>&6
2163 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2164 cat >> confdefs.h <<EOF
2165#define $ac_tr_func 1
2166EOF
2167
2168else
2169 echo "$ac_t""no" 1>&6
2170fi
2171done
2172
6885fc87 2173
0b9d02c6
JL
2174# Make sure wchar_t is available
2175#AC_CHECK_TYPE(wchar_t, unsigned int)
2176
0a4b6309 2177echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4525d757 2178echo "configure:2179: checking for vprintf" >&5
0a4b6309
RL
2179if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
2181else
2182 cat > conftest.$ac_ext <<EOF
4525d757 2183#line 2184 "configure"
0a4b6309
RL
2184#include "confdefs.h"
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char vprintf(); below. */
2187#include <assert.h>
2188/* Override any gcc2 internal prototype to avoid an error. */
2189/* We use char because int might match the return type of a gcc2
2190 builtin and then its argument prototype would still apply. */
2191char vprintf();
2192
2193int main() {
2194
2195/* The GNU C library defines this for functions which it implements
2196 to always fail with ENOSYS. Some functions are actually named
2197 something starting with __ and the normal name is an alias. */
2198#if defined (__stub_vprintf) || defined (__stub___vprintf)
2199choke me
2200#else
027ea2a7 2201vprintf();
0a4b6309
RL
2202#endif
2203
2204; return 0; }
2205EOF
4525d757 2206if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0a4b6309
RL
2207 rm -rf conftest*
2208 eval "ac_cv_func_vprintf=yes"
2209else
2210 echo "configure: failed program was:" >&5
2211 cat conftest.$ac_ext >&5
2212 rm -rf conftest*
2213 eval "ac_cv_func_vprintf=no"
2214fi
2215rm -f conftest*
2216fi
2217
2218if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2219 echo "$ac_t""yes" 1>&6
2220 cat >> confdefs.h <<\EOF
2221#define HAVE_VPRINTF 1
2222EOF
2223
2224else
2225 echo "$ac_t""no" 1>&6
2226fi
8fa1f09f 2227
0a4b6309
RL
2228if test "$ac_cv_func_vprintf" != yes; then
2229echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4525d757 2230echo "configure:2231: checking for _doprnt" >&5
0a4b6309
RL
2231if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2232 echo $ac_n "(cached) $ac_c" 1>&6
2233else
2234 cat > conftest.$ac_ext <<EOF
4525d757 2235#line 2236 "configure"
0a4b6309
RL
2236#include "confdefs.h"
2237/* System header to define __stub macros and hopefully few prototypes,
2238 which can conflict with char _doprnt(); below. */
2239#include <assert.h>
2240/* Override any gcc2 internal prototype to avoid an error. */
2241/* We use char because int might match the return type of a gcc2
2242 builtin and then its argument prototype would still apply. */
2243char _doprnt();
2244
2245int main() {
2246
2247/* The GNU C library defines this for functions which it implements
2248 to always fail with ENOSYS. Some functions are actually named
2249 something starting with __ and the normal name is an alias. */
2250#if defined (__stub__doprnt) || defined (__stub____doprnt)
2251choke me
2252#else
027ea2a7 2253_doprnt();
0a4b6309
RL
2254#endif
2255
2256; return 0; }
2257EOF
4525d757 2258if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0a4b6309
RL
2259 rm -rf conftest*
2260 eval "ac_cv_func__doprnt=yes"
2261else
2262 echo "configure: failed program was:" >&5
2263 cat conftest.$ac_ext >&5
2264 rm -rf conftest*
2265 eval "ac_cv_func__doprnt=no"
2266fi
2267rm -f conftest*
2268fi
2269
2270if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2271 echo "$ac_t""yes" 1>&6
2272 cat >> confdefs.h <<\EOF
2273#define HAVE_DOPRNT 1
2274EOF
2275
2276else
2277 echo "$ac_t""no" 1>&6
2278fi
2279
2280fi
2281
2282vfprintf=
2283doprint=
2284if test $ac_cv_func_vprintf != yes ; then
2285 vfprintf=vfprintf.o
2286 if test $ac_cv_func__doprnt != yes ; then
2287 doprint=doprint.o
2288 fi
2289fi
2290
2291
2292
2293echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
4525d757 2294echo "configure:2295: checking whether the printf functions support %p" >&5
0a4b6309
RL
2295if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
2296 echo $ac_n "(cached) $ac_c" 1>&6
2297else
2298 if test "$cross_compiling" = yes; then
2299 gcc_cv_func_printf_ptr=no
2300else
2301 cat > conftest.$ac_ext <<EOF
4525d757 2302#line 2303 "configure"
0a4b6309
RL
2303#include "confdefs.h"
2304#include <stdio.h>
2305
2306main()
2307{
2308 char buf[64];
2309 char *p = buf, *q = NULL;
2310 sprintf(buf, "%p", p);
2311 sscanf(buf, "%p", &q);
2312 exit (p != q);
2313}
2314EOF
4525d757 2315if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0a4b6309
RL
2316then
2317 gcc_cv_func_printf_ptr=yes
2318else
2319 echo "configure: failed program was:" >&5
2320 cat conftest.$ac_ext >&5
2321 rm -fr conftest*
2322 gcc_cv_func_printf_ptr=no
2323fi
2324rm -fr conftest*
2325fi
2326
2327rm -f core core.* *.core
2328fi
2329
2330echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
2331if test $gcc_cv_func_printf_ptr = yes ; then
2332 cat >> confdefs.h <<\EOF
2333#define HAVE_PRINTF_PTR 1
2334EOF
2335
2336fi
2337
c375c43b 2338echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4525d757 2339echo "configure:2340: checking for pid_t" >&5
c375c43b
KG
2340if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2341 echo $ac_n "(cached) $ac_c" 1>&6
2342else
2343 cat > conftest.$ac_ext <<EOF
4525d757 2344#line 2345 "configure"
c375c43b
KG
2345#include "confdefs.h"
2346#include <sys/types.h>
2347#if STDC_HEADERS
2348#include <stdlib.h>
2349#include <stddef.h>
2350#endif
2351EOF
2352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4525d757 2353 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c375c43b
KG
2354 rm -rf conftest*
2355 ac_cv_type_pid_t=yes
2356else
2357 rm -rf conftest*
2358 ac_cv_type_pid_t=no
2359fi
2360rm -f conftest*
2361
2362fi
2363echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2364if test $ac_cv_type_pid_t = no; then
2365 cat >> confdefs.h <<\EOF
2366#define pid_t int
2367EOF
2368
2369fi
2370
2371ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2372echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4525d757 2373echo "configure:2374: checking for vfork.h" >&5
c375c43b
KG
2374if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2376else
2377 cat > conftest.$ac_ext <<EOF
4525d757 2378#line 2379 "configure"
c375c43b
KG
2379#include "confdefs.h"
2380#include <vfork.h>
2381EOF
2382ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 2383{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2384ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
c375c43b
KG
2385if test -z "$ac_err"; then
2386 rm -rf conftest*
2387 eval "ac_cv_header_$ac_safe=yes"
2388else
2389 echo "$ac_err" >&5
2390 echo "configure: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
2392 rm -rf conftest*
2393 eval "ac_cv_header_$ac_safe=no"
2394fi
2395rm -f conftest*
2396fi
2397if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2398 echo "$ac_t""yes" 1>&6
2399 cat >> confdefs.h <<\EOF
2400#define HAVE_VFORK_H 1
2401EOF
2402
2403else
2404 echo "$ac_t""no" 1>&6
2405fi
2406
2407echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4525d757 2408echo "configure:2409: checking for working vfork" >&5
c375c43b
KG
2409if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2410 echo $ac_n "(cached) $ac_c" 1>&6
2411else
2412 if test "$cross_compiling" = yes; then
2413 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4525d757 2414echo "configure:2415: checking for vfork" >&5
c375c43b
KG
2415if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2416 echo $ac_n "(cached) $ac_c" 1>&6
2417else
2418 cat > conftest.$ac_ext <<EOF
4525d757 2419#line 2420 "configure"
c375c43b
KG
2420#include "confdefs.h"
2421/* System header to define __stub macros and hopefully few prototypes,
2422 which can conflict with char vfork(); below. */
2423#include <assert.h>
2424/* Override any gcc2 internal prototype to avoid an error. */
2425/* We use char because int might match the return type of a gcc2
2426 builtin and then its argument prototype would still apply. */
2427char vfork();
2428
2429int main() {
2430
2431/* The GNU C library defines this for functions which it implements
2432 to always fail with ENOSYS. Some functions are actually named
2433 something starting with __ and the normal name is an alias. */
2434#if defined (__stub_vfork) || defined (__stub___vfork)
2435choke me
2436#else
027ea2a7 2437vfork();
c375c43b
KG
2438#endif
2439
2440; return 0; }
2441EOF
4525d757 2442if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c375c43b
KG
2443 rm -rf conftest*
2444 eval "ac_cv_func_vfork=yes"
2445else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 rm -rf conftest*
2449 eval "ac_cv_func_vfork=no"
2450fi
2451rm -f conftest*
2452fi
2453
2454if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2455 echo "$ac_t""yes" 1>&6
2456 :
2457else
2458 echo "$ac_t""no" 1>&6
2459fi
2460
2461ac_cv_func_vfork_works=$ac_cv_func_vfork
2462else
2463 cat > conftest.$ac_ext <<EOF
4525d757 2464#line 2465 "configure"
c375c43b
KG
2465#include "confdefs.h"
2466/* Thanks to Paul Eggert for this test. */
2467#include <stdio.h>
2468#include <sys/types.h>
2469#include <sys/stat.h>
2470#ifdef HAVE_UNISTD_H
2471#include <unistd.h>
2472#endif
2473#ifdef HAVE_VFORK_H
2474#include <vfork.h>
2475#endif
2476/* On some sparc systems, changes by the child to local and incoming
2477 argument registers are propagated back to the parent.
2478 The compiler is told about this with #include <vfork.h>,
2479 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2480 Test for this by using a static variable whose address
2481 is put into a register that is clobbered by the vfork. */
2482static
2483#ifdef __cplusplus
2484sparc_address_test (int arg)
2485#else
2486sparc_address_test (arg) int arg;
2487#endif
2488{
2489 static pid_t child;
2490 if (!child) {
2491 child = vfork ();
2492 if (child < 0) {
2493 perror ("vfork");
2494 _exit(2);
2495 }
2496 if (!child) {
2497 arg = getpid();
2498 write(-1, "", 0);
2499 _exit (arg);
2500 }
2501 }
2502}
2503main() {
2504 pid_t parent = getpid ();
2505 pid_t child;
2506
2507 sparc_address_test ();
2508
2509 child = vfork ();
2510
2511 if (child == 0) {
2512 /* Here is another test for sparc vfork register problems.
2513 This test uses lots of local variables, at least
2514 as many local variables as main has allocated so far
2515 including compiler temporaries. 4 locals are enough for
2516 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2517 A buggy compiler should reuse the register of parent
2518 for one of the local variables, since it will think that
2519 parent can't possibly be used any more in this routine.
2520 Assigning to the local variable will thus munge parent
2521 in the parent process. */
2522 pid_t
2523 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2524 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2525 /* Convince the compiler that p..p7 are live; otherwise, it might
2526 use the same hardware register for all 8 local variables. */
2527 if (p != p1 || p != p2 || p != p3 || p != p4
2528 || p != p5 || p != p6 || p != p7)
2529 _exit(1);
2530
2531 /* On some systems (e.g. IRIX 3.3),
2532 vfork doesn't separate parent from child file descriptors.
2533 If the child closes a descriptor before it execs or exits,
2534 this munges the parent's descriptor as well.
2535 Test for this by closing stdout in the child. */
2536 _exit(close(fileno(stdout)) != 0);
2537 } else {
2538 int status;
2539 struct stat st;
2540
2541 while (wait(&status) != child)
2542 ;
2543 exit(
2544 /* Was there some problem with vforking? */
2545 child < 0
2546
2547 /* Did the child fail? (This shouldn't happen.) */
2548 || status
2549
2550 /* Did the vfork/compiler bug occur? */
2551 || parent != getpid()
2552
2553 /* Did the file descriptor bug occur? */
2554 || fstat(fileno(stdout), &st) != 0
2555 );
2556 }
2557}
2558EOF
4525d757 2559if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c375c43b
KG
2560then
2561 ac_cv_func_vfork_works=yes
2562else
2563 echo "configure: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2565 rm -fr conftest*
2566 ac_cv_func_vfork_works=no
2567fi
2568rm -fr conftest*
2569fi
2570
2571fi
2572
2573echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2574if test $ac_cv_func_vfork_works = no; then
2575 cat >> confdefs.h <<\EOF
2576#define vfork fork
2577EOF
2578
2579fi
2580
0a4b6309
RL
2581
2582for ac_func in malloc realloc calloc free bcopy bzero bcmp \
007e8d2a 2583 index rindex getenv atol sbrk abort atof strerror getcwd getwd \
0a4b6309
RL
2584 strsignal
2585do
2586echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
4525d757 2587echo "configure:2588: checking whether $ac_func must be declared" >&5
0a4b6309
RL
2588if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2589 echo $ac_n "(cached) $ac_c" 1>&6
2590else
2591 cat > conftest.$ac_ext <<EOF
4525d757 2592#line 2593 "configure"
0a4b6309
RL
2593#include "confdefs.h"
2594
2595#include <stdio.h>
2596#ifdef STRING_WITH_STRINGS
2597# include <string.h>
2598# include <strings.h>
2599#else
2600# ifdef HAVE_STRING_H
2601# include <string.h>
2602# else
2603# ifdef HAVE_STRINGS_H
2604# include <strings.h>
2605# endif
2606# endif
2607#endif
2608#ifdef HAVE_STDLIB_H
2609#include <stdlib.h>
2610#endif
2611#ifdef HAVE_UNISTD_H
2612#include <unistd.h>
2613#endif
2614#ifndef HAVE_RINDEX
2615#define rindex strrchr
2616#endif
2617#ifndef HAVE_INDEX
2618#define index strchr
2619#endif
2620
2621int main() {
2622char *(*pfn) = (char *(*)) $ac_func
2623; return 0; }
2624EOF
4525d757 2625if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2626 rm -rf conftest*
2627 eval "gcc_cv_decl_needed_$ac_func=no"
2628else
2629 echo "configure: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 rm -rf conftest*
2632 eval "gcc_cv_decl_needed_$ac_func=yes"
2633fi
2634rm -f conftest*
2635fi
2636
2637if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2638 echo "$ac_t""yes" 1>&6
2639 gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2640 cat >> confdefs.h <<EOF
2641#define $gcc_tr_decl 1
2642EOF
2643
2644else
2645 echo "$ac_t""no" 1>&6
2646fi
2647
2648done
2649
2650
2651for ac_func in getrlimit setrlimit
2652do
2653echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
4525d757 2654echo "configure:2655: checking whether $ac_func must be declared" >&5
0a4b6309
RL
2655if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
2656 echo $ac_n "(cached) $ac_c" 1>&6
2657else
2658 cat > conftest.$ac_ext <<EOF
4525d757 2659#line 2660 "configure"
0a4b6309 2660#include "confdefs.h"
8fa1f09f 2661
0a4b6309
RL
2662#include <stdio.h>
2663#ifdef STRING_WITH_STRINGS
2664# include <string.h>
2665# include <strings.h>
2666#else
2667# ifdef HAVE_STRING_H
2668# include <string.h>
2669# else
2670# ifdef HAVE_STRINGS_H
2671# include <strings.h>
2672# endif
2673# endif
2674#endif
2675#ifdef HAVE_STDLIB_H
2676#include <stdlib.h>
2677#endif
2678#ifdef HAVE_UNISTD_H
2679#include <unistd.h>
2680#endif
2681#ifndef HAVE_RINDEX
2682#define rindex strrchr
2683#endif
2684#ifndef HAVE_INDEX
2685#define index strchr
2686#endif
d2cabf16
KG
2687#include <sys/types.h>
2688#ifdef HAVE_SYS_RESOURCE_H
2689#include <sys/resource.h>
2690#endif
0a4b6309
RL
2691
2692int main() {
2693char *(*pfn) = (char *(*)) $ac_func
2694; return 0; }
2695EOF
4525d757 2696if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2697 rm -rf conftest*
2698 eval "gcc_cv_decl_needed_$ac_func=no"
2699else
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2702 rm -rf conftest*
2703 eval "gcc_cv_decl_needed_$ac_func=yes"
2704fi
2705rm -f conftest*
2706fi
2707
2708if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
2709 echo "$ac_t""yes" 1>&6
2710 gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2711 cat >> confdefs.h <<EOF
2712#define $gcc_tr_decl 1
2713EOF
2714
2715else
2716 echo "$ac_t""no" 1>&6
2717fi
2718
2719done
2720
956d6950
JL
2721
2722echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
4525d757 2723echo "configure:2724: checking for sys_siglist declaration in signal.h or unistd.h" >&5
956d6950
JL
2724if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2725 echo $ac_n "(cached) $ac_c" 1>&6
a63d08e6 2726else
956d6950 2727 cat > conftest.$ac_ext <<EOF
4525d757 2728#line 2729 "configure"
956d6950
JL
2729#include "confdefs.h"
2730#include <sys/types.h>
2731#include <signal.h>
2732/* NetBSD declares sys_siglist in unistd.h. */
2733#ifdef HAVE_UNISTD_H
2734#include <unistd.h>
2735#endif
2736int main() {
2737char *msg = *(sys_siglist + 1);
2738; return 0; }
2739EOF
4525d757 2740if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
2741 rm -rf conftest*
2742 ac_cv_decl_sys_siglist=yes
2743else
2744 echo "configure: failed program was:" >&5
2745 cat conftest.$ac_ext >&5
2746 rm -rf conftest*
2747 ac_cv_decl_sys_siglist=no
2748fi
2749rm -f conftest*
2750fi
2751
2752echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2753if test $ac_cv_decl_sys_siglist = yes; then
2754 cat >> confdefs.h <<\EOF
2755#define SYS_SIGLIST_DECLARED 1
2756EOF
2757
a63d08e6 2758fi
a63d08e6
JL
2759
2760
861bb6c1
JL
2761# File extensions
2762manext='.1'
2763objext='.o'
2764
2765
2766
2767build_xm_file=
f6cb0e63 2768build_xm_defines=
861bb6c1
JL
2769build_install_headers_dir=install-headers-tar
2770build_exeext=
2771host_xm_file=
f6cb0e63 2772host_xm_defines=
861bb6c1
JL
2773host_xmake_file=
2774host_truncate_target=
6e26218f 2775host_exeext=
861bb6c1 2776
9fc9b82a
L
2777# It is relative to $prefix.
2778cpp_install_dir=
2779
861bb6c1
JL
2780# Decode the host machine, then the target machine.
2781# For the host machine, we save the xm_file variable as host_xm_file;
2782# then we decode the target machine and forget everything else
2783# that came from the host machine.
2784for machine in $build $host $target; do
2785
2786 out_file=
2787 xmake_file=
2788 tmake_file=
2789 extra_headers=
2790 extra_passes=
2791 extra_parts=
2792 extra_programs=
2793 extra_objs=
2794 extra_host_objs=
2795 extra_gcc_objs=
f6cb0e63 2796 xm_defines=
861bb6c1
JL
2797 float_format=
2798 # Set this to force installation and use of collect2.
2799 use_collect2=
2800 # Set this to override the default target model.
2801 target_cpu_default=
861bb6c1 2802 # Set this to control which fixincludes program to use.
75bffa71 2803 if test x$fast_fixinc != xyes; then
4b104d6e
JL
2804 fixincludes=fixincludes
2805 else fixincludes=fixinc.sh ; fi
861bb6c1
JL
2806 # Set this to control how the header file directory is installed.
2807 install_headers_dir=install-headers-tar
2808 # Set this to a non-empty list of args to pass to cpp if the target
2809 # wants its .md file passed through cpp.
2810 md_cppflags=
2811 # Set this if directory names should be truncated to 14 characters.
2812 truncate_target=
2813 # Set this if gdb needs a dir command with `dirname $out_file`
2814 gdb_needs_out_file_path=
2815 # Set this if the build machine requires executables to have a
2816 # file name suffix.
2817 exeext=
a851212a
JW
2818 # Set this to control which thread package will be used.
2819 thread_file=
df6faf79
JW
2820 # Reinitialize these from the flag values every loop pass, since some
2821 # configure entries modify them.
2822 gas="$gas_flag"
2823 gnu_ld="$gnu_ld_flag"
e445171e 2824 enable_threads=$enable_threads_flag
861bb6c1
JL
2825
2826 # Set default cpu_type, tm_file and xm_file so it can be updated in
2827 # each machine entry.
2828 cpu_type=`echo $machine | sed 's/-.*$//'`
2829 case $machine in
2830 alpha*-*-*)
2831 cpu_type=alpha
2832 ;;
2833 arm*-*-*)
2834 cpu_type=arm
2835 ;;
2836 c*-convex-*)
2837 cpu_type=convex
2838 ;;
f6cb0e63 2839 i[34567]86-*-*)
861bb6c1
JL
2840 cpu_type=i386
2841 ;;
2842 hppa*-*-*)
2843 cpu_type=pa
2844 ;;
2845 m68000-*-*)
2846 cpu_type=m68k
2847 ;;
2848 mips*-*-*)
2849 cpu_type=mips
2850 ;;
2851 powerpc*-*-*)
2852 cpu_type=rs6000
2853 ;;
2854 pyramid-*-*)
2855 cpu_type=pyr
2856 ;;
2857 sparc*-*-*)
2858 cpu_type=sparc
2859 ;;
2860 esac
2861
2862 tm_file=${cpu_type}/${cpu_type}.h
2863 xm_file=${cpu_type}/xm-${cpu_type}.h
2864
1b4a979b 2865 # Common parts for linux-gnu and openbsd systems
f6cb0e63
JL
2866 case $machine in
2867 *-*-linux-gnu*)
c7391272 2868 xm_defines="HAVE_ATEXIT POSIX BSTRING"
f6cb0e63 2869 ;;
1b4a979b
ME
2870 *-*-openbsd*)
2871 tm_file=${cpu_type}/openbsd.h
2872 # On OpenBSD systems, the headers are okay
2873 fixincludes=Makefile.in
2874 tmake_file="t-libc-ok t-openbsd"
2875 # avoid surprises, always provide an xm-openbsd file
2876 xm_file=${cpu_type}/xm-openbsd.h
2877 if test x$enable_threads = xyes; then
2878 thread_file='posix'
2879 tmake_file="${tmake_file} t-openbsd-thread"
2880 fi
2881 ;;
f6cb0e63
JL
2882 esac
2883
861bb6c1
JL
2884 case $machine in
2885 # Support site-specific machine types.
2886 *local*)
2887 cpu_type=`echo $machine | sed -e 's/-.*//'`
2888 rest=`echo $machine | sed -e "s/$cpu_type-//"`
2889 xm_file=${cpu_type}/xm-$rest.h
2890 tm_file=${cpu_type}/$rest.h
75bffa71 2891 if test -f $srcdir/config/${cpu_type}/x-$rest; \
861bb6c1
JL
2892 then xmake_file=${cpu_type}/x-$rest; \
2893 else true; \
2894 fi
75bffa71 2895 if test -f $srcdir/config/${cpu_type}/t-$rest; \
861bb6c1
JL
2896 then tmake_file=${cpu_type}/t-$rest; \
2897 else true; \
2898 fi
2899 ;;
2900 1750a-*-*)
2901 ;;
2902 a29k-*-bsd* | a29k-*-sym1*)
2903 tm_file="${tm_file} a29k/unix.h"
f6cb0e63 2904 xm_defines=USG
861bb6c1
JL
2905 xmake_file=a29k/x-unix
2906 use_collect2=yes
2907 ;;
2908 a29k-*-udi | a29k-*-coff)
2909 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
2910 tmake_file=a29k/t-a29kbare
2911 ;;
7cc34889 2912 a29k-wrs-vxworks*)
861bb6c1
JL
2913 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
2914 tmake_file=a29k/t-vx29k
2915 extra_parts="crtbegin.o crtend.o"
7cc34889 2916 thread_file='vxworks'
861bb6c1
JL
2917 ;;
2918 a29k-*-*) # Default a29k environment.
2919 use_collect2=yes
2920 ;;
2921 alpha*-*-linux-gnuecoff*)
8983c716 2922 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
f6cb0e63 2923 target_cpu_default="MASK_GAS"
861bb6c1
JL
2924 gas=no
2925 xmake_file=none
861bb6c1
JL
2926 gas=yes gnu_ld=yes
2927 ;;
2601ebca 2928 alpha*-*-linux-gnulibc1*)
9d654bba 2929 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
f6cb0e63 2930 target_cpu_default="MASK_GAS"
574badbc
RH
2931 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
2932 extra_parts="crtbegin.o crtend.o"
9d654bba 2933 fixincludes=fixinc.wrap
2601ebca 2934 xmake_file=none
2601ebca 2935 gas=yes gnu_ld=yes
75bffa71 2936 if test x$enable_threads = xyes; then
2601ebca
JL
2937 thread_file='posix'
2938 fi
2939 ;;
861bb6c1 2940 alpha*-*-linux-gnu*)
9d654bba 2941 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
f6cb0e63 2942 target_cpu_default="MASK_GAS"
574badbc
RH
2943 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
2944 extra_parts="crtbegin.o crtend.o"
861bb6c1
JL
2945 xmake_file=none
2946 fixincludes=Makefile.in
861bb6c1 2947 gas=yes gnu_ld=yes
75bffa71 2948 if test x$enable_threads = xyes; then
861bb6c1
JL
2949 thread_file='posix'
2950 fi
2951 ;;
9d654bba 2952 alpha*-*-netbsd*)
66953094 2953 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
9d654bba
RH
2954 target_cpu_default="MASK_GAS"
2955 tmake_file="alpha/t-crtbe"
2956 extra_parts="crtbegin.o crtend.o"
2957 xmake_file=none
2958 fixincludes=fixinc.wrap
2959 gas=yes gnu_ld=yes
2960 ;;
1b4a979b
ME
2961
2962 alpha*-*-openbsd*)
2963 # default x-alpha is only appropriate for dec-osf.
2964 target_cpu_default="MASK_GAS"
2965 xmake_file=none
2966 ;;
9d654bba 2967
e9a25f70 2968 alpha*-dec-osf*)
75bffa71 2969 if test x$stabs = xyes
861bb6c1
JL
2970 then
2971 tm_file="${tm_file} dbx.h"
2972 fi
75bffa71 2973 if test x$gas != xyes
861bb6c1
JL
2974 then
2975 extra_passes="mips-tfile mips-tdump"
2976 fi
861bb6c1 2977 use_collect2=yes
861bb6c1 2978 case $machine in
6ecd4e53 2979 *-*-osf1*)
b0435cf4 2980 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
e9a25f70
JL
2981 ;;
2982 *-*-osf[23]*)
b0435cf4 2983 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
e9a25f70
JL
2984 ;;
2985 *-*-osf4*)
b0435cf4 2986 tm_file="${tm_file} alpha/osf.h"
e9a25f70
JL
2987 # Some versions of OSF4 (specifically X4.0-9 296.7) have
2988 # a broken tar, so we use cpio instead.
861bb6c1
JL
2989 install_headers_dir=install-headers-cpio
2990 ;;
2991 esac
e9a25f70
JL
2992 case $machine in
2993 *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
2994 target_cpu_default=MASK_SUPPORT_ARCH
2995 ;;
2996 esac
861bb6c1 2997 ;;
9ec36da5
JL
2998 alpha*-*-vxworks*)
2999 tm_file="${tm_file} dbx.h alpha/vxworks.h"
3000 if x$gas != xyes
3001 then
3002 extra_passes="mips-tfile mips-tdump"
3003 fi
3004 use_collect2=yes
3005 ;;
b0435cf4 3006 alpha*-*-winnt*)
861bb6c1 3007 tm_file="${tm_file} alpha/win-nt.h"
861bb6c1
JL
3008 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
3009 tmake_file=t-libc-ok
3010 xmake_file=winnt/x-winnt
3011 extra_host_objs=oldnames.o
3012 extra_gcc_objs="spawnv.o oldnames.o"
3013 fixincludes=fixinc.winnt
75bffa71 3014 if test x$gnu_ld != xyes
861bb6c1
JL
3015 then
3016 extra_programs=ld.exe
3017 fi
75bffa71 3018 if test x$enable_threads = xyes; then
861bb6c1
JL
3019 thread_file='win32'
3020 fi
3021 ;;
3022 alpha*-dec-vms*)
3023 tm_file=alpha/vms.h
3024 xm_file="${xm_file} alpha/xm-vms.h"
3025 tmake_file=alpha/t-vms
3026 fixincludes=Makefile.in
3027 ;;
66ed0683
JL
3028 arc-*-elf*)
3029 extra_parts="crtinit.o crtfini.o"
3030 ;;
861bb6c1
JL
3031 arm-*-coff* | armel-*-coff*)
3032 tm_file=arm/coff.h
3033 tmake_file=arm/t-bare
3034 ;;
3035 arm-*-riscix1.[01]*) # Acorn RISC machine (early versions)
3036 tm_file=arm/riscix1-1.h
3037 use_collect2=yes
3038 ;;
3039 arm-*-riscix*) # Acorn RISC machine
75bffa71 3040 if test x$gas = xyes
861bb6c1
JL
3041 then
3042 tm_file=arm/rix-gas.h
3043 else
3044 tm_file=arm/riscix.h
3045 fi
3046 xmake_file=arm/x-riscix
3047 tmake_file=arm/t-riscix
3048 use_collect2=yes
3049 ;;
3050 arm-semi-aout | armel-semi-aout)
3051 tm_file=arm/semi.h
3052 tmake_file=arm/t-semi
3053 fixincludes=Makefile.in # There is nothing to fix
3054 ;;
3055 arm-semi-aof | armel-semi-aof)
3056 tm_file=arm/semiaof.h
3057 tmake_file=arm/t-semiaof
3058 fixincludes=Makefile.in # There is nothing to fix
3059 ;;
58600d24 3060 arm*-*-netbsd*)
861bb6c1 3061 tm_file=arm/netbsd.h
641d4216 3062 xm_file="arm/xm-netbsd.h ${xm_file}"
e9a25f70 3063 tmake_file="t-netbsd arm/t-netbsd"
be1ed94f 3064 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 3065 fixincludes=fixinc.wrap
861bb6c1 3066 ;;
b355a481 3067 arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
861bb6c1 3068 cpu_type=arm
861bb6c1 3069 xmake_file=x-linux
b355a481 3070 tm_file=arm/linux-aout.h
861bb6c1
JL
3071 tmake_file=arm/t-linux
3072 fixincludes=Makefile.in
861bb6c1
JL
3073 gnu_ld=yes
3074 ;;
b355a481
NC
3075 arm*-*-linux-gnu*) # ARM GNU/Linux with ELF
3076 xm_file=arm/xm-linux.h
3077 xmake_file=x-linux
3078 case $machine in
3079 armv2*-*-*)
3080 tm_file=arm/linux-elf26.h
3081 ;;
3082 *)
3083 tm_file=arm/linux-elf.h
3084 ;;
3085 esac
3086 tmake_file="t-linux arm/t-linux"
3087 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3088 fixincludes=Makefile.in # Nothing to fix
3089 gnu_ld=yes
3090 ;;
3091 arm*-*-aout)
861bb6c1 3092 tm_file=arm/aout.h
e9a25f70 3093 tmake_file=arm/t-bare
861bb6c1 3094 ;;
e6592fff 3095 arm*-*-ecos-elf)
54953b66
UD
3096 tm_file=arm/ecos-elf.h
3097 tmake_file=arm/t-elf
3098 ;;
b355a481
NC
3099 arm*-*-elf)
3100 tm_file=arm/unknown-elf.h
3101 tmake_file=arm/t-arm-elf
3102 ;;
cbca921c
CM
3103 arm*-*-oabi)
3104 tm_file=arm/unknown-elf-oabi.h
3105 tmake_file=arm/t-arm-elf
3106 ;;
861bb6c1
JL
3107 c1-convex-*) # Convex C1
3108 target_cpu_default=1
3109 use_collect2=yes
3110 fixincludes=Makefile.in
3111 ;;
3112 c2-convex-*) # Convex C2
3113 target_cpu_default=2
3114 use_collect2=yes
3115 fixincludes=Makefile.in
3116 ;;
3117 c32-convex-*)
3118 target_cpu_default=4
3119 use_collect2=yes
3120 fixincludes=Makefile.in
3121 ;;
3122 c34-convex-*)
3123 target_cpu_default=8
3124 use_collect2=yes
3125 fixincludes=Makefile.in
3126 ;;
3127 c38-convex-*)
3128 target_cpu_default=16
3129 use_collect2=yes
3130 fixincludes=Makefile.in
3131 ;;
62616695
MH
3132 c4x-*)
3133 cpu_type=c4x
3134 tmake_file=c4x/t-c4x
3135 ;;
861bb6c1
JL
3136 clipper-intergraph-clix*)
3137 tm_file="${tm_file} svr3.h clipper/clix.h"
3138 xm_file=clipper/xm-clix.h
3139 xmake_file=clipper/x-clix
3140 extra_headers=va-clipper.h
3141 extra_parts="crtbegin.o crtend.o"
3142 install_headers_dir=install-headers-cpio
861bb6c1
JL
3143 ;;
3144 dsp16xx-*)
3145 ;;
3146 elxsi-elxsi-*)
3147 use_collect2=yes
3148 ;;
3149# This hasn't been upgraded to GCC 2.
3150# fx80-alliant-*) # Alliant FX/80
3151# ;;
3152 h8300-*-*)
3153 float_format=i32
3154 ;;
1b4a979b
ME
3155 hppa*-*-openbsd*)
3156 target_cpu_default="MASK_SNAKE"
4525d757 3157 tmake_file=pa/t-openbsd
1b4a979b 3158 ;;
861bb6c1
JL
3159 hppa1.1-*-pro*)
3160 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
3161 xm_file=pa/xm-papro.h
3162 tmake_file=pa/t-pro
3163 ;;
3164 hppa1.1-*-osf*)
3723cad9 3165 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3166 tm_file="${tm_file} pa/pa-osf.h"
3167 use_collect2=yes
3168 fixincludes=Makefile.in
3169 ;;
3170 hppa1.1-*-rtems*)
3171 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
3172 xm_file=pa/xm-papro.h
3173 tmake_file=pa/t-pro
3174 ;;
3175 hppa1.0-*-osf*)
3176 tm_file="${tm_file} pa/pa-osf.h"
3177 use_collect2=yes
3178 fixincludes=Makefile.in
3179 ;;
3180 hppa1.1-*-bsd*)
3723cad9 3181 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3182 use_collect2=yes
3183 fixincludes=Makefile.in
3184 ;;
3185 hppa1.0-*-bsd*)
3186 use_collect2=yes
3187 fixincludes=Makefile.in
3188 ;;
3189 hppa1.0-*-hpux7*)
3190 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
3191 xm_file=pa/xm-pahpux.h
3192 xmake_file=pa/x-pa-hpux
75bffa71 3193 if test x$gas = xyes
861bb6c1
JL
3194 then
3195 tm_file="${tm_file} pa/gas.h"
3196 fi
861bb6c1
JL
3197 install_headers_dir=install-headers-cpio
3198 use_collect2=yes
3199 ;;
3200 hppa1.0-*-hpux8.0[0-2]*)
3201 tm_file="${tm_file} pa/pa-hpux.h"
3202 xm_file=pa/xm-pahpux.h
3203 xmake_file=pa/x-pa-hpux
75bffa71 3204 if test x$gas = xyes
861bb6c1
JL
3205 then
3206 tm_file="${tm_file} pa/pa-gas.h"
3207 else
3208 tm_file="pa/pa-oldas.h ${tm_file}"
3209 fi
861bb6c1
JL
3210 install_headers_dir=install-headers-cpio
3211 use_collect2=yes
3212 ;;
3213 hppa1.1-*-hpux8.0[0-2]*)
3723cad9 3214 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3215 tm_file="${tm_file} pa/pa-hpux.h"
3216 xm_file=pa/xm-pahpux.h
3217 xmake_file=pa/x-pa-hpux
75bffa71 3218 if test x$gas = xyes
861bb6c1
JL
3219 then
3220 tm_file="${tm_file} pa/pa-gas.h"
3221 else
3222 tm_file="pa/pa-oldas.h ${tm_file}"
3223 fi
861bb6c1
JL
3224 install_headers_dir=install-headers-cpio
3225 use_collect2=yes
3226 ;;
3227 hppa1.1-*-hpux8*)
3723cad9 3228 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3229 tm_file="${tm_file} pa/pa-hpux.h"
3230 xm_file=pa/xm-pahpux.h
3231 xmake_file=pa/x-pa-hpux
75bffa71 3232 if test x$gas = xyes
861bb6c1
JL
3233 then
3234 tm_file="${tm_file} pa/pa-gas.h"
3235 fi
861bb6c1
JL
3236 install_headers_dir=install-headers-cpio
3237 use_collect2=yes
3238 ;;
3239 hppa1.0-*-hpux8*)
3240 tm_file="${tm_file} pa/pa-hpux.h"
3241 xm_file=pa/xm-pahpux.h
3242 xmake_file=pa/x-pa-hpux
75bffa71 3243 if test x$gas = xyes
861bb6c1
JL
3244 then
3245 tm_file="${tm_file} pa/pa-gas.h"
3246 fi
861bb6c1
JL
3247 install_headers_dir=install-headers-cpio
3248 use_collect2=yes
3249 ;;
18cae839 3250 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
3723cad9 3251 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3252 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3253 xm_file=pa/xm-pahpux.h
3254 xmake_file=pa/x-pa-hpux
f24af81b 3255 tmake_file=pa/t-pa
75bffa71 3256 if test x$gas = xyes
861bb6c1
JL
3257 then
3258 tm_file="${tm_file} pa/pa-gas.h"
3259 fi
75bffa71 3260 if test x$enable_threads = x; then
f24af81b
TT
3261 enable_threads=$have_pthread_h
3262 fi
75bffa71 3263 if test x$enable_threads = xyes; then
f24af81b
TT
3264 thread_file='dce'
3265 tmake_file="${tmake_file} pa/t-dce-thr"
3266 fi
861bb6c1
JL
3267 install_headers_dir=install-headers-cpio
3268 use_collect2=yes
3269 ;;
3270 hppa1.0-*-hpux10*)
3271 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
3272 xm_file=pa/xm-pahpux.h
3273 xmake_file=pa/x-pa-hpux
661c7909 3274 tmake_file=pa/t-pa
75bffa71 3275 if test x$gas = xyes
861bb6c1
JL
3276 then
3277 tm_file="${tm_file} pa/pa-gas.h"
3278 fi
75bffa71 3279 if test x$enable_threads = x; then
d005a5a4
JL
3280 enable_threads=$have_pthread_h
3281 fi
75bffa71 3282 if test x$enable_threads = xyes; then
d005a5a4
JL
3283 thread_file='dce'
3284 tmake_file="${tmake_file} pa/t-dce-thr"
3285 fi
861bb6c1
JL
3286 install_headers_dir=install-headers-cpio
3287 use_collect2=yes
3288 ;;
18cae839 3289 hppa1.1-*-hpux* | hppa2*-*-hpux*)
3723cad9 3290 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3291 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3292 xm_file=pa/xm-pahpux.h
3293 xmake_file=pa/x-pa-hpux
75bffa71 3294 if test x$gas = xyes
861bb6c1
JL
3295 then
3296 tm_file="${tm_file} pa/pa-gas.h"
3297 fi
861bb6c1
JL
3298 install_headers_dir=install-headers-cpio
3299 use_collect2=yes
3300 ;;
3301 hppa1.0-*-hpux*)
3302 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
3303 xm_file=pa/xm-pahpux.h
3304 xmake_file=pa/x-pa-hpux
75bffa71 3305 if test x$gas = xyes
861bb6c1
JL
3306 then
3307 tm_file="${tm_file} pa/pa-gas.h"
3308 fi
861bb6c1
JL
3309 install_headers_dir=install-headers-cpio
3310 use_collect2=yes
3311 ;;
18cae839 3312 hppa1.1-*-hiux* | hppa2*-*-hiux*)
3723cad9 3313 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3314 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3315 xm_file=pa/xm-pahpux.h
3316 xmake_file=pa/x-pa-hpux
75bffa71 3317 if test x$gas = xyes
861bb6c1
JL
3318 then
3319 tm_file="${tm_file} pa/pa-gas.h"
3320 fi
861bb6c1
JL
3321 install_headers_dir=install-headers-cpio
3322 use_collect2=yes
3323 ;;
3324 hppa1.0-*-hiux*)
3325 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
3326 xm_file=pa/xm-pahpux.h
3327 xmake_file=pa/x-pa-hpux
75bffa71 3328 if test x$gas = xyes
861bb6c1
JL
3329 then
3330 tm_file="${tm_file} pa/pa-gas.h"
3331 fi
861bb6c1
JL
3332 install_headers_dir=install-headers-cpio
3333 use_collect2=yes
3334 ;;
3335 hppa*-*-lites*)
3723cad9 3336 target_cpu_default="MASK_SNAKE"
861bb6c1
JL
3337 use_collect2=yes
3338 fixincludes=Makefile.in
3339 ;;
3340 i370-*-mvs*)
3341 ;;
f6cb0e63 3342 i[34567]86-ibm-aix*) # IBM PS/2 running AIX
75bffa71 3343 if test x$gas = xyes
861bb6c1
JL
3344 then
3345 tm_file=i386/aix386.h
3346 extra_parts="crtbegin.o crtend.o"
3347 tmake_file=i386/t-crtstuff
3348 else
3349 tm_file=i386/aix386ng.h
3350 use_collect2=yes
3351 fi
f6cb0e63
JL
3352 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
3353 xm_defines=USG
861bb6c1 3354 xmake_file=i386/x-aix
861bb6c1 3355 ;;
75bffa71 3356 i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
f6cb0e63
JL
3357 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3358 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1 3359 xmake_file=i386/x-ncr3000
75bffa71 3360 if test x$stabs = xyes -a x$gas = xyes
861bb6c1
JL
3361 then
3362 tm_file=i386/sysv4gdb.h
3363 else
3364 tm_file=i386/sysv4.h
3365 fi
3366 extra_parts="crtbegin.o crtend.o"
3367 tmake_file=i386/t-crtpic
3368 ;;
f6cb0e63 3369 i[34567]86-next-*)
861bb6c1
JL
3370 tm_file=i386/next.h
3371 xm_file=i386/xm-next.h
3372 tmake_file=i386/t-next
3373 xmake_file=i386/x-next
3374 extra_objs=nextstep.o
750930c1 3375 extra_parts="crtbegin.o crtend.o"
75bffa71 3376 if test x$enable_threads = xyes; then
861bb6c1
JL
3377 thread_file='mach'
3378 fi
3379 ;;
f6cb0e63 3380 i[34567]86-sequent-bsd*) # 80386 from Sequent
861bb6c1 3381 use_collect2=yes
75bffa71 3382 if test x$gas = xyes
861bb6c1
JL
3383 then
3384 tm_file=i386/seq-gas.h
3385 else
3386 tm_file=i386/sequent.h
3387 fi
3388 ;;
f6cb0e63
JL
3389 i[34567]86-sequent-ptx1*)
3390 xm_defines="USG SVR3"
861bb6c1
JL
3391 xmake_file=i386/x-sysv3
3392 tm_file=i386/seq-sysv3.h
3393 tmake_file=i386/t-crtstuff
3394 fixincludes=fixinc.ptx
3395 extra_parts="crtbegin.o crtend.o"
3396 install_headers_dir=install-headers-cpio
861bb6c1 3397 ;;
f6cb0e63
JL
3398 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
3399 xm_defines="USG SVR3"
861bb6c1
JL
3400 xmake_file=i386/x-sysv3
3401 tm_file=i386/seq2-sysv3.h
3402 tmake_file=i386/t-crtstuff
3403 extra_parts="crtbegin.o crtend.o"
3404 fixincludes=fixinc.ptx
3405 install_headers_dir=install-headers-cpio
861bb6c1 3406 ;;
f6cb0e63
JL
3407 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
3408 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3409 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1
JL
3410 xmake_file=x-svr4
3411 tm_file=i386/ptx4-i.h
3412 tmake_file=t-svr4
3413 extra_parts="crtbegin.o crtend.o"
3414 fixincludes=fixinc.ptx
3415 install_headers_dir=install-headers-cpio
861bb6c1
JL
3416 ;;
3417 i386-sun-sunos*) # Sun i386 roadrunner
f6cb0e63 3418 xm_defines=USG
861bb6c1
JL
3419 tm_file=i386/sun.h
3420 use_collect2=yes
3421 ;;
62db76ee 3422 i[34567]86-wrs-vxworks*)
9e89df50
MS
3423 tm_file=i386/vxi386.h
3424 tmake_file=i386/t-i386bare
3425 ;;
f6cb0e63 3426 i[34567]86-*-aout*)
861bb6c1
JL
3427 tm_file=i386/i386-aout.h
3428 tmake_file=i386/t-i386bare
3429 ;;
f6cb0e63 3430 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
861bb6c1 3431 tm_file=i386/bsd386.h
861bb6c1
JL
3432# tmake_file=t-libc-ok
3433 ;;
f6cb0e63 3434 i[34567]86-*-bsd*)
861bb6c1 3435 tm_file=i386/386bsd.h
861bb6c1
JL
3436# tmake_file=t-libc-ok
3437# Next line turned off because both 386BSD and BSD/386 use GNU ld.
3438# use_collect2=yes
3439 ;;
f6cb0e63 3440 i[34567]86-*-freebsdelf*)
861bb6c1 3441 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
be1ed94f 3442 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 3443 fixincludes=fixinc.wrap
56830143 3444 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
861bb6c1
JL
3445 tmake_file=i386/t-freebsd
3446 gas=yes
3447 gnu_ld=yes
3448 stabs=yes
3449 ;;
f6cb0e63 3450 i[34567]86-*-freebsd*)
861bb6c1 3451 tm_file=i386/freebsd.h
ca55abae 3452 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 3453 fixincludes=fixinc.wrap
861bb6c1
JL
3454 tmake_file=i386/t-freebsd
3455 ;;
1b4a979b 3456 i[34567]86-*-netbsd*)
861bb6c1 3457 tm_file=i386/netbsd.h
be1ed94f 3458 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 3459 fixincludes=fixinc.wrap
861bb6c1
JL
3460 tmake_file=t-netbsd
3461 ;;
1b4a979b
ME
3462 i[34567]86-*-openbsd*)
3463 # Remove when the math emulator is fixed
3464 target_cpu_default="MASK_NO_FANCY_MATH_387"
3465 # we need collect2 until our bug is fixed...
3466 use_collect2=yes
3467 ;;
f6cb0e63 3468 i[34567]86-*-coff*)
861bb6c1
JL
3469 tm_file=i386/i386-coff.h
3470 tmake_file=i386/t-i386bare
3471 ;;
f6cb0e63
JL
3472 i[34567]86-*-isc*) # 80386 running ISC system
3473 xm_file="${xm_file} i386/xm-isc.h"
3474 xm_defines="USG SVR3"
861bb6c1 3475 case $machine in
f6cb0e63 3476 i[34567]86-*-isc[34]*)
861bb6c1
JL
3477 xmake_file=i386/x-isc3
3478 ;;
3479 *)
3480 xmake_file=i386/x-isc
3481 ;;
3482 esac
75bffa71 3483 if test x$gas = xyes -a x$stabs = xyes
861bb6c1
JL
3484 then
3485 tm_file=i386/iscdbx.h
3486 tmake_file=i386/t-svr3dbx
3487 extra_parts="svr3.ifile svr3z.ifile"
3488 else
3489 tm_file=i386/isccoff.h
3490 tmake_file=i386/t-crtstuff
3491 extra_parts="crtbegin.o crtend.o"
3492 fi
3493 install_headers_dir=install-headers-cpio
861bb6c1 3494 ;;
f6cb0e63 3495 i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
f6cb0e63 3496 # pre BFD linkers
861bb6c1
JL
3497 xmake_file=x-linux-aout
3498 tmake_file="t-linux-aout i386/t-crtstuff"
3499 tm_file=i386/linux-oldld.h
6d567568 3500 fixincludes=fixinc.x86-linux-gnu
861bb6c1 3501 gnu_ld=yes
af39d8f5 3502 float_format=i386
861bb6c1 3503 ;;
f6cb0e63 3504 i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
861bb6c1
JL
3505 xmake_file=x-linux-aout
3506 tmake_file="t-linux-aout i386/t-crtstuff"
3507 tm_file=i386/linux-aout.h
6d567568 3508 fixincludes=fixinc.x86-linux-gnu
861bb6c1 3509 gnu_ld=yes
af39d8f5 3510 float_format=i386
861bb6c1 3511 ;;
f6cb0e63 3512 i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
f6cb0e63
JL
3513 # GNU/Linux C library 5
3514 xmake_file=x-linux
3515 tm_file=i386/linux.h
861bb6c1
JL
3516 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
3517 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6d567568 3518 fixincludes=fixinc.x86-linux-gnu
861bb6c1 3519 gnu_ld=yes
af39d8f5 3520 float_format=i386
75bffa71 3521 if test x$enable_threads = xyes; then
861bb6c1
JL
3522 thread_file='single'
3523 fi
3524 ;;
f6cb0e63 3525 i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
f6cb0e63
JL
3526 # aka GNU/Linux C library 6
3527 xmake_file=x-linux
861bb6c1
JL
3528 tm_file=i386/linux.h
3529 tmake_file="t-linux i386/t-crtstuff"
3530 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6d567568 3531 fixincludes=fixinc.x86-linux-gnu
861bb6c1 3532 gnu_ld=yes
af39d8f5 3533 float_format=i386
75bffa71 3534 if test x$enable_threads = xyes; then
861bb6c1
JL
3535 thread_file='posix'
3536 fi
3537 ;;
f6cb0e63 3538 i[34567]86-*-gnu*)
cd9e5e7c 3539 float_format=i386
f6cb0e63
JL
3540 ;;
3541 i[34567]86-go32-msdos | i[34567]86-*-go32*)
3542 xm_file=i386/xm-go32.h
3543 tm_file=i386/go32.h
3544 tmake_file=i386/t-go32
861bb6c1 3545 ;;
f6cb0e63 3546 i[34567]86-pc-msdosdjgpp*)
861bb6c1
JL
3547 xm_file=i386/xm-go32.h
3548 tm_file=i386/go32.h
3549 tmake_file=i386/t-go32
90e6a802 3550 xmake_file=i386/x-go32
f6cb0e63
JL
3551 gnu_ld=yes
3552 gas=yes
dedcc399
ME
3553 exeext=.exe
3554 case $host in
3555 *pc-msdosdjgpp*)
3556 target_alias=djgpp
3557 ;;
3558 esac
861bb6c1 3559 ;;
f6cb0e63 3560 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
861bb6c1
JL
3561 tm_file=i386/moss.h
3562 tmake_file=t-libc-ok
3563 fixincludes=Makefile.in
3564 gnu_ld=yes
3565 gas=yes
3566 ;;
f6cb0e63 3567 i[34567]86-*-lynxos*)
75bffa71 3568 if test x$gas = xyes
861bb6c1
JL
3569 then
3570 tm_file=i386/lynx.h
3571 else
3572 tm_file=i386/lynx-ng.h
3573 fi
3574 xm_file=i386/xm-lynx.h
3575 tmake_file=i386/t-i386bare
3576 xmake_file=x-lynx
3577 ;;
f6cb0e63 3578 i[34567]86-*-mach*)
861bb6c1
JL
3579 tm_file=i386/mach.h
3580# tmake_file=t-libc-ok
3581 use_collect2=yes
3582 ;;
f6cb0e63 3583 i[34567]86-*-osfrose*) # 386 using OSF/rose
75bffa71 3584 if test x$elf = xyes
861bb6c1
JL
3585 then
3586 tm_file=i386/osfelf.h
3587 use_collect2=
3588 else
3589 tm_file=i386/osfrose.h
3590 use_collect2=yes
3591 fi
f6cb0e63 3592 xm_file="i386/xm-osf.h ${xm_file}"
861bb6c1
JL
3593 xmake_file=i386/x-osfrose
3594 tmake_file=i386/t-osf
3595 extra_objs=halfpic.o
3596 ;;
f6cb0e63 3597 i[34567]86-go32-rtems*)
861bb6c1
JL
3598 cpu_type=i386
3599 xm_file=i386/xm-go32.h
3600 tm_file=i386/go32-rtems.h
3601 tmake_file="i386/t-go32 t-rtems"
3602 ;;
f5963e61
JL
3603 i[34567]86-*-rtemself*)
3604 cpu_type=i386
3605 tm_file=i386/rtemself.h
3606 tmake_file="i386/t-i386bare t-rtems"
3607 ;;
f6cb0e63 3608 i[34567]86-*-rtems*)
861bb6c1
JL
3609 cpu_type=i386
3610 tm_file=i386/rtems.h
3611 tmake_file="i386/t-i386bare t-rtems"
3612 ;;
f6cb0e63
JL
3613 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
3614 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
3615 xm_defines="USG SVR3"
861bb6c1
JL
3616 xmake_file=i386/x-sco5
3617 fixincludes=fixinc.sco
f6857708 3618 install_headers_dir=install-headers-cpio
861bb6c1 3619 tm_file=i386/sco5.h
75bffa71 3620 if test x$gas = xyes
44bb0e93
RL
3621 then
3622 tm_file="i386/sco5gas.h ${tm_file}"
3623 tmake_file=i386/t-sco5gas
3624 else
3625 tmake_file=i386/t-sco5
3626 fi
42902a72 3627 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
861bb6c1 3628 ;;
f6cb0e63
JL
3629 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
3630 xm_file="${xm_file} i386/xm-sco.h"
3631 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
861bb6c1
JL
3632 xmake_file=i386/x-sco4
3633 fixincludes=fixinc.sco
861bb6c1 3634 install_headers_dir=install-headers-cpio
75bffa71 3635 if test x$stabs = xyes
861bb6c1
JL
3636 then
3637 tm_file=i386/sco4dbx.h
3638 tmake_file=i386/t-svr3dbx
3639 extra_parts="svr3.ifile svr3z.rfile"
3640 else
3641 tm_file=i386/sco4.h
3642 tmake_file=i386/t-crtstuff
3643 extra_parts="crtbegin.o crtend.o"
3644 fi
3645 truncate_target=yes
3646 ;;
f6cb0e63 3647 i[34567]86-*-sco*) # 80386 running SCO system
861bb6c1
JL
3648 xm_file=i386/xm-sco.h
3649 xmake_file=i386/x-sco
861bb6c1 3650 install_headers_dir=install-headers-cpio
75bffa71 3651 if test x$stabs = xyes
861bb6c1
JL
3652 then
3653 tm_file=i386/scodbx.h
3654 tmake_file=i386/t-svr3dbx
3655 extra_parts="svr3.ifile svr3z.rfile"
3656 else
3657 tm_file=i386/sco.h
3658 extra_parts="crtbegin.o crtend.o"
3659 tmake_file=i386/t-crtstuff
3660 fi
3661 truncate_target=yes
3662 ;;
f6cb0e63
JL
3663 i[34567]86-*-solaris2*)
3664 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3665 xm_defines="USG POSIX SMALL_ARG_MAX"
75bffa71 3666 if test x$stabs = xyes
861bb6c1
JL
3667 then
3668 tm_file=i386/sol2dbg.h
3669 else
3670 tm_file=i386/sol2.h
3671 fi
3672 tmake_file=i386/t-sol2
f6cb0e63 3673 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
861bb6c1 3674 xmake_file=x-svr4
f6cb0e63
JL
3675 case $machine in
3676 *-*-solaris2.[0-4])
3677 fixincludes=fixinc.svr4;;
3678 *)
32f65aa0 3679 fixincludes=fixinc.wrap;;
f6cb0e63 3680 esac
75bffa71 3681 if test x$enable_threads = xyes; then
861bb6c1
JL
3682 thread_file='solaris'
3683 fi
3684 ;;
f6cb0e63 3685 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
48a51bf4
RL
3686 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3687 xm_defines="USG POSIX"
fe07d4c1 3688 tm_file=i386/sysv4.h
75bffa71 3689 if test x$stabs = xyes
fe07d4c1
RL
3690 then
3691 tm_file="${tm_file} dbx.h"
3692 fi
3693 tmake_file=i386/t-crtpic
3694 xmake_file=x-svr4
3695 extra_parts="crtbegin.o crtend.o"
823642df 3696 fixincludes=fixinc.svr4
fe07d4c1 3697 ;;
f6cb0e63
JL
3698 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
3699 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
3700 xm_defines="USG POSIX SMALL_ARG_MAX"
861bb6c1 3701 tm_file=i386/sysv4.h
75bffa71 3702 if test x$stabs = xyes
861bb6c1
JL
3703 then
3704 tm_file="${tm_file} dbx.h"
3705 fi
3706 tmake_file=i386/t-crtpic
3707 xmake_file=x-svr4
3708 extra_parts="crtbegin.o crtend.o"
3709 ;;
112674fa
RL
3710 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
3711 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3712 xm_defines="USG POSIX"
3713 tm_file=i386/udk.h
3714 tmake_file="i386/t-crtpic i386/t-udk"
3715 xmake_file=x-svr4
3716 extra_parts="crtbegin.o crtend.o"
3717 fixincludes="fixinc.svr4"
3718 ;;
f5963e61
JL
3719 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
3720 cpu_type=i386
3721 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
3722 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
3723 fixincludes=Makefile.in #Don't do it on OSF/1
75bffa71 3724 if test x$stabs = xyes
f5963e61
JL
3725 then
3726 tm_file=i386/osf1elfgdb.h
3727 else
3728 tm_file=i386/osf1elf.h
3729 fi
3730 tmake_file=i386/t-osf1elf
3731 xmake_file=i386/x-osf1elf
3732 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3733 ;;
f6cb0e63
JL
3734 i[34567]86-*-sysv*) # Intel 80386's running system V
3735 xm_defines="USG SVR3"
861bb6c1 3736 xmake_file=i386/x-sysv3
75bffa71 3737 if test x$gas = xyes
861bb6c1 3738 then
75bffa71 3739 if test x$stabs = xyes
861bb6c1
JL
3740 then
3741 tm_file=i386/svr3dbx.h
3742 tmake_file=i386/t-svr3dbx
3743 extra_parts="svr3.ifile svr3z.rfile"
3744 else
3745 tm_file=i386/svr3gas.h
3746 extra_parts="crtbegin.o crtend.o"
3747 tmake_file=i386/t-crtstuff
3748 fi
3749 else
3750 tm_file=i386/sysv3.h
3751 extra_parts="crtbegin.o crtend.o"
3752 tmake_file=i386/t-crtstuff
3753 fi
3754 ;;
3755 i386-*-vsta) # Intel 80386's running VSTa kernel
f5963e61 3756 xm_file="${xm_file} i386/xm-vsta.h"
861bb6c1
JL
3757 tm_file=i386/vsta.h
3758 tmake_file=i386/t-vsta
3759 xmake_file=i386/x-vsta
3760 ;;
84530511 3761 i[34567]86-*-win32)
cae21ae8
GN
3762 xm_file="${xm_file} i386/xm-cygwin.h"
3763 tmake_file=i386/t-cygwin
84530511 3764 tm_file=i386/win32.h
cae21ae8 3765 xmake_file=i386/x-cygwin
84530511
SC
3766 extra_objs=winnt.o
3767 fixincludes=Makefile.in
75bffa71 3768 if test x$enable_threads = xyes; then
84530511
SC
3769 thread_file='win32'
3770 fi
3771 exeext=.exe
3772 ;;
cae21ae8
GN
3773 i[34567]86-*-pe | i[34567]86-*-cygwin*)
3774 xm_file="${xm_file} i386/xm-cygwin.h"
3775 tmake_file=i386/t-cygwin
3776 tm_file=i386/cygwin.h
3777 xmake_file=i386/x-cygwin
861bb6c1
JL
3778 extra_objs=winnt.o
3779 fixincludes=Makefile.in
75bffa71 3780 if test x$enable_threads = xyes; then
861bb6c1
JL
3781 thread_file='win32'
3782 fi
3783 exeext=.exe
3784 ;;
f6cb0e63 3785 i[34567]86-*-mingw32*)
861bb6c1
JL
3786 tm_file=i386/mingw32.h
3787 xm_file="${xm_file} i386/xm-mingw32.h"
cae21ae8 3788 tmake_file="i386/t-cygwin i386/t-mingw32"
861bb6c1 3789 extra_objs=winnt.o
cae21ae8 3790 xmake_file=i386/x-cygwin
861bb6c1 3791 fixincludes=Makefile.in
75bffa71 3792 if test x$enable_threads = xyes; then
861bb6c1
JL
3793 thread_file='win32'
3794 fi
3795 exeext=.exe
f6cb0e63
JL
3796 case $machine in
3797 *mingw32msv*)
3798 ;;
3799 *minwg32crt* | *mingw32*)
3800 tm_file="${tm_file} i386/crtdll.h"
3801 ;;
3802 esac
861bb6c1 3803 ;;
f6cb0e63 3804 i[34567]86-*-winnt3*)
861bb6c1
JL
3805 tm_file=i386/win-nt.h
3806 out_file=i386/i386.c
f6cb0e63 3807 xm_file="xm-winnt.h ${xm_file}"
861bb6c1
JL
3808 xmake_file=winnt/x-winnt
3809 tmake_file=i386/t-winnt
3810 extra_host_objs="winnt.o oldnames.o"
3811 extra_gcc_objs="spawnv.o oldnames.o"
3812 fixincludes=fixinc.winnt
75bffa71 3813 if test x$gnu_ld != xyes
861bb6c1
JL
3814 then
3815 extra_programs=ld.exe
3816 fi
75bffa71 3817 if test x$enable_threads = xyes; then
861bb6c1
JL
3818 thread_file='win32'
3819 fi
3820 ;;
f6cb0e63
JL
3821 i[34567]86-dg-dgux*)
3822 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
3823 xm_defines="USG POSIX"
861bb6c1
JL
3824 out_file=i386/dgux.c
3825 tm_file=i386/dgux.h
3826 tmake_file=i386/t-dgux
3827 xmake_file=i386/x-dgux
9590eb1b 3828 fixincludes=fixinc.dgux
861bb6c1
JL
3829 install_headers_dir=install-headers-cpio
3830 ;;
3831 i860-alliant-*) # Alliant FX/2800
3832 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
956d6950 3833 xm_file="${xm_file}"
861bb6c1
JL
3834 xmake_file=i860/x-fx2800
3835 tmake_file=i860/t-fx2800
3836 extra_parts="crtbegin.o crtend.o"
3837 ;;
3838 i860-*-bsd*)
3839 tm_file="${tm_file} i860/bsd.h"
75bffa71 3840 if test x$gas = xyes
861bb6c1
JL
3841 then
3842 tm_file="${tm_file} i860/bsd-gas.h"
3843 fi
3844 use_collect2=yes
3845 ;;
3846 i860-*-mach*)
3847 tm_file="${tm_file} i860/mach.h"
3848 tmake_file=t-libc-ok
3849 ;;
3850 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
3851 tm_file="${tm_file} svr3.h i860/paragon.h"
f6cb0e63 3852 xm_defines="USG SVR3"
861bb6c1 3853 tmake_file=t-osf
861bb6c1
JL
3854 ;;
3855 i860-*-sysv3*)
3856 tm_file="${tm_file} svr3.h i860/sysv3.h"
f6cb0e63 3857 xm_defines="USG SVR3"
861bb6c1
JL
3858 xmake_file=i860/x-sysv3
3859 extra_parts="crtbegin.o crtend.o"
3860 ;;
3861 i860-*-sysv4*)
3862 tm_file="${tm_file} svr4.h i860/sysv4.h"
f6cb0e63 3863 xm_defines="USG SVR3"
861bb6c1
JL
3864 xmake_file=i860/x-sysv4
3865 tmake_file=t-svr4
3866 extra_parts="crtbegin.o crtend.o"
3867 ;;
3868 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
3869 tm_file="${tm_file} i960/vx960.h"
3870 tmake_file=i960/t-vxworks960
3871 use_collect2=yes
7cc34889 3872 thread_file='vxworks'
861bb6c1 3873 ;;
a0372c94 3874 i960-wrs-vxworks5* | i960-wrs-vxworks)
861bb6c1
JL
3875 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
3876 tmake_file=i960/t-vxworks960
3877 use_collect2=yes
7cc34889 3878 thread_file='vxworks'
861bb6c1
JL
3879 ;;
3880 i960-wrs-vxworks*)
3881 tm_file="${tm_file} i960/vx960.h"
3882 tmake_file=i960/t-vxworks960
3883 use_collect2=yes
7cc34889 3884 thread_file='vxworks'
861bb6c1
JL
3885 ;;
3886 i960-*-coff*)
3887 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
3888 tmake_file=i960/t-960bare
3889 use_collect2=yes
3890 ;;
3891 i960-*-rtems)
3892 tmake_file="i960/t-960bare t-rtems"
3893 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
3894 use_collect2=yes
3895 ;;
3896 i960-*-*) # Default i960 environment.
3897 use_collect2=yes
3898 ;;
3899 m32r-*-elf*)
3900 extra_parts="crtinit.o crtfini.o"
3901 ;;
3902 m68000-convergent-sysv*)
3903 tm_file=m68k/ctix.h
f6cb0e63
JL
3904 xm_file="m68k/xm-3b1.h ${xm_file}"
3905 xm_defines=USG
861bb6c1
JL
3906 use_collect2=yes
3907 extra_headers=math-68881.h
3908 ;;
3909 m68000-hp-bsd*) # HP 9000/200 running BSD
3910 tm_file=m68k/hp2bsd.h
3911 xmake_file=m68k/x-hp2bsd
3912 use_collect2=yes
3913 extra_headers=math-68881.h
3914 ;;
3915 m68000-hp-hpux*) # HP 9000 series 300
f6cb0e63
JL
3916 xm_file="xm_alloca.h ${xm_file}"
3917 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 3918 if test x$gas = xyes
861bb6c1
JL
3919 then
3920 xmake_file=m68k/x-hp320g
3921 tm_file=m68k/hp310g.h
3922 else
3923 xmake_file=m68k/x-hp320
3924 tm_file=m68k/hp310.h
3925 fi
861bb6c1
JL
3926 install_headers_dir=install-headers-cpio
3927 use_collect2=yes
3928 extra_headers=math-68881.h
3929 ;;
3930 m68000-sun-sunos3*)
3931 tm_file=m68k/sun2.h
3932 use_collect2=yes
3933 extra_headers=math-68881.h
3934 ;;
3935 m68000-sun-sunos4*)
3936 tm_file=m68k/sun2o4.h
3937 use_collect2=yes
3938 extra_headers=math-68881.h
3939 ;;
3940 m68000-att-sysv*)
f6cb0e63
JL
3941 xm_file="m68k/xm-3b1.h ${xm_file}"
3942 xm_defines=USG
75bffa71 3943 if test x$gas = xyes
861bb6c1
JL
3944 then
3945 tm_file=m68k/3b1g.h
3946 else
3947 tm_file=m68k/3b1.h
3948 fi
3949 use_collect2=yes
3950 extra_headers=math-68881.h
3951 ;;
3952 m68k-apple-aux*) # Apple Macintosh running A/UX
f6cb0e63 3953 xm_defines="USG AUX"
861bb6c1 3954 tmake_file=m68k/t-aux
861bb6c1
JL
3955 install_headers_dir=install-headers-cpio
3956 extra_headers=math-68881.h
3957 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
3958 tm_file=
75bffa71 3959 if test "$gnu_ld" = yes
861bb6c1
JL
3960 then
3961 tm_file="${tm_file} m68k/auxgld.h"
3962 else
3963 tm_file="${tm_file} m68k/auxld.h"
3964 fi
75bffa71 3965 if test "$gas" = yes
861bb6c1
JL
3966 then
3967 tm_file="${tm_file} m68k/auxgas.h"
3968 else
3969 tm_file="${tm_file} m68k/auxas.h"
3970 fi
3971 tm_file="${tm_file} m68k/a-ux.h"
0a95276e 3972 float_format=m68k
861bb6c1
JL
3973 ;;
3974 m68k-apollo-*)
3975 tm_file=m68k/apollo68.h
3976 xmake_file=m68k/x-apollo68
3977 use_collect2=yes
3978 extra_headers=math-68881.h
0a95276e 3979 float_format=m68k
861bb6c1
JL
3980 ;;
3981 m68k-altos-sysv*) # Altos 3068
75bffa71 3982 if test x$gas = xyes
861bb6c1
JL
3983 then
3984 tm_file=m68k/altos3068.h
f6cb0e63 3985 xm_defines=USG
861bb6c1
JL
3986 else
3987 echo "The Altos is supported only with the GNU assembler" 1>&2
3988 exit 1
3989 fi
3990 extra_headers=math-68881.h
3991 ;;
3992 m68k-bull-sysv*) # Bull DPX/2
75bffa71 3993 if test x$gas = xyes
861bb6c1 3994 then
75bffa71 3995 if test x$stabs = xyes
861bb6c1
JL
3996 then
3997 tm_file=m68k/dpx2cdbx.h
3998 else
3999 tm_file=m68k/dpx2g.h
4000 fi
4001 else
4002 tm_file=m68k/dpx2.h
4003 fi
f6cb0e63
JL
4004 xm_file="xm-alloca.h ${xm_file}"
4005 xm_defines=USG
861bb6c1
JL
4006 xmake_file=m68k/x-dpx2
4007 use_collect2=yes
4008 extra_headers=math-68881.h
4009 ;;
4010 m68k-atari-sysv4*) # Atari variant of V.4.
4011 tm_file=m68k/atari.h
f6cb0e63
JL
4012 xm_file="xm-alloca.h ${xm_file}"
4013 xm_defines="USG FULL_PROTOTYPES"
861bb6c1
JL
4014 tmake_file=t-svr4
4015 extra_parts="crtbegin.o crtend.o"
4016 extra_headers=math-68881.h
0a95276e 4017 float_format=m68k
861bb6c1
JL
4018 ;;
4019 m68k-motorola-sysv*)
4020 tm_file=m68k/mot3300.h
f6cb0e63
JL
4021 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
4022 xm_defines=NO_SYS_SIGLIST
75bffa71 4023 if test x$gas = xyes
861bb6c1
JL
4024 then
4025 xmake_file=m68k/x-mot3300-gas
75bffa71 4026 if test x$gnu_ld = xyes
861bb6c1
JL
4027 then
4028 tmake_file=m68k/t-mot3300-gald
4029 else
4030 tmake_file=m68k/t-mot3300-gas
4031 use_collect2=yes
4032 fi
4033 else
4034 xmake_file=m68k/x-mot3300
75bffa71 4035 if test x$gnu_ld = xyes
861bb6c1
JL
4036 then
4037 tmake_file=m68k/t-mot3300-gld
4038 else
4039 tmake_file=m68k/t-mot3300
4040 use_collect2=yes
4041 fi
4042 fi
4043 gdb_needs_out_file_path=yes
4044 extra_parts="crt0.o mcrt0.o"
4045 extra_headers=math-68881.h
0a95276e 4046 float_format=m68k
861bb6c1
JL
4047 ;;
4048 m68k-ncr-sysv*) # NCR Tower 32 SVR3
4049 tm_file=m68k/tower-as.h
f6cb0e63 4050 xm_defines="USG SVR3"
861bb6c1
JL
4051 xmake_file=m68k/x-tower
4052 extra_parts="crtbegin.o crtend.o"
4053 extra_headers=math-68881.h
4054 ;;
4055 m68k-plexus-sysv*)
4056 tm_file=m68k/plexus.h
f6cb0e63
JL
4057 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
4058 xm_defines=USG
861bb6c1
JL
4059 use_collect2=yes
4060 extra_headers=math-68881.h
4061 ;;
4062 m68k-tti-*)
4063 tm_file=m68k/pbb.h
f6cb0e63
JL
4064 xm_file="xm-alloca.h ${xm_file}"
4065 xm_defines=USG
861bb6c1
JL
4066 extra_headers=math-68881.h
4067 ;;
4068 m68k-crds-unos*)
f6cb0e63
JL
4069 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
4070 xm_defines="USG unos"
861bb6c1
JL
4071 xmake_file=m68k/x-crds
4072 tm_file=m68k/crds.h
861bb6c1
JL
4073 use_collect2=yes
4074 extra_headers=math-68881.h
4075 ;;
4076 m68k-cbm-sysv4*) # Commodore variant of V.4.
4077 tm_file=m68k/amix.h
f6cb0e63
JL
4078 xm_file="xm-alloca.h ${xm_file}"
4079 xm_defines="USG FULL_PROTOTYPES"
861bb6c1
JL
4080 xmake_file=m68k/x-amix
4081 tmake_file=t-svr4
4082 extra_parts="crtbegin.o crtend.o"
4083 extra_headers=math-68881.h
0a95276e 4084 float_format=m68k
861bb6c1
JL
4085 ;;
4086 m68k-ccur-rtu)
4087 tm_file=m68k/ccur-GAS.h
4088 xmake_file=m68k/x-ccur
4089 extra_headers=math-68881.h
4090 use_collect2=yes
0a95276e 4091 float_format=m68k
861bb6c1
JL
4092 ;;
4093 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
4094 tm_file=m68k/hp3bsd44.h
4095 xmake_file=m68k/x-hp3bsd44
4096 use_collect2=yes
4097 extra_headers=math-68881.h
0a95276e 4098 float_format=m68k
861bb6c1
JL
4099 ;;
4100 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
4101 tm_file=m68k/hp3bsd.h
4102 use_collect2=yes
4103 extra_headers=math-68881.h
0a95276e 4104 float_format=m68k
861bb6c1
JL
4105 ;;
4106 m68k-isi-bsd*)
75bffa71 4107 if test x$with_fp = xno
861bb6c1
JL
4108 then
4109 tm_file=m68k/isi-nfp.h
4110 else
4111 tm_file=m68k/isi.h
0a95276e 4112 float_format=m68k
861bb6c1
JL
4113 fi
4114 use_collect2=yes
4115 extra_headers=math-68881.h
4116 ;;
4117 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
f6cb0e63
JL
4118 xm_file="xm_alloca.h ${xm_file}"
4119 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 4120 if test x$gas = xyes
861bb6c1
JL
4121 then
4122 xmake_file=m68k/x-hp320g
4123 tm_file=m68k/hp320g.h
4124 else
4125 xmake_file=m68k/x-hp320
4126 tm_file=m68k/hpux7.h
4127 fi
861bb6c1
JL
4128 install_headers_dir=install-headers-cpio
4129 use_collect2=yes
4130 extra_headers=math-68881.h
0a95276e 4131 float_format=m68k
861bb6c1
JL
4132 ;;
4133 m68k-hp-hpux*) # HP 9000 series 300
f6cb0e63
JL
4134 xm_file="xm_alloca.h ${xm_file}"
4135 xm_defines="USG NO_SYS_SIGLIST"
75bffa71 4136 if test x$gas = xyes
861bb6c1
JL
4137 then
4138 xmake_file=m68k/x-hp320g
4139 tm_file=m68k/hp320g.h
4140 else
4141 xmake_file=m68k/x-hp320
4142 tm_file=m68k/hp320.h
4143 fi
861bb6c1
JL
4144 install_headers_dir=install-headers-cpio
4145 use_collect2=yes
4146 extra_headers=math-68881.h
0a95276e 4147 float_format=m68k
861bb6c1
JL
4148 ;;
4149 m68k-sun-mach*)
4150 tm_file=m68k/sun3mach.h
4151 use_collect2=yes
4152 extra_headers=math-68881.h
0a95276e 4153 float_format=m68k
861bb6c1
JL
4154 ;;
4155 m68k-sony-newsos3*)
75bffa71 4156 if test x$gas = xyes
861bb6c1
JL
4157 then
4158 tm_file=m68k/news3gas.h
4159 else
4160 tm_file=m68k/news3.h
4161 fi
4162 use_collect2=yes
4163 extra_headers=math-68881.h
0a95276e 4164 float_format=m68k
861bb6c1
JL
4165 ;;
4166 m68k-sony-bsd* | m68k-sony-newsos*)
75bffa71 4167 if test x$gas = xyes
861bb6c1
JL
4168 then
4169 tm_file=m68k/newsgas.h
4170 else
4171 tm_file=m68k/news.h
4172 fi
4173 use_collect2=yes
4174 extra_headers=math-68881.h
0a95276e 4175 float_format=m68k
861bb6c1
JL
4176 ;;
4177 m68k-next-nextstep2*)
4178 tm_file=m68k/next21.h
f6cb0e63 4179 xm_file="m68k/xm-next.h ${xm_file}"
861bb6c1
JL
4180 tmake_file=m68k/t-next
4181 xmake_file=m68k/x-next
4182 extra_objs=nextstep.o
4183 extra_headers=math-68881.h
4184 use_collect2=yes
0a95276e 4185 float_format=m68k
861bb6c1
JL
4186 ;;
4187 m68k-next-nextstep3*)
4188 tm_file=m68k/next.h
f6cb0e63 4189 xm_file="m68k/xm-next.h ${xm_file}"
861bb6c1
JL
4190 tmake_file=m68k/t-next
4191 xmake_file=m68k/x-next
4192 extra_objs=nextstep.o
750930c1 4193 extra_parts="crtbegin.o crtend.o"
861bb6c1 4194 extra_headers=math-68881.h
0a95276e 4195 float_format=m68k
75bffa71 4196 if test x$enable_threads = xyes; then
861bb6c1
JL
4197 thread_file='mach'
4198 fi
4199 ;;
4200 m68k-sun-sunos3*)
75bffa71 4201 if test x$with_fp = xno
861bb6c1
JL
4202 then
4203 tm_file=m68k/sun3n3.h
4204 else
4205 tm_file=m68k/sun3o3.h
0a95276e 4206 float_format=m68k
861bb6c1
JL
4207 fi
4208 use_collect2=yes
4209 extra_headers=math-68881.h
4210 ;;
4211 m68k-sun-sunos*) # For SunOS 4 (the default).
75bffa71 4212 if test x$with_fp = xno
861bb6c1
JL
4213 then
4214 tm_file=m68k/sun3n.h
4215 else
4216 tm_file=m68k/sun3.h
0a95276e 4217 float_format=m68k
861bb6c1 4218 fi
861bb6c1
JL
4219 use_collect2=yes
4220 extra_headers=math-68881.h
4221 ;;
4222 m68k-wrs-vxworks*)
4223 tm_file=m68k/vxm68k.h
4224 tmake_file=m68k/t-vxworks68
4225 extra_headers=math-68881.h
7cc34889 4226 thread_file='vxworks'
0a95276e 4227 float_format=m68k
861bb6c1
JL
4228 ;;
4229 m68k-*-aout*)
4230 tmake_file=m68k/t-m68kbare
4231 tm_file="m68k/m68k-aout.h libgloss.h"
4232 extra_headers=math-68881.h
0a95276e 4233 float_format=m68k
861bb6c1
JL
4234 ;;
4235 m68k-*-coff*)
4236 tmake_file=m68k/t-m68kbare
4237 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
4238 extra_headers=math-68881.h
0a95276e 4239 float_format=m68k
861bb6c1 4240 ;;
d1be3be3
JW
4241 m68020-*-elf* | m68k-*-elf*)
4242 tm_file="m68k/m68020-elf.h libgloss.h"
4243 xm_file=m68k/xm-m68kv.h
4244 tmake_file=m68k/t-m68kelf
4245 header_files=math-68881.h
4246 ;;
861bb6c1 4247 m68k-*-lynxos*)
75bffa71 4248 if test x$gas = xyes
861bb6c1
JL
4249 then
4250 tm_file=m68k/lynx.h
4251 else
4252 tm_file=m68k/lynx-ng.h
4253 fi
4254 xm_file=m68k/xm-lynx.h
4255 xmake_file=x-lynx
4256 tmake_file=m68k/t-lynx
4257 extra_headers=math-68881.h
0a95276e 4258 float_format=m68k
861bb6c1 4259 ;;
58600d24 4260 m68k*-*-netbsd*)
861bb6c1 4261 tm_file=m68k/netbsd.h
be1ed94f 4262 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4263 fixincludes=fixinc.wrap
861bb6c1 4264 tmake_file=t-netbsd
0a95276e 4265 float_format=m68k
861bb6c1 4266 ;;
1b4a979b
ME
4267 m68k*-*-openbsd*)
4268 float_format=m68k
4269 # we need collect2 until our bug is fixed...
4270 use_collect2=yes
4271 ;;
861bb6c1 4272 m68k-*-sysv3*) # Motorola m68k's running system V.3
f6cb0e63
JL
4273 xm_file="xm-alloca.h ${xm_file}"
4274 xm_defines=USG
861bb6c1
JL
4275 xmake_file=m68k/x-m68kv
4276 extra_parts="crtbegin.o crtend.o"
4277 extra_headers=math-68881.h
0a95276e 4278 float_format=m68k
861bb6c1
JL
4279 ;;
4280 m68k-*-sysv4*) # Motorola m68k's running system V.4
4281 tm_file=m68k/m68kv4.h
f6cb0e63
JL
4282 xm_file="xm-alloca.h ${xm_file}"
4283 xm_defines=USG
861bb6c1
JL
4284 tmake_file=t-svr4
4285 extra_parts="crtbegin.o crtend.o"
4286 extra_headers=math-68881.h
0a95276e 4287 float_format=m68k
861bb6c1 4288 ;;
956d6950 4289 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
f6cb0e63 4290 # with a.out format
861bb6c1
JL
4291 xmake_file=x-linux
4292 tm_file=m68k/linux-aout.h
4293 tmake_file="t-linux-aout m68k/t-linux-aout"
956d6950 4294 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4295 extra_headers=math-68881.h
0a95276e 4296 float_format=m68k
861bb6c1
JL
4297 gnu_ld=yes
4298 ;;
956d6950 4299 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
f6cb0e63
JL
4300 # with ELF format using the
4301 # GNU/Linux C library 5
4302 xmake_file=x-linux
861bb6c1
JL
4303 tm_file=m68k/linux.h
4304 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
4305 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 4306 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4307 extra_headers=math-68881.h
0a95276e 4308 float_format=m68k
861bb6c1
JL
4309 gnu_ld=yes
4310 ;;
956d6950 4311 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
f6cb0e63
JL
4312 # with ELF format using glibc 2
4313 # aka the GNU/Linux C library 6.
4314 xmake_file=x-linux
861bb6c1
JL
4315 tm_file=m68k/linux.h
4316 tmake_file="t-linux m68k/t-linux"
4317 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 4318 fixincludes=Makefile.in # The headers are ok already.
861bb6c1 4319 extra_headers=math-68881.h
0a95276e 4320 float_format=m68k
861bb6c1 4321 gnu_ld=yes
75bffa71 4322 if test x$enable_threads = xyes; then
861bb6c1
JL
4323 thread_file='posix'
4324 fi
4325 ;;
4326 m68k-*-psos*)
4327 tmake_file=m68k/t-m68kbare
4328 tm_file=m68k/m68k-psos.h
4329 extra_headers=math-68881.h
0a95276e 4330 float_format=m68k
861bb6c1
JL
4331 ;;
4332 m68k-*-rtems*)
4333 tmake_file="m68k/t-m68kbare t-rtems"
4334 tm_file=m68k/rtems.h
4335 extra_headers=math-68881.h
0a95276e 4336 float_format=m68k
861bb6c1
JL
4337 ;;
4338
4339 m88k-dg-dgux*)
4340 case $machine in
4341 m88k-dg-dguxbcs*)
4342 tm_file=m88k/dguxbcs.h
4343 tmake_file=m88k/t-dguxbcs
4344 ;;
4345 *)
4346 tm_file=m88k/dgux.h
4347 tmake_file=m88k/t-dgux
4348 ;;
4349 esac
4350 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
861bb6c1 4351 xmake_file=m88k/x-dgux
75bffa71 4352 if test x$gas = xyes
861bb6c1
JL
4353 then
4354 tmake_file=m88k/t-dgux-gas
4355 fi
4356 fixincludes=fixinc.dgux
4357 ;;
4358 m88k-dolphin-sysv3*)
4359 tm_file=m88k/dolph.h
4360 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4361 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4362 xmake_file=m88k/x-dolph
75bffa71 4363 if test x$gas = xyes
861bb6c1
JL
4364 then
4365 tmake_file=m88k/t-m88k-gas
4366 fi
4367 ;;
4368 m88k-tektronix-sysv3)
4369 tm_file=m88k/tekXD88.h
4370 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4371 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4372 xmake_file=m88k/x-tekXD88
75bffa71 4373 if test x$gas = xyes
861bb6c1
JL
4374 then
4375 tmake_file=m88k/t-m88k-gas
4376 fi
4377 ;;
4378 m88k-*-aout*)
4379 tm_file=m88k/m88k-aout.h
4380 ;;
4381 m88k-*-coff*)
4382 tm_file=m88k/m88k-coff.h
4383 tmake_file=m88k/t-bug
4384 ;;
4385 m88k-*-luna*)
4386 tm_file=m88k/luna.h
4387 extra_parts="crtbegin.o crtend.o"
75bffa71 4388 if test x$gas = xyes
861bb6c1
JL
4389 then
4390 tmake_file=m88k/t-luna-gas
4391 else
4392 tmake_file=m88k/t-luna
4393 fi
4394 ;;
1b4a979b
ME
4395 m88k-*-openbsd*)
4396 tmake_file="${tmake_file} m88k/t-luna-gas"
4397 ;;
861bb6c1
JL
4398 m88k-*-sysv3*)
4399 tm_file=m88k/sysv3.h
4400 extra_parts="crtbegin.o crtend.o"
f6cb0e63 4401 xm_file="m88k/xm-sysv3.h ${xm_file}"
861bb6c1 4402 xmake_file=m88k/x-sysv3
75bffa71 4403 if test x$gas = xyes
861bb6c1
JL
4404 then
4405 tmake_file=m88k/t-m88k-gas
4406 fi
4407 ;;
4408 m88k-*-sysv4*)
4409 tm_file=m88k/sysv4.h
4410 extra_parts="crtbegin.o crtend.o"
4411 xmake_file=m88k/x-sysv4
4412 tmake_file=m88k/t-sysv4
4413 ;;
4414 mips-sgi-irix6*) # SGI System V.4., IRIX 6
4415 tm_file=mips/iris6.h
4416 xm_file=mips/xm-iris6.h
861bb6c1
JL
4417 fixincludes=fixinc.irix
4418 xmake_file=mips/x-iris6
4419 tmake_file=mips/t-iris6
04069e5c 4420# if test x$enable_threads = xyes; then
6e148807 4421# thread_file='irix'
04069e5c 4422# fi
861bb6c1 4423 ;;
98bd9f0f
DB
4424 mips-wrs-vxworks)
4425 tm_file="mips/elf.h libgloss.h"
4426 tmake_file=mips/t-ecoff
4427 gas=yes
4428 gnu_ld=yes
4429 extra_parts="crtbegin.o crtend.o"
e9c0315e 4430 thread_file='vxworks'
98bd9f0f 4431 ;;
861bb6c1 4432 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
f6cb0e63 4433 tm_file="mips/iris6.h mips/cross64.h"
74c55ab0
JW
4434 xm_defines=USG
4435 xm_file="mips/xm-iris5.h"
861bb6c1
JL
4436 fixincludes=Makefile.in
4437 xmake_file=mips/x-iris
4438 tmake_file=mips/t-cross64
4439 # See comment in mips/iris[56].h files.
4440 use_collect2=yes
04069e5c 4441# if test x$enable_threads = xyes; then
6e148807 4442# thread_file='irix'
04069e5c 4443# fi
861bb6c1
JL
4444 ;;
4445 mips-sni-sysv4)
75bffa71 4446 if test x$gas = xyes
861bb6c1 4447 then
75bffa71 4448 if test x$stabs = xyes
861bb6c1
JL
4449 then
4450 tm_file=mips/iris5gdb.h
4451 else
f6cb0e63 4452 tm_file="mips/sni-svr4.h mips/sni-gas.h"
861bb6c1
JL
4453 fi
4454 else
4455 tm_file=mips/sni-svr4.h
4456 fi
f6cb0e63 4457 xm_defines=USG
861bb6c1
JL
4458 xmake_file=mips/x-sni-svr4
4459 tmake_file=mips/t-mips-gas
75bffa71 4460 if test x$gnu_ld != xyes
861bb6c1
JL
4461 then
4462 use_collect2=yes
4463 fi
861bb6c1
JL
4464 ;;
4465 mips-sgi-irix5*) # SGI System V.4., IRIX 5
75bffa71 4466 if test x$gas = xyes
861bb6c1 4467 then
f6cb0e63 4468 tm_file="mips/iris5.h mips/iris5gas.h"
75bffa71 4469 if test x$stabs = xyes
861bb6c1
JL
4470 then
4471 tm_file="${tm_file} dbx.h"
4472 fi
4473 else
4474 tm_file=mips/iris5.h
4475 fi
74c55ab0
JW
4476 xm_defines=USG
4477 xm_file="mips/xm-iris5.h"
861bb6c1
JL
4478 fixincludes=fixinc.irix
4479 xmake_file=mips/x-iris
4480 # mips-tfile doesn't work yet
4481 tmake_file=mips/t-mips-gas
4482 # See comment in mips/iris5.h file.
4483 use_collect2=yes
04069e5c 4484# if test x$enable_threads = xyes; then
6e148807 4485# thread_file='irix'
04069e5c 4486# fi
861bb6c1
JL
4487 ;;
4488 mips-sgi-irix4loser*) # Mostly like a MIPS.
f6cb0e63 4489 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 4490 if test x$stabs = xyes; then
861bb6c1
JL
4491 tm_file="${tm_file} dbx.h"
4492 fi
f6cb0e63 4493 xm_defines=USG
861bb6c1 4494 xmake_file=mips/x-iris
75bffa71 4495 if test x$gas = xyes
861bb6c1
JL
4496 then
4497 tmake_file=mips/t-mips-gas
4498 else
4499 extra_passes="mips-tfile mips-tdump"
4500 fi
75bffa71 4501 if test x$gnu_ld != xyes
861bb6c1
JL
4502 then
4503 use_collect2=yes
4504 fi
04069e5c 4505# if test x$enable_threads = xyes; then
6e148807 4506# thread_file='irix'
04069e5c 4507# fi
861bb6c1
JL
4508 ;;
4509 mips-sgi-irix4*) # Mostly like a MIPS.
f6cb0e63 4510 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 4511 if test x$stabs = xyes; then
861bb6c1
JL
4512 tm_file="${tm_file} dbx.h"
4513 fi
f6cb0e63 4514 xm_defines=USG
861bb6c1 4515 xmake_file=mips/x-iris
75bffa71 4516 if test x$gas = xyes
861bb6c1
JL
4517 then
4518 tmake_file=mips/t-mips-gas
4519 else
4520 extra_passes="mips-tfile mips-tdump"
4521 fi
75bffa71 4522 if test x$gnu_ld != xyes
861bb6c1
JL
4523 then
4524 use_collect2=yes
4525 fi
04069e5c 4526# if test x$enable_threads = xyes; then
6e148807 4527# thread_file='irix'
04069e5c 4528# fi
861bb6c1
JL
4529 ;;
4530 mips-sgi-*) # Mostly like a MIPS.
f6cb0e63 4531 tm_file="mips/iris3.h ${tm_file}"
75bffa71 4532 if test x$stabs = xyes; then
861bb6c1
JL
4533 tm_file="${tm_file} dbx.h"
4534 fi
f6cb0e63 4535 xm_defines=USG
861bb6c1 4536 xmake_file=mips/x-iris3
75bffa71 4537 if test x$gas = xyes
861bb6c1
JL
4538 then
4539 tmake_file=mips/t-mips-gas
4540 else
4541 extra_passes="mips-tfile mips-tdump"
4542 fi
75bffa71 4543 if test x$gnu_ld != xyes
861bb6c1
JL
4544 then
4545 use_collect2=yes
4546 fi
4547 ;;
4548 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
f6cb0e63 4549 tm_file="mips/osfrose.h ${tm_file}"
861bb6c1
JL
4550 xmake_file=mips/x-osfrose
4551 tmake_file=mips/t-osfrose
4552 extra_objs=halfpic.o
4553 use_collect2=yes
4554 ;;
4555 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
4556 tm_file=mips/dec-osf1.h
75bffa71 4557 if test x$stabs = xyes; then
861bb6c1
JL
4558 tm_file="${tm_file} dbx.h"
4559 fi
4560 xmake_file=mips/x-dec-osf1
75bffa71 4561 if test x$gas = xyes
861bb6c1
JL
4562 then
4563 tmake_file=mips/t-mips-gas
4564 else
4565 tmake_file=mips/t-ultrix
4566 extra_passes="mips-tfile mips-tdump"
4567 fi
75bffa71 4568 if test x$gnu_ld != xyes
861bb6c1
JL
4569 then
4570 use_collect2=yes
4571 fi
4572 ;;
4573 mips-dec-bsd*) # Decstation running 4.4 BSD
4574 tm_file=mips/dec-bsd.h
4575 fixincludes=
75bffa71 4576 if test x$gas = xyes
861bb6c1
JL
4577 then
4578 tmake_file=mips/t-mips-gas
4579 else
4580 tmake_file=mips/t-ultrix
4581 extra_passes="mips-tfile mips-tdump"
4582 fi
75bffa71 4583 if test x$gnu_ld != xyes
861bb6c1
JL
4584 then
4585 use_collect2=yes
4586 fi
4587 ;;
58600d24 4588 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
861bb6c1 4589 tm_file=mips/netbsd.h
be1ed94f 4590 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4591 fixincludes=fixinc.wrap
861bb6c1 4592 tmake_file=t-netbsd
861bb6c1 4593 ;;
54953b66 4594 mips*-*-linux*) # Linux MIPS, either endian.
18cae839
RL
4595 xmake_file=x-linux
4596 xm_file="xm-siglist.h ${xm_file}"
54953b66
UD
4597 case $machine in
4598 mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
4599 *) tm_file="mips/elf.h mips/linux.h" ;;
4600 esac
18cae839
RL
4601 extra_parts="crtbegin.o crtend.o"
4602 gnu_ld=yes
4603 gas=yes
4604 fixincludes=Makefile.in
4605 ;;
1b4a979b
ME
4606 mips*el-*-openbsd*) # mips little endian
4607 target_cpu_default="MASK_GAS|MASK_ABICALLS"
4608 tm_file=mips/openbsd.h
4609 xmake_file=none
4610 ;;
4611 mips*-*-openbsd*) # mips big endian
4612 target_cpu_default="MASK_GAS|MASK_ABICALLS"
4613 tm_file=mips/openbsd-be.h
4614 xmake_file=none
4615 ;;
861bb6c1 4616 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
f6cb0e63 4617 tm_file="mips/news4.h ${tm_file}"
75bffa71 4618 if test x$stabs = xyes; then
861bb6c1
JL
4619 tm_file="${tm_file} dbx.h"
4620 fi
75bffa71 4621 if test x$gas = xyes
861bb6c1
JL
4622 then
4623 tmake_file=mips/t-mips-gas
4624 else
4625 extra_passes="mips-tfile mips-tdump"
4626 fi
75bffa71 4627 if test x$gnu_ld != xyes
861bb6c1
JL
4628 then
4629 use_collect2=yes
4630 fi
4631 xmake_file=mips/x-sony
4632 ;;
4633 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
4634 # That is based on svr4.
4635 # t-svr4 is not right because this system doesn't use ELF.
f6cb0e63 4636 tm_file="mips/news5.h ${tm_file}"
75bffa71 4637 if test x$stabs = xyes; then
861bb6c1
JL
4638 tm_file="${tm_file} dbx.h"
4639 fi
f6cb0e63
JL
4640 xm_file="xm-siglist.h ${xm_file}"
4641 xm_defines=USG
75bffa71 4642 if test x$gas = xyes
861bb6c1
JL
4643 then
4644 tmake_file=mips/t-mips-gas
4645 else
4646 extra_passes="mips-tfile mips-tdump"
4647 fi
75bffa71 4648 if test x$gnu_ld != xyes
861bb6c1
JL
4649 then
4650 use_collect2=yes
4651 fi
4652 ;;
4653 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
f6cb0e63 4654 tm_file="mips/svr4-5.h mips/svr4-t.h"
75bffa71 4655 if test x$stabs = xyes; then
861bb6c1
JL
4656 tm_file="${tm_file} dbx.h"
4657 fi
f6cb0e63
JL
4658 xm_file="xm-siglist.h ${xm_file}"
4659 xm_defines=USG
861bb6c1 4660 xmake_file=mips/x-sysv
75bffa71 4661 if test x$gas = xyes
861bb6c1
JL
4662 then
4663 tmake_file=mips/t-mips-gas
4664 extra_parts="crtbegin.o crtend.o"
4665 else
4666 tmake_file=mips/t-mips
4667 extra_passes="mips-tfile mips-tdump"
4668 fi
75bffa71 4669 if test x$gnu_ld != xyes
861bb6c1
JL
4670 then
4671 use_collect2=yes
4672 fi
861bb6c1
JL
4673 ;;
4674 mips-*-ultrix* | mips-dec-mach3) # Decstation.
f6cb0e63 4675 tm_file="mips/ultrix.h ${tm_file}"
75bffa71 4676 if test x$stabs = xyes; then
861bb6c1
JL
4677 tm_file="${tm_file} dbx.h"
4678 fi
4679 xmake_file=mips/x-ultrix
75bffa71 4680 if test x$gas = xyes
861bb6c1
JL
4681 then
4682 tmake_file=mips/t-mips-gas
4683 else
4684 tmake_file=mips/t-ultrix
4685 extra_passes="mips-tfile mips-tdump"
4686 fi
75bffa71 4687 if test x$gnu_ld != xyes
861bb6c1
JL
4688 then
4689 use_collect2=yes
4690 fi
4691 ;;
4692 mips-*-riscos[56789]bsd*)
4693 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
75bffa71 4694 if test x$stabs = xyes; then
861bb6c1
JL
4695 tm_file="${tm_file} dbx.h"
4696 fi
75bffa71 4697 if test x$gas = xyes
861bb6c1
JL
4698 then
4699 tmake_file=mips/t-bsd-gas
4700 else
4701 tmake_file=mips/t-bsd
4702 extra_passes="mips-tfile mips-tdump"
4703 fi
75bffa71 4704 if test x$gnu_ld != xyes
861bb6c1
JL
4705 then
4706 use_collect2=yes
4707 fi
861bb6c1
JL
4708 ;;
4709 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
f6cb0e63 4710 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
75bffa71 4711 if test x$stabs = xyes; then
861bb6c1
JL
4712 tm_file="${tm_file} dbx.h"
4713 fi
75bffa71 4714 if test x$gas = xyes
861bb6c1
JL
4715 then
4716 tmake_file=mips/t-bsd-gas
4717 else
4718 tmake_file=mips/t-bsd
4719 extra_passes="mips-tfile mips-tdump"
4720 fi
75bffa71 4721 if test x$gnu_ld != xyes
861bb6c1
JL
4722 then
4723 use_collect2=yes
4724 fi
861bb6c1
JL
4725 ;;
4726 mips-*-riscos[56789]sysv4*)
4727 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
75bffa71 4728 if test x$stabs = xyes; then
861bb6c1
JL
4729 tm_file="${tm_file} dbx.h"
4730 fi
f6cb0e63 4731 xm_file="xm-siglist.h ${xm_file}"
861bb6c1 4732 xmake_file=mips/x-sysv
75bffa71 4733 if test x$gas = xyes
861bb6c1
JL
4734 then
4735 tmake_file=mips/t-svr4-gas
4736 else
4737 tmake_file=mips/t-svr4
4738 extra_passes="mips-tfile mips-tdump"
4739 fi
75bffa71 4740 if test x$gnu_ld != xyes
861bb6c1
JL
4741 then
4742 use_collect2=yes
4743 fi
861bb6c1
JL
4744 ;;
4745 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
f6cb0e63 4746 tm_file="mips/svr4-4.h ${tm_file}"
75bffa71 4747 if test x$stabs = xyes; then
861bb6c1
JL
4748 tm_file="${tm_file} dbx.h"
4749 fi
f6cb0e63 4750 xm_defines=USG
861bb6c1 4751 xmake_file=mips/x-sysv
75bffa71 4752 if test x$gas = xyes
861bb6c1
JL
4753 then
4754 tmake_file=mips/t-svr4-gas
4755 else
4756 tmake_file=mips/t-svr4
4757 extra_passes="mips-tfile mips-tdump"
4758 fi
75bffa71 4759 if test x$gnu_ld != xyes
861bb6c1
JL
4760 then
4761 use_collect2=yes
4762 fi
861bb6c1
JL
4763 ;;
4764 mips-*-riscos[56789]sysv*)
4765 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
75bffa71 4766 if test x$stabs = xyes; then
861bb6c1
JL
4767 tm_file="${tm_file} dbx.h"
4768 fi
f6cb0e63 4769 xm_defines=USG
861bb6c1 4770 xmake_file=mips/x-sysv
75bffa71 4771 if test x$gas = xyes
861bb6c1
JL
4772 then
4773 tmake_file=mips/t-svr3-gas
4774 else
4775 tmake_file=mips/t-svr3
4776 extra_passes="mips-tfile mips-tdump"
4777 fi
75bffa71 4778 if test x$gnu_ld != xyes
861bb6c1
JL
4779 then
4780 use_collect2=yes
4781 fi
861bb6c1
JL
4782 ;;
4783 mips-*-sysv* | mips-*-riscos*sysv*)
f6cb0e63 4784 tm_file="mips/svr3-4.h ${tm_file}"
75bffa71 4785 if test x$stabs = xyes; then
861bb6c1
JL
4786 tm_file="${tm_file} dbx.h"
4787 fi
f6cb0e63 4788 xm_defines=USG
861bb6c1 4789 xmake_file=mips/x-sysv
75bffa71 4790 if test x$gas = xyes
861bb6c1
JL
4791 then
4792 tmake_file=mips/t-svr3-gas
4793 else
4794 tmake_file=mips/t-svr3
4795 extra_passes="mips-tfile mips-tdump"
4796 fi
75bffa71 4797 if test x$gnu_ld != xyes
861bb6c1
JL
4798 then
4799 use_collect2=yes
4800 fi
861bb6c1
JL
4801 ;;
4802 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
4803 tm_file=mips/mips-5.h
75bffa71 4804 if test x$stabs = xyes; then
861bb6c1
JL
4805 tm_file="${tm_file} dbx.h"
4806 fi
75bffa71 4807 if test x$gas = xyes
861bb6c1
JL
4808 then
4809 tmake_file=mips/t-mips-gas
4810 else
4811 extra_passes="mips-tfile mips-tdump"
4812 fi
75bffa71 4813 if test x$gnu_ld != xyes
861bb6c1
JL
4814 then
4815 use_collect2=yes
4816 fi
861bb6c1
JL
4817 ;;
4818 mips-*-gnu*)
4819 ;;
4820 mipsel-*-ecoff*)
4821 tm_file=mips/ecoffl.h
75bffa71 4822 if test x$stabs = xyes; then
861bb6c1
JL
4823 tm_file="${tm_file} dbx.h"
4824 fi
4825 tmake_file=mips/t-ecoff
4826 ;;
4827 mips-*-ecoff*)
1be12a4a 4828 tm_file="gofast.h mips/ecoff.h"
75bffa71 4829 if test x$stabs = xyes; then
861bb6c1
JL
4830 tm_file="${tm_file} dbx.h"
4831 fi
4832 tmake_file=mips/t-ecoff
861bb6c1
JL
4833 ;;
4834 mipsel-*-elf*)
4835 tm_file="mips/elfl.h libgloss.h"
4836 tmake_file=mips/t-ecoff
4837 ;;
4838 mips-*-elf*)
4839 tm_file="mips/elf.h libgloss.h"
4840 tmake_file=mips/t-ecoff
4841 ;;
4842 mips64el-*-elf*)
4843 tm_file="mips/elfl64.h libgloss.h"
4844 tmake_file=mips/t-ecoff
4845 ;;
4846 mips64orionel-*-elf*)
f6cb0e63 4847 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
861bb6c1
JL
4848 tmake_file=mips/t-ecoff
4849 ;;
4850 mips64-*-elf*)
4851 tm_file="mips/elf64.h libgloss.h"
4852 tmake_file=mips/t-ecoff
4853 ;;
4854 mips64orion-*-elf*)
f6cb0e63 4855 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
861bb6c1
JL
4856 tmake_file=mips/t-ecoff
4857 ;;
4858 mips64orion-*-rtems*)
6e9856ba 4859 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
861bb6c1
JL
4860 tmake_file="mips/t-ecoff t-rtems"
4861 ;;
e9a25f70
JL
4862 mipstx39el-*-elf*)
4863 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
09e4daf5 4864 tmake_file=mips/t-r3900
e9a25f70
JL
4865 ;;
4866 mipstx39-*-elf*)
4867 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
09e4daf5 4868 tmake_file=mips/t-r3900
2ce3c6c6
JM
4869 # FIXME mips-elf should be fixed to use crtstuff.
4870 use_collect2=yes
e9a25f70 4871 ;;
861bb6c1 4872 mips-*-*) # Default MIPS RISC-OS 4.0.
75bffa71 4873 if test x$stabs = xyes; then
861bb6c1
JL
4874 tm_file="${tm_file} dbx.h"
4875 fi
75bffa71 4876 if test x$gas = xyes
861bb6c1
JL
4877 then
4878 tmake_file=mips/t-mips-gas
4879 else
4880 extra_passes="mips-tfile mips-tdump"
4881 fi
75bffa71 4882 if test x$gnu_ld != xyes
861bb6c1
JL
4883 then
4884 use_collect2=yes
4885 fi
4886 ;;
4887 mn10200-*-*)
4888 cpu_type=mn10200
4889 tm_file="mn10200/mn10200.h"
75bffa71 4890 if test x$stabs = xyes
861bb6c1
JL
4891 then
4892 tm_file="${tm_file} dbx.h"
4893 fi
4894 use_collect2=no
4895 ;;
4896 mn10300-*-*)
4897 cpu_type=mn10300
4898 tm_file="mn10300/mn10300.h"
75bffa71 4899 if test x$stabs = xyes
861bb6c1
JL
4900 then
4901 tm_file="${tm_file} dbx.h"
4902 fi
4903 use_collect2=no
4904 ;;
4905 ns32k-encore-bsd*)
4906 tm_file=ns32k/encore.h
4907 use_collect2=yes
4908 ;;
4909 ns32k-sequent-bsd*)
4910 tm_file=ns32k/sequent.h
4911 use_collect2=yes
4912 ;;
4913 ns32k-tek6100-bsd*)
4914 tm_file=ns32k/tek6100.h
861bb6c1
JL
4915 use_collect2=yes
4916 ;;
4917 ns32k-tek6200-bsd*)
4918 tm_file=ns32k/tek6200.h
861bb6c1
JL
4919 use_collect2=yes
4920 ;;
4921# This has not been updated to GCC 2.
4922# ns32k-ns-genix*)
f6cb0e63 4923# xm_defines=USG
861bb6c1
JL
4924# xmake_file=ns32k/x-genix
4925# tm_file=ns32k/genix.h
861bb6c1
JL
4926# use_collect2=yes
4927# ;;
4928 ns32k-merlin-*)
4929 tm_file=ns32k/merlin.h
4930 use_collect2=yes
4931 ;;
4932 ns32k-pc532-mach*)
4933 tm_file=ns32k/pc532-mach.h
4934 use_collect2=yes
4935 ;;
4936 ns32k-pc532-minix*)
4937 tm_file=ns32k/pc532-min.h
f6cb0e63
JL
4938 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
4939 xm_defines=USG
861bb6c1
JL
4940 use_collect2=yes
4941 ;;
58600d24 4942 ns32k-*-netbsd*)
861bb6c1 4943 tm_file=ns32k/netbsd.h
641d4216 4944 xm_file="ns32k/xm-netbsd.h ${xm_file}"
be1ed94f 4945 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 4946 fixincludes=fixinc.wrap
861bb6c1
JL
4947 tmake_file=t-netbsd
4948 ;;
4949 pdp11-*-bsd)
4950 tm_file="${tm_file} pdp11/2bsd.h"
4951 ;;
4952 pdp11-*-*)
4953 ;;
1b4a979b
ME
4954 ns32k-*-openbsd*)
4955 # Nothing special
4956 ;;
861bb6c1
JL
4957 pyramid-*-*)
4958 cpu_type=pyr
4959 xmake_file=pyr/x-pyr
4960 use_collect2=yes
4961 ;;
4962 romp-*-aos*)
4963 use_collect2=yes
4964 ;;
4965 romp-*-mach*)
4966 xmake_file=romp/x-mach
4967 use_collect2=yes
4968 ;;
1b4a979b
ME
4969 romp-*-openbsd*)
4970 # Nothing special
4971 ;;
4972 powerpc-*-openbsd*)
4973 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
4974 xmake_file=none
4975 ;;
c55dcc7d
FF
4976 powerpc-*-beos*)
4977 cpu_type=rs6000
4978 tm_file=rs6000/beos.h
4979 xm_file=rs6000/xm-beos.h
4980 tmake_file=rs6000/t-beos
4981 xmake_file=rs6000/x-beos
4982 ;;
861bb6c1
JL
4983 powerpc-*-sysv* | powerpc-*-elf*)
4984 tm_file=rs6000/sysv4.h
f6cb0e63
JL
4985 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4986 xm_defines="USG POSIX"
861bb6c1 4987 extra_headers=ppc-asm.h
75bffa71 4988 if test x$gas = xyes
861bb6c1
JL
4989 then
4990 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4991 else
4992 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4993 fi
4994 xmake_file=rs6000/x-sysv4
4995 ;;
4996 powerpc-*-eabiaix*)
4997 tm_file=rs6000/eabiaix.h
4998 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4999 fixincludes=Makefile.in
5000 extra_headers=ppc-asm.h
5001 ;;
5002 powerpc-*-eabisim*)
5003 tm_file=rs6000/eabisim.h
5004 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5005 fixincludes=Makefile.in
5006 extra_headers=ppc-asm.h
5007 ;;
5008 powerpc-*-eabi*)
5009 tm_file=rs6000/eabi.h
75bffa71 5010 if test x$gas = xyes
861bb6c1
JL
5011 then
5012 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5013 else
5014 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5015 fi
5016 fixincludes=Makefile.in
5017 extra_headers=ppc-asm.h
5018 ;;
5019 powerpc-*-rtems*)
5020 tm_file=rs6000/rtems.h
75bffa71 5021 if test x$gas = xyes
861bb6c1
JL
5022 then
5023 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
5024 else
5025 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
5026 fi
5027 fixincludes=Makefile.in
5028 extra_headers=ppc-asm.h
5029 ;;
ce514f57
FS
5030 powerpc-*-linux-gnulibc1)
5031 tm_file=rs6000/linux.h
5032 xm_file=rs6000/xm-sysv4.h
5033 out_file=rs6000/rs6000.c
75bffa71 5034 if test x$gas = xyes
ce514f57
FS
5035 then
5036 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
5037 else
5038 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
5039 fi
5040 xmake_file=x-linux
5041 fixincludes=Makefile.in
5042 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5043 extra_headers=ppc-asm.h
75bffa71 5044 if test x$enable_threads = xyes; then
ce514f57
FS
5045 thread_file='posix'
5046 fi
5047 ;;
861bb6c1
JL
5048 powerpc-*-linux-gnu*)
5049 tm_file=rs6000/linux.h
f6cb0e63
JL
5050 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
5051 xm_defines="USG ${xm_defines}"
861bb6c1 5052 out_file=rs6000/rs6000.c
75bffa71 5053 if test x$gas = xyes
861bb6c1
JL
5054 then
5055 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
5056 else
5057 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
5058 fi
5059 xmake_file=x-linux
5060 fixincludes=Makefile.in
5061 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5062 extra_headers=ppc-asm.h
75bffa71 5063 if test x$enable_threads = xyes; then
861bb6c1
JL
5064 thread_file='posix'
5065 fi
5066 ;;
7cc34889 5067 powerpc-wrs-vxworks*)
861bb6c1 5068 cpu_type=rs6000
f6cb0e63
JL
5069 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
5070 xm_defines="USG POSIX"
861bb6c1
JL
5071 tm_file=rs6000/vxppc.h
5072 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5073 extra_headers=ppc-asm.h
7cc34889 5074 thread_file='vxworks'
861bb6c1
JL
5075 ;;
5076 powerpcle-*-sysv* | powerpcle-*-elf*)
5077 tm_file=rs6000/sysv4le.h
f6cb0e63
JL
5078 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
5079 xm_defines="USG POSIX"
75bffa71 5080 if test x$gas = xyes
861bb6c1
JL
5081 then
5082 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5083 else
5084 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5085 fi
5086 xmake_file=rs6000/x-sysv4
5087 extra_headers=ppc-asm.h
5088 ;;
5089 powerpcle-*-eabisim*)
5090 tm_file=rs6000/eabilesim.h
5091 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5092 fixincludes=Makefile.in
5093 extra_headers=ppc-asm.h
5094 ;;
5095 powerpcle-*-eabi*)
5096 tm_file=rs6000/eabile.h
75bffa71 5097 if test x$gas = xyes
861bb6c1
JL
5098 then
5099 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
5100 else
5101 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5102 fi
5103 fixincludes=Makefile.in
5104 extra_headers=ppc-asm.h
5105 ;;
5106 powerpcle-*-winnt* )
5107 tm_file=rs6000/win-nt.h
5108 tmake_file=rs6000/t-winnt
5109# extra_objs=pe.o
5110 fixincludes=Makefile.in
75bffa71 5111 if test x$enable_threads = xyes; then
861bb6c1
JL
5112 thread_file='win32'
5113 fi
5114 extra_headers=ppc-asm.h
5115 ;;
cae21ae8
GN
5116 powerpcle-*-pe | powerpcle-*-cygwin*)
5117 tm_file=rs6000/cygwin.h
5118 xm_file="rs6000/xm-cygwin.h ${xm_file}"
861bb6c1 5119 tmake_file=rs6000/t-winnt
cae21ae8 5120 xmake_file=rs6000/x-cygwin
861bb6c1
JL
5121# extra_objs=pe.o
5122 fixincludes=Makefile.in
75bffa71 5123 if test x$enable_threads = xyes; then
861bb6c1
JL
5124 thread_file='win32'
5125 fi
5126 exeext=.exe
5127 extra_headers=ppc-asm.h
5128 ;;
5129 powerpcle-*-solaris2*)
5130 tm_file=rs6000/sol2.h
f6cb0e63
JL
5131 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
5132 xm_defines="USG POSIX"
75bffa71 5133 if test x$gas = xyes
861bb6c1
JL
5134 then
5135 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
5136 else
5137 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
5138 fi
5139 xmake_file=rs6000/x-sysv4
f6cb0e63
JL
5140 case $machine in
5141 *-*-solaris2.[0-4])
5142 fixincludes=fixinc.svr4;;
5143 *)
32f65aa0 5144 fixincludes=fixinc.wrap;;
f6cb0e63 5145 esac
861bb6c1
JL
5146 extra_headers=ppc-asm.h
5147 ;;
5148 rs6000-ibm-aix3.[01]*)
5149 tm_file=rs6000/aix31.h
5150 xmake_file=rs6000/x-aix31
5151 use_collect2=yes
5152 ;;
5153 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
5154 tm_file=rs6000/aix3newas.h
75bffa71 5155 if test x$host != x$target
861bb6c1
JL
5156 then
5157 tmake_file=rs6000/t-xnewas
5158 else
5159 tmake_file=rs6000/t-newas
5160 fi
5161 use_collect2=yes
5162 ;;
05cea40f 5163 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
20fced2c 5164 if test "$gnu_ld" = yes
d202e8aa 5165 then
20fced2c
MM
5166 tm_file=rs6000/aix41-gld.h
5167 else
5168 tm_file=rs6000/aix41.h
5169 fi
75bffa71 5170 if test x$host != x$target
861bb6c1
JL
5171 then
5172 tmake_file=rs6000/t-xnewas
5173 else
5174 tmake_file=rs6000/t-newas
5175 fi
0a95276e
JL
5176 xmake_file=rs6000/x-aix41
5177 use_collect2=yes
5178 ;;
5179 rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
5180 tm_file=rs6000/aix43.h
75bffa71 5181 if test x$host != x$target
0a95276e
JL
5182 then
5183 tmake_file=rs6000/t-xaix43
5184 else
5185 tmake_file=rs6000/t-aix43
5186 fi
5187 xmake_file=rs6000/x-aix43
5188 use_collect2=yes
5189 ;;
5190 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
5191 tm_file=rs6000/aix43.h
75bffa71 5192 if test x$host != x$target
0a95276e
JL
5193 then
5194 tmake_file=rs6000/t-xaix43
5195 else
5196 tmake_file=rs6000/t-aix43
5197 fi
5198 xmake_file=rs6000/x-aix43
861bb6c1
JL
5199 use_collect2=yes
5200 ;;
5201 rs6000-ibm-aix*)
5202 use_collect2=yes
5203 ;;
5204 rs6000-bull-bosx)
5205 use_collect2=yes
5206 ;;
5207 rs6000-*-mach*)
5208 tm_file=rs6000/mach.h
f6cb0e63 5209 xm_file="${xm_file} rs6000/xm-mach.h"
861bb6c1
JL
5210 xmake_file=rs6000/x-mach
5211 use_collect2=yes
5212 ;;
5213 rs6000-*-lynxos*)
5214 tm_file=rs6000/lynx.h
5215 xm_file=rs6000/xm-lynx.h
5216 tmake_file=rs6000/t-rs6000
5217 xmake_file=rs6000/x-lynx
5218 use_collect2=yes
5219 ;;
5220 sh-*-elf*)
5221 tm_file=sh/elf.h
5222 float_format=sh
5223 ;;
b098f56d
JS
5224 sh-*-rtemself*)
5225 tmake_file="sh/t-sh t-rtems"
5226 tm_file=sh/rtemself.h
5227 float_format=sh
5228 ;;
5d84b57e
JS
5229 sh-*-rtems*)
5230 tmake_file="sh/t-sh t-rtems"
5231 tm_file=sh/rtems.h
5232 float_format=sh
5233 ;;
861bb6c1
JL
5234 sh-*-*)
5235 float_format=sh
5236 ;;
5237 sparc-tti-*)
5238 tm_file=sparc/pbd.h
f6cb0e63
JL
5239 xm_file="xm-alloca.h ${xm_file}"
5240 xm_defines=USG
861bb6c1
JL
5241 ;;
5242 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
5243 tm_file=sparc/vxsparc.h
5244 tmake_file=sparc/t-vxsparc
5245 use_collect2=yes
7cc34889 5246 thread_file='vxworks'
861bb6c1
JL
5247 ;;
5248 sparc-*-aout*)
5249 tmake_file=sparc/t-sparcbare
5250 tm_file="sparc/aout.h libgloss.h"
5251 ;;
5252 sparc-*-netbsd*)
5253 tm_file=sparc/netbsd.h
be1ed94f 5254 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 5255 fixincludes=fixinc.wrap
861bb6c1
JL
5256 tmake_file=t-netbsd
5257 ;;
1b4a979b
ME
5258 sparc-*-openbsd*)
5259 # we need collect2 until our bug is fixed...
5260 use_collect2=yes
5261 ;;
861bb6c1
JL
5262 sparc-*-bsd*)
5263 tm_file=sparc/bsd.h
5264 ;;
ac52b80b
DE
5265 sparc-*-elf*)
5266 tm_file=sparc/elf.h
5267 tmake_file=sparc/t-elf
5268 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
5269 #float_format=i128
5270 float_format=i64
5271 ;;
956d6950 5272 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
f6cb0e63 5273 xm_file="${xm_file} sparc/xm-linux.h"
861bb6c1
JL
5274 tm_file=sparc/linux-aout.h
5275 xmake_file=x-linux
5276 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1
JL
5277 gnu_ld=yes
5278 ;;
956d6950 5279 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
f6cb0e63 5280 xm_file="${xm_file} sparc/xm-linux.h"
26b551af 5281 xmake_file=x-linux
861bb6c1 5282 tm_file=sparc/linux.h
3e88bbdb 5283 tmake_file="t-linux t-linux-gnulibc1"
861bb6c1
JL
5284 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5285 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1
JL
5286 gnu_ld=yes
5287 ;;
956d6950 5288 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
f6cb0e63 5289 xm_file="${xm_file} sparc/xm-linux.h"
26b551af 5290 xmake_file=x-linux
861bb6c1 5291 tm_file=sparc/linux.h
3e88bbdb 5292 tmake_file="t-linux"
861bb6c1
JL
5293 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5294 fixincludes=Makefile.in #On Linux, the headers are ok already.
861bb6c1 5295 gnu_ld=yes
75bffa71 5296 if test x$enable_threads = xyes; then
861bb6c1
JL
5297 thread_file='posix'
5298 fi
5299 ;;
5300 sparc-*-lynxos*)
75bffa71 5301 if test x$gas = xyes
861bb6c1
JL
5302 then
5303 tm_file=sparc/lynx.h
5304 else
5305 tm_file=sparc/lynx-ng.h
5306 fi
5307 xm_file=sparc/xm-lynx.h
5308 tmake_file=sparc/t-sunos41
5309 xmake_file=x-lynx
5310 ;;
5311 sparc-*-rtems*)
5312 tmake_file="sparc/t-sparcbare t-rtems"
5313 tm_file=sparc/rtems.h
5314 ;;
d559a4db
DM
5315 sparcv9-*-solaris2*)
5316 tm_file=sparc/sol2-sld-64.h
5317 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
5318 xm_defines="USG POSIX"
345a6161 5319 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
d559a4db
DM
5320 xmake_file=sparc/x-sysv4
5321 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
5322 fixincludes=fixinc.wrap
027ea2a7 5323 float_format=none
d7496fbb 5324 if test x${enable_threads} = x ; then
d559a4db 5325 enable_threads=$have_pthread_h
d7496fbb 5326 if test x${enable_threads} = x ; then
d559a4db
DM
5327 enable_threads=$have_thread_h
5328 fi
5329 fi
d7496fbb
DM
5330 if test x${enable_threads} = xyes ; then
5331 if test x${have_pthread_h} = xyes ; then
d559a4db
DM
5332 thread_file='posix'
5333 else
5334 thread_file='solaris'
5335 fi
5336 fi
5337 ;;
ab87f8c8
JL
5338 sparc-hal-solaris2*)
5339 xm_file=sparc/xm-sol2.h
5340 tm_file="sparc/sol2.h sparc/hal.h"
5341 tmake_file="sparc/t-halos sparc/t-sol2"
5342 xmake_file=sparc/x-sysv4
5343 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
5344 fixincludes=fixinc.svr4
5345 broken_install=yes
5346 ;;
861bb6c1 5347 sparc-*-solaris2*)
75bffa71 5348 if test x$gnu_ld = xyes
0a9bdce3
PE
5349 then
5350 tm_file=sparc/sol2.h
5351 else
5352 tm_file=sparc/sol2-sld.h
5353 fi
0b3d64d2
JL
5354 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5355 xm_defines="USG POSIX"
861bb6c1
JL
5356 tmake_file=sparc/t-sol2
5357 xmake_file=sparc/x-sysv4
5358 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
f6cb0e63
JL
5359 case $machine in
5360 *-*-solaris2.[0-4])
027ea2a7
JW
5361 fixincludes=fixinc.svr4
5362 float_format=i128
5363 ;;
f6cb0e63 5364 *)
027ea2a7
JW
5365 fixincludes=fixinc.wrap
5366 float_format=none
5367 ;;
f6cb0e63 5368 esac
75bffa71 5369 if test x${enable_threads} = x; then
f24af81b 5370 enable_threads=$have_pthread_h
75bffa71 5371 if test x${enable_threads} = x; then
f24af81b
TT
5372 enable_threads=$have_thread_h
5373 fi
5374 fi
75bffa71
ILT
5375 if test x${enable_threads} = xyes; then
5376 if test x${have_pthread_h} = xyes; then
f24af81b
TT
5377 thread_file='posix'
5378 else
861bb6c1 5379 thread_file='solaris'
f24af81b 5380 fi
861bb6c1
JL
5381 fi
5382 ;;
5383 sparc-*-sunos4.0*)
5384 tm_file=sparc/sunos4.h
5385 tmake_file=sparc/t-sunos40
5386 use_collect2=yes
5387 ;;
5388 sparc-*-sunos4*)
5389 tm_file=sparc/sunos4.h
5390 tmake_file=sparc/t-sunos41
5391 use_collect2=yes
75bffa71 5392 if test x$gas = xyes; then
ca55abae
JM
5393 tm_file="${tm_file} sparc/sun4gas.h"
5394 fi
861bb6c1
JL
5395 ;;
5396 sparc-*-sunos3*)
5397 tm_file=sparc/sun4o3.h
5398 use_collect2=yes
5399 ;;
5400 sparc-*-sysv4*)
5401 tm_file=sparc/sysv4.h
f6cb0e63
JL
5402 xm_file="xm-siglist.h sparc/xm-sysv4.h"
5403 xm_defines="USG POSIX"
861bb6c1
JL
5404 tmake_file=t-svr4
5405 xmake_file=sparc/x-sysv4
5406 extra_parts="crtbegin.o crtend.o"
5407 ;;
5408 sparc-*-vxsim*)
f5963e61
JL
5409 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
5410 xm_defines="USG POSIX"
861bb6c1
JL
5411 tm_file=sparc/vxsim.h
5412 tmake_file=sparc/t-vxsparc
5413 xmake_file=sparc/x-sysv4
5414 ;;
5415 sparclet-*-aout*)
5416 tm_file="sparc/splet.h libgloss.h"
5417 tmake_file=sparc/t-splet
5418 ;;
5419 sparclite-*-coff*)
5420 tm_file="sparc/litecoff.h libgloss.h"
5421 tmake_file=sparc/t-sparclite
5422 ;;
5423 sparclite-*-aout*)
5424 tm_file="sparc/lite.h aoutos.h libgloss.h"
5425 tmake_file=sparc/t-sparclite
5426 ;;
5427 sparc64-*-aout*)
5428 tmake_file=sparc/t-sp64
5429 tm_file=sparc/sp64-aout.h
5430 ;;
5431 sparc64-*-elf*)
5432 tmake_file=sparc/t-sp64
5433 tm_file=sparc/sp64-elf.h
5434 extra_parts="crtbegin.o crtend.o"
5435 ;;
956d6950 5436 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
345a6161 5437 tmake_file="t-linux sparc/t-linux64"
26b551af
DE
5438 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
5439 tm_file=sparc/linux64.h
5440 xmake_file=x-linux
956d6950 5441 fixincludes=Makefile.in # The headers are ok already.
345a6161 5442 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
26b551af
DE
5443 gnu_ld=yes
5444 ;;
861bb6c1
JL
5445# This hasn't been upgraded to GCC 2.
5446# tahoe-harris-*) # Harris tahoe, using COFF.
5447# tm_file=tahoe/harris.h
5448# ;;
5449# tahoe-*-bsd*) # tahoe running BSD
5450# ;;
e98e406f
NC
5451 thumb-*-coff* | thumbel-*-coff*)
5452 tm_file=arm/tcoff.h
5453 out_file=arm/thumb.c
5454 xm_file=arm/xm-thumb.h
5455 md_file=arm/thumb.md
5456 tmake_file=arm/t-thumb
3ecb16a2 5457 fixincludes=Makefile.in # There is nothing to fix
e98e406f 5458 ;;
861bb6c1
JL
5459# This hasn't been upgraded to GCC 2.
5460# tron-*-*)
5461# cpu_type=gmicro
5462# use_collect2=yes
5463# ;;
f84271d9
JL
5464 v850-*-*)
5465 cpu_type=v850
5466 tm_file="v850/v850.h"
5467 xm_file="v850/xm-v850.h"
62db76ee 5468 tmake_file=v850/t-v850
75bffa71 5469 if test x$stabs = xyes
f84271d9
JL
5470 then
5471 tm_file="${tm_file} dbx.h"
5472 fi
5473 use_collect2=no
5474 ;;
861bb6c1
JL
5475 vax-*-bsd*) # vaxen running BSD
5476 use_collect2=yes
5477 float_format=vax
5478 ;;
5479 vax-*-sysv*) # vaxen running system V
5480 tm_file="${tm_file} vax/vaxv.h"
f6cb0e63 5481 xm_defines=USG
861bb6c1
JL
5482 float_format=vax
5483 ;;
5484 vax-*-netbsd*)
5485 tm_file="${tm_file} netbsd.h vax/netbsd.h"
be1ed94f 5486 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 5487 fixincludes=fixinc.wrap
861bb6c1
JL
5488 tmake_file=t-netbsd
5489 float_format=vax
5490 ;;
1b4a979b
ME
5491 vax-*-openbsd*)
5492 tmake_file="${tm_file} vax/t-openbsd"
5493 ;;
861bb6c1
JL
5494 vax-*-ultrix*) # vaxen running ultrix
5495 tm_file="${tm_file} vax/ultrix.h"
5496 use_collect2=yes
5497 float_format=vax
5498 ;;
5499 vax-*-vms*) # vaxen running VMS
5500 xm_file=vax/xm-vms.h
5501 tm_file=vax/vms.h
5502 float_format=vax
5503 ;;
5504 vax-*-*) # vax default entry
5505 float_format=vax
5506 ;;
5507 we32k-att-sysv*)
5508 xm_file="${xm_file} xm-svr3"
5509 use_collect2=yes
5510 ;;
5511 *)
5512 echo "Configuration $machine not supported" 1>&2
5513 exit 1
5514 ;;
5515 esac
5516
5517 case $machine in
5518 *-*-linux-gnu*)
f6cb0e63 5519 ;; # Existing GNU/Linux systems do not use the GNU setup.
861bb6c1
JL
5520 *-*-gnu*)
5521 # On the GNU system, the setup is just about the same on
5522 # each different CPU. The specific machines that GNU
5523 # supports are matched above and just set $cpu_type.
f6cb0e63 5524 xm_file="xm-gnu.h ${xm_file}"
861bb6c1
JL
5525 tm_file=${cpu_type}/gnu.h
5526 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
5527 # GNU always uses ELF.
5528 elf=yes
5529 # GNU tools are the only tools.
5530 gnu_ld=yes
5531 gas=yes
5532 # On GNU, the headers are already okay.
5533 fixincludes=Makefile.in
5534 xmake_file=x-linux # These details are the same as Linux.
5535 tmake_file=t-gnu # These are not.
5536 ;;
5537 *-*-sysv4*)
5538 fixincludes=fixinc.svr4
5539 xmake_try_sysv=x-sysv
861bb6c1
JL
5540 install_headers_dir=install-headers-cpio
5541 ;;
5542 *-*-sysv*)
861bb6c1
JL
5543 install_headers_dir=install-headers-cpio
5544 ;;
5545 esac
5546
f6cb0e63 5547 # Distinguish i[34567]86
861bb6c1
JL
5548 # Also, do not run mips-tfile on MIPS if using gas.
5549 # Process --with-cpu= for PowerPC/rs6000
5550 target_cpu_default2=
5551 case $machine in
5552 i486-*-*)
5553 target_cpu_default2=1
5554 ;;
5555 i586-*-*)
5556 target_cpu_default2=2
5557 ;;
f6cb0e63 5558 i686-*-* | i786-*-*)
861bb6c1
JL
5559 target_cpu_default2=3
5560 ;;
5561 alpha*-*-*)
5562 case $machine in
e9a25f70 5563 alphaev6*)
44e95b19 5564 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_CIX|MASK_MAX"
e9a25f70
JL
5565 ;;
5566 alphapca56*)
fbb5ed67 5567 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
e9a25f70 5568 ;;
861bb6c1 5569 alphaev56*)
e9a25f70 5570 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
861bb6c1
JL
5571 ;;
5572 alphaev5*)
5573 target_cpu_default2="MASK_CPU_EV5"
5574 ;;
5575 esac
5576
75bffa71 5577 if test x$gas = xyes
861bb6c1 5578 then
75bffa71 5579 if test "$target_cpu_default2" = ""
861bb6c1
JL
5580 then
5581 target_cpu_default2="MASK_GAS"
5582 else
5583 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
5584 fi
5585 fi
5586 ;;
956d6950
JL
5587 arm*-*-*)
5588 case "x$with_cpu" in
5589 x)
5590 # The most generic
5591 target_cpu_default2="TARGET_CPU_generic"
5592 ;;
5593
5594 # Distinguish cores, and major variants
5595 # arm7m doesn't exist, but D & I don't affect code
5596 xarm23678 | xarm250 | xarm67010 \
5597 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
5598 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
4525d757 5599 | xstrongarm | xstrongarm110 | xstrongarm1100)
956d6950
JL
5600 target_cpu_default2="TARGET_CPU_$with_cpu"
5601 ;;
5602
5603 xyes | xno)
5604 echo "--with-cpu must be passed a value" 1>&2
5605 exit 1
5606 ;;
5607
5608 *)
75bffa71 5609 if test x$pass2done = xyes
956d6950
JL
5610 then
5611 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5612 exit 1
5613 fi
5614 ;;
5615 esac
5616 ;;
5617
861bb6c1 5618 mips*-*-ecoff* | mips*-*-elf*)
75bffa71 5619 if test x$gas = xyes
861bb6c1 5620 then
75bffa71 5621 if test x$gnu_ld = xyes
861bb6c1
JL
5622 then
5623 target_cpu_default2=20
5624 else
5625 target_cpu_default2=16
5626 fi
5627 fi
5628 ;;
5629 mips*-*-*)
75bffa71 5630 if test x$gas = xyes
861bb6c1
JL
5631 then
5632 target_cpu_default2=16
5633 fi
5634 ;;
5635 powerpc*-*-* | rs6000-*-*)
5636 case "x$with_cpu" in
5637 x)
5638 ;;
5639
5640 xcommon | xpower | xpower2 | xpowerpc | xrios \
5641 | xrios1 | xrios2 | xrsc | xrsc1 \
5642 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
507ba956 5643 | xec603e | x740 | x750 | x401 \
861bb6c1 5644 | x403 | x505 | x801 | x821 | x823 | x860)
f24b370a 5645 target_cpu_default2="\"$with_cpu\""
861bb6c1
JL
5646 ;;
5647
5648 xyes | xno)
5649 echo "--with-cpu must be passed a value" 1>&2
5650 exit 1
5651 ;;
5652
5653 *)
75bffa71 5654 if test x$pass2done = xyes
956d6950
JL
5655 then
5656 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5657 exit 1
5658 fi
861bb6c1
JL
5659 ;;
5660 esac
5661 ;;
5662 sparc*-*-*)
5663 case ".$with_cpu" in
5664 .)
5665 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
5666 ;;
8947065c 5667 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
861bb6c1
JL
5668 target_cpu_default2="TARGET_CPU_$with_cpu"
5669 ;;
5670 *)
75bffa71 5671 if test x$pass2done = xyes
956d6950
JL
5672 then
5673 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
5674 exit 1
5675 fi
861bb6c1
JL
5676 ;;
5677 esac
5678 ;;
5679 esac
5680
75bffa71 5681 if test "$target_cpu_default2" != ""
861bb6c1 5682 then
75bffa71 5683 if test "$target_cpu_default" != ""
861bb6c1
JL
5684 then
5685 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5686 else
5687 target_cpu_default=$target_cpu_default2
5688 fi
5689 fi
5690
5691 # No need for collect2 if we have the GNU linker.
d460fb3c
JM
5692 # Actually, there is now; GNU ld doesn't handle the EH info or
5693 # collecting for shared libraries.
ca8c3b37
JM
5694 #case x$gnu_ld in
5695 #xyes)
5696 # use_collect2=
5697 # ;;
5698 #esac
861bb6c1
JL
5699
5700# Save data on machine being used to compile GCC in build_xm_file.
5701# Save data on host machine in vars host_xm_file and host_xmake_file.
75bffa71 5702 if test x$pass1done = x
861bb6c1 5703 then
75bffa71 5704 if test x"$xm_file" = x
861bb6c1
JL
5705 then build_xm_file=$cpu_type/xm-$cpu_type.h
5706 else build_xm_file=$xm_file
5707 fi
f6cb0e63 5708 build_xm_defines=$xm_defines
861bb6c1
JL
5709 build_install_headers_dir=$install_headers_dir
5710 build_exeext=$exeext
5711 pass1done=yes
5712 else
75bffa71 5713 if test x$pass2done = x
861bb6c1 5714 then
75bffa71 5715 if test x"$xm_file" = x
861bb6c1
JL
5716 then host_xm_file=$cpu_type/xm-$cpu_type.h
5717 else host_xm_file=$xm_file
5718 fi
f6cb0e63 5719 host_xm_defines=$xm_defines
75bffa71 5720 if test x"$xmake_file" = x
861bb6c1
JL
5721 then xmake_file=$cpu_type/x-$cpu_type
5722 fi
5723 host_xmake_file="$xmake_file"
5724 host_truncate_target=$truncate_target
5725 host_extra_gcc_objs=$extra_gcc_objs
5726 host_extra_objs=$extra_host_objs
6e26218f 5727 host_exeext=$exeext
861bb6c1
JL
5728 pass2done=yes
5729 fi
5730 fi
5731done
5732
5733extra_objs="${host_extra_objs} ${extra_objs}"
5734
5735# Default the target-machine variables that were not explicitly set.
75bffa71 5736if test x"$tm_file" = x
861bb6c1
JL
5737then tm_file=$cpu_type/$cpu_type.h; fi
5738
75bffa71 5739if test x$extra_headers = x
861bb6c1
JL
5740then extra_headers=; fi
5741
75bffa71 5742if test x"$xm_file" = x
861bb6c1
JL
5743then xm_file=$cpu_type/xm-$cpu_type.h; fi
5744
75bffa71 5745if test x$md_file = x
e98e406f 5746then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 5747
75bffa71 5748if test x$out_file = x
861bb6c1
JL
5749then out_file=$cpu_type/$cpu_type.c; fi
5750
75bffa71 5751if test x"$tmake_file" = x
861bb6c1
JL
5752then tmake_file=$cpu_type/t-$cpu_type
5753fi
5754
90e6a802
RL
5755if test x"$dwarf2" = xyes
5756then tm_file="tm-dwarf2.h $tm_file"
5757fi
5758
75bffa71 5759if test x$float_format = x
861bb6c1
JL
5760then float_format=i64
5761fi
5762
027ea2a7
JW
5763if test $float_format = none
5764then float_h_file=Makefile.in
5765else float_h_file=float-$float_format.h
5766fi
5767
75bffa71 5768if test x$enable_haifa = x
128f7968
RH
5769then
5770 case $target in
18cae839 5771 alpha*-* | hppa*-* | powerpc*-* | rs6000-* | *sparc*-* | m32r*-*)
128f7968
RH
5772 enable_haifa=yes;;
5773 esac
5774fi
5775
9fc9b82a
L
5776# Handle cpp installation.
5777if [ x$enable_cpp != x ]
5778then
5779 tmake_file="$tmake_file t-install-cpp"
5780fi
5781
861bb6c1
JL
5782# Say what files are being used for the output code and MD file.
5783echo "Using \`$srcdir/config/$out_file' to output insns."
5784echo "Using \`$srcdir/config/$md_file' as machine description file."
5785
5786count=a
5787for f in $tm_file; do
5788 count=${count}x
5789done
75bffa71 5790if test $count = ax; then
861bb6c1
JL
5791 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5792else
5793 echo "Using the following target machine macro files:"
5794 for f in $tm_file; do
5795 echo " $srcdir/config/$f"
5796 done
5797fi
5798
5799count=a
5800for f in $host_xm_file; do
5801 count=${count}x
5802done
75bffa71 5803if test $count = ax; then
861bb6c1
JL
5804 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5805else
5806 echo "Using the following host machine macro files:"
5807 for f in $host_xm_file; do
5808 echo " $srcdir/config/$f"
5809 done
5810fi
5811
75bffa71 5812if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
5813 count=a
5814 for f in $build_xm_file; do
5815 count=${count}x
5816 done
75bffa71 5817 if test $count = ax; then
861bb6c1
JL
5818 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5819 else
5820 echo "Using the following build machine macro files:"
5821 for f in $build_xm_file; do
5822 echo " $srcdir/config/$f"
5823 done
5824 fi
5825fi
5826
75bffa71
ILT
5827if test x$thread_file = x; then
5828 if test x$target_thread_file != x; then
a851212a
JW
5829 thread_file=$target_thread_file
5830 else
5831 thread_file='single'
5832 fi
861bb6c1
JL
5833fi
5834
5835# Set up the header files.
5836# $links is the list of header files to create.
5837# $vars is the list of shell variables with file names to include.
b7cb92ad 5838# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 5839# the first file included by config.h.
f6cb0e63 5840null_defines=
0056a9b5 5841host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
db81d74a 5842
b7cb92ad 5843# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
5844# as well. If host!=build, we are in error and need to do more
5845# work to find out the build config parameters.
75bffa71 5846if test x$host = x$build
db81d74a 5847then
0056a9b5 5848 build_xm_file="auto-host.h gansidecl.h ${build_xm_file}"
b7cb92ad
JL
5849else
5850 # We create a subdir, then run autoconf in the subdir.
5851 # To prevent recursion we set host and build for the new
5852 # invocation of configure to the build for this invocation
5853 # of configure.
5854 tempdir=build.$$
5855 rm -rf $tempdir
5856 mkdir $tempdir
5857 cd $tempdir
5858 case ${srcdir} in
5859 /*) realsrcdir=${srcdir};;
5860 *) realsrcdir=../${srcdir};;
5861 esac
fe81dd69 5862 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
b7cb92ad
JL
5863 --target=$target --host=$build --build=$build
5864
5865 # We just finished tests for the build machine, so rename
5866 # the file auto-build.h in the gcc directory.
5867 mv auto-host.h ../auto-build.h
5868 cd ..
5869 rm -rf $tempdir
0056a9b5 5870 build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
db81d74a
RH
5871fi
5872
0056a9b5
KG
5873xm_file="gansidecl.h ${xm_file}"
5874tm_file="gansidecl.h ${tm_file}"
5875
861bb6c1 5876vars="host_xm_file tm_file xm_file build_xm_file"
e9a25f70 5877links="config.h tm.h tconfig.h hconfig.h"
f6cb0e63 5878defines="host_xm_defines null_defines xm_defines build_xm_defines"
861bb6c1
JL
5879
5880rm -f config.bak
75bffa71 5881if test -f config.status; then mv -f config.status config.bak; fi
861bb6c1
JL
5882
5883# Make the links.
75bffa71 5884while test -n "$vars"
861bb6c1 5885do
861bb6c1
JL
5886 set $vars; var=$1; shift; vars=$*
5887 set $links; link=$1; shift; links=$*
f6cb0e63 5888 set $defines; define=$1; shift; defines=$*
861bb6c1
JL
5889
5890 rm -f $link
5891
5892 # Define TARGET_CPU_DEFAULT if the system wants one.
5893 # This substitutes for lots of *.h files.
75bffa71 5894 if test "$target_cpu_default" != "" -a $link = tm.h
861bb6c1 5895 then
8fbf199e 5896 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
861bb6c1
JL
5897 fi
5898
5899 for file in `eval echo '$'$var`; do
ab87f8c8
JL
5900 case $file in
5901 auto-config.h)
5902 ;;
5903 *)
5904 echo '#ifdef IN_GCC' >>$link
5905 ;;
5906 esac
861bb6c1 5907 echo "#include \"$file\"" >>$link
ab87f8c8
JL
5908 case $file in
5909 auto-config.h)
5910 ;;
5911 *)
5912 echo '#endif' >>$link
5913 ;;
5914 esac
861bb6c1 5915 done
f6cb0e63
JL
5916
5917 for def in `eval echo '$'$define`; do
5918 echo "#ifndef $def" >>$link
5919 echo "#define $def" >>$link
5920 echo "#endif" >>$link
5921 done
861bb6c1
JL
5922done
5923
5924# Truncate the target if necessary
75bffa71 5925if test x$host_truncate_target != x; then
861bb6c1
JL
5926 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5927fi
5928
f1943b77 5929# Get the version trigger filename from the toplevel
75bffa71 5930if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
5931 gcc_version_trigger=$with_gcc_version_trigger
5932else
5933 gcc_version_trigger=${srcdir}/version.c
5934fi
5935gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
861bb6c1 5936
ab87f8c8
JL
5937# Internationalization
5938PACKAGE=gcc
5939VERSION="$gcc_version"
5940cat >> confdefs.h <<EOF
5941#define PACKAGE "$PACKAGE"
5942EOF
861bb6c1 5943
ab87f8c8
JL
5944cat >> confdefs.h <<EOF
5945#define VERSION "$VERSION"
5946EOF
861bb6c1 5947
861bb6c1 5948
ab87f8c8
JL
5949
5950
5951ALL_LINGUAS="en_UK"
5952
5953# NLS support is still experimental, so disable it by default for now.
5954# Check whether --enable-nls or --disable-nls was given.
5955if test "${enable_nls+set}" = set; then
5956 enableval="$enable_nls"
5957 :
861bb6c1 5958else
ab87f8c8 5959 enable_nls=no
861bb6c1 5960fi
861bb6c1 5961
861bb6c1 5962
861bb6c1 5963
ab87f8c8 5964 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4525d757 5965echo "configure:5966: checking for strerror in -lcposix" >&5
ab87f8c8
JL
5966ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
5967if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5968 echo $ac_n "(cached) $ac_c" 1>&6
5969else
5970 ac_save_LIBS="$LIBS"
5971LIBS="-lcposix $LIBS"
5972cat > conftest.$ac_ext <<EOF
4525d757 5973#line 5974 "configure"
ab87f8c8
JL
5974#include "confdefs.h"
5975/* Override any gcc2 internal prototype to avoid an error. */
5976/* We use char because int might match the return type of a gcc2
5977 builtin and then its argument prototype would still apply. */
5978char strerror();
861bb6c1 5979
ab87f8c8
JL
5980int main() {
5981strerror()
5982; return 0; }
5983EOF
4525d757 5984if { (eval echo configure:5985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5985 rm -rf conftest*
5986 eval "ac_cv_lib_$ac_lib_var=yes"
5987else
5988 echo "configure: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
5990 rm -rf conftest*
5991 eval "ac_cv_lib_$ac_lib_var=no"
861bb6c1 5992fi
ab87f8c8
JL
5993rm -f conftest*
5994LIBS="$ac_save_LIBS"
861bb6c1 5995
861bb6c1 5996fi
ab87f8c8
JL
5997if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5998 echo "$ac_t""yes" 1>&6
5999 LIBS="$LIBS -lcposix"
861bb6c1 6000else
ab87f8c8 6001 echo "$ac_t""no" 1>&6
861bb6c1
JL
6002fi
6003
ab87f8c8 6004
2ce3c6c6 6005
ab87f8c8 6006echo $ac_n "checking for working const""... $ac_c" 1>&6
4525d757 6007echo "configure:6008: checking for working const" >&5
ab87f8c8
JL
6008if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6009 echo $ac_n "(cached) $ac_c" 1>&6
861bb6c1 6010else
ab87f8c8 6011 cat > conftest.$ac_ext <<EOF
4525d757 6012#line 6013 "configure"
ab87f8c8 6013#include "confdefs.h"
861bb6c1 6014
ab87f8c8
JL
6015int main() {
6016
6017/* Ultrix mips cc rejects this. */
6018typedef int charset[2]; const charset x;
6019/* SunOS 4.1.1 cc rejects this. */
6020char const *const *ccp;
6021char **p;
6022/* NEC SVR4.0.2 mips cc rejects this. */
6023struct point {int x, y;};
6024static struct point const zero = {0,0};
6025/* AIX XL C 1.02.0.0 rejects this.
6026 It does not let you subtract one const X* pointer from another in an arm
6027 of an if-expression whose if-part is not a constant expression */
6028const char *g = "string";
6029ccp = &g + (g ? g-g : 0);
6030/* HPUX 7.0 cc rejects these. */
6031++ccp;
6032p = (char**) ccp;
6033ccp = (char const *const *) p;
6034{ /* SCO 3.2v4 cc rejects this. */
6035 char *t;
6036 char const *s = 0 ? (char *) 0 : (char const *) 0;
6037
6038 *t++ = 0;
6039}
6040{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6041 int x[] = {25, 17};
6042 const int *foo = &x[0];
6043 ++foo;
6044}
6045{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6046 typedef const int *iptr;
6047 iptr p = 0;
6048 ++p;
6049}
6050{ /* AIX XL C 1.02.0.0 rejects this saying
6051 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6052 struct s { int j; const int *ap[3]; };
6053 struct s *b; b->j = 5;
6054}
6055{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6056 const int foo = 10;
6057}
6058
6059; return 0; }
6060EOF
4525d757 6061if { (eval echo configure:6062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab87f8c8
JL
6062 rm -rf conftest*
6063 ac_cv_c_const=yes
861bb6c1 6064else
ab87f8c8
JL
6065 echo "configure: failed program was:" >&5
6066 cat conftest.$ac_ext >&5
6067 rm -rf conftest*
6068 ac_cv_c_const=no
6069fi
6070rm -f conftest*
861bb6c1
JL
6071fi
6072
ab87f8c8
JL
6073echo "$ac_t""$ac_cv_c_const" 1>&6
6074if test $ac_cv_c_const = no; then
6075 cat >> confdefs.h <<\EOF
6076#define const
6077EOF
6078
861bb6c1
JL
6079fi
6080
ab87f8c8 6081echo $ac_n "checking for inline""... $ac_c" 1>&6
4525d757 6082echo "configure:6083: checking for inline" >&5
ab87f8c8
JL
6083if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
6084 echo $ac_n "(cached) $ac_c" 1>&6
6085else
6086 ac_cv_c_inline=no
6087for ac_kw in inline __inline__ __inline; do
6088 cat > conftest.$ac_ext <<EOF
4525d757 6089#line 6090 "configure"
ab87f8c8
JL
6090#include "confdefs.h"
6091
6092int main() {
6093} $ac_kw foo() {
6094; return 0; }
6095EOF
4525d757 6096if { (eval echo configure:6097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab87f8c8
JL
6097 rm -rf conftest*
6098 ac_cv_c_inline=$ac_kw; break
6099else
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
4b95eb49 6102fi
ab87f8c8
JL
6103rm -f conftest*
6104done
4b95eb49 6105
992d1248 6106fi
861bb6c1 6107
ab87f8c8
JL
6108echo "$ac_t""$ac_cv_c_inline" 1>&6
6109case "$ac_cv_c_inline" in
6110 inline | yes) ;;
6111 no) cat >> confdefs.h <<\EOF
6112#define inline
00ccc16d 6113EOF
ab87f8c8
JL
6114 ;;
6115 *) cat >> confdefs.h <<EOF
6116#define inline $ac_cv_c_inline
6117EOF
6118 ;;
6119esac
6120
6121echo $ac_n "checking for off_t""... $ac_c" 1>&6
4525d757 6122echo "configure:6123: checking for off_t" >&5
ab87f8c8
JL
6123if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6124 echo $ac_n "(cached) $ac_c" 1>&6
6125else
6126 cat > conftest.$ac_ext <<EOF
4525d757 6127#line 6128 "configure"
ab87f8c8
JL
6128#include "confdefs.h"
6129#include <sys/types.h>
6130#if STDC_HEADERS
6131#include <stdlib.h>
6132#include <stddef.h>
6133#endif
6134EOF
6135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4525d757 6136 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8
JL
6137 rm -rf conftest*
6138 ac_cv_type_off_t=yes
6139else
6140 rm -rf conftest*
6141 ac_cv_type_off_t=no
6142fi
6143rm -f conftest*
6144
6145fi
6146echo "$ac_t""$ac_cv_type_off_t" 1>&6
6147if test $ac_cv_type_off_t = no; then
6148 cat >> confdefs.h <<\EOF
6149#define off_t long
6150EOF
6151
6152fi
6153
6154echo $ac_n "checking for size_t""... $ac_c" 1>&6
4525d757 6155echo "configure:6156: checking for size_t" >&5
ab87f8c8
JL
6156if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6157 echo $ac_n "(cached) $ac_c" 1>&6
6158else
6159 cat > conftest.$ac_ext <<EOF
4525d757 6160#line 6161 "configure"
ab87f8c8
JL
6161#include "confdefs.h"
6162#include <sys/types.h>
6163#if STDC_HEADERS
6164#include <stdlib.h>
6165#include <stddef.h>
6166#endif
6167EOF
6168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4525d757 6169 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8
JL
6170 rm -rf conftest*
6171 ac_cv_type_size_t=yes
6172else
6173 rm -rf conftest*
6174 ac_cv_type_size_t=no
6175fi
6176rm -f conftest*
6177
6178fi
6179echo "$ac_t""$ac_cv_type_size_t" 1>&6
6180if test $ac_cv_type_size_t = no; then
6181 cat >> confdefs.h <<\EOF
6182#define size_t unsigned
6183EOF
6184
6185fi
6186
6187# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6188# for constant arguments. Useless!
6189echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4525d757 6190echo "configure:6191: checking for working alloca.h" >&5
ab87f8c8
JL
6191if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6192 echo $ac_n "(cached) $ac_c" 1>&6
6193else
6194 cat > conftest.$ac_ext <<EOF
4525d757 6195#line 6196 "configure"
ab87f8c8
JL
6196#include "confdefs.h"
6197#include <alloca.h>
6198int main() {
6199char *p = alloca(2 * sizeof(int));
6200; return 0; }
6201EOF
4525d757 6202if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6203 rm -rf conftest*
6204 ac_cv_header_alloca_h=yes
6205else
6206 echo "configure: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 rm -rf conftest*
6209 ac_cv_header_alloca_h=no
6210fi
6211rm -f conftest*
6212fi
6213
6214echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6215if test $ac_cv_header_alloca_h = yes; then
6216 cat >> confdefs.h <<\EOF
6217#define HAVE_ALLOCA_H 1
6218EOF
6219
6220fi
6221
6222echo $ac_n "checking for alloca""... $ac_c" 1>&6
4525d757 6223echo "configure:6224: checking for alloca" >&5
ab87f8c8
JL
6224if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6225 echo $ac_n "(cached) $ac_c" 1>&6
6226else
6227 cat > conftest.$ac_ext <<EOF
4525d757 6228#line 6229 "configure"
ab87f8c8
JL
6229#include "confdefs.h"
6230
6231#ifdef __GNUC__
6232# define alloca __builtin_alloca
6233#else
cd9e5e7c
MK
6234# ifdef _MSC_VER
6235# include <malloc.h>
6236# define alloca _alloca
ab87f8c8 6237# else
cd9e5e7c
MK
6238# if HAVE_ALLOCA_H
6239# include <alloca.h>
3723cad9 6240# else
cd9e5e7c
MK
6241# ifdef _AIX
6242 #pragma alloca
6243# else
6244# ifndef alloca /* predefined by HP cc +Olibcalls */
ab87f8c8 6245char *alloca ();
cd9e5e7c 6246# endif
ab87f8c8
JL
6247# endif
6248# endif
6249# endif
6250#endif
6251
6252int main() {
6253char *p = (char *) alloca(1);
6254; return 0; }
6255EOF
4525d757 6256if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6257 rm -rf conftest*
6258 ac_cv_func_alloca_works=yes
6259else
6260 echo "configure: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 rm -rf conftest*
6263 ac_cv_func_alloca_works=no
6264fi
6265rm -f conftest*
6266fi
6267
6268echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6269if test $ac_cv_func_alloca_works = yes; then
6270 cat >> confdefs.h <<\EOF
6271#define HAVE_ALLOCA 1
6272EOF
6273
6274fi
6275
6276if test $ac_cv_func_alloca_works = no; then
6277 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6278 # that cause trouble. Some versions do not even contain alloca or
6279 # contain a buggy version. If you still want to use their alloca,
6280 # use ar to extract alloca.o from them instead of compiling alloca.c.
cd9e5e7c 6281 ALLOCA=alloca.${ac_objext}
ab87f8c8
JL
6282 cat >> confdefs.h <<\EOF
6283#define C_ALLOCA 1
6284EOF
6285
6286
6287echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4525d757 6288echo "configure:6289: checking whether alloca needs Cray hooks" >&5
ab87f8c8
JL
6289if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6290 echo $ac_n "(cached) $ac_c" 1>&6
6291else
6292 cat > conftest.$ac_ext <<EOF
4525d757 6293#line 6294 "configure"
ab87f8c8
JL
6294#include "confdefs.h"
6295#if defined(CRAY) && ! defined(CRAY2)
6296webecray
6297#else
6298wenotbecray
6299#endif
6300
6301EOF
6302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6303 egrep "webecray" >/dev/null 2>&1; then
6304 rm -rf conftest*
6305 ac_cv_os_cray=yes
6306else
6307 rm -rf conftest*
6308 ac_cv_os_cray=no
6309fi
6310rm -f conftest*
6311
6312fi
6313
6314echo "$ac_t""$ac_cv_os_cray" 1>&6
6315if test $ac_cv_os_cray = yes; then
6316for ac_func in _getb67 GETB67 getb67; do
6317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 6318echo "configure:6319: checking for $ac_func" >&5
ab87f8c8
JL
6319if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6320 echo $ac_n "(cached) $ac_c" 1>&6
6321else
6322 cat > conftest.$ac_ext <<EOF
4525d757 6323#line 6324 "configure"
ab87f8c8
JL
6324#include "confdefs.h"
6325/* System header to define __stub macros and hopefully few prototypes,
6326 which can conflict with char $ac_func(); below. */
6327#include <assert.h>
6328/* Override any gcc2 internal prototype to avoid an error. */
6329/* We use char because int might match the return type of a gcc2
6330 builtin and then its argument prototype would still apply. */
6331char $ac_func();
6332
6333int main() {
6334
6335/* The GNU C library defines this for functions which it implements
6336 to always fail with ENOSYS. Some functions are actually named
6337 something starting with __ and the normal name is an alias. */
6338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6339choke me
6340#else
027ea2a7 6341$ac_func();
ab87f8c8
JL
6342#endif
6343
6344; return 0; }
6345EOF
4525d757 6346if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6347 rm -rf conftest*
6348 eval "ac_cv_func_$ac_func=yes"
6349else
6350 echo "configure: failed program was:" >&5
6351 cat conftest.$ac_ext >&5
6352 rm -rf conftest*
6353 eval "ac_cv_func_$ac_func=no"
6354fi
6355rm -f conftest*
6356fi
6357
6358if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6359 echo "$ac_t""yes" 1>&6
6360 cat >> confdefs.h <<EOF
6361#define CRAY_STACKSEG_END $ac_func
6362EOF
6363
6364 break
6365else
6366 echo "$ac_t""no" 1>&6
6367fi
6368
6369done
6370fi
6371
6372echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4525d757 6373echo "configure:6374: checking stack direction for C alloca" >&5
ab87f8c8
JL
6374if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6375 echo $ac_n "(cached) $ac_c" 1>&6
6376else
6377 if test "$cross_compiling" = yes; then
6378 ac_cv_c_stack_direction=0
6379else
6380 cat > conftest.$ac_ext <<EOF
4525d757 6381#line 6382 "configure"
ab87f8c8
JL
6382#include "confdefs.h"
6383find_stack_direction ()
6384{
6385 static char *addr = 0;
6386 auto char dummy;
6387 if (addr == 0)
6388 {
6389 addr = &dummy;
6390 return find_stack_direction ();
6391 }
6392 else
6393 return (&dummy > addr) ? 1 : -1;
6394}
6395main ()
6396{
6397 exit (find_stack_direction() < 0);
6398}
6399EOF
4525d757 6400if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ab87f8c8
JL
6401then
6402 ac_cv_c_stack_direction=1
6403else
6404 echo "configure: failed program was:" >&5
6405 cat conftest.$ac_ext >&5
6406 rm -fr conftest*
6407 ac_cv_c_stack_direction=-1
6408fi
6409rm -fr conftest*
6410fi
6411
6412fi
6413
6414echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6415cat >> confdefs.h <<EOF
6416#define STACK_DIRECTION $ac_cv_c_stack_direction
6417EOF
6418
6419fi
6420
6421for ac_hdr in unistd.h
6422do
6423ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6424echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4525d757 6425echo "configure:6426: checking for $ac_hdr" >&5
ab87f8c8
JL
6426if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6427 echo $ac_n "(cached) $ac_c" 1>&6
6428else
6429 cat > conftest.$ac_ext <<EOF
4525d757 6430#line 6431 "configure"
ab87f8c8
JL
6431#include "confdefs.h"
6432#include <$ac_hdr>
6433EOF
6434ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 6435{ (eval echo configure:6436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 6436ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
6437if test -z "$ac_err"; then
6438 rm -rf conftest*
6439 eval "ac_cv_header_$ac_safe=yes"
6440else
6441 echo "$ac_err" >&5
6442 echo "configure: failed program was:" >&5
6443 cat conftest.$ac_ext >&5
6444 rm -rf conftest*
6445 eval "ac_cv_header_$ac_safe=no"
6446fi
6447rm -f conftest*
6448fi
6449if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6450 echo "$ac_t""yes" 1>&6
6451 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6452 cat >> confdefs.h <<EOF
6453#define $ac_tr_hdr 1
6454EOF
6455
6456else
6457 echo "$ac_t""no" 1>&6
6458fi
6459done
6460
6461for ac_func in getpagesize
6462do
6463echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 6464echo "configure:6465: checking for $ac_func" >&5
ab87f8c8
JL
6465if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6466 echo $ac_n "(cached) $ac_c" 1>&6
6467else
6468 cat > conftest.$ac_ext <<EOF
4525d757 6469#line 6470 "configure"
ab87f8c8
JL
6470#include "confdefs.h"
6471/* System header to define __stub macros and hopefully few prototypes,
6472 which can conflict with char $ac_func(); below. */
6473#include <assert.h>
6474/* Override any gcc2 internal prototype to avoid an error. */
6475/* We use char because int might match the return type of a gcc2
6476 builtin and then its argument prototype would still apply. */
6477char $ac_func();
6478
6479int main() {
6480
6481/* The GNU C library defines this for functions which it implements
6482 to always fail with ENOSYS. Some functions are actually named
6483 something starting with __ and the normal name is an alias. */
6484#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6485choke me
6486#else
027ea2a7 6487$ac_func();
ab87f8c8
JL
6488#endif
6489
6490; return 0; }
6491EOF
4525d757 6492if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6493 rm -rf conftest*
6494 eval "ac_cv_func_$ac_func=yes"
6495else
6496 echo "configure: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6498 rm -rf conftest*
6499 eval "ac_cv_func_$ac_func=no"
6500fi
6501rm -f conftest*
6502fi
6503
6504if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6505 echo "$ac_t""yes" 1>&6
6506 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6507 cat >> confdefs.h <<EOF
6508#define $ac_tr_func 1
6509EOF
6510
6511else
6512 echo "$ac_t""no" 1>&6
6513fi
6514done
6515
6516echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4525d757 6517echo "configure:6518: checking for working mmap" >&5
ab87f8c8
JL
6518if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6519 echo $ac_n "(cached) $ac_c" 1>&6
6520else
6521 if test "$cross_compiling" = yes; then
6522 ac_cv_func_mmap_fixed_mapped=no
6523else
6524 cat > conftest.$ac_ext <<EOF
4525d757 6525#line 6526 "configure"
ab87f8c8
JL
6526#include "confdefs.h"
6527
6528/* Thanks to Mike Haertel and Jim Avera for this test.
6529 Here is a matrix of mmap possibilities:
6530 mmap private not fixed
6531 mmap private fixed at somewhere currently unmapped
6532 mmap private fixed at somewhere already mapped
6533 mmap shared not fixed
6534 mmap shared fixed at somewhere currently unmapped
6535 mmap shared fixed at somewhere already mapped
6536 For private mappings, we should verify that changes cannot be read()
6537 back from the file, nor mmap's back from the file at a different
6538 address. (There have been systems where private was not correctly
6539 implemented like the infamous i386 svr4.0, and systems where the
6540 VM page cache was not coherent with the filesystem buffer cache
6541 like early versions of FreeBSD and possibly contemporary NetBSD.)
6542 For shared mappings, we should conversely verify that changes get
6543 propogated back to all the places they're supposed to be.
6544
6545 Grep wants private fixed already mapped.
6546 The main things grep needs to know about mmap are:
6547 * does it exist and is it safe to write into the mmap'd area
6548 * how to use it (BSD variants) */
6549#include <sys/types.h>
6550#include <fcntl.h>
6551#include <sys/mman.h>
6552
6553/* This mess was copied from the GNU getpagesize.h. */
6554#ifndef HAVE_GETPAGESIZE
6555# ifdef HAVE_UNISTD_H
6556# include <unistd.h>
6557# endif
6558
6559/* Assume that all systems that can run configure have sys/param.h. */
6560# ifndef HAVE_SYS_PARAM_H
6561# define HAVE_SYS_PARAM_H 1
6562# endif
6563
6564# ifdef _SC_PAGESIZE
6565# define getpagesize() sysconf(_SC_PAGESIZE)
6566# else /* no _SC_PAGESIZE */
6567# ifdef HAVE_SYS_PARAM_H
6568# include <sys/param.h>
6569# ifdef EXEC_PAGESIZE
6570# define getpagesize() EXEC_PAGESIZE
6571# else /* no EXEC_PAGESIZE */
6572# ifdef NBPG
6573# define getpagesize() NBPG * CLSIZE
6574# ifndef CLSIZE
6575# define CLSIZE 1
6576# endif /* no CLSIZE */
6577# else /* no NBPG */
6578# ifdef NBPC
6579# define getpagesize() NBPC
6580# else /* no NBPC */
6581# ifdef PAGESIZE
6582# define getpagesize() PAGESIZE
6583# endif /* PAGESIZE */
6584# endif /* no NBPC */
6585# endif /* no NBPG */
6586# endif /* no EXEC_PAGESIZE */
6587# else /* no HAVE_SYS_PARAM_H */
6588# define getpagesize() 8192 /* punt totally */
6589# endif /* no HAVE_SYS_PARAM_H */
6590# endif /* no _SC_PAGESIZE */
6591
6592#endif /* no HAVE_GETPAGESIZE */
6593
6594#ifdef __cplusplus
6595extern "C" { void *malloc(unsigned); }
6596#else
6597char *malloc();
6598#endif
6599
6600int
6601main()
6602{
6603 char *data, *data2, *data3;
6604 int i, pagesize;
6605 int fd;
6606
6607 pagesize = getpagesize();
6608
6609 /*
6610 * First, make a file with some known garbage in it.
6611 */
6612 data = malloc(pagesize);
6613 if (!data)
6614 exit(1);
6615 for (i = 0; i < pagesize; ++i)
6616 *(data + i) = rand();
6617 umask(0);
6618 fd = creat("conftestmmap", 0600);
6619 if (fd < 0)
6620 exit(1);
6621 if (write(fd, data, pagesize) != pagesize)
6622 exit(1);
6623 close(fd);
6624
6625 /*
6626 * Next, try to mmap the file at a fixed address which
6627 * already has something else allocated at it. If we can,
6628 * also make sure that we see the same garbage.
6629 */
6630 fd = open("conftestmmap", O_RDWR);
6631 if (fd < 0)
6632 exit(1);
6633 data2 = malloc(2 * pagesize);
6634 if (!data2)
6635 exit(1);
6636 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6637 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6638 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6639 exit(1);
6640 for (i = 0; i < pagesize; ++i)
6641 if (*(data + i) != *(data2 + i))
6642 exit(1);
6643
6644 /*
6645 * Finally, make sure that changes to the mapped area
6646 * do not percolate back to the file as seen by read().
6647 * (This is a bug on some variants of i386 svr4.0.)
6648 */
6649 for (i = 0; i < pagesize; ++i)
6650 *(data2 + i) = *(data2 + i) + 1;
6651 data3 = malloc(pagesize);
6652 if (!data3)
6653 exit(1);
6654 if (read(fd, data3, pagesize) != pagesize)
6655 exit(1);
6656 for (i = 0; i < pagesize; ++i)
6657 if (*(data + i) != *(data3 + i))
6658 exit(1);
6659 close(fd);
6660 unlink("conftestmmap");
6661 exit(0);
6662}
6663
6664EOF
4525d757 6665if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ab87f8c8
JL
6666then
6667 ac_cv_func_mmap_fixed_mapped=yes
6668else
6669 echo "configure: failed program was:" >&5
6670 cat conftest.$ac_ext >&5
6671 rm -fr conftest*
6672 ac_cv_func_mmap_fixed_mapped=no
6673fi
6674rm -fr conftest*
6675fi
6676
6677fi
6678
6679echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6680if test $ac_cv_func_mmap_fixed_mapped = yes; then
6681 cat >> confdefs.h <<\EOF
6682#define HAVE_MMAP 1
6683EOF
6684
6685fi
6686
6687
6688 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
6689unistd.h sys/param.h
6690do
6691ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6692echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4525d757 6693echo "configure:6694: checking for $ac_hdr" >&5
ab87f8c8
JL
6694if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6695 echo $ac_n "(cached) $ac_c" 1>&6
6696else
6697 cat > conftest.$ac_ext <<EOF
4525d757 6698#line 6699 "configure"
ab87f8c8
JL
6699#include "confdefs.h"
6700#include <$ac_hdr>
6701EOF
6702ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 6703{ (eval echo configure:6704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 6704ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
6705if test -z "$ac_err"; then
6706 rm -rf conftest*
6707 eval "ac_cv_header_$ac_safe=yes"
6708else
6709 echo "$ac_err" >&5
6710 echo "configure: failed program was:" >&5
6711 cat conftest.$ac_ext >&5
6712 rm -rf conftest*
6713 eval "ac_cv_header_$ac_safe=no"
6714fi
6715rm -f conftest*
6716fi
6717if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6718 echo "$ac_t""yes" 1>&6
6719 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6720 cat >> confdefs.h <<EOF
6721#define $ac_tr_hdr 1
6722EOF
6723
6724else
6725 echo "$ac_t""no" 1>&6
6726fi
6727done
6728
6729 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
6730strdup __argz_count __argz_stringify __argz_next
6731do
6732echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 6733echo "configure:6734: checking for $ac_func" >&5
ab87f8c8
JL
6734if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6735 echo $ac_n "(cached) $ac_c" 1>&6
6736else
6737 cat > conftest.$ac_ext <<EOF
4525d757 6738#line 6739 "configure"
ab87f8c8
JL
6739#include "confdefs.h"
6740/* System header to define __stub macros and hopefully few prototypes,
6741 which can conflict with char $ac_func(); below. */
6742#include <assert.h>
6743/* Override any gcc2 internal prototype to avoid an error. */
6744/* We use char because int might match the return type of a gcc2
6745 builtin and then its argument prototype would still apply. */
6746char $ac_func();
6747
6748int main() {
6749
6750/* The GNU C library defines this for functions which it implements
6751 to always fail with ENOSYS. Some functions are actually named
6752 something starting with __ and the normal name is an alias. */
6753#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6754choke me
6755#else
027ea2a7 6756$ac_func();
ab87f8c8
JL
6757#endif
6758
6759; return 0; }
6760EOF
4525d757 6761if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6762 rm -rf conftest*
6763 eval "ac_cv_func_$ac_func=yes"
6764else
6765 echo "configure: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
6767 rm -rf conftest*
6768 eval "ac_cv_func_$ac_func=no"
6769fi
6770rm -f conftest*
6771fi
6772
6773if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6774 echo "$ac_t""yes" 1>&6
6775 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6776 cat >> confdefs.h <<EOF
6777#define $ac_tr_func 1
6778EOF
6779
6780else
6781 echo "$ac_t""no" 1>&6
6782fi
6783done
6784
6785
6786 if test "${ac_cv_func_stpcpy+set}" != "set"; then
6787 for ac_func in stpcpy
6788do
6789echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 6790echo "configure:6791: checking for $ac_func" >&5
ab87f8c8
JL
6791if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6792 echo $ac_n "(cached) $ac_c" 1>&6
6793else
6794 cat > conftest.$ac_ext <<EOF
4525d757 6795#line 6796 "configure"
ab87f8c8
JL
6796#include "confdefs.h"
6797/* System header to define __stub macros and hopefully few prototypes,
6798 which can conflict with char $ac_func(); below. */
6799#include <assert.h>
6800/* Override any gcc2 internal prototype to avoid an error. */
6801/* We use char because int might match the return type of a gcc2
6802 builtin and then its argument prototype would still apply. */
6803char $ac_func();
6804
6805int main() {
6806
6807/* The GNU C library defines this for functions which it implements
6808 to always fail with ENOSYS. Some functions are actually named
6809 something starting with __ and the normal name is an alias. */
6810#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6811choke me
6812#else
027ea2a7 6813$ac_func();
ab87f8c8
JL
6814#endif
6815
6816; return 0; }
6817EOF
4525d757 6818if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6819 rm -rf conftest*
6820 eval "ac_cv_func_$ac_func=yes"
6821else
6822 echo "configure: failed program was:" >&5
6823 cat conftest.$ac_ext >&5
6824 rm -rf conftest*
6825 eval "ac_cv_func_$ac_func=no"
6826fi
6827rm -f conftest*
6828fi
6829
6830if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6831 echo "$ac_t""yes" 1>&6
6832 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6833 cat >> confdefs.h <<EOF
6834#define $ac_tr_func 1
6835EOF
6836
6837else
6838 echo "$ac_t""no" 1>&6
6839fi
6840done
6841
6842 fi
6843 if test "${ac_cv_func_stpcpy}" = "yes"; then
6844 cat >> confdefs.h <<\EOF
6845#define HAVE_STPCPY 1
6846EOF
6847
6848 fi
6849
6850 if test $ac_cv_header_locale_h = yes; then
6851 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4525d757 6852echo "configure:6853: checking for LC_MESSAGES" >&5
ab87f8c8
JL
6853if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6854 echo $ac_n "(cached) $ac_c" 1>&6
6855else
6856 cat > conftest.$ac_ext <<EOF
4525d757 6857#line 6858 "configure"
ab87f8c8
JL
6858#include "confdefs.h"
6859#include <locale.h>
6860int main() {
6861return LC_MESSAGES
6862; return 0; }
6863EOF
4525d757 6864if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6865 rm -rf conftest*
6866 am_cv_val_LC_MESSAGES=yes
6867else
6868 echo "configure: failed program was:" >&5
6869 cat conftest.$ac_ext >&5
6870 rm -rf conftest*
6871 am_cv_val_LC_MESSAGES=no
6872fi
6873rm -f conftest*
6874fi
6875
6876echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6877 if test $am_cv_val_LC_MESSAGES = yes; then
6878 cat >> confdefs.h <<\EOF
6879#define HAVE_LC_MESSAGES 1
6880EOF
6881
6882 fi
6883 fi
6884 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4525d757 6885echo "configure:6886: checking whether NLS is requested" >&5
ab87f8c8
JL
6886 # Check whether --enable-nls or --disable-nls was given.
6887if test "${enable_nls+set}" = set; then
6888 enableval="$enable_nls"
6889 USE_NLS=$enableval
6890else
6891 USE_NLS=yes
6892fi
6893
6894 echo "$ac_t""$USE_NLS" 1>&6
6895
6896
6897 USE_INCLUDED_LIBINTL=no
6898
6899 if test "$USE_NLS" = "yes"; then
6900 cat >> confdefs.h <<\EOF
6901#define ENABLE_NLS 1
6902EOF
6903
6904 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4525d757 6905echo "configure:6906: checking whether included gettext is requested" >&5
ab87f8c8
JL
6906 # Check whether --with-included-gettext or --without-included-gettext was given.
6907if test "${with_included_gettext+set}" = set; then
6908 withval="$with_included_gettext"
6909 nls_cv_force_use_gnu_gettext=$withval
6910else
6911 nls_cv_force_use_gnu_gettext=no
6912fi
6913
6914 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6915
6916 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6917 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6918 nls_cv_header_intl=
6919 nls_cv_header_libgt=
6920 CATOBJEXT=NONE
6921
6922 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6923echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4525d757 6924echo "configure:6925: checking for libintl.h" >&5
ab87f8c8
JL
6925if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6926 echo $ac_n "(cached) $ac_c" 1>&6
6927else
6928 cat > conftest.$ac_ext <<EOF
4525d757 6929#line 6930 "configure"
ab87f8c8
JL
6930#include "confdefs.h"
6931#include <libintl.h>
6932EOF
6933ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 6934{ (eval echo configure:6935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 6935ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
6936if test -z "$ac_err"; then
6937 rm -rf conftest*
6938 eval "ac_cv_header_$ac_safe=yes"
6939else
6940 echo "$ac_err" >&5
6941 echo "configure: failed program was:" >&5
6942 cat conftest.$ac_ext >&5
6943 rm -rf conftest*
6944 eval "ac_cv_header_$ac_safe=no"
6945fi
6946rm -f conftest*
6947fi
6948if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6949 echo "$ac_t""yes" 1>&6
6950 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4525d757 6951echo "configure:6952: checking for gettext in libc" >&5
ab87f8c8
JL
6952if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
6953 echo $ac_n "(cached) $ac_c" 1>&6
6954else
6955 cat > conftest.$ac_ext <<EOF
4525d757 6956#line 6957 "configure"
ab87f8c8
JL
6957#include "confdefs.h"
6958#include <libintl.h>
6959int main() {
6960return (int) gettext ("")
6961; return 0; }
6962EOF
4525d757 6963if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6964 rm -rf conftest*
6965 gt_cv_func_gettext_libc=yes
6966else
6967 echo "configure: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 rm -rf conftest*
6970 gt_cv_func_gettext_libc=no
6971fi
6972rm -f conftest*
6973fi
6974
6975echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
6976
6977 if test "$gt_cv_func_gettext_libc" != "yes"; then
6978 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4525d757 6979echo "configure:6980: checking for bindtextdomain in -lintl" >&5
ab87f8c8
JL
6980ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
6981if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6983else
6984 ac_save_LIBS="$LIBS"
6985LIBS="-lintl $LIBS"
6986cat > conftest.$ac_ext <<EOF
4525d757 6987#line 6988 "configure"
ab87f8c8
JL
6988#include "confdefs.h"
6989/* Override any gcc2 internal prototype to avoid an error. */
6990/* We use char because int might match the return type of a gcc2
6991 builtin and then its argument prototype would still apply. */
6992char bindtextdomain();
6993
6994int main() {
6995bindtextdomain()
6996; return 0; }
6997EOF
4525d757 6998if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
6999 rm -rf conftest*
7000 eval "ac_cv_lib_$ac_lib_var=yes"
7001else
7002 echo "configure: failed program was:" >&5
7003 cat conftest.$ac_ext >&5
7004 rm -rf conftest*
7005 eval "ac_cv_lib_$ac_lib_var=no"
7006fi
7007rm -f conftest*
7008LIBS="$ac_save_LIBS"
7009
7010fi
7011if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7012 echo "$ac_t""yes" 1>&6
7013 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4525d757 7014echo "configure:7015: checking for gettext in libintl" >&5
ab87f8c8
JL
7015if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
7016 echo $ac_n "(cached) $ac_c" 1>&6
7017else
7018 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
4525d757 7019echo "configure:7020: checking for gettext in -lintl" >&5
ab87f8c8
JL
7020ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
7021if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7022 echo $ac_n "(cached) $ac_c" 1>&6
7023else
7024 ac_save_LIBS="$LIBS"
7025LIBS="-lintl $LIBS"
7026cat > conftest.$ac_ext <<EOF
4525d757 7027#line 7028 "configure"
ab87f8c8
JL
7028#include "confdefs.h"
7029/* Override any gcc2 internal prototype to avoid an error. */
7030/* We use char because int might match the return type of a gcc2
7031 builtin and then its argument prototype would still apply. */
7032char gettext();
7033
7034int main() {
7035gettext()
7036; return 0; }
7037EOF
4525d757 7038if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
7039 rm -rf conftest*
7040 eval "ac_cv_lib_$ac_lib_var=yes"
7041else
7042 echo "configure: failed program was:" >&5
7043 cat conftest.$ac_ext >&5
7044 rm -rf conftest*
7045 eval "ac_cv_lib_$ac_lib_var=no"
7046fi
7047rm -f conftest*
7048LIBS="$ac_save_LIBS"
7049
7050fi
7051if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7052 echo "$ac_t""yes" 1>&6
7053 gt_cv_func_gettext_libintl=yes
7054else
7055 echo "$ac_t""no" 1>&6
7056gt_cv_func_gettext_libintl=no
7057fi
7058
7059fi
7060
7061echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
7062else
7063 echo "$ac_t""no" 1>&6
7064fi
7065
7066 fi
7067
7068 if test "$gt_cv_func_gettext_libc" = "yes" \
7069 || test "$gt_cv_func_gettext_libintl" = "yes"; then
7070 cat >> confdefs.h <<\EOF
7071#define HAVE_GETTEXT 1
7072EOF
7073
7074 # Extract the first word of "msgfmt", so it can be a program name with args.
7075set dummy msgfmt; ac_word=$2
7076echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7077echo "configure:7078: checking for $ac_word" >&5
ab87f8c8
JL
7078if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7079 echo $ac_n "(cached) $ac_c" 1>&6
7080else
7081 case "$MSGFMT" in
7082 /*)
7083 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7084 ;;
7085 *)
7086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7087 for ac_dir in $PATH; do
7088 test -z "$ac_dir" && ac_dir=.
7089 if test -f $ac_dir/$ac_word; then
7090 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7091 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7092 break
7093 fi
7094 fi
7095 done
7096 IFS="$ac_save_ifs"
7097 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7098 ;;
7099esac
7100fi
7101MSGFMT="$ac_cv_path_MSGFMT"
7102if test -n "$MSGFMT"; then
7103 echo "$ac_t""$MSGFMT" 1>&6
7104else
7105 echo "$ac_t""no" 1>&6
7106fi
7107 if test "$MSGFMT" != "no"; then
7108 for ac_func in dcgettext
7109do
7110echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4525d757 7111echo "configure:7112: checking for $ac_func" >&5
ab87f8c8
JL
7112if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7113 echo $ac_n "(cached) $ac_c" 1>&6
7114else
7115 cat > conftest.$ac_ext <<EOF
4525d757 7116#line 7117 "configure"
ab87f8c8
JL
7117#include "confdefs.h"
7118/* System header to define __stub macros and hopefully few prototypes,
7119 which can conflict with char $ac_func(); below. */
7120#include <assert.h>
7121/* Override any gcc2 internal prototype to avoid an error. */
7122/* We use char because int might match the return type of a gcc2
7123 builtin and then its argument prototype would still apply. */
7124char $ac_func();
7125
7126int main() {
7127
7128/* The GNU C library defines this for functions which it implements
7129 to always fail with ENOSYS. Some functions are actually named
7130 something starting with __ and the normal name is an alias. */
7131#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7132choke me
7133#else
027ea2a7 7134$ac_func();
ab87f8c8
JL
7135#endif
7136
7137; return 0; }
7138EOF
4525d757 7139if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
7140 rm -rf conftest*
7141 eval "ac_cv_func_$ac_func=yes"
7142else
7143 echo "configure: failed program was:" >&5
7144 cat conftest.$ac_ext >&5
7145 rm -rf conftest*
7146 eval "ac_cv_func_$ac_func=no"
7147fi
7148rm -f conftest*
7149fi
7150
7151if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7152 echo "$ac_t""yes" 1>&6
7153 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7154 cat >> confdefs.h <<EOF
7155#define $ac_tr_func 1
7156EOF
7157
7158else
7159 echo "$ac_t""no" 1>&6
7160fi
7161done
7162
7163 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7164set dummy gmsgfmt; ac_word=$2
7165echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7166echo "configure:7167: checking for $ac_word" >&5
ab87f8c8
JL
7167if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7168 echo $ac_n "(cached) $ac_c" 1>&6
7169else
7170 case "$GMSGFMT" in
7171 /*)
7172 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7173 ;;
7174 ?:/*)
7175 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7176 ;;
7177 *)
cd9e5e7c 7178 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 7179 for ac_dir in $PATH; do
ab87f8c8
JL
7180 test -z "$ac_dir" && ac_dir=.
7181 if test -f $ac_dir/$ac_word; then
7182 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7183 break
7184 fi
7185 done
7186 IFS="$ac_save_ifs"
7187 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7188 ;;
7189esac
7190fi
7191GMSGFMT="$ac_cv_path_GMSGFMT"
7192if test -n "$GMSGFMT"; then
7193 echo "$ac_t""$GMSGFMT" 1>&6
7194else
7195 echo "$ac_t""no" 1>&6
7196fi
7197
7198 # Extract the first word of "xgettext", so it can be a program name with args.
7199set dummy xgettext; ac_word=$2
7200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7201echo "configure:7202: checking for $ac_word" >&5
ab87f8c8
JL
7202if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7203 echo $ac_n "(cached) $ac_c" 1>&6
7204else
7205 case "$XGETTEXT" in
7206 /*)
7207 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7208 ;;
7209 *)
7210 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7211 for ac_dir in $PATH; do
7212 test -z "$ac_dir" && ac_dir=.
7213 if test -f $ac_dir/$ac_word; then
7214 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7215 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7216 break
7217 fi
7218 fi
7219 done
7220 IFS="$ac_save_ifs"
7221 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7222 ;;
7223esac
7224fi
7225XGETTEXT="$ac_cv_path_XGETTEXT"
7226if test -n "$XGETTEXT"; then
7227 echo "$ac_t""$XGETTEXT" 1>&6
7228else
7229 echo "$ac_t""no" 1>&6
7230fi
7231
7232 cat > conftest.$ac_ext <<EOF
4525d757 7233#line 7234 "configure"
ab87f8c8
JL
7234#include "confdefs.h"
7235
7236int main() {
7237extern int _nl_msg_cat_cntr;
7238 return _nl_msg_cat_cntr
7239; return 0; }
7240EOF
4525d757 7241if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
7242 rm -rf conftest*
7243 CATOBJEXT=.gmo
7244 DATADIRNAME=share
7245else
7246 echo "configure: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7248 rm -rf conftest*
7249 CATOBJEXT=.mo
7250 DATADIRNAME=lib
7251fi
7252rm -f conftest*
7253 INSTOBJEXT=.mo
7254 fi
7255 fi
7256
7257else
7258 echo "$ac_t""no" 1>&6
7259fi
7260
7261
7262 if test "$CATOBJEXT" = "NONE"; then
7263 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
4525d757 7264echo "configure:7265: checking whether catgets can be used" >&5
ab87f8c8
JL
7265 # Check whether --with-catgets or --without-catgets was given.
7266if test "${with_catgets+set}" = set; then
7267 withval="$with_catgets"
7268 nls_cv_use_catgets=$withval
7269else
7270 nls_cv_use_catgets=no
7271fi
7272
7273 echo "$ac_t""$nls_cv_use_catgets" 1>&6
7274
7275 if test "$nls_cv_use_catgets" = "yes"; then
7276 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
4525d757 7277echo "configure:7278: checking for main in -li" >&5
ab87f8c8
JL
7278ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
7279if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7280 echo $ac_n "(cached) $ac_c" 1>&6
7281else
7282 ac_save_LIBS="$LIBS"
7283LIBS="-li $LIBS"
7284cat > conftest.$ac_ext <<EOF
4525d757 7285#line 7286 "configure"
ab87f8c8
JL
7286#include "confdefs.h"
7287
7288int main() {
7289main()
7290; return 0; }
7291EOF
4525d757 7292if { (eval echo configure:7293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
7293 rm -rf conftest*
7294 eval "ac_cv_lib_$ac_lib_var=yes"
7295else
7296 echo "configure: failed program was:" >&5
7297 cat conftest.$ac_ext >&5
7298 rm -rf conftest*
7299 eval "ac_cv_lib_$ac_lib_var=no"
7300fi
7301rm -f conftest*
7302LIBS="$ac_save_LIBS"
7303
7304fi
7305if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7306 echo "$ac_t""yes" 1>&6
7307 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7308 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7309 cat >> confdefs.h <<EOF
7310#define $ac_tr_lib 1
7311EOF
7312
7313 LIBS="-li $LIBS"
7314
7315else
7316 echo "$ac_t""no" 1>&6
7317fi
7318
7319 echo $ac_n "checking for catgets""... $ac_c" 1>&6
4525d757 7320echo "configure:7321: checking for catgets" >&5
ab87f8c8
JL
7321if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
7322 echo $ac_n "(cached) $ac_c" 1>&6
7323else
7324 cat > conftest.$ac_ext <<EOF
4525d757 7325#line 7326 "configure"
ab87f8c8
JL
7326#include "confdefs.h"
7327/* System header to define __stub macros and hopefully few prototypes,
7328 which can conflict with char catgets(); below. */
7329#include <assert.h>
7330/* Override any gcc2 internal prototype to avoid an error. */
7331/* We use char because int might match the return type of a gcc2
7332 builtin and then its argument prototype would still apply. */
7333char catgets();
7334
7335int main() {
7336
7337/* The GNU C library defines this for functions which it implements
7338 to always fail with ENOSYS. Some functions are actually named
7339 something starting with __ and the normal name is an alias. */
7340#if defined (__stub_catgets) || defined (__stub___catgets)
7341choke me
7342#else
027ea2a7 7343catgets();
ab87f8c8
JL
7344#endif
7345
7346; return 0; }
7347EOF
4525d757 7348if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
7349 rm -rf conftest*
7350 eval "ac_cv_func_catgets=yes"
7351else
7352 echo "configure: failed program was:" >&5
7353 cat conftest.$ac_ext >&5
7354 rm -rf conftest*
7355 eval "ac_cv_func_catgets=no"
7356fi
7357rm -f conftest*
7358fi
7359
7360if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
7361 echo "$ac_t""yes" 1>&6
7362 cat >> confdefs.h <<\EOF
7363#define HAVE_CATGETS 1
7364EOF
7365
7366 INTLOBJS="\$(CATOBJS)"
7367 # Extract the first word of "gencat", so it can be a program name with args.
7368set dummy gencat; ac_word=$2
7369echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7370echo "configure:7371: checking for $ac_word" >&5
ab87f8c8
JL
7371if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
7372 echo $ac_n "(cached) $ac_c" 1>&6
7373else
7374 case "$GENCAT" in
7375 /*)
7376 ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
7377 ;;
7378 ?:/*)
7379 ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
7380 ;;
7381 *)
cd9e5e7c 7382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 7383 for ac_dir in $PATH; do
ab87f8c8
JL
7384 test -z "$ac_dir" && ac_dir=.
7385 if test -f $ac_dir/$ac_word; then
7386 ac_cv_path_GENCAT="$ac_dir/$ac_word"
7387 break
7388 fi
7389 done
7390 IFS="$ac_save_ifs"
7391 test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
7392 ;;
7393esac
7394fi
7395GENCAT="$ac_cv_path_GENCAT"
7396if test -n "$GENCAT"; then
7397 echo "$ac_t""$GENCAT" 1>&6
7398else
7399 echo "$ac_t""no" 1>&6
7400fi
7401 if test "$GENCAT" != "no"; then
7402 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7403set dummy gmsgfmt; ac_word=$2
7404echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7405echo "configure:7406: checking for $ac_word" >&5
ab87f8c8
JL
7406if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7407 echo $ac_n "(cached) $ac_c" 1>&6
7408else
7409 case "$GMSGFMT" in
7410 /*)
7411 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7412 ;;
7413 ?:/*)
7414 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7415 ;;
7416 *)
cd9e5e7c 7417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 7418 for ac_dir in $PATH; do
ab87f8c8
JL
7419 test -z "$ac_dir" && ac_dir=.
7420 if test -f $ac_dir/$ac_word; then
7421 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7422 break
7423 fi
7424 done
7425 IFS="$ac_save_ifs"
7426 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7427 ;;
7428esac
7429fi
7430GMSGFMT="$ac_cv_path_GMSGFMT"
7431if test -n "$GMSGFMT"; then
7432 echo "$ac_t""$GMSGFMT" 1>&6
7433else
7434 echo "$ac_t""no" 1>&6
7435fi
7436
7437 if test "$GMSGFMT" = "no"; then
7438 # Extract the first word of "msgfmt", so it can be a program name with args.
7439set dummy msgfmt; ac_word=$2
7440echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7441echo "configure:7442: checking for $ac_word" >&5
ab87f8c8
JL
7442if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7443 echo $ac_n "(cached) $ac_c" 1>&6
7444else
7445 case "$GMSGFMT" in
7446 /*)
7447 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7448 ;;
7449 *)
7450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7451 for ac_dir in $PATH; do
7452 test -z "$ac_dir" && ac_dir=.
7453 if test -f $ac_dir/$ac_word; then
7454 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7455 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7456 break
7457 fi
7458 fi
7459 done
7460 IFS="$ac_save_ifs"
7461 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
7462 ;;
7463esac
7464fi
7465GMSGFMT="$ac_cv_path_GMSGFMT"
7466if test -n "$GMSGFMT"; then
7467 echo "$ac_t""$GMSGFMT" 1>&6
7468else
7469 echo "$ac_t""no" 1>&6
7470fi
7471
7472 fi
7473 # Extract the first word of "xgettext", so it can be a program name with args.
7474set dummy xgettext; ac_word=$2
7475echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7476echo "configure:7477: checking for $ac_word" >&5
ab87f8c8
JL
7477if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7478 echo $ac_n "(cached) $ac_c" 1>&6
7479else
7480 case "$XGETTEXT" in
7481 /*)
7482 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7483 ;;
7484 *)
7485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7486 for ac_dir in $PATH; do
7487 test -z "$ac_dir" && ac_dir=.
7488 if test -f $ac_dir/$ac_word; then
7489 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7490 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7491 break
7492 fi
7493 fi
7494 done
7495 IFS="$ac_save_ifs"
7496 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7497 ;;
7498esac
7499fi
7500XGETTEXT="$ac_cv_path_XGETTEXT"
7501if test -n "$XGETTEXT"; then
7502 echo "$ac_t""$XGETTEXT" 1>&6
7503else
7504 echo "$ac_t""no" 1>&6
7505fi
7506
7507 USE_INCLUDED_LIBINTL=yes
7508 CATOBJEXT=.cat
7509 INSTOBJEXT=.cat
7510 DATADIRNAME=lib
7511 INTLDEPS='$(top_builddir)/intl/libintl.a'
7512 INTLLIBS=$INTLDEPS
7513 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7514 nls_cv_header_intl=intl/libintl.h
7515 nls_cv_header_libgt=intl/libgettext.h
7516 fi
7517else
7518 echo "$ac_t""no" 1>&6
7519fi
7520
7521 fi
7522 fi
7523
7524 if test "$CATOBJEXT" = "NONE"; then
7525 nls_cv_use_gnu_gettext=yes
7526 fi
7527 fi
7528
7529 if test "$nls_cv_use_gnu_gettext" = "yes"; then
7530 INTLOBJS="\$(GETTOBJS)"
7531 # Extract the first word of "msgfmt", so it can be a program name with args.
7532set dummy msgfmt; ac_word=$2
7533echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7534echo "configure:7535: checking for $ac_word" >&5
ab87f8c8
JL
7535if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7536 echo $ac_n "(cached) $ac_c" 1>&6
7537else
7538 case "$MSGFMT" in
7539 /*)
7540 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7541 ;;
7542 *)
7543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7544 for ac_dir in $PATH; do
7545 test -z "$ac_dir" && ac_dir=.
7546 if test -f $ac_dir/$ac_word; then
7547 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7548 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7549 break
7550 fi
7551 fi
7552 done
7553 IFS="$ac_save_ifs"
7554 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
7555 ;;
7556esac
7557fi
7558MSGFMT="$ac_cv_path_MSGFMT"
7559if test -n "$MSGFMT"; then
7560 echo "$ac_t""$MSGFMT" 1>&6
7561else
7562 echo "$ac_t""no" 1>&6
7563fi
7564
7565 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7566set dummy gmsgfmt; ac_word=$2
7567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7568echo "configure:7569: checking for $ac_word" >&5
ab87f8c8
JL
7569if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7570 echo $ac_n "(cached) $ac_c" 1>&6
7571else
7572 case "$GMSGFMT" in
7573 /*)
7574 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7575 ;;
7576 ?:/*)
7577 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7578 ;;
7579 *)
cd9e5e7c 7580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4525d757 7581 for ac_dir in $PATH; do
ab87f8c8
JL
7582 test -z "$ac_dir" && ac_dir=.
7583 if test -f $ac_dir/$ac_word; then
7584 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7585 break
7586 fi
7587 done
7588 IFS="$ac_save_ifs"
7589 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7590 ;;
7591esac
7592fi
7593GMSGFMT="$ac_cv_path_GMSGFMT"
7594if test -n "$GMSGFMT"; then
7595 echo "$ac_t""$GMSGFMT" 1>&6
7596else
7597 echo "$ac_t""no" 1>&6
7598fi
7599
7600 # Extract the first word of "xgettext", so it can be a program name with args.
7601set dummy xgettext; ac_word=$2
7602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525d757 7603echo "configure:7604: checking for $ac_word" >&5
ab87f8c8
JL
7604if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7605 echo $ac_n "(cached) $ac_c" 1>&6
7606else
7607 case "$XGETTEXT" in
7608 /*)
7609 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7610 ;;
7611 *)
7612 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7613 for ac_dir in $PATH; do
7614 test -z "$ac_dir" && ac_dir=.
7615 if test -f $ac_dir/$ac_word; then
7616 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7617 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7618 break
7619 fi
7620 fi
7621 done
7622 IFS="$ac_save_ifs"
7623 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7624 ;;
7625esac
7626fi
7627XGETTEXT="$ac_cv_path_XGETTEXT"
7628if test -n "$XGETTEXT"; then
7629 echo "$ac_t""$XGETTEXT" 1>&6
7630else
7631 echo "$ac_t""no" 1>&6
7632fi
7633
7634
7635 USE_INCLUDED_LIBINTL=yes
7636 CATOBJEXT=.gmo
7637 INSTOBJEXT=.mo
7638 DATADIRNAME=share
7639 INTLDEPS='$(top_builddir)/intl/libintl.a'
7640 INTLLIBS=$INTLDEPS
7641 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7642 nls_cv_header_intl=intl/libintl.h
7643 nls_cv_header_libgt=intl/libgettext.h
7644 fi
7645
7646 if test "$XGETTEXT" != ":"; then
7647 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7648 : ;
7649 else
7650 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
7651 XGETTEXT=":"
7652 fi
7653 fi
7654
7655 # We need to process the po/ directory.
7656 POSUB=po
7657 else
7658 DATADIRNAME=share
7659 nls_cv_header_intl=intl/libintl.h
7660 nls_cv_header_libgt=intl/libgettext.h
7661 fi
7662
7663
7664
7665
7666 # If this is used in GNU gettext we have to set USE_NLS to `yes'
7667 # because some of the sources are only built for this goal.
7668 if test "$PACKAGE" = gettext; then
7669 USE_NLS=yes
7670 USE_INCLUDED_LIBINTL=yes
7671 fi
7672
7673 for lang in $ALL_LINGUAS; do
7674 GMOFILES="$GMOFILES $lang.gmo"
7675 POFILES="$POFILES $lang.po"
7676 done
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691 if test "x$CATOBJEXT" != "x"; then
7692 if test "x$ALL_LINGUAS" = "x"; then
7693 LINGUAS=
7694 else
7695 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4525d757 7696echo "configure:7697: checking for catalogs to be installed" >&5
ab87f8c8
JL
7697 NEW_LINGUAS=
7698 for lang in ${LINGUAS=$ALL_LINGUAS}; do
7699 case "$ALL_LINGUAS" in
7700 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
7701 esac
7702 done
7703 LINGUAS=$NEW_LINGUAS
7704 echo "$ac_t""$LINGUAS" 1>&6
7705 fi
7706
7707 if test -n "$LINGUAS"; then
7708 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7709 fi
7710 fi
7711
7712 if test $ac_cv_header_locale_h = yes; then
7713 INCLUDE_LOCALE_H="#include <locale.h>"
7714 else
7715 INCLUDE_LOCALE_H="\
7716/* The system does not provide the header <locale.h>. Take care yourself. */"
7717 fi
7718
7719
7720 test -d intl || mkdir intl
7721 if test "$CATOBJEXT" = ".cat"; then
7722 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
7723echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4525d757 7724echo "configure:7725: checking for linux/version.h" >&5
ab87f8c8
JL
7725if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7726 echo $ac_n "(cached) $ac_c" 1>&6
7727else
7728 cat > conftest.$ac_ext <<EOF
4525d757 7729#line 7730 "configure"
ab87f8c8
JL
7730#include "confdefs.h"
7731#include <linux/version.h>
7732EOF
7733ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525d757 7734{ (eval echo configure:7735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 7735ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
7736if test -z "$ac_err"; then
7737 rm -rf conftest*
7738 eval "ac_cv_header_$ac_safe=yes"
7739else
7740 echo "$ac_err" >&5
7741 echo "configure: failed program was:" >&5
7742 cat conftest.$ac_ext >&5
7743 rm -rf conftest*
7744 eval "ac_cv_header_$ac_safe=no"
7745fi
7746rm -f conftest*
7747fi
7748if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7749 echo "$ac_t""yes" 1>&6
7750 msgformat=linux
7751else
7752 echo "$ac_t""no" 1>&6
7753msgformat=xopen
7754fi
7755
7756
7757 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
7758 fi
7759 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
7760 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
7761
7762 if test "$PACKAGE" = "gettext"; then
7763 GT_NO="#NO#"
7764 GT_YES=
7765 else
7766 GT_NO=
7767 GT_YES="#YES#"
7768 fi
7769
7770
7771
7772 MKINSTALLDIRS=
7773 if test -n "$ac_aux_dir"; then
7774 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7775 fi
7776 if test -z "$MKINSTALLDIRS"; then
7777 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7778 fi
7779
7780
7781 l=
7782
7783
7784 test -d po || mkdir po
7785 if test "x$srcdir" != "x."; then
7786 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7787 posrcprefix="$srcdir/"
7788 else
7789 posrcprefix="../$srcdir/"
7790 fi
7791 else
7792 posrcprefix="../"
7793 fi
7794 rm -f po/POTFILES
7795 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7796 < $srcdir/po/POTFILES.in > po/POTFILES
7797
7798XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
7799
7800# Get an absolute path to the GCC top-level source directory
7801holddir=`pwd`
7802cd $srcdir
7803topdir=`pwd`
7804cd $holddir
7805
7806# Conditionalize the makefile for this host machine.
7807# Make-host contains the concatenation of all host makefile fragments
7808# [there can be more than one]. This file is built by configure.frag.
7809host_overrides=Make-host
7810dep_host_xmake_file=
7811for f in .. ${host_xmake_file}
7812do
7813 if test -f ${srcdir}/config/$f
7814 then
7815 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7816 fi
7817done
7818
7819# Conditionalize the makefile for this target machine.
7820# Make-target contains the concatenation of all host makefile fragments
7821# [there can be more than one]. This file is built by configure.frag.
7822target_overrides=Make-target
7823dep_tmake_file=
7824for f in .. ${tmake_file}
7825do
7826 if test -f ${srcdir}/config/$f
7827 then
7828 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7829 fi
7830done
7831
7832# If the host doesn't support symlinks, modify CC in
7833# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7834# Otherwise, we can use "CC=$(CC)".
7835rm -f symtest.tem
7836if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7837then
7838 cc_set_by_configure="\$(CC)"
7839 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7840else
7841 rm -f symtest.tem
7842 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7843 then
7844 symbolic_link="cp -p"
7845 else
7846 symbolic_link="cp"
7847 fi
7848 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7849 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7850fi
7851rm -f symtest.tem
7852
7853out_object_file=`basename $out_file .c`.o
7854
7855tm_file_list=
7856for f in $tm_file; do
7857 if test $f != "gansidecl.h" ; then
7858 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
7859 else
7860 tm_file_list="${tm_file_list} $f"
7861 fi
7862done
7863
7864host_xm_file_list=
7865for f in $host_xm_file; do
7866 if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
7867 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
7868 else
7869 host_xm_file_list="${host_xm_file_list} $f"
7870 fi
7871done
7872
7873build_xm_file_list=
7874for f in $build_xm_file; do
7875 if test $f != "auto-build.h" -a $f != "auto-host.h" -a $f != "gansidecl.h" ; then
7876 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
7877 else
7878 build_xm_file_list="${build_xm_file_list} $f"
7879 fi
7880done
7881
7882# Define macro CROSS_COMPILE in compilation
7883# if this is a cross-compiler.
7884# Also use all.cross instead of all.internal
7885# and add cross-make to Makefile.
7886cross_overrides="/dev/null"
7887if test x$host != x$target
7888then
7889 cross_defines="CROSS=-DCROSS_COMPILE"
7890 cross_overrides="${topdir}/cross-make"
7891fi
7892
7893# When building gcc with a cross-compiler, we need to fix a few things.
7894# This must come after cross-make as we want all.build to override
7895# all.cross.
7896build_overrides="/dev/null"
7897if test x$build != x$host
7898then
7899 build_overrides="${topdir}/build-make"
7900fi
7901
7902# Expand extra_headers to include complete path.
7903# This substitutes for lots of t-* files.
7904extra_headers_list=
7905if test "x$extra_headers" = x
7906then true
7907else
7908 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
7909 for file in $extra_headers;
7910 do
7911 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
7912 done
7913fi
7914
7915if test x$use_collect2 = xno; then
7916 use_collect2=
7917fi
7918
7919# Add a definition of USE_COLLECT2 if system wants one.
7920# Also tell toplev.c what to do.
7921# This substitutes for lots of t-* files.
7922if test x$use_collect2 = x
7923then
7924 will_use_collect2=
7925 maybe_use_collect2=
7926else
7927 will_use_collect2="collect2"
7928 maybe_use_collect2="-DUSE_COLLECT2"
7929fi
7930
7931# NEED TO CONVERT
7932# Set MD_DEPS if the real md file is in md.pre-cpp.
7933# Set MD_CPP to the cpp to pass the md file through. Md files use ';'
7934# for line oriented comments, so we must always use a GNU cpp. If
7935# building gcc with a cross compiler, use the cross compiler just
7936# built. Otherwise, we can use the cpp just built.
7937md_file_sub=
7938if test "x$md_cppflags" = x
7939then
7940 md_file_sub=$srcdir/config/$md_file
7941else
7942 md_file=md
7943fi
7944
7945# If we have gas in the build tree, make a link to it.
7946if test -f ../gas/Makefile; then
7947 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7948fi
7949
7950# If we have nm in the build tree, make a link to it.
7951if test -f ../binutils/Makefile; then
7952 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7953fi
7954
7955# If we have ld in the build tree, make a link to it.
7956if test -f ../ld/Makefile; then
7957# if test x$use_collect2 = x; then
7958# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
7959# else
7960 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7961# fi
7962fi
7963
7964# Figure out what assembler alignment features are present.
7965echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
4525d757 7966echo "configure:7967: checking assembler alignment features" >&5
ab87f8c8
JL
7967gcc_cv_as=
7968gcc_cv_as_alignment_features=
7969gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7970if test -x "$DEFAULT_ASSEMBLER"; then
7971 gcc_cv_as="$DEFAULT_ASSEMBLER"
7972elif test -x "$AS"; then
7973 gcc_cv_as="$AS"
7974elif test -x as$host_exeext; then
7975 # Build using assembler in the current directory.
7976 gcc_cv_as=./as$host_exeext
7977elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
7978 # Single tree build which includes gas.
7979 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
7980 do
7981 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7982 if test x$gcc_cv_gas_version != x; then
7983 break
7984 fi
7985 done
7986 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7987 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7988 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7989 # Gas version 2.6 and later support for .balign and .p2align.
7990 # bytes to skip when using .p2align.
7991 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
7992 gcc_cv_as_alignment_features=".balign and .p2align"
7993 cat >> confdefs.h <<\EOF
7994#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7995EOF
7996
7997 fi
7998 # Gas version 2.8 and later support specifying the maximum
7999 # bytes to skip when using .p2align.
8000 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
8001 gcc_cv_as_alignment_features=".p2align including maximum skip"
8002 cat >> confdefs.h <<\EOF
8003#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
9e423e6d
JW
8004EOF
8005
0b9d02c6 8006 fi
9e423e6d 8007 fi
75bffa71 8008elif test x$host = x$target; then
9e423e6d
JW
8009 # Native build.
8010 gcc_cv_as=as$host_exeext
8011fi
75bffa71 8012if test x$gcc_cv_as != x; then
00ccc16d
JL
8013 # Check if we have .balign and .p2align
8014 echo ".balign 4" > conftest.s
8015 echo ".p2align 2" >> conftest.s
8016 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8017 gcc_cv_as_alignment_features=".balign and .p2align"
8018 cat >> confdefs.h <<\EOF
8019#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
8020EOF
8021
8022 fi
8023 rm -f conftest.s conftest.o
9e423e6d
JW
8024 # Check if specifying the maximum bytes to skip when
8025 # using .p2align is supported.
8026 echo ".p2align 4,,7" > conftest.s
8027 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8028 gcc_cv_as_alignment_features=".p2align including maximum skip"
8029 cat >> confdefs.h <<\EOF
8030#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
8031EOF
8032
8033 fi
8034 rm -f conftest.s conftest.o
8035fi
8036echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
8037
d1accaa3 8038echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
4525d757 8039echo "configure:8040: checking assembler subsection support" >&5
d1accaa3
JJ
8040gcc_cv_as_subsections=
8041if test x$gcc_cv_as != x; then
8042 # Check if we have .subsection
8043 echo ".subsection 1" > conftest.s
8044 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8045 gcc_cv_as_subsections=".subsection"
8046 if test -x nm$host_exeext; then
8047 gcc_cv_nm=./nm$host_exeext
8048 elif test x$host = x$target; then
8049 # Native build.
8050 gcc_cv_nm=nm$host_exeext
8051 fi
8052 if test x$gcc_cv_nm != x; then
8053 cat > conftest.s <<EOF
8054conftest_label1: .word 0
8055.subsection -1
8056conftest_label2: .word 0
8057.previous
8058EOF
8059 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8060 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
8061 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
1b015bec
AO
8062 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
8063 :
8064 else
d1accaa3
JJ
8065 gcc_cv_as_subsections="working .subsection -1"
8066 cat >> confdefs.h <<\EOF
8067#define HAVE_GAS_SUBSECTION_ORDERING 1
8068EOF
8069
8070 fi
8071 fi
8072 fi
8073 fi
8074 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8075fi
8076echo "$ac_t""$gcc_cv_as_subsections" 1>&6
8077
861bb6c1 8078# Figure out what language subdirectories are present.
71205e0b
MH
8079# Look if the user specified --enable-languages="..."; if not, use
8080# the environment variable $LANGUAGES if defined. $LANGUAGES might
8081# go away some day.
8082if test x"${enable_languages+set}" != xset; then
8083 if test x"${LANGUAGES+set}" = xset; then
8084 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
8085 else
8086 enable_languages=all
8087 fi
8088fi
861bb6c1
JL
8089subdirs=
8090for lang in ${srcdir}/*/config-lang.in ..
8091do
8092 case $lang in
8093 ..) ;;
8094 # The odd quoting in the next line works around
8095 # an apparent bug in bash 1.12 on linux.
8096 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
8097 *)
8098 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8099 if test "x$lang_alias" = x
8100 then
8101 echo "$lang doesn't set \$language." 1>&2
8102 exit 1
8103 fi
8104 if test x"${enable_languages}" = xall; then
8105 add_this_lang=yes
8106 else
8107 case "${enable_languages}" in
8108 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
8109 add_this_lang=yes
8110 ;;
8111 * )
8112 add_this_lang=no
8113 ;;
8114 esac
8115 fi
8116 if test x"${add_this_lang}" = xyes; then
8117 case $lang in
8118 ${srcdir}/ada/config-lang.in)
8119 if test x$gnat = xyes ; then
8120 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8121 fi
8122 ;;
8123 *)
8124 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8125 ;;
8126 esac
8127 fi
8128 ;;
861bb6c1
JL
8129 esac
8130done
8131
f24af81b
TT
8132# Make gthr-default.h if we have a thread file.
8133gthread_flags=
75bffa71 8134if test $thread_file != single; then
f24af81b 8135 rm -f gthr-default.h
db0d1ed9 8136 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
8137 gthread_flags=-DHAVE_GTHR_DEFAULT
8138fi
8139
8140
861bb6c1
JL
8141# Make empty files to contain the specs and options for each language.
8142# Then add #include lines to for a compiler that has specs and/or options.
8143
8144lang_specs_files=
8145lang_options_files=
3103b7db
ML
8146lang_tree_files=
8147rm -f specs.h options.h gencheck.h
8148touch specs.h options.h gencheck.h
861bb6c1
JL
8149for subdir in . $subdirs
8150do
75bffa71 8151 if test -f $srcdir/$subdir/lang-specs.h; then
861bb6c1
JL
8152 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
8153 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8154 fi
75bffa71 8155 if test -f $srcdir/$subdir/lang-options.h; then
861bb6c1
JL
8156 echo "#include \"$subdir/lang-options.h\"" >>options.h
8157 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8158 fi
3103b7db
ML
8159 if test -f $srcdir/$subdir/$subdir-tree.def; then
8160 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
8161 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8162 fi
861bb6c1
JL
8163done
8164
8165# These (without "all_") are set in each config-lang.in.
8166# `language' must be a single word so is spelled singularly.
8167all_languages=
8168all_boot_languages=
8169all_compilers=
8170all_stagestuff=
8171all_diff_excludes=
ab87f8c8 8172all_outputs='Makefile intl/Makefile po/Makefile.in'
861bb6c1
JL
8173# List of language makefile fragments.
8174all_lang_makefiles=
8175all_headers=
8176all_lib2funcs=
8177
8178# Add the language fragments.
8179# Languages are added via two mechanisms. Some information must be
8180# recorded in makefile variables, these are defined in config-lang.in.
8181# We accumulate them and plug them into the main Makefile.
8182# The other mechanism is a set of hooks for each of the main targets
8183# like `clean', `install', etc.
8184
8185language_fragments="Make-lang"
8186language_hooks="Make-hooks"
8187oldstyle_subdirs=
8188
8189for s in .. $subdirs
8190do
75bffa71 8191 if test $s != ".."
861bb6c1
JL
8192 then
8193 language=
8194 boot_language=
8195 compilers=
8196 stagestuff=
8197 diff_excludes=
8198 headers=
8199 outputs=
8200 lib2funcs=
8201 . ${srcdir}/$s/config-lang.in
75bffa71 8202 if test "x$language" = x
861bb6c1
JL
8203 then
8204 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8205 exit 1
8206 fi
8207 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
8208 all_languages="$all_languages $language"
75bffa71 8209 if test "x$boot_language" = xyes
861bb6c1
JL
8210 then
8211 all_boot_languages="$all_boot_languages $language"
8212 fi
8213 all_compilers="$all_compilers $compilers"
8214 all_stagestuff="$all_stagestuff $stagestuff"
8215 all_diff_excludes="$all_diff_excludes $diff_excludes"
8216 all_headers="$all_headers $headers"
8217 all_outputs="$all_outputs $outputs"
75bffa71 8218 if test x$outputs = x
861bb6c1
JL
8219 then
8220 oldstyle_subdirs="$oldstyle_subdirs $s"
8221 fi
8222 all_lib2funcs="$all_lib2funcs $lib2funcs"
8223 fi
8224done
8225
8226# Since we can't use `::' targets, we link each language in
8227# with a set of hooks, reached indirectly via lang.${target}.
8228
8229rm -f Make-hooks
8230touch Make-hooks
8231target_list="all.build all.cross start.encap rest.encap \
8232 info dvi \
8233 install-normal install-common install-info install-man \
8234 uninstall distdir \
8235 mostlyclean clean distclean extraclean maintainer-clean \
8236 stage1 stage2 stage3 stage4"
8237for t in $target_list
8238do
8239 x=
ab87f8c8 8240 for lang in .. $all_languages
861bb6c1 8241 do
ab87f8c8
JL
8242 if test $lang != ".."; then
8243 x="$x $lang.$t"
861bb6c1
JL
8244 fi
8245 done
8246 echo "lang.$t: $x" >> Make-hooks
8247done
8248
8249# If we're not building in srcdir, create .gdbinit.
8250
75bffa71 8251if test ! -f Makefile.in; then
861bb6c1
JL
8252 echo "dir ." > .gdbinit
8253 echo "dir ${srcdir}" >> .gdbinit
75bffa71 8254 if test x$gdb_needs_out_file_path = xyes
861bb6c1
JL
8255 then
8256 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8257 fi
75bffa71 8258 if test "x$subdirs" != x; then
861bb6c1
JL
8259 for s in $subdirs
8260 do
8261 echo "dir ${srcdir}/$s" >> .gdbinit
8262 done
8263 fi
8264 echo "source ${srcdir}/.gdbinit" >> .gdbinit
8265fi
8266
88111b26
JL
8267# Define variables host_canonical and build_canonical
8268# because some Cygnus local changes in the Makefile depend on them.
8269build_canonical=${build}
8270host_canonical=${host}
8271target_subdir=
75bffa71 8272if test "${host}" != "${target}" ; then
88111b26
JL
8273 target_subdir=${target}/
8274fi
8275
8276
8277
8278
dec88383
DE
8279# If this is using newlib, then define inhibit_libc in
8280# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
8281# libgcc.a, but that's OK because newib should have its own version of
8282# assert.h.
8283inhibit_libc=
75bffa71 8284if test x$with_newlib = xyes; then
dec88383
DE
8285 inhibit_libc=-Dinhibit_libc
8286fi
8287
8288
8c660648
JL
8289# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
8290sched_prefix=
8291sched_cflags=
75bffa71 8292if test x$enable_haifa = xyes; then
8c660648
JL
8293 echo "Using the Haifa scheduler."
8294 sched_prefix=haifa-
8295 sched_cflags=-DHAIFA
8296fi
8297
8298
75bffa71 8299if test x$enable_haifa != x; then
8c660648 8300 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
81814e35 8301 for x in genattrtab.o toplev.o *sched.o; do
75bffa71 8302 if test -f $x; then
8c660648
JL
8303 echo "Removing $x"
8304 rm -f $x
8305 fi
8306 done
8307fi
8308
8f8d3278
NC
8309# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8310# absolute path for gcc_tooldir based on inserting the number of up-directory
8311# movements required to get from $(exec_prefix) to $(prefix) into the basic
8312# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
8313# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8314# make and thus we'd get different behavior depending on where we built the
8315# sources.
5949a9fc 8316if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d062c304
JL
8317 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8318else
8f8d3278
NC
8319# An explanation of the sed strings:
8320# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8321# -e 's|/$||' match a trailing forward slash and eliminates it
8322# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8323# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
8324#
8325# (*) Note this pattern overwrites the first character of the string
8326# with a forward slash if one is not already present. This is not a
8327# problem because the exact names of the sub-directories concerned is
8328# unimportant, just the number of them matters.
8329#
8330# The practical upshot of these patterns is like this:
8331#
8332# prefix exec_prefix result
8333# ------ ----------- ------
8334# /foo /foo/bar ../
8335# /foo/ /foo/bar ../
8336# /foo /foo/bar/ ../
8337# /foo/ /foo/bar/ ../
8338# /foo /foo/bar/ugg ../../
8339#
4c112cda
NC
8340 dollar='$$'
8341 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
d062c304
JL
8342fi
8343
8344
2ce3c6c6 8345
7e717196
JL
8346# Nothing to do for FLOAT_H, float_format already handled.
8347objdir=`pwd`
8348
8349
861bb6c1
JL
8350# Process the language and host/target makefile fragments.
8351${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8352
8353# Substitute configuration variables
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
9b16d2c4 8400
e9a25f70 8401
6e26218f 8402
c8724862 8403
e061d1ce 8404
f1943b77 8405
0b9d02c6 8406
3103b7db 8407
d8bb17c8 8408
9fc9b82a
L
8409
8410
df37e3db 8411
861bb6c1
JL
8412
8413
8414# Echo that links are built
75bffa71 8415if test x$host = x$target
861bb6c1
JL
8416then
8417 str1="native "
8418else
8419 str1="cross-"
8420 str2=" from $host"
8421fi
8422
75bffa71 8423if test x$host != x$build
861bb6c1
JL
8424then
8425 str3=" on a $build system"
8426fi
8427
75bffa71 8428if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
8429then
8430 str4=
8431fi
8432
8433echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8434
75bffa71 8435if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
8436then
8437 echo " ${str2}${str3}." 1>&2
8438fi
8439
f6cb0e63 8440# Truncate the target if necessary
75bffa71 8441if test x$host_truncate_target != x; then
f6cb0e63
JL
8442 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8443fi
8444
861bb6c1
JL
8445# Configure the subdirectories
8446# AC_CONFIG_SUBDIRS($subdirs)
8447
8448# Create the Makefile
8449# and configure language subdirectories
8450trap '' 1 2 15
8451cat > confcache <<\EOF
8452# This file is a shell script that caches the results of configure
8453# tests run on this system so they can be shared between configure
8454# scripts and configure runs. It is not useful on other systems.
8455# If it contains results you don't want to keep, you may remove or edit it.
8456#
8457# By default, configure uses ./config.cache as the cache file,
8458# creating it if it does not exist already. You can give configure
8459# the --cache-file=FILE option to use a different cache file; that is
8460# what configure does when it calls configure scripts in
8461# subdirectories, so they share the cache.
8462# Giving --cache-file=/dev/null disables caching, for debugging configure.
8463# config.status only pays attention to the cache file if you give it the
8464# --recheck option to rerun configure.
8465#
8466EOF
8467# The following way of writing the cache mishandles newlines in values,
8468# but we know of no workaround that is simple, portable, and efficient.
8469# So, don't put newlines in cache variables' values.
8470# Ultrix sh set writes to stderr and can't be redirected directly,
8471# and sets the high bit in the cache file unless we assign to the vars.
8472(set) 2>&1 |
4525d757 8473 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
861bb6c1
JL
8474 *ac_space=\ *)
8475 # `set' does not quote correctly, so add quotes (double-quote substitution
8476 # turns \\\\ into \\, and sed turns \\ into \).
8477 sed -n \
8478 -e "s/'/'\\\\''/g" \
8479 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8480 ;;
8481 *)
8482 # `set' quotes correctly as required by POSIX, so do not add quotes.
8483 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8484 ;;
8485 esac >> confcache
8486if cmp -s $cache_file confcache; then
8487 :
8488else
8489 if test -w $cache_file; then
8490 echo "updating cache $cache_file"
8491 cat confcache > $cache_file
8492 else
8493 echo "not updating unwritable cache $cache_file"
8494 fi
8495fi
8496rm -f confcache
8497
8498trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8499
8500test "x$prefix" = xNONE && prefix=$ac_default_prefix
8501# Let make expand exec_prefix.
8502test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8503
8504# Any assignment to VPATH causes Sun make to only execute
8505# the first set of double-colon rules, so remove it if not needed.
8506# If there is a colon in the path, we need to keep it.
8507if test "x$srcdir" = x.; then
8508 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8509fi
8510
8511trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8512
8513DEFS=-DHAVE_CONFIG_H
8514
8515# Without the "./", some shells look in PATH for config.status.
8516: ${CONFIG_STATUS=./config.status}
8517
8518echo creating $CONFIG_STATUS
8519rm -f $CONFIG_STATUS
8520cat > $CONFIG_STATUS <<EOF
8521#! /bin/sh
8522# Generated automatically by configure.
8523# Run this file to recreate the current configuration.
8524# This directory was configured as follows,
8525# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8526#
8527# $0 $ac_configure_args
8528#
8529# Compiler output produced by configure, useful for debugging
8530# configure, is in ./config.log if it exists.
8531
8532ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8533for ac_option
8534do
8535 case "\$ac_option" in
8536 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8537 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8538 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8539 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4525d757 8540 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
861bb6c1
JL
8541 exit 0 ;;
8542 -help | --help | --hel | --he | --h)
8543 echo "\$ac_cs_usage"; exit 0 ;;
8544 *) echo "\$ac_cs_usage"; exit 1 ;;
8545 esac
8546done
8547
8548ac_given_srcdir=$srcdir
861bb6c1 8549
b7cb92ad 8550trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
861bb6c1
JL
8551EOF
8552cat >> $CONFIG_STATUS <<EOF
8553
8554# Protect against being on the right side of a sed subst in config.status.
8555sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8556 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8557$ac_vpsub
8558$extrasub
6f144c9c 8559s%@SHELL@%$SHELL%g
861bb6c1
JL
8560s%@CFLAGS@%$CFLAGS%g
8561s%@CPPFLAGS@%$CPPFLAGS%g
8562s%@CXXFLAGS@%$CXXFLAGS%g
8563s%@DEFS@%$DEFS%g
8564s%@LDFLAGS@%$LDFLAGS%g
8565s%@LIBS@%$LIBS%g
8566s%@exec_prefix@%$exec_prefix%g
8567s%@prefix@%$prefix%g
8568s%@program_transform_name@%$program_transform_name%g
8569s%@bindir@%$bindir%g
8570s%@sbindir@%$sbindir%g
8571s%@libexecdir@%$libexecdir%g
8572s%@datadir@%$datadir%g
8573s%@sysconfdir@%$sysconfdir%g
8574s%@sharedstatedir@%$sharedstatedir%g
8575s%@localstatedir@%$localstatedir%g
8576s%@libdir@%$libdir%g
8577s%@includedir@%$includedir%g
8578s%@oldincludedir@%$oldincludedir%g
8579s%@infodir@%$infodir%g
8580s%@mandir@%$mandir%g
8581s%@host@%$host%g
8582s%@host_alias@%$host_alias%g
8583s%@host_cpu@%$host_cpu%g
8584s%@host_vendor@%$host_vendor%g
8585s%@host_os@%$host_os%g
8586s%@target@%$target%g
8587s%@target_alias@%$target_alias%g
8588s%@target_cpu@%$target_cpu%g
8589s%@target_vendor@%$target_vendor%g
8590s%@target_os@%$target_os%g
8591s%@build@%$build%g
8592s%@build_alias@%$build_alias%g
8593s%@build_cpu@%$build_cpu%g
8594s%@build_vendor@%$build_vendor%g
8595s%@build_os@%$build_os%g
e9a25f70 8596s%@CC@%$CC%g
61842080 8597s%@stage1_warn_cflags@%$stage1_warn_cflags%g
e9a25f70 8598s%@SET_MAKE@%$SET_MAKE%g
861bb6c1
JL
8599s%@AWK@%$AWK%g
8600s%@LEX@%$LEX%g
8601s%@LEXLIB@%$LEXLIB%g
0a4b6309
RL
8602s%@LN@%$LN%g
8603s%@LN_S@%$LN_S%g
861bb6c1
JL
8604s%@RANLIB@%$RANLIB%g
8605s%@YACC@%$YACC%g
0a4b6309
RL
8606s%@INSTALL@%$INSTALL%g
8607s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8608s%@INSTALL_DATA@%$INSTALL_DATA%g
861bb6c1 8609s%@CPP@%$CPP%g
bcf12124 8610s%@gnat@%$gnat%g
0a4b6309
RL
8611s%@vfprintf@%$vfprintf%g
8612s%@doprint@%$doprint%g
861bb6c1 8613s%@manext@%$manext%g
992d1248 8614s%@objext@%$objext%g
ab87f8c8
JL
8615s%@PACKAGE@%$PACKAGE%g
8616s%@VERSION@%$VERSION%g
8617s%@ALLOCA@%$ALLOCA%g
8618s%@USE_NLS@%$USE_NLS%g
8619s%@MSGFMT@%$MSGFMT%g
8620s%@GMSGFMT@%$GMSGFMT%g
8621s%@XGETTEXT@%$XGETTEXT%g
8622s%@GENCAT@%$GENCAT%g
8623s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8624s%@CATALOGS@%$CATALOGS%g
8625s%@CATOBJEXT@%$CATOBJEXT%g
8626s%@DATADIRNAME@%$DATADIRNAME%g
8627s%@GMOFILES@%$GMOFILES%g
8628s%@INSTOBJEXT@%$INSTOBJEXT%g
8629s%@INTLDEPS@%$INTLDEPS%g
8630s%@INTLLIBS@%$INTLLIBS%g
8631s%@INTLOBJS@%$INTLOBJS%g
8632s%@POFILES@%$POFILES%g
8633s%@POSUB@%$POSUB%g
8634s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8635s%@GT_NO@%$GT_NO%g
8636s%@GT_YES@%$GT_YES%g
8637s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8638s%@l@%$l%g
f24af81b 8639s%@gthread_flags@%$gthread_flags%g
88111b26
JL
8640s%@build_canonical@%$build_canonical%g
8641s%@host_canonical@%$host_canonical%g
8642s%@target_subdir@%$target_subdir%g
dec88383 8643s%@inhibit_libc@%$inhibit_libc%g
8c660648
JL
8644s%@sched_prefix@%$sched_prefix%g
8645s%@sched_cflags@%$sched_cflags%g
d062c304 8646s%@gcc_tooldir@%$gcc_tooldir%g
4c112cda 8647s%@dollar@%$dollar%g
7e717196 8648s%@objdir@%$objdir%g
861bb6c1
JL
8649s%@subdirs@%$subdirs%g
8650s%@all_languages@%$all_languages%g
8651s%@all_boot_languages@%$all_boot_languages%g
8652s%@all_compilers@%$all_compilers%g
8653s%@all_lang_makefiles@%$all_lang_makefiles%g
8654s%@all_stagestuff@%$all_stagestuff%g
8655s%@all_diff_excludes@%$all_diff_excludes%g
8656s%@all_lib2funcs@%$all_lib2funcs%g
8657s%@all_headers@%$all_headers%g
e061d1ce 8658s%@cpp_main@%$cpp_main%g
861bb6c1
JL
8659s%@extra_passes@%$extra_passes%g
8660s%@extra_programs@%$extra_programs%g
8661s%@extra_parts@%$extra_parts%g
8662s%@extra_c_objs@%$extra_c_objs%g
c8724862 8663s%@extra_cxx_objs@%$extra_cxx_objs%g
0b9d02c6 8664s%@extra_cpp_objs@%$extra_cpp_objs%g
861bb6c1
JL
8665s%@extra_c_flags@%$extra_c_flags%g
8666s%@extra_objs@%$extra_objs%g
8667s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8668s%@extra_headers_list@%$extra_headers_list%g
8669s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8670s%@dep_tmake_file@%$dep_tmake_file%g
8671s%@out_file@%$out_file%g
8672s%@out_object_file@%$out_object_file%g
8673s%@md_file@%$md_file%g
8674s%@tm_file_list@%$tm_file_list%g
8675s%@build_xm_file_list@%$build_xm_file_list%g
8676s%@host_xm_file_list@%$host_xm_file_list%g
8677s%@lang_specs_files@%$lang_specs_files%g
8678s%@lang_options_files@%$lang_options_files%g
3103b7db 8679s%@lang_tree_files@%$lang_tree_files%g
861bb6c1 8680s%@thread_file@%$thread_file%g
d8bb17c8 8681s%@objc_boehm_gc@%$objc_boehm_gc%g
df37e3db 8682s%@JAVAGC@%$JAVAGC%g
f1943b77
MH
8683s%@gcc_version@%$gcc_version%g
8684s%@gcc_version_trigger@%$gcc_version_trigger%g
861bb6c1 8685s%@local_prefix@%$local_prefix%g
8f8d3278 8686s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
861bb6c1
JL
8687s%@fixincludes@%$fixincludes%g
8688s%@build_install_headers_dir@%$build_install_headers_dir%g
8689s%@build_exeext@%$build_exeext%g
6e26218f 8690s%@host_exeext@%$host_exeext%g
027ea2a7 8691s%@float_h_file@%$float_h_file%g
861bb6c1
JL
8692s%@will_use_collect2@%$will_use_collect2%g
8693s%@maybe_use_collect2@%$maybe_use_collect2%g
8694s%@cc_set_by_configure@%$cc_set_by_configure%g
8695s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9b16d2c4 8696s%@install@%$install%g
e9a25f70 8697s%@symbolic_link@%$symbolic_link%g
9fc9b82a 8698s%@cpp_install_dir@%$cpp_install_dir%g
861bb6c1
JL
8699/@target_overrides@/r $target_overrides
8700s%@target_overrides@%%g
8701/@host_overrides@/r $host_overrides
8702s%@host_overrides@%%g
8703s%@cross_defines@%$cross_defines%g
8704/@cross_overrides@/r $cross_overrides
8705s%@cross_overrides@%%g
8706/@build_overrides@/r $build_overrides
8707s%@build_overrides@%%g
8708/@language_fragments@/r $language_fragments
8709s%@language_fragments@%%g
8710/@language_hooks@/r $language_hooks
8711s%@language_hooks@%%g
8712
8713CEOF
8714EOF
8715
8716cat >> $CONFIG_STATUS <<\EOF
8717
8718# Split the substitutions into bite-sized pieces for seds with
8719# small command number limits, like on Digital OSF/1 and HP-UX.
8720ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8721ac_file=1 # Number of current file.
8722ac_beg=1 # First line for current file.
8723ac_end=$ac_max_sed_cmds # Line after last line for current file.
8724ac_more_lines=:
8725ac_sed_cmds=""
8726while $ac_more_lines; do
8727 if test $ac_beg -gt 1; then
8728 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8729 else
8730 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8731 fi
8732 if test ! -s conftest.s$ac_file; then
8733 ac_more_lines=false
8734 rm -f conftest.s$ac_file
8735 else
8736 if test -z "$ac_sed_cmds"; then
8737 ac_sed_cmds="sed -f conftest.s$ac_file"
8738 else
8739 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8740 fi
8741 ac_file=`expr $ac_file + 1`
8742 ac_beg=$ac_end
8743 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8744 fi
8745done
8746if test -z "$ac_sed_cmds"; then
8747 ac_sed_cmds=cat
8748fi
8749EOF
8750
8751cat >> $CONFIG_STATUS <<EOF
8752
8753CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8754EOF
8755cat >> $CONFIG_STATUS <<\EOF
8756for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8757 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8758 case "$ac_file" in
8759 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8760 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8761 *) ac_file_in="${ac_file}.in" ;;
8762 esac
8763
8764 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8765
8766 # Remove last slash and all that follows it. Not all systems have dirname.
8767 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8768 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8769 # The file is in a subdirectory.
8770 test ! -d "$ac_dir" && mkdir "$ac_dir"
8771 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8772 # A "../" for each directory in $ac_dir_suffix.
8773 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8774 else
8775 ac_dir_suffix= ac_dots=
8776 fi
8777
8778 case "$ac_given_srcdir" in
8779 .) srcdir=.
8780 if test -z "$ac_dots"; then top_srcdir=.
8781 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8782 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8783 *) # Relative path.
8784 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8785 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8786 esac
8787
861bb6c1
JL
8788
8789 echo creating "$ac_file"
8790 rm -f "$ac_file"
8791 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8792 case "$ac_file" in
8793 *Makefile*) ac_comsub="1i\\
8794# $configure_input" ;;
8795 *) ac_comsub= ;;
8796 esac
8797
8798 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8799 sed -e "$ac_comsub
8800s%@configure_input@%$configure_input%g
8801s%@srcdir@%$srcdir%g
8802s%@top_srcdir@%$top_srcdir%g
861bb6c1
JL
8803" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8804fi; done
8805rm -f conftest.s*
8806
8807# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8808# NAME is the cpp macro being defined and VALUE is the value it is being given.
8809#
8810# ac_d sets the value in "#define NAME VALUE" lines.
8811ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8812ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8813ac_dC='\3'
8814ac_dD='%g'
8815# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8816ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8817ac_uB='\([ ]\)%\1#\2define\3'
8818ac_uC=' '
8819ac_uD='\4%g'
8820# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8821ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8822ac_eB='$%\1#\2define\3'
8823ac_eC=' '
8824ac_eD='%g'
8825
8826if test "${CONFIG_HEADERS+set}" != set; then
8827EOF
8828cat >> $CONFIG_STATUS <<EOF
b7cb92ad 8829 CONFIG_HEADERS="auto-host.h:config.in"
861bb6c1
JL
8830EOF
8831cat >> $CONFIG_STATUS <<\EOF
8832fi
8833for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8834 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8835 case "$ac_file" in
8836 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8837 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8838 *) ac_file_in="${ac_file}.in" ;;
8839 esac
8840
8841 echo creating $ac_file
8842
8843 rm -f conftest.frag conftest.in conftest.out
8844 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8845 cat $ac_file_inputs > conftest.in
8846
8847EOF
8848
8849# Transform confdefs.h into a sed script conftest.vals that substitutes
8850# the proper values into config.h.in to produce config.h. And first:
8851# Protect against being on the right side of a sed subst in config.status.
8852# Protect against being in an unquoted here document in config.status.
8853rm -f conftest.vals
8854cat > conftest.hdr <<\EOF
8855s/[\\&%]/\\&/g
8856s%[\\$`]%\\&%g
8857s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8858s%ac_d%ac_u%gp
8859s%ac_u%ac_e%gp
8860EOF
8861sed -n -f conftest.hdr confdefs.h > conftest.vals
8862rm -f conftest.hdr
8863
8864# This sed command replaces #undef with comments. This is necessary, for
8865# example, in the case of _POSIX_SOURCE, which is predefined and required
8866# on some systems where configure will not decide to define it.
8867cat >> conftest.vals <<\EOF
8868s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8869EOF
8870
8871# Break up conftest.vals because some shells have a limit on
8872# the size of here documents, and old seds have small limits too.
8873
8874rm -f conftest.tail
8875while :
8876do
8877 ac_lines=`grep -c . conftest.vals`
8878 # grep -c gives empty output for an empty file on some AIX systems.
8879 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8880 # Write a limited-size here document to conftest.frag.
8881 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8882 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8883 echo 'CEOF
8884 sed -f conftest.frag conftest.in > conftest.out
8885 rm -f conftest.in
8886 mv conftest.out conftest.in
8887' >> $CONFIG_STATUS
8888 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8889 rm -f conftest.vals
8890 mv conftest.tail conftest.vals
8891done
8892rm -f conftest.vals
8893
8894cat >> $CONFIG_STATUS <<\EOF
8895 rm -f conftest.frag conftest.h
8896 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8897 cat conftest.in >> conftest.h
8898 rm -f conftest.in
8899 if cmp -s $ac_file conftest.h 2>/dev/null; then
8900 echo "$ac_file is unchanged"
8901 rm -f conftest.h
8902 else
8903 # Remove last slash and all that follows it. Not all systems have dirname.
8904 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8905 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8906 # The file is in a subdirectory.
8907 test ! -d "$ac_dir" && mkdir "$ac_dir"
8908 fi
8909 rm -f $ac_file
8910 mv conftest.h $ac_file
8911 fi
8912fi; done
8913
ab87f8c8
JL
8914EOF
8915
8916cat >> $CONFIG_STATUS <<EOF
8917ac_sources="$nls_cv_header_libgt"
8918ac_dests="$nls_cv_header_intl"
8919EOF
8920
8921cat >> $CONFIG_STATUS <<\EOF
8922srcdir=$ac_given_srcdir
8923while test -n "$ac_sources"; do
8924 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
8925 set $ac_sources; ac_source=$1; shift; ac_sources=$*
8926
8927 echo "linking $srcdir/$ac_source to $ac_dest"
8928
8929 if test ! -r $srcdir/$ac_source; then
8930 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
8931 fi
8932 rm -f $ac_dest
8933
8934 # Make relative symlinks.
8935 # Remove last slash and all that follows it. Not all systems have dirname.
8936 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
8937 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
8938 # The dest file is in a subdirectory.
8939 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
8940 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
8941 # A "../" for each directory in $ac_dest_dir_suffix.
8942 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
8943 else
8944 ac_dest_dir_suffix= ac_dots=
8945 fi
8946
8947 case "$srcdir" in
8948 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
8949 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
8950 esac
8951
8952 # Make a symlink if possible; otherwise try a hard link.
8953 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
8954 ln $srcdir/$ac_source $ac_dest; then :
8955 else
8956 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
8957 fi
8958done
861bb6c1
JL
8959EOF
8960cat >> $CONFIG_STATUS <<EOF
8961
ab87f8c8 8962
861bb6c1
JL
8963host='${host}'
8964build='${build}'
8965target='${target}'
8966target_alias='${target_alias}'
8967srcdir='${srcdir}'
8968subdirs='${subdirs}'
8969oldstyle_subdirs='${oldstyle_subdirs}'
8970symbolic_link='${symbolic_link}'
8971program_transform_set='${program_transform_set}'
8972program_transform_name='${program_transform_name}'
8973dep_host_xmake_file='${dep_host_xmake_file}'
8974host_xmake_file='${host_xmake_file}'
8975dep_tmake_file='${dep_tmake_file}'
8976tmake_file='${tmake_file}'
8977thread_file='${thread_file}'
f1943b77
MH
8978gcc_version='${gcc_version}'
8979gcc_version_trigger='${gcc_version_trigger}'
861bb6c1
JL
8980local_prefix='${local_prefix}'
8981build_install_headers_dir='${build_install_headers_dir}'
8982build_exeext='${build_exeext}'
6e26218f 8983host_exeext='${host_exeext}'
7ed46111 8984out_file='${out_file}'
861bb6c1
JL
8985gdb_needs_out_file_path='${gdb_needs_out_file_path}'
8986SET_MAKE='${SET_MAKE}'
861bb6c1
JL
8987target_list='${target_list}'
8988target_overrides='${target_overrides}'
8989host_overrides='${host_overrides}'
8990cross_defines='${cross_defines}'
8991cross_overrides='${cross_overrides}'
8992build_overrides='${build_overrides}'
9fc9b82a 8993cpp_install_dir='${cpp_install_dir}'
861bb6c1
JL
8994
8995EOF
8996cat >> $CONFIG_STATUS <<\EOF
ab87f8c8
JL
8997case "$CONFIG_FILES" in *po/Makefile.in*)
8998 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
8999 esac
861bb6c1
JL
9000
9001. $srcdir/configure.lang
9002case x$CONFIG_HEADERS in
b7cb92ad 9003xauto-host.h:config.in)
861bb6c1
JL
9004echo > cstamp-h ;;
9005esac
93cf819d
BK
9006# If the host supports symlinks, point stage[1234] at ../stage[1234] so
9007# bootstrapping and the installation procedure can still use
9008# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9009# FLAGS_TO_PASS has been modified to solve the problem there.
9010# This is virtually a duplicate of what happens in configure.lang; we do
9011# an extra check to make sure this only happens if ln -s can be used.
75bffa71 9012if test "$symbolic_link" = "ln -s"; then
93cf819d 9013 for d in .. ${subdirs} ; do
75bffa71 9014 if test $d != ..; then
4e8a434e
BK
9015 STARTDIR=`pwd`
9016 cd $d
9017 for t in stage1 stage2 stage3 stage4 include
9018 do
9019 rm -f $t
9020 $symbolic_link ../$t $t 2>/dev/null
9021 done
9022 cd $STARTDIR
93cf819d
BK
9023 fi
9024 done
9025else true ; fi
ab87f8c8
JL
9026# Avoid having to add intl to our include paths.
9027if test -f intl/libintl.h; then
9028 echo creating libintl.h
9029 echo '#include "intl/libintl.h"' >libintl.h
9030fi
861bb6c1
JL
9031
9032exit 0
9033EOF
9034chmod +x $CONFIG_STATUS
9035rm -fr confdefs* $ac_clean_files
9036test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9037