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