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