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