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