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