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