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