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