]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
Makefile.in: Set SHELL.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1
JL
2
3# Guess values for system-dependent variables and create Makefiles.
b27d2bd5 4# Generated automatically using autoconf version 2.13
861bb6c1
JL
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-gnu-ld arrange to work with GNU ld."
ab339d62
AO
16ac_help="$ac_help
17 --with-ld arrange to use the specified ld (full pathname)."
861bb6c1
JL
18ac_help="$ac_help
19 --with-gnu-as arrange to work with GNU as."
ab339d62
AO
20ac_help="$ac_help
21 --with-as arrange to use the specified as (full pathname)."
861bb6c1
JL
22ac_help="$ac_help
23 --with-stabs arrange to use stabs instead of host debug format."
24ac_help="$ac_help
25 --with-elf arrange to use ELF instead of host debug format."
26ac_help="$ac_help
27 --with-local-prefix=DIR specifies directory to put local include."
28ac_help="$ac_help
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files."
39d6f2e8
MM
31ac_help="$ac_help
32 --enable-multilib enable library support for multiple ABIs"
a494747c 33ac_help="$ac_help
f4524c9e
ZW
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,gc,gcac; default
59f406b7 38 is misc,tree,gc"
3ecc3258
ZW
39ac_help="$ac_help
40 --disable-cpp don't provide a user-visible C preprocessor."
41ac_help="$ac_help
42 --with-cpp-install-dir=DIR
43 install the user visible C preprocessor in DIR
44 (relative to PREFIX) as well as PREFIX/bin."
c5c76735
JL
45ac_help="$ac_help
46 --enable-c-mbchar Enable multibyte characters for C and C++."
861bb6c1
JL
47ac_help="$ac_help
48 --enable-threads enable thread usage for target GCC.
49 --enable-threads=LIB use LIB thread package for target GCC."
d8bb17c8
OP
50ac_help="$ac_help
51 --enable-objc-gc enable the use of Boehm's garbage collector with
52 the GNU Objective-C runtime."
90e6a802 53ac_help="$ac_help
756ee602 54 --with-dwarf2 force the default debug format to be DWARF2."
50503ac8
RH
55ac_help="$ac_help
56 --disable-shared don't provide a shared libgcc."
ab87f8c8 57ac_help="$ac_help
dc6746e7 58 --enable-nls use Native Language Support (default)"
ab87f8c8
JL
59ac_help="$ac_help
60 --disable-nls do not use Native Language Support"
61ac_help="$ac_help
62 --with-included-gettext use the GNU gettext library included here"
63ac_help="$ac_help
64 --with-catgets use catgets functions if available"
f4ab28e3
MK
65ac_help="$ac_help
66 --disable-win32-registry
67 Disable lookup of installation paths in the
68 Registry on Windows hosts.
69 --enable-win32-registry Enable registry lookup (default).
70 --enable-win32-registry=KEY
71 Use KEY instead of GCC version as the last portion
72 of the registry key."
81bf3d9e
RH
73ac_help="$ac_help
74 --with-gc={simple,page} Choose the garbage collection mechanism to use
75 with the compiler."
3c809ba4
AG
76ac_help="$ac_help
77 --with-system-zlib use installed libz"
dc6746e7
PT
78ac_help="$ac_help
79 --enable-maintainer-mode enable make rules and dependencies not useful
80 (and sometimes confusing) to the casual installer"
2bbea3a6
RH
81ac_help="$ac_help
82 --enable-version-specific-runtime-libs Specify that runtime libraries shou
83ld be installed in a compiler-specific directory "
5b15f277
RH
84ac_help="$ac_help
85 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
861bb6c1
JL
86
87# Initialize some variables set by options.
88# The variables have the same names as the options, with
89# dashes changed to underlines.
90build=NONE
91cache_file=./config.cache
92exec_prefix=NONE
93host=NONE
94no_create=
95nonopt=NONE
96no_recursion=
97prefix=NONE
98program_prefix=NONE
99program_suffix=NONE
100program_transform_name=s,x,x,
101silent=
102site=
103srcdir=
104target=NONE
105verbose=
106x_includes=NONE
107x_libraries=NONE
108bindir='${exec_prefix}/bin'
109sbindir='${exec_prefix}/sbin'
110libexecdir='${exec_prefix}/libexec'
111datadir='${prefix}/share'
112sysconfdir='${prefix}/etc'
113sharedstatedir='${prefix}/com'
114localstatedir='${prefix}/var'
115libdir='${exec_prefix}/lib'
116includedir='${prefix}/include'
117oldincludedir='/usr/include'
118infodir='${prefix}/info'
119mandir='${prefix}/man'
120
121# Initialize some other variables.
122subdirs=
123MFLAGS= MAKEFLAGS=
6f144c9c 124SHELL=${CONFIG_SHELL-/bin/sh}
861bb6c1
JL
125# Maximum number of lines to put in a shell here document.
126ac_max_here_lines=12
127
128ac_prev=
129for ac_option
130do
131
132 # If the previous option needs an argument, assign it.
133 if test -n "$ac_prev"; then
134 eval "$ac_prev=\$ac_option"
135 ac_prev=
136 continue
137 fi
138
139 case "$ac_option" in
140 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
141 *) ac_optarg= ;;
142 esac
143
144 # Accept the important Cygnus configure options, so we can diagnose typos.
145
146 case "$ac_option" in
147
148 -bindir | --bindir | --bindi | --bind | --bin | --bi)
149 ac_prev=bindir ;;
150 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
151 bindir="$ac_optarg" ;;
152
153 -build | --build | --buil | --bui | --bu)
154 ac_prev=build ;;
155 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
156 build="$ac_optarg" ;;
157
158 -cache-file | --cache-file | --cache-fil | --cache-fi \
159 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
160 ac_prev=cache_file ;;
161 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
162 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
163 cache_file="$ac_optarg" ;;
164
165 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
166 ac_prev=datadir ;;
167 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
168 | --da=*)
169 datadir="$ac_optarg" ;;
170
171 -disable-* | --disable-*)
172 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
173 # Reject names that are not valid shell variable names.
174 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
175 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176 fi
177 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178 eval "enable_${ac_feature}=no" ;;
179
180 -enable-* | --enable-*)
181 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
182 # Reject names that are not valid shell variable names.
183 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
184 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185 fi
186 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187 case "$ac_option" in
188 *=*) ;;
189 *) ac_optarg=yes ;;
190 esac
191 eval "enable_${ac_feature}='$ac_optarg'" ;;
192
193 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
194 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
195 | --exec | --exe | --ex)
196 ac_prev=exec_prefix ;;
197 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
198 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
199 | --exec=* | --exe=* | --ex=*)
200 exec_prefix="$ac_optarg" ;;
201
202 -gas | --gas | --ga | --g)
203 # Obsolete; use --with-gas.
204 with_gas=yes ;;
205
206 -help | --help | --hel | --he)
207 # Omit some internal or obsolete options to make the list less imposing.
208 # This message is too long to be a string in the A/UX 3.1 sh.
209 cat << EOF
210Usage: configure [options] [host]
211Options: [defaults in brackets after descriptions]
212Configuration:
213 --cache-file=FILE cache test results in FILE
214 --help print this message
215 --no-create do not create output files
216 --quiet, --silent do not print \`checking...' messages
217 --version print the version of autoconf that created configure
218Directory and file names:
219 --prefix=PREFIX install architecture-independent files in PREFIX
220 [$ac_default_prefix]
221 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
222 [same as prefix]
223 --bindir=DIR user executables in DIR [EPREFIX/bin]
224 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
225 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
226 --datadir=DIR read-only architecture-independent data in DIR
227 [PREFIX/share]
228 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
229 --sharedstatedir=DIR modifiable architecture-independent data in DIR
230 [PREFIX/com]
231 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
232 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
233 --includedir=DIR C header files in DIR [PREFIX/include]
234 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
235 --infodir=DIR info documentation in DIR [PREFIX/info]
236 --mandir=DIR man documentation in DIR [PREFIX/man]
237 --srcdir=DIR find the sources in DIR [configure dir or ..]
238 --program-prefix=PREFIX prepend PREFIX to installed program names
239 --program-suffix=SUFFIX append SUFFIX to installed program names
240 --program-transform-name=PROGRAM
241 run sed PROGRAM on installed program names
242EOF
243 cat << EOF
244Host type:
245 --build=BUILD configure for building on BUILD [BUILD=HOST]
246 --host=HOST configure for HOST [guessed]
247 --target=TARGET configure for TARGET [TARGET=HOST]
248Features and packages:
249 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
250 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
251 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
252 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
253 --x-includes=DIR X include files are in DIR
254 --x-libraries=DIR X library files are in DIR
255EOF
256 if test -n "$ac_help"; then
257 echo "--enable and --with options recognized:$ac_help"
258 fi
259 exit 0 ;;
260
261 -host | --host | --hos | --ho)
262 ac_prev=host ;;
263 -host=* | --host=* | --hos=* | --ho=*)
264 host="$ac_optarg" ;;
265
266 -includedir | --includedir | --includedi | --included | --include \
267 | --includ | --inclu | --incl | --inc)
268 ac_prev=includedir ;;
269 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
270 | --includ=* | --inclu=* | --incl=* | --inc=*)
271 includedir="$ac_optarg" ;;
272
273 -infodir | --infodir | --infodi | --infod | --info | --inf)
274 ac_prev=infodir ;;
275 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
276 infodir="$ac_optarg" ;;
277
278 -libdir | --libdir | --libdi | --libd)
279 ac_prev=libdir ;;
280 -libdir=* | --libdir=* | --libdi=* | --libd=*)
281 libdir="$ac_optarg" ;;
282
283 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
284 | --libexe | --libex | --libe)
285 ac_prev=libexecdir ;;
286 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
287 | --libexe=* | --libex=* | --libe=*)
288 libexecdir="$ac_optarg" ;;
289
290 -localstatedir | --localstatedir | --localstatedi | --localstated \
291 | --localstate | --localstat | --localsta | --localst \
292 | --locals | --local | --loca | --loc | --lo)
293 ac_prev=localstatedir ;;
294 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
295 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
296 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
297 localstatedir="$ac_optarg" ;;
298
299 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
300 ac_prev=mandir ;;
301 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 mandir="$ac_optarg" ;;
303
304 -nfp | --nfp | --nf)
305 # Obsolete; use --without-fp.
306 with_fp=no ;;
307
308 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 | --no-cr | --no-c)
310 no_create=yes ;;
311
312 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
314 no_recursion=yes ;;
315
316 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
317 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
318 | --oldin | --oldi | --old | --ol | --o)
319 ac_prev=oldincludedir ;;
320 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
321 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
322 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
323 oldincludedir="$ac_optarg" ;;
324
325 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
326 ac_prev=prefix ;;
327 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
328 prefix="$ac_optarg" ;;
329
330 -program-prefix | --program-prefix | --program-prefi | --program-pref \
331 | --program-pre | --program-pr | --program-p)
332 ac_prev=program_prefix ;;
333 -program-prefix=* | --program-prefix=* | --program-prefi=* \
334 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
335 program_prefix="$ac_optarg" ;;
336
337 -program-suffix | --program-suffix | --program-suffi | --program-suff \
338 | --program-suf | --program-su | --program-s)
339 ac_prev=program_suffix ;;
340 -program-suffix=* | --program-suffix=* | --program-suffi=* \
341 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
342 program_suffix="$ac_optarg" ;;
343
344 -program-transform-name | --program-transform-name \
345 | --program-transform-nam | --program-transform-na \
346 | --program-transform-n | --program-transform- \
347 | --program-transform | --program-transfor \
348 | --program-transfo | --program-transf \
349 | --program-trans | --program-tran \
350 | --progr-tra | --program-tr | --program-t)
351 ac_prev=program_transform_name ;;
352 -program-transform-name=* | --program-transform-name=* \
353 | --program-transform-nam=* | --program-transform-na=* \
354 | --program-transform-n=* | --program-transform-=* \
355 | --program-transform=* | --program-transfor=* \
356 | --program-transfo=* | --program-transf=* \
357 | --program-trans=* | --program-tran=* \
358 | --progr-tra=* | --program-tr=* | --program-t=*)
359 program_transform_name="$ac_optarg" ;;
360
361 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
362 | -silent | --silent | --silen | --sile | --sil)
363 silent=yes ;;
364
365 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
366 ac_prev=sbindir ;;
367 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
368 | --sbi=* | --sb=*)
369 sbindir="$ac_optarg" ;;
370
371 -sharedstatedir | --sharedstatedir | --sharedstatedi \
372 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
373 | --sharedst | --shareds | --shared | --share | --shar \
374 | --sha | --sh)
375 ac_prev=sharedstatedir ;;
376 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
377 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
378 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
379 | --sha=* | --sh=*)
380 sharedstatedir="$ac_optarg" ;;
381
382 -site | --site | --sit)
383 ac_prev=site ;;
384 -site=* | --site=* | --sit=*)
385 site="$ac_optarg" ;;
386
387 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
388 ac_prev=srcdir ;;
389 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
390 srcdir="$ac_optarg" ;;
391
392 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
393 | --syscon | --sysco | --sysc | --sys | --sy)
394 ac_prev=sysconfdir ;;
395 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
396 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
397 sysconfdir="$ac_optarg" ;;
398
399 -target | --target | --targe | --targ | --tar | --ta | --t)
400 ac_prev=target ;;
401 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
402 target="$ac_optarg" ;;
403
404 -v | -verbose | --verbose | --verbos | --verbo | --verb)
405 verbose=yes ;;
406
407 -version | --version | --versio | --versi | --vers)
b27d2bd5 408 echo "configure generated by autoconf version 2.13"
861bb6c1
JL
409 exit 0 ;;
410
411 -with-* | --with-*)
412 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
413 # Reject names that are not valid shell variable names.
414 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
415 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
416 fi
417 ac_package=`echo $ac_package| sed 's/-/_/g'`
418 case "$ac_option" in
419 *=*) ;;
420 *) ac_optarg=yes ;;
421 esac
422 eval "with_${ac_package}='$ac_optarg'" ;;
423
424 -without-* | --without-*)
425 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
426 # Reject names that are not valid shell variable names.
427 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
428 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429 fi
430 ac_package=`echo $ac_package| sed 's/-/_/g'`
431 eval "with_${ac_package}=no" ;;
432
433 --x)
434 # Obsolete; use --with-x.
435 with_x=yes ;;
436
437 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
438 | --x-incl | --x-inc | --x-in | --x-i)
439 ac_prev=x_includes ;;
440 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
441 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
442 x_includes="$ac_optarg" ;;
443
444 -x-libraries | --x-libraries | --x-librarie | --x-librari \
445 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
446 ac_prev=x_libraries ;;
447 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
448 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
449 x_libraries="$ac_optarg" ;;
450
451 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
452 ;;
453
454 *)
455 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
456 echo "configure: warning: $ac_option: invalid host type" 1>&2
457 fi
458 if test "x$nonopt" != xNONE; then
459 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
460 fi
461 nonopt="$ac_option"
462 ;;
463
464 esac
465done
466
467if test -n "$ac_prev"; then
468 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
469fi
470
471trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
472
473# File descriptor usage:
474# 0 standard input
475# 1 file creation
476# 2 errors and warnings
477# 3 some systems may open it to /dev/tty
478# 4 used on the Kubota Titan
479# 6 checking for... messages and results
480# 5 compiler messages saved in config.log
481if test "$silent" = yes; then
482 exec 6>/dev/null
483else
484 exec 6>&1
485fi
486exec 5>./config.log
487
488echo "\
489This file contains any messages produced by compilers while
490running configure, to aid debugging if configure makes a mistake.
491" 1>&5
492
493# Strip out --no-create and --no-recursion so they do not pile up.
494# Also quote any args containing shell metacharacters.
495ac_configure_args=
496for ac_arg
497do
498 case "$ac_arg" in
499 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
500 | --no-cr | --no-c) ;;
501 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
502 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
504 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
505 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
506 esac
507done
508
509# NLS nuisances.
510# Only set these to C if already set. These must not be set unconditionally
511# because not all systems understand e.g. LANG=C (notably SCO).
512# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
513# Non-C LC_CTYPE values break the ctype check.
514if test "${LANG+set}" = set; then LANG=C; export LANG; fi
515if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
516if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
517if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
518
519# confdefs.h avoids OS command line length limits that DEFS can exceed.
520rm -rf conftest* confdefs.h
521# AIX cpp loses on an empty file, so make sure it contains at least a newline.
522echo > confdefs.h
523
524# A filename unique to this package, relative to the directory that
525# configure is in, which we can look for to find out if srcdir is correct.
526ac_unique_file=tree.c
527
528# Find the source files, if location was not specified.
529if test -z "$srcdir"; then
530 ac_srcdir_defaulted=yes
531 # Try the directory containing this script, then its parent.
532 ac_prog=$0
533 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
534 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
535 srcdir=$ac_confdir
536 if test ! -r $srcdir/$ac_unique_file; then
537 srcdir=..
538 fi
539else
540 ac_srcdir_defaulted=no
541fi
542if test ! -r $srcdir/$ac_unique_file; then
543 if test "$ac_srcdir_defaulted" = yes; then
544 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
545 else
546 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
547 fi
548fi
549srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
550
551# Prefer explicitly selected file to automatically selected ones.
3d9d2476
ZW
552if test -z "$CONFIG_SITE"; then
553 if test "x$prefix" != xNONE; then
554 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
555 else
556 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
861bb6c1
JL
557 fi
558fi
559for ac_site_file in $CONFIG_SITE; do
560 if test -r "$ac_site_file"; then
561 echo "loading site script $ac_site_file"
562 . "$ac_site_file"
563 fi
564done
565
566if test -r "$cache_file"; then
567 echo "loading cache $cache_file"
568 . $cache_file
569else
570 echo "creating cache $cache_file"
571 > $cache_file
572fi
573
574ac_ext=c
575# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
576ac_cpp='$CPP $CPPFLAGS'
577ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 578ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
861bb6c1
JL
579cross_compiling=$ac_cv_prog_cc_cross
580
cd9e5e7c
MK
581ac_exeext=
582ac_objext=o
861bb6c1
JL
583if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
584 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
585 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
586 ac_n= ac_c='
587' ac_t=' '
588 else
589 ac_n=-n ac_c= ac_t=
590 fi
591else
592 ac_n= ac_c='\c' ac_t=
593fi
594
595
596
597
861bb6c1
JL
598remove=rm
599hard_link=ln
600symbolic_link='ln -s'
601copy=cp
602
75a39864
JL
603# Check for bogus environment variables.
604# Test if LIBRARY_PATH contains the notation for the current directory
605# since this would lead to problems installing/building glibc.
606# LIBRARY_PATH contains the current directory if one of the following
607# is true:
608# - one of the terminals (":" and ";") is the first or last sign
609# - two terminals occur directly after each other
610# - the path contains an element with a dot in it
611echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
3d9d2476 612echo "configure:613: checking LIBRARY_PATH variable" >&5
75a39864
JL
613case ${LIBRARY_PATH} in
614 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
615 library_path_setting="contains current directory"
616 ;;
617 *)
618 library_path_setting="ok"
619 ;;
620esac
621echo "$ac_t""$library_path_setting" 1>&6
622if test "$library_path_setting" != "ok"; then
623{ echo "configure: error:
624*** LIBRARY_PATH shouldn't contain the current directory when
079bd08e 625*** building gcc. Please change the environment variable
75a39864
JL
626*** and run configure again." 1>&2; exit 1; }
627fi
628
629# Test if GCC_EXEC_PREFIX contains the notation for the current directory
630# since this would lead to problems installing/building glibc.
631# GCC_EXEC_PREFIX contains the current directory if one of the following
632# is true:
633# - one of the terminals (":" and ";") is the first or last sign
634# - two terminals occur directly after each other
635# - the path contains an element with a dot in it
636echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
3d9d2476 637echo "configure:638: checking GCC_EXEC_PREFIX variable" >&5
75a39864
JL
638case ${GCC_EXEC_PREFIX} in
639 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
640 gcc_exec_prefix_setting="contains current directory"
641 ;;
642 *)
643 gcc_exec_prefix_setting="ok"
644 ;;
645esac
646echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
647if test "$gcc_exec_prefix_setting" != "ok"; then
648{ echo "configure: error:
649*** GCC_EXEC_PREFIX shouldn't contain the current directory when
079bd08e 650*** building gcc. Please change the environment variable
75a39864
JL
651*** and run configure again." 1>&2; exit 1; }
652fi
653
861bb6c1
JL
654# Check for additional parameters
655
656# With GNU ld
657# Check whether --with-gnu-ld or --without-gnu-ld was given.
658if test "${with_gnu_ld+set}" = set; then
659 withval="$with_gnu_ld"
df6faf79 660 gnu_ld_flag="$with_gnu_ld"
861bb6c1 661else
df6faf79 662 gnu_ld_flag=no
861bb6c1
JL
663fi
664
665
ab339d62
AO
666# With pre-defined ld
667# Check whether --with-ld or --without-ld was given.
668if test "${with_ld+set}" = set; then
669 withval="$with_ld"
3ccc3a56 670 DEFAULT_LINKER="$with_ld"
ab339d62
AO
671fi
672
3ccc3a56
AO
673if test x"${DEFAULT_LINKER+set}" = x"set"; then
674 if test ! -x "$DEFAULT_LINKER"; then
675 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
e154a394 676 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
ab339d62
AO
677 gnu_ld_flag=yes
678 fi
679 cat >> confdefs.h <<EOF
3ccc3a56 680#define DEFAULT_LINKER "$DEFAULT_LINKER"
ab339d62
AO
681EOF
682
683fi
684
861bb6c1
JL
685# With GNU as
686# Check whether --with-gnu-as or --without-gnu-as was given.
687if test "${with_gnu_as+set}" = set; then
688 withval="$with_gnu_as"
df6faf79 689 gas_flag="$with_gnu_as"
861bb6c1 690else
df6faf79 691 gas_flag=no
861bb6c1
JL
692fi
693
694
ab339d62
AO
695# Check whether --with-as or --without-as was given.
696if test "${with_as+set}" = set; then
697 withval="$with_as"
3ccc3a56 698 DEFAULT_ASSEMBLER="$with_as"
ab339d62
AO
699fi
700
3ccc3a56
AO
701if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
702 if test ! -x "$DEFAULT_ASSEMBLER"; then
703 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
e154a394 704 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
ab339d62
AO
705 gas_flag=yes
706 fi
707 cat >> confdefs.h <<EOF
3ccc3a56 708#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ab339d62
AO
709EOF
710
3ccc3a56 711fi
ab339d62 712
861bb6c1
JL
713# With stabs
714# Check whether --with-stabs or --without-stabs was given.
715if test "${with_stabs+set}" = set; then
716 withval="$with_stabs"
535b86ce 717 stabs="$with_stabs"
861bb6c1
JL
718else
719 stabs=no
720fi
721
722
723# With ELF
724# Check whether --with-elf or --without-elf was given.
725if test "${with_elf+set}" = set; then
726 withval="$with_elf"
535b86ce 727 elf="$with_elf"
861bb6c1
JL
728else
729 elf=no
730fi
731
732
733# Specify the local prefix
4e88d51b 734local_prefix=
861bb6c1
JL
735# Check whether --with-local-prefix or --without-local-prefix was given.
736if test "${with_local_prefix+set}" = set; then
737 withval="$with_local_prefix"
4e88d51b
JM
738 case "${withval}" in
739yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
740no) ;;
741*) local_prefix=$with_local_prefix ;;
742esac
861bb6c1
JL
743fi
744
745
746# Default local prefix if it is empty
75bffa71 747if test x$local_prefix = x; then
861bb6c1
JL
748 local_prefix=/usr/local
749fi
750
8f8d3278
NC
751# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
752# passed in by the toplevel make and thus we'd get different behavior
753# depending on where we built the sources.
754gcc_gxx_include_dir=
861bb6c1
JL
755# Specify the g++ header file directory
756# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
757if test "${with_gxx_include_dir+set}" = set; then
758 withval="$with_gxx_include_dir"
4e88d51b
JM
759 case "${withval}" in
760yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
761no) ;;
8f8d3278 762*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
4e88d51b 763esac
861bb6c1
JL
764fi
765
766
8f8d3278 767if test x${gcc_gxx_include_dir} = x; then
4e88d51b 768 if test x${enable_version_specific_runtime_libs} = xyes; then
8f8d3278 769 gcc_gxx_include_dir='${libsubdir}/include/g++'
4e88d51b 770 else
a270b446 771 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
e2187d3b 772 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
4e88d51b
JM
773 fi
774fi
775
39d6f2e8
MM
776# Determine whether or not multilibs are enabled.
777# Check whether --enable-multilib or --disable-multilib was given.
778if test "${enable_multilib+set}" = set; then
779 enableval="$enable_multilib"
780 :
781else
782 enable_multilib=yes
783fi
784
785
786
a494747c
MM
787# Enable expensive internal checks
788# Check whether --enable-checking or --disable-checking was given.
789if test "${enable_checking+set}" = set; then
790 enableval="$enable_checking"
119d24d1
KG
791 ac_checking=
792ac_tree_checking=
793ac_rtl_checking=
794ac_gc_checking=
795ac_gc_always_collect=
796case "${enableval}" in
51d0e20c 797yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
4e88d51b 798no) ;;
59f406b7 799*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
f4524c9e
ZW
800 set fnord $enableval; shift
801 IFS="$ac_save_IFS"
c62e45ad
KG
802 for check
803 do
f4524c9e 804 case $check in
119d24d1
KG
805 misc) ac_checking=1 ;;
806 tree) ac_tree_checking=1 ;;
807 rtl) ac_rtl_checking=1 ;;
808 gc) ac_gc_checking=1 ;;
809 gcac) ac_gc_always_collect=1 ;;
810 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
811 esac
812 done
813 ;;
814esac
51d0e20c
AJ
815
816else
817 # Enable some checks by default for development versions of GCC
818ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;
819fi
820
119d24d1
KG
821if test x$ac_checking != x ; then
822 cat >> confdefs.h <<\EOF
f4524c9e
ZW
823#define ENABLE_CHECKING 1
824EOF
119d24d1
KG
825
826fi
827if test x$ac_tree_checking != x ; then
828 cat >> confdefs.h <<\EOF
f4524c9e
ZW
829#define ENABLE_TREE_CHECKING 1
830EOF
119d24d1
KG
831
832fi
833if test x$ac_rtl_checking != x ; then
834 cat >> confdefs.h <<\EOF
f4524c9e
ZW
835#define ENABLE_RTL_CHECKING 1
836EOF
119d24d1
KG
837
838fi
839if test x$ac_gc_checking != x ; then
840 cat >> confdefs.h <<\EOF
f4524c9e
ZW
841#define ENABLE_GC_CHECKING 1
842EOF
119d24d1
KG
843
844fi
845if test x$ac_gc_always_collect != x ; then
846 cat >> confdefs.h <<\EOF
f4524c9e
ZW
847#define ENABLE_GC_ALWAYS_COLLECT 1
848EOF
119d24d1
KG
849
850fi
851
a494747c 852
3ecc3258
ZW
853# Check whether --enable-cpp or --disable-cpp was given.
854if test "${enable_cpp+set}" = set; then
855 enableval="$enable_cpp"
856 :
857else
858 enable_cpp=yes
859fi
860
861
862# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
863if test "${with_cpp_install_dir+set}" = set; then
864 withval="$with_cpp_install_dir"
865 if test x$withval = xyes; then
866 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
867elif test x$withval != xno; then
868 cpp_install_dir=$withval
869fi
870fi
871
872
c5c76735
JL
873# Enable Multibyte Characters for C/C++
874# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
875if test "${enable_c_mbchar+set}" = set; then
876 enableval="$enable_c_mbchar"
2618c083 877 if test x$enable_c_mbchar != xno; then
9ec7291f
ZW
878 cat >> confdefs.h <<\EOF
879#define MULTIBYTE_CHARS 1
880EOF
881
c5c76735
JL
882fi
883fi
884
885
861bb6c1
JL
886# Enable threads
887# Pass with no value to take the default
888# Pass with a value to specify a thread package
889# Check whether --enable-threads or --disable-threads was given.
890if test "${enable_threads+set}" = set; then
891 enableval="$enable_threads"
981d4858 892 :
861bb6c1
JL
893else
894 enable_threads=''
895fi
896
897
e445171e 898enable_threads_flag=$enable_threads
861bb6c1 899# Check if a valid thread package
e445171e 900case x${enable_threads_flag} in
861bb6c1
JL
901 x | xno)
902 # No threads
a851212a 903 target_thread_file='single'
861bb6c1
JL
904 ;;
905 xyes)
906 # default
a851212a 907 target_thread_file=''
861bb6c1
JL
908 ;;
909 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
a473fe45 910 xsolaris | xwin32 | xdce | xvxworks | xaix)
e445171e 911 target_thread_file=$enable_threads_flag
861bb6c1
JL
912 ;;
913 *)
914 echo "$enable_threads is an unknown thread package" 1>&2
915 exit 1
916 ;;
917esac
918
d8bb17c8
OP
919# Check whether --enable-objc-gc or --disable-objc-gc was given.
920if test "${enable_objc_gc+set}" = set; then
921 enableval="$enable_objc_gc"
2618c083 922 if test x$enable_objc_gc = xno; then
d8bb17c8
OP
923 objc_boehm_gc=''
924else
925 objc_boehm_gc=1
926fi
927else
928 objc_boehm_gc=''
929fi
930
931
90e6a802
RL
932# Check whether --with-dwarf2 or --without-dwarf2 was given.
933if test "${with_dwarf2+set}" = set; then
934 withval="$with_dwarf2"
935 dwarf2="$with_dwarf2"
936else
937 dwarf2=no
938fi
939
940
50503ac8
RH
941# Check whether --enable-shared or --disable-shared was given.
942if test "${enable_shared+set}" = set; then
943 enableval="$enable_shared"
c785e0fa
AO
944
945 case $enable_shared in
946 yes | no) ;;
947 *)
948 enable_shared=no
949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
950 for pkg in $enableval; do
951 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
952 enable_shared=yes
953 fi
954 done
955 IFS="$ac_save_ifs"
956 ;;
957 esac
958
50503ac8
RH
959else
960 enable_shared=yes
961fi
962
963
964
861bb6c1
JL
965# Determine the host, build, and target systems
966ac_aux_dir=
967for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
968 if test -f $ac_dir/install-sh; then
969 ac_aux_dir=$ac_dir
970 ac_install_sh="$ac_aux_dir/install-sh -c"
971 break
972 elif test -f $ac_dir/install.sh; then
973 ac_aux_dir=$ac_dir
974 ac_install_sh="$ac_aux_dir/install.sh -c"
975 break
976 fi
977done
978if test -z "$ac_aux_dir"; then
979 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
980fi
981ac_config_guess=$ac_aux_dir/config.guess
982ac_config_sub=$ac_aux_dir/config.sub
983ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
984
985
986# Do some error checking and defaulting for the host and target type.
987# The inputs are:
988# configure --host=HOST --target=TARGET --build=BUILD NONOPT
989#
990# The rules are:
991# 1. You are not allowed to specify --host, --target, and nonopt at the
992# same time.
993# 2. Host defaults to nonopt.
994# 3. If nonopt is not specified, then host defaults to the current host,
995# as determined by config.guess.
996# 4. Target and build default to nonopt.
997# 5. If nonopt is not specified, then target and build default to host.
998
999# The aliases save the names the user supplied, while $host etc.
1000# will get canonicalized.
1001case $host---$target---$nonopt in
1002NONE---*---* | *---NONE---* | *---*---NONE) ;;
1003*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1004esac
1005
1006
1007# Make sure we can run config.sub.
6f144c9c 1008if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
861bb6c1
JL
1009else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1010fi
1011
1012echo $ac_n "checking host system type""... $ac_c" 1>&6
3d9d2476 1013echo "configure:1014: checking host system type" >&5
861bb6c1
JL
1014
1015host_alias=$host
1016case "$host_alias" in
1017NONE)
1018 case $nonopt in
1019 NONE)
6f144c9c 1020 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
861bb6c1
JL
1021 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1022 fi ;;
1023 *) host_alias=$nonopt ;;
1024 esac ;;
1025esac
1026
6f144c9c 1027host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861bb6c1
JL
1028host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1029host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1030host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1031echo "$ac_t""$host" 1>&6
1032
1033echo $ac_n "checking target system type""... $ac_c" 1>&6
3d9d2476 1034echo "configure:1035: checking target system type" >&5
861bb6c1
JL
1035
1036target_alias=$target
1037case "$target_alias" in
1038NONE)
1039 case $nonopt in
1040 NONE) target_alias=$host_alias ;;
1041 *) target_alias=$nonopt ;;
1042 esac ;;
1043esac
1044
6f144c9c 1045target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
861bb6c1
JL
1046target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1047target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1048target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1049echo "$ac_t""$target" 1>&6
1050
1051echo $ac_n "checking build system type""... $ac_c" 1>&6
3d9d2476 1052echo "configure:1053: checking build system type" >&5
861bb6c1
JL
1053
1054build_alias=$build
1055case "$build_alias" in
1056NONE)
1057 case $nonopt in
1058 NONE) build_alias=$host_alias ;;
1059 *) build_alias=$nonopt ;;
1060 esac ;;
1061esac
1062
6f144c9c 1063build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
861bb6c1
JL
1064build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067echo "$ac_t""$build" 1>&6
1068
1069test "$host_alias" != "$target_alias" &&
1070 test "$program_prefix$program_suffix$program_transform_name" = \
1071 NONENONEs,x,x, &&
1072 program_prefix=${target_alias}-
1073
1074
e9a25f70
JL
1075# Find the native compiler
1076# Extract the first word of "gcc", so it can be a program name with args.
1077set dummy gcc; ac_word=$2
1078echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3d9d2476 1079echo "configure:1080: checking for $ac_word" >&5
e9a25f70
JL
1080if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1082else
1083 if test -n "$CC"; then
1084 ac_cv_prog_CC="$CC" # Let the user override the test.
1085else
cd9e5e7c 1086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
1087 ac_dummy="$PATH"
1088 for ac_dir in $ac_dummy; do
e9a25f70
JL
1089 test -z "$ac_dir" && ac_dir=.
1090 if test -f $ac_dir/$ac_word; then
1091 ac_cv_prog_CC="gcc"
1092 break
1093 fi
1094 done
1095 IFS="$ac_save_ifs"
1096fi
1097fi
1098CC="$ac_cv_prog_CC"
1099if test -n "$CC"; then
1100 echo "$ac_t""$CC" 1>&6
1101else
1102 echo "$ac_t""no" 1>&6
1103fi
1104
1105if test -z "$CC"; then
1106 # Extract the first word of "cc", so it can be a program name with args.
1107set dummy cc; ac_word=$2
1108echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3d9d2476 1109echo "configure:1110: checking for $ac_word" >&5
e9a25f70
JL
1110if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1112else
1113 if test -n "$CC"; then
1114 ac_cv_prog_CC="$CC" # Let the user override the test.
1115else
cd9e5e7c 1116 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
e9a25f70 1117 ac_prog_rejected=no
b27d2bd5
MK
1118 ac_dummy="$PATH"
1119 for ac_dir in $ac_dummy; do
e9a25f70
JL
1120 test -z "$ac_dir" && ac_dir=.
1121 if test -f $ac_dir/$ac_word; then
1122 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1123 ac_prog_rejected=yes
1124 continue
1125 fi
1126 ac_cv_prog_CC="cc"
1127 break
1128 fi
1129 done
1130 IFS="$ac_save_ifs"
1131if test $ac_prog_rejected = yes; then
1132 # We found a bogon in the path, so make sure we never use it.
1133 set dummy $ac_cv_prog_CC
1134 shift
1135 if test $# -gt 0; then
1136 # We chose a different compiler from the bogus one.
1137 # However, it has the same basename, so the bogon will be chosen
1138 # first if we set CC to just the basename; use the full file name.
1139 shift
1140 set dummy "$ac_dir/$ac_word" "$@"
1141 shift
1142 ac_cv_prog_CC="$@"
1143 fi
1144fi
1145fi
1146fi
1147CC="$ac_cv_prog_CC"
1148if test -n "$CC"; then
1149 echo "$ac_t""$CC" 1>&6
1150else
1151 echo "$ac_t""no" 1>&6
1152fi
1153
cd9e5e7c
MK
1154 if test -z "$CC"; then
1155 case "`uname -s`" in
1156 *win32* | *WIN32*)
1157 # Extract the first word of "cl", so it can be a program name with args.
1158set dummy cl; ac_word=$2
1159echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3d9d2476 1160echo "configure:1161: checking for $ac_word" >&5
cd9e5e7c
MK
1161if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163else
1164 if test -n "$CC"; then
1165 ac_cv_prog_CC="$CC" # Let the user override the test.
1166else
1167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
1168 ac_dummy="$PATH"
1169 for ac_dir in $ac_dummy; do
cd9e5e7c
MK
1170 test -z "$ac_dir" && ac_dir=.
1171 if test -f $ac_dir/$ac_word; then
1172 ac_cv_prog_CC="cl"
1173 break
1174 fi
1175 done
1176 IFS="$ac_save_ifs"
1177fi
1178fi
1179CC="$ac_cv_prog_CC"
1180if test -n "$CC"; then
1181 echo "$ac_t""$CC" 1>&6
1182else
1183 echo "$ac_t""no" 1>&6
1184fi
1185 ;;
1186 esac
1187 fi
e9a25f70
JL
1188 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1189fi
1190
1191echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3d9d2476 1192echo "configure:1193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
e9a25f70
JL
1193
1194ac_ext=c
1195# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1196ac_cpp='$CPP $CPPFLAGS'
1197ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 1198ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
e9a25f70
JL
1199cross_compiling=$ac_cv_prog_cc_cross
1200
b27d2bd5
MK
1201cat > conftest.$ac_ext << EOF
1202
3d9d2476 1203#line 1204 "configure"
e9a25f70 1204#include "confdefs.h"
b27d2bd5 1205
e9a25f70
JL
1206main(){return(0);}
1207EOF
3d9d2476 1208if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e9a25f70
JL
1209 ac_cv_prog_cc_works=yes
1210 # If we can't run a trivial program, we are probably using a cross compiler.
1211 if (./conftest; exit) 2>/dev/null; then
1212 ac_cv_prog_cc_cross=no
1213 else
1214 ac_cv_prog_cc_cross=yes
1215 fi
1216else
1217 echo "configure: failed program was:" >&5
1218 cat conftest.$ac_ext >&5
1219 ac_cv_prog_cc_works=no
1220fi
1221rm -fr conftest*
b27d2bd5
MK
1222ac_ext=c
1223# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1224ac_cpp='$CPP $CPPFLAGS'
1225ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1226ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1227cross_compiling=$ac_cv_prog_cc_cross
e9a25f70
JL
1228
1229echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1230if test $ac_cv_prog_cc_works = no; then
1231 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1232fi
1233echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3d9d2476 1234echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
e9a25f70
JL
1235echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1236cross_compiling=$ac_cv_prog_cc_cross
1237
1238echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3d9d2476 1239echo "configure:1240: checking whether we are using GNU C" >&5
e9a25f70
JL
1240if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1241 echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243 cat > conftest.c <<EOF
1244#ifdef __GNUC__
1245 yes;
1246#endif
1247EOF
3d9d2476 1248if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
e9a25f70
JL
1249 ac_cv_prog_gcc=yes
1250else
1251 ac_cv_prog_gcc=no
1252fi
1253fi
1254
1255echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1256
1257if test $ac_cv_prog_gcc = yes; then
1258 GCC=yes
cd9e5e7c
MK
1259else
1260 GCC=
1261fi
1262
1263ac_test_CFLAGS="${CFLAGS+set}"
1264ac_save_CFLAGS="$CFLAGS"
1265CFLAGS=
1266echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3d9d2476 1267echo "configure:1268: checking whether ${CC-cc} accepts -g" >&5
e9a25f70
JL
1268if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271 echo 'void f(){}' > conftest.c
1272if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1273 ac_cv_prog_cc_g=yes
1274else
1275 ac_cv_prog_cc_g=no
1276fi
1277rm -f conftest*
1278
1279fi
1280
1281echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
cd9e5e7c
MK
1282if test "$ac_test_CFLAGS" = set; then
1283 CFLAGS="$ac_save_CFLAGS"
1284elif test $ac_cv_prog_cc_g = yes; then
1285 if test "$GCC" = yes; then
e9a25f70
JL
1286 CFLAGS="-g -O2"
1287 else
cd9e5e7c 1288 CFLAGS="-g"
81814e35 1289 fi
3723cad9 1290else
cd9e5e7c
MK
1291 if test "$GCC" = yes; then
1292 CFLAGS="-O2"
1293 else
1294 CFLAGS=
1295 fi
e9a25f70
JL
1296fi
1297
3ec83fc2
RH
1298if test "x$CC" != xcc; then
1299 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
3d9d2476 1300echo "configure:1301: checking whether $CC and cc understand -c and -o together" >&5
3ec83fc2
RH
1301else
1302 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
3d9d2476 1303echo "configure:1304: checking whether cc understands -c and -o together" >&5
3ec83fc2
RH
1304fi
1305set dummy $CC; ac_cc="`echo $2 |
1306 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1307if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
1309else
1310 echo 'foo(){}' > conftest.c
1311# Make sure it works both with $CC and with simple cc.
1312# We do the test twice because some compilers refuse to overwrite an
1313# existing .o file with -o, though they will create one.
1314ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
3d9d2476
ZW
1315if { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1316 test -f conftest.o && { (eval echo configure:1317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3ec83fc2
RH
1317then
1318 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1319 if test "x$CC" != xcc; then
1320 # Test first that cc exists at all.
3d9d2476 1321 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
3ec83fc2 1322 ac_try='cc -c conftest.c -o conftest.o 1>&5'
3d9d2476
ZW
1323 if { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1324 test -f conftest.o && { (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3ec83fc2
RH
1325 then
1326 # cc works too.
1327 :
1328 else
1329 # cc exists but doesn't like -o.
1330 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1331 fi
1332 fi
1333 fi
1334else
1335 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1336fi
1337rm -f conftest*
1338
1339fi
1340if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1341 echo "$ac_t""yes" 1>&6
1342else
1343 echo "$ac_t""no" 1>&6
1344 cat >> confdefs.h <<\EOF
1345#define NO_MINUS_C_MINUS_O 1
1346EOF
1347
1348fi
1349
b8dad04b 1350# autoconf is lame and doesn't give us any substitution variable for this.
e38df833 1351if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
b4c7e567 1352 NO_MINUS_C_MINUS_O=yes
b8dad04b
ZW
1353else
1354 OUTPUT_OPTION='-o $@'
b4c7e567 1355fi
3ec83fc2
RH
1356
1357
b8dad04b 1358
75e93faa
ZW
1359echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1360echo "configure:1361: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1361if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1362 echo $ac_n "(cached) $ac_c" 1>&6
1363else
1364 save_CFLAGS="$CFLAGS"
1365CFLAGS="-Wno-long-long"
1366cat > conftest.$ac_ext <<EOF
1367#line 1368 "configure"
1368#include "confdefs.h"
1369
1370int main() {
1371
1372; return 0; }
1373EOF
1374if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1375 rm -rf conftest*
1376 ac_cv_prog_cc_no_long_long=yes
1377else
1378 echo "configure: failed program was:" >&5
1379 cat conftest.$ac_ext >&5
1380 rm -rf conftest*
1381 ac_cv_prog_cc_no_long_long=no
1382fi
1383rm -f conftest*
1384CFLAGS="$save_CFLAGS"
1385fi
1386
1387echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1388strict1_warn=
1389if test $ac_cv_prog_cc_no_long_long = yes; then
1390 strict1_warn="-pedantic -Wno-long-long"
1391fi
1392
1393
84c041a1
ZW
1394echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1395echo "configure:1396: checking how to run the C preprocessor" >&5
1396# On Suns, sometimes $CPP names a directory.
1397if test -n "$CPP" && test -d "$CPP"; then
1398 CPP=
1399fi
1400if test -z "$CPP"; then
1401if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 # This must be in double quotes, not single quotes, because CPP may get
1405 # substituted into the Makefile and "${CC-cc}" will confuse make.
1406 CPP="${CC-cc} -E"
1407 # On the NeXT, cc -E runs the code through the compiler's parser,
1408 # not just through cpp.
1409 cat > conftest.$ac_ext <<EOF
1410#line 1411 "configure"
1411#include "confdefs.h"
1412#include <assert.h>
1413Syntax Error
1414EOF
1415ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1416{ (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1417ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1418if test -z "$ac_err"; then
1419 :
1420else
1421 echo "$ac_err" >&5
1422 echo "configure: failed program was:" >&5
1423 cat conftest.$ac_ext >&5
1424 rm -rf conftest*
1425 CPP="${CC-cc} -E -traditional-cpp"
1426 cat > conftest.$ac_ext <<EOF
1427#line 1428 "configure"
1428#include "confdefs.h"
1429#include <assert.h>
1430Syntax Error
1431EOF
1432ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1433{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1434ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1435if test -z "$ac_err"; then
1436 :
1437else
1438 echo "$ac_err" >&5
1439 echo "configure: failed program was:" >&5
1440 cat conftest.$ac_ext >&5
1441 rm -rf conftest*
1442 CPP="${CC-cc} -nologo -E"
1443 cat > conftest.$ac_ext <<EOF
1444#line 1445 "configure"
1445#include "confdefs.h"
1446#include <assert.h>
1447Syntax Error
1448EOF
1449ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1450{ (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1451ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1452if test -z "$ac_err"; then
1453 :
1454else
1455 echo "$ac_err" >&5
1456 echo "configure: failed program was:" >&5
1457 cat conftest.$ac_ext >&5
1458 rm -rf conftest*
1459 CPP=/lib/cpp
1460fi
1461rm -f conftest*
1462fi
1463rm -f conftest*
1464fi
1465rm -f conftest*
1466 ac_cv_prog_CPP="$CPP"
1467fi
1468 CPP="$ac_cv_prog_CPP"
1469else
1470 ac_cv_prog_CPP="$CPP"
1471fi
1472echo "$ac_t""$CPP" 1>&6
1473
75e93faa 1474echo $ac_n "checking for inline""... $ac_c" 1>&6
84c041a1 1475echo "configure:1476: checking for inline" >&5
75e93faa
ZW
1476if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
1478else
1479 ac_cv_c_inline=no
1480for ac_kw in inline __inline__ __inline; do
1481 cat > conftest.$ac_ext <<EOF
84c041a1 1482#line 1483 "configure"
75e93faa
ZW
1483#include "confdefs.h"
1484
1485int main() {
1486} $ac_kw foo() {
1487; return 0; }
1488EOF
84c041a1 1489if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1490 rm -rf conftest*
1491 ac_cv_c_inline=$ac_kw; break
1492else
1493 echo "configure: failed program was:" >&5
1494 cat conftest.$ac_ext >&5
1495fi
1496rm -f conftest*
1497done
1498
1499fi
1500
1501echo "$ac_t""$ac_cv_c_inline" 1>&6
1502case "$ac_cv_c_inline" in
1503 inline | yes) ;;
1504 no) cat >> confdefs.h <<\EOF
1505#define inline
1506EOF
1507 ;;
1508 *) cat >> confdefs.h <<EOF
1509#define inline $ac_cv_c_inline
1510EOF
1511 ;;
1512esac
1513
1514echo $ac_n "checking for volatile""... $ac_c" 1>&6
84c041a1 1515echo "configure:1516: checking for volatile" >&5
75e93faa
ZW
1516if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
1518else
1519 cat > conftest.$ac_ext <<EOF
84c041a1 1520#line 1521 "configure"
75e93faa
ZW
1521#include "confdefs.h"
1522
1523int main() {
1524volatile int foo;
1525; return 0; }
1526EOF
84c041a1 1527if { (eval echo configure:1528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1528 rm -rf conftest*
1529 gcc_cv_c_volatile=yes
1530else
1531 echo "configure: failed program was:" >&5
1532 cat conftest.$ac_ext >&5
1533 rm -rf conftest*
1534 gcc_cv_c_volatile=no
1535fi
1536rm -f conftest*
1537fi
1538
1539echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1540if test $gcc_cv_c_volatile = yes ; then
1541 cat >> confdefs.h <<\EOF
1542#define HAVE_VOLATILE 1
1543EOF
1544
1545fi
1546
1547
04cabffc 1548echo $ac_n "checking for long double""... $ac_c" 1>&6
84c041a1 1549echo "configure:1550: checking for long double" >&5
04cabffc
KG
1550if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552else
1553 if test "$GCC" = yes; then
1554 gcc_cv_c_long_double=yes
1555else
1556cat > conftest.$ac_ext <<EOF
84c041a1 1557#line 1558 "configure"
04cabffc
KG
1558#include "confdefs.h"
1559
1560int main() {
1561/* The Stardent Vistra knows sizeof(long double), but does not support it. */
1562long double foo = 0.0;
1563/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1564switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1565; return 0; }
1566EOF
84c041a1 1567if { (eval echo configure:1568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
04cabffc
KG
1568 rm -rf conftest*
1569 gcc_cv_c_long_double=yes
1570else
1571 echo "configure: failed program was:" >&5
1572 cat conftest.$ac_ext >&5
1573 rm -rf conftest*
1574 gcc_cv_c_long_double=no
1575fi
1576rm -f conftest*
1577fi
1578fi
1579
1580echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1581if test $gcc_cv_c_long_double = yes; then
1582 cat >> confdefs.h <<\EOF
1583#define HAVE_LONG_DOUBLE 1
1584EOF
1585
1586fi
1587
75e93faa 1588echo $ac_n "checking for long long int""... $ac_c" 1>&6
84c041a1 1589echo "configure:1590: checking for long long int" >&5
75e93faa
ZW
1590if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
1592else
1593 cat > conftest.$ac_ext <<EOF
84c041a1 1594#line 1595 "configure"
75e93faa 1595#include "confdefs.h"
61842080 1596
75e93faa
ZW
1597int main() {
1598long long int i;
1599; return 0; }
1600EOF
84c041a1 1601if { (eval echo configure:1602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1602 rm -rf conftest*
1603 ac_cv_c_long_long=yes
1604else
1605 echo "configure: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1607 rm -rf conftest*
1608 ac_cv_c_long_long=no
1609fi
1610rm -f conftest*
1611fi
1612
1613echo "$ac_t""$ac_cv_c_long_long" 1>&6
1614 if test $ac_cv_c_long_long = yes; then
1615 cat >> confdefs.h <<\EOF
1616#define HAVE_LONG_LONG 1
1617EOF
1618
1619 fi
1620echo $ac_n "checking for __int64""... $ac_c" 1>&6
84c041a1 1621echo "configure:1622: checking for __int64" >&5
75e93faa 1622if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
5c3bc9fb
GK
1623 echo $ac_n "(cached) $ac_c" 1>&6
1624else
75e93faa 1625 cat > conftest.$ac_ext <<EOF
84c041a1 1626#line 1627 "configure"
5c3bc9fb
GK
1627#include "confdefs.h"
1628
1629int main() {
75e93faa
ZW
1630__int64 i;
1631; return 0; }
1632EOF
84c041a1 1633if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1634 rm -rf conftest*
1635 ac_cv_c___int64=yes
1636else
1637 echo "configure: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 rm -rf conftest*
1640 ac_cv_c___int64=no
1641fi
1642rm -f conftest*
1643fi
5c3bc9fb 1644
75e93faa
ZW
1645echo "$ac_t""$ac_cv_c___int64" 1>&6
1646 if test $ac_cv_c___int64 = yes; then
1647 cat >> confdefs.h <<\EOF
1648#define HAVE___INT64 1
1649EOF
1650
1651 fi
1652
1653
1654# sizeof(char) is 1 by definition.
1655echo $ac_n "checking size of short""... $ac_c" 1>&6
84c041a1 1656echo "configure:1657: checking size of short" >&5
75e93faa
ZW
1657if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1658 echo $ac_n "(cached) $ac_c" 1>&6
1659else
1660 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1661 cat > conftest.$ac_ext <<EOF
84c041a1 1662#line 1663 "configure"
75e93faa
ZW
1663#include "confdefs.h"
1664#include "confdefs.h"
1665#include <sys/types.h>
1666
1667
1668int main() {
1669switch (0) case 0: case (sizeof (short) == $ac_size):;
5c3bc9fb
GK
1670; return 0; }
1671EOF
84c041a1 1672if { (eval echo configure:1673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c3bc9fb 1673 rm -rf conftest*
75e93faa 1674 ac_cv_sizeof_short=$ac_size
ff5def20 1675else
5c3bc9fb
GK
1676 echo "configure: failed program was:" >&5
1677 cat conftest.$ac_ext >&5
75e93faa
ZW
1678fi
1679rm -f conftest*
1680 if test x$ac_cv_sizeof_short != x ; then break; fi
1681done
1682
1683fi
1684
1685if test x$ac_cv_sizeof_short = x ; then
1686 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1687fi
1688echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1689cat >> confdefs.h <<EOF
1690#define SIZEOF_SHORT $ac_cv_sizeof_short
1691EOF
1692
1693
1694echo $ac_n "checking size of int""... $ac_c" 1>&6
84c041a1 1695echo "configure:1696: checking size of int" >&5
75e93faa
ZW
1696if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
1698else
1699 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1700 cat > conftest.$ac_ext <<EOF
84c041a1 1701#line 1702 "configure"
75e93faa
ZW
1702#include "confdefs.h"
1703#include "confdefs.h"
1704#include <sys/types.h>
1705
1706
1707int main() {
1708switch (0) case 0: case (sizeof (int) == $ac_size):;
1709; return 0; }
1710EOF
84c041a1 1711if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c3bc9fb 1712 rm -rf conftest*
75e93faa
ZW
1713 ac_cv_sizeof_int=$ac_size
1714else
1715 echo "configure: failed program was:" >&5
1716 cat conftest.$ac_ext >&5
ff5def20
DA
1717fi
1718rm -f conftest*
75e93faa
ZW
1719 if test x$ac_cv_sizeof_int != x ; then break; fi
1720done
1721
5c3bc9fb
GK
1722fi
1723
75e93faa
ZW
1724if test x$ac_cv_sizeof_int = x ; then
1725 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1726fi
1727echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1728cat >> confdefs.h <<EOF
1729#define SIZEOF_INT $ac_cv_sizeof_int
1730EOF
1731
1732
1733echo $ac_n "checking size of long""... $ac_c" 1>&6
84c041a1 1734echo "configure:1735: checking size of long" >&5
75e93faa
ZW
1735if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1737else
1738 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1739 cat > conftest.$ac_ext <<EOF
84c041a1 1740#line 1741 "configure"
75e93faa
ZW
1741#include "confdefs.h"
1742#include "confdefs.h"
1743#include <sys/types.h>
1744
1745
1746int main() {
1747switch (0) case 0: case (sizeof (long) == $ac_size):;
1748; return 0; }
1749EOF
84c041a1 1750if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1751 rm -rf conftest*
1752 ac_cv_sizeof_long=$ac_size
1753else
1754 echo "configure: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1756fi
1757rm -f conftest*
1758 if test x$ac_cv_sizeof_long != x ; then break; fi
1759done
1760
1761fi
1762
1763if test x$ac_cv_sizeof_long = x ; then
1764 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1765fi
1766echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1767cat >> confdefs.h <<EOF
1768#define SIZEOF_LONG $ac_cv_sizeof_long
1769EOF
1770
1771
1772if test $ac_cv_c_long_long = yes; then
1773 echo $ac_n "checking size of long long""... $ac_c" 1>&6
84c041a1 1774echo "configure:1775: checking size of long long" >&5
75e93faa
ZW
1775if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777else
1778 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1779 cat > conftest.$ac_ext <<EOF
84c041a1 1780#line 1781 "configure"
75e93faa
ZW
1781#include "confdefs.h"
1782#include "confdefs.h"
1783#include <sys/types.h>
1784
1785
1786int main() {
1787switch (0) case 0: case (sizeof (long long) == $ac_size):;
1788; return 0; }
1789EOF
84c041a1 1790if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1791 rm -rf conftest*
1792 ac_cv_sizeof_long_long=$ac_size
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796fi
1797rm -f conftest*
1798 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1799done
1800
1801fi
1802
1803if test x$ac_cv_sizeof_long_long = x ; then
1804 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1805fi
1806echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1807cat >> confdefs.h <<EOF
1808#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1809EOF
1810
1811
b8dad04b 1812fi
75e93faa
ZW
1813if test $ac_cv_c___int64 = yes; then
1814 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
84c041a1 1815echo "configure:1816: checking size of __int64" >&5
75e93faa
ZW
1816if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1820 cat > conftest.$ac_ext <<EOF
84c041a1 1821#line 1822 "configure"
75e93faa
ZW
1822#include "confdefs.h"
1823#include "confdefs.h"
1824#include <sys/types.h>
b8dad04b 1825
ff5def20 1826
75e93faa
ZW
1827int main() {
1828switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1829; return 0; }
1830EOF
84c041a1 1831if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1832 rm -rf conftest*
1833 ac_cv_sizeof___int64=$ac_size
1834else
1835 echo "configure: failed program was:" >&5
1836 cat conftest.$ac_ext >&5
1837fi
1838rm -f conftest*
1839 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1840done
1841
1842fi
1843
1844if test x$ac_cv_sizeof___int64 = x ; then
1845 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1846fi
1847echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1848cat >> confdefs.h <<EOF
1849#define SIZEOF___INT64 $ac_cv_sizeof___int64
1850EOF
1851
1852
1853fi
1854
84c041a1
ZW
1855echo $ac_n "checking execution character set""... $ac_c" 1>&6
1856echo "configure:1857: checking execution character set" >&5
1857if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1859else
1860 cat > conftest.$ac_ext <<EOF
1861#line 1862 "configure"
1862#include "confdefs.h"
1863#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1864 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1865ASCII
1866#endif
1867EOF
1868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1869 egrep "ASCII" >/dev/null 2>&1; then
1870 rm -rf conftest*
1871 ac_cv_c_charset=ASCII
1872fi
1873rm -f conftest*
1874
1875 if test x${ac_cv_c_charset+set} != xset; then
1876 cat > conftest.$ac_ext <<EOF
1877#line 1878 "configure"
1878#include "confdefs.h"
1879#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1880 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1881EBCDIC
1882#endif
1883EOF
1884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1885 egrep "EBCDIC" >/dev/null 2>&1; then
1886 rm -rf conftest*
1887 ac_cv_c_charset=EBCDIC
1888fi
1889rm -f conftest*
1890
1891 fi
1892 if test x${ac_cv_c_charset+set} != xset; then
1893 ac_cv_c_charset=unknown
1894 fi
1895fi
1896
1897echo "$ac_t""$ac_cv_c_charset" 1>&6
1898if test $ac_cv_c_charset = unknown; then
1899 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1900elif test $ac_cv_c_charset = EBCDIC; then
1901 cat >> confdefs.h <<\EOF
1902#define HOST_EBCDIC 1
1903EOF
1904
1905fi
1906echo $ac_n "checking floating point format""... $ac_c" 1>&6
1907echo "configure:1908: checking floating point format" >&5
1908if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 # [AC_TRY_COMPILE] will delete the object file before we get a
1912# chance to look at it.
1913cat >conftest.$ac_ext <<EOF
1914/* This will not work unless sizeof(double) == 8. */
1915extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
1916
1917/* This structure must have no internal padding. */
1918struct possibility {
1919 char prefix[8];
1920 double candidate;
1921 char postfix[8];
1922};
1923
1924#define C(cand) { "format::", cand, "::tamrof" }
1925struct possibility table [] =
1926{
1927 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
1928 C( 3.53802595280598432000e+18), /* D__float - VAX */
1929 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
1930 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
1931 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
1932};
1933EOF
1934if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1935 if grep 'format::.@IEEEF.::tamrof' conftest.o >/dev/null 2>&1; then
1936 ac_cv_c_float_format='IEEE (big-endian)'
1937 elif grep 'format::.FEEEI@.::tamrof' conftest.o >/dev/null 2>&1; then
1938 ac_cv_c_float_format='IEEE (little-endian)'
1939 elif grep 'format::.__floa.::tamrof' conftest.o >/dev/null 2>&1; then
1940 ac_cv_c_float_format='VAX D-float'
1941 elif grep 'format::..PDP-1.::tamrof' conftest.o >/dev/null 2>&1; then
1942 ac_cv_c_float_format='PDP-10'
1943 elif grep 'format::.BMHEXF.::tamrof' conftest.o >/dev/null 2>&1; then
1944 ac_cv_c_float_format='IBM 370 hex'
1945 else
1946 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
1947 fi
1948else
1949 { echo "configure: error: compile failed" 1>&2; exit 1; }
1950fi
1951rm -rf conftest*
1952fi
1953
1954echo "$ac_t""$ac_cv_c_float_format" 1>&6
1955format=
1956bigend=
1957case $ac_cv_c_float_format in
1958 'IEEE (big-endian)' )
1959 # IEEE is the default, but define HOST_FLOAT_WORDS_BIG_ENDIAN
1960 # in case it's different from HOST_WORDS_BIG_ENDIAN.
1961 bigend=yes
1962 ;;
1963 'IEEE (little-endian)' )
1964 ;;
1965 'VAX D-float' )
1966 format=VAX_FLOAT_FORMAT
1967 ;;
1968 'PDP-10' )
1969 format=PDP10_FLOAT_FORMAT
1970 ;;
1971 'IBM 370 hex' )
1972 format=IBM_FLOAT_FORMAT
1973 ;;
1974esac
1975if test -n "$format"; then
1976 cat >> confdefs.h <<EOF
1977#define HOST_FLOAT_FORMAT $format
1978EOF
1979
1980fi
1981if test -n "$bigend"; then
1982 cat >> confdefs.h <<\EOF
1983#define HOST_FLOAT_WORDS_BIG_ENDIAN 1
1984EOF
1985
1986fi
1987
1988
61842080
MM
1989# If the native compiler is GCC, we can enable warnings even in stage1.
1990# That's useful for people building cross-compilers, or just running a
1991# quick `make'.
b8dad04b
ZW
1992warn_cflags=
1993if test "x$GCC" = "xyes"; then
1994 warn_cflags='$(GCC_WARN_CFLAGS)'
61842080
MM
1995fi
1996
b8dad04b 1997
5b67ad6f 1998# Stage specific cflags for build.
b8dad04b 1999stage1_cflags=
5b67ad6f
DA
2000case $build in
2001vax-*-*)
2002 if test x$GCC = xyes
2003 then
b8dad04b 2004 stage1_cflags="-Wa,-J"
5b67ad6f 2005 else
b8dad04b 2006 stage1_cflags="-J"
5b67ad6f
DA
2007 fi
2008 ;;
2009esac
2010
2011
e9a25f70 2012echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
84c041a1 2013echo "configure:2014: checking whether ${MAKE-make} sets \${MAKE}" >&5
e9a25f70
JL
2014set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2015if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2017else
2018 cat > conftestmake <<\EOF
2019all:
2020 @echo 'ac_maketemp="${MAKE}"'
2021EOF
2022# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2023eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2024if test -n "$ac_maketemp"; then
2025 eval ac_cv_prog_make_${ac_make}_set=yes
2026else
2027 eval ac_cv_prog_make_${ac_make}_set=no
2028fi
2029rm -f conftestmake
2030fi
2031if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2032 echo "$ac_t""yes" 1>&6
2033 SET_MAKE=
2034else
2035 echo "$ac_t""no" 1>&6
2036 SET_MAKE="MAKE=${MAKE-make}"
2037fi
2038
2039
ab339d62 2040echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
84c041a1 2041echo "configure:2042: checking whether a default assembler was specified" >&5
3ccc3a56 2042if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
e154a394 2043 if test x"$gas_flag" = x"no"; then
3ccc3a56 2044 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
ab339d62 2045 else
3ccc3a56 2046 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
ab339d62
AO
2047 fi
2048else
2049 echo "$ac_t""no" 1>&6
2050fi
2051
2052echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
84c041a1 2053echo "configure:2054: checking whether a default linker was specified" >&5
3ccc3a56 2054if test x"${DEFAULT_LINKER+set}" = x"set"; then
e154a394 2055 if test x"$gnu_ld_flag" = x"no"; then
3ccc3a56 2056 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
ab339d62 2057 else
3ccc3a56 2058 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
ab339d62
AO
2059 fi
2060else
2061 echo "$ac_t""no" 1>&6
2062fi
2063
4070d885 2064echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
84c041a1 2065echo "configure:2066: checking for GNU C library" >&5
4070d885
AJ
2066if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2067 echo $ac_n "(cached) $ac_c" 1>&6
2068else
2069 cat > conftest.$ac_ext <<EOF
84c041a1 2070#line 2071 "configure"
4070d885
AJ
2071#include "confdefs.h"
2072#include <features.h>
2073int main() {
2074
2075#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2076#error Not a GNU C library system
2077#endif
2078; return 0; }
2079EOF
84c041a1 2080if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4070d885
AJ
2081 rm -rf conftest*
2082 gcc_cv_glibc=yes
2083else
2084 echo "configure: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 rm -rf conftest*
2087 gcc_cv_glibc=no
2088fi
2089rm -f conftest*
2090fi
2091
2092echo "$ac_t""$gcc_cv_glibc" 1>&6
c2f7d403 2093if test $gcc_cv_glibc = yes; then
4070d885
AJ
2094 cat >> confdefs.h <<\EOF
2095#define _GNU_SOURCE 1
2096EOF
2097
2098fi
2099
861bb6c1 2100# Find some useful tools
981975b6 2101for ac_prog in gawk mawk nawk awk
861bb6c1
JL
2102do
2103# Extract the first word of "$ac_prog", so it can be a program name with args.
2104set dummy $ac_prog; ac_word=$2
2105echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2106echo "configure:2107: checking for $ac_word" >&5
861bb6c1
JL
2107if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2108 echo $ac_n "(cached) $ac_c" 1>&6
2109else
2110 if test -n "$AWK"; then
2111 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2112else
cd9e5e7c 2113 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2114 ac_dummy="$PATH"
2115 for ac_dir in $ac_dummy; do
861bb6c1
JL
2116 test -z "$ac_dir" && ac_dir=.
2117 if test -f $ac_dir/$ac_word; then
2118 ac_cv_prog_AWK="$ac_prog"
2119 break
2120 fi
2121 done
2122 IFS="$ac_save_ifs"
2123fi
2124fi
2125AWK="$ac_cv_prog_AWK"
2126if test -n "$AWK"; then
2127 echo "$ac_t""$AWK" 1>&6
2128else
2129 echo "$ac_t""no" 1>&6
2130fi
2131
2132test -n "$AWK" && break
2133done
2134
0a4b6309 2135echo $ac_n "checking whether ln works""... $ac_c" 1>&6
84c041a1 2136echo "configure:2137: checking whether ln works" >&5
0a4b6309
RL
2137if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2138 echo $ac_n "(cached) $ac_c" 1>&6
2139else
2140 rm -f conftestdata_t
2141echo >conftestdata_f
2142if ln conftestdata_f conftestdata_t 2>/dev/null
2143then
2144 gcc_cv_prog_LN="ln"
2145else
2146 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2147 then
2148 gcc_cv_prog_LN="ln -s"
2149 else
2150 gcc_cv_prog_LN=cp
2151 fi
2152fi
2153rm -f conftestdata_f conftestdata_t
2154
2155fi
2156LN="$gcc_cv_prog_LN"
2157if test "$gcc_cv_prog_LN" = "ln"; then
2158 echo "$ac_t""yes" 1>&6
2159else
2160 if test "$gcc_cv_prog_LN" = "ln -s"; then
2161 echo "$ac_t""no, using ln -s" 1>&6
2162 else
2163 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2164 fi
2165fi
2166
2167echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
84c041a1 2168echo "configure:2169: checking whether ln -s works" >&5
0a4b6309
RL
2169if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2170 echo $ac_n "(cached) $ac_c" 1>&6
2171else
2172 rm -f conftestdata_t
2173echo >conftestdata_f
2174if ln -s conftestdata_f conftestdata_t 2>/dev/null
2175then
2176 gcc_cv_prog_LN_S="ln -s"
2177else
2178 if ln conftestdata_f conftestdata_t 2>/dev/null
2179 then
2180 gcc_cv_prog_LN_S=ln
2181 else
2182 gcc_cv_prog_LN_S=cp
2183 fi
2184fi
2185rm -f conftestdata_f conftestdata_t
2186
2187fi
2188LN_S="$gcc_cv_prog_LN_S"
2189if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2190 echo "$ac_t""yes" 1>&6
2191else
2192 if test "$gcc_cv_prog_LN_S" = "ln"; then
2193 echo "$ac_t""no, using ln" 1>&6
2194 else
2195 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2196 fi
2197fi
2198
861bb6c1
JL
2199# Extract the first word of "ranlib", so it can be a program name with args.
2200set dummy ranlib; ac_word=$2
2201echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2202echo "configure:2203: checking for $ac_word" >&5
861bb6c1
JL
2203if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2204 echo $ac_n "(cached) $ac_c" 1>&6
2205else
2206 if test -n "$RANLIB"; then
2207 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2208else
cd9e5e7c 2209 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2210 ac_dummy="$PATH"
2211 for ac_dir in $ac_dummy; do
861bb6c1
JL
2212 test -z "$ac_dir" && ac_dir=.
2213 if test -f $ac_dir/$ac_word; then
2214 ac_cv_prog_RANLIB="ranlib"
2215 break
2216 fi
2217 done
2218 IFS="$ac_save_ifs"
2219 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2220fi
2221fi
2222RANLIB="$ac_cv_prog_RANLIB"
2223if test -n "$RANLIB"; then
2224 echo "$ac_t""$RANLIB" 1>&6
2225else
2226 echo "$ac_t""no" 1>&6
2227fi
2228
0a4b6309
RL
2229# Find a good install program. We prefer a C program (faster),
2230# so one script is as good as another. But avoid the broken or
2231# incompatible versions:
2232# SysV /etc/install, /usr/sbin/install
2233# SunOS /usr/etc/install
2234# IRIX /sbin/install
2235# AIX /bin/install
2236# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2237# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2238# ./install, which can be erroneously created by make from ./install.sh.
2239echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
84c041a1 2240echo "configure:2241: checking for a BSD compatible install" >&5
0a4b6309
RL
2241if test -z "$INSTALL"; then
2242if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2243 echo $ac_n "(cached) $ac_c" 1>&6
2244else
2245 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2246 for ac_dir in $PATH; do
2247 # Account for people who put trailing slashes in PATH elements.
2248 case "$ac_dir/" in
2249 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2250 *)
2251 # OSF1 and SCO ODT 3.0 have their own names for install.
2252 for ac_prog in ginstall scoinst install; do
2253 if test -f $ac_dir/$ac_prog; then
2254 if test $ac_prog = install &&
2255 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2256 # AIX install. It has an incompatible calling convention.
2257 # OSF/1 installbsd also uses dspmsg, but is usable.
2258 :
2259 else
2260 ac_cv_path_install="$ac_dir/$ac_prog -c"
2261 break 2
2262 fi
2263 fi
2264 done
2265 ;;
2266 esac
2267 done
2268 IFS="$ac_save_IFS"
2269
2270fi
2271 if test "${ac_cv_path_install+set}" = set; then
2272 INSTALL="$ac_cv_path_install"
2273 else
2274 # As a last resort, use the slow shell script. We don't cache a
2275 # path for INSTALL within a source directory, because that will
2276 # break other packages using the cache if that directory is
2277 # removed, or if the path is relative.
2278 INSTALL="$ac_install_sh"
2279 fi
2280fi
2281echo "$ac_t""$INSTALL" 1>&6
2282
2283# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2284# It thinks the first close brace ends the variable substitution.
2285test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2286
2287test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2288
861bb6c1 2289
956d6950 2290echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
84c041a1 2291echo "configure:2292: checking for ANSI C header files" >&5
956d6950
JL
2292if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2293 echo $ac_n "(cached) $ac_c" 1>&6
2294else
2295 cat > conftest.$ac_ext <<EOF
84c041a1 2296#line 2297 "configure"
956d6950
JL
2297#include "confdefs.h"
2298#include <stdlib.h>
2299#include <stdarg.h>
2300#include <string.h>
2301#include <float.h>
2302EOF
2303ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 2304{ (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2305ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
2306if test -z "$ac_err"; then
2307 rm -rf conftest*
2308 ac_cv_header_stdc=yes
2309else
2310 echo "$ac_err" >&5
2311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
2313 rm -rf conftest*
2314 ac_cv_header_stdc=no
2315fi
2316rm -f conftest*
2317
2318if test $ac_cv_header_stdc = yes; then
2319 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2320cat > conftest.$ac_ext <<EOF
84c041a1 2321#line 2322 "configure"
956d6950
JL
2322#include "confdefs.h"
2323#include <string.h>
2324EOF
2325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2326 egrep "memchr" >/dev/null 2>&1; then
2327 :
2328else
2329 rm -rf conftest*
2330 ac_cv_header_stdc=no
2331fi
2332rm -f conftest*
2333
2334fi
2335
2336if test $ac_cv_header_stdc = yes; then
2337 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2338cat > conftest.$ac_ext <<EOF
84c041a1 2339#line 2340 "configure"
956d6950
JL
2340#include "confdefs.h"
2341#include <stdlib.h>
2342EOF
2343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344 egrep "free" >/dev/null 2>&1; then
2345 :
2346else
2347 rm -rf conftest*
2348 ac_cv_header_stdc=no
2349fi
2350rm -f conftest*
2351
2352fi
2353
2354if test $ac_cv_header_stdc = yes; then
2355 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2356if test "$cross_compiling" = yes; then
2357 :
2358else
2359 cat > conftest.$ac_ext <<EOF
84c041a1 2360#line 2361 "configure"
956d6950
JL
2361#include "confdefs.h"
2362#include <ctype.h>
2363#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2364#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2365#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2366int main () { int i; for (i = 0; i < 256; i++)
2367if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2368exit (0); }
2369
2370EOF
84c041a1 2371if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
956d6950
JL
2372then
2373 :
2374else
2375 echo "configure: failed program was:" >&5
2376 cat conftest.$ac_ext >&5
2377 rm -fr conftest*
2378 ac_cv_header_stdc=no
2379fi
2380rm -fr conftest*
2381fi
2382
2383fi
2384fi
2385
2386echo "$ac_t""$ac_cv_header_stdc" 1>&6
2387if test $ac_cv_header_stdc = yes; then
2388 cat >> confdefs.h <<\EOF
2389#define STDC_HEADERS 1
2390EOF
2391
2392fi
2393
2394echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
84c041a1 2395echo "configure:2396: checking whether time.h and sys/time.h may both be included" >&5
956d6950
JL
2396if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2397 echo $ac_n "(cached) $ac_c" 1>&6
2398else
2399 cat > conftest.$ac_ext <<EOF
84c041a1 2400#line 2401 "configure"
956d6950
JL
2401#include "confdefs.h"
2402#include <sys/types.h>
2403#include <sys/time.h>
2404#include <time.h>
2405int main() {
2406struct tm *tp;
2407; return 0; }
2408EOF
84c041a1 2409if { (eval echo configure:2410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
2410 rm -rf conftest*
2411 ac_cv_header_time=yes
2412else
2413 echo "configure: failed program was:" >&5
2414 cat conftest.$ac_ext >&5
2415 rm -rf conftest*
2416 ac_cv_header_time=no
2417fi
2418rm -f conftest*
2419fi
2420
2421echo "$ac_t""$ac_cv_header_time" 1>&6
2422if test $ac_cv_header_time = yes; then
2423 cat >> confdefs.h <<\EOF
2424#define TIME_WITH_SYS_TIME 1
2425EOF
2426
2427fi
2428
0a4b6309 2429echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
84c041a1 2430echo "configure:2431: checking whether string.h and strings.h may both be included" >&5
0a4b6309
RL
2431if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2432 echo $ac_n "(cached) $ac_c" 1>&6
2433else
2434 cat > conftest.$ac_ext <<EOF
84c041a1 2435#line 2436 "configure"
0a4b6309
RL
2436#include "confdefs.h"
2437#include <string.h>
2438#include <strings.h>
2439int main() {
2440
2441; return 0; }
2442EOF
84c041a1 2443if { (eval echo configure:2444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2444 rm -rf conftest*
2445 gcc_cv_header_string=yes
2446else
2447 echo "configure: failed program was:" >&5
2448 cat conftest.$ac_ext >&5
2449 rm -rf conftest*
2450 gcc_cv_header_string=no
2451fi
2452rm -f conftest*
2453fi
2454
2455echo "$ac_t""$gcc_cv_header_string" 1>&6
2456if test $gcc_cv_header_string = yes; then
2457 cat >> confdefs.h <<\EOF
2458#define STRING_WITH_STRINGS 1
2459EOF
2460
2461fi
2462
e9831ca0 2463echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
84c041a1 2464echo "configure:2465: checking for sys/wait.h that is POSIX.1 compatible" >&5
e9831ca0
KG
2465if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2466 echo $ac_n "(cached) $ac_c" 1>&6
2467else
2468 cat > conftest.$ac_ext <<EOF
84c041a1 2469#line 2470 "configure"
e9831ca0
KG
2470#include "confdefs.h"
2471#include <sys/types.h>
2472#include <sys/wait.h>
2473#ifndef WEXITSTATUS
2474#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2475#endif
2476#ifndef WIFEXITED
2477#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2478#endif
2479int main() {
2480int s;
2481wait (&s);
2482s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2483; return 0; }
2484EOF
84c041a1 2485if { (eval echo configure:2486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e9831ca0
KG
2486 rm -rf conftest*
2487 ac_cv_header_sys_wait_h=yes
2488else
2489 echo "configure: failed program was:" >&5
2490 cat conftest.$ac_ext >&5
2491 rm -rf conftest*
2492 ac_cv_header_sys_wait_h=no
2493fi
2494rm -f conftest*
2495fi
2496
2497echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2498if test $ac_cv_header_sys_wait_h = yes; then
2499 cat >> confdefs.h <<\EOF
2500#define HAVE_SYS_WAIT_H 1
2501EOF
2502
2503fi
2504
03c41c05
ZW
2505for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2506 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2507 sys/resource.h sys/param.h sys/times.h sys/stat.h \
d6edb99e 2508 direct.h malloc.h langinfo.h iconv.h stdbool.h
861bb6c1
JL
2509do
2510ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2511echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
84c041a1 2512echo "configure:2513: checking for $ac_hdr" >&5
861bb6c1
JL
2513if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2514 echo $ac_n "(cached) $ac_c" 1>&6
2515else
2516 cat > conftest.$ac_ext <<EOF
84c041a1 2517#line 2518 "configure"
861bb6c1
JL
2518#include "confdefs.h"
2519#include <$ac_hdr>
2520EOF
956d6950 2521ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 2522{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2523ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
2524if test -z "$ac_err"; then
2525 rm -rf conftest*
2526 eval "ac_cv_header_$ac_safe=yes"
2527else
2528 echo "$ac_err" >&5
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531 rm -rf conftest*
2532 eval "ac_cv_header_$ac_safe=no"
2533fi
2534rm -f conftest*
2535fi
2536if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2537 echo "$ac_t""yes" 1>&6
2538 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2539 cat >> confdefs.h <<EOF
2540#define $ac_tr_hdr 1
2541EOF
2542
2543else
2544 echo "$ac_t""no" 1>&6
2545fi
2546done
2547
2548
f24af81b
TT
2549# Check for thread headers.
2550ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2551echo $ac_n "checking for thread.h""... $ac_c" 1>&6
84c041a1 2552echo "configure:2553: checking for thread.h" >&5
f24af81b
TT
2553if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2554 echo $ac_n "(cached) $ac_c" 1>&6
2555else
2556 cat > conftest.$ac_ext <<EOF
84c041a1 2557#line 2558 "configure"
f24af81b
TT
2558#include "confdefs.h"
2559#include <thread.h>
2560EOF
2561ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 2562{ (eval echo configure:2563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2563ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
2564if test -z "$ac_err"; then
2565 rm -rf conftest*
2566 eval "ac_cv_header_$ac_safe=yes"
2567else
2568 echo "$ac_err" >&5
2569 echo "configure: failed program was:" >&5
2570 cat conftest.$ac_ext >&5
2571 rm -rf conftest*
2572 eval "ac_cv_header_$ac_safe=no"
2573fi
2574rm -f conftest*
2575fi
2576if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2577 echo "$ac_t""yes" 1>&6
2578 have_thread_h=yes
2579else
2580 echo "$ac_t""no" 1>&6
2581have_thread_h=
2582fi
2583
2584ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2585echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
84c041a1 2586echo "configure:2587: checking for pthread.h" >&5
f24af81b
TT
2587if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2588 echo $ac_n "(cached) $ac_c" 1>&6
2589else
2590 cat > conftest.$ac_ext <<EOF
84c041a1 2591#line 2592 "configure"
f24af81b
TT
2592#include "confdefs.h"
2593#include <pthread.h>
2594EOF
2595ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 2596{ (eval echo configure:2597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2597ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
2598if test -z "$ac_err"; then
2599 rm -rf conftest*
2600 eval "ac_cv_header_$ac_safe=yes"
2601else
2602 echo "$ac_err" >&5
2603 echo "configure: failed program was:" >&5
2604 cat conftest.$ac_ext >&5
2605 rm -rf conftest*
2606 eval "ac_cv_header_$ac_safe=no"
2607fi
2608rm -f conftest*
2609fi
2610if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2611 echo "$ac_t""yes" 1>&6
2612 have_pthread_h=yes
2613else
2614 echo "$ac_t""no" 1>&6
2615have_pthread_h=
2616fi
2617
2618
84c041a1 2619# These tests can't be done till we know if we have limits.h.
75e93faa 2620echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
84c041a1 2621echo "configure:2622: checking for CHAR_BIT" >&5
75e93faa
ZW
2622if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2623 echo $ac_n "(cached) $ac_c" 1>&6
2624else
2625 cat > conftest.$ac_ext <<EOF
84c041a1 2626#line 2627 "configure"
75e93faa
ZW
2627#include "confdefs.h"
2628#ifdef HAVE_LIMITS_H
2629#include <limits.h>
2630#endif
2631#ifdef CHAR_BIT
2632found
2633#endif
2634EOF
2635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2636 egrep "found" >/dev/null 2>&1; then
2637 rm -rf conftest*
2638 gcc_cv_decl_char_bit=yes
2639else
2640 rm -rf conftest*
2641 gcc_cv_decl_char_bit=no
2642fi
2643rm -f conftest*
2644
2645
2646fi
2647
2648echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2649if test $gcc_cv_decl_char_bit = no; then
2650 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
84c041a1 2651echo "configure:2652: checking number of bits in a byte" >&5
75e93faa
ZW
2652if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
2654else
2655 i=8
2656 gcc_cv_c_nbby=
2657 while test $i -lt 65; do
2658 cat > conftest.$ac_ext <<EOF
84c041a1 2659#line 2660 "configure"
75e93faa
ZW
2660#include "confdefs.h"
2661
2662int main() {
2663switch(0) { case 0: case (char)(1 << $i) && (char)(1 << $i) != 1: ; }
2664; return 0; }
2665EOF
84c041a1 2666if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
2667 rm -rf conftest*
2668 gcc_cv_c_nbby=$i
2669 break
2670else
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2673fi
2674rm -f conftest*
2675 i=`expr $i + 1`
2676 done
2677 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2678
2679fi
2680
2681echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2682if test $gcc_cv_c_nbby = failed; then
2683 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2684else
2685 cat >> confdefs.h <<EOF
2686#define CHAR_BIT $gcc_cv_c_nbby
2687EOF
2688
2689fi
2690fi
84c041a1
ZW
2691echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2692echo "configure:2693: checking whether byte ordering is bigendian" >&5
2693if eval "test \"`echo '$''{'ac_cv_c_compile_bigendian'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2695else
2696 cat >conftest.$ac_ext <<EOF
2697#include "confdefs.h"
2698#ifdef HAVE_LIMITS_H
2699#include <limits.h>
2700#endif
2701/* This structure must have no internal padding. */
2702 struct {
2703 char prefix[sizeof "endian::" - 1];
2704 short word;
2705 } tester = {
2706 "endian::",
2707#if SIZEOF_SHORT == 4
2708 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2709#endif
2710 ('A' << CHAR_BIT) | 'B'
2711};
2712EOF
2713ac_cv_c_compile_bigendian=unknown
2714if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2715 if grep 'endian::AB' conftest.o >/dev/null 2>&1; then
2716 ac_cv_c_compile_bigendian=yes
2717 elif grep 'endian::BA' conftest.o >/dev/null 2>&1; then
2718 ac_cv_c_compile_bigendian=no
2719 fi
2720fi
2721if test $ac_cv_c_compile_bigendian = unknown; then
2722 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2723fi
2724rm -rf conftest*
2725fi
2726
2727echo "$ac_t""$ac_cv_c_compile_bigendian" 1>&6
2728if test $ac_cv_c_compile_bigendian = yes; then
2729 cat >> confdefs.h <<\EOF
2730#define HOST_WORDS_BIG_ENDIAN 1
2731EOF
2732
2733fi
2734
75e93faa 2735
bcf12124
JL
2736# See if GNAT has been installed
2737# Extract the first word of "gnatbind", so it can be a program name with args.
2738set dummy gnatbind; ac_word=$2
2739echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2740echo "configure:2741: checking for $ac_word" >&5
1ffc5c6e 2741if eval "test \"`echo '$''{'ac_cv_prog_have_gnat'+set}'`\" = set"; then
bcf12124
JL
2742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
1ffc5c6e
RK
2744 if test -n "$have_gnat"; then
2745 ac_cv_prog_have_gnat="$have_gnat" # Let the user override the test.
bcf12124 2746else
cd9e5e7c 2747 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2748 ac_dummy="$PATH"
2749 for ac_dir in $ac_dummy; do
bcf12124
JL
2750 test -z "$ac_dir" && ac_dir=.
2751 if test -f $ac_dir/$ac_word; then
1ffc5c6e 2752 ac_cv_prog_have_gnat="yes"
bcf12124
JL
2753 break
2754 fi
2755 done
2756 IFS="$ac_save_ifs"
1ffc5c6e 2757 test -z "$ac_cv_prog_have_gnat" && ac_cv_prog_have_gnat="no"
bcf12124
JL
2758fi
2759fi
1ffc5c6e
RK
2760have_gnat="$ac_cv_prog_have_gnat"
2761if test -n "$have_gnat"; then
2762 echo "$ac_t""$have_gnat" 1>&6
bcf12124
JL
2763else
2764 echo "$ac_t""no" 1>&6
2765fi
2766
2767
955be633
JM
2768# See if we have the mktemp command.
2769# Extract the first word of "mktemp", so it can be a program name with args.
2770set dummy mktemp; ac_word=$2
2771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2772echo "configure:2773: checking for $ac_word" >&5
955be633
JM
2773if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2774 echo $ac_n "(cached) $ac_c" 1>&6
2775else
2776 if test -n "$have_mktemp_command"; then
2777 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2778else
2779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782 test -z "$ac_dir" && ac_dir=.
2783 if test -f $ac_dir/$ac_word; then
2784 ac_cv_prog_have_mktemp_command="yes"
2785 break
2786 fi
2787 done
2788 IFS="$ac_save_ifs"
2789 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2790fi
2791fi
2792have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2793if test -n "$have_mktemp_command"; then
2794 echo "$ac_t""$have_mktemp_command" 1>&6
2795else
2796 echo "$ac_t""no" 1>&6
2797fi
2798
2799
09fa0705
ZW
2800# Do we have a single-tree copy of texinfo?
2801if test -f $srcdir/../texinfo/Makefile.in; then
2802 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2803 gcc_cv_prog_makeinfo_modern=yes
2804 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2805else
2806 # See if makeinfo has been installed and is modern enough
2807 # that we can use it.
2808 # Extract the first word of "makeinfo", so it can be a program name with args.
2809set dummy makeinfo; ac_word=$2
2810echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2811echo "configure:2812: checking for $ac_word" >&5
09fa0705
ZW
2812if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2813 echo $ac_n "(cached) $ac_c" 1>&6
2814else
2815 if test -n "$MAKEINFO"; then
2816 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2817else
2818 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2819 ac_dummy="$PATH"
2820 for ac_dir in $ac_dummy; do
2821 test -z "$ac_dir" && ac_dir=.
2822 if test -f $ac_dir/$ac_word; then
2823 ac_cv_prog_MAKEINFO="makeinfo"
2824 break
2825 fi
2826 done
2827 IFS="$ac_save_ifs"
2828fi
2829fi
2830MAKEINFO="$ac_cv_prog_MAKEINFO"
2831if test -n "$MAKEINFO"; then
2832 echo "$ac_t""$MAKEINFO" 1>&6
2833else
2834 echo "$ac_t""no" 1>&6
2835fi
2836
2837if test -n "$MAKEINFO"; then
2838 # Found it, now check the version.
2839 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
84c041a1 2840echo "configure:2841: checking for modern makeinfo" >&5
09fa0705
ZW
2841if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843else
2844 ac_prog_version=`$MAKEINFO --version 2>&1 |
2845 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
84c041a1 2846 echo "configure:2847: version of makeinfo is $ac_prog_version" >&5
09fa0705
ZW
2847 case $ac_prog_version in
2848 '') gcc_cv_prog_makeinfo_modern=no;;
fd939e46 2849 4.*)
09fa0705
ZW
2850 gcc_cv_prog_makeinfo_modern=yes;;
2851 *) gcc_cv_prog_makeinfo_modern=no;;
2852 esac
2853
2854fi
2855
2856echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2857else
2858 gcc_cv_prog_makeinfo_modern=no
2859fi
2860
2861fi
2862
2863if test $gcc_cv_prog_makeinfo_modern = no; then
2864 echo "configure: warning:
2865*** Makeinfo is missing or too old.
17db6582 2866*** Info documentation will not be built." 1>&2
d21445e7 2867 BUILD_INFO=
09fa0705
ZW
2868else
2869 BUILD_INFO=info
09fa0705
ZW
2870fi
2871
3f896fc2
JM
2872# Is pod2man recent enough to regenerate manpages?
2873echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
84c041a1 2874echo "configure:2875: checking for recent Pod::Man" >&5
3f896fc2 2875if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
fd939e46
JM
2876 echo "$ac_t""yes" 1>&6
2877 GENERATED_MANPAGES=generated-manpages
2878else
2879 echo "$ac_t""no" 1>&6
2880 GENERATED_MANPAGES=
2881fi
2882
1e608388
ZW
2883# How about lex?
2884if test -f $srcdir/../flex/skel.c; then
2885 FLEX='$(objdir)/../flex/flex'
2886else
2887 # Extract the first word of "flex", so it can be a program name with args.
2888set dummy flex; ac_word=$2
2889echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2890echo "configure:2891: checking for $ac_word" >&5
1e608388
ZW
2891if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2892 echo $ac_n "(cached) $ac_c" 1>&6
2893else
2894 if test -n "$FLEX"; then
2895 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2896else
2897 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2898 ac_dummy="$PATH"
2899 for ac_dir in $ac_dummy; do
2900 test -z "$ac_dir" && ac_dir=.
2901 if test -f $ac_dir/$ac_word; then
2902 ac_cv_prog_FLEX="flex"
2903 break
2904 fi
2905 done
2906 IFS="$ac_save_ifs"
2907 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2908fi
2909fi
2910FLEX="$ac_cv_prog_FLEX"
2911if test -n "$FLEX"; then
2912 echo "$ac_t""$FLEX" 1>&6
2913else
2914 echo "$ac_t""no" 1>&6
2915fi
2916
2917fi
2918
2919# Bison?
2920# The -L switch is so bison can find its skeleton file.
2921if test -f $srcdir/../bison/bison.simple; then
2922 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2923else
2924 # Extract the first word of "bison", so it can be a program name with args.
2925set dummy bison; ac_word=$2
2926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 2927echo "configure:2928: checking for $ac_word" >&5
1e608388
ZW
2928if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2929 echo $ac_n "(cached) $ac_c" 1>&6
2930else
2931 if test -n "$BISON"; then
2932 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2933else
2934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2935 ac_dummy="$PATH"
2936 for ac_dir in $ac_dummy; do
2937 test -z "$ac_dir" && ac_dir=.
2938 if test -f $ac_dir/$ac_word; then
2939 ac_cv_prog_BISON="bison"
2940 break
2941 fi
2942 done
2943 IFS="$ac_save_ifs"
2944 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
2945fi
2946fi
2947BISON="$ac_cv_prog_BISON"
2948if test -n "$BISON"; then
2949 echo "$ac_t""$BISON" 1>&6
2950else
2951 echo "$ac_t""no" 1>&6
2952fi
2953
2954fi
2955
890ad3ea
KG
2956# See if the stage1 system preprocessor understands the ANSI C
2957# preprocessor stringification operator.
2958
2959
2960echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
84c041a1 2961echo "configure:2962: checking for preprocessor stringizing operator" >&5
890ad3ea 2962if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
76844337
RH
2963 echo $ac_n "(cached) $ac_c" 1>&6
2964else
2965 cat > conftest.$ac_ext <<EOF
84c041a1 2966#line 2967 "configure"
76844337
RH
2967#include "confdefs.h"
2968
890ad3ea
KG
2969#define x(y) #y
2970
2971char *s = x(teststring);
2972
76844337 2973EOF
890ad3ea
KG
2974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2975 egrep "#teststring" >/dev/null 2>&1; then
76844337 2976 rm -rf conftest*
890ad3ea 2977 ac_cv_c_stringize=no
76844337 2978else
76844337 2979 rm -rf conftest*
890ad3ea 2980 ac_cv_c_stringize=yes
76844337
RH
2981fi
2982rm -f conftest*
890ad3ea 2983
76844337
RH
2984fi
2985
890ad3ea
KG
2986if test "${ac_cv_c_stringize}" = yes
2987then
2988 cat >> confdefs.h <<\EOF
2989#define HAVE_STRINGIZE 1
76844337
RH
2990EOF
2991
2992fi
890ad3ea
KG
2993echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2994
76844337 2995
956d6950
JL
2996# Use <inttypes.h> only if it exists,
2997# doesn't clash with <sys/types.h>, and declares intmax_t.
2998echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
84c041a1 2999echo "configure:3000: checking for inttypes.h" >&5
956d6950
JL
3000if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3002else
3003 cat > conftest.$ac_ext <<EOF
84c041a1 3004#line 3005 "configure"
956d6950
JL
3005#include "confdefs.h"
3006#include <sys/types.h>
3007#include <inttypes.h>
3008int main() {
3009intmax_t i = -1;
3010; return 0; }
3011EOF
84c041a1 3012if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950 3013 rm -rf conftest*
0056a9b5 3014 gcc_cv_header_inttypes_h=yes
956d6950
JL
3015else
3016 echo "configure: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 rm -rf conftest*
3019 gcc_cv_header_inttypes_h=no
3020fi
3021rm -f conftest*
3022fi
3023
3024echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
0056a9b5
KG
3025if test $gcc_cv_header_inttypes_h = yes; then
3026 cat >> confdefs.h <<\EOF
3027#define HAVE_INTTYPES_H 1
3028EOF
3029
3030fi
956d6950 3031
c149cc37 3032
2e09e75a
JM
3033for ac_func in strtoul bsearch putenv popen bcopy \
3034 strchr strrchr kill getrlimit setrlimit atoll atoq \
54953b66 3035 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
130fadbb 3036 fputs_unlocked getrusage iconv nl_langinfo
956d6950
JL
3037do
3038echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 3039echo "configure:3040: checking for $ac_func" >&5
956d6950
JL
3040if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3041 echo $ac_n "(cached) $ac_c" 1>&6
3042else
3043 cat > conftest.$ac_ext <<EOF
84c041a1 3044#line 3045 "configure"
956d6950
JL
3045#include "confdefs.h"
3046/* System header to define __stub macros and hopefully few prototypes,
3047 which can conflict with char $ac_func(); below. */
3048#include <assert.h>
3049/* Override any gcc2 internal prototype to avoid an error. */
3050/* We use char because int might match the return type of a gcc2
3051 builtin and then its argument prototype would still apply. */
3052char $ac_func();
3053
3054int main() {
3055
3056/* The GNU C library defines this for functions which it implements
3057 to always fail with ENOSYS. Some functions are actually named
3058 something starting with __ and the normal name is an alias. */
3059#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3060choke me
3061#else
99b09ff3 3062$ac_func();
956d6950
JL
3063#endif
3064
3065; return 0; }
3066EOF
84c041a1 3067if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
956d6950
JL
3068 rm -rf conftest*
3069 eval "ac_cv_func_$ac_func=yes"
3070else
3071 echo "configure: failed program was:" >&5
3072 cat conftest.$ac_ext >&5
3073 rm -rf conftest*
3074 eval "ac_cv_func_$ac_func=no"
3075fi
3076rm -f conftest*
3077fi
3078
3079if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3080 echo "$ac_t""yes" 1>&6
3081 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3082 cat >> confdefs.h <<EOF
3083#define $ac_tr_func 1
3084EOF
3085
3086else
3087 echo "$ac_t""no" 1>&6
3088fi
3089done
3090
6885fc87 3091
f12bc141 3092echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
84c041a1 3093echo "configure:3094: checking for ssize_t" >&5
f12bc141
ZW
3094if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3095 echo $ac_n "(cached) $ac_c" 1>&6
3096else
3097 cat > conftest.$ac_ext <<EOF
84c041a1 3098#line 3099 "configure"
f12bc141
ZW
3099#include "confdefs.h"
3100#include <sys/types.h>
3101#if STDC_HEADERS
3102#include <stdlib.h>
3103#include <stddef.h>
3104#endif
3105EOF
3106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3107 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3108 rm -rf conftest*
3109 ac_cv_type_ssize_t=yes
3110else
3111 rm -rf conftest*
3112 ac_cv_type_ssize_t=no
3113fi
3114rm -f conftest*
3115
3116fi
3117echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3118if test $ac_cv_type_ssize_t = no; then
3119 cat >> confdefs.h <<\EOF
3120#define ssize_t int
3121EOF
3122
3123fi
3124
0b9d02c6 3125
e256b8b6
DA
3126# Try to determine the array type of the second argument of getgroups
3127# for the target system (int or gid_t).
3128echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
84c041a1 3129echo "configure:3130: checking for uid_t in sys/types.h" >&5
e256b8b6
DA
3130if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3131 echo $ac_n "(cached) $ac_c" 1>&6
3132else
3133 cat > conftest.$ac_ext <<EOF
84c041a1 3134#line 3135 "configure"
e256b8b6
DA
3135#include "confdefs.h"
3136#include <sys/types.h>
3137EOF
3138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3139 egrep "uid_t" >/dev/null 2>&1; then
3140 rm -rf conftest*
3141 ac_cv_type_uid_t=yes
3142else
3143 rm -rf conftest*
3144 ac_cv_type_uid_t=no
3145fi
3146rm -f conftest*
3147
3148fi
3149
3150echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3151if test $ac_cv_type_uid_t = no; then
3152 cat >> confdefs.h <<\EOF
3153#define uid_t int
3154EOF
3155
3156 cat >> confdefs.h <<\EOF
3157#define gid_t int
3158EOF
3159
3160fi
3161
3162echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
84c041a1 3163echo "configure:3164: checking type of array argument to getgroups" >&5
e256b8b6
DA
3164if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3165 echo $ac_n "(cached) $ac_c" 1>&6
3166else
3167 if test "$cross_compiling" = yes; then
3168 ac_cv_type_getgroups=cross
3169else
3170 cat > conftest.$ac_ext <<EOF
84c041a1 3171#line 3172 "configure"
e256b8b6
DA
3172#include "confdefs.h"
3173
3174/* Thanks to Mike Rendell for this test. */
3175#include <sys/types.h>
3176#define NGID 256
3177#undef MAX
3178#define MAX(x, y) ((x) > (y) ? (x) : (y))
3179main()
3180{
3181 gid_t gidset[NGID];
3182 int i, n;
3183 union { gid_t gval; long lval; } val;
3184
3185 val.lval = -1;
3186 for (i = 0; i < NGID; i++)
3187 gidset[i] = val.gval;
3188 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3189 gidset);
3190 /* Exit non-zero if getgroups seems to require an array of ints. This
3191 happens when gid_t is short but getgroups modifies an array of ints. */
3192 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3193}
3194
3195EOF
84c041a1 3196if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
e256b8b6
DA
3197then
3198 ac_cv_type_getgroups=gid_t
3199else
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3202 rm -fr conftest*
3203 ac_cv_type_getgroups=int
3204fi
3205rm -fr conftest*
3206fi
3207
3208if test $ac_cv_type_getgroups = cross; then
3209 cat > conftest.$ac_ext <<EOF
84c041a1 3210#line 3211 "configure"
e256b8b6
DA
3211#include "confdefs.h"
3212#include <unistd.h>
3213EOF
3214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3215 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3216 rm -rf conftest*
3217 ac_cv_type_getgroups=gid_t
3218else
3219 rm -rf conftest*
3220 ac_cv_type_getgroups=int
3221fi
3222rm -f conftest*
3223
3224fi
3225fi
3226
3227echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3228cat >> confdefs.h <<EOF
3229#define GETGROUPS_T $ac_cv_type_getgroups
3230EOF
3231
3232
3233if test "${target}" = "${build}"; then
3234 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3235else
3236 case "${target}" in
3237 # This condition may need some tweaking. It should include all
3238 # targets where the array type of the second argument of getgroups
3239 # is int and the type of gid_t is not equivalent to int.
3240 *-*-sunos* | *-*-ultrix*)
3241 TARGET_GETGROUPS_T=int
3242 ;;
3243 *)
3244 TARGET_GETGROUPS_T=gid_t
3245 ;;
3246 esac
3247fi
3248
3249
0a4b6309 3250echo $ac_n "checking for vprintf""... $ac_c" 1>&6
84c041a1 3251echo "configure:3252: checking for vprintf" >&5
0a4b6309
RL
3252if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3253 echo $ac_n "(cached) $ac_c" 1>&6
3254else
3255 cat > conftest.$ac_ext <<EOF
84c041a1 3256#line 3257 "configure"
0a4b6309
RL
3257#include "confdefs.h"
3258/* System header to define __stub macros and hopefully few prototypes,
3259 which can conflict with char vprintf(); below. */
3260#include <assert.h>
3261/* Override any gcc2 internal prototype to avoid an error. */
3262/* We use char because int might match the return type of a gcc2
3263 builtin and then its argument prototype would still apply. */
3264char vprintf();
3265
3266int main() {
3267
3268/* The GNU C library defines this for functions which it implements
3269 to always fail with ENOSYS. Some functions are actually named
3270 something starting with __ and the normal name is an alias. */
3271#if defined (__stub_vprintf) || defined (__stub___vprintf)
3272choke me
3273#else
99b09ff3 3274vprintf();
0a4b6309
RL
3275#endif
3276
3277; return 0; }
3278EOF
84c041a1 3279if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0a4b6309
RL
3280 rm -rf conftest*
3281 eval "ac_cv_func_vprintf=yes"
3282else
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 rm -rf conftest*
3286 eval "ac_cv_func_vprintf=no"
3287fi
3288rm -f conftest*
3289fi
3290
3291if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3292 echo "$ac_t""yes" 1>&6
3293 cat >> confdefs.h <<\EOF
3294#define HAVE_VPRINTF 1
3295EOF
3296
3297else
3298 echo "$ac_t""no" 1>&6
3299fi
8fa1f09f 3300
0a4b6309
RL
3301if test "$ac_cv_func_vprintf" != yes; then
3302echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
84c041a1 3303echo "configure:3304: checking for _doprnt" >&5
0a4b6309
RL
3304if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3305 echo $ac_n "(cached) $ac_c" 1>&6
3306else
3307 cat > conftest.$ac_ext <<EOF
84c041a1 3308#line 3309 "configure"
0a4b6309
RL
3309#include "confdefs.h"
3310/* System header to define __stub macros and hopefully few prototypes,
3311 which can conflict with char _doprnt(); below. */
3312#include <assert.h>
3313/* Override any gcc2 internal prototype to avoid an error. */
3314/* We use char because int might match the return type of a gcc2
3315 builtin and then its argument prototype would still apply. */
3316char _doprnt();
3317
3318int main() {
3319
3320/* The GNU C library defines this for functions which it implements
3321 to always fail with ENOSYS. Some functions are actually named
3322 something starting with __ and the normal name is an alias. */
3323#if defined (__stub__doprnt) || defined (__stub____doprnt)
3324choke me
3325#else
99b09ff3 3326_doprnt();
0a4b6309
RL
3327#endif
3328
3329; return 0; }
3330EOF
84c041a1 3331if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0a4b6309
RL
3332 rm -rf conftest*
3333 eval "ac_cv_func__doprnt=yes"
3334else
3335 echo "configure: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 rm -rf conftest*
3338 eval "ac_cv_func__doprnt=no"
3339fi
3340rm -f conftest*
3341fi
3342
3343if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3344 echo "$ac_t""yes" 1>&6
3345 cat >> confdefs.h <<\EOF
3346#define HAVE_DOPRNT 1
3347EOF
3348
3349else
3350 echo "$ac_t""no" 1>&6
3351fi
3352
3353fi
3354
3355vfprintf=
3356doprint=
3357if test $ac_cv_func_vprintf != yes ; then
3358 vfprintf=vfprintf.o
3359 if test $ac_cv_func__doprnt != yes ; then
3360 doprint=doprint.o
3361 fi
3362fi
3363
3364
3365
b3e1e64f
MS
3366for ac_func in strstr
3367do
3368echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 3369echo "configure:3370: checking for $ac_func" >&5
b3e1e64f
MS
3370if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3371 echo $ac_n "(cached) $ac_c" 1>&6
3372else
3373 cat > conftest.$ac_ext <<EOF
84c041a1 3374#line 3375 "configure"
b3e1e64f
MS
3375#include "confdefs.h"
3376/* System header to define __stub macros and hopefully few prototypes,
3377 which can conflict with char $ac_func(); below. */
3378#include <assert.h>
3379/* Override any gcc2 internal prototype to avoid an error. */
3380/* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
3382char $ac_func();
3383
3384int main() {
3385
3386/* The GNU C library defines this for functions which it implements
3387 to always fail with ENOSYS. Some functions are actually named
3388 something starting with __ and the normal name is an alias. */
3389#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3390choke me
3391#else
3392$ac_func();
3393#endif
3394
3395; return 0; }
3396EOF
84c041a1 3397if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b3e1e64f
MS
3398 rm -rf conftest*
3399 eval "ac_cv_func_$ac_func=yes"
3400else
3401 echo "configure: failed program was:" >&5
3402 cat conftest.$ac_ext >&5
3403 rm -rf conftest*
3404 eval "ac_cv_func_$ac_func=no"
3405fi
3406rm -f conftest*
3407fi
3408
3409if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3410 echo "$ac_t""yes" 1>&6
3411 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3412 cat >> confdefs.h <<EOF
3413#define $ac_tr_func 1
3414EOF
3415 strstr=
3416else
3417 echo "$ac_t""no" 1>&6
3418strstr=strstr.o
3419fi
3420done
3421
3422
0a4b6309 3423echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
84c041a1 3424echo "configure:3425: checking whether the printf functions support %p" >&5
0a4b6309
RL
3425if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3426 echo $ac_n "(cached) $ac_c" 1>&6
3427else
3428 if test "$cross_compiling" = yes; then
3429 gcc_cv_func_printf_ptr=no
3430else
3431 cat > conftest.$ac_ext <<EOF
84c041a1 3432#line 3433 "configure"
0a4b6309
RL
3433#include "confdefs.h"
3434#include <stdio.h>
3435
86cf1cbd 3436int main()
0a4b6309
RL
3437{
3438 char buf[64];
3439 char *p = buf, *q = NULL;
3440 sprintf(buf, "%p", p);
3441 sscanf(buf, "%p", &q);
86cf1cbd 3442 return (p != q);
0a4b6309
RL
3443}
3444EOF
84c041a1 3445if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0a4b6309
RL
3446then
3447 gcc_cv_func_printf_ptr=yes
3448else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -fr conftest*
3452 gcc_cv_func_printf_ptr=no
3453fi
3454rm -fr conftest*
3455fi
3456
3457rm -f core core.* *.core
3458fi
3459
3460echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3461if test $gcc_cv_func_printf_ptr = yes ; then
3462 cat >> confdefs.h <<\EOF
3463#define HAVE_PRINTF_PTR 1
3464EOF
3465
3466fi
3467
b27d2bd5
MK
3468
3469case "${host}" in
3470*-*-uwin*)
34fa3e7d
MM
3471 { echo "configure: error:
3472*** UWIN may not be used as a host platform because
3473*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
b27d2bd5
MK
3474 ;;
3475esac
c375c43b 3476echo $ac_n "checking for pid_t""... $ac_c" 1>&6
84c041a1 3477echo "configure:3478: checking for pid_t" >&5
c375c43b
KG
3478if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3479 echo $ac_n "(cached) $ac_c" 1>&6
3480else
3481 cat > conftest.$ac_ext <<EOF
84c041a1 3482#line 3483 "configure"
c375c43b
KG
3483#include "confdefs.h"
3484#include <sys/types.h>
3485#if STDC_HEADERS
3486#include <stdlib.h>
3487#include <stddef.h>
3488#endif
3489EOF
3490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 3491 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c375c43b
KG
3492 rm -rf conftest*
3493 ac_cv_type_pid_t=yes
3494else
3495 rm -rf conftest*
3496 ac_cv_type_pid_t=no
3497fi
3498rm -f conftest*
3499
3500fi
3501echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3502if test $ac_cv_type_pid_t = no; then
3503 cat >> confdefs.h <<\EOF
3504#define pid_t int
3505EOF
3506
3507fi
3508
3509ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3510echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
84c041a1 3511echo "configure:3512: checking for vfork.h" >&5
c375c43b
KG
3512if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3513 echo $ac_n "(cached) $ac_c" 1>&6
3514else
3515 cat > conftest.$ac_ext <<EOF
84c041a1 3516#line 3517 "configure"
c375c43b
KG
3517#include "confdefs.h"
3518#include <vfork.h>
3519EOF
3520ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 3521{ (eval echo configure:3522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 3522ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
c375c43b
KG
3523if test -z "$ac_err"; then
3524 rm -rf conftest*
3525 eval "ac_cv_header_$ac_safe=yes"
3526else
3527 echo "$ac_err" >&5
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 rm -rf conftest*
3531 eval "ac_cv_header_$ac_safe=no"
3532fi
3533rm -f conftest*
3534fi
3535if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3536 echo "$ac_t""yes" 1>&6
3537 cat >> confdefs.h <<\EOF
3538#define HAVE_VFORK_H 1
3539EOF
3540
3541else
3542 echo "$ac_t""no" 1>&6
3543fi
3544
3545echo $ac_n "checking for working vfork""... $ac_c" 1>&6
84c041a1 3546echo "configure:3547: checking for working vfork" >&5
c375c43b
KG
3547if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3548 echo $ac_n "(cached) $ac_c" 1>&6
3549else
3550 if test "$cross_compiling" = yes; then
3551 echo $ac_n "checking for vfork""... $ac_c" 1>&6
84c041a1 3552echo "configure:3553: checking for vfork" >&5
c375c43b
KG
3553if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3554 echo $ac_n "(cached) $ac_c" 1>&6
3555else
3556 cat > conftest.$ac_ext <<EOF
84c041a1 3557#line 3558 "configure"
c375c43b
KG
3558#include "confdefs.h"
3559/* System header to define __stub macros and hopefully few prototypes,
3560 which can conflict with char vfork(); below. */
3561#include <assert.h>
3562/* Override any gcc2 internal prototype to avoid an error. */
3563/* We use char because int might match the return type of a gcc2
3564 builtin and then its argument prototype would still apply. */
3565char vfork();
3566
3567int main() {
3568
3569/* The GNU C library defines this for functions which it implements
3570 to always fail with ENOSYS. Some functions are actually named
3571 something starting with __ and the normal name is an alias. */
3572#if defined (__stub_vfork) || defined (__stub___vfork)
3573choke me
3574#else
99b09ff3 3575vfork();
c375c43b
KG
3576#endif
3577
3578; return 0; }
3579EOF
84c041a1 3580if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c375c43b
KG
3581 rm -rf conftest*
3582 eval "ac_cv_func_vfork=yes"
3583else
3584 echo "configure: failed program was:" >&5
3585 cat conftest.$ac_ext >&5
3586 rm -rf conftest*
3587 eval "ac_cv_func_vfork=no"
3588fi
3589rm -f conftest*
3590fi
3591
3592if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3593 echo "$ac_t""yes" 1>&6
3594 :
3595else
3596 echo "$ac_t""no" 1>&6
3597fi
3598
3599ac_cv_func_vfork_works=$ac_cv_func_vfork
3600else
3601 cat > conftest.$ac_ext <<EOF
84c041a1 3602#line 3603 "configure"
c375c43b
KG
3603#include "confdefs.h"
3604/* Thanks to Paul Eggert for this test. */
3605#include <stdio.h>
3606#include <sys/types.h>
3607#include <sys/stat.h>
3608#ifdef HAVE_UNISTD_H
3609#include <unistd.h>
3610#endif
3611#ifdef HAVE_VFORK_H
3612#include <vfork.h>
3613#endif
3614/* On some sparc systems, changes by the child to local and incoming
3615 argument registers are propagated back to the parent.
3616 The compiler is told about this with #include <vfork.h>,
3617 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3618 Test for this by using a static variable whose address
3619 is put into a register that is clobbered by the vfork. */
3620static
3621#ifdef __cplusplus
3622sparc_address_test (int arg)
3623#else
3624sparc_address_test (arg) int arg;
3625#endif
3626{
3627 static pid_t child;
3628 if (!child) {
3629 child = vfork ();
3630 if (child < 0) {
3631 perror ("vfork");
3632 _exit(2);
3633 }
3634 if (!child) {
3635 arg = getpid();
3636 write(-1, "", 0);
3637 _exit (arg);
3638 }
3639 }
3640}
3641main() {
3642 pid_t parent = getpid ();
3643 pid_t child;
3644
3645 sparc_address_test ();
3646
3647 child = vfork ();
3648
3649 if (child == 0) {
3650 /* Here is another test for sparc vfork register problems.
3651 This test uses lots of local variables, at least
3652 as many local variables as main has allocated so far
3653 including compiler temporaries. 4 locals are enough for
3654 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3655 A buggy compiler should reuse the register of parent
3656 for one of the local variables, since it will think that
3657 parent can't possibly be used any more in this routine.
3658 Assigning to the local variable will thus munge parent
3659 in the parent process. */
3660 pid_t
3661 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3662 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3663 /* Convince the compiler that p..p7 are live; otherwise, it might
3664 use the same hardware register for all 8 local variables. */
3665 if (p != p1 || p != p2 || p != p3 || p != p4
3666 || p != p5 || p != p6 || p != p7)
3667 _exit(1);
3668
3669 /* On some systems (e.g. IRIX 3.3),
3670 vfork doesn't separate parent from child file descriptors.
3671 If the child closes a descriptor before it execs or exits,
3672 this munges the parent's descriptor as well.
3673 Test for this by closing stdout in the child. */
3674 _exit(close(fileno(stdout)) != 0);
3675 } else {
3676 int status;
3677 struct stat st;
3678
3679 while (wait(&status) != child)
3680 ;
3681 exit(
3682 /* Was there some problem with vforking? */
3683 child < 0
3684
3685 /* Did the child fail? (This shouldn't happen.) */
3686 || status
3687
3688 /* Did the vfork/compiler bug occur? */
3689 || parent != getpid()
3690
3691 /* Did the file descriptor bug occur? */
3692 || fstat(fileno(stdout), &st) != 0
3693 );
3694 }
3695}
3696EOF
84c041a1 3697if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c375c43b
KG
3698then
3699 ac_cv_func_vfork_works=yes
3700else
3701 echo "configure: failed program was:" >&5
3702 cat conftest.$ac_ext >&5
3703 rm -fr conftest*
3704 ac_cv_func_vfork_works=no
3705fi
3706rm -fr conftest*
3707fi
3708
3709fi
3710
3711echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3712if test $ac_cv_func_vfork_works = no; then
3713 cat >> confdefs.h <<\EOF
3714#define vfork fork
3715EOF
3716
3717fi
3718
81bf3d9e 3719for ac_func in getpagesize
0a4b6309 3720do
81bf3d9e 3721echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 3722echo "configure:3723: checking for $ac_func" >&5
81bf3d9e 3723if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
0a4b6309
RL
3724 echo $ac_n "(cached) $ac_c" 1>&6
3725else
3726 cat > conftest.$ac_ext <<EOF
84c041a1 3727#line 3728 "configure"
0a4b6309 3728#include "confdefs.h"
81bf3d9e
RH
3729/* System header to define __stub macros and hopefully few prototypes,
3730 which can conflict with char $ac_func(); below. */
3731#include <assert.h>
3732/* Override any gcc2 internal prototype to avoid an error. */
3733/* We use char because int might match the return type of a gcc2
3734 builtin and then its argument prototype would still apply. */
3735char $ac_func();
8fa1f09f 3736
81bf3d9e
RH
3737int main() {
3738
3739/* The GNU C library defines this for functions which it implements
3740 to always fail with ENOSYS. Some functions are actually named
3741 something starting with __ and the normal name is an alias. */
3742#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3743choke me
c5c76735 3744#else
99b09ff3 3745$ac_func();
c5c76735
JL
3746#endif
3747
c5c76735
JL
3748; return 0; }
3749EOF
84c041a1 3750if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c5c76735 3751 rm -rf conftest*
81bf3d9e 3752 eval "ac_cv_func_$ac_func=yes"
c5c76735
JL
3753else
3754 echo "configure: failed program was:" >&5
3755 cat conftest.$ac_ext >&5
3756 rm -rf conftest*
81bf3d9e 3757 eval "ac_cv_func_$ac_func=no"
c5c76735
JL
3758fi
3759rm -f conftest*
3760fi
3761
81bf3d9e 3762if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
c5c76735 3763 echo "$ac_t""yes" 1>&6
81bf3d9e 3764 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
c5c76735 3765 cat >> confdefs.h <<EOF
81bf3d9e 3766#define $ac_tr_func 1
c5c76735 3767EOF
81bf3d9e 3768
c5c76735
JL
3769else
3770 echo "$ac_t""no" 1>&6
3771fi
c5c76735
JL
3772done
3773
825b6926
ZW
3774# The test program for the next two tests is the same except for one
3775# set of ifdefs.
3776cat >ct-mmap.inc <<'EOF'
d2cabf16 3777#include <sys/types.h>
81bf3d9e 3778#include <sys/mman.h>
825b6926
ZW
3779#include <fcntl.h>
3780#include <signal.h>
3781#include <setjmp.h>
3782#include <stdio.h>
0a4b6309 3783
4c1331d6
DA
3784#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3785# define MAP_ANONYMOUS MAP_ANON
3786#endif
3787
81bf3d9e
RH
3788/* This mess was copied from the GNU getpagesize.h. */
3789#ifndef HAVE_GETPAGESIZE
3790# ifdef HAVE_UNISTD_H
3791# include <unistd.h>
3792# endif
0a4b6309 3793
81bf3d9e
RH
3794/* Assume that all systems that can run configure have sys/param.h. */
3795# ifndef HAVE_SYS_PARAM_H
3796# define HAVE_SYS_PARAM_H 1
3797# endif
0a4b6309 3798
81bf3d9e
RH
3799# ifdef _SC_PAGESIZE
3800# define getpagesize() sysconf(_SC_PAGESIZE)
3801# else /* no _SC_PAGESIZE */
3802# ifdef HAVE_SYS_PARAM_H
3803# include <sys/param.h>
3804# ifdef EXEC_PAGESIZE
3805# define getpagesize() EXEC_PAGESIZE
3806# else /* no EXEC_PAGESIZE */
3807# ifdef NBPG
3808# define getpagesize() NBPG * CLSIZE
3809# ifndef CLSIZE
3810# define CLSIZE 1
3811# endif /* no CLSIZE */
3812# else /* no NBPG */
3813# ifdef NBPC
3814# define getpagesize() NBPC
3815# else /* no NBPC */
3816# ifdef PAGESIZE
3817# define getpagesize() PAGESIZE
3818# endif /* PAGESIZE */
3819# endif /* no NBPC */
3820# endif /* no NBPG */
3821# endif /* no EXEC_PAGESIZE */
3822# else /* no HAVE_SYS_PARAM_H */
3823# define getpagesize() 8192 /* punt totally */
3824# endif /* no HAVE_SYS_PARAM_H */
3825# endif /* no _SC_PAGESIZE */
0a4b6309 3826
81bf3d9e 3827#endif /* no HAVE_GETPAGESIZE */
0a4b6309 3828
825b6926
ZW
3829#ifndef MAP_FAILED
3830# define MAP_FAILED -1
4c1331d6 3831#endif
81bf3d9e 3832
825b6926
ZW
3833#undef perror_exit
3834#define perror_exit(str, val) \
3835 do { perror(str); exit(val); } while (0)
3836
3837/* Some versions of cygwin mmap require that munmap is called with the
3838 same parameters as mmap. GCC expects that this is not the case.
3839 Test for various forms of this problem. Warning - icky signal games. */
3840
3841static sigset_t unblock_sigsegv;
3842static jmp_buf r;
3843static size_t pg;
3844static int devzero;
3845
3846static char *
3847anonmap (size)
3848 size_t size;
3849{
3850#ifdef USE_MAP_ANON
3851 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3852 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4c1331d6 3853#else
825b6926
ZW
3854 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3855 MAP_PRIVATE, devzero, 0);
4c1331d6 3856#endif
825b6926
ZW
3857}
3858
3859static void
3860sigsegv (unused)
3861 int unused;
3862{
3863 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3864 longjmp (r, 1);
3865}
3866
3867/* Basic functionality test. */
3868void
3869test_0 ()
3870{
3871 char *x = anonmap (pg);
3872 if (x == (char *) MAP_FAILED)
3873 perror_exit("test 0 mmap", 2);
81bf3d9e 3874
4acab94b 3875 *(int *)x += 1;
81bf3d9e 3876
4acab94b 3877 if (munmap(x, pg) < 0)
825b6926
ZW
3878 perror_exit("test 0 munmap", 3);
3879}
3880
3881/* 1. If we map a 2-page region and unmap its second page, the first page
3882 must remain. */
3883static void
3884test_1 ()
3885{
3886 char *x = anonmap (pg * 2);
3887 if (x == (char *)MAP_FAILED)
3888 perror_exit ("test 1 mmap", 4);
3889
3890 signal (SIGSEGV, sigsegv);
3891 if (setjmp (r))
3892 perror_exit ("test 1 fault", 5);
3893
3894 x[0] = 1;
3895 x[pg] = 1;
3896
3897 if (munmap (x + pg, pg) < 0)
3898 perror_exit ("test 1 munmap 1", 6);
3899 x[0] = 2;
3900
3901 if (setjmp (r) == 0)
3902 {
3903 x[pg] = 1;
3904 perror_exit ("test 1 no fault", 7);
3905 }
3906 if (munmap (x, pg) < 0)
3907 perror_exit ("test 1 munmap 2", 8);
3908}
3909
3910/* 2. If we map a 2-page region and unmap its first page, the second
3911 page must remain. */
3912static void
3913test_2 ()
3914{
3915 char *x = anonmap (pg * 2);
3916 if (x == (char *)MAP_FAILED)
3917 perror_exit ("test 2 mmap", 9);
3918
3919 signal (SIGSEGV, sigsegv);
3920 if (setjmp (r))
3921 perror_exit ("test 2 fault", 10);
3922
3923 x[0] = 1;
3924 x[pg] = 1;
3925
3926 if (munmap (x, pg) < 0)
3927 perror_exit ("test 2 munmap 1", 11);
3928
3929 x[pg] = 2;
3930
3931 if (setjmp (r) == 0)
3932 {
3933 x[0] = 1;
3934 perror_exit ("test 2 no fault", 12);
3935 }
3936
3937 if (munmap (x+pg, pg) < 0)
3938 perror_exit ("test 2 munmap 2", 13);
3939}
3940
3941/* 3. If we map two adjacent 1-page regions and unmap them both with
3942 one munmap, both must go away.
3943
3944 Getting two adjacent 1-page regions with two mmap calls is slightly
3945 tricky. All OS's tested skip over already-allocated blocks; therefore
3946 we have been careful to unmap all allocated regions in previous tests.
3947 HP/UX allocates pages backward in memory. No OS has yet been observed
3948 to be so perverse as to leave unmapped space between consecutive calls
3949 to mmap. */
3950
3951static void
3952test_3 ()
3953{
3954 char *x, *y, *z;
3955
3956 x = anonmap (pg);
3957 if (x == (char *)MAP_FAILED)
3958 perror_exit ("test 3 mmap 1", 14);
3959 y = anonmap (pg);
3960 if (y == (char *)MAP_FAILED)
3961 perror_exit ("test 3 mmap 2", 15);
3962
3963 if (y != x + pg)
3964 {
3965 if (y == x - pg)
3966 z = y, y = x, x = z;
3967 else
3968 {
3969 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
3970 (unsigned long)x, (unsigned long)y);
3971 exit (16);
3972 }
3973 }
3974
3975 signal (SIGSEGV, sigsegv);
3976 if (setjmp (r))
3977 perror_exit ("test 3 fault", 17);
3978
3979 x[0] = 1;
3980 y[0] = 1;
3981
3982 if (munmap (x, pg*2) < 0)
3983 perror_exit ("test 3 munmap", 18);
3984
3985 if (setjmp (r) == 0)
3986 {
3987 x[0] = 1;
3988 perror_exit ("test 3 no fault 1", 19);
3989 }
3990
3991 signal (SIGSEGV, sigsegv);
3992 if (setjmp (r) == 0)
3993 {
3994 y[0] = 1;
3995 perror_exit ("test 3 no fault 2", 20);
3996 }
3997}
3998
3999int
4000main ()
4001{
4002 sigemptyset (&unblock_sigsegv);
4003 sigaddset (&unblock_sigsegv, SIGSEGV);
4004 pg = getpagesize ();
4005#ifndef USE_MAP_ANON
4006 devzero = open ("/dev/zero", O_RDWR);
4007 if (devzero < 0)
4008 perror_exit ("open /dev/zero", 1);
4009#endif
4010
4011 test_0();
4012 test_1();
4013 test_2();
4014 test_3();
81bf3d9e 4015
4acab94b
AO
4016 exit(0);
4017}
81bf3d9e 4018EOF
825b6926
ZW
4019
4020echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
84c041a1 4021echo "configure:4022: checking for working mmap from /dev/zero" >&5
825b6926
ZW
4022if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4023 echo $ac_n "(cached) $ac_c" 1>&6
4024else
4025 if test "$cross_compiling" = yes; then
4026 # If this is not cygwin, and /dev/zero is a character device, it's probably
4027 # safe to assume it works.
4028 case "$host_os" in
4029 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4030 * ) if test -c /dev/zero
4031 then ac_cv_func_mmap_dev_zero=yes
4032 else ac_cv_func_mmap_dev_zero=no
4033 fi ;;
4034 esac
4035else
4036 cat > conftest.$ac_ext <<EOF
84c041a1 4037#line 4038 "configure"
825b6926
ZW
4038#include "confdefs.h"
4039#include "ct-mmap.inc"
4040EOF
84c041a1 4041if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
825b6926
ZW
4042then
4043 ac_cv_func_mmap_dev_zero=yes
4044else
4045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4047 rm -fr conftest*
4048 if test $? -lt 4
4049 then ac_cv_func_mmap_dev_zero=no
4050 else ac_cv_func_mmap_dev_zero=buggy
4051 fi
4052fi
4053rm -fr conftest*
4054fi
4055
4056
4057fi
4058
4059echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4060if test $ac_cv_func_mmap_dev_zero = yes; then
4061 cat >> confdefs.h <<\EOF
4062#define HAVE_MMAP_DEV_ZERO 1
4063EOF
4064
4065fi
4066
4067echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
84c041a1 4068echo "configure:4069: checking for working mmap with MAP_ANON(YMOUS)" >&5
825b6926
ZW
4069if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4070 echo $ac_n "(cached) $ac_c" 1>&6
4071else
4072 if test "$cross_compiling" = yes; then
4073 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4074 # just because it's there. Some SCO Un*xen define it but don't implement it.
4075 ac_cv_func_mmap_anon=no
4076else
4077 cat > conftest.$ac_ext <<EOF
84c041a1 4078#line 4079 "configure"
825b6926
ZW
4079#include "confdefs.h"
4080#define USE_MAP_ANON
4081#include "ct-mmap.inc"
4082EOF
84c041a1 4083if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
81bf3d9e 4084then
825b6926 4085 ac_cv_func_mmap_anon=yes
81bf3d9e
RH
4086else
4087 echo "configure: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 rm -fr conftest*
825b6926
ZW
4090 if test $? -lt 4
4091 then ac_cv_func_mmap_anon=no
4092 else ac_cv_func_mmap_anon=buggy
4093 fi
81bf3d9e
RH
4094fi
4095rm -fr conftest*
4096fi
4097
825b6926 4098
81bf3d9e
RH
4099fi
4100
825b6926
ZW
4101echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4102if test $ac_cv_func_mmap_anon = yes; then
81bf3d9e 4103 cat >> confdefs.h <<\EOF
825b6926 4104#define HAVE_MMAP_ANON 1
81bf3d9e
RH
4105EOF
4106
4107fi
825b6926 4108rm -f ct-mmap.inc
81bf3d9e 4109
56f02b88 4110echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
84c041a1 4111echo "configure:4112: checking for working mmap of a file" >&5
56f02b88
ZW
4112if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4113 echo $ac_n "(cached) $ac_c" 1>&6
4114else
4115 # Create a file one thousand bytes long.
4116for i in 1 2 3 4 5 6 7 8 9 0
4117do for j in 1 2 3 4 5 6 7 8 9 0
4118do echo $i $j xxxxx
4119done
4120done > conftestdata$$
4121
4122if test "$cross_compiling" = yes; then
4123 ac_cv_func_mmap_file=no
4124else
4125 cat > conftest.$ac_ext <<EOF
84c041a1 4126#line 4127 "configure"
56f02b88
ZW
4127#include "confdefs.h"
4128
4129/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4130 Richard Henderson and Alexandre Oliva.
4131 Check whether read-only mmap of a plain file works. */
4132#include <sys/types.h>
4133#include <sys/stat.h>
4134#include <fcntl.h>
4135#include <sys/mman.h>
4136
4137int main()
4138{
4139 char *x;
4140 int fd;
4141 struct stat st;
4142
4143 fd = open("conftestdata$$", O_RDONLY);
4144 if (fd < 0)
4145 exit(1);
4146
4147 if (fstat (fd, &st))
4148 exit(2);
4149
4150 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4151 if (x == (char *) -1)
4152 exit(3);
4153
4154 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4155 exit(4);
4156
4157 if (munmap(x, st.st_size) < 0)
4158 exit(5);
4159
4160 exit(0);
4161}
4162EOF
84c041a1 4163if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
56f02b88
ZW
4164then
4165 ac_cv_func_mmap_file=yes
4166else
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169 rm -fr conftest*
4170 ac_cv_func_mmap_file=no
4171fi
4172rm -fr conftest*
4173fi
4174
4175fi
4176
4177echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4178if test $ac_cv_func_mmap_file = yes; then
4179 cat >> confdefs.h <<\EOF
4180#define HAVE_MMAP_FILE 1
4181EOF
4182
4183fi
4184
81bf3d9e 4185
86cf1cbd
KG
4186# We will need to find libiberty.h and ansidecl.h
4187saved_CFLAGS="$CFLAGS"
4188CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
2e09e75a
JM
4189for ac_func in bcopy \
4190 getenv atol sbrk abort atof getcwd getwd \
86cf1cbd 4191 strsignal putc_unlocked fputs_unlocked strstr environ \
f31e826b 4192 malloc realloc calloc free basename getopt
81bf3d9e 4193do
f31e826b
KG
4194 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4195echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
84c041a1 4196echo "configure:4197: checking whether $ac_func is declared" >&5
f31e826b 4197if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
81bf3d9e
RH
4198 echo $ac_n "(cached) $ac_c" 1>&6
4199else
4200 cat > conftest.$ac_ext <<EOF
84c041a1 4201#line 4202 "configure"
81bf3d9e 4202#include "confdefs.h"
7afe8c41
KG
4203#undef $ac_tr_decl
4204#define $ac_tr_decl 1
4205
86cf1cbd
KG
4206#include "gansidecl.h"
4207#include "system.h"
f31e826b 4208
81bf3d9e 4209int main() {
86cf1cbd
KG
4210#ifndef $ac_func
4211char *(*pfn) = (char *(*)) $ac_func ;
4212#endif
81bf3d9e
RH
4213; return 0; }
4214EOF
84c041a1 4215if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
81bf3d9e 4216 rm -rf conftest*
f31e826b 4217 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e
RH
4218else
4219 echo "configure: failed program was:" >&5
4220 cat conftest.$ac_ext >&5
4221 rm -rf conftest*
f31e826b 4222 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e
RH
4223fi
4224rm -f conftest*
4225fi
4226
f31e826b
KG
4227if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4228 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
86cf1cbd 4229#define $ac_tr_decl 1
81bf3d9e 4230EOF
86cf1cbd 4231
81bf3d9e 4232else
f31e826b
KG
4233 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4234#define $ac_tr_decl 0
4235EOF
4236
81bf3d9e
RH
4237fi
4238
4239done
86cf1cbd 4240if test x = y ; then
81bf3d9e 4241 cat >> confdefs.h <<EOF
f31e826b 4242#define HAVE_DECL_BCOPY 1
86cf1cbd
KG
4243EOF
4244 \
4245 cat >> confdefs.h <<EOF
f31e826b 4246#define HAVE_DECL_GETENV 1
86cf1cbd
KG
4247EOF
4248 cat >> confdefs.h <<EOF
f31e826b 4249#define HAVE_DECL_ATOL 1
86cf1cbd
KG
4250EOF
4251 cat >> confdefs.h <<EOF
f31e826b 4252#define HAVE_DECL_SBRK 1
86cf1cbd
KG
4253EOF
4254 cat >> confdefs.h <<EOF
f31e826b 4255#define HAVE_DECL_ABORT 1
86cf1cbd
KG
4256EOF
4257 cat >> confdefs.h <<EOF
f31e826b 4258#define HAVE_DECL_ATOF 1
86cf1cbd
KG
4259EOF
4260 cat >> confdefs.h <<EOF
f31e826b 4261#define HAVE_DECL_GETCWD 1
86cf1cbd
KG
4262EOF
4263 cat >> confdefs.h <<EOF
f31e826b 4264#define HAVE_DECL_GETWD 1
86cf1cbd
KG
4265EOF
4266 \
4267 cat >> confdefs.h <<EOF
f31e826b 4268#define HAVE_DECL_STRSIGNAL 1
86cf1cbd
KG
4269EOF
4270 cat >> confdefs.h <<EOF
f31e826b 4271#define HAVE_DECL_PUTC_UNLOCKED 1
86cf1cbd
KG
4272EOF
4273 cat >> confdefs.h <<EOF
f31e826b 4274#define HAVE_DECL_FPUTS_UNLOCKED 1
86cf1cbd
KG
4275EOF
4276 cat >> confdefs.h <<EOF
f31e826b 4277#define HAVE_DECL_STRSTR 1
86cf1cbd
KG
4278EOF
4279 cat >> confdefs.h <<EOF
f31e826b 4280#define HAVE_DECL_ENVIRON 1
86cf1cbd
KG
4281EOF
4282 \
4283 cat >> confdefs.h <<EOF
f31e826b
KG
4284#define HAVE_DECL_MALLOC 1
4285EOF
4286 cat >> confdefs.h <<EOF
4287#define HAVE_DECL_REALLOC 1
86cf1cbd
KG
4288EOF
4289 cat >> confdefs.h <<EOF
f31e826b 4290#define HAVE_DECL_CALLOC 1
86cf1cbd
KG
4291EOF
4292 cat >> confdefs.h <<EOF
f31e826b 4293#define HAVE_DECL_FREE 1
86cf1cbd
KG
4294EOF
4295 cat >> confdefs.h <<EOF
f31e826b
KG
4296#define HAVE_DECL_BASENAME 1
4297EOF
4298 cat >> confdefs.h <<EOF
4299#define HAVE_DECL_GETOPT 1
81bf3d9e 4300EOF
81bf3d9e
RH
4301fi
4302
81bf3d9e
RH
4303
4304for ac_func in getrlimit setrlimit getrusage
4305do
f31e826b
KG
4306 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4307echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
84c041a1 4308echo "configure:4309: checking whether $ac_func is declared" >&5
f31e826b 4309if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
81bf3d9e
RH
4310 echo $ac_n "(cached) $ac_c" 1>&6
4311else
4312 cat > conftest.$ac_ext <<EOF
84c041a1 4313#line 4314 "configure"
81bf3d9e 4314#include "confdefs.h"
7afe8c41
KG
4315#undef $ac_tr_decl
4316#define $ac_tr_decl 1
4317
86cf1cbd
KG
4318#include "gansidecl.h"
4319#include "system.h"
81bf3d9e
RH
4320#ifdef HAVE_SYS_RESOURCE_H
4321#include <sys/resource.h>
4322#endif
4323
f31e826b 4324
81bf3d9e 4325int main() {
86cf1cbd
KG
4326#ifndef $ac_func
4327char *(*pfn) = (char *(*)) $ac_func ;
4328#endif
81bf3d9e
RH
4329; return 0; }
4330EOF
84c041a1 4331if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
81bf3d9e 4332 rm -rf conftest*
f31e826b 4333 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e
RH
4334else
4335 echo "configure: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 rm -rf conftest*
f31e826b 4338 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e
RH
4339fi
4340rm -f conftest*
4341fi
4342
f31e826b
KG
4343if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4344 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
86cf1cbd 4345#define $ac_tr_decl 1
81bf3d9e 4346EOF
86cf1cbd 4347
81bf3d9e 4348else
f31e826b
KG
4349 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4350#define $ac_tr_decl 0
4351EOF
4352
81bf3d9e
RH
4353fi
4354
4355done
86cf1cbd
KG
4356if test x = y ; then
4357 cat >> confdefs.h <<EOF
f31e826b 4358#define HAVE_DECL_GETRLIMIT 1
86cf1cbd
KG
4359EOF
4360 cat >> confdefs.h <<EOF
f31e826b 4361#define HAVE_DECL_SETRLIMIT 1
86cf1cbd
KG
4362EOF
4363 cat >> confdefs.h <<EOF
f31e826b 4364#define HAVE_DECL_GETRUSAGE 1
86cf1cbd
KG
4365EOF
4366fi
4367
81bf3d9e 4368
86cf1cbd
KG
4369# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4370CFLAGS="$saved_CFLAGS"
81bf3d9e 4371
75923b2f
MK
4372# mkdir takes a single argument on some systems.
4373echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
84c041a1 4374echo "configure:4375: checking if mkdir takes one argument" >&5
75923b2f
MK
4375if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377else
4378 cat > conftest.$ac_ext <<EOF
84c041a1 4379#line 4380 "configure"
75923b2f
MK
4380#include "confdefs.h"
4381
4382#include <sys/types.h>
4383#ifdef HAVE_SYS_STAT_H
4384# include <sys/stat.h>
4385#endif
4386#ifdef HAVE_UNISTD_H
4387# include <unistd.h>
4388#endif
4389#ifdef HAVE_DIRECT_H
4390# include <direct.h>
4391#endif
4392int main() {
4393mkdir ("foo", 0);
4394; return 0; }
4395EOF
84c041a1 4396if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75923b2f
MK
4397 rm -rf conftest*
4398 gcc_cv_mkdir_takes_one_arg=no
4399else
4400 echo "configure: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
4402 rm -rf conftest*
4403 gcc_cv_mkdir_takes_one_arg=yes
4404fi
4405rm -f conftest*
4406fi
4407
4408echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4409if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4410 cat >> confdefs.h <<\EOF
4411#define MKDIR_TAKES_ONE_ARG 1
4412EOF
4413
4414fi
4415
4416
861bb6c1
JL
4417# File extensions
4418manext='.1'
4419objext='.o'
4420
4421
4422
4423build_xm_file=
f6cb0e63 4424build_xm_defines=
861bb6c1
JL
4425build_install_headers_dir=install-headers-tar
4426build_exeext=
4427host_xm_file=
f6cb0e63 4428host_xm_defines=
861bb6c1
JL
4429host_xmake_file=
4430host_truncate_target=
6e26218f 4431host_exeext=
861bb6c1
JL
4432
4433# Decode the host machine, then the target machine.
4434# For the host machine, we save the xm_file variable as host_xm_file;
4435# then we decode the target machine and forget everything else
4436# that came from the host machine.
4437for machine in $build $host $target; do
61ed06c3 4438 . ${srcdir}/config.gcc
861bb6c1
JL
4439done
4440
4441extra_objs="${host_extra_objs} ${extra_objs}"
4442
4443# Default the target-machine variables that were not explicitly set.
75bffa71 4444if test x"$tm_file" = x
861bb6c1
JL
4445then tm_file=$cpu_type/$cpu_type.h; fi
4446
6b2adea9 4447if test x"$extra_headers" = x
861bb6c1
JL
4448then extra_headers=; fi
4449
75bffa71 4450if test x"$xm_file" = x
861bb6c1
JL
4451then xm_file=$cpu_type/xm-$cpu_type.h; fi
4452
75bffa71 4453if test x$md_file = x
e98e406f 4454then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 4455
75bffa71 4456if test x$out_file = x
861bb6c1
JL
4457then out_file=$cpu_type/$cpu_type.c; fi
4458
75bffa71 4459if test x"$tmake_file" = x
861bb6c1
JL
4460then tmake_file=$cpu_type/t-$cpu_type
4461fi
4462
90e6a802 4463if test x"$dwarf2" = xyes
756ee602 4464then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
4465fi
4466
75bffa71 4467if test x$float_format = x
861bb6c1
JL
4468then float_format=i64
4469fi
4470
027ea2a7
JW
4471if test $float_format = none
4472then float_h_file=Makefile.in
4473else float_h_file=float-$float_format.h
4474fi
4475
9fc9b82a 4476# Handle cpp installation.
3ecc3258 4477if test x$enable_cpp != xno
9fc9b82a
L
4478then
4479 tmake_file="$tmake_file t-install-cpp"
4480fi
4481
861bb6c1 4482# Say what files are being used for the output code and MD file.
11642c3a 4483echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
4484echo "Using \`$srcdir/config/$md_file' as machine description file."
4485
11642c3a
ZW
4486# If any of the xm_file variables contain nonexistent files, warn
4487# about them and drop them. But $cpu/xm-$cpu.h is allowed not to
4488# exist, if we have nothing for it to do.
11642c3a
ZW
4489bx=
4490for x in $build_xm_file; do
4491 if test -f $srcdir/config/$x
4492 then bx="$bx $x"
190c4cb4 4493 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
11642c3a
ZW
4494 then :
4495 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4496 fi
4497done
4498build_xm_file="$bx"
4499
4500hx=
4501for x in $host_xm_file; do
4502 if test -f $srcdir/config/$x
4503 then hx="$hx $x"
190c4cb4 4504 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
11642c3a
ZW
4505 then :
4506 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4507 fi
4508done
4509host_xm_file="$hx"
4510
4511tx=
4512for x in $xm_file; do
4513 if test -f $srcdir/config/$x
4514 then tx="$tx $x"
190c4cb4 4515 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
11642c3a
ZW
4516 then :
4517 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4518 fi
4519done
4520xm_file="$tx"
4521
861bb6c1
JL
4522count=a
4523for f in $tm_file; do
4524 count=${count}x
4525done
75bffa71 4526if test $count = ax; then
861bb6c1
JL
4527 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4528else
4529 echo "Using the following target machine macro files:"
4530 for f in $tm_file; do
4531 echo " $srcdir/config/$f"
4532 done
4533fi
4534
4535count=a
4536for f in $host_xm_file; do
4537 count=${count}x
4538done
11642c3a
ZW
4539if test $count = a; then
4540 :
4541elif test $count = ax; then
861bb6c1
JL
4542 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4543else
4544 echo "Using the following host machine macro files:"
4545 for f in $host_xm_file; do
4546 echo " $srcdir/config/$f"
4547 done
4548fi
4549
75bffa71 4550if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
4551 count=a
4552 for f in $build_xm_file; do
4553 count=${count}x
4554 done
11642c3a
ZW
4555 if test $count = a; then
4556 :
4557 elif test $count = ax; then
861bb6c1
JL
4558 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4559 else
4560 echo "Using the following build machine macro files:"
4561 for f in $build_xm_file; do
4562 echo " $srcdir/config/$f"
4563 done
4564 fi
4565fi
4566
75bffa71
ILT
4567if test x$thread_file = x; then
4568 if test x$target_thread_file != x; then
a851212a
JW
4569 thread_file=$target_thread_file
4570 else
4571 thread_file='single'
4572 fi
861bb6c1
JL
4573fi
4574
b7cb92ad 4575# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 4576# the first file included by config.h.
b7cb92ad 4577# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
4578# as well. If host!=build, we are in error and need to do more
4579# work to find out the build config parameters.
75bffa71 4580if test x$host = x$build
db81d74a 4581then
eaf4e618 4582 build_auto=auto-host.h
b7cb92ad
JL
4583else
4584 # We create a subdir, then run autoconf in the subdir.
4585 # To prevent recursion we set host and build for the new
4586 # invocation of configure to the build for this invocation
4587 # of configure.
4588 tempdir=build.$$
4589 rm -rf $tempdir
4590 mkdir $tempdir
4591 cd $tempdir
4592 case ${srcdir} in
255b8a49 4593 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
4594 *) realsrcdir=../${srcdir};;
4595 esac
fe81dd69 4596 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
b7cb92ad
JL
4597 --target=$target --host=$build --build=$build
4598
4599 # We just finished tests for the build machine, so rename
4600 # the file auto-build.h in the gcc directory.
4601 mv auto-host.h ../auto-build.h
4602 cd ..
4603 rm -rf $tempdir
eaf4e618 4604 build_auto=auto-build.h
db81d74a
RH
4605fi
4606
eaf4e618 4607tm_file="${tm_file} defaults.h"
75e93faa
ZW
4608host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file}"
4609build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file}"
eaf4e618 4610xm_file="gansidecl.h ${xm_file} ${tm_file}"
0056a9b5 4611
861bb6c1 4612# Truncate the target if necessary
75bffa71 4613if test x$host_truncate_target != x; then
861bb6c1
JL
4614 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4615fi
4616
f1943b77 4617# Get the version trigger filename from the toplevel
75bffa71 4618if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
4619 gcc_version_trigger=$with_gcc_version_trigger
4620else
4621 gcc_version_trigger=${srcdir}/version.c
4622fi
8763704d
JM
4623gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4624gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 4625
cc1e60ea 4626# Compile in configure arguments.
8105825d 4627if test -f configargs.h ; then
cc1e60ea
JM
4628 # Being re-configured.
4629 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4630 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4631else
4632 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4633fi
4634cat > configargs.h <<EOF
4635/* Generated automatically. */
4636static const char configuration_arguments[] = "$gcc_config_arguments";
4637EOF
4638
ab87f8c8
JL
4639# Internationalization
4640PACKAGE=gcc
4641VERSION="$gcc_version"
4642cat >> confdefs.h <<EOF
4643#define PACKAGE "$PACKAGE"
4644EOF
861bb6c1 4645
ab87f8c8
JL
4646cat >> confdefs.h <<EOF
4647#define VERSION "$VERSION"
4648EOF
861bb6c1 4649
861bb6c1 4650
ab87f8c8
JL
4651
4652
2be36552 4653ALL_LINGUAS="sv"
ab87f8c8 4654
dc6746e7 4655# Enable NLS support by default
ab87f8c8
JL
4656# Check whether --enable-nls or --disable-nls was given.
4657if test "${enable_nls+set}" = set; then
4658 enableval="$enable_nls"
4659 :
861bb6c1 4660else
dc6746e7 4661 enable_nls=yes
861bb6c1 4662fi
861bb6c1 4663
861bb6c1 4664
dc6746e7
PT
4665# if cross compiling, disable NLS support.
4666# It's not worth the trouble, at least for now.
4667
063a4b85 4668if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
dc6746e7
PT
4669 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4670 enable_nls=no
4671fi
4672
4adee315
PT
4673# if NLS is enabled, also enable check in po subdir
4674if test $enable_nls = yes; then
4675 CHECK_PO=check-po
4676else
4677 CHECK_PO=""
4678fi
4679
4680
4681
861bb6c1 4682
ab87f8c8 4683 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
84c041a1 4684echo "configure:4685: checking for strerror in -lcposix" >&5
ab87f8c8
JL
4685ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4686if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4687 echo $ac_n "(cached) $ac_c" 1>&6
4688else
4689 ac_save_LIBS="$LIBS"
4690LIBS="-lcposix $LIBS"
4691cat > conftest.$ac_ext <<EOF
84c041a1 4692#line 4693 "configure"
ab87f8c8
JL
4693#include "confdefs.h"
4694/* Override any gcc2 internal prototype to avoid an error. */
4695/* We use char because int might match the return type of a gcc2
4696 builtin and then its argument prototype would still apply. */
4697char strerror();
861bb6c1 4698
ab87f8c8
JL
4699int main() {
4700strerror()
4701; return 0; }
4702EOF
84c041a1 4703if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
4704 rm -rf conftest*
4705 eval "ac_cv_lib_$ac_lib_var=yes"
4706else
4707 echo "configure: failed program was:" >&5
4708 cat conftest.$ac_ext >&5
4709 rm -rf conftest*
4710 eval "ac_cv_lib_$ac_lib_var=no"
861bb6c1 4711fi
ab87f8c8
JL
4712rm -f conftest*
4713LIBS="$ac_save_LIBS"
861bb6c1 4714
861bb6c1 4715fi
ab87f8c8
JL
4716if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4717 echo "$ac_t""yes" 1>&6
4718 LIBS="$LIBS -lcposix"
861bb6c1 4719else
ab87f8c8 4720 echo "$ac_t""no" 1>&6
861bb6c1
JL
4721fi
4722
ab87f8c8 4723
2ce3c6c6 4724
ab87f8c8 4725echo $ac_n "checking for working const""... $ac_c" 1>&6
84c041a1 4726echo "configure:4727: checking for working const" >&5
ab87f8c8
JL
4727if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4728 echo $ac_n "(cached) $ac_c" 1>&6
861bb6c1 4729else
ab87f8c8 4730 cat > conftest.$ac_ext <<EOF
84c041a1 4731#line 4732 "configure"
ab87f8c8 4732#include "confdefs.h"
861bb6c1 4733
ab87f8c8
JL
4734int main() {
4735
4736/* Ultrix mips cc rejects this. */
130fadbb 4737typedef int charset[2]; const charset x;
ab87f8c8
JL
4738/* SunOS 4.1.1 cc rejects this. */
4739char const *const *ccp;
4740char **p;
4741/* NEC SVR4.0.2 mips cc rejects this. */
4742struct point {int x, y;};
4743static struct point const zero = {0,0};
4744/* AIX XL C 1.02.0.0 rejects this.
4745 It does not let you subtract one const X* pointer from another in an arm
4746 of an if-expression whose if-part is not a constant expression */
4747const char *g = "string";
4748ccp = &g + (g ? g-g : 0);
4749/* HPUX 7.0 cc rejects these. */
4750++ccp;
4751p = (char**) ccp;
4752ccp = (char const *const *) p;
4753{ /* SCO 3.2v4 cc rejects this. */
4754 char *t;
4755 char const *s = 0 ? (char *) 0 : (char const *) 0;
4756
4757 *t++ = 0;
4758}
4759{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4760 int x[] = {25, 17};
4761 const int *foo = &x[0];
4762 ++foo;
4763}
4764{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4765 typedef const int *iptr;
4766 iptr p = 0;
4767 ++p;
4768}
4769{ /* AIX XL C 1.02.0.0 rejects this saying
4770 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4771 struct s { int j; const int *ap[3]; };
4772 struct s *b; b->j = 5;
4773}
4774{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4775 const int foo = 10;
4776}
4777
4778; return 0; }
4779EOF
84c041a1 4780if { (eval echo configure:4781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab87f8c8
JL
4781 rm -rf conftest*
4782 ac_cv_c_const=yes
861bb6c1 4783else
ab87f8c8
JL
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4786 rm -rf conftest*
4787 ac_cv_c_const=no
4788fi
4789rm -f conftest*
861bb6c1
JL
4790fi
4791
ab87f8c8
JL
4792echo "$ac_t""$ac_cv_c_const" 1>&6
4793if test $ac_cv_c_const = no; then
4794 cat >> confdefs.h <<\EOF
4795#define const
4796EOF
4797
861bb6c1
JL
4798fi
4799
ab87f8c8 4800echo $ac_n "checking for off_t""... $ac_c" 1>&6
84c041a1 4801echo "configure:4802: checking for off_t" >&5
ab87f8c8
JL
4802if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
4804else
4805 cat > conftest.$ac_ext <<EOF
84c041a1 4806#line 4807 "configure"
ab87f8c8
JL
4807#include "confdefs.h"
4808#include <sys/types.h>
4809#if STDC_HEADERS
4810#include <stdlib.h>
4811#include <stddef.h>
4812#endif
4813EOF
4814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 4815 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8
JL
4816 rm -rf conftest*
4817 ac_cv_type_off_t=yes
4818else
4819 rm -rf conftest*
4820 ac_cv_type_off_t=no
4821fi
4822rm -f conftest*
4823
4824fi
4825echo "$ac_t""$ac_cv_type_off_t" 1>&6
4826if test $ac_cv_type_off_t = no; then
4827 cat >> confdefs.h <<\EOF
4828#define off_t long
4829EOF
4830
4831fi
4832
4833echo $ac_n "checking for size_t""... $ac_c" 1>&6
84c041a1 4834echo "configure:4835: checking for size_t" >&5
ab87f8c8
JL
4835if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4836 echo $ac_n "(cached) $ac_c" 1>&6
4837else
4838 cat > conftest.$ac_ext <<EOF
84c041a1 4839#line 4840 "configure"
ab87f8c8
JL
4840#include "confdefs.h"
4841#include <sys/types.h>
4842#if STDC_HEADERS
4843#include <stdlib.h>
4844#include <stddef.h>
4845#endif
4846EOF
4847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 4848 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8
JL
4849 rm -rf conftest*
4850 ac_cv_type_size_t=yes
4851else
4852 rm -rf conftest*
4853 ac_cv_type_size_t=no
4854fi
4855rm -f conftest*
4856
4857fi
4858echo "$ac_t""$ac_cv_type_size_t" 1>&6
4859if test $ac_cv_type_size_t = no; then
4860 cat >> confdefs.h <<\EOF
4861#define size_t unsigned
4862EOF
4863
4864fi
4865
b548dffb 4866
ab87f8c8
JL
4867 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4868unistd.h sys/param.h
4869do
4870ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4871echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
84c041a1 4872echo "configure:4873: checking for $ac_hdr" >&5
ab87f8c8
JL
4873if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4874 echo $ac_n "(cached) $ac_c" 1>&6
4875else
4876 cat > conftest.$ac_ext <<EOF
84c041a1 4877#line 4878 "configure"
ab87f8c8
JL
4878#include "confdefs.h"
4879#include <$ac_hdr>
4880EOF
4881ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 4882{ (eval echo configure:4883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 4883ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
4884if test -z "$ac_err"; then
4885 rm -rf conftest*
4886 eval "ac_cv_header_$ac_safe=yes"
4887else
4888 echo "$ac_err" >&5
4889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
4891 rm -rf conftest*
4892 eval "ac_cv_header_$ac_safe=no"
4893fi
4894rm -f conftest*
4895fi
4896if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4897 echo "$ac_t""yes" 1>&6
4898 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4899 cat >> confdefs.h <<EOF
4900#define $ac_tr_hdr 1
4901EOF
4902
4903else
4904 echo "$ac_t""no" 1>&6
4905fi
4906done
4907
4908 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4909strdup __argz_count __argz_stringify __argz_next
4910do
4911echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 4912echo "configure:4913: checking for $ac_func" >&5
ab87f8c8
JL
4913if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4914 echo $ac_n "(cached) $ac_c" 1>&6
4915else
4916 cat > conftest.$ac_ext <<EOF
84c041a1 4917#line 4918 "configure"
ab87f8c8
JL
4918#include "confdefs.h"
4919/* System header to define __stub macros and hopefully few prototypes,
4920 which can conflict with char $ac_func(); below. */
4921#include <assert.h>
4922/* Override any gcc2 internal prototype to avoid an error. */
4923/* We use char because int might match the return type of a gcc2
4924 builtin and then its argument prototype would still apply. */
4925char $ac_func();
4926
4927int main() {
4928
4929/* The GNU C library defines this for functions which it implements
4930 to always fail with ENOSYS. Some functions are actually named
4931 something starting with __ and the normal name is an alias. */
4932#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4933choke me
4934#else
99b09ff3 4935$ac_func();
ab87f8c8
JL
4936#endif
4937
4938; return 0; }
4939EOF
84c041a1 4940if { (eval echo configure:4941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
4941 rm -rf conftest*
4942 eval "ac_cv_func_$ac_func=yes"
4943else
4944 echo "configure: failed program was:" >&5
4945 cat conftest.$ac_ext >&5
4946 rm -rf conftest*
4947 eval "ac_cv_func_$ac_func=no"
4948fi
4949rm -f conftest*
4950fi
4951
4952if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4953 echo "$ac_t""yes" 1>&6
4954 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4955 cat >> confdefs.h <<EOF
4956#define $ac_tr_func 1
4957EOF
4958
4959else
4960 echo "$ac_t""no" 1>&6
4961fi
4962done
4963
4964
4965 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4966 for ac_func in stpcpy
4967do
4968echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 4969echo "configure:4970: checking for $ac_func" >&5
ab87f8c8
JL
4970if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4971 echo $ac_n "(cached) $ac_c" 1>&6
4972else
4973 cat > conftest.$ac_ext <<EOF
84c041a1 4974#line 4975 "configure"
ab87f8c8
JL
4975#include "confdefs.h"
4976/* System header to define __stub macros and hopefully few prototypes,
4977 which can conflict with char $ac_func(); below. */
4978#include <assert.h>
4979/* Override any gcc2 internal prototype to avoid an error. */
4980/* We use char because int might match the return type of a gcc2
4981 builtin and then its argument prototype would still apply. */
4982char $ac_func();
4983
4984int main() {
4985
4986/* The GNU C library defines this for functions which it implements
4987 to always fail with ENOSYS. Some functions are actually named
4988 something starting with __ and the normal name is an alias. */
4989#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4990choke me
4991#else
99b09ff3 4992$ac_func();
ab87f8c8
JL
4993#endif
4994
4995; return 0; }
4996EOF
84c041a1 4997if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
4998 rm -rf conftest*
4999 eval "ac_cv_func_$ac_func=yes"
5000else
5001 echo "configure: failed program was:" >&5
5002 cat conftest.$ac_ext >&5
5003 rm -rf conftest*
5004 eval "ac_cv_func_$ac_func=no"
5005fi
5006rm -f conftest*
5007fi
5008
5009if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5010 echo "$ac_t""yes" 1>&6
5011 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5012 cat >> confdefs.h <<EOF
5013#define $ac_tr_func 1
5014EOF
5015
5016else
5017 echo "$ac_t""no" 1>&6
5018fi
5019done
5020
5021 fi
5022 if test "${ac_cv_func_stpcpy}" = "yes"; then
5023 cat >> confdefs.h <<\EOF
5024#define HAVE_STPCPY 1
5025EOF
5026
5027 fi
5028
5029 if test $ac_cv_header_locale_h = yes; then
5030 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
84c041a1 5031echo "configure:5032: checking for LC_MESSAGES" >&5
ab87f8c8
JL
5032if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
5034else
5035 cat > conftest.$ac_ext <<EOF
84c041a1 5036#line 5037 "configure"
ab87f8c8
JL
5037#include "confdefs.h"
5038#include <locale.h>
5039int main() {
5040return LC_MESSAGES
5041; return 0; }
5042EOF
84c041a1 5043if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5044 rm -rf conftest*
5045 am_cv_val_LC_MESSAGES=yes
5046else
5047 echo "configure: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5049 rm -rf conftest*
5050 am_cv_val_LC_MESSAGES=no
5051fi
5052rm -f conftest*
5053fi
5054
5055echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5056 if test $am_cv_val_LC_MESSAGES = yes; then
5057 cat >> confdefs.h <<\EOF
5058#define HAVE_LC_MESSAGES 1
5059EOF
5060
5061 fi
5062 fi
5063 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
84c041a1 5064echo "configure:5065: checking whether NLS is requested" >&5
ab87f8c8
JL
5065 # Check whether --enable-nls or --disable-nls was given.
5066if test "${enable_nls+set}" = set; then
5067 enableval="$enable_nls"
5068 USE_NLS=$enableval
5069else
5070 USE_NLS=yes
5071fi
5072
5073 echo "$ac_t""$USE_NLS" 1>&6
5074
5075
5076 USE_INCLUDED_LIBINTL=no
5077
5078 if test "$USE_NLS" = "yes"; then
5079 cat >> confdefs.h <<\EOF
5080#define ENABLE_NLS 1
5081EOF
5082
5083 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
84c041a1 5084echo "configure:5085: checking whether included gettext is requested" >&5
ab87f8c8
JL
5085 # Check whether --with-included-gettext or --without-included-gettext was given.
5086if test "${with_included_gettext+set}" = set; then
5087 withval="$with_included_gettext"
5088 nls_cv_force_use_gnu_gettext=$withval
5089else
bfa29b63 5090 nls_cv_force_use_gnu_gettext=no
ab87f8c8
JL
5091fi
5092
5093 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5094
5095 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5096 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5097 nls_cv_header_intl=
5098 nls_cv_header_libgt=
5099 CATOBJEXT=NONE
5100
5101 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5102echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
84c041a1 5103echo "configure:5104: checking for libintl.h" >&5
ab87f8c8
JL
5104if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5105 echo $ac_n "(cached) $ac_c" 1>&6
5106else
5107 cat > conftest.$ac_ext <<EOF
84c041a1 5108#line 5109 "configure"
ab87f8c8
JL
5109#include "confdefs.h"
5110#include <libintl.h>
5111EOF
5112ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 5113{ (eval echo configure:5114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 5114ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
5115if test -z "$ac_err"; then
5116 rm -rf conftest*
5117 eval "ac_cv_header_$ac_safe=yes"
5118else
5119 echo "$ac_err" >&5
5120 echo "configure: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 rm -rf conftest*
5123 eval "ac_cv_header_$ac_safe=no"
5124fi
5125rm -f conftest*
5126fi
5127if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5128 echo "$ac_t""yes" 1>&6
5129 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
84c041a1 5130echo "configure:5131: checking for gettext in libc" >&5
ab87f8c8
JL
5131if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
5132 echo $ac_n "(cached) $ac_c" 1>&6
5133else
5134 cat > conftest.$ac_ext <<EOF
84c041a1 5135#line 5136 "configure"
ab87f8c8
JL
5136#include "confdefs.h"
5137#include <libintl.h>
5138int main() {
5139return (int) gettext ("")
5140; return 0; }
5141EOF
84c041a1 5142if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5143 rm -rf conftest*
5144 gt_cv_func_gettext_libc=yes
5145else
5146 echo "configure: failed program was:" >&5
5147 cat conftest.$ac_ext >&5
5148 rm -rf conftest*
5149 gt_cv_func_gettext_libc=no
5150fi
5151rm -f conftest*
5152fi
5153
5154echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
5155
5156 if test "$gt_cv_func_gettext_libc" != "yes"; then
5157 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
84c041a1 5158echo "configure:5159: checking for bindtextdomain in -lintl" >&5
ab87f8c8
JL
5159ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5160if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
5162else
5163 ac_save_LIBS="$LIBS"
5164LIBS="-lintl $LIBS"
5165cat > conftest.$ac_ext <<EOF
84c041a1 5166#line 5167 "configure"
ab87f8c8
JL
5167#include "confdefs.h"
5168/* Override any gcc2 internal prototype to avoid an error. */
5169/* We use char because int might match the return type of a gcc2
5170 builtin and then its argument prototype would still apply. */
5171char bindtextdomain();
5172
5173int main() {
5174bindtextdomain()
5175; return 0; }
5176EOF
84c041a1 5177if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5178 rm -rf conftest*
5179 eval "ac_cv_lib_$ac_lib_var=yes"
5180else
5181 echo "configure: failed program was:" >&5
5182 cat conftest.$ac_ext >&5
5183 rm -rf conftest*
5184 eval "ac_cv_lib_$ac_lib_var=no"
5185fi
5186rm -f conftest*
5187LIBS="$ac_save_LIBS"
5188
5189fi
5190if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5191 echo "$ac_t""yes" 1>&6
5192 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
84c041a1 5193echo "configure:5194: checking for gettext in libintl" >&5
ab87f8c8
JL
5194if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
84c041a1 5198echo "configure:5199: checking for gettext in -lintl" >&5
ab87f8c8
JL
5199ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5200if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5201 echo $ac_n "(cached) $ac_c" 1>&6
5202else
5203 ac_save_LIBS="$LIBS"
5204LIBS="-lintl $LIBS"
5205cat > conftest.$ac_ext <<EOF
84c041a1 5206#line 5207 "configure"
ab87f8c8
JL
5207#include "confdefs.h"
5208/* Override any gcc2 internal prototype to avoid an error. */
5209/* We use char because int might match the return type of a gcc2
5210 builtin and then its argument prototype would still apply. */
5211char gettext();
5212
5213int main() {
5214gettext()
5215; return 0; }
5216EOF
84c041a1 5217if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5218 rm -rf conftest*
5219 eval "ac_cv_lib_$ac_lib_var=yes"
5220else
5221 echo "configure: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 rm -rf conftest*
5224 eval "ac_cv_lib_$ac_lib_var=no"
5225fi
5226rm -f conftest*
5227LIBS="$ac_save_LIBS"
5228
5229fi
5230if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5231 echo "$ac_t""yes" 1>&6
5232 gt_cv_func_gettext_libintl=yes
5233else
5234 echo "$ac_t""no" 1>&6
5235gt_cv_func_gettext_libintl=no
5236fi
5237
5238fi
5239
5240echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5241else
5242 echo "$ac_t""no" 1>&6
5243fi
5244
5245 fi
5246
380a627a
PT
5247 if test "$gt_cv_func_gettext_libintl" = "yes"; then
5248 LIBS="-lintl $LIBS"
5249 fi
5250
ab87f8c8
JL
5251 if test "$gt_cv_func_gettext_libc" = "yes" \
5252 || test "$gt_cv_func_gettext_libintl" = "yes"; then
5253 cat >> confdefs.h <<\EOF
5254#define HAVE_GETTEXT 1
5255EOF
5256
5257 # Extract the first word of "msgfmt", so it can be a program name with args.
5258set dummy msgfmt; ac_word=$2
5259echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5260echo "configure:5261: checking for $ac_word" >&5
00036f5c 5261if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5262 echo $ac_n "(cached) $ac_c" 1>&6
5263else
5264 case "$MSGFMT" in
5265 /*)
00036f5c 5266 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5267 ;;
5268 *)
5269 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5270 for ac_dir in $PATH; do
5271 test -z "$ac_dir" && ac_dir=.
5272 if test -f $ac_dir/$ac_word; then
5273 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
00036f5c 5274 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5275 break
5276 fi
5277 fi
5278 done
5279 IFS="$ac_save_ifs"
00036f5c 5280 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
ab87f8c8
JL
5281 ;;
5282esac
5283fi
00036f5c 5284MSGFMT="$gcc_cv_path_MSGFMT"
ab87f8c8
JL
5285if test -n "$MSGFMT"; then
5286 echo "$ac_t""$MSGFMT" 1>&6
5287else
5288 echo "$ac_t""no" 1>&6
5289fi
5290 if test "$MSGFMT" != "no"; then
5291 for ac_func in dcgettext
5292do
5293echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
84c041a1 5294echo "configure:5295: checking for $ac_func" >&5
ab87f8c8
JL
5295if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5296 echo $ac_n "(cached) $ac_c" 1>&6
5297else
5298 cat > conftest.$ac_ext <<EOF
84c041a1 5299#line 5300 "configure"
ab87f8c8
JL
5300#include "confdefs.h"
5301/* System header to define __stub macros and hopefully few prototypes,
5302 which can conflict with char $ac_func(); below. */
5303#include <assert.h>
5304/* Override any gcc2 internal prototype to avoid an error. */
5305/* We use char because int might match the return type of a gcc2
5306 builtin and then its argument prototype would still apply. */
5307char $ac_func();
5308
5309int main() {
5310
5311/* The GNU C library defines this for functions which it implements
5312 to always fail with ENOSYS. Some functions are actually named
5313 something starting with __ and the normal name is an alias. */
5314#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5315choke me
5316#else
99b09ff3 5317$ac_func();
ab87f8c8
JL
5318#endif
5319
5320; return 0; }
5321EOF
84c041a1 5322if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5323 rm -rf conftest*
5324 eval "ac_cv_func_$ac_func=yes"
5325else
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 rm -rf conftest*
5329 eval "ac_cv_func_$ac_func=no"
5330fi
5331rm -f conftest*
5332fi
5333
5334if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5335 echo "$ac_t""yes" 1>&6
5336 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5337 cat >> confdefs.h <<EOF
5338#define $ac_tr_func 1
5339EOF
5340
5341else
5342 echo "$ac_t""no" 1>&6
5343fi
5344done
5345
5346 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5347set dummy gmsgfmt; ac_word=$2
5348echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5349echo "configure:5350: checking for $ac_word" >&5
00036f5c 5350if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5351 echo $ac_n "(cached) $ac_c" 1>&6
5352else
5353 case "$GMSGFMT" in
5354 /*)
00036f5c 5355 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5356 ;;
5357 ?:/*)
00036f5c 5358 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
ab87f8c8
JL
5359 ;;
5360 *)
cd9e5e7c 5361 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
5362 ac_dummy="$PATH"
5363 for ac_dir in $ac_dummy; do
ab87f8c8
JL
5364 test -z "$ac_dir" && ac_dir=.
5365 if test -f $ac_dir/$ac_word; then
00036f5c 5366 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5367 break
5368 fi
5369 done
5370 IFS="$ac_save_ifs"
00036f5c 5371 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
ab87f8c8
JL
5372 ;;
5373esac
5374fi
00036f5c 5375GMSGFMT="$gcc_cv_path_GMSGFMT"
ab87f8c8
JL
5376if test -n "$GMSGFMT"; then
5377 echo "$ac_t""$GMSGFMT" 1>&6
5378else
5379 echo "$ac_t""no" 1>&6
5380fi
5381
5382 # Extract the first word of "xgettext", so it can be a program name with args.
5383set dummy xgettext; ac_word=$2
5384echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5385echo "configure:5386: checking for $ac_word" >&5
00036f5c 5386if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
ab87f8c8
JL
5387 echo $ac_n "(cached) $ac_c" 1>&6
5388else
5389 case "$XGETTEXT" in
5390 /*)
00036f5c 5391 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
ab87f8c8
JL
5392 ;;
5393 *)
5394 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5395 for ac_dir in $PATH; do
5396 test -z "$ac_dir" && ac_dir=.
5397 if test -f $ac_dir/$ac_word; then
5398 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
00036f5c 5399 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
ab87f8c8
JL
5400 break
5401 fi
5402 fi
5403 done
5404 IFS="$ac_save_ifs"
00036f5c 5405 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
ab87f8c8
JL
5406 ;;
5407esac
5408fi
00036f5c 5409XGETTEXT="$gcc_cv_path_XGETTEXT"
ab87f8c8
JL
5410if test -n "$XGETTEXT"; then
5411 echo "$ac_t""$XGETTEXT" 1>&6
5412else
5413 echo "$ac_t""no" 1>&6
5414fi
5415
5416 cat > conftest.$ac_ext <<EOF
84c041a1 5417#line 5418 "configure"
ab87f8c8
JL
5418#include "confdefs.h"
5419
5420int main() {
5421extern int _nl_msg_cat_cntr;
5422 return _nl_msg_cat_cntr
5423; return 0; }
5424EOF
84c041a1 5425if { (eval echo configure:5426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5426 rm -rf conftest*
5427 CATOBJEXT=.gmo
5428 DATADIRNAME=share
5429else
5430 echo "configure: failed program was:" >&5
5431 cat conftest.$ac_ext >&5
5432 rm -rf conftest*
5433 CATOBJEXT=.mo
5434 DATADIRNAME=lib
5435fi
5436rm -f conftest*
5437 INSTOBJEXT=.mo
9fdf713f
PT
5438 else
5439 create_catalogs="no"
ab87f8c8
JL
5440 fi
5441 fi
5442
5443else
5444 echo "$ac_t""no" 1>&6
5445fi
5446
5447
5448 if test "$CATOBJEXT" = "NONE"; then
5449 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
84c041a1 5450echo "configure:5451: checking whether catgets can be used" >&5
ab87f8c8
JL
5451 # Check whether --with-catgets or --without-catgets was given.
5452if test "${with_catgets+set}" = set; then
5453 withval="$with_catgets"
5454 nls_cv_use_catgets=$withval
5455else
5456 nls_cv_use_catgets=no
5457fi
5458
5459 echo "$ac_t""$nls_cv_use_catgets" 1>&6
5460
5461 if test "$nls_cv_use_catgets" = "yes"; then
5462 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
84c041a1 5463echo "configure:5464: checking for main in -li" >&5
ab87f8c8
JL
5464ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5465if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5466 echo $ac_n "(cached) $ac_c" 1>&6
5467else
5468 ac_save_LIBS="$LIBS"
5469LIBS="-li $LIBS"
5470cat > conftest.$ac_ext <<EOF
84c041a1 5471#line 5472 "configure"
ab87f8c8
JL
5472#include "confdefs.h"
5473
5474int main() {
5475main()
5476; return 0; }
5477EOF
84c041a1 5478if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5479 rm -rf conftest*
5480 eval "ac_cv_lib_$ac_lib_var=yes"
5481else
5482 echo "configure: failed program was:" >&5
5483 cat conftest.$ac_ext >&5
5484 rm -rf conftest*
5485 eval "ac_cv_lib_$ac_lib_var=no"
5486fi
5487rm -f conftest*
5488LIBS="$ac_save_LIBS"
5489
5490fi
5491if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5492 echo "$ac_t""yes" 1>&6
5493 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5494 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5495 cat >> confdefs.h <<EOF
5496#define $ac_tr_lib 1
5497EOF
5498
5499 LIBS="-li $LIBS"
5500
5501else
5502 echo "$ac_t""no" 1>&6
5503fi
5504
5505 echo $ac_n "checking for catgets""... $ac_c" 1>&6
84c041a1 5506echo "configure:5507: checking for catgets" >&5
ab87f8c8
JL
5507if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5508 echo $ac_n "(cached) $ac_c" 1>&6
5509else
5510 cat > conftest.$ac_ext <<EOF
84c041a1 5511#line 5512 "configure"
ab87f8c8
JL
5512#include "confdefs.h"
5513/* System header to define __stub macros and hopefully few prototypes,
5514 which can conflict with char catgets(); below. */
5515#include <assert.h>
5516/* Override any gcc2 internal prototype to avoid an error. */
5517/* We use char because int might match the return type of a gcc2
5518 builtin and then its argument prototype would still apply. */
5519char catgets();
5520
5521int main() {
5522
5523/* The GNU C library defines this for functions which it implements
5524 to always fail with ENOSYS. Some functions are actually named
5525 something starting with __ and the normal name is an alias. */
5526#if defined (__stub_catgets) || defined (__stub___catgets)
5527choke me
5528#else
99b09ff3 5529catgets();
ab87f8c8
JL
5530#endif
5531
5532; return 0; }
5533EOF
84c041a1 5534if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5535 rm -rf conftest*
5536 eval "ac_cv_func_catgets=yes"
5537else
5538 echo "configure: failed program was:" >&5
5539 cat conftest.$ac_ext >&5
5540 rm -rf conftest*
5541 eval "ac_cv_func_catgets=no"
5542fi
5543rm -f conftest*
5544fi
5545
5546if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5547 echo "$ac_t""yes" 1>&6
5548 cat >> confdefs.h <<\EOF
5549#define HAVE_CATGETS 1
5550EOF
5551
5552 INTLOBJS="\$(CATOBJS)"
5553 # Extract the first word of "gencat", so it can be a program name with args.
5554set dummy gencat; ac_word=$2
5555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5556echo "configure:5557: checking for $ac_word" >&5
00036f5c 5557if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
ab87f8c8
JL
5558 echo $ac_n "(cached) $ac_c" 1>&6
5559else
5560 case "$GENCAT" in
5561 /*)
00036f5c 5562 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
ab87f8c8
JL
5563 ;;
5564 ?:/*)
00036f5c 5565 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
ab87f8c8
JL
5566 ;;
5567 *)
cd9e5e7c 5568 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
5569 ac_dummy="$PATH"
5570 for ac_dir in $ac_dummy; do
ab87f8c8
JL
5571 test -z "$ac_dir" && ac_dir=.
5572 if test -f $ac_dir/$ac_word; then
00036f5c 5573 gcc_cv_path_GENCAT="$ac_dir/$ac_word"
ab87f8c8
JL
5574 break
5575 fi
5576 done
5577 IFS="$ac_save_ifs"
00036f5c 5578 test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
ab87f8c8
JL
5579 ;;
5580esac
5581fi
00036f5c 5582GENCAT="$gcc_cv_path_GENCAT"
ab87f8c8
JL
5583if test -n "$GENCAT"; then
5584 echo "$ac_t""$GENCAT" 1>&6
5585else
5586 echo "$ac_t""no" 1>&6
5587fi
5588 if test "$GENCAT" != "no"; then
5589 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5590set dummy gmsgfmt; ac_word=$2
5591echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5592echo "configure:5593: checking for $ac_word" >&5
00036f5c 5593if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5594 echo $ac_n "(cached) $ac_c" 1>&6
5595else
5596 case "$GMSGFMT" in
5597 /*)
00036f5c 5598 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5599 ;;
5600 ?:/*)
00036f5c 5601 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
ab87f8c8
JL
5602 ;;
5603 *)
cd9e5e7c 5604 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
5605 ac_dummy="$PATH"
5606 for ac_dir in $ac_dummy; do
ab87f8c8
JL
5607 test -z "$ac_dir" && ac_dir=.
5608 if test -f $ac_dir/$ac_word; then
00036f5c 5609 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5610 break
5611 fi
5612 done
5613 IFS="$ac_save_ifs"
00036f5c 5614 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
ab87f8c8
JL
5615 ;;
5616esac
5617fi
00036f5c 5618GMSGFMT="$gcc_cv_path_GMSGFMT"
ab87f8c8
JL
5619if test -n "$GMSGFMT"; then
5620 echo "$ac_t""$GMSGFMT" 1>&6
5621else
5622 echo "$ac_t""no" 1>&6
5623fi
5624
5625 if test "$GMSGFMT" = "no"; then
5626 # Extract the first word of "msgfmt", so it can be a program name with args.
5627set dummy msgfmt; ac_word=$2
5628echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5629echo "configure:5630: checking for $ac_word" >&5
00036f5c 5630if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632else
5633 case "$GMSGFMT" in
5634 /*)
00036f5c 5635 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5636 ;;
5637 *)
5638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5639 for ac_dir in $PATH; do
5640 test -z "$ac_dir" && ac_dir=.
5641 if test -f $ac_dir/$ac_word; then
5642 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
00036f5c 5643 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5644 break
5645 fi
5646 fi
5647 done
5648 IFS="$ac_save_ifs"
00036f5c 5649 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
ab87f8c8
JL
5650 ;;
5651esac
5652fi
00036f5c 5653GMSGFMT="$gcc_cv_path_GMSGFMT"
ab87f8c8
JL
5654if test -n "$GMSGFMT"; then
5655 echo "$ac_t""$GMSGFMT" 1>&6
5656else
5657 echo "$ac_t""no" 1>&6
5658fi
5659
cab10d56 5660 if test "$GMSGFMT" = "msgfmt"; then
17297c41
PT
5661 create_catalogs="no"
5662 fi
ab87f8c8
JL
5663 fi
5664 # Extract the first word of "xgettext", so it can be a program name with args.
5665set dummy xgettext; ac_word=$2
5666echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5667echo "configure:5668: checking for $ac_word" >&5
00036f5c 5668if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
ab87f8c8
JL
5669 echo $ac_n "(cached) $ac_c" 1>&6
5670else
5671 case "$XGETTEXT" in
5672 /*)
00036f5c 5673 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
ab87f8c8
JL
5674 ;;
5675 *)
5676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5677 for ac_dir in $PATH; do
5678 test -z "$ac_dir" && ac_dir=.
5679 if test -f $ac_dir/$ac_word; then
5680 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
00036f5c 5681 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
ab87f8c8
JL
5682 break
5683 fi
5684 fi
5685 done
5686 IFS="$ac_save_ifs"
00036f5c 5687 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
ab87f8c8
JL
5688 ;;
5689esac
5690fi
00036f5c 5691XGETTEXT="$gcc_cv_path_XGETTEXT"
ab87f8c8
JL
5692if test -n "$XGETTEXT"; then
5693 echo "$ac_t""$XGETTEXT" 1>&6
5694else
5695 echo "$ac_t""no" 1>&6
5696fi
5697
5698 USE_INCLUDED_LIBINTL=yes
5699 CATOBJEXT=.cat
5700 INSTOBJEXT=.cat
5701 DATADIRNAME=lib
5702 INTLDEPS='$(top_builddir)/intl/libintl.a'
5703 INTLLIBS=$INTLDEPS
5704 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5705 nls_cv_header_intl=intl/libintl.h
5706 nls_cv_header_libgt=intl/libgettext.h
5707 fi
5708else
5709 echo "$ac_t""no" 1>&6
5710fi
5711
5712 fi
5713 fi
5714
5715 if test "$CATOBJEXT" = "NONE"; then
5716 nls_cv_use_gnu_gettext=yes
5717 fi
5718 fi
5719
5720 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5721 INTLOBJS="\$(GETTOBJS)"
5722 # Extract the first word of "msgfmt", so it can be a program name with args.
5723set dummy msgfmt; ac_word=$2
5724echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5725echo "configure:5726: checking for $ac_word" >&5
00036f5c 5726if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5727 echo $ac_n "(cached) $ac_c" 1>&6
5728else
5729 case "$MSGFMT" in
5730 /*)
00036f5c 5731 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5732 ;;
5733 *)
5734 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5735 for ac_dir in $PATH; do
5736 test -z "$ac_dir" && ac_dir=.
5737 if test -f $ac_dir/$ac_word; then
5738 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
00036f5c 5739 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5740 break
5741 fi
5742 fi
5743 done
5744 IFS="$ac_save_ifs"
00036f5c 5745 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
ab87f8c8
JL
5746 ;;
5747esac
5748fi
00036f5c 5749MSGFMT="$gcc_cv_path_MSGFMT"
ab87f8c8
JL
5750if test -n "$MSGFMT"; then
5751 echo "$ac_t""$MSGFMT" 1>&6
5752else
5753 echo "$ac_t""no" 1>&6
5754fi
5755
5756 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5757set dummy gmsgfmt; ac_word=$2
5758echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5759echo "configure:5760: checking for $ac_word" >&5
00036f5c 5760if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
5761 echo $ac_n "(cached) $ac_c" 1>&6
5762else
5763 case "$GMSGFMT" in
5764 /*)
00036f5c 5765 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
5766 ;;
5767 ?:/*)
00036f5c 5768 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
ab87f8c8
JL
5769 ;;
5770 *)
cd9e5e7c 5771 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
5772 ac_dummy="$PATH"
5773 for ac_dir in $ac_dummy; do
ab87f8c8
JL
5774 test -z "$ac_dir" && ac_dir=.
5775 if test -f $ac_dir/$ac_word; then
00036f5c 5776 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
5777 break
5778 fi
5779 done
5780 IFS="$ac_save_ifs"
00036f5c 5781 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
ab87f8c8
JL
5782 ;;
5783esac
5784fi
00036f5c 5785GMSGFMT="$gcc_cv_path_GMSGFMT"
ab87f8c8
JL
5786if test -n "$GMSGFMT"; then
5787 echo "$ac_t""$GMSGFMT" 1>&6
5788else
5789 echo "$ac_t""no" 1>&6
5790fi
5791
cab10d56 5792 if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
17297c41 5793 create_catalogs="no"
17297c41 5794 fi
ab87f8c8
JL
5795 # Extract the first word of "xgettext", so it can be a program name with args.
5796set dummy xgettext; ac_word=$2
5797echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
84c041a1 5798echo "configure:5799: checking for $ac_word" >&5
00036f5c 5799if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
ab87f8c8
JL
5800 echo $ac_n "(cached) $ac_c" 1>&6
5801else
5802 case "$XGETTEXT" in
5803 /*)
00036f5c 5804 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
ab87f8c8
JL
5805 ;;
5806 *)
5807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5808 for ac_dir in $PATH; do
5809 test -z "$ac_dir" && ac_dir=.
5810 if test -f $ac_dir/$ac_word; then
5811 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
00036f5c 5812 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
ab87f8c8
JL
5813 break
5814 fi
5815 fi
5816 done
5817 IFS="$ac_save_ifs"
00036f5c 5818 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
ab87f8c8
JL
5819 ;;
5820esac
5821fi
00036f5c 5822XGETTEXT="$gcc_cv_path_XGETTEXT"
ab87f8c8
JL
5823if test -n "$XGETTEXT"; then
5824 echo "$ac_t""$XGETTEXT" 1>&6
5825else
5826 echo "$ac_t""no" 1>&6
5827fi
5828
5829
5830 USE_INCLUDED_LIBINTL=yes
5831 CATOBJEXT=.gmo
5832 INSTOBJEXT=.mo
5833 DATADIRNAME=share
5834 INTLDEPS='$(top_builddir)/intl/libintl.a'
5835 INTLLIBS=$INTLDEPS
5836 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5837 nls_cv_header_intl=intl/libintl.h
5838 nls_cv_header_libgt=intl/libgettext.h
5839 fi
5840
5841 if test "$XGETTEXT" != ":"; then
5842 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5843 : ;
5844 else
5845 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5846 XGETTEXT=":"
5847 fi
5848 fi
5849
17297c41
PT
5850
5851
ab87f8c8
JL
5852 # We need to process the po/ directory.
5853 POSUB=po
5854 else
5855 DATADIRNAME=share
5856 nls_cv_header_intl=intl/libintl.h
5857 nls_cv_header_libgt=intl/libgettext.h
5858 fi
5859
5860
5861
5862
5863 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5864 # because some of the sources are only built for this goal.
5865 if test "$PACKAGE" = gettext; then
5866 USE_NLS=yes
5867 USE_INCLUDED_LIBINTL=yes
5868 fi
5869
5870 for lang in $ALL_LINGUAS; do
5871 GMOFILES="$GMOFILES $lang.gmo"
5872 POFILES="$POFILES $lang.po"
5873 done
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
4d0230e1 5888 if test "x$create_catalogs" = "xno"; then
9fdf713f
PT
5889 echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5890 fi
5891
17297c41 5892 if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
ab87f8c8
JL
5893 if test "x$ALL_LINGUAS" = "x"; then
5894 LINGUAS=
5895 else
5896 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
84c041a1 5897echo "configure:5898: checking for catalogs to be installed" >&5
47f01856
PT
5898 if test "x$LINGUAS" = "x"; then
5899 LINGUAS=$ALL_LINGUAS
5900 else
5901 NEW_LINGUAS=
5902 for lang in $ALL_LINGUAS; do
5903 case " $LINGUAS " in
5904 *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5905 esac
5906 done
5907 LINGUAS=$NEW_LINGUAS
5908 fi
ab87f8c8
JL
5909 echo "$ac_t""$LINGUAS" 1>&6
5910 fi
5911
5912 if test -n "$LINGUAS"; then
5913 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5914 fi
5915 fi
5916
5917 if test $ac_cv_header_locale_h = yes; then
5918 INCLUDE_LOCALE_H="#include <locale.h>"
5919 else
5920 INCLUDE_LOCALE_H="\
5921/* The system does not provide the header <locale.h>. Take care yourself. */"
5922 fi
5923
5924
5925 test -d intl || mkdir intl
5926 if test "$CATOBJEXT" = ".cat"; then
5927 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5928echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
84c041a1 5929echo "configure:5930: checking for linux/version.h" >&5
ab87f8c8
JL
5930if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5931 echo $ac_n "(cached) $ac_c" 1>&6
5932else
5933 cat > conftest.$ac_ext <<EOF
84c041a1 5934#line 5935 "configure"
ab87f8c8
JL
5935#include "confdefs.h"
5936#include <linux/version.h>
5937EOF
5938ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
84c041a1 5939{ (eval echo configure:5940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 5940ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
5941if test -z "$ac_err"; then
5942 rm -rf conftest*
5943 eval "ac_cv_header_$ac_safe=yes"
5944else
5945 echo "$ac_err" >&5
5946 echo "configure: failed program was:" >&5
5947 cat conftest.$ac_ext >&5
5948 rm -rf conftest*
5949 eval "ac_cv_header_$ac_safe=no"
5950fi
5951rm -f conftest*
5952fi
5953if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5954 echo "$ac_t""yes" 1>&6
5955 msgformat=linux
5956else
5957 echo "$ac_t""no" 1>&6
5958msgformat=xopen
5959fi
5960
5961
5962 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
5963 fi
5964 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5965 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
5966
5967 if test "$PACKAGE" = "gettext"; then
5968 GT_NO="#NO#"
5969 GT_YES=
5970 else
5971 GT_NO=
5972 GT_YES="#YES#"
5973 fi
5974
5975
5976
5977 MKINSTALLDIRS=
5978 if test -n "$ac_aux_dir"; then
5979 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5980 fi
5981 if test -z "$MKINSTALLDIRS"; then
5982 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5983 fi
5984
5985
5986 l=
5987
5988
5989 test -d po || mkdir po
5990 if test "x$srcdir" != "x."; then
5991 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5992 posrcprefix="$srcdir/"
5993 else
5994 posrcprefix="../$srcdir/"
5995 fi
5996 else
5997 posrcprefix="../"
5998 fi
5999 rm -f po/POTFILES
6000 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
6001 < $srcdir/po/POTFILES.in > po/POTFILES
6002
6003XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
6004
f4ab28e3
MK
6005# Windows32 Registry support for specifying GCC installation paths.
6006# Check whether --enable-win32-registry or --disable-win32-registry was given.
6007if test "${enable_win32_registry+set}" = set; then
6008 enableval="$enable_win32_registry"
6009 :
6010fi
6011
6012
6013echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
84c041a1 6014echo "configure:6015: checking whether windows registry support is requested" >&5
f4ab28e3
MK
6015if test x$enable_win32_registry != xno; then
6016 cat >> confdefs.h <<\EOF
6017#define ENABLE_WIN32_REGISTRY 1
6018EOF
6019
6020 echo "$ac_t""yes" 1>&6
6021else
6022 echo "$ac_t""no" 1>&6
6023fi
6024
6025# Check if user specified a different registry key.
6026case x${enable_win32_registry} in
6027x | xyes)
6028 # default.
6029 gcc_cv_win32_registry_key="$VERSION"
6030 ;;
6031xno)
6032 # no registry lookup.
6033 gcc_cv_win32_registry_key=''
6034 ;;
6035*)
6036 # user-specified key.
6037 gcc_cv_win32_registry_key="$enable_win32_registry"
6038 ;;
6039esac
6040
6041if test x$enable_win32_registry != xno; then
6042 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
84c041a1 6043echo "configure:6044: checking registry key on windows hosts" >&5
f4ab28e3
MK
6044 cat >> confdefs.h <<EOF
6045#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6046EOF
6047
6048 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6049fi
6050
ab87f8c8
JL
6051# Get an absolute path to the GCC top-level source directory
6052holddir=`pwd`
6053cd $srcdir
6054topdir=`pwd`
6055cd $holddir
6056
6057# Conditionalize the makefile for this host machine.
6058# Make-host contains the concatenation of all host makefile fragments
6059# [there can be more than one]. This file is built by configure.frag.
6060host_overrides=Make-host
6061dep_host_xmake_file=
6062for f in .. ${host_xmake_file}
6063do
6064 if test -f ${srcdir}/config/$f
6065 then
6066 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6067 fi
6068done
6069
6070# Conditionalize the makefile for this target machine.
6071# Make-target contains the concatenation of all host makefile fragments
6072# [there can be more than one]. This file is built by configure.frag.
6073target_overrides=Make-target
6074dep_tmake_file=
6075for f in .. ${tmake_file}
6076do
6077 if test -f ${srcdir}/config/$f
6078 then
6079 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6080 fi
6081done
6082
6083# If the host doesn't support symlinks, modify CC in
6084# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6085# Otherwise, we can use "CC=$(CC)".
6086rm -f symtest.tem
6087if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6088then
6089 cc_set_by_configure="\$(CC)"
5aa82ace 6090 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8
JL
6091 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6092else
6093 rm -f symtest.tem
6094 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6095 then
6096 symbolic_link="cp -p"
6097 else
6098 symbolic_link="cp"
6099 fi
6100 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 6101 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8
JL
6102 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6103fi
6104rm -f symtest.tem
6105
6106out_object_file=`basename $out_file .c`.o
6107
6108tm_file_list=
6109for f in $tm_file; do
64ccbc99 6110 case $f in
22fdd65e 6111 gansidecl.h | defaults.h )
64ccbc99
KG
6112 tm_file_list="${tm_file_list} $f" ;;
6113 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6114 esac
ab87f8c8
JL
6115done
6116
11642c3a
ZW
6117tm_p_file_list=
6118for f in $tm_p_file; do
6119 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6120done
6121
ab87f8c8
JL
6122host_xm_file_list=
6123for f in $host_xm_file; do
64ccbc99 6124 case $f in
75e93faa 6125 auto-host.h | gansidecl.h | defaults.h )
64ccbc99
KG
6126 host_xm_file_list="${host_xm_file_list} $f" ;;
6127 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6128 esac
ab87f8c8
JL
6129done
6130
6131build_xm_file_list=
6132for f in $build_xm_file; do
64ccbc99 6133 case $f in
75e93faa 6134 auto-build.h | auto-host.h | gansidecl.h | defaults.h )
64ccbc99
KG
6135 build_xm_file_list="${build_xm_file_list} $f" ;;
6136 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6137 esac
ab87f8c8
JL
6138done
6139
6140# Define macro CROSS_COMPILE in compilation
6141# if this is a cross-compiler.
6142# Also use all.cross instead of all.internal
6143# and add cross-make to Makefile.
6144cross_overrides="/dev/null"
6145if test x$host != x$target
6146then
6147 cross_defines="CROSS=-DCROSS_COMPILE"
6148 cross_overrides="${topdir}/cross-make"
6149fi
6150
b39d221a
EC
6151# If this is a cross-compiler that does not
6152# have its own set of headers then define
6153# inhibit_libc
6154
6155# If this is using newlib, then define inhibit_libc in
6156# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
6157# libgcc.a, but that's OK because newlib should have its own version of
6158# assert.h.
6159inhibit_libc=
6160if test x$host != x$target && test x$with_headers = x; then
6161 inhibit_libc=-Dinhibit_libc
6162else
6163 if test x$with_newlib = xyes; then
6164 inhibit_libc=-Dinhibit_libc
6165 fi
6166fi
6167
6168
ab87f8c8
JL
6169# When building gcc with a cross-compiler, we need to fix a few things.
6170# This must come after cross-make as we want all.build to override
6171# all.cross.
6172build_overrides="/dev/null"
6173if test x$build != x$host
6174then
6175 build_overrides="${topdir}/build-make"
6176fi
6177
6178# Expand extra_headers to include complete path.
6179# This substitutes for lots of t-* files.
6180extra_headers_list=
6181if test "x$extra_headers" = x
6182then true
6183else
6184 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6185 for file in $extra_headers;
6186 do
6187 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6188 done
6189fi
6190
6191if test x$use_collect2 = xno; then
6192 use_collect2=
6193fi
6194
6195# Add a definition of USE_COLLECT2 if system wants one.
6196# Also tell toplev.c what to do.
6197# This substitutes for lots of t-* files.
6198if test x$use_collect2 = x
6199then
6200 will_use_collect2=
6201 maybe_use_collect2=
6202else
6203 will_use_collect2="collect2"
6204 maybe_use_collect2="-DUSE_COLLECT2"
6205fi
6206
ab87f8c8
JL
6207# If we have gas in the build tree, make a link to it.
6208if test -f ../gas/Makefile; then
6209 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6210fi
6211
6212# If we have nm in the build tree, make a link to it.
6213if test -f ../binutils/Makefile; then
6214 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6215fi
6216
6217# If we have ld in the build tree, make a link to it.
6218if test -f ../ld/Makefile; then
6219# if test x$use_collect2 = x; then
6220# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6221# else
6222 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6223# fi
6224fi
6225
981d4858
JM
6226# Figure out what assembler we will be using.
6227echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
84c041a1 6228echo "configure:6229: checking what assembler to use" >&5
ab87f8c8 6229gcc_cv_as=
981d4858
JM
6230gcc_cv_gas_major_version=
6231gcc_cv_gas_minor_version=
ab87f8c8
JL
6232gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6233if test -x "$DEFAULT_ASSEMBLER"; then
6234 gcc_cv_as="$DEFAULT_ASSEMBLER"
6235elif test -x "$AS"; then
6236 gcc_cv_as="$AS"
6237elif test -x as$host_exeext; then
6238 # Build using assembler in the current directory.
6239 gcc_cv_as=./as$host_exeext
6240elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6241 # Single tree build which includes gas.
6242 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6243 do
6244 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6245 if test x$gcc_cv_gas_version != x; then
6246 break
6247 fi
6248 done
6249 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6250 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
981d4858 6251fi
9e423e6d 6252
981d4858 6253if test "x$gcc_cv_as" = x -a x$host = x$target; then
9e423e6d 6254 # Native build.
779243f7
JL
6255 # Search the same directories that the installed compiler will
6256 # search. Else we may find the wrong assembler and lose. If we
6257 # do not find a suitable assembler binary, then try the user's
6258 # path.
6259 #
6260 # Also note we have to check MD_EXEC_PREFIX before checking the
6261 # user's path. Unfortunately, there is no good way to get at the
6262 # value of MD_EXEC_PREFIX here. So we do a brute force search
6263 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6264 # to be fixed as part of the make/configure rewrite too.
6265
6266 if test "x$exec_prefix" = xNONE; then
6267 if test "x$prefix" = xNONE; then
6268 test_prefix=/usr/local
6269 else
6270 test_prefix=$prefix
6271 fi
6272 else
6273 test_prefix=$exec_prefix
6274 fi
6275
6276 # If the loop below does not find an assembler, then use whatever
6277 # one we can find in the users's path.
6278 # user's path.
16a0fe50 6279 gcc_cv_as=as$host_exeext
779243f7
JL
6280
6281 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6282 $test_prefix/lib/gcc-lib/$target \
6283 /usr/lib/gcc/$target/$gcc_version \
6284 /usr/lib/gcc/$target \
6285 $test_prefix/$target/bin/$target/$gcc_version \
6286 $test_prefix/$target/bin \
6287 /usr/libexec \
6288 /usr/ccs/gcc \
6289 /usr/ccs/bin \
6290 /udk/usr/ccs/bin \
6291 /bsd43/usr/lib/cmplrs/cc \
6292 /usr/cross64/usr/bin \
6293 /usr/lib/cmplrs/cc \
6294 /sysv/usr/lib/cmplrs/cc \
6295 /svr4/usr/lib/cmplrs/cc \
6296 /usr/bin"
6297
6298 for dir in $test_dirs; do
6299 if test -f $dir/as$host_exeext; then
6300 gcc_cv_as=$dir/as$host_exeext
6301 break;
6302 fi
6303 done
9e423e6d 6304fi
981d4858
JM
6305if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6306 echo "$ac_t"""newly built gas"" 1>&6
6307else
6308 echo "$ac_t""$gcc_cv_as" 1>&6
6309fi
6310
6311# Figure out what nm we will be using.
6312echo $ac_n "checking what nm to use""... $ac_c" 1>&6
84c041a1 6313echo "configure:6314: checking what nm to use" >&5
981d4858
JM
6314if test -x nm$host_exeext; then
6315 gcc_cv_nm=./nm$host_exeext
6316elif test x$host = x$target; then
6317 # Native build.
6318 gcc_cv_nm=nm$host_exeext
6319fi
6320echo "$ac_t""$gcc_cv_nm" 1>&6
6321
6322# Figure out what assembler alignment features are present.
6323echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
84c041a1 6324echo "configure:6325: checking assembler alignment features" >&5
9d147085 6325gcc_cv_as_alignment_features=none
981d4858
JM
6326if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6327 # Gas version 2.6 and later support for .balign and .p2align.
6328 # bytes to skip when using .p2align.
6329 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
6330 gcc_cv_as_alignment_features=".balign and .p2align"
6331 cat >> confdefs.h <<\EOF
6332#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6333EOF
6334
6335 fi
6336 # Gas version 2.8 and later support specifying the maximum
6337 # bytes to skip when using .p2align.
6338 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
6339 gcc_cv_as_alignment_features=".p2align including maximum skip"
6340 cat >> confdefs.h <<\EOF
6341#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6342EOF
6343
6344 fi
6345elif test x$gcc_cv_as != x; then
00ccc16d
JL
6346 # Check if we have .balign and .p2align
6347 echo ".balign 4" > conftest.s
6348 echo ".p2align 2" >> conftest.s
6349 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6350 gcc_cv_as_alignment_features=".balign and .p2align"
6351 cat >> confdefs.h <<\EOF
6352#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6353EOF
6354
6355 fi
6356 rm -f conftest.s conftest.o
9e423e6d
JW
6357 # Check if specifying the maximum bytes to skip when
6358 # using .p2align is supported.
6359 echo ".p2align 4,,7" > conftest.s
6360 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6361 gcc_cv_as_alignment_features=".p2align including maximum skip"
6362 cat >> confdefs.h <<\EOF
6363#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6364EOF
6365
6366 fi
6367 rm -f conftest.s conftest.o
6368fi
6369echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6370
d1accaa3 6371echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
84c041a1 6372echo "configure:6373: checking assembler subsection support" >&5
9d147085 6373gcc_cv_as_subsections=no
981d4858
JM
6374if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6375 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
6376 gcc_cv_as_subsections="working .subsection -1"
6377 fi
6378elif test x$gcc_cv_as != x; then
d1accaa3
JJ
6379 # Check if we have .subsection
6380 echo ".subsection 1" > conftest.s
6381 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6382 gcc_cv_as_subsections=".subsection"
d1accaa3
JJ
6383 if test x$gcc_cv_nm != x; then
6384 cat > conftest.s <<EOF
6385conftest_label1: .word 0
6386.subsection -1
6387conftest_label2: .word 0
6388.previous
6389EOF
6390 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6391 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6392 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
1b015bec
AO
6393 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6394 :
6395 else
d1accaa3 6396 gcc_cv_as_subsections="working .subsection -1"
d1accaa3
JJ
6397 fi
6398 fi
6399 fi
6400 fi
6401 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
6402fi
6403if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6404 cat >> confdefs.h <<\EOF
6405#define HAVE_GAS_SUBSECTION_ORDERING 1
6406EOF
6407
d1accaa3
JJ
6408fi
6409echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6410
12822146 6411echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
84c041a1 6412echo "configure:6413: checking assembler weak support" >&5
9d147085 6413gcc_cv_as_weak=no
981d4858
JM
6414if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6415 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
6416 gcc_cv_as_weak="yes"
6417 fi
6418elif test x$gcc_cv_as != x; then
12822146
JL
6419 # Check if we have .weak
6420 echo " .weak foobar" > conftest.s
6421 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
12822146
JL
6422 gcc_cv_as_weak="yes"
6423 fi
6424 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
6425fi
6426if test x"$gcc_cv_as_weak" = xyes; then
6427 cat >> confdefs.h <<\EOF
6428#define HAVE_GAS_WEAK 1
6429EOF
6430
12822146
JL
6431fi
6432echo "$ac_t""$gcc_cv_as_weak" 1>&6
6433
6a9c5260 6434echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
84c041a1 6435echo "configure:6436: checking assembler hidden support" >&5
9d147085 6436gcc_cv_as_hidden=no
981d4858
JM
6437if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6438 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
6439 gcc_cv_as_hidden="yes"
6440 fi
6441elif test x$gcc_cv_as != x; then
6a9c5260
UD
6442 # Check if we have .hidden
6443 echo " .hidden foobar" > conftest.s
6444 echo "foobar:" >> conftest.s
6445 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6a9c5260
UD
6446 gcc_cv_as_hidden="yes"
6447 fi
6448 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
6449fi
6450if test x"$gcc_cv_as_hidden" = xyes; then
6451 cat >> confdefs.h <<\EOF
6452#define HAVE_GAS_HIDDEN 1
6453EOF
6454
6a9c5260
UD
6455fi
6456echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6457
b7460f24 6458echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
84c041a1 6459echo "configure:6460: checking assembler leb128 support" >&5
b7460f24
RH
6460gcc_cv_as_hidden=no
6461if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6462 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
6463 gcc_cv_as_leb128="yes"
6464 fi
6465elif test x$gcc_cv_as != x; then
6466 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6467 cat > conftest.s <<EOF
6468 .data
6469 .uleb128 L2 - L1
6470L1:
6471 .uleb128 1280
6472 .sleb128 -1010
6473L2:
6474EOF
6475 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6476 gcc_cv_as_leb128="yes"
6477 fi
6478 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6479fi
6480if test x"$gcc_cv_as_leb128" = xyes; then
6481 cat >> confdefs.h <<\EOF
6482#define HAVE_AS_LEB128 1
6483EOF
6484
6485fi
6486echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6487
1cb36a98
RH
6488case "$target" in
6489 sparc*-*-*)
6490 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
84c041a1 6491echo "configure:6492: checking assembler .register pseudo-op support" >&5
5b68c389
AO
6492if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6493 echo $ac_n "(cached) $ac_c" 1>&6
6494else
6495
6496 gcc_cv_as_register_pseudo_op=unknown
6497 if test x$gcc_cv_as != x; then
6498 # Check if we have .register
6499 echo ".register %g2, #scratch" > conftest.s
6500 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
1cb36a98 6501 gcc_cv_as_register_pseudo_op=yes
5b68c389
AO
6502 else
6503 gcc_cv_as_register_pseudo_op=no
6504 fi
6505 rm -f conftest.s conftest.o
6506 fi
6507
6508fi
6509
6510echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6511 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6512 cat >> confdefs.h <<\EOF
1cb36a98
RH
6513#define HAVE_AS_REGISTER_PSEUDO_OP 1
6514EOF
6515
1cb36a98 6516 fi
1cb36a98 6517
e95b1e6a 6518 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
84c041a1 6519echo "configure:6520: checking assembler supports -relax" >&5
e95b1e6a
JJ
6520if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6521 echo $ac_n "(cached) $ac_c" 1>&6
6522else
6523
6524 gcc_cv_as_relax_opt=unknown
6525 if test x$gcc_cv_as != x; then
6526 # Check if gas supports -relax
6527 echo ".text" > conftest.s
6528 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6529 gcc_cv_as_relax_opt=yes
6530 else
6531 gcc_cv_as_relax_opt=no
6532 fi
6533 rm -f conftest.s conftest.o
6534 fi
6535
6536fi
6537
6538echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6539 if test "x$gcc_cv_as_relax_opt" = xyes; then
6540 cat >> confdefs.h <<\EOF
6541#define HAVE_AS_RELAX_OPTION 1
6542EOF
6543
6544 fi
6545
5b68c389
AO
6546 case "$tm_file" in
6547 *64*)
6548 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
84c041a1 6549echo "configure:6550: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
5b68c389
AO
6550if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6551 echo $ac_n "(cached) $ac_c" 1>&6
6552else
6553
6554 if test -n "$gcc_cv_as"; then
6555 echo ".xword foo" > conftest.s
6556 gcc_cv_as_flags64=no
8a90b95d 6557 for flag in "-xarch=v9" "-64 -Av9"; do
5b68c389
AO
6558 if $gcc_cv_as $flag -o conftest.o conftest.s \
6559 > /dev/null 2>&1; then
6560 gcc_cv_as_flags64=$flag
6561 break
6562 fi
6563 done
6564 rm -f conftest.s conftest.o
6565 else
6566 if test "$gas" = yes; then
6567 gcc_cv_as_flags64="-64 -Av9"
6568 else
6569 gcc_cv_as_flags64="-xarch=v9"
6570 fi
1cb36a98 6571 fi
5b68c389
AO
6572
6573fi
6574
6575echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6576 if test "x$gcc_cv_as_flags64" = xno; then
6577
6578 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6579 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6580
6581 else
6582 cat >> confdefs.h <<EOF
6583#define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6584EOF
6585
1cb36a98 6586 fi
5b68c389
AO
6587 ;;
6588 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6589 ;;
6590 esac
6591
6592 if test "x$gcc_cv_as_flags64" != xno; then
6593 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
84c041a1 6594echo "configure:6595: checking for assembler offsetable %lo() support" >&5
5b68c389
AO
6595if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6596 echo $ac_n "(cached) $ac_c" 1>&6
6597else
6598
6599 gcc_cv_as_offsetable_lo10=unknown
6600 if test "x$gcc_cv_as" != x; then
6601 # Check if assembler has offsetable %lo()
6602 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6603 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6604 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6605 > /dev/null 2>&1 &&
6606 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6607 > /dev/null 2>&1; then
6608 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6609 gcc_cv_as_offsetable_lo10=no
6610 else
6611 gcc_cv_as_offsetable_lo10=yes
6612 fi
6613 else
6614 gcc_cv_as_offsetable_lo10=no
6615 fi
6616 rm -f conftest.s conftest.o conftest1.s conftest1.o
6617 fi
6618
6619fi
6620
6621echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6622 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6623 cat >> confdefs.h <<\EOF
1cb36a98
RH
6624#define HAVE_AS_OFFSETABLE_LO10 1
6625EOF
6626
1cb36a98 6627 fi
1cb36a98 6628 fi
1cb36a98
RH
6629 ;;
6630
6631 i[34567]86-*-*)
6632 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
84c041a1 6633echo "configure:6634: checking assembler instructions" >&5
1cb36a98 6634 gcc_cv_as_instructions=
981d4858
JM
6635 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6636 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
6637 gcc_cv_as_instructions="filds fists"
6638 fi
6639 elif test x$gcc_cv_as != x; then
53b5ce19
JW
6640 set "filds fists" "filds mem; fists mem"
6641 while test $# -gt 0
6642 do
6643 echo "$2" > conftest.s
6644 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6645 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
53b5ce19
JW
6646 fi
6647 shift 2
6648 done
6649 rm -f conftest.s conftest.o
1cb36a98 6650 fi
981d4858
JM
6651 if test x"$gcc_cv_as_instructions" != x; then
6652 cat >> confdefs.h <<EOF
ee7692d2 6653#define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
981d4858
JM
6654EOF
6655
6656 fi
1cb36a98
RH
6657 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6658 ;;
6659esac
53b5ce19 6660
9d147085 6661echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
84c041a1 6662echo "configure:6663: checking assembler dwarf2 debug_line support" >&5
9d147085
RH
6663gcc_cv_as_dwarf2_debug_line=no
6664# ??? Not all targets support dwarf2 debug_line, even within a version
6665# of gas. Moreover, we need to emit a valid instruction to trigger any
6666# info to the output file. So, as supported targets are added to gas 2.11,
6667# add some instruction here to (also) show we expect this might work.
6668# ??? Once 2.11 is released, probably need to add first known working
6669# version to the per-target configury.
6670case "$target" in
e6978109 6671 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
9d147085
RH
6672 insn="nop"
6673 ;;
6674 ia64*-*-*)
6675 insn="nop 0"
6676 ;;
6677 esac
6678if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6679then
6680 if test "$gcc_cv_gas_major_version" -eq 2 \
6681 -a "$gcc_cv_gas_minor_version" -ge 11 \
6682 -o "$gcc_cv_gas_major_version" -gt 2 \
6683 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6684 && test x"$insn" != x ; then
6685 gcc_cv_as_dwarf2_debug_line="yes"
6686 fi
6687elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6688 echo ' .file 0 "conftest.s"' > conftest.s
6689 echo ' .loc 0 3 0' >> conftest.s
6690 echo " $insn" >> conftest.s
981975b6 6691 # ??? This fails with non-gnu grep.
9d147085
RH
6692 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6693 && grep debug_line conftest.o > /dev/null 2>&1 ; then
981975b6
RH
6694 # The .debug_line file table must be in the exact order that
6695 # we specified the files, since these indicies are also used
6696 # by DW_AT_decl_file. Approximate this test by testing if
6697 # the assembler bitches if the same index is assigned twice.
6698 echo ' .file 1 "foo.s"' > conftest.s
6699 echo ' .file 1 "bar.s"' >> conftest.s
6700 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6701 then
6702 gcc_cv_as_dwarf2_debug_line="no"
6703 else
6704 gcc_cv_as_dwarf2_debug_line="yes"
6705 fi
9d147085
RH
6706 fi
6707 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6708fi
6709if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6710 cat >> confdefs.h <<\EOF
6711#define HAVE_AS_DWARF2_DEBUG_LINE 1
6712EOF
6713
6714fi
6715echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6716
861bb6c1 6717# Figure out what language subdirectories are present.
71205e0b
MH
6718# Look if the user specified --enable-languages="..."; if not, use
6719# the environment variable $LANGUAGES if defined. $LANGUAGES might
6720# go away some day.
6721if test x"${enable_languages+set}" != xset; then
6722 if test x"${LANGUAGES+set}" = xset; then
6723 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6724 else
6725 enable_languages=all
6726 fi
d6c6b553
PE
6727else
6728 if test x"${enable_languages}" = x; then
6729 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6730 fi
71205e0b 6731fi
75382c6d
TT
6732
6733# First scan to see if an enabled language requires some other language.
6734# We assume that a given config-lang.in will list all the language
6735# front ends it requires, even if some are required indirectly.
6736for lang in ${srcdir}/*/config-lang.in ..
6737do
6738 case $lang in
6739 ..)
6740 ;;
6741 # The odd quoting in the next line works around
6742 # an apparent bug in bash 1.12 on linux.
6743 ${srcdir}/[*]/config-lang.in)
6744 ;;
6745 *)
6746 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6747 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
6748 for other in $this_lang_requires
6749 do
6750 case ,${enable_languages}, in
6751 *,$other,*)
6752 ;;
6753 *,all,*)
6754 ;;
1bf17cc4 6755 *,$lang_alias,*)
75382c6d
TT
6756 enable_languages="$enable_languages,$other"
6757 ;;
6758 esac
6759 done
6760 ;;
6761 esac
6762done
6763
861bb6c1
JL
6764subdirs=
6765for lang in ${srcdir}/*/config-lang.in ..
6766do
6767 case $lang in
6768 ..) ;;
6769 # The odd quoting in the next line works around
6770 # an apparent bug in bash 1.12 on linux.
6771 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
6772 *)
6773 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
2b60b2cb
AO
6774 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
6775 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
71205e0b
MH
6776 if test "x$lang_alias" = x
6777 then
6778 echo "$lang doesn't set \$language." 1>&2
6779 exit 1
6780 fi
2b60b2cb
AO
6781 case ${build_by_default},${enable_languages}, in
6782 *,$lang_alias,*) add_this_lang=yes ;;
6783 no,*) add_this_lang=no ;;
6784 *,all,*) add_this_lang=yes ;;
6785 *) add_this_lang=no ;;
6786 esac
71205e0b
MH
6787 if test x"${add_this_lang}" = xyes; then
6788 case $lang in
6789 ${srcdir}/ada/config-lang.in)
1ffc5c6e 6790 if test x$have_gnat = xyes ; then
71205e0b
MH
6791 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6792 fi
6793 ;;
6794 *)
6795 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6796 ;;
6797 esac
6798 fi
6799 ;;
861bb6c1
JL
6800 esac
6801done
6802
f24af81b
TT
6803# Make gthr-default.h if we have a thread file.
6804gthread_flags=
75bffa71 6805if test $thread_file != single; then
f24af81b 6806 rm -f gthr-default.h
db0d1ed9 6807 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
6808 gthread_flags=-DHAVE_GTHR_DEFAULT
6809fi
6810
6811
81bf3d9e
RH
6812# Find out what GC implementation we want, or may, use.
6813# Check whether --with-gc or --without-gc was given.
6814if test "${with_gc+set}" = set; then
6815 withval="$with_gc"
6816 case "$withval" in
6817 simple | page)
6818 GGC=ggc-$withval
6819 ;;
6820 *)
6821 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6822 ;;
6823esac
6824else
005537df 6825 GGC=ggc-page
81bf3d9e
RH
6826fi
6827
6828
6829echo "Using $GGC for garbage collection."
6830
3c809ba4 6831# Use the system's zlib library.
b8dad04b
ZW
6832zlibdir=-L../zlib
6833zlibinc="-I\$(srcdir)/../zlib"
3c809ba4
AG
6834# Check whether --with-system-zlib or --without-system-zlib was given.
6835if test "${with_system_zlib+set}" = set; then
6836 withval="$with_system_zlib"
6837 zlibdir=
6838zlibinc=
6839
6840fi
6841
6842
6843
6844
119d24d1 6845cat >> confdefs.h <<EOF
22fdd65e 6846#define ENABLE_STD_NAMESPACE 1
119d24d1 6847EOF
7822500a
BK
6848
6849
dc6746e7
PT
6850
6851echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
981975b6 6852echo "configure:6853: checking whether to enable maintainer-specific portions of Makefiles" >&5
dc6746e7
PT
6853 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6854if test "${enable_maintainer_mode+set}" = set; then
6855 enableval="$enable_maintainer_mode"
6856 maintainer_mode=$enableval
6857else
6858 maintainer_mode=no
6859fi
6860
6861
6862echo "$ac_t""$maintainer_mode" 1>&6
6863
6864if test "$maintainer_mode" = "yes"; then
6865 MAINT=''
6866else
6867 MAINT='#'
6868fi
6869
861bb6c1
JL
6870# Make empty files to contain the specs and options for each language.
6871# Then add #include lines to for a compiler that has specs and/or options.
6872
6873lang_specs_files=
6874lang_options_files=
3103b7db
ML
6875lang_tree_files=
6876rm -f specs.h options.h gencheck.h
6877touch specs.h options.h gencheck.h
861bb6c1
JL
6878for subdir in . $subdirs
6879do
75bffa71 6880 if test -f $srcdir/$subdir/lang-specs.h; then
861bb6c1
JL
6881 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6882 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6883 fi
75bffa71 6884 if test -f $srcdir/$subdir/lang-options.h; then
861bb6c1
JL
6885 echo "#include \"$subdir/lang-options.h\"" >>options.h
6886 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6887 fi
3103b7db
ML
6888 if test -f $srcdir/$subdir/$subdir-tree.def; then
6889 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6890 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6891 fi
861bb6c1
JL
6892done
6893
6894# These (without "all_") are set in each config-lang.in.
6895# `language' must be a single word so is spelled singularly.
6896all_languages=
6897all_boot_languages=
6898all_compilers=
6899all_stagestuff=
6900all_diff_excludes=
3ec83fc2 6901all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
861bb6c1
JL
6902# List of language makefile fragments.
6903all_lang_makefiles=
6904all_headers=
6905all_lib2funcs=
6906
6907# Add the language fragments.
6908# Languages are added via two mechanisms. Some information must be
6909# recorded in makefile variables, these are defined in config-lang.in.
6910# We accumulate them and plug them into the main Makefile.
6911# The other mechanism is a set of hooks for each of the main targets
6912# like `clean', `install', etc.
6913
6914language_fragments="Make-lang"
6915language_hooks="Make-hooks"
861bb6c1
JL
6916
6917for s in .. $subdirs
6918do
75bffa71 6919 if test $s != ".."
861bb6c1
JL
6920 then
6921 language=
6922 boot_language=
6923 compilers=
6924 stagestuff=
6925 diff_excludes=
6926 headers=
6927 outputs=
6928 lib2funcs=
6929 . ${srcdir}/$s/config-lang.in
75bffa71 6930 if test "x$language" = x
861bb6c1
JL
6931 then
6932 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6933 exit 1
6934 fi
72aaffbd
ZW
6935 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
6936 if test -f ${srcdir}/$s/Makefile.in
6937 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
6938 fi
861bb6c1 6939 all_languages="$all_languages $language"
75bffa71 6940 if test "x$boot_language" = xyes
861bb6c1
JL
6941 then
6942 all_boot_languages="$all_boot_languages $language"
6943 fi
6944 all_compilers="$all_compilers $compilers"
6945 all_stagestuff="$all_stagestuff $stagestuff"
6946 all_diff_excludes="$all_diff_excludes $diff_excludes"
6947 all_headers="$all_headers $headers"
6948 all_outputs="$all_outputs $outputs"
861bb6c1
JL
6949 all_lib2funcs="$all_lib2funcs $lib2funcs"
6950 fi
6951done
6952
cbc59f01
DD
6953check_languages=
6954for language in .. $all_languages
6955do
6956 if test $language != ".."
6957 then
6958 check_languages="$check_languages check-$language"
6959 fi
6960done
6961
861bb6c1
JL
6962# Since we can't use `::' targets, we link each language in
6963# with a set of hooks, reached indirectly via lang.${target}.
6964
6965rm -f Make-hooks
6966touch Make-hooks
6967target_list="all.build all.cross start.encap rest.encap \
6968 info dvi \
6969 install-normal install-common install-info install-man \
436a88a6 6970 uninstall \
861bb6c1
JL
6971 mostlyclean clean distclean extraclean maintainer-clean \
6972 stage1 stage2 stage3 stage4"
6973for t in $target_list
6974do
6975 x=
ab87f8c8 6976 for lang in .. $all_languages
861bb6c1 6977 do
ab87f8c8
JL
6978 if test $lang != ".."; then
6979 x="$x $lang.$t"
861bb6c1
JL
6980 fi
6981 done
6982 echo "lang.$t: $x" >> Make-hooks
6983done
6984
cc06d68c 6985# Create .gdbinit.
861bb6c1 6986
cc06d68c
GP
6987echo "dir ." > .gdbinit
6988echo "dir ${srcdir}" >> .gdbinit
6989if test x$gdb_needs_out_file_path = xyes
6990then
6991 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6992fi
6993if test "x$subdirs" != x; then
6994 for s in $subdirs
6995 do
6996 echo "dir ${srcdir}/$s" >> .gdbinit
6997 done
861bb6c1 6998fi
cc06d68c 6999echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 7000
88111b26
JL
7001# Define variables host_canonical and build_canonical
7002# because some Cygnus local changes in the Makefile depend on them.
7003build_canonical=${build}
7004host_canonical=${host}
7005target_subdir=
75bffa71 7006if test "${host}" != "${target}" ; then
88111b26
JL
7007 target_subdir=${target}/
7008fi
7009
7010
7011
7012
8f8d3278
NC
7013# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7014# absolute path for gcc_tooldir based on inserting the number of up-directory
7015# movements required to get from $(exec_prefix) to $(prefix) into the basic
7016# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
7017# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7018# make and thus we'd get different behavior depending on where we built the
7019# sources.
5949a9fc 7020if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d062c304
JL
7021 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7022else
8f8d3278
NC
7023# An explanation of the sed strings:
7024# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
7025# -e 's|/$||' match a trailing forward slash and eliminates it
7026# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
7027# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
7028#
7029# (*) Note this pattern overwrites the first character of the string
7030# with a forward slash if one is not already present. This is not a
7031# problem because the exact names of the sub-directories concerned is
7032# unimportant, just the number of them matters.
7033#
7034# The practical upshot of these patterns is like this:
7035#
7036# prefix exec_prefix result
7037# ------ ----------- ------
7038# /foo /foo/bar ../
7039# /foo/ /foo/bar ../
7040# /foo /foo/bar/ ../
7041# /foo/ /foo/bar/ ../
7042# /foo /foo/bar/ugg ../../
7043#
4c112cda
NC
7044 dollar='$$'
7045 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
d062c304
JL
7046fi
7047
7048
2ce3c6c6 7049
2bbea3a6
RH
7050# Find a directory in which to install a shared libgcc.
7051
7052# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7053if test "${enable_version_specific_runtime_libs+set}" = set; then
7054 enableval="$enable_version_specific_runtime_libs"
7055 :
7056fi
7057
7058
5b15f277
RH
7059# Check whether --with-slibdir or --without-slibdir was given.
7060if test "${with_slibdir+set}" = set; then
7061 withval="$with_slibdir"
7062 slibdir="$with_slibdir"
7063else
7064 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 7065 slibdir='$(libsubdir)'
5b15f277 7066elif test "$host" != "$target"; then
2bbea3a6
RH
7067 slibdir='$(build_tooldir)/lib'
7068else
5b15f277 7069 slibdir='$(libdir)'
2bbea3a6 7070fi
5b15f277
RH
7071fi
7072
2bbea3a6
RH
7073
7074
7e717196
JL
7075# Nothing to do for FLOAT_H, float_format already handled.
7076objdir=`pwd`
7077
7078
861bb6c1
JL
7079# Process the language and host/target makefile fragments.
7080${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7081
7082# Substitute configuration variables
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
9b16d2c4 7129
e9a25f70 7130
6e26218f 7131
c8724862 7132
e061d1ce 7133
d8bb17c8 7134
11642c3a
ZW
7135
7136
7137
7138
7139
7140
7141
7142
9fc9b82a 7143
8763704d 7144
aac69a49
NC
7145
7146
cc1e60ea 7147
e2187d3b 7148
cbc59f01 7149
3d9d2476 7150
861bb6c1
JL
7151
7152
7153# Echo that links are built
75bffa71 7154if test x$host = x$target
861bb6c1
JL
7155then
7156 str1="native "
7157else
7158 str1="cross-"
7159 str2=" from $host"
7160fi
7161
75bffa71 7162if test x$host != x$build
861bb6c1
JL
7163then
7164 str3=" on a $build system"
7165fi
7166
75bffa71 7167if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
7168then
7169 str4=
7170fi
7171
7172echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7173
75bffa71 7174if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
7175then
7176 echo " ${str2}${str3}." 1>&2
7177fi
7178
f6cb0e63 7179# Truncate the target if necessary
75bffa71 7180if test x$host_truncate_target != x; then
f6cb0e63
JL
7181 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7182fi
7183
861bb6c1
JL
7184# Configure the subdirectories
7185# AC_CONFIG_SUBDIRS($subdirs)
7186
7187# Create the Makefile
7188# and configure language subdirectories
7189trap '' 1 2 15
7190cat > confcache <<\EOF
7191# This file is a shell script that caches the results of configure
7192# tests run on this system so they can be shared between configure
7193# scripts and configure runs. It is not useful on other systems.
7194# If it contains results you don't want to keep, you may remove or edit it.
7195#
7196# By default, configure uses ./config.cache as the cache file,
7197# creating it if it does not exist already. You can give configure
7198# the --cache-file=FILE option to use a different cache file; that is
7199# what configure does when it calls configure scripts in
7200# subdirectories, so they share the cache.
7201# Giving --cache-file=/dev/null disables caching, for debugging configure.
7202# config.status only pays attention to the cache file if you give it the
7203# --recheck option to rerun configure.
7204#
7205EOF
7206# The following way of writing the cache mishandles newlines in values,
7207# but we know of no workaround that is simple, portable, and efficient.
7208# So, don't put newlines in cache variables' values.
7209# Ultrix sh set writes to stderr and can't be redirected directly,
7210# and sets the high bit in the cache file unless we assign to the vars.
7211(set) 2>&1 |
b27d2bd5 7212 case `(ac_space=' '; set | grep ac_space) 2>&1` in
861bb6c1
JL
7213 *ac_space=\ *)
7214 # `set' does not quote correctly, so add quotes (double-quote substitution
7215 # turns \\\\ into \\, and sed turns \\ into \).
7216 sed -n \
7217 -e "s/'/'\\\\''/g" \
7218 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7219 ;;
7220 *)
7221 # `set' quotes correctly as required by POSIX, so do not add quotes.
7222 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7223 ;;
7224 esac >> confcache
7225if cmp -s $cache_file confcache; then
7226 :
7227else
7228 if test -w $cache_file; then
7229 echo "updating cache $cache_file"
7230 cat confcache > $cache_file
7231 else
7232 echo "not updating unwritable cache $cache_file"
7233 fi
7234fi
7235rm -f confcache
7236
7237trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7238
7239test "x$prefix" = xNONE && prefix=$ac_default_prefix
7240# Let make expand exec_prefix.
7241test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7242
7243# Any assignment to VPATH causes Sun make to only execute
7244# the first set of double-colon rules, so remove it if not needed.
7245# If there is a colon in the path, we need to keep it.
7246if test "x$srcdir" = x.; then
7247 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7248fi
7249
7250trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7251
7252DEFS=-DHAVE_CONFIG_H
7253
7254# Without the "./", some shells look in PATH for config.status.
7255: ${CONFIG_STATUS=./config.status}
7256
7257echo creating $CONFIG_STATUS
7258rm -f $CONFIG_STATUS
7259cat > $CONFIG_STATUS <<EOF
7260#! /bin/sh
7261# Generated automatically by configure.
7262# Run this file to recreate the current configuration.
7263# This directory was configured as follows,
7264# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7265#
7266# $0 $ac_configure_args
7267#
7268# Compiler output produced by configure, useful for debugging
7269# configure, is in ./config.log if it exists.
7270
7271ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7272for ac_option
7273do
7274 case "\$ac_option" in
7275 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7276 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7277 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7278 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b27d2bd5 7279 echo "$CONFIG_STATUS generated by autoconf version 2.13"
861bb6c1
JL
7280 exit 0 ;;
7281 -help | --help | --hel | --he | --h)
7282 echo "\$ac_cs_usage"; exit 0 ;;
7283 *) echo "\$ac_cs_usage"; exit 1 ;;
7284 esac
7285done
7286
7287ac_given_srcdir=$srcdir
861bb6c1 7288
b7cb92ad 7289trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
861bb6c1
JL
7290EOF
7291cat >> $CONFIG_STATUS <<EOF
7292
7293# Protect against being on the right side of a sed subst in config.status.
7294sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7295 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7296$ac_vpsub
7297$extrasub
6f144c9c 7298s%@SHELL@%$SHELL%g
861bb6c1
JL
7299s%@CFLAGS@%$CFLAGS%g
7300s%@CPPFLAGS@%$CPPFLAGS%g
7301s%@CXXFLAGS@%$CXXFLAGS%g
b27d2bd5 7302s%@FFLAGS@%$FFLAGS%g
861bb6c1
JL
7303s%@DEFS@%$DEFS%g
7304s%@LDFLAGS@%$LDFLAGS%g
7305s%@LIBS@%$LIBS%g
7306s%@exec_prefix@%$exec_prefix%g
7307s%@prefix@%$prefix%g
7308s%@program_transform_name@%$program_transform_name%g
7309s%@bindir@%$bindir%g
7310s%@sbindir@%$sbindir%g
7311s%@libexecdir@%$libexecdir%g
7312s%@datadir@%$datadir%g
7313s%@sysconfdir@%$sysconfdir%g
7314s%@sharedstatedir@%$sharedstatedir%g
7315s%@localstatedir@%$localstatedir%g
7316s%@libdir@%$libdir%g
7317s%@includedir@%$includedir%g
7318s%@oldincludedir@%$oldincludedir%g
7319s%@infodir@%$infodir%g
7320s%@mandir@%$mandir%g
39d6f2e8 7321s%@enable_multilib@%$enable_multilib%g
50503ac8 7322s%@enable_shared@%$enable_shared%g
861bb6c1
JL
7323s%@host@%$host%g
7324s%@host_alias@%$host_alias%g
7325s%@host_cpu@%$host_cpu%g
7326s%@host_vendor@%$host_vendor%g
7327s%@host_os@%$host_os%g
7328s%@target@%$target%g
7329s%@target_alias@%$target_alias%g
7330s%@target_cpu@%$target_cpu%g
7331s%@target_vendor@%$target_vendor%g
7332s%@target_os@%$target_os%g
7333s%@build@%$build%g
7334s%@build_alias@%$build_alias%g
7335s%@build_cpu@%$build_cpu%g
7336s%@build_vendor@%$build_vendor%g
7337s%@build_os@%$build_os%g
e9a25f70 7338s%@CC@%$CC%g
3ec83fc2 7339s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
b8dad04b
ZW
7340s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7341s%@strict1_warn@%$strict1_warn%g
84c041a1 7342s%@CPP@%$CPP%g
b8dad04b
ZW
7343s%@warn_cflags@%$warn_cflags%g
7344s%@stage1_cflags@%$stage1_cflags%g
e9a25f70 7345s%@SET_MAKE@%$SET_MAKE%g
861bb6c1 7346s%@AWK@%$AWK%g
0a4b6309
RL
7347s%@LN@%$LN%g
7348s%@LN_S@%$LN_S%g
861bb6c1 7349s%@RANLIB@%$RANLIB%g
0a4b6309
RL
7350s%@INSTALL@%$INSTALL%g
7351s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7352s%@INSTALL_DATA@%$INSTALL_DATA%g
1ffc5c6e 7353s%@have_gnat@%$have_gnat%g
955be633 7354s%@have_mktemp_command@%$have_mktemp_command%g
09fa0705
ZW
7355s%@MAKEINFO@%$MAKEINFO%g
7356s%@BUILD_INFO@%$BUILD_INFO%g
fd939e46 7357s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
1e608388
ZW
7358s%@FLEX@%$FLEX%g
7359s%@BISON@%$BISON%g
e256b8b6 7360s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
0a4b6309
RL
7361s%@vfprintf@%$vfprintf%g
7362s%@doprint@%$doprint%g
b3e1e64f 7363s%@strstr@%$strstr%g
861bb6c1 7364s%@manext@%$manext%g
992d1248 7365s%@objext@%$objext%g
ab87f8c8
JL
7366s%@PACKAGE@%$PACKAGE%g
7367s%@VERSION@%$VERSION%g
4adee315 7368s%@CHECK_PO@%$CHECK_PO%g
ab87f8c8
JL
7369s%@USE_NLS@%$USE_NLS%g
7370s%@MSGFMT@%$MSGFMT%g
7371s%@GMSGFMT@%$GMSGFMT%g
7372s%@XGETTEXT@%$XGETTEXT%g
7373s%@GENCAT@%$GENCAT%g
7374s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7375s%@CATALOGS@%$CATALOGS%g
7376s%@CATOBJEXT@%$CATOBJEXT%g
7377s%@DATADIRNAME@%$DATADIRNAME%g
7378s%@GMOFILES@%$GMOFILES%g
7379s%@INSTOBJEXT@%$INSTOBJEXT%g
7380s%@INTLDEPS@%$INTLDEPS%g
7381s%@INTLLIBS@%$INTLLIBS%g
7382s%@INTLOBJS@%$INTLOBJS%g
7383s%@POFILES@%$POFILES%g
7384s%@POSUB@%$POSUB%g
7385s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7386s%@GT_NO@%$GT_NO%g
7387s%@GT_YES@%$GT_YES%g
7388s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7389s%@l@%$l%g
b39d221a 7390s%@inhibit_libc@%$inhibit_libc%g
f24af81b 7391s%@gthread_flags@%$gthread_flags%g
81bf3d9e 7392s%@GGC@%$GGC%g
3c809ba4
AG
7393s%@zlibdir@%$zlibdir%g
7394s%@zlibinc@%$zlibinc%g
dc6746e7 7395s%@MAINT@%$MAINT%g
88111b26
JL
7396s%@build_canonical@%$build_canonical%g
7397s%@host_canonical@%$host_canonical%g
7398s%@target_subdir@%$target_subdir%g
d062c304 7399s%@gcc_tooldir@%$gcc_tooldir%g
4c112cda 7400s%@dollar@%$dollar%g
2bbea3a6 7401s%@slibdir@%$slibdir%g
7e717196 7402s%@objdir@%$objdir%g
861bb6c1 7403s%@subdirs@%$subdirs%g
861bb6c1
JL
7404s%@all_boot_languages@%$all_boot_languages%g
7405s%@all_compilers@%$all_compilers%g
861bb6c1 7406s%@all_diff_excludes@%$all_diff_excludes%g
861bb6c1 7407s%@all_headers@%$all_headers%g
4f3ae93c
BK
7408s%@all_lang_makefiles@%$all_lang_makefiles%g
7409s%@all_languages@%$all_languages%g
7410s%@all_lib2funcs@%$all_lib2funcs%g
7411s%@all_stagestuff@%$all_stagestuff%g
7412s%@build_exeext@%$build_exeext%g
7413s%@build_install_headers_dir@%$build_install_headers_dir%g
7414s%@build_xm_file_list@%$build_xm_file_list%g
11642c3a
ZW
7415s%@build_xm_file@%$build_xm_file%g
7416s%@build_xm_defines@%$build_xm_defines%g
cbc59f01 7417s%@check_languages@%$check_languages%g
4f3ae93c 7418s%@cc_set_by_configure@%$cc_set_by_configure%g
5aa82ace 7419s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
4f3ae93c 7420s%@cpp_install_dir@%$cpp_install_dir%g
4f3ae93c
BK
7421s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7422s%@dep_tmake_file@%$dep_tmake_file%g
7423s%@extra_c_flags@%$extra_c_flags%g
4f3ae93c 7424s%@extra_headers_list@%$extra_headers_list%g
861bb6c1 7425s%@extra_objs@%$extra_objs%g
4f3ae93c
BK
7426s%@extra_parts@%$extra_parts%g
7427s%@extra_passes@%$extra_passes%g
7428s%@extra_programs@%$extra_programs%g
4f3ae93c 7429s%@float_h_file@%$float_h_file%g
cc1e60ea 7430s%@gcc_config_arguments@%$gcc_config_arguments%g
4f3ae93c 7431s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
e2187d3b 7432s%@libstdcxx_incdir@%$libstdcxx_incdir%g
4f3ae93c 7433s%@gcc_version@%$gcc_version%g
8763704d 7434s%@gcc_version_full@%$gcc_version_full%g
4f3ae93c
BK
7435s%@gcc_version_trigger@%$gcc_version_trigger%g
7436s%@host_exeext@%$host_exeext%g
861bb6c1 7437s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
861bb6c1 7438s%@host_xm_file_list@%$host_xm_file_list%g
11642c3a
ZW
7439s%@host_xm_file@%$host_xm_file%g
7440s%@host_xm_defines@%$host_xm_defines%g
4f3ae93c 7441s%@install@%$install%g
861bb6c1 7442s%@lang_options_files@%$lang_options_files%g
4f3ae93c 7443s%@lang_specs_files@%$lang_specs_files%g
3103b7db 7444s%@lang_tree_files@%$lang_tree_files%g
861bb6c1 7445s%@local_prefix@%$local_prefix%g
861bb6c1 7446s%@maybe_use_collect2@%$maybe_use_collect2%g
4f3ae93c
BK
7447s%@md_file@%$md_file%g
7448s%@objc_boehm_gc@%$objc_boehm_gc%g
7449s%@out_file@%$out_file%g
7450s%@out_object_file@%$out_object_file%g
861bb6c1 7451s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
e9a25f70 7452s%@symbolic_link@%$symbolic_link%g
4f3ae93c
BK
7453s%@thread_file@%$thread_file%g
7454s%@tm_file_list@%$tm_file_list%g
11642c3a
ZW
7455s%@tm_file@%$tm_file%g
7456s%@tm_p_file_list@%$tm_p_file_list%g
7457s%@tm_p_file@%$tm_p_file%g
7458s%@xm_file@%$xm_file%g
3d9d2476 7459s%@xm_defines@%$xm_defines%g
4f3ae93c 7460s%@will_use_collect2@%$will_use_collect2%g
aac69a49
NC
7461s%@c_target_objs@%$c_target_objs%g
7462s%@cxx_target_objs@%$cxx_target_objs%g
11642c3a 7463s%@target_cpu_default@%$target_cpu_default%g
861bb6c1
JL
7464/@target_overrides@/r $target_overrides
7465s%@target_overrides@%%g
7466/@host_overrides@/r $host_overrides
7467s%@host_overrides@%%g
7468s%@cross_defines@%$cross_defines%g
7469/@cross_overrides@/r $cross_overrides
7470s%@cross_overrides@%%g
7471/@build_overrides@/r $build_overrides
7472s%@build_overrides@%%g
7473/@language_fragments@/r $language_fragments
7474s%@language_fragments@%%g
7475/@language_hooks@/r $language_hooks
7476s%@language_hooks@%%g
7477
7478CEOF
7479EOF
7480
7481cat >> $CONFIG_STATUS <<\EOF
7482
7483# Split the substitutions into bite-sized pieces for seds with
7484# small command number limits, like on Digital OSF/1 and HP-UX.
7485ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7486ac_file=1 # Number of current file.
7487ac_beg=1 # First line for current file.
7488ac_end=$ac_max_sed_cmds # Line after last line for current file.
7489ac_more_lines=:
7490ac_sed_cmds=""
7491while $ac_more_lines; do
7492 if test $ac_beg -gt 1; then
7493 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7494 else
7495 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7496 fi
7497 if test ! -s conftest.s$ac_file; then
7498 ac_more_lines=false
7499 rm -f conftest.s$ac_file
7500 else
7501 if test -z "$ac_sed_cmds"; then
7502 ac_sed_cmds="sed -f conftest.s$ac_file"
7503 else
7504 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7505 fi
7506 ac_file=`expr $ac_file + 1`
7507 ac_beg=$ac_end
7508 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7509 fi
7510done
7511if test -z "$ac_sed_cmds"; then
7512 ac_sed_cmds=cat
7513fi
7514EOF
7515
7516cat >> $CONFIG_STATUS <<EOF
7517
7518CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7519EOF
7520cat >> $CONFIG_STATUS <<\EOF
7521for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7522 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7523 case "$ac_file" in
7524 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7525 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7526 *) ac_file_in="${ac_file}.in" ;;
7527 esac
7528
7529 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7530
7531 # Remove last slash and all that follows it. Not all systems have dirname.
7532 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7533 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7534 # The file is in a subdirectory.
7535 test ! -d "$ac_dir" && mkdir "$ac_dir"
7536 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7537 # A "../" for each directory in $ac_dir_suffix.
7538 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7539 else
7540 ac_dir_suffix= ac_dots=
7541 fi
7542
7543 case "$ac_given_srcdir" in
7544 .) srcdir=.
7545 if test -z "$ac_dots"; then top_srcdir=.
7546 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7547 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7548 *) # Relative path.
7549 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7550 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7551 esac
7552
861bb6c1
JL
7553
7554 echo creating "$ac_file"
7555 rm -f "$ac_file"
7556 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7557 case "$ac_file" in
7558 *Makefile*) ac_comsub="1i\\
7559# $configure_input" ;;
7560 *) ac_comsub= ;;
7561 esac
7562
7563 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7564 sed -e "$ac_comsub
7565s%@configure_input@%$configure_input%g
7566s%@srcdir@%$srcdir%g
7567s%@top_srcdir@%$top_srcdir%g
861bb6c1
JL
7568" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7569fi; done
7570rm -f conftest.s*
7571
7572# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7573# NAME is the cpp macro being defined and VALUE is the value it is being given.
7574#
7575# ac_d sets the value in "#define NAME VALUE" lines.
7576ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7577ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7578ac_dC='\3'
7579ac_dD='%g'
7580# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7581ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7582ac_uB='\([ ]\)%\1#\2define\3'
7583ac_uC=' '
7584ac_uD='\4%g'
7585# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7586ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7587ac_eB='$%\1#\2define\3'
7588ac_eC=' '
7589ac_eD='%g'
7590
7591if test "${CONFIG_HEADERS+set}" != set; then
7592EOF
7593cat >> $CONFIG_STATUS <<EOF
b7cb92ad 7594 CONFIG_HEADERS="auto-host.h:config.in"
861bb6c1
JL
7595EOF
7596cat >> $CONFIG_STATUS <<\EOF
7597fi
7598for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7599 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7600 case "$ac_file" in
7601 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7602 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7603 *) ac_file_in="${ac_file}.in" ;;
7604 esac
7605
7606 echo creating $ac_file
7607
7608 rm -f conftest.frag conftest.in conftest.out
7609 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7610 cat $ac_file_inputs > conftest.in
7611
7612EOF
7613
7614# Transform confdefs.h into a sed script conftest.vals that substitutes
7615# the proper values into config.h.in to produce config.h. And first:
7616# Protect against being on the right side of a sed subst in config.status.
7617# Protect against being in an unquoted here document in config.status.
7618rm -f conftest.vals
7619cat > conftest.hdr <<\EOF
7620s/[\\&%]/\\&/g
7621s%[\\$`]%\\&%g
7622s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7623s%ac_d%ac_u%gp
7624s%ac_u%ac_e%gp
7625EOF
7626sed -n -f conftest.hdr confdefs.h > conftest.vals
7627rm -f conftest.hdr
7628
7629# This sed command replaces #undef with comments. This is necessary, for
7630# example, in the case of _POSIX_SOURCE, which is predefined and required
7631# on some systems where configure will not decide to define it.
7632cat >> conftest.vals <<\EOF
7633s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7634EOF
7635
7636# Break up conftest.vals because some shells have a limit on
7637# the size of here documents, and old seds have small limits too.
7638
7639rm -f conftest.tail
7640while :
7641do
7642 ac_lines=`grep -c . conftest.vals`
7643 # grep -c gives empty output for an empty file on some AIX systems.
7644 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7645 # Write a limited-size here document to conftest.frag.
7646 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7647 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7648 echo 'CEOF
7649 sed -f conftest.frag conftest.in > conftest.out
7650 rm -f conftest.in
7651 mv conftest.out conftest.in
7652' >> $CONFIG_STATUS
7653 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7654 rm -f conftest.vals
7655 mv conftest.tail conftest.vals
7656done
7657rm -f conftest.vals
7658
7659cat >> $CONFIG_STATUS <<\EOF
7660 rm -f conftest.frag conftest.h
7661 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7662 cat conftest.in >> conftest.h
7663 rm -f conftest.in
7664 if cmp -s $ac_file conftest.h 2>/dev/null; then
7665 echo "$ac_file is unchanged"
7666 rm -f conftest.h
7667 else
7668 # Remove last slash and all that follows it. Not all systems have dirname.
7669 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7670 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7671 # The file is in a subdirectory.
7672 test ! -d "$ac_dir" && mkdir "$ac_dir"
7673 fi
7674 rm -f $ac_file
7675 mv conftest.h $ac_file
7676 fi
7677fi; done
7678
ab87f8c8
JL
7679EOF
7680
7681cat >> $CONFIG_STATUS <<EOF
7682ac_sources="$nls_cv_header_libgt"
7683ac_dests="$nls_cv_header_intl"
7684EOF
7685
7686cat >> $CONFIG_STATUS <<\EOF
7687srcdir=$ac_given_srcdir
7688while test -n "$ac_sources"; do
7689 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7690 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7691
7692 echo "linking $srcdir/$ac_source to $ac_dest"
7693
7694 if test ! -r $srcdir/$ac_source; then
7695 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7696 fi
7697 rm -f $ac_dest
7698
7699 # Make relative symlinks.
7700 # Remove last slash and all that follows it. Not all systems have dirname.
7701 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7702 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7703 # The dest file is in a subdirectory.
7704 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7705 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7706 # A "../" for each directory in $ac_dest_dir_suffix.
7707 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7708 else
7709 ac_dest_dir_suffix= ac_dots=
7710 fi
7711
7712 case "$srcdir" in
7713 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7714 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7715 esac
7716
7717 # Make a symlink if possible; otherwise try a hard link.
7718 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7719 ln $srcdir/$ac_source $ac_dest; then :
7720 else
7721 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7722 fi
7723done
861bb6c1
JL
7724EOF
7725cat >> $CONFIG_STATUS <<EOF
7726
ab87f8c8 7727
861bb6c1
JL
7728host='${host}'
7729build='${build}'
7730target='${target}'
7731target_alias='${target_alias}'
7732srcdir='${srcdir}'
7733subdirs='${subdirs}'
861bb6c1
JL
7734symbolic_link='${symbolic_link}'
7735program_transform_set='${program_transform_set}'
7736program_transform_name='${program_transform_name}'
7737dep_host_xmake_file='${dep_host_xmake_file}'
7738host_xmake_file='${host_xmake_file}'
7739dep_tmake_file='${dep_tmake_file}'
7740tmake_file='${tmake_file}'
7741thread_file='${thread_file}'
cc1e60ea 7742gcc_config_arguments='${gcc_config_arguments}'
f1943b77 7743gcc_version='${gcc_version}'
8763704d 7744gcc_version_full='${gcc_version_full}'
f1943b77 7745gcc_version_trigger='${gcc_version_trigger}'
861bb6c1
JL
7746local_prefix='${local_prefix}'
7747build_install_headers_dir='${build_install_headers_dir}'
7748build_exeext='${build_exeext}'
6e26218f 7749host_exeext='${host_exeext}'
7ed46111 7750out_file='${out_file}'
861bb6c1
JL
7751gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7752SET_MAKE='${SET_MAKE}'
861bb6c1
JL
7753target_list='${target_list}'
7754target_overrides='${target_overrides}'
7755host_overrides='${host_overrides}'
7756cross_defines='${cross_defines}'
7757cross_overrides='${cross_overrides}'
7758build_overrides='${build_overrides}'
9fc9b82a 7759cpp_install_dir='${cpp_install_dir}'
861bb6c1
JL
7760
7761EOF
7762cat >> $CONFIG_STATUS <<\EOF
ab87f8c8
JL
7763case "$CONFIG_FILES" in *po/Makefile.in*)
7764 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7765 esac
861bb6c1 7766
861bb6c1 7767case x$CONFIG_HEADERS in
b7cb92ad 7768xauto-host.h:config.in)
861bb6c1
JL
7769echo > cstamp-h ;;
7770esac
93cf819d
BK
7771# If the host supports symlinks, point stage[1234] at ../stage[1234] so
7772# bootstrapping and the installation procedure can still use
7773# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
7774# FLAGS_TO_PASS has been modified to solve the problem there.
7775# This is virtually a duplicate of what happens in configure.lang; we do
7776# an extra check to make sure this only happens if ln -s can be used.
75bffa71 7777if test "$symbolic_link" = "ln -s"; then
93cf819d 7778 for d in .. ${subdirs} ; do
75bffa71 7779 if test $d != ..; then
4e8a434e
BK
7780 STARTDIR=`pwd`
7781 cd $d
7782 for t in stage1 stage2 stage3 stage4 include
7783 do
7784 rm -f $t
7785 $symbolic_link ../$t $t 2>/dev/null
7786 done
7787 cd $STARTDIR
93cf819d
BK
7788 fi
7789 done
7790else true ; fi
ab87f8c8
JL
7791# Avoid having to add intl to our include paths.
7792if test -f intl/libintl.h; then
7793 echo creating libintl.h
7794 echo '#include "intl/libintl.h"' >libintl.h
7795fi
861bb6c1
JL
7796
7797exit 0
7798EOF
7799chmod +x $CONFIG_STATUS
7800rm -fr confdefs* $ac_clean_files
7801test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7802