]> git.ipfire.org Git - thirdparty/glibc.git/blame - configure
2002-08-13 Jakub Jelinek <jakub@redhat.com>
[thirdparty/glibc.git] / configure
CommitLineData
cd6ede75
UD
1#! /bin/sh
2
3# From configure.in CVSid
4
5
6
7
650425ce
UD
8
9
10
11
63bda0c1
UD
12
13
cd6ede75 14# Guess values for system-dependent variables and create Makefiles.
a808d541 15# Generated automatically using autoconf version 2.13
cd6ede75
UD
16# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
17#
18# This configure script is free software; the Free Software Foundation
19# gives unlimited permission to copy, distribute and modify it.
20
21# Defaults:
22ac_help=
23ac_default_prefix=/usr/local
24# Any additions from configure.in:
25ac_help="$ac_help
26 --with-gmp=DIRECTORY find GMP source code in DIRECTORY (not needed)"
c8f3e6db
UD
27ac_help="$ac_help
28 --with-gd=DIR find libgd include dir and library with prefix DIR"
e41db95b
UD
29ac_help="$ac_help
30 --with-gd-include=DIR find libgd include files in DIR"
31ac_help="$ac_help
32 --with-gd-lib=DIR find libgd library files in DIR"
cd6ede75
UD
33ac_help="$ac_help
34 --with-fp if using floating-point hardware [default=yes]"
35ac_help="$ac_help
a5a0310d 36 --with-binutils=PATH specify location of binutils (as and ld)"
cd6ede75
UD
37ac_help="$ac_help
38 --with-elf if using the ELF object format"
5af3245a
UD
39ac_help="$ac_help
40 --with-xcoff if using the XCOFF object format"
d67281a7 41ac_help="$ac_help
4442d7e8 42 --without-cvs if CVS should not be used"
3c720987
UD
43ac_help="$ac_help
44 --with-headers=PATH location of system headers to use
45 [e.g. /usr/src/linux/include]
46 [default=compiler default]"
cd6ede75
UD
47ac_help="$ac_help
48 --disable-sanity-checks really do not use threads (should not be used
49 except in special situations) [default=yes]"
50ac_help="$ac_help
51 --enable-shared build shared library [default=yes if GNU ld & ELF]"
52ac_help="$ac_help
53 --enable-profile build profiled library [default=yes]"
54ac_help="$ac_help
55 --enable-omitfp build undebuggable optimized library [default=no]"
56ac_help="$ac_help
57 --enable-bounded build with runtime bounds checking [default=no]"
650425ce
UD
58ac_help="$ac_help
59 --disable-versioning do not include versioning information in the
60 library objects [default=yes if supported]"
62ab42d6
UD
61ac_help="$ac_help
62 --enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
63 [default=glibc default]"
cd6ede75 64ac_help="$ac_help
73237de3
UD
65 --enable-add-ons[=DIR1,DIR2]...
66 configure and build add-ons in DIR1,DIR2,...
67 search for add-ons if no parameter given"
8d4b5a8a
UD
68ac_help="$ac_help
69 --without-tls prevent support for TLS"
cd6ede75
UD
70ac_help="$ac_help
71 --enable-static-nss build static NSS modules [default=no]"
73237de3 72ac_help="$ac_help
310b3460 73 --disable-force-install don't force installation of files from this package,
73237de3 74 even if they are older than the installed files"
958f238f 75ac_help="$ac_help
4a307a98 76 --enable-kernel=VERSION compile for compatibility with kernel not older
958f238f 77 than VERSION"
6cc7d725
UD
78ac_help="$ac_help
79 --enable-all-warnings enable all useful warnings gcc can issue"
cd6ede75
UD
80
81# Initialize some variables set by options.
82# The variables have the same names as the options, with
83# dashes changed to underlines.
84build=NONE
85cache_file=./config.cache
86exec_prefix=NONE
87host=NONE
88no_create=
89nonopt=NONE
90no_recursion=
91prefix=NONE
92program_prefix=NONE
93program_suffix=NONE
94program_transform_name=s,x,x,
95silent=
96site=
97srcdir=
98target=NONE
99verbose=
100x_includes=NONE
101x_libraries=NONE
102bindir='${exec_prefix}/bin'
103sbindir='${exec_prefix}/sbin'
104libexecdir='${exec_prefix}/libexec'
105datadir='${prefix}/share'
106sysconfdir='${prefix}/etc'
107sharedstatedir='${prefix}/com'
108localstatedir='${prefix}/var'
109libdir='${exec_prefix}/lib'
110includedir='${prefix}/include'
111oldincludedir='/usr/include'
112infodir='${prefix}/info'
113mandir='${prefix}/man'
114
115# Initialize some other variables.
116subdirs=
117MFLAGS= MAKEFLAGS=
5c2a0669 118SHELL=${CONFIG_SHELL-/bin/sh}
cd6ede75
UD
119# Maximum number of lines to put in a shell here document.
120ac_max_here_lines=12
121
122ac_prev=
123for ac_option
124do
125
126 # If the previous option needs an argument, assign it.
127 if test -n "$ac_prev"; then
128 eval "$ac_prev=\$ac_option"
129 ac_prev=
130 continue
131 fi
132
133 case "$ac_option" in
134 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
135 *) ac_optarg= ;;
136 esac
137
138 # Accept the important Cygnus configure options, so we can diagnose typos.
139
140 case "$ac_option" in
141
142 -bindir | --bindir | --bindi | --bind | --bin | --bi)
143 ac_prev=bindir ;;
144 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
145 bindir="$ac_optarg" ;;
146
147 -build | --build | --buil | --bui | --bu)
148 ac_prev=build ;;
149 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
150 build="$ac_optarg" ;;
151
152 -cache-file | --cache-file | --cache-fil | --cache-fi \
153 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
154 ac_prev=cache_file ;;
155 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
156 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
157 cache_file="$ac_optarg" ;;
158
159 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
160 ac_prev=datadir ;;
161 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
162 | --da=*)
163 datadir="$ac_optarg" ;;
164
165 -disable-* | --disable-*)
166 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
167 # Reject names that are not valid shell variable names.
168 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
169 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
170 fi
171 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
172 eval "enable_${ac_feature}=no" ;;
173
174 -enable-* | --enable-*)
175 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
176 # Reject names that are not valid shell variable names.
177 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
178 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179 fi
180 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181 case "$ac_option" in
182 *=*) ;;
183 *) ac_optarg=yes ;;
184 esac
185 eval "enable_${ac_feature}='$ac_optarg'" ;;
186
187 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
188 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
189 | --exec | --exe | --ex)
190 ac_prev=exec_prefix ;;
191 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
192 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
193 | --exec=* | --exe=* | --ex=*)
194 exec_prefix="$ac_optarg" ;;
195
196 -gas | --gas | --ga | --g)
197 # Obsolete; use --with-gas.
198 with_gas=yes ;;
199
200 -help | --help | --hel | --he)
201 # Omit some internal or obsolete options to make the list less imposing.
202 # This message is too long to be a string in the A/UX 3.1 sh.
203 cat << EOF
204Usage: configure [options] [host]
205Options: [defaults in brackets after descriptions]
206Configuration:
207 --cache-file=FILE cache test results in FILE
208 --help print this message
209 --no-create do not create output files
210 --quiet, --silent do not print \`checking...' messages
211 --version print the version of autoconf that created configure
212Directory and file names:
213 --prefix=PREFIX install architecture-independent files in PREFIX
214 [$ac_default_prefix]
215 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
216 [same as prefix]
217 --bindir=DIR user executables in DIR [EPREFIX/bin]
218 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
219 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
220 --datadir=DIR read-only architecture-independent data in DIR
221 [PREFIX/share]
222 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
223 --sharedstatedir=DIR modifiable architecture-independent data in DIR
224 [PREFIX/com]
225 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
226 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
227 --includedir=DIR C header files in DIR [PREFIX/include]
228 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
229 --infodir=DIR info documentation in DIR [PREFIX/info]
230 --mandir=DIR man documentation in DIR [PREFIX/man]
231 --srcdir=DIR find the sources in DIR [configure dir or ..]
232 --program-prefix=PREFIX prepend PREFIX to installed program names
233 --program-suffix=SUFFIX append SUFFIX to installed program names
234 --program-transform-name=PROGRAM
235 run sed PROGRAM on installed program names
236EOF
237 cat << EOF
238Host type:
239 --build=BUILD configure for building on BUILD [BUILD=HOST]
240 --host=HOST configure for HOST [guessed]
241 --target=TARGET configure for TARGET [TARGET=HOST]
242Features and packages:
243 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
244 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
245 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
246 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
247 --x-includes=DIR X include files are in DIR
248 --x-libraries=DIR X library files are in DIR
249EOF
250 if test -n "$ac_help"; then
251 echo "--enable and --with options recognized:$ac_help"
252 fi
253 exit 0 ;;
254
255 -host | --host | --hos | --ho)
256 ac_prev=host ;;
257 -host=* | --host=* | --hos=* | --ho=*)
258 host="$ac_optarg" ;;
259
260 -includedir | --includedir | --includedi | --included | --include \
261 | --includ | --inclu | --incl | --inc)
262 ac_prev=includedir ;;
263 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
264 | --includ=* | --inclu=* | --incl=* | --inc=*)
265 includedir="$ac_optarg" ;;
266
267 -infodir | --infodir | --infodi | --infod | --info | --inf)
268 ac_prev=infodir ;;
269 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
270 infodir="$ac_optarg" ;;
271
272 -libdir | --libdir | --libdi | --libd)
273 ac_prev=libdir ;;
274 -libdir=* | --libdir=* | --libdi=* | --libd=*)
275 libdir="$ac_optarg" ;;
276
277 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
278 | --libexe | --libex | --libe)
279 ac_prev=libexecdir ;;
280 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
281 | --libexe=* | --libex=* | --libe=*)
282 libexecdir="$ac_optarg" ;;
283
284 -localstatedir | --localstatedir | --localstatedi | --localstated \
285 | --localstate | --localstat | --localsta | --localst \
286 | --locals | --local | --loca | --loc | --lo)
287 ac_prev=localstatedir ;;
288 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
289 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
290 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
291 localstatedir="$ac_optarg" ;;
292
293 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
294 ac_prev=mandir ;;
295 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
296 mandir="$ac_optarg" ;;
297
298 -nfp | --nfp | --nf)
299 # Obsolete; use --without-fp.
300 with_fp=no ;;
301
302 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
303 | --no-cr | --no-c)
304 no_create=yes ;;
305
306 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
307 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
308 no_recursion=yes ;;
309
310 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
311 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
312 | --oldin | --oldi | --old | --ol | --o)
313 ac_prev=oldincludedir ;;
314 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
315 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
316 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
317 oldincludedir="$ac_optarg" ;;
318
319 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
320 ac_prev=prefix ;;
321 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
322 prefix="$ac_optarg" ;;
323
324 -program-prefix | --program-prefix | --program-prefi | --program-pref \
325 | --program-pre | --program-pr | --program-p)
326 ac_prev=program_prefix ;;
327 -program-prefix=* | --program-prefix=* | --program-prefi=* \
328 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
329 program_prefix="$ac_optarg" ;;
330
331 -program-suffix | --program-suffix | --program-suffi | --program-suff \
332 | --program-suf | --program-su | --program-s)
333 ac_prev=program_suffix ;;
334 -program-suffix=* | --program-suffix=* | --program-suffi=* \
335 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
336 program_suffix="$ac_optarg" ;;
337
338 -program-transform-name | --program-transform-name \
339 | --program-transform-nam | --program-transform-na \
340 | --program-transform-n | --program-transform- \
341 | --program-transform | --program-transfor \
342 | --program-transfo | --program-transf \
343 | --program-trans | --program-tran \
344 | --progr-tra | --program-tr | --program-t)
345 ac_prev=program_transform_name ;;
346 -program-transform-name=* | --program-transform-name=* \
347 | --program-transform-nam=* | --program-transform-na=* \
348 | --program-transform-n=* | --program-transform-=* \
349 | --program-transform=* | --program-transfor=* \
350 | --program-transfo=* | --program-transf=* \
351 | --program-trans=* | --program-tran=* \
352 | --progr-tra=* | --program-tr=* | --program-t=*)
353 program_transform_name="$ac_optarg" ;;
354
355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
356 | -silent | --silent | --silen | --sile | --sil)
357 silent=yes ;;
358
359 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
360 ac_prev=sbindir ;;
361 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
362 | --sbi=* | --sb=*)
363 sbindir="$ac_optarg" ;;
364
365 -sharedstatedir | --sharedstatedir | --sharedstatedi \
366 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
367 | --sharedst | --shareds | --shared | --share | --shar \
368 | --sha | --sh)
369 ac_prev=sharedstatedir ;;
370 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
371 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
372 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
373 | --sha=* | --sh=*)
374 sharedstatedir="$ac_optarg" ;;
375
376 -site | --site | --sit)
377 ac_prev=site ;;
378 -site=* | --site=* | --sit=*)
379 site="$ac_optarg" ;;
380
381 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
382 ac_prev=srcdir ;;
383 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
384 srcdir="$ac_optarg" ;;
385
386 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
387 | --syscon | --sysco | --sysc | --sys | --sy)
388 ac_prev=sysconfdir ;;
389 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
390 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
391 sysconfdir="$ac_optarg" ;;
392
393 -target | --target | --targe | --targ | --tar | --ta | --t)
394 ac_prev=target ;;
395 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
396 target="$ac_optarg" ;;
397
398 -v | -verbose | --verbose | --verbos | --verbo | --verb)
399 verbose=yes ;;
400
401 -version | --version | --versio | --versi | --vers)
a808d541 402 echo "configure generated by autoconf version 2.13"
cd6ede75
UD
403 exit 0 ;;
404
405 -with-* | --with-*)
406 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
407 # Reject names that are not valid shell variable names.
408 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
409 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
410 fi
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
412 case "$ac_option" in
413 *=*) ;;
414 *) ac_optarg=yes ;;
415 esac
416 eval "with_${ac_package}='$ac_optarg'" ;;
417
418 -without-* | --without-*)
419 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
423 fi
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 eval "with_${ac_package}=no" ;;
426
427 --x)
428 # Obsolete; use --with-x.
429 with_x=yes ;;
430
431 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432 | --x-incl | --x-inc | --x-in | --x-i)
433 ac_prev=x_includes ;;
434 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436 x_includes="$ac_optarg" ;;
437
438 -x-libraries | --x-libraries | --x-librarie | --x-librari \
439 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440 ac_prev=x_libraries ;;
441 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443 x_libraries="$ac_optarg" ;;
444
445 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
446 ;;
447
448 *)
449 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
450 echo "configure: warning: $ac_option: invalid host type" 1>&2
451 fi
452 if test "x$nonopt" != xNONE; then
453 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
454 fi
455 nonopt="$ac_option"
456 ;;
457
458 esac
459done
460
461if test -n "$ac_prev"; then
462 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
463fi
464
465trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
466
467# File descriptor usage:
468# 0 standard input
469# 1 file creation
470# 2 errors and warnings
471# 3 some systems may open it to /dev/tty
472# 4 used on the Kubota Titan
473# 6 checking for... messages and results
474# 5 compiler messages saved in config.log
475if test "$silent" = yes; then
476 exec 6>/dev/null
477else
478 exec 6>&1
479fi
480exec 5>./config.log
481
482echo "\
483This file contains any messages produced by compilers while
484running configure, to aid debugging if configure makes a mistake.
485" 1>&5
486
487# Strip out --no-create and --no-recursion so they do not pile up.
488# Also quote any args containing shell metacharacters.
489ac_configure_args=
490for ac_arg
491do
492 case "$ac_arg" in
493 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
494 | --no-cr | --no-c) ;;
495 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
496 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
497 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
498 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
499 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
500 esac
501done
502
503# NLS nuisances.
504# Only set these to C if already set. These must not be set unconditionally
505# because not all systems understand e.g. LANG=C (notably SCO).
506# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
507# Non-C LC_CTYPE values break the ctype check.
508if test "${LANG+set}" = set; then LANG=C; export LANG; fi
509if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
510if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
511if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
512
513# confdefs.h avoids OS command line length limits that DEFS can exceed.
514rm -rf conftest* confdefs.h
515# AIX cpp loses on an empty file, so make sure it contains at least a newline.
516echo > confdefs.h
517
518# A filename unique to this package, relative to the directory that
519# configure is in, which we can look for to find out if srcdir is correct.
520ac_unique_file=include/features.h
521
522# Find the source files, if location was not specified.
523if test -z "$srcdir"; then
524 ac_srcdir_defaulted=yes
525 # Try the directory containing this script, then its parent.
526 ac_prog=$0
527 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
528 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
529 srcdir=$ac_confdir
530 if test ! -r $srcdir/$ac_unique_file; then
531 srcdir=..
532 fi
533else
534 ac_srcdir_defaulted=no
535fi
536if test ! -r $srcdir/$ac_unique_file; then
537 if test "$ac_srcdir_defaulted" = yes; then
538 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
539 else
540 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
541 fi
542fi
543srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
544
545# Prefer explicitly selected file to automatically selected ones.
546if test -z "$CONFIG_SITE"; then
547 if test "x$prefix" != xNONE; then
548 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
549 else
550 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
551 fi
552fi
553for ac_site_file in $CONFIG_SITE; do
554 if test -r "$ac_site_file"; then
555 echo "loading site script $ac_site_file"
556 . "$ac_site_file"
557 fi
558done
559
560if test -r "$cache_file"; then
561 echo "loading cache $cache_file"
a808d541 562 . $cache_file
cd6ede75
UD
563else
564 echo "creating cache $cache_file"
565 > $cache_file
566fi
567
568ac_ext=c
569# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
570ac_cpp='$CPP $CPPFLAGS'
571ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5c2a0669 572ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cd6ede75
UD
573cross_compiling=$ac_cv_prog_cc_cross
574
5c2a0669
UD
575ac_exeext=
576ac_objext=o
cd6ede75
UD
577if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
578 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
579 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
580 ac_n= ac_c='
581' ac_t=' '
582 else
583 ac_n=-n ac_c= ac_t=
584 fi
585else
586 ac_n= ac_c='\c' ac_t=
587fi
588
63bda0c1
UD
589 if test -r /vmunix; then
590 kernel_id=`strings /vmunix | grep UNIX`
591 elif test -r /dynix; then
592 kernel_id=`strings /dynix | grep DYNIX`
593 else
594 kernel_id=
595 fi
596
cd6ede75
UD
597
598
444518fe
UD
599ac_aux_dir=
600for ac_dir in scripts $srcdir/scripts; do
601 if test -f $ac_dir/install-sh; then
602 ac_aux_dir=$ac_dir
603 ac_install_sh="$ac_aux_dir/install-sh -c"
604 break
605 elif test -f $ac_dir/install.sh; then
606 ac_aux_dir=$ac_dir
607 ac_install_sh="$ac_aux_dir/install.sh -c"
608 break
609 fi
610done
611if test -z "$ac_aux_dir"; then
612 { echo "configure: error: can not find install-sh or install.sh in scripts $srcdir/scripts" 1>&2; exit 1; }
613fi
a808d541
UD
614ac_config_guess=$ac_aux_dir/config.guess
615ac_config_sub=$ac_aux_dir/config.sub
616ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
444518fe 617
cd6ede75
UD
618
619# This will get text that should go into config.make.
620config_vars=
621
622# Check for a --with-gmp argument and set gmp-srcdir in config.make.
623# Check whether --with-gmp or --without-gmp was given.
624if test "${with_gmp+set}" = set; then
625 withval="$with_gmp"
626 case "$with_gmp" in
627yes) { echo "configure: error: --with-gmp requires an argument; use --with-gmp=DIRECTORY" 1>&2; exit 1; } ;;
628''|no) ;;
629*) config_vars="$config_vars
630gmp-srcdir = $withval" ;;
631esac
632
633fi
634
c8f3e6db
UD
635# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
636# Check whether --with-gd or --without-gd was given.
637if test "${with_gd+set}" = set; then
638 withval="$with_gd"
639 case "$with_gd" in
e41db95b
UD
640yes|''|no) ;;
641*) libgd_include="-I$withval/include"
c8f3e6db
UD
642 libgd_ldflags="-L$withval/lib" ;;
643esac
644
645fi
646
e41db95b
UD
647# Check whether --with-gd-include or --without-gd-include was given.
648if test "${with_gd_include+set}" = set; then
649 withval="$with_gd_include"
650 case "$with_gd_include" in
651''|no) ;;
652*) libgd_include="-I$withval" ;;
653esac
654
655fi
656
657# Check whether --with-gd-lib or --without-gd-lib was given.
658if test "${with_gd_lib+set}" = set; then
659 withval="$with_gd_lib"
660 case "$with_gd_lib" in
661''|no) ;;
662*) libgd_ldflags="-L$withval" ;;
663esac
664
665fi
666
667
668if test -n "$libgd_include"; then
669 config_vars="$config_vars
cf90163d 670CFLAGS-memusagestat.c = $libgd_include"
e41db95b
UD
671fi
672if test -n "$libgd_ldflags"; then
673 config_vars="$config_vars
674libgd-LDFLAGS = $libgd_ldflags"
675fi
cd6ede75
UD
676
677# Check whether --with-fp or --without-fp was given.
678if test "${with_fp+set}" = set; then
679 withval="$with_fp"
680 with_fp=$withval
681else
682 with_fp=yes
683fi
684
675322a5 685
650425ce
UD
686# Check whether --with-binutils or --without-binutils was given.
687if test "${with_binutils+set}" = set; then
688 withval="$with_binutils"
a5a0310d
UD
689 path_binutils=$withval
690else
650425ce 691 path_binutils=''
cd6ede75
UD
692fi
693
cd6ede75
UD
694# Check whether --with-elf or --without-elf was given.
695if test "${with_elf+set}" = set; then
696 withval="$with_elf"
697 elf=$withval
698else
699 elf=no
700fi
701
5af3245a
UD
702# Check whether --with-xcoff or --without-xcoff was given.
703if test "${with_xcoff+set}" = set; then
704 withval="$with_xcoff"
705 xcoff=$withval
706else
707 xcoff=no
708fi
709
d67281a7
UD
710# Check whether --with-cvs or --without-cvs was given.
711if test "${with_cvs+set}" = set; then
712 withval="$with_cvs"
713 with_cvs=$withval
714else
715 with_cvs=yes
716fi
717
6b3f2b3d
UD
718if test "$with_cvs" = yes; then
719 if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
720 then
721 with_cvs=no
722 fi
4442d7e8 723fi
d67281a7 724
cd6ede75 725
3c720987
UD
726# Check whether --with-headers or --without-headers was given.
727if test "${with_headers+set}" = set; then
728 withval="$with_headers"
729 sysheaders=$withval
730else
731 sysheaders=''
732fi
733
734
cd6ede75
UD
735# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
736if test "${enable_sanity_checks+set}" = set; then
737 enableval="$enable_sanity_checks"
738 enable_sanity=$enableval
739else
740 enable_sanity=yes
741fi
742
743
5c2a0669 744static=yes
cd6ede75
UD
745# Check whether --enable-shared or --disable-shared was given.
746if test "${enable_shared+set}" = set; then
747 enableval="$enable_shared"
748 shared=$enableval
749else
750 shared=default
751fi
752
753# Check whether --enable-profile or --disable-profile was given.
754if test "${enable_profile+set}" = set; then
755 enableval="$enable_profile"
756 profile=$enableval
757else
758 profile=yes
759fi
760
761# Check whether --enable-omitfp or --disable-omitfp was given.
762if test "${enable_omitfp+set}" = set; then
763 enableval="$enable_omitfp"
764 omitfp=$enableval
765else
766 omitfp=no
767fi
768
769# Check whether --enable-bounded or --disable-bounded was given.
770if test "${enable_bounded+set}" = set; then
771 enableval="$enable_bounded"
772 bounded=$enableval
773else
774 bounded=no
775fi
776
650425ce
UD
777# Check whether --enable-versioning or --disable-versioning was given.
778if test "${enable_versioning+set}" = set; then
779 enableval="$enable_versioning"
780 enable_versioning=$enableval
781else
782 enable_versioning=yes
783fi
784
cd6ede75 785
62ab42d6
UD
786# Check whether --enable-oldest-abi or --disable-oldest-abi was given.
787if test "${enable_oldest_abi+set}" = set; then
788 enableval="$enable_oldest_abi"
789 oldest_abi=$enableval
790else
791 oldest_abi=no
792fi
793
794if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
795 oldest_abi=default
796else
797 cat >> confdefs.h <<EOF
798#define GLIBC_OLDEST_ABI "$oldest_abi"
799EOF
800
801fi
802
803
cd6ede75
UD
804# Check whether --enable-add-ons or --disable-add-ons was given.
805if test "${enable_add_ons+set}" = set; then
806 enableval="$enable_add_ons"
61952351 807 case "$enableval" in
9c4c0024
UD
808 yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
809 test "$add_ons" = "*" && add_ons= ;;
61952351
UD
810 *) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
811 esac
cd6ede75
UD
812else
813 add_ons=
814fi
815
61952351 816
8d4b5a8a
UD
817# Check whether --with-tls or --without-tls was given.
818if test "${with_tls+set}" = set; then
819 withval="$with_tls"
820 usetls=$withval
821else
822 usetls=yes
823fi
824
825
cd6ede75
UD
826subdirs="$add_ons"
827
828add_ons_pfx=
829if test x"$add_ons" != x; then
830 for f in $add_ons; do
aa44a9de
AJ
831 # Some sanity checks
832 if test "$f" = "crypt"; then
833 { echo "configure: error:
834*** It seems that you're using an old \`crypt' add-on. crypt is now
835*** part of glibc and using the old add-on will not work with this
836*** release. Start again with fresh sources and without the old
837*** \`crypt' add-on." 1>&2; exit 1; }
838 fi
839 if test "$f" = "localedata"; then
840 { echo "configure: error:
841*** It seems that you're using an old \`localedata' add-on. localedata
842*** is now part of glibc and using the old add-on will not work with
843*** this release. Start again with fresh sources and without the old
844*** \`localedata' add-on." 1>&2; exit 1; }
845 fi
af6f3906
UD
846 # Test whether such a subdir really exists.
847 if test -d $srcdir/$f; then
848 add_ons_pfx="$add_ons_pfx $f/"
849 else
850 { echo "configure: error: add-on directory \"$f\" does not exist" 1>&2; exit 1; }
851 fi
cd6ede75
UD
852 done
853fi
854
855# Check whether --enable-static-nss or --disable-static-nss was given.
856if test "${enable_static_nss+set}" = set; then
857 enableval="$enable_static_nss"
858 static_nss=$enableval
859else
860 static_nss=no
861fi
862
834cef7c 863if test x"$static_nss" = xyes || test x"$shared" = xno; then
3172f58f 864 static_nss=yes
cd6ede75
UD
865 cat >> confdefs.h <<\EOF
866#define DO_STATIC_NSS 1
867EOF
868
869fi
870
73237de3
UD
871# Check whether --enable-force-install or --disable-force-install was given.
872if test "${enable_force_install+set}" = set; then
873 enableval="$enable_force_install"
874 force_install=$enableval
875else
876 force_install=yes
877fi
878
879
880
958f238f
UD
881# Check whether --enable-kernel or --disable-kernel was given.
882if test "${enable_kernel+set}" = set; then
883 enableval="$enable_kernel"
884 minimum_kernel=$enableval
cd6ede75
UD
885fi
886
654de60c
UD
887if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
888 # Better nothing than this.
889 minimum_kernel=""
78bba25c
UD
890else
891 if test "$minimum_kernel" = current; then
892 minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel=
893 fi
654de60c 894fi
958f238f 895
6cc7d725
UD
896# Check whether --enable-all-warnings or --disable-all-warnings was given.
897if test "${enable_all_warnings+set}" = set; then
898 enableval="$enable_all_warnings"
899 all_warnings=$enableval
900fi
901
902
958f238f 903
2a068d20 904
958f238f 905# Make sure we can run config.sub.
a808d541
UD
906if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
907else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
958f238f
UD
908fi
909
a808d541 910echo $ac_n "checking host system type""... $ac_c" 1>&6
3172f58f 911echo "configure:912: checking host system type" >&5
958f238f 912
a808d541
UD
913host_alias=$host
914case "$host_alias" in
915NONE)
916 case $nonopt in
917 NONE)
918 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
919 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
920 fi ;;
921 *) host_alias=$nonopt ;;
922 esac ;;
923esac
cd6ede75 924
a808d541
UD
925host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
926host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
927host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
928host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
929echo "$ac_t""$host" 1>&6
cd6ede75
UD
930
931
932# The way shlib-versions is used to generate soversions.mk uses a
933# fairly simplistic model for name recognition that can't distinguish
934# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
935# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
936# tell. This doesn't get used much beyond that, so it's fairly safe.
937case "$host_os" in
938linux*)
939 ;;
940gnu*)
941 host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
942 ;;
943esac
944
945# We keep the original values in `$config_*' and never modify them, so we
946# can write them unchanged into config.make. Everything else uses
947# $machine, $vendor, and $os, and changes them whenever convenient.
948config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
949
0816838f
UD
950# Don't allow vendor == "unknown"
951test "$config_vendor" = unknown && config_vendor=
952config_os="`echo $config_os | sed 's/^unknown-//'`"
953
cd6ede75
UD
954# Some configurations imply other options.
955case "$host_os" in
956gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
957 # These systems always use GNU tools.
958 gnu_ld=yes gnu_as=yes ;;
959esac
960case "$host_os" in
961# i586-linuxaout is mangled into i586-pc-linux-gnuaout
962linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
963 ;;
9a97d1f7 964gnu* | linux* | sysv4* | solaris2* | irix6*)
cd6ede75
UD
965 # These systems (almost) always use the ELF format.
966 elf=yes
967 ;;
5af3245a
UD
968aix*)
969 # These systems are always xcoff
970 xcoff=yes
a711b01d 971 elf=no
5af3245a 972 ;;
cd6ede75
UD
973esac
974
975machine=$config_machine
976vendor=$config_vendor
977os=$config_os
978
a808d541
UD
979# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
980# Unify this here.
981if test "$machine" = rs6000; then
982 machine="powerpc"
983fi
984
7efb9bd1
UD
985###
986### I put this here to prevent those annoying emails from people who cannot
987### read and try to compile glibc on unsupported platforms. --drepper
988###
989### By using the undocumented --enable-hacker-mode option for configure
990### one can skip this test to make the configuration not fail for unsupported
991### platforms.
992###
993if test -z "$enable_hacker_mode"; then
994 case "$machine-$host_os" in
f0d8cfd7 995 *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
7efb9bd1
UD
996 ;;
997 *)
998 echo "*** The GNU C library is currently not available for this platform."
999 echo "*** So far nobody cared to port it and if there is no volunteer it"
1000 echo "*** might never happen. So, if you have interest to see glibc on"
1001 echo "*** this platform visit"
1002 echo "*** http://www.gnu.org/software/libc/porting.html"
1003 echo "*** and join the group of porters"
1004 exit 1
1005 ;;
1006 esac
1007fi
1008
cd6ede75
UD
1009# Expand the configuration machine name into a subdirectory by architecture
1010# type and particular chip.
1011case "$machine" in
1012a29k | am29000) base_machine=a29k machine=a29k ;;
1013alpha*) base_machine=alpha machine=alpha/$machine ;;
0c8b61e6 1014arm*) base_machine=arm machine=arm/arm32/$machine ;;
60c96635
UD
1015c3[012]) base_machine=cx0 machine=cx0/c30 ;;
1016c4[04]) base_machine=cx0 machine=cx0/c40 ;;
b15cb495
UD
1017hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
1018hppa*) base_machine=hppa machine=hppa/hppa1.1 ;;
cd6ede75 1019i[3456]86) base_machine=i386 machine=i386/$machine ;;
9dfa9a5a 1020ia64) base_machine=ia64 machine=ia64 ;;
cd6ede75
UD
1021m680?0) base_machine=m68k machine=m68k/$machine ;;
1022m68k) base_machine=m68k machine=m68k/m68020 ;;
1023m88???) base_machine=m88k machine=m88k/$machine ;;
1024m88k) base_machine=m88k machine=m88k/m88100 ;;
1025mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
2b904739 1026mips*) base_machine=mips machine=mips/$machine ;;
136d4332
UD
1027s390) base_machine=s390 machine=s390/s390-32 ;;
1028s390x) base_machine=s390 machine=s390/s390-64 ;;
0da2f50b
UD
1029sh3*) base_machine=sh machine=sh/sh3 ;;
1030sh4*) base_machine=sh machine=sh/sh4 ;;
ca34d7a7
UD
1031sparc | sparcv[67])
1032 base_machine=sparc machine=sparc/sparc32 ;;
1033sparcv8 | supersparc | hypersparc)
1034 base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
ae6b8730
RH
1035sparcv8plus | sparcv8plusa | sparcv9)
1036 base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
bb769ab6
UD
1037sparcv8plusb | sparcv9b)
1038 base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
ca34d7a7
UD
1039sparc64 | ultrasparc)
1040 base_machine=sparc machine=sparc/sparc64 ;;
bb769ab6
UD
1041sparc64b | ultrasparc3)
1042 base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
0c8b61e6 1043thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
3a2832a0 1044*) base_machine=$machine ;;
cd6ede75
UD
1045esac
1046
1047
dfd2257a
UD
1048if test "$base_machine" = "i386"; then
1049 cat >> confdefs.h <<\EOF
1050#define USE_REGPARMS 1
1051EOF
1052
1053fi
1054
cd6ede75
UD
1055# Compute the list of sysdep directories for this configuration.
1056# This can take a while to compute.
1057sysdep_dir=$srcdir/sysdeps
1058echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
3172f58f 1059echo "configure:1060: checking sysdep dirs" >&5
cd6ede75
UD
1060# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
1061os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
1062
1063case "$os" in
1064gnu*)
1065 base_os=mach/hurd ;;
1066netbsd* | 386bsd* | freebsd* | bsdi*)
1067 base_os=unix/bsd/bsd4.4 ;;
1068osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
1069 base_os=unix/bsd ;;
1070sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
1071 base_os=unix/sysv ;;
9a97d1f7
UD
1072irix6*)
1073 base_os=unix/sysv/irix6/$os ;;
cd6ede75
UD
1074solaris[2-9]*)
1075 base_os=unix/sysv/sysv4 ;;
908c3d5b
UD
1076hpux*)
1077 base_os=unix/sysv/hpux/$os ;;
f0d8cfd7
UD
1078aix4.3*)
1079 base_os=unix/sysv/aix/aix4.3 ;;
cd6ede75
UD
1080none)
1081 base_os=standalone ;;
1082*)
1083 base_os='' ;;
1084esac
1085
1086# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
1087tail=$os
1088ostry=$os
1089while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do
1090 ostry="$ostry /$o"
1091 tail=$o
1092done
1093o=`echo $tail | sed 's/[0-9]*$//'`
1094if test $o != $tail; then
1095 ostry="$ostry /$o"
1096fi
1097# For linux-gnu, try linux-gnu, then linux.
1098o=`echo $tail | sed 's/-.*$//'`
1099if test $o != $tail; then
1100 ostry="$ostry /$o"
1101fi
1102
1103# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
1104base=
1105tail=$base_os
1106while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
1107 set $b
1108 base="$base /$1"
1109 tail="$2"
1110done
1111
ae6b8730 1112# For sparc/sparc32, try sparc/sparc32 and then sparc.
cd6ede75
UD
1113mach=
1114tail=$machine
1115while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
1116 set $m
1117 # Prepend the machine's FPU directory unless --without-fp.
1118 if test "$with_fp" = yes; then
1119 mach="$mach /$1/fpu"
1120 fi
1121 mach="$mach /$1"
1122 tail="$2"
1123done
1124
1125
1126# Find what sysdep directories exist.
1127sysnames=
1128IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1129for d in $add_ons_pfx ''; do
1130 for b in $base ''; do
1131 for m0 in $mach ''; do
1132 for v in /$vendor ''; do
ae828bc6 1133 test "$v" = / && continue
cd6ede75 1134 for o in /$ostry ''; do
ae828bc6 1135 test "$o" = / && continue
cd6ede75
UD
1136 for m in $mach ''; do
1137 if test "$m0$b$v$o$m"; then
1138 try="${d}sysdeps$m0$b$v$o$m"
1139 test -n "$enable_debug_configure" &&
1140 echo "$0 DEBUG: try $try" >&2
9c4c0024 1141 if test -d $srcdir/$try; then
cd6ede75
UD
1142 sysnames="$sysnames $try"
1143 { test -n "$o" || test -n "$b"; } && os_used=t
1144 { test -n "$m" || test -n "$m0"; } && machine_used=t
1145 fi
1146 fi
1147 done
1148 done
1149 done
1150 done
1151 done
1152done
1153IFS="$ac_save_ifs"
1154
1155if test -z "$os_used" && test "$os" != none; then
1156 { echo "configure: error: Operating system $os is not supported." 1>&2; exit 1; }
1157fi
1158if test -z "$machine_used" && test "$machine" != none; then
1159 { echo "configure: error: The $machine is not supported." 1>&2; exit 1; }
1160fi
1161
1162# We have now validated the configuration.
1163
1164
1165# If using ELF, look for an `elf' subdirectory of each machine directory.
1166# We prepend these rather than inserting them whereever the machine appears
1167# because things specified by the machine's ELF ABI should override
1168# OS-specific things, and should always be the same for any OS on the
1169# machine (otherwise what's the point of an ABI?).
1170if test "$elf" = yes; then
1171 elf_dirs=
1172 for d in $add_ons_pfx ''; do
cd6ede75 1173 for m in $mach; do
9c4c0024 1174 if test -d $srcdir/${d}sysdeps$m/elf; then
cd6ede75
UD
1175 elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
1176 fi
1177 done
1178 done
1179 sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
1180fi
1181
1182
1183# Expand the list of system names into a full list of directories
1184# from each element's parent name and Implies file (if present).
1185set $sysnames
1186names=
1187while test $# -gt 0; do
1188 name=$1
1189 shift
1190
1191 case " $names " in *" $name "*)
1192 # Already in the list.
1193 continue
1194 esac
1195
1196 # Report each name as we discover it, so there is no long pause in output.
1197 echo $ac_n "$name $ac_c" >&6
1198
1199 name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
1200
1201 case $name in
1202 /*) xsrcdir= ;;
1203 *) xsrcdir=$srcdir/ ;;
1204 esac
1205 test -n "$enable_debug_configure" &&
1206 echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2
1207
1208 if test -f $xsrcdir$name/Implies; then
1209 # Collect more names from the `Implies' file (removing comments).
1210 implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
1211 implied=
1212 for x in $implied_candidate; do
636ccfc8 1213 found=no
cd6ede75
UD
1214 if test -d $xsrcdir$name_base/$x; then
1215 implied="$implied $name_base/$x";
636ccfc8
UD
1216 found=yes
1217 fi
1218 for d in $add_ons_pfx ''; do
1219 try="${d}sysdeps/$x"
1220 case $d in
1221 /*) try_srcdir= ;;
1222 *) try_srcdir=$srcdir/ ;;
1223 esac
1224 test -n "$enable_debug_configure" &&
1225 echo "DEBUG: $name implied $x try($d) {$try_srcdir}$try" >&2
1226 if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try;
1227 then
1228 implied="$implied $try"
1229 found=yes
1230 fi
1231 done
1232 if test $found = no; then
cd6ede75
UD
1233 echo "configure: warning: $name/Implies specifies nonexistent $x" 1>&2
1234 fi
1235 done
1236 else
1237 implied=
1238 fi
1239
1240 # Add NAME to the list of names.
1241 names="$names $name"
1242
1243 # Find the parent of NAME, using the empty string if it has none.
1244 parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
1245
1246 # Add the names implied by NAME, and NAME's parent (if it has one), to
1247 # the list of names to be processed (the argument list). We prepend the
1248 # implied names to the list and append the parent. We want implied
1249 # directories to come before further directories inferred from the
1250 # configuration components; this ensures that for sysv4, unix/common
1251 # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
1252 # after sysv4).
1253 sysnames="`echo $implied $* $parent`"
1254 test -n "$sysnames" && set $sysnames
1255done
1256
1257# Add the default directories.
a3a4a74e 1258default_sysnames=sysdeps/generic
2de7874e 1259if test "$elf" = yes; then
a3a4a74e 1260 default_sysnames="sysdeps/generic/elf $default_sysnames"
2de7874e 1261fi
a3a4a74e 1262sysnames="$names $default_sysnames"
cd6ede75
UD
1263
1264# The other names were emitted during the scan.
a3a4a74e 1265echo "$ac_t""$default_sysnames" 1>&6
cd6ede75
UD
1266
1267
1268### Locate tools.
1269
1270# Find a good install program. We prefer a C program (faster),
1271# so one script is as good as another. But avoid the broken or
1272# incompatible versions:
1273# SysV /etc/install, /usr/sbin/install
1274# SunOS /usr/etc/install
1275# IRIX /sbin/install
1276# AIX /bin/install
5c2a0669 1277# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
cd6ede75
UD
1278# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1279# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1280# ./install, which can be erroneously created by make from ./install.sh.
1281echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3172f58f 1282echo "configure:1283: checking for a BSD compatible install" >&5
cd6ede75 1283if test -z "$INSTALL"; then
a808d541 1284if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
cd6ede75
UD
1285 echo $ac_n "(cached) $ac_c" 1>&6
1286else
5c2a0669 1287 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
cd6ede75
UD
1288 for ac_dir in $PATH; do
1289 # Account for people who put trailing slashes in PATH elements.
1290 case "$ac_dir/" in
1291 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1292 *)
1293 # OSF1 and SCO ODT 3.0 have their own names for install.
5c2a0669
UD
1294 # Don't use installbsd from OSF since it installs stuff as root
1295 # by default.
1296 for ac_prog in ginstall scoinst install; do
cd6ede75
UD
1297 if test -f $ac_dir/$ac_prog; then
1298 if test $ac_prog = install &&
1299 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1300 # AIX install. It has an incompatible calling convention.
cd6ede75
UD
1301 :
1302 else
1303 ac_cv_path_install="$ac_dir/$ac_prog -c"
1304 break 2
1305 fi
1306 fi
1307 done
1308 ;;
1309 esac
1310 done
1311 IFS="$ac_save_IFS"
1312
1313fi
1314 if test "${ac_cv_path_install+set}" = set; then
1315 INSTALL="$ac_cv_path_install"
1316 else
1317 # As a last resort, use the slow shell script. We don't cache a
1318 # path for INSTALL within a source directory, because that will
1319 # break other packages using the cache if that directory is
1320 # removed, or if the path is relative.
1321 INSTALL="$ac_install_sh"
1322 fi
1323fi
1324echo "$ac_t""$INSTALL" 1>&6
1325
1326# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1327# It thinks the first close brace ends the variable substitution.
1328test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1329
a808d541 1330test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
5c2a0669 1331
cd6ede75
UD
1332test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1333
ed9c47d9 1334if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
cd6ede75 1335 # The makefiles need to use a different form to find it in $srcdir.
ed9c47d9 1336 INSTALL='\$(..)./scripts/install-sh -c'
cd6ede75
UD
1337fi
1338echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3172f58f 1339echo "configure:1340: checking whether ln -s works" >&5
a808d541 1340if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
cd6ede75
UD
1341 echo $ac_n "(cached) $ac_c" 1>&6
1342else
1343 rm -f conftestdata
1344if ln -s X conftestdata 2>/dev/null
1345then
1346 rm -f conftestdata
1347 ac_cv_prog_LN_S="ln -s"
1348else
1349 ac_cv_prog_LN_S=ln
1350fi
1351fi
1352LN_S="$ac_cv_prog_LN_S"
1353if test "$ac_cv_prog_LN_S" = "ln -s"; then
1354 echo "$ac_t""yes" 1>&6
1355else
1356 echo "$ac_t""no" 1>&6
1357fi
1358
63bda0c1 1359
c218729d
UD
1360# We need the physical current working directory. We cannot use the
1361# "pwd -P" shell builtin since that's not portable. Instead we try to
1362# find a pwd binary. Note that assigning to the PWD environment
1363# variable might have some interesting side effects, so we don't do
1364# that.
1365# Extract the first word of "pwd", so it can be a program name with args.
1366set dummy pwd; ac_word=$2
1367echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1368echo "configure:1369: checking for $ac_word" >&5
c218729d
UD
1369if eval "test \"`echo '$''{'ac_cv_path_PWD_P'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371else
1372 case "$PWD_P" in
1373 /*)
1374 ac_cv_path_PWD_P="$PWD_P" # Let the user override the test with a path.
1375 ;;
1376 ?:/*)
1377 ac_cv_path_PWD_P="$PWD_P" # Let the user override the test with a dos path.
1378 ;;
1379 *)
1380 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1381 ac_dummy="$PATH"
1382 for ac_dir in $ac_dummy; do
1383 test -z "$ac_dir" && ac_dir=.
1384 if test -f $ac_dir/$ac_word; then
1385 ac_cv_path_PWD_P="$ac_dir/$ac_word"
1386 break
1387 fi
1388 done
1389 IFS="$ac_save_ifs"
1390 test -z "$ac_cv_path_PWD_P" && ac_cv_path_PWD_P="no"
1391 ;;
1392esac
1393fi
1394PWD_P="$ac_cv_path_PWD_P"
1395if test -n "$PWD_P"; then
1396 echo "$ac_t""$PWD_P" 1>&6
1397else
1398 echo "$ac_t""no" 1>&6
1399fi
1400
1401if test "$PWD_P" = no; then
1402 { echo "configure: error: *** A pwd binary could not be found." 1>&2; exit 1; }
1403fi
1404
63bda0c1 1405# These programs are version sensitive.
4bca4c17 1406echo $ac_n "checking build system type""... $ac_c" 1>&6
3172f58f 1407echo "configure:1408: checking build system type" >&5
a808d541
UD
1408
1409build_alias=$build
1410case "$build_alias" in
1411NONE)
1412 case $nonopt in
1413 NONE) build_alias=$host_alias ;;
1414 *) build_alias=$nonopt ;;
1415 esac ;;
1416esac
4bca4c17 1417
a808d541
UD
1418build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1419build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1420build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1421build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1422echo "$ac_t""$build" 1>&6
4bca4c17
UD
1423
1424if test $host != $build; then
1425 ac_tool_prefix=${host_alias}-
1426else
1427 ac_tool_prefix=
1428fi
1429
1430for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
1431do
1432# Extract the first word of "$ac_prog", so it can be a program name with args.
1433set dummy $ac_prog; ac_word=$2
1434echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1435echo "configure:1436: checking for $ac_word" >&5
a808d541 1436if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
cd6ede75
UD
1437 echo $ac_n "(cached) $ac_c" 1>&6
1438else
63bda0c1
UD
1439 if test -n "$CC"; then
1440 ac_cv_prog_CC="$CC" # Let the user override the test.
cd6ede75 1441else
5c2a0669
UD
1442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
4bca4c17
UD
1445 test -z "$ac_dir" && ac_dir=.
1446 if test -f $ac_dir/$ac_word; then
1447 ac_cv_prog_CC="$ac_prog"
1448 break
1449 fi
cd6ede75
UD
1450 done
1451 IFS="$ac_save_ifs"
1452fi
1453fi
4bca4c17
UD
1454CC="$ac_cv_prog_CC"
1455if test -n "$CC"; then
1456 echo "$ac_t""$CC" 1>&6
1457else
cd6ede75 1458 echo "$ac_t""no" 1>&6
4bca4c17
UD
1459fi
1460
1461test -n "$CC" && break
1462done
1463
1464if test -z "$CC"; then
1465 ac_verc_fail=yes
63bda0c1 1466else
4bca4c17
UD
1467 # Found it, now check the version.
1468 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
3172f58f 1469echo "configure:1470: checking version of $CC" >&5
9dfa9a5a 1470 ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
4bca4c17
UD
1471 case $ac_prog_version in
1472 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
d60a7756 1473 *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
4bca4c17
UD
1474 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1475 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1476
63bda0c1 1477 esac
4bca4c17
UD
1478 echo "$ac_t""$ac_prog_version" 1>&6
1479fi
1480if test $ac_verc_fail = yes; then
6b4e880f 1481 critic_missing=gcc
ae828bc6
UD
1482fi
1483
22e65f8f 1484for ac_prog in gnumake gmake make
4bca4c17
UD
1485do
1486# Extract the first word of "$ac_prog", so it can be a program name with args.
1487set dummy $ac_prog; ac_word=$2
1488echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1489echo "configure:1490: checking for $ac_word" >&5
a808d541 1490if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
04be94a8
UD
1491 echo $ac_n "(cached) $ac_c" 1>&6
1492else
63bda0c1
UD
1493 if test -n "$MAKE"; then
1494 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
04be94a8 1495else
5c2a0669
UD
1496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
4bca4c17
UD
1499 test -z "$ac_dir" && ac_dir=.
1500 if test -f $ac_dir/$ac_word; then
1501 ac_cv_prog_MAKE="$ac_prog"
1502 break
1503 fi
04be94a8
UD
1504 done
1505 IFS="$ac_save_ifs"
1506fi
1507fi
4bca4c17
UD
1508MAKE="$ac_cv_prog_MAKE"
1509if test -n "$MAKE"; then
1510 echo "$ac_t""$MAKE" 1>&6
1511else
04be94a8 1512 echo "$ac_t""no" 1>&6
4bca4c17
UD
1513fi
1514
1515test -n "$MAKE" && break
1516done
1517
1518if test -z "$MAKE"; then
1519 ac_verc_fail=yes
63bda0c1 1520else
4bca4c17
UD
1521 # Found it, now check the version.
1522 echo $ac_n "checking version of $MAKE""... $ac_c" 1>&6
3172f58f 1523echo "configure:1524: checking version of $MAKE" >&5
8fc1e2ca 1524 ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
4bca4c17
UD
1525 case $ac_prog_version in
1526 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2bbc70d5 1527 3.79* | 3.[89]*)
4bca4c17
UD
1528 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1529 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1530
63bda0c1 1531 esac
4bca4c17
UD
1532 echo "$ac_t""$ac_prog_version" 1>&6
1533fi
1534if test $ac_verc_fail = yes; then
6b4e880f 1535 critic_missing="$critic_missing make"
04be94a8 1536fi
cd6ede75 1537
63bda0c1 1538
de83fb78
AJ
1539
1540if test -n "$critic_missing"; then
1541{ echo "configure: error:
aefdff34 1542*** These critical programs are missing or too old:$critic_missing
de83fb78
AJ
1543*** Check the INSTALL file for required versions." 1>&2; exit 1; }
1544fi
1545
1546
22e65f8f 1547for ac_prog in gnumsgfmt gmsgfmt msgfmt
4bca4c17
UD
1548do
1549# Extract the first word of "$ac_prog", so it can be a program name with args.
1550set dummy $ac_prog; ac_word=$2
1551echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1552echo "configure:1553: checking for $ac_word" >&5
a808d541 1553if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
cd6ede75
UD
1554 echo $ac_n "(cached) $ac_c" 1>&6
1555else
63bda0c1
UD
1556 if test -n "$MSGFMT"; then
1557 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
cd6ede75 1558else
5c2a0669
UD
1559 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1560 ac_dummy="$PATH"
1561 for ac_dir in $ac_dummy; do
4bca4c17
UD
1562 test -z "$ac_dir" && ac_dir=.
1563 if test -f $ac_dir/$ac_word; then
1564 ac_cv_prog_MSGFMT="$ac_prog"
1565 break
1566 fi
cd6ede75
UD
1567 done
1568 IFS="$ac_save_ifs"
1569fi
1570fi
4bca4c17
UD
1571MSGFMT="$ac_cv_prog_MSGFMT"
1572if test -n "$MSGFMT"; then
1573 echo "$ac_t""$MSGFMT" 1>&6
1574else
cd6ede75 1575 echo "$ac_t""no" 1>&6
4bca4c17
UD
1576fi
1577
1578test -n "$MSGFMT" && break
1579done
1580
1581if test -z "$MSGFMT"; then
1582 ac_verc_fail=yes
63bda0c1 1583else
4bca4c17
UD
1584 # Found it, now check the version.
1585 echo $ac_n "checking version of $MSGFMT""... $ac_c" 1>&6
3172f58f 1586echo "configure:1587: checking version of $MSGFMT" >&5
bdd421cc 1587 ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4bca4c17
UD
1588 case $ac_prog_version in
1589 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
fbd5e005 1590 0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*)
4bca4c17
UD
1591 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1592 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1593
63bda0c1 1594 esac
4bca4c17
UD
1595 echo "$ac_t""$ac_prog_version" 1>&6
1596fi
1597if test $ac_verc_fail = yes; then
aefdff34 1598 MSGFMT=: aux_missing="$aux_missing msgfmt"
cd6ede75
UD
1599fi
1600
4bca4c17
UD
1601for ac_prog in makeinfo
1602do
1603# Extract the first word of "$ac_prog", so it can be a program name with args.
1604set dummy $ac_prog; ac_word=$2
1605echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1606echo "configure:1607: checking for $ac_word" >&5
a808d541 1607if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
cd6ede75
UD
1608 echo $ac_n "(cached) $ac_c" 1>&6
1609else
63bda0c1
UD
1610 if test -n "$MAKEINFO"; then
1611 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
cd6ede75 1612else
5c2a0669
UD
1613 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
4bca4c17
UD
1616 test -z "$ac_dir" && ac_dir=.
1617 if test -f $ac_dir/$ac_word; then
1618 ac_cv_prog_MAKEINFO="$ac_prog"
1619 break
1620 fi
cd6ede75
UD
1621 done
1622 IFS="$ac_save_ifs"
cd6ede75
UD
1623fi
1624fi
4bca4c17
UD
1625MAKEINFO="$ac_cv_prog_MAKEINFO"
1626if test -n "$MAKEINFO"; then
1627 echo "$ac_t""$MAKEINFO" 1>&6
1628else
cd6ede75 1629 echo "$ac_t""no" 1>&6
4bca4c17
UD
1630fi
1631
1632test -n "$MAKEINFO" && break
1633done
1634
1635if test -z "$MAKEINFO"; then
1636 ac_verc_fail=yes
63bda0c1 1637else
4bca4c17
UD
1638 # Found it, now check the version.
1639 echo $ac_n "checking version of $MAKEINFO""... $ac_c" 1>&6
3172f58f 1640echo "configure:1641: checking version of $MAKEINFO" >&5
be1d9d95 1641 ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
4bca4c17
UD
1642 case $ac_prog_version in
1643 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1468be21 1644 4.*)
4bca4c17
UD
1645 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1646 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1647
63bda0c1 1648 esac
4bca4c17
UD
1649 echo "$ac_t""$ac_prog_version" 1>&6
1650fi
1651if test $ac_verc_fail = yes; then
aefdff34 1652 MAKEINFO=: aux_missing="$aux_missing makeinfo"
cd6ede75
UD
1653fi
1654
d6a97a28 1655for ac_prog in sed
aec103d3
UD
1656do
1657# Extract the first word of "$ac_prog", so it can be a program name with args.
1658set dummy $ac_prog; ac_word=$2
1659echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1660echo "configure:1661: checking for $ac_word" >&5
a808d541 1661if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then
aec103d3
UD
1662 echo $ac_n "(cached) $ac_c" 1>&6
1663else
1664 if test -n "$SED"; then
1665 ac_cv_prog_SED="$SED" # Let the user override the test.
1666else
1667 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1668 ac_dummy="$PATH"
1669 for ac_dir in $ac_dummy; do
1670 test -z "$ac_dir" && ac_dir=.
1671 if test -f $ac_dir/$ac_word; then
1672 ac_cv_prog_SED="$ac_prog"
1673 break
1674 fi
1675 done
1676 IFS="$ac_save_ifs"
1677fi
1678fi
1679SED="$ac_cv_prog_SED"
1680if test -n "$SED"; then
1681 echo "$ac_t""$SED" 1>&6
1682else
1683 echo "$ac_t""no" 1>&6
1684fi
1685
1686test -n "$SED" && break
1687done
1688
1689if test -z "$SED"; then
1690 ac_verc_fail=yes
1691else
1692 # Found it, now check the version.
1693 echo $ac_n "checking version of $SED""... $ac_c" 1>&6
3172f58f 1694echo "configure:1695: checking version of $SED" >&5
aec103d3
UD
1695 ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
1696 case $ac_prog_version in
1697 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
ce19d417 1698 3.0[2-9]*|3.[1-9]*|[4-9]*)
aec103d3
UD
1699 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1700 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1701
1702 esac
1703 echo "$ac_t""$ac_prog_version" 1>&6
1704fi
1705if test $ac_verc_fail = yes; then
aefdff34 1706 SED=: aux_missing="$aux_missing sed"
aec103d3
UD
1707fi
1708
cd6ede75 1709
63bda0c1
UD
1710
1711echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3172f58f 1712echo "configure:1713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
a808d541 1713if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then
63bda0c1
UD
1714 echo $ac_n "(cached) $ac_c" 1>&6
1715else
1716
cd6ede75
UD
1717ac_ext=c
1718# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1719ac_cpp='$CPP $CPPFLAGS'
1720ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5c2a0669 1721ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cd6ede75
UD
1722cross_compiling=$ac_cv_prog_cc_cross
1723
5c2a0669
UD
1724cat > conftest.$ac_ext << EOF
1725
3172f58f 1726#line 1727 "configure"
cd6ede75 1727#include "confdefs.h"
5c2a0669 1728
cd6ede75
UD
1729main(){return(0);}
1730EOF
3172f58f 1731if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cd6ede75
UD
1732 ac_cv_prog_cc_works=yes
1733 # If we can't run a trivial program, we are probably using a cross compiler.
1734 if (./conftest; exit) 2>/dev/null; then
1735 ac_cv_prog_cc_cross=no
1736 else
1737 ac_cv_prog_cc_cross=yes
1738 fi
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 ac_cv_prog_cc_works=no
1743fi
1744rm -fr conftest*
5c2a0669
UD
1745ac_ext=c
1746# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1747ac_cpp='$CPP $CPPFLAGS'
1748ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1749ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1750cross_compiling=$ac_cv_prog_cc_cross
cd6ede75 1751
63bda0c1
UD
1752fi
1753
cd6ede75
UD
1754echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1755if test $ac_cv_prog_cc_works = no; then
1756 cross_linkable=no
1757 ac_cv_prog_cc_cross=yes
1758else
1759 cross_linkable=yes
1760fi
1761echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3172f58f 1762echo "configure:1763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
a808d541 1763if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then
63bda0c1
UD
1764 echo $ac_n "(cached) $ac_c" 1>&6
1765else
1766 :
1767fi
1768
cd6ede75
UD
1769echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1770
1771cross_compiling=$ac_cv_prog_cc_cross
1772
1773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3172f58f 1774echo "configure:1775: checking whether we are using GNU C" >&5
a808d541 1775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
cd6ede75
UD
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777else
1778 cat > conftest.c <<EOF
1779#ifdef __GNUC__
1780 yes;
1781#endif
1782EOF
3172f58f 1783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
cd6ede75
UD
1784 ac_cv_prog_gcc=yes
1785else
1786 ac_cv_prog_gcc=no
1787fi
1788fi
1789
1790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
63bda0c1 1791if test $ac_cv_prog_gcc != yes; then
cd6ede75
UD
1792 { echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
1793fi
1794
1795echo $ac_n "checking build system type""... $ac_c" 1>&6
3172f58f 1796echo "configure:1797: checking build system type" >&5
a808d541
UD
1797
1798build_alias=$build
1799case "$build_alias" in
1800NONE)
1801 case $nonopt in
1802 NONE) build_alias=$host_alias ;;
1803 *) build_alias=$nonopt ;;
1804 esac ;;
1805esac
cd6ede75 1806
a808d541
UD
1807build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1808build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1809build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1810build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1811echo "$ac_t""$build" 1>&6
cd6ede75
UD
1812
1813if test $host != $build; then
1814 for ac_prog in gcc cc
1815do
1816# Extract the first word of "$ac_prog", so it can be a program name with args.
1817set dummy $ac_prog; ac_word=$2
1818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1819echo "configure:1820: checking for $ac_word" >&5
a808d541 1820if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
cd6ede75
UD
1821 echo $ac_n "(cached) $ac_c" 1>&6
1822else
1823 if test -n "$BUILD_CC"; then
1824 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1825else
5c2a0669
UD
1826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1827 ac_dummy="$PATH"
1828 for ac_dir in $ac_dummy; do
cd6ede75
UD
1829 test -z "$ac_dir" && ac_dir=.
1830 if test -f $ac_dir/$ac_word; then
1831 ac_cv_prog_BUILD_CC="$ac_prog"
1832 break
1833 fi
1834 done
1835 IFS="$ac_save_ifs"
1836fi
1837fi
1838BUILD_CC="$ac_cv_prog_BUILD_CC"
1839if test -n "$BUILD_CC"; then
1840 echo "$ac_t""$BUILD_CC" 1>&6
1841else
1842 echo "$ac_t""no" 1>&6
1843fi
1844
1845test -n "$BUILD_CC" && break
1846done
1847
1848fi
1849
1850echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3172f58f 1851echo "configure:1852: checking how to run the C preprocessor" >&5
cd6ede75
UD
1852# On Suns, sometimes $CPP names a directory.
1853if test -n "$CPP" && test -d "$CPP"; then
1854 CPP=
1855fi
1856if test -z "$CPP"; then
a808d541 1857if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
cd6ede75
UD
1858 echo $ac_n "(cached) $ac_c" 1>&6
1859else
1860 # This must be in double quotes, not single quotes, because CPP may get
1861 # substituted into the Makefile and "${CC-cc}" will confuse make.
1862 CPP="${CC-cc} -E"
1863 # On the NeXT, cc -E runs the code through the compiler's parser,
1864 # not just through cpp.
1865 cat > conftest.$ac_ext <<EOF
3172f58f 1866#line 1867 "configure"
cd6ede75
UD
1867#include "confdefs.h"
1868#include <assert.h>
1869Syntax Error
1870EOF
1871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3172f58f 1872{ (eval echo configure:1873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669 1873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
cd6ede75
UD
1874if test -z "$ac_err"; then
1875 :
1876else
1877 echo "$ac_err" >&5
1878 echo "configure: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 rm -rf conftest*
1881 CPP="${CC-cc} -E -traditional-cpp"
1882 cat > conftest.$ac_ext <<EOF
3172f58f 1883#line 1884 "configure"
cd6ede75
UD
1884#include "confdefs.h"
1885#include <assert.h>
1886Syntax Error
1887EOF
1888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3172f58f 1889{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669
UD
1890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1891if test -z "$ac_err"; then
1892 :
1893else
1894 echo "$ac_err" >&5
1895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
1897 rm -rf conftest*
1898 CPP="${CC-cc} -nologo -E"
1899 cat > conftest.$ac_ext <<EOF
3172f58f 1900#line 1901 "configure"
5c2a0669
UD
1901#include "confdefs.h"
1902#include <assert.h>
1903Syntax Error
1904EOF
1905ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3172f58f 1906{ (eval echo configure:1907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669 1907ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
cd6ede75
UD
1908if test -z "$ac_err"; then
1909 :
1910else
1911 echo "$ac_err" >&5
1912 echo "configure: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 rm -rf conftest*
1915 CPP=/lib/cpp
1916fi
1917rm -f conftest*
1918fi
5c2a0669
UD
1919rm -f conftest*
1920fi
cd6ede75
UD
1921rm -f conftest*
1922 ac_cv_prog_CPP="$CPP"
1923fi
1924 CPP="$ac_cv_prog_CPP"
1925else
1926 ac_cv_prog_CPP="$CPP"
1927fi
1928echo "$ac_t""$CPP" 1>&6
1929
650425ce
UD
1930# Was a --with-binutils option given?
1931if test -n "$path_binutils"; then
1932 # Make absolute; ensure a single trailing slash.
1933 path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
63bda0c1 1934 CC="$CC -B$path_binutils"
650425ce 1935fi
27a5bb33
UD
1936AS=`$CC -print-prog-name=as`
1937LD=`$CC -print-prog-name=ld`
5edb9387 1938AR=`$CC -print-prog-name=ar`
cd6ede75
UD
1939
1940
5edb9387
UD
1941# ranlib has to be treated a bit differently since it might not exist at all.
1942RANLIB=`$CC -print-prog-name=ranlib`
1943if test $RANLIB = ranlib; then
1944# This extra check has to happen since gcc simply echos the parameter in
1945# case it cannot find the value in its own directories.
cd6ede75
UD
1946# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1947set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1948echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1949echo "configure:1950: checking for $ac_word" >&5
a808d541 1950if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
cd6ede75
UD
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952else
1953 if test -n "$RANLIB"; then
1954 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1955else
5c2a0669
UD
1956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1957 ac_dummy="$PATH"
1958 for ac_dir in $ac_dummy; do
cd6ede75
UD
1959 test -z "$ac_dir" && ac_dir=.
1960 if test -f $ac_dir/$ac_word; then
1961 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1962 break
1963 fi
1964 done
1965 IFS="$ac_save_ifs"
1966fi
1967fi
1968RANLIB="$ac_cv_prog_RANLIB"
1969if test -n "$RANLIB"; then
1970 echo "$ac_t""$RANLIB" 1>&6
1971else
1972 echo "$ac_t""no" 1>&6
1973fi
1974
1975
1976if test -z "$ac_cv_prog_RANLIB"; then
1977if test -n "$ac_tool_prefix"; then
1978 # Extract the first word of "ranlib", so it can be a program name with args.
1979set dummy ranlib; ac_word=$2
1980echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 1981echo "configure:1982: checking for $ac_word" >&5
a808d541 1982if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
cd6ede75
UD
1983 echo $ac_n "(cached) $ac_c" 1>&6
1984else
1985 if test -n "$RANLIB"; then
1986 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1987else
5c2a0669
UD
1988 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1989 ac_dummy="$PATH"
1990 for ac_dir in $ac_dummy; do
cd6ede75
UD
1991 test -z "$ac_dir" && ac_dir=.
1992 if test -f $ac_dir/$ac_word; then
1993 ac_cv_prog_RANLIB="ranlib"
1994 break
1995 fi
1996 done
1997 IFS="$ac_save_ifs"
1998 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1999fi
2000fi
2001RANLIB="$ac_cv_prog_RANLIB"
2002if test -n "$RANLIB"; then
2003 echo "$ac_t""$RANLIB" 1>&6
2004else
2005 echo "$ac_t""no" 1>&6
2006fi
2007
2008else
2009 RANLIB=":"
2010fi
2011fi
2012
5edb9387
UD
2013fi
2014
2015
2016# Determine whether we are using GNU binutils.
2017echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6
3172f58f 2018echo "configure:2019: checking whether $AS is GNU as" >&5
a808d541 2019if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then
5edb9387
UD
2020 echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022 # Most GNU programs take a -v and spit out some text including
2023# the word 'GNU'. Some try to read stdin, so give them /dev/null.
2024if $AS -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
2025 libc_cv_prog_as_gnu=yes
2026else
2027 libc_cv_prog_as_gnu=no
2028fi
2029rm -fr contest*
2030fi
2031
2032echo "$ac_t""$libc_cv_prog_as_gnu" 1>&6
2033rm -f a.out
2034gnu_as=$libc_cv_prog_as_gnu
2035
2036echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6
3172f58f 2037echo "configure:2038: checking whether $LD is GNU ld" >&5
a808d541 2038if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then
5edb9387
UD
2039 echo $ac_n "(cached) $ac_c" 1>&6
2040else
2041 # Most GNU programs take a -v and spit out some text including
2042# the word 'GNU'. Some try to read stdin, so give them /dev/null.
2043if $LD -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
2044 libc_cv_prog_ld_gnu=yes
2045else
2046 libc_cv_prog_ld_gnu=no
2047fi
2048rm -fr contest*
2049fi
2050
2051echo "$ac_t""$libc_cv_prog_ld_gnu" 1>&6
2052gnu_ld=$libc_cv_prog_ld_gnu
2053
4bca4c17
UD
2054# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
2055set dummy ${ac_tool_prefix}mig; ac_word=$2
2056echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2057echo "configure:2058: checking for $ac_word" >&5
a808d541 2058if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
4bca4c17
UD
2059 echo $ac_n "(cached) $ac_c" 1>&6
2060else
2061 if test -n "$MIG"; then
2062 ac_cv_prog_MIG="$MIG" # Let the user override the test.
2063else
5c2a0669
UD
2064 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2065 ac_dummy="$PATH"
2066 for ac_dir in $ac_dummy; do
4bca4c17
UD
2067 test -z "$ac_dir" && ac_dir=.
2068 if test -f $ac_dir/$ac_word; then
2069 ac_cv_prog_MIG="${ac_tool_prefix}mig"
2070 break
2071 fi
2072 done
2073 IFS="$ac_save_ifs"
2074 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
2075fi
2076fi
2077MIG="$ac_cv_prog_MIG"
2078if test -n "$MIG"; then
2079 echo "$ac_t""$MIG" 1>&6
2080else
2081 echo "$ac_t""no" 1>&6
2082fi
2083
2084
2085
cd6ede75 2086
ea9f119b 2087# Accept binutils 2.10.1 or newer (and also any ia64 2.9 version)
45ef592d
UD
2088# XXX Commented out because it filters out too many good versions.
2089# XXX --drepper
2090# AC_CHECK_PROG_VER(AS, $AS, --version,
2091# [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
2092# [2.10.[1-9]* | 2.1[1-9]* | 2.9-ia64-*], AS=: critic_missing=t)
ea9f119b 2093
ea9f119b 2094test -n "$aux_missing" && echo "configure: warning:
aefdff34 2095*** These auxiliary programs are missing or too old:$aux_missing
ea9f119b
AJ
2096*** some features will be disabled.
2097*** Check the INSTALL file for required versions." 1>&2
2098
2099# glibcbug.in wants to know the compiler version.
2100CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'`
2101
2102
3c720987
UD
2103# if using special system headers, find out the compiler's sekrit
2104# header directory and add that to the list. NOTE: Only does the right
2105# thing on a system that doesn't need fixincludes. (Not presently a problem.)
2106if test -n "$sysheaders"; then
2107 ccheaders=`$CC -print-file-name=include`
2108 SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $sysheaders"
2109fi
2110
2111
f89ac85c
UD
2112# check if ranlib is necessary
2113echo $ac_n "checking whether ranlib is necessary""... $ac_c" 1>&6
3172f58f 2114echo "configure:2115: checking whether ranlib is necessary" >&5
a808d541 2115if eval "test \"`echo '$''{'libc_cv_ranlib_necessary'+set}'`\" = set"; then
f38931a9
UD
2116 echo $ac_n "(cached) $ac_c" 1>&6
2117else
f89ac85c
UD
2118 cat > conftest.c <<EOF
2119int a;
2120char b;
2121void c(void) {}
2122EOF
2123$CC $CFLAGS -c conftest.c
2124$AR cr conftest.a conftest.c
2125cp conftest.a conftest2.a
2126$RANLIB conftest.a
2127if cmp -s conftest.a conftest2.a; then
2128 libc_cv_ranlib_necessary=no
f38931a9 2129else
f89ac85c 2130 libc_cv_ranlib_necessary=yes
f38931a9 2131fi
f89ac85c 2132rm -rf conftest*
f38931a9
UD
2133fi
2134
f89ac85c
UD
2135echo "$ac_t""$libc_cv_ranlib_necessary" 1>&6
2136if test "$libc_cv_ranlib_necessary" = no; then
2137 RANLIB=:
2138fi
f38931a9 2139
3911660e
UD
2140# Test if LD_LIBRARY_PATH contains the notation for the current directory
2141# since this would lead to problems installing/building glibc.
2142# LD_LIBRARY_PATH contains the current directory if one of the following
2143# is true:
2144# - one of the terminals (":" and ";") is the first or last sign
2145# - two terminals occur directly after each other
2146# - the path contains an element with a dot in it
2147echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6
3172f58f 2148echo "configure:2149: checking LD_LIBRARY_PATH variable" >&5
3911660e
UD
2149case ${LD_LIBRARY_PATH} in
2150 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
b3a86ae1 2151 ld_library_path_setting="contains current directory"
3911660e
UD
2152 ;;
2153 *)
2154 ld_library_path_setting="ok"
2155 ;;
2156esac
2157echo "$ac_t""$ld_library_path_setting" 1>&6
2158if test "$ld_library_path_setting" != "ok"; then
63bda0c1
UD
2159{ echo "configure: error:
2160*** LD_LIBRARY_PATH shouldn't contain the current directory when
2161*** building glibc. Please change the environment variable
2162*** and run configure again." 1>&2; exit 1; }
3911660e
UD
2163fi
2164
74bd2300 2165echo $ac_n "checking whether GCC supports -static-libgcc""... $ac_c" 1>&6
3172f58f 2166echo "configure:2167: checking whether GCC supports -static-libgcc" >&5
74bd2300
UD
2167if eval "test \"`echo '$''{'libc_cv_gcc_static_libgcc'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2169else
2170 if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then
2171 libc_cv_gcc_static_libgcc=
2172else
2173 libc_cv_gcc_static_libgcc=-static-libgcc
2174fi
2175fi
2176
2177echo "$ac_t""$libc_cv_gcc_static_libgcc" 1>&6
2178
2179
cd6ede75
UD
2180# Extract the first word of "bash", so it can be a program name with args.
2181set dummy bash; ac_word=$2
2182echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2183echo "configure:2184: checking for $ac_word" >&5
a808d541 2184if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
cd6ede75
UD
2185 echo $ac_n "(cached) $ac_c" 1>&6
2186else
2187 case "$BASH" in
2188 /*)
2189 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
2190 ;;
5c2a0669
UD
2191 ?:/*)
2192 ac_cv_path_BASH="$BASH" # Let the user override the test with a dos path.
2193 ;;
cd6ede75 2194 *)
5c2a0669
UD
2195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2196 ac_dummy="$PATH"
2197 for ac_dir in $ac_dummy; do
cd6ede75
UD
2198 test -z "$ac_dir" && ac_dir=.
2199 if test -f $ac_dir/$ac_word; then
2200 ac_cv_path_BASH="$ac_dir/$ac_word"
2201 break
2202 fi
2203 done
2204 IFS="$ac_save_ifs"
2205 test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no"
2206 ;;
2207esac
2208fi
2209BASH="$ac_cv_path_BASH"
2210if test -n "$BASH"; then
2211 echo "$ac_t""$BASH" 1>&6
2212else
2213 echo "$ac_t""no" 1>&6
2214fi
2215
2216if test "$BASH" != no &&
f43ce637 2217 $BASH -c 'test "$BASH_VERSINFO" \
6973fc01 2218 && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
cd6ede75
UD
2219 libc_cv_have_bash2=yes
2220else
2221 libc_cv_have_bash2=no
2222fi
2223
2224
2225if test "$BASH" = no; then
2226 # Extract the first word of "ksh", so it can be a program name with args.
2227set dummy ksh; ac_word=$2
2228echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2229echo "configure:2230: checking for $ac_word" >&5
a808d541 2230if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
cd6ede75
UD
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233 case "$KSH" in
2234 /*)
2235 ac_cv_path_KSH="$KSH" # Let the user override the test with a path.
2236 ;;
5c2a0669
UD
2237 ?:/*)
2238 ac_cv_path_KSH="$KSH" # Let the user override the test with a dos path.
2239 ;;
cd6ede75 2240 *)
5c2a0669
UD
2241 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2242 ac_dummy="$PATH"
2243 for ac_dir in $ac_dummy; do
cd6ede75
UD
2244 test -z "$ac_dir" && ac_dir=.
2245 if test -f $ac_dir/$ac_word; then
2246 ac_cv_path_KSH="$ac_dir/$ac_word"
2247 break
2248 fi
2249 done
2250 IFS="$ac_save_ifs"
2251 test -z "$ac_cv_path_KSH" && ac_cv_path_KSH="no"
2252 ;;
2253esac
2254fi
2255KSH="$ac_cv_path_KSH"
2256if test -n "$KSH"; then
2257 echo "$ac_t""$KSH" 1>&6
2258else
2259 echo "$ac_t""no" 1>&6
2260fi
2261
2262 if test "$KSH" = no; then
2263 libc_cv_have_ksh=no
2264 else
2265 libc_cv_have_ksh=yes
2266 fi
2267else
2268 KSH="$BASH"
2269
2270 libc_cv_have_ksh=yes
2271fi
2272
2273
a8c01776 2274for ac_prog in gawk mawk nawk awk
a2b08ee5
UD
2275do
2276# Extract the first word of "$ac_prog", so it can be a program name with args.
2277set dummy $ac_prog; ac_word=$2
2278echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2279echo "configure:2280: checking for $ac_word" >&5
a808d541 2280if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
5aa8ff62
UD
2281 echo $ac_n "(cached) $ac_c" 1>&6
2282else
2283 if test -n "$AWK"; then
2284 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2285else
5c2a0669
UD
2286 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2287 ac_dummy="$PATH"
2288 for ac_dir in $ac_dummy; do
5aa8ff62
UD
2289 test -z "$ac_dir" && ac_dir=.
2290 if test -f $ac_dir/$ac_word; then
2291 ac_cv_prog_AWK="$ac_prog"
2292 break
2293 fi
2294 done
2295 IFS="$ac_save_ifs"
2296fi
2297fi
2298AWK="$ac_cv_prog_AWK"
2299if test -n "$AWK"; then
2300 echo "$ac_t""$AWK" 1>&6
2301else
2302 echo "$ac_t""no" 1>&6
2303fi
2304
2305test -n "$AWK" && break
2306done
2307
c0016081
UD
2308# Extract the first word of "perl", so it can be a program name with args.
2309set dummy perl; ac_word=$2
5aa8ff62 2310echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2311echo "configure:2312: checking for $ac_word" >&5
a808d541 2312if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
a2b08ee5
UD
2313 echo $ac_n "(cached) $ac_c" 1>&6
2314else
2315 case "$PERL" in
2316 /*)
2317 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2318 ;;
5c2a0669
UD
2319 ?:/*)
2320 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2321 ;;
a2b08ee5 2322 *)
5c2a0669
UD
2323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2324 ac_dummy="$PATH"
2325 for ac_dir in $ac_dummy; do
a2b08ee5
UD
2326 test -z "$ac_dir" && ac_dir=.
2327 if test -f $ac_dir/$ac_word; then
2328 ac_cv_path_PERL="$ac_dir/$ac_word"
2329 break
2330 fi
2331 done
2332 IFS="$ac_save_ifs"
c0016081 2333 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
a2b08ee5
UD
2334 ;;
2335esac
2336fi
2337PERL="$ac_cv_path_PERL"
2338if test -n "$PERL"; then
2339 echo "$ac_t""$PERL" 1>&6
2340else
2341 echo "$ac_t""no" 1>&6
2342fi
2343
2fd5d029
RM
2344if test "$PERL" != no &&
2345 (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
2346 PERL=no
fc304e02 2347fi
c0016081
UD
2348# Extract the first word of "install-info", so it can be a program name with args.
2349set dummy install-info; ac_word=$2
2350echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2351echo "configure:2352: checking for $ac_word" >&5
a808d541 2352if eval "test \"`echo '$''{'ac_cv_path_INSTALL_INFO'+set}'`\" = set"; then
c0016081
UD
2353 echo $ac_n "(cached) $ac_c" 1>&6
2354else
2355 case "$INSTALL_INFO" in
2356 /*)
2357 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
2358 ;;
5c2a0669
UD
2359 ?:/*)
2360 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a dos path.
2361 ;;
c0016081 2362 *)
5c2a0669 2363 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9f2a9248 2364 ac_dummy="$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
5c2a0669 2365 for ac_dir in $ac_dummy; do
c0016081
UD
2366 test -z "$ac_dir" && ac_dir=.
2367 if test -f $ac_dir/$ac_word; then
2368 ac_cv_path_INSTALL_INFO="$ac_dir/$ac_word"
2369 break
2370 fi
2371 done
2372 IFS="$ac_save_ifs"
2373 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO="no"
2374 ;;
2375esac
2376fi
2377INSTALL_INFO="$ac_cv_path_INSTALL_INFO"
2378if test -n "$INSTALL_INFO"; then
2379 echo "$ac_t""$INSTALL_INFO" 1>&6
2380else
2381 echo "$ac_t""no" 1>&6
2382fi
2383
c0016081
UD
2384if test "$INSTALL_INFO" != "no"; then
2385echo $ac_n "checking for old Debian install-info""... $ac_c" 1>&6
3172f58f 2386echo "configure:2387: checking for old Debian install-info" >&5
a808d541 2387if eval "test \"`echo '$''{'libc_cv_old_debian_install_info'+set}'`\" = set"; then
c0016081
UD
2388 echo $ac_n "(cached) $ac_c" 1>&6
2389else
2390 mkdir conftest.d
2391 # There is a hard ^_ on the next line. I am open to better ideas.
2392 (echo '\1f'
2393 echo 'File: dir Node: Top This is the top of the INFO tree'
2394 echo '* Menu:') >conftest.d/dir
2395 (echo 'INFO-DIR-SECTION i-d-s works'
2396 echo 'START-INFO-DIR-ENTRY'
2397 echo '* Prog: (prog). Program.'
2398 echo 'END-INFO-DIR-ENTRY') >conftest.d/prog.info
2399 if $INSTALL_INFO --info-dir=conftest.d conftest.d/prog.info >&5 2>&1
d8cceb4f 2400 then
c0016081
UD
2401 if grep -s 'i-d-s works' conftest.d/dir >/dev/null
2402 then libc_cv_old_debian_install_info=no
2403 else libc_cv_old_debian_install_info=yes
2404 fi
2405 else libc_cv_old_debian_install_info=no testfailed=t
2406 fi
2407 rm -fr conftest.d
2408fi
2409
2410echo "$ac_t""$libc_cv_old_debian_install_info" 1>&6
2411if test -n "$testfailed"
2412then echo "configure: warning: install-info errored out, check config.log" 1>&2
2413fi
2414OLD_DEBIAN_INSTALL_INFO=$libc_cv_old_debian_install_info
2415fi
a2b08ee5
UD
2416
2417
ae113383
UD
2418# Extract the first word of "bison", so it can be a program name with args.
2419set dummy bison; ac_word=$2
2420echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172f58f 2421echo "configure:2422: checking for $ac_word" >&5
ae113383
UD
2422if eval "test \"`echo '$''{'ac_cv_path_BISON'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2424else
2425 case "$BISON" in
2426 /*)
2427 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
2428 ;;
2429 ?:/*)
2430 ac_cv_path_BISON="$BISON" # Let the user override the test with a dos path.
2431 ;;
2432 *)
2433 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2434 ac_dummy="$PATH:/usr/local/bin:/usr/bin:/bin"
2435 for ac_dir in $ac_dummy; do
2436 test -z "$ac_dir" && ac_dir=.
2437 if test -f $ac_dir/$ac_word; then
2438 ac_cv_path_BISON="$ac_dir/$ac_word"
2439 break
2440 fi
2441 done
2442 IFS="$ac_save_ifs"
2443 test -z "$ac_cv_path_BISON" && ac_cv_path_BISON="no"
2444 ;;
2445esac
2446fi
2447BISON="$ac_cv_path_BISON"
2448if test -n "$BISON"; then
2449 echo "$ac_t""$BISON" 1>&6
2450else
2451 echo "$ac_t""no" 1>&6
2452fi
2453
2454
cd6ede75 2455echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
3172f58f 2456echo "configure:2457: checking for signed size_t type" >&5
a808d541 2457if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
cd6ede75
UD
2458 echo $ac_n "(cached) $ac_c" 1>&6
2459else
2460 echo '#include <stddef.h>
2461FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
2462if eval "$ac_cpp conftest.c 2>/dev/null" \
2463| grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null; then
2464 libc_cv_signed_size_t=no
2465else
2466 libc_cv_signed_size_t=yes
2467fi
2468rm -f conftest*
2469fi
2470
2471echo "$ac_t""$libc_cv_signed_size_t" 1>&6
2472if test $libc_cv_signed_size_t = yes; then
2473 cat >> confdefs.h <<\EOF
2474#undef __SIZE_TYPE__
2475#define __SIZE_TYPE__ unsigned
2476EOF
2477fi
2478
2479echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
3172f58f 2480echo "configure:2481: checking for libc-friendly stddef.h" >&5
a808d541 2481if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
cd6ede75
UD
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483else
2484 cat > conftest.$ac_ext <<EOF
3172f58f 2485#line 2486 "configure"
cd6ede75
UD
2486#include "confdefs.h"
2487#define __need_size_t
2488#define __need_wchar_t
2489#include <stddef.h>
2490#define __need_NULL
2491#include <stddef.h>
2492int main() {
2493size_t size; wchar_t wchar;
2494#ifdef offsetof
2495#error stddef.h ignored __need_*
2496#endif
2497if (&size == NULL || &wchar == NULL) abort ();
2498; return 0; }
2499EOF
3172f58f 2500if { (eval echo configure:2501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cd6ede75
UD
2501 rm -rf conftest*
2502 libc_cv_friendly_stddef=yes
2503else
2504 echo "configure: failed program was:" >&5
2505 cat conftest.$ac_ext >&5
2506 rm -rf conftest*
2507 libc_cv_friendly_stddef=no
2508fi
2509rm -f conftest*
2510fi
2511
2512echo "$ac_t""$libc_cv_friendly_stddef" 1>&6
2513if test $libc_cv_friendly_stddef = yes; then
2514 config_vars="$config_vars
2515override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
2516fi
2517
2518echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
3172f58f 2519echo "configure:2520: checking whether we need to use -P to assemble .S files" >&5
a808d541 2520if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
cd6ede75
UD
2521 echo $ac_n "(cached) $ac_c" 1>&6
2522else
2523 cat > conftest.S <<EOF
2524#include "confdefs.h"
2525/* Nothing whatsoever. */
2526EOF
2527if ${CC-cc} $CFLAGS -c conftest.S 2>/dev/null; then
2528 libc_cv_need_minus_P=no
2529else
2530 libc_cv_need_minus_P=yes
2531fi
2532rm -f conftest*
2533fi
2534
2535echo "$ac_t""$libc_cv_need_minus_P" 1>&6
2536if test $libc_cv_need_minus_P = yes; then
2537 config_vars="$config_vars
2538asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
2539fi
2540
2293395f 2541echo $ac_n "checking whether .text pseudo-op must be used""... $ac_c" 1>&6
3172f58f 2542echo "configure:2543: checking whether .text pseudo-op must be used" >&5
a808d541 2543if eval "test \"`echo '$''{'libc_cv_dot_text'+set}'`\" = set"; then
2293395f
UD
2544 echo $ac_n "(cached) $ac_c" 1>&6
2545else
2546 cat > conftest.s <<EOF
2547.text
2548EOF
2549libc_cv_dot_text=
2550if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
2551 libc_cv_dot_text=.text
2552fi
2553rm -f conftest*
2554fi
2555
2556if test -z "$libc_cv_dot_text"; then
2557 echo "$ac_t""no" 1>&6
2558else
2559 echo "$ac_t""yes" 1>&6
2560fi
2561
cd6ede75 2562echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
3172f58f 2563echo "configure:2564: checking for assembler global-symbol directive" >&5
a808d541 2564if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
cd6ede75
UD
2565 echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567 libc_cv_asm_global_directive=UNKNOWN
908c3d5b 2568for ac_globl in .globl .global .EXPORT; do
cd6ede75 2569 cat > conftest.s <<EOF
2293395f 2570 ${libc_cv_dot_text}
908c3d5b 2571 ${ac_globl} foo
cd6ede75
UD
2572foo:
2573EOF
2574 if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
2575 libc_cv_asm_global_directive=${ac_globl}
2576 fi
2577 rm -f conftest*
2578 test $libc_cv_asm_global_directive != UNKNOWN && break
2579done
2580fi
2581
2582echo "$ac_t""$libc_cv_asm_global_directive" 1>&6
2583if test $libc_cv_asm_global_directive = UNKNOWN; then
2584 { echo "configure: error: cannot determine asm global directive" 1>&2; exit 1; }
2585else
2586 cat >> confdefs.h <<EOF
2587#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
2588EOF
2589
2590fi
2591
2592echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
3172f58f 2593echo "configure:2594: checking for .set assembler directive" >&5
a808d541 2594if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
cd6ede75
UD
2595 echo $ac_n "(cached) $ac_c" 1>&6
2596else
2597 cat > conftest.s <<EOF
2293395f 2598${libc_cv_dot_text}
cd6ede75
UD
2599foo:
2600.set glibc_conftest_frobozz,foo
2601$libc_cv_asm_global_directive glibc_conftest_frobozz
2602EOF
2603# The alpha-dec-osf1 assembler gives only a warning for `.set'
2604# (but it doesn't work), so we must do a linking check to be sure.
2605cat > conftest1.c <<\EOF
2606extern int glibc_conftest_frobozz;
2607main () { printf ("%d\n", glibc_conftest_frobozz); }
2608EOF
2609if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
2610 -o conftest conftest.s conftest1.c 1>&5 2>&5; then
2611 libc_cv_asm_set_directive=yes
2612else
2613 libc_cv_asm_set_directive=no
2614fi
2615rm -f conftest*
2616fi
2617
2618echo "$ac_t""$libc_cv_asm_set_directive" 1>&6
2619if test $libc_cv_asm_set_directive = yes; then
2620 cat >> confdefs.h <<\EOF
2621#define HAVE_ASM_SET_DIRECTIVE 1
2622EOF
2623
2624fi
2625
2aa15430
UD
2626# The Aix ld uses global .symbol_names instead of symbol_names.
2627case "$os" in
2628aix4.3*)
2629 cat >> confdefs.h <<\EOF
2630#define HAVE_ASM_GLOBAL_DOT_NAME 1
2631EOF
2632
2633esac
2634
cd6ede75 2635echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
3172f58f 2636echo "configure:2637: checking for .symver assembler directive" >&5
a808d541 2637if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
cd6ede75
UD
2638 echo $ac_n "(cached) $ac_c" 1>&6
2639else
2640 cat > conftest.s <<EOF
2293395f 2641${libc_cv_dot_text}
cd6ede75
UD
2642_sym:
2643.symver _sym,sym@VERS
2644EOF
2645if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
2646 libc_cv_asm_symver_directive=yes
2647else
2648 libc_cv_asm_symver_directive=no
2649fi
2650rm -f conftest*
2651fi
2652
2653echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
2654echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
3172f58f 2655echo "configure:2656: checking for ld --version-script" >&5
a808d541 2656if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
cd6ede75
UD
2657 echo $ac_n "(cached) $ac_c" 1>&6
2658else
2659 if test $libc_cv_asm_symver_directive = yes; then
2660 cat > conftest.s <<EOF
2293395f 2661${libc_cv_dot_text}
cd6ede75
UD
2662_sym:
2663.symver _sym,sym@VERS
2664EOF
2665 cat > conftest.map <<EOF
f43ce637 2666VERS_1 {
cd6ede75
UD
2667 global: sym;
2668};
f43ce637
UD
2669
2670VERS_2 {
2671 global: sym;
2672} VERS_1;
cd6ede75
UD
2673EOF
2674 if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
2675 if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
2676 -nostartfiles -nostdlib
2677 -Wl,--version-script,conftest.map
3172f58f 2678 1>&5'; { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
cd6ede75
UD
2679 then
2680 libc_cv_ld_version_script_option=yes
2681 else
2682 libc_cv_ld_version_script_option=no
2683 fi
2684 else
2685 libc_cv_ld_version_script_option=no
2686 fi
2687else
2688 libc_cv_ld_version_script_option=no
2689fi
2690rm -f conftest*
2691fi
2692
2693echo "$ac_t""$libc_cv_ld_version_script_option" 1>&6
7499a22a
RM
2694if test $shared != no &&
2695 test $libc_cv_asm_symver_directive = yes &&
650425ce
UD
2696 test $libc_cv_ld_version_script_option = yes &&
2697 test $enable_versioning = yes; then
cd6ede75
UD
2698 VERSIONING=yes
2699 cat >> confdefs.h <<\EOF
2700#define DO_VERSIONING 1
2701EOF
2702
2703else
2704 VERSIONING=no
2705fi
2706
2707
22af13de 2708if test $elf = yes && test $shared != no && test $VERSIONING = no; then
f43ce637 2709 echo "\
f4017d20 2710*** WARNING: You should not compile GNU libc without versioning. Not using
f43ce637
UD
2711*** versioning will introduce incompatibilities so that old binaries
2712*** will not run anymore.
08a0d60a 2713*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
f43ce637 2714fi
cd6ede75
UD
2715if test $elf = yes; then
2716 echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
3172f58f 2717echo "configure:2718: checking for .previous assembler directive" >&5
a808d541 2718if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
cd6ede75
UD
2719 echo $ac_n "(cached) $ac_c" 1>&6
2720else
2721 cat > conftest.s <<EOF
2722.section foo_section
2723.previous
2724EOF
3172f58f 2725 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
2726 libc_cv_asm_previous_directive=yes
2727 else
2728 libc_cv_asm_previous_directive=no
2729 fi
2730 rm -f conftest*
2731fi
2732
2733echo "$ac_t""$libc_cv_asm_previous_directive" 1>&6
2734 if test $libc_cv_asm_previous_directive = yes; then
2735 cat >> confdefs.h <<\EOF
2736#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
2737EOF
2738
2739 else
2740 echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
3172f58f 2741echo "configure:2742: checking for .popsection assembler directive" >&5
a808d541 2742if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
cd6ede75
UD
2743 echo $ac_n "(cached) $ac_c" 1>&6
2744else
2745 cat > conftest.s <<EOF
2746.pushsection foo_section
2747.popsection
2748EOF
3172f58f 2749 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
2750 libc_cv_asm_popsection_directive=yes
2751 else
2752 libc_cv_asm_popsection_directive=no
2753 fi
2754 rm -f conftest*
2755fi
2756
2757echo "$ac_t""$libc_cv_asm_popsection_directive" 1>&6
2758 if test $libc_cv_asm_popsection_directive = yes; then
2759 cat >> confdefs.h <<\EOF
2760#define HAVE_ASM_POPSECTION_DIRECTIVE 1
2761EOF
2762
2763 fi
2764 fi
2d499f55 2765 echo $ac_n "checking for .protected and .hidden assembler directive""... $ac_c" 1>&6
3172f58f 2766echo "configure:2767: checking for .protected and .hidden assembler directive" >&5
2d499f55
UD
2767if eval "test \"`echo '$''{'libc_cv_asm_protected_directive'+set}'`\" = set"; then
2768 echo $ac_n "(cached) $ac_c" 1>&6
2769else
2770 cat > conftest.s <<EOF
2771.protected foo
2772foo:
2773.hidden bar
2774bar:
2775EOF
3172f58f 2776 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2d499f55
UD
2777 libc_cv_asm_protected_directive=yes
2778 else
2779 libc_cv_asm_protected_directive=no
2780 fi
2781 rm -f conftest*
2782fi
2783
2784echo "$ac_t""$libc_cv_asm_protected_directive" 1>&6
2785
5688da55
UD
2786 cat >> confdefs.h <<\EOF
2787#define HAVE_PROTECTED 1
2788EOF
2789
9bd64602
UD
2790 cat >> confdefs.h <<\EOF
2791#define HAVE_HIDDEN 1
2792EOF
2793
2f54c82d 2794
0d01dace
UD
2795 if test $libc_cv_asm_protected_directive = yes; then
2796 echo $ac_n "checking whether __attribute__((visibility())) is supported""... $ac_c" 1>&6
3172f58f 2797echo "configure:2798: checking whether __attribute__((visibility())) is supported" >&5
0d01dace
UD
2798if eval "test \"`echo '$''{'libc_cv_visibility_attribute'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
2800else
2801 cat > conftest.c <<EOF
2802 int foo __attribute__ ((visibility ("hidden"))) = 1;
2803 int bar __attribute__ ((visibility ("protected"))) = 1;
2804EOF
2805 libc_cv_visibility_attribute=no
2806 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2807 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2808 if grep '\.protected.*bar' conftest.s >/dev/null; then
2809 libc_cv_visibility_attribute=yes
2810 fi
2811 fi
2812 fi
2813 rm -f conftest.cs
2814
2815fi
2816
2817echo "$ac_t""$libc_cv_visibility_attribute" 1>&6
2818 if test $libc_cv_visibility_attribute = yes; then
2819 cat >> confdefs.h <<\EOF
2820#define HAVE_VISIBILITY_ATTRIBUTE 1
2821EOF
2822
2823 fi
2824 fi
2825
37ba7d66
UD
2826 if test $libc_cv_visibility_attribute = yes; then
2827 echo $ac_n "checking for broken __attribute__((visibility()))""... $ac_c" 1>&6
2828echo "configure:2829: checking for broken __attribute__((visibility()))" >&5
2829if eval "test \"`echo '$''{'libc_cv_broken_visibility_attribute'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
2831else
2832 cat > conftest.c <<EOF
2833 int foo (int x);
2834 int bar (int x) __asm__ ("foo") __attribute__ ((visibility ("hidden")));
2835 int bar (int x) { return x; }
2836EOF
2837 libc_cv_broken_visibility_attribute=yes
2838 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2839 if grep '\.hidden[ _]foo' conftest.s >/dev/null; then
2840 libc_cv_broken_visibility_attribute=no
2841 fi
2842 fi
2843 rm -f conftest.c conftest.s
2844
2845fi
2846
2847echo "$ac_t""$libc_cv_broken_visibility_attribute" 1>&6
2848 if test $libc_cv_broken_visibility_attribute = yes; then
2849 cat >> confdefs.h <<\EOF
2850#define HAVE_BROKEN_VISIBILITY_ATTRIBUTE 1
2851EOF
2852
2853 fi
2854 fi
2855
2856 echo $ac_n "checking for broken __attribute__((alias()))""... $ac_c" 1>&6
2857echo "configure:2858: checking for broken __attribute__((alias()))" >&5
2858if eval "test \"`echo '$''{'libc_cv_broken_alias_attribute'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860else
2861 cat > conftest.c <<EOF
2862 extern int foo (int x) __asm ("xyzzy");
2863 int bar (int x) { return x; }
48b8e846
UD
2864 extern __typeof (bar) foo __attribute ((weak, alias ("bar")));
2865 extern int dfoo;
2866 extern __typeof (dfoo) dfoo __asm ("abccb");
2867 int dfoo = 1;
37ba7d66
UD
2868EOF
2869 libc_cv_broken_alias_attribute=yes
2870 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
48b8e846
UD
2871 if grep 'xyzzy' conftest.s >/dev/null &&
2872 grep 'abccb' conftest.s >/dev/null; then
37ba7d66
UD
2873 libc_cv_broken_alias_attribute=no
2874 fi
2875 fi
2876 rm -f conftest.c conftest.s
2877
2878fi
2879
2880echo "$ac_t""$libc_cv_broken_alias_attribute" 1>&6
2881 if test $libc_cv_broken_alias_attribute = yes; then
2882 cat >> confdefs.h <<\EOF
2883#define HAVE_BROKEN_ALIAS_ATTRIBUTE 1
2884EOF
2885
2886 fi
2887
0d01dace
UD
2888 if test $libc_cv_visibility_attribute = yes -a $gnu_ld = yes; then
2889 echo $ac_n "checking whether to put _rtld_local into .sdata section""... $ac_c" 1>&6
48b8e846 2890echo "configure:2891: checking whether to put _rtld_local into .sdata section" >&5
0d01dace
UD
2891if eval "test \"`echo '$''{'libc_cv_have_sdata_section'+set}'`\" = set"; then
2892 echo $ac_n "(cached) $ac_c" 1>&6
2893else
2894 echo "int i;" > conftest.c
2895 libc_cv_have_sdata_section=no
2896 if ${CC-cc} -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
2897 | grep '\.sdata' >/dev/null; then
2898 libc_cv_have_sdata_section=yes
2899 fi
2900 rm -f conftest.c conftest.so
2901
2902fi
2903
2904echo "$ac_t""$libc_cv_have_sdata_section" 1>&6
2905 if test $libc_cv_have_sdata_section = yes; then
2906 cat >> confdefs.h <<\EOF
2907#define HAVE_SDATA_SECTION 1
2908EOF
2909
2910 fi
2911 fi
2912
2c617417 2913 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
48b8e846 2914echo "configure:2915: checking for .preinit_array/.init_array/.fini_array support" >&5
2c617417
UD
2915if eval "test \"`echo '$''{'libc_cv_initfinit_array'+set}'`\" = set"; then
2916 echo $ac_n "(cached) $ac_c" 1>&6
2917else
2918 cat > conftest.c <<EOF
2919int _start (void) { return 0; }
2920int __start (void) { return 0; }
2921int foo (void) { return 1; }
2922int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
2923EOF
2924 if { ac_try='${CC-cc} -o conftest conftest.c
48b8e846 2925 -static -nostartfiles -nostdlib 1>&5'; { (eval echo configure:2926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2c617417
UD
2926 then
2927 if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
2928 libc_cv_initfinit_array=yes
2929 else
2930 libc_cv_initfinit_array=no
2931 fi
2932 else
2933 libc_cv_initfinit_array=no
2934 fi
2935 rm -f conftest*
2936fi
2937
2938echo "$ac_t""$libc_cv_initfinit_array" 1>&6
2939
2940 if test $libc_cv_initfinit_array = yes; then
2941 cat >> confdefs.h <<\EOF
2942#define HAVE_INITFINI_ARRAY 1
2943EOF
2944
2945 fi
2946
2f54c82d 2947 echo $ac_n "checking for -z nodelete option""... $ac_c" 1>&6
48b8e846 2948echo "configure:2949: checking for -z nodelete option" >&5
2f54c82d
UD
2949if eval "test \"`echo '$''{'libc_cv_z_nodelete'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
2951else
2952 cat > conftest.c <<EOF
2953int _start (void) { return 42; }
2954EOF
35cd3c97
AJ
2955 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c
2956 -nostartfiles -nostdlib
48b8e846 2957 -Wl,--enable-new-dtags,-z,nodelete 1>&5'; { (eval echo configure:2958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2f54c82d
UD
2958 then
2959 libc_cv_z_nodelete=yes
2960 else
2961 libc_cv_z_nodelete=no
2962 fi
2963 rm -f conftest*
2964fi
2965
2966echo "$ac_t""$libc_cv_z_nodelete" 1>&6
2967
2968
2969 echo $ac_n "checking for -z nodlopen option""... $ac_c" 1>&6
48b8e846 2970echo "configure:2971: checking for -z nodlopen option" >&5
2f54c82d
UD
2971if eval "test \"`echo '$''{'libc_cv_z_nodlopen'+set}'`\" = set"; then
2972 echo $ac_n "(cached) $ac_c" 1>&6
2973else
2974 cat > conftest.c <<EOF
2975int _start (void) { return 42; }
2976EOF
35cd3c97
AJ
2977 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c
2978 -nostartfiles -nostdlib
48b8e846 2979 -Wl,--enable-new-dtags,-z,nodlopen 1>&5'; { (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2f54c82d
UD
2980 then
2981 libc_cv_z_nodlopen=yes
2982 else
2983 libc_cv_z_nodlopen=no
2984 fi
2985 rm -f conftest*
2986fi
2987
2988echo "$ac_t""$libc_cv_z_nodlopen" 1>&6
2989
5d916713
UD
2990
2991 echo $ac_n "checking for -z initfirst option""... $ac_c" 1>&6
48b8e846 2992echo "configure:2993: checking for -z initfirst option" >&5
5d916713
UD
2993if eval "test \"`echo '$''{'libc_cv_z_initfirst'+set}'`\" = set"; then
2994 echo $ac_n "(cached) $ac_c" 1>&6
2995else
2996 cat > conftest.c <<EOF
2997int _start (void) { return 42; }
2998EOF
35cd3c97
AJ
2999 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c
3000 -nostartfiles -nostdlib
48b8e846 3001 -Wl,--enable-new-dtags,-z,initfirst 1>&5'; { (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
5d916713
UD
3002 then
3003 libc_cv_z_initfirst=yes
3004 else
3005 libc_cv_z_initfirst=no
3006 fi
3007 rm -f conftest*
3008fi
3009
3010echo "$ac_t""$libc_cv_z_initfirst" 1>&6
3011
639c3248
UD
3012
3013 echo $ac_n "checking for -Bgroup option""... $ac_c" 1>&6
48b8e846 3014echo "configure:3015: checking for -Bgroup option" >&5
639c3248
UD
3015if eval "test \"`echo '$''{'libc_cv_Bgroup'+set}'`\" = set"; then
3016 echo $ac_n "(cached) $ac_c" 1>&6
3017else
3018 cat > conftest.c <<EOF
3019int _start (void) { return 42; }
3020EOF
48b8e846 3021 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5'; { (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
639c3248
UD
3022 then
3023 libc_cv_Bgroup=yes
3024 else
3025 libc_cv_Bgroup=no
3026 fi
3027 rm -f conftest*
3028fi
3029
3030echo "$ac_t""$libc_cv_Bgroup" 1>&6
3031
a711b01d
UD
3032
3033 echo $ac_n "checking for -z combreloc""... $ac_c" 1>&6
48b8e846 3034echo "configure:3035: checking for -z combreloc" >&5
a711b01d
UD
3035if eval "test \"`echo '$''{'libc_cv_z_combreloc'+set}'`\" = set"; then
3036 echo $ac_n "(cached) $ac_c" 1>&6
3037else
3038 cat > conftest.c <<EOF
d555194c
UD
3039extern int bar (int);
3040extern int mumble;
3041int foo (void) { return bar (mumble); }
a711b01d 3042EOF
35cd3c97
AJ
3043 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c
3044 -nostdlib -nostartfiles
48b8e846 3045 -Wl,-z,combreloc 1>&5'; { (eval echo configure:3046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
a711b01d 3046 then
fdde8349
UD
3047 if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
3048 libc_cv_z_combreloc=yes
3049 else
3050 libc_cv_z_combreloc=no
a711b01d 3051 fi
fdde8349
UD
3052 else
3053 libc_cv_z_combreloc=no
a711b01d
UD
3054 fi
3055 rm -f conftest*
3056fi
3057
3058echo "$ac_t""$libc_cv_z_combreloc" 1>&6
fdde8349
UD
3059 if test "$libc_cv_z_combreloc" = yes; then
3060 cat >> confdefs.h <<\EOF
3061#define HAVE_Z_COMBRELOC 1
3062EOF
3063
3064 fi
cd6ede75
UD
3065fi
3066
f13df7c7 3067
cd6ede75
UD
3068if test $elf != yes; then
3069 echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
48b8e846 3070echo "configure:3071: checking for .init and .fini sections" >&5
a808d541 3071if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
cd6ede75
UD
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073else
3074 cat > conftest.$ac_ext <<EOF
48b8e846 3075#line 3076 "configure"
cd6ede75
UD
3076#include "confdefs.h"
3077
3078int main() {
3079asm (".section .init");
3080 asm (".section .fini");
2293395f 3081 asm ("${libc_cv_dot_text}");
cd6ede75
UD
3082; return 0; }
3083EOF
48b8e846 3084if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cd6ede75
UD
3085 rm -rf conftest*
3086 libc_cv_have_initfini=yes
3087else
3088 echo "configure: failed program was:" >&5
3089 cat conftest.$ac_ext >&5
3090 rm -rf conftest*
3091 libc_cv_have_initfini=no
3092fi
3093rm -f conftest*
3094fi
3095
3096echo "$ac_t""$libc_cv_have_initfini" 1>&6
3097 if test $libc_cv_have_initfini = yes; then
3098 cat >> confdefs.h <<\EOF
3099#define HAVE_INITFINI 1
3100EOF
3101
3102 fi
3103fi
3104
e26dd47f
UD
3105if test $elf = yes -a $gnu_ld = yes; then
3106 echo $ac_n "checking whether cc puts quotes around section names""... $ac_c" 1>&6
48b8e846 3107echo "configure:3108: checking whether cc puts quotes around section names" >&5
e26dd47f
UD
3108if eval "test \"`echo '$''{'libc_cv_have_section_quotes'+set}'`\" = set"; then
3109 echo $ac_n "(cached) $ac_c" 1>&6
3110else
3111 cat > conftest.c <<EOF
3112 static const int foo
3113 __attribute__ ((section ("bar"))) = 1;
3114EOF
3115 if ${CC-cc} -S conftest.c -o conftest.s; then
3116 if grep '\.section.*"bar"' conftest.s >/dev/null; then
3117 libc_cv_have_section_quotes=yes
3118 else
3119 libc_cv_have_section_quotes=no
3120 fi
3121 else
3122 libc_cv_have_section_quotes=unknown
3123 fi
3124 rm -f conftest.cs
3125
3126fi
3127
3128echo "$ac_t""$libc_cv_have_section_quotes" 1>&6
3129 if test $libc_cv_have_section_quotes = yes; then
3130 cat >> confdefs.h <<\EOF
3131#define HAVE_SECTION_QUOTES 1
3132EOF
3133
3134 fi
3135fi
3136
9a0a462c
UD
3137
3138
cd6ede75
UD
3139if test $elf = yes; then
3140 libc_cv_asm_underscores=no
3141else
9a0a462c
UD
3142 if test $ac_cv_prog_cc_works = yes; then
3143 echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
48b8e846 3144echo "configure:3145: checking for _ prefix on C symbol names" >&5
a808d541 3145if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
cd6ede75
UD
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 cat > conftest.$ac_ext <<EOF
48b8e846 3149#line 3150 "configure"
cd6ede75
UD
3150#include "confdefs.h"
3151asm ("_glibc_foobar:");
3152int main() {
3153glibc_foobar ();
3154; return 0; }
3155EOF
48b8e846 3156if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cd6ede75
UD
3157 rm -rf conftest*
3158 libc_cv_asm_underscores=yes
3159else
3160 echo "configure: failed program was:" >&5
3161 cat conftest.$ac_ext >&5
3162 rm -rf conftest*
3163 libc_cv_asm_underscores=no
3164fi
3165rm -f conftest*
3166fi
3167
3168echo "$ac_t""$libc_cv_asm_underscores" 1>&6
9a0a462c
UD
3169 else
3170 echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
48b8e846 3171echo "configure:3172: checking for _ prefix on C symbol names" >&5
a808d541 3172if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
9a0a462c
UD
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174else
3175 cat > conftest.$ac_ext <<EOF
48b8e846 3176#line 3177 "configure"
9a0a462c
UD
3177#include "confdefs.h"
3178void underscore_test(void) {
3179return; }
3180EOF
48b8e846 3181if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9a0a462c
UD
3182 if grep _underscore_test conftest* >/dev/null; then
3183 rm -f conftest*
3184 libc_cv_asm_underscores=yes
3185 else
3186 rm -f conftest*
3187 libc_cv_asm_underscores=no
3188 fi
3189else
3190 echo "configure: failed program was:" >&5
3191 cat conftest.$ac_ext >&5
3192 rm -f conftest*
3193 libc_cv_asm_underscores=no
3194fi
3195rm -f conftest*
3196fi
3197
3198echo "$ac_t""$libc_cv_asm_underscores" 1>&6
3199 fi
cd6ede75
UD
3200fi
3201if test $libc_cv_asm_underscores = no; then
3202 cat >> confdefs.h <<\EOF
3203#define NO_UNDERSCORES 1
3204EOF
3205
3206fi
3207
3208if test $elf = yes; then
3209 libc_cv_weak_symbols=yes
9a97d1f7
UD
3210fi
3211
3212echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
48b8e846 3213echo "configure:3214: checking for assembler .weak directive" >&5
a808d541 3214if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
cd6ede75
UD
3215 echo $ac_n "(cached) $ac_c" 1>&6
3216else
3217 cat > conftest.s <<EOF
2293395f 3218${libc_cv_dot_text}
cd6ede75
UD
3219${libc_cv_asm_global_directive} foo
3220foo:
3221.weak foo
3222.weak bar; bar = foo
3223EOF
9a97d1f7
UD
3224if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
3225 libc_cv_asm_weak_directive=yes
3226else
3227 libc_cv_asm_weak_directive=no
3228fi
3229rm -f conftest*
cd6ede75
UD
3230fi
3231
3232echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
3233
3234if test $libc_cv_asm_weak_directive = no; then
3235 echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
48b8e846 3236echo "configure:3237: checking for assembler .weakext directive" >&5
a808d541 3237if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
cd6ede75
UD
3238 echo $ac_n "(cached) $ac_c" 1>&6
3239else
3240 cat > conftest.s <<EOF
2293395f 3241${libc_cv_dot_text}
cd6ede75
UD
3242${libc_cv_asm_global_directive} foo
3243foo:
9a97d1f7
UD
3244.weakext bar foo
3245.weakext baz
3246${libc_cv_asm_global_directive} baz
3247baz:
cd6ede75
UD
3248EOF
3249 if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
3250 libc_cv_asm_weakext_directive=yes
3251 else
3252 libc_cv_asm_weakext_directive=no
3253 fi
3254 rm -f conftest*
3255fi
3256
3257echo "$ac_t""$libc_cv_asm_weakext_directive" 1>&6
3258
9a97d1f7 3259fi # no .weak
cd6ede75
UD
3260
3261if test $libc_cv_asm_weak_directive = yes; then
3262 cat >> confdefs.h <<\EOF
3263#define HAVE_ASM_WEAK_DIRECTIVE 1
3264EOF
3265
3266elif test $libc_cv_asm_weakext_directive = yes; then
3267 cat >> confdefs.h <<\EOF
3268#define HAVE_ASM_WEAKEXT_DIRECTIVE 1
3269EOF
3270
3271fi
3272
b15cb495 3273case "${host_cpu}-${host_os}" in
eacde9d0
UD
3274 cris*)
3275 libc_cv_asm_line_sep='@'
3276 cat >> confdefs.h <<EOF
3277#define ASM_LINE_SEP $libc_cv_asm_line_sep
3278EOF
3279
3280 ;;
b15cb495
UD
3281 hppa*linux*)
3282 echo $ac_n "checking for assembler line separator""... $ac_c" 1>&6
48b8e846 3283echo "configure:3284: checking for assembler line separator" >&5
b15cb495
UD
3284if eval "test \"`echo '$''{'libc_cv_asm_line_sep'+set}'`\" = set"; then
3285 echo $ac_n "(cached) $ac_c" 1>&6
3286else
3287 cat > conftest.s <<EOF
3288 nop ; is_old_puffin
3289EOF
48b8e846 3290 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
b15cb495
UD
3291 libc_cv_asm_line_sep='!'
3292 else
3293 if test -z "$enable_hacker_mode"; then
3294 echo "*** You need a newer assembler to compile glibc"
3295 rm -f conftest*
3296 exit 1
3297 fi
3298 libc_cv_asm_line_sep=';'
3299 fi
3300 rm -f conftest*
3301fi
3302
3303echo "$ac_t""$libc_cv_asm_line_sep" 1>&6
3304 cat >> confdefs.h <<EOF
3305#define ASM_LINE_SEP $libc_cv_asm_line_sep
3306EOF
3307
3308 ;;
3309esac
3310
cd6ede75 3311echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
48b8e846 3312echo "configure:3313: checking for ld --no-whole-archive" >&5
a808d541 3313if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
cd6ede75
UD
3314 echo $ac_n "(cached) $ac_c" 1>&6
3315else
3316 cat > conftest.c <<\EOF
3317_start () {}
3318int __eh_pc;
3319__throw () {}
3320EOF
3321if { ac_try='${CC-cc} $CFLAGS
3322 -nostdlib -nostartfiles -Wl,--no-whole-archive
48b8e846 3323 -o conftest conftest.c 1>&5'; { (eval echo configure:3324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
3324 libc_cv_ld_no_whole_archive=yes
3325else
3326 libc_cv_ld_no_whole_archive=no
3327fi
3328rm -f conftest*
3329fi
3330
3331echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
b17277cf
UD
3332if test $libc_cv_ld_no_whole_archive = yes; then
3333 no_whole_archive=-Wl,--no-whole-archive
3334fi
cd6ede75 3335
dff14448 3336echo $ac_n "checking for gcc -fexceptions""... $ac_c" 1>&6
48b8e846 3337echo "configure:3338: checking for gcc -fexceptions" >&5
a808d541 3338if eval "test \"`echo '$''{'libc_cv_gcc_exceptions'+set}'`\" = set"; then
cd6ede75
UD
3339 echo $ac_n "(cached) $ac_c" 1>&6
3340else
3341 cat > conftest.c <<\EOF
3342_start () {}
3343int __eh_pc;
3344__throw () {}
3345EOF
3346if { ac_try='${CC-cc} $CFLAGS
dff14448 3347 -nostdlib -nostartfiles -fexceptions
48b8e846 3348 -o conftest conftest.c 1>&5'; { (eval echo configure:3349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
dff14448 3349 libc_cv_gcc_exceptions=yes
cd6ede75 3350else
dff14448 3351 libc_cv_gcc_exceptions=no
cd6ede75
UD
3352fi
3353rm -f conftest*
3354fi
3355
dff14448
UD
3356echo "$ac_t""$libc_cv_gcc_exceptions" 1>&6
3357if test $libc_cv_gcc_exceptions = yes; then
3358 exceptions=-fexceptions
b17277cf 3359fi
cd6ede75 3360
d71b808a
UD
3361if test "$base_machine" = alpha ; then
3362echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
48b8e846 3363echo "configure:3364: checking for function ..ng prefix" >&5
a808d541 3364if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
d71b808a
UD
3365 echo $ac_n "(cached) $ac_c" 1>&6
3366else
3367 cat > conftest.c <<\EOF
3368foo () { }
3369EOF
48b8e846 3370if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
d71b808a
UD
3371then
3372 libc_cv_gcc_alpha_ng_prefix=yes
3373else
3374 libc_cv_gcc_alpha_ng_prefix=no
3375fi
3376rm -f conftest*
3377fi
3378
3379echo "$ac_t""$libc_cv_gcc_alpha_ng_prefix" 1>&6
3380if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
3381 cat >> confdefs.h <<\EOF
3382#define ASM_ALPHA_NG_SYMBOL_PREFIX "$"
3383EOF
3384
3385else
3386 cat >> confdefs.h <<\EOF
3387#define ASM_ALPHA_NG_SYMBOL_PREFIX ""
3388EOF
3389
3390fi
3391fi
3392
ebcd12d4
UD
3393if test "$host_cpu" = powerpc ; then
3394# Check for a bug present in at least versions 2.8.x of GCC
3395# and versions 1.0.x of EGCS.
3396echo $ac_n "checking whether clobbering cr0 causes problems""... $ac_c" 1>&6
48b8e846 3397echo "configure:3398: checking whether clobbering cr0 causes problems" >&5
a808d541 3398if eval "test \"`echo '$''{'libc_cv_c_asmcr0_bug'+set}'`\" = set"; then
ebcd12d4
UD
3399 echo $ac_n "(cached) $ac_c" 1>&6
3400else
3401 cat > conftest.$ac_ext <<EOF
48b8e846 3402#line 3403 "configure"
ebcd12d4
UD
3403#include "confdefs.h"
3404int tester(int x) { asm ("" : : : "cc"); return x & 123; }
3405int main() {
3406
3407; return 0; }
3408EOF
48b8e846 3409if { (eval echo configure:3410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ebcd12d4
UD
3410 rm -rf conftest*
3411 libc_cv_c_asmcr0_bug='no'
3412else
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 rm -rf conftest*
3416 libc_cv_c_asmcr0_bug='yes'
3417fi
3418rm -f conftest*
3419fi
3420
3421echo "$ac_t""$libc_cv_c_asmcr0_bug" 1>&6
3422if test "$libc_cv_c_asmcr0_bug" != 'no'; then
3423 cat >> confdefs.h <<\EOF
3424#define BROKEN_PPC_ASM_CR0 1
3425EOF
3426
3427fi
3428fi
3429
650425ce 3430echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
48b8e846 3431echo "configure:3432: checking for DWARF2 unwind info support" >&5
a808d541 3432if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then
650425ce
UD
3433 echo $ac_n "(cached) $ac_c" 1>&6
3434else
3435 cat > conftest.c <<EOF
48b8e846 3436#line 3437 "configure"
2b904739 3437static char *__EH_FRAME_BEGIN__;
650425ce
UD
3438_start ()
3439{
9756dfe1 3440#ifdef CHECK__register_frame
650425ce
UD
3441 __register_frame (__EH_FRAME_BEGIN__);
3442 __deregister_frame (__EH_FRAME_BEGIN__);
9756dfe1
UD
3443#endif
3444#ifdef CHECK__register_frame_info
3445 __register_frame_info (__EH_FRAME_BEGIN__);
3446 __deregister_frame_info (__EH_FRAME_BEGIN__);
3447#endif
650425ce
UD
3448}
3449int __eh_pc;
3450__throw () {}
3451/* FIXME: this is fragile. */
3452malloc () {}
3453strcmp () {}
3454strlen () {}
3455memcpy () {}
3456memset () {}
3457free () {}
3458abort () {}
dfd2257a 3459__bzero () {}
650425ce 3460EOF
9756dfe1 3461if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
650425ce 3462 -nostdlib -nostartfiles
48b8e846 3463 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
9756dfe1 3464 libc_cv_gcc_dwarf2_unwind_info=static
650425ce
UD
3465else
3466 libc_cv_gcc_dwarf2_unwind_info=no
3467fi
2b904739
AJ
3468if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
3469 -nostdlib -nostartfiles
48b8e846 3470 -o conftest conftest.c -lgcc -lgcc_eh >&5'; { (eval echo configure:3471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2b904739
AJ
3471 if ${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles \
3472 -o conftest conftest.c -lgcc -lgcc_eh -v 2>&1 >/dev/null \
3473 | grep -q -- --eh-frame-hdr; then
3474 libc_cv_gcc_dwarf2_unwind_info=no_registry_needed
3475 else
3476 libc_cv_gcc_dwarf2_unwind_info=static
3477 fi
3478else
3479 libc_cv_gcc_dwarf2_unwind_info=no
3480fi
9756dfe1
UD
3481if test $libc_cv_gcc_dwarf2_unwind_info = no; then
3482 if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame
3483 -nostdlib -nostartfiles
48b8e846 3484 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
9756dfe1
UD
3485 libc_cv_gcc_dwarf2_unwind_info=yes
3486 else
3487 libc_cv_gcc_dwarf2_unwind_info=no
3488 fi
3489fi
650425ce
UD
3490rm -f conftest*
3491fi
3492
3493echo "$ac_t""$libc_cv_gcc_dwarf2_unwind_info" 1>&6
9756dfe1
UD
3494case $libc_cv_gcc_dwarf2_unwind_info in
3495yes)
650425ce
UD
3496 cat >> confdefs.h <<\EOF
3497#define HAVE_DWARF2_UNWIND_INFO 1
3498EOF
3499
9756dfe1
UD
3500 ;;
3501static)
3502 cat >> confdefs.h <<\EOF
3503#define HAVE_DWARF2_UNWIND_INFO 1
3504EOF
3505
3506 cat >> confdefs.h <<\EOF
3507#define HAVE_DWARF2_UNWIND_INFO_STATIC 1
3508EOF
3509
3510 ;;
3511esac
650425ce 3512
a8eab8b1 3513echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6
48b8e846 3514echo "configure:3515: checking for __builtin_expect" >&5
a808d541 3515if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" = set"; then
a8eab8b1
UD
3516 echo $ac_n "(cached) $ac_c" 1>&6
3517else
3518 cat > conftest.c <<EOF
48b8e846 3519#line 3520 "configure"
a8eab8b1
UD
3520int foo (int a)
3521{
3522 a = __builtin_expect (a, 10);
3523 return a == 10 ? 0 : 1;
3524}
3525EOF
3526if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
48b8e846 3527 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
a8eab8b1
UD
3528 libc_cv_gcc_builtin_expect=yes
3529else
3530 libc_cv_gcc_builtin_expect=no
3531fi
3532rm -f conftest*
3533fi
3534
3535echo "$ac_t""$libc_cv_gcc_builtin_expect" 1>&6
3536if test "$libc_cv_gcc_builtin_expect" = yes; then
3537 cat >> confdefs.h <<\EOF
3538#define HAVE_BUILTIN_EXPECT 1
3539EOF
3540
3541fi
3542
d555194c 3543echo $ac_n "checking for __builtin_memset""... $ac_c" 1>&6
48b8e846 3544echo "configure:3545: checking for __builtin_memset" >&5
d555194c
UD
3545if eval "test \"`echo '$''{'libc_cv_gcc_builtin_memset'+set}'`\" = set"; then
3546 echo $ac_n "(cached) $ac_c" 1>&6
3547else
3548 cat > conftest.c <<\EOF
3549void zero (void *x)
3550{
a52d1562 3551 __builtin_memset (x, 0, 1000);
d555194c
UD
3552}
3553EOF
48b8e846 3554if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'; { (eval echo configure:3555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
d555194c
UD
3555then
3556 libc_cv_gcc_builtin_memset=no
3557else
3558 libc_cv_gcc_builtin_memset=yes
3559fi
3560rm -f conftest*
3561fi
3562
3563echo "$ac_t""$libc_cv_gcc_builtin_memset" 1>&6
3564if test "$libc_cv_gcc_builtin_memset" = yes ; then
3565 cat >> confdefs.h <<\EOF
3566#define HAVE_BUILTIN_MEMSET 1
3567EOF
3568
3569fi
3570
3d558f4e 3571echo $ac_n "checking for local label subtraction""... $ac_c" 1>&6
48b8e846 3572echo "configure:3573: checking for local label subtraction" >&5
a808d541 3573if eval "test \"`echo '$''{'libc_cv_gcc_subtract_local_labels'+set}'`\" = set"; then
3d558f4e
UD
3574 echo $ac_n "(cached) $ac_c" 1>&6
3575else
3576 cat > conftest.c <<EOF
48b8e846 3577#line 3578 "configure"
3d558f4e
UD
3578int foo (int a)
3579{
3580 static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
3581 void *p = &&l1 + ar[a];
3582 goto *p;
3583 l1:
3584 return 1;
3585 l2:
3586 return 2;
3587}
3588EOF
3589if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
48b8e846 3590 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
3d558f4e
UD
3591 libc_cv_gcc_subtract_local_labels=yes
3592else
3593 libc_cv_gcc_subtract_local_labels=no
3594fi
3595rm -f conftest*
3596fi
3597
3598echo "$ac_t""$libc_cv_gcc_subtract_local_labels" 1>&6
3599if test "$libc_cv_gcc_subtract_local_labels" = yes; then
3600 cat >> confdefs.h <<\EOF
3601#define HAVE_SUBTRACT_LOCAL_LABELS 1
3602EOF
3603
3604fi
3605
739d440d 3606echo $ac_n "checking for __thread""... $ac_c" 1>&6
48b8e846 3607echo "configure:3608: checking for __thread" >&5
739d440d
UD
3608if eval "test \"`echo '$''{'libc_cv_gcc___thread'+set}'`\" = set"; then
3609 echo $ac_n "(cached) $ac_c" 1>&6
3610else
3611 cat > conftest.c <<EOF
3612__thread int a = 42;
3613EOF
48b8e846 3614if { ac_try='${CC-cc} $CFLAGS -c conftest.c >&5'; { (eval echo configure:3615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
739d440d
UD
3615 libc_cv_gcc___thread=yes
3616else
3617 libc_cv_gcc___thread=no
3618fi
3619rm -f conftest*
3620fi
3621
3622echo "$ac_t""$libc_cv_gcc___thread" 1>&6
3623if test "$libc_cv_gcc___thread" = yes; then
3624 cat >> confdefs.h <<\EOF
3625#define HAVE___THREAD 1
3626EOF
3627
3628fi
3629
3630
c8f3e6db 3631echo $ac_n "checking for libgd""... $ac_c" 1>&6
48b8e846 3632echo "configure:3633: checking for libgd" >&5
6dab8688
UD
3633if test "$with_gd" != "no"; then
3634 old_CFLAGS="$CFLAGS"
3635 CFLAGS="$CFLAGS $libgd_include"
3636 old_LDFLAGS="$LDFLAGS"
3637 LDFLAGS="$LDFLAGS $libgd_ldflags"
3638 old_LIBS="$LIBS"
3639 LIBS="$LIBS -lgd -lpng -lz -lm"
3640 cat > conftest.$ac_ext <<EOF
48b8e846 3641#line 3642 "configure"
c8f3e6db
UD
3642#include "confdefs.h"
3643#include <gd.h>
3644int main() {
3645gdImagePng (0, 0)
3646; return 0; }
3647EOF
48b8e846 3648if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c8f3e6db
UD
3649 rm -rf conftest*
3650 LIBGD=yes
3651else
3652 echo "configure: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3654 rm -rf conftest*
3655 LIBGD=no
3656fi
3657rm -f conftest*
6dab8688
UD
3658 CFLAGS="$old_CFLAGS"
3659 LDFLAGS="$old_LDFLAGS"
3660 LIBS="$old_LIBS"
3661else
3662 LIBGD=no
3663fi
c8f3e6db
UD
3664echo "$ac_t""$LIBGD" 1>&6
3665
3d558f4e 3666
8ed1e7d5 3667echo $ac_n "checking size of long double""... $ac_c" 1>&6
48b8e846 3668echo "configure:3669: checking size of long double" >&5
8ed1e7d5
GK
3669if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
3670 echo $ac_n "(cached) $ac_c" 1>&6
3671else
3672 if test "$cross_compiling" = yes; then
3673 ac_cv_sizeof_long_double=0
3674else
3675 cat > conftest.$ac_ext <<EOF
48b8e846 3676#line 3677 "configure"
8ed1e7d5
GK
3677#include "confdefs.h"
3678#include <stdio.h>
a8c01776 3679int main()
8ed1e7d5
GK
3680{
3681 FILE *f=fopen("conftestval", "w");
a8c01776 3682 if (!f) return(1);
8ed1e7d5 3683 fprintf(f, "%d\n", sizeof(long double));
a8c01776 3684 return(0);
8ed1e7d5
GK
3685}
3686EOF
48b8e846 3687if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8ed1e7d5
GK
3688then
3689 ac_cv_sizeof_long_double=`cat conftestval`
3690else
3691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
3693 rm -fr conftest*
3694 ac_cv_sizeof_long_double=0
3695fi
3696rm -fr conftest*
3697fi
3698
3699fi
3700echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
3701cat >> confdefs.h <<EOF
3702#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
3703EOF
3704
3705
3706sizeof_long_double=$ac_cv_sizeof_long_double
3707
3708
cd6ede75
UD
3709### End of automated tests.
3710### Now run sysdeps configure fragments.
3711
3712# sysdeps configure fragments may set these with files to be linked below.
3713libc_link_dests=
3714libc_link_sources=
3715
cb343854 3716# They also can set these variables.
b43b13ac 3717use_ldconfig=no
cb343854 3718ldd_rewrite_script=no
77259608 3719libc_cv_sysconfdir=$sysconfdir
74bd2300 3720libc_cv_gcc_unwind_find_fde=no
cb343854 3721
cd6ede75
UD
3722# Iterate over all the sysdep directories we will use, running their
3723# configure fragments, and looking for a uname implementation.
3724uname=
3725for dir in $sysnames; do
3726 case $dir in
3727 /*) dest=$dir ;;
3728 *) dest=$srcdir/$dir ;;
3729 esac
3730 if test -r $dest/configure; then
3731 echo "$ac_t""running configure fragment for $dest" 1>&6
3732 . $dest/configure
3733 fi
3734
3735 if test -z "$uname"; then
3736 if test -r $dest/uname.c ||
3737 test -r $dest/uname.S ||
3738 { test -r $dest/syscalls.list &&
3739 grep '^uname[ ]' $dest/syscalls.list >/dev/null; }; then
3740 uname=$dir
3741 fi
3742 fi
3743done
3744
74bd2300
UD
3745if test x$libc_cv_gcc_unwind_find_fde = xyes; then
3746 cat >> confdefs.h <<\EOF
3747#define EXPORT_UNWIND_FIND_FDE 1
3748EOF
3749
3750fi
3751
3752
cd6ede75
UD
3753
3754
3755# If we will use the generic uname implementation, we must figure out what
3756# it will say by examining the system, and write the results in config-name.h.
3757if test "$uname" = "sysdeps/generic"; then
3758
3759 uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
3760 if test $uname_sysname != $config_os; then
3761 config_release=`echo $config_os | sed s/$uname_sysname//`
3762 fi
3763
3764 echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
48b8e846 3765echo "configure:3766: checking OS release for uname" >&5
a808d541 3766if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
cd6ede75
UD
3767 echo $ac_n "(cached) $ac_c" 1>&6
3768else
3769 kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
3770 if test x`echo "$config_release" | sed "s/^$kernel_release//"` \
3771 != x$config_release; then
3772 # The configuration release is a substring of the kernel release.
3773 libc_cv_uname_release=$kernel_release
3774 elif test x$config_release != x; then
3775 libc_cv_uname_release=$config_release
3776 elif test x$kernel_release != x; then
3777 libc_cv_uname_release=$kernel_release
3778 else
3779 libc_cv_uname_release=unknown
3780 fi
3781fi
3782
3783echo "$ac_t""$libc_cv_uname_release" 1>&6
3784 uname_release="$libc_cv_uname_release"
3785
3786 echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
48b8e846 3787echo "configure:3788: checking OS version for uname" >&5
a808d541 3788if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
cd6ede75
UD
3789 echo $ac_n "(cached) $ac_c" 1>&6
3790else
3791 kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
3792 if test -n "$kernel_version"; then
3793 libc_cv_uname_version="$kernel_version"
3794 else
3795 libc_cv_uname_version=unknown
3796 fi
3797fi
3798
3799echo "$ac_t""$libc_cv_uname_version" 1>&6
3800 uname_version="$libc_cv_uname_version"
3801
3802 config_uname=config-name.h:config-name.in
3803else
3804 # For non-generic uname, we don't need to create config-name.h at all.
3805 config_uname=
3806fi
3807
a8c01776 3808cat >> confdefs.h <<\EOF
cd6ede75
UD
3809#define USE_IN_LIBIO 1
3810EOF
a8c01776 3811
cd6ede75 3812
a53bad16
UD
3813# Test for old glibc 2.0.x headers so that they can be removed properly
3814# Search only in includedir.
3815echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6
48b8e846 3816echo "configure:3817: checking for old glibc 2.0.x headers" >&5
011ce8ed 3817if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
a53bad16
UD
3818then
3819 old_glibc_headers=yes
3820else
3821 old_glibc_headers=no
3822fi
3823echo "$ac_t""$old_glibc_headers" 1>&6
3824if test ${old_glibc_headers} = yes; then
3825 echo "configure: warning: *** During \"make install\" old headers from glibc 2.0.x will" 1>&2
3826 echo "configure: warning: *** be removed." 1>&2
3827fi
26b4d766 3828
cd6ede75
UD
3829
3830
3831
3832
3833
3834
cb343854 3835
dff14448 3836
77259608 3837
5af3245a 3838
cd6ede75
UD
3839if test $gnu_ld = yes; then
3840 cat >> confdefs.h <<\EOF
3841#define HAVE_GNU_LD 1
3842EOF
3843
3844fi
3845if test $gnu_as = yes; then
3846 cat >> confdefs.h <<\EOF
3847#define HAVE_GNU_AS 1
3848EOF
3849
3850fi
3851if test $elf = yes; then
3852 cat >> confdefs.h <<\EOF
3853#define HAVE_ELF 1
3854EOF
3855
3856fi
5af3245a
UD
3857if test $xcoff = yes; then
3858 cat >> confdefs.h <<\EOF
3859#define HAVE_XCOFF 1
3860EOF
3861
3862fi
cd6ede75
UD
3863
3864
650425ce 3865
cd6ede75
UD
3866if test $shared = default; then
3867 if test $gnu_ld = yes; then
3868 shared=$elf
3869 else
3870 # For now we do not assume shared libs are available. In future more
3871 # tests might become available.
3872 shared=no
3873 fi
3874fi
3875
cc3fa755 3876echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
48b8e846 3877echo "configure:3878: checking whether -fPIC is default" >&5
a808d541 3878if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
cc3fa755
UD
3879 echo $ac_n "(cached) $ac_c" 1>&6
3880else
3881 pic_default=yes
3882cat > conftest.c <<EOF
9756dfe1 3883#if defined __PIC__ || defined __pic__ || defined PIC || defined pic
cc3fa755
UD
3884# error PIC is default.
3885#endif
3886EOF
3887if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
3888 pic_default=no
3889fi
3890rm -f conftest.*
3891fi
3892
3893echo "$ac_t""$pic_default" 1>&6
3894
3895
3896
cd6ede75
UD
3897
3898
3899
3900
3901
3902
3903
7cabd57c
UD
3904case "$add_ons" in
3905 *door*) linux_doors=yes ;;
3906 *) linux_doors=no ;;
3907esac
3908
3909
746f4007
RM
3910
3911
cd6ede75
UD
3912if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
3913 config_makefile=
3914else
3915 config_makefile=Makefile
3916fi
3917
ee74a442
UD
3918VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
3919RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
3920
cd6ede75
UD
3921
3922
3923trap '' 1 2 15
3924cat > confcache <<\EOF
3925# This file is a shell script that caches the results of configure
3926# tests run on this system so they can be shared between configure
3927# scripts and configure runs. It is not useful on other systems.
3928# If it contains results you don't want to keep, you may remove or edit it.
3929#
3930# By default, configure uses ./config.cache as the cache file,
3931# creating it if it does not exist already. You can give configure
3932# the --cache-file=FILE option to use a different cache file; that is
3933# what configure does when it calls configure scripts in
3934# subdirectories, so they share the cache.
3935# Giving --cache-file=/dev/null disables caching, for debugging configure.
3936# config.status only pays attention to the cache file if you give it the
3937# --recheck option to rerun configure.
3938#
3939EOF
3940# The following way of writing the cache mishandles newlines in values,
3941# but we know of no workaround that is simple, portable, and efficient.
3942# So, don't put newlines in cache variables' values.
3943# Ultrix sh set writes to stderr and can't be redirected directly,
3944# and sets the high bit in the cache file unless we assign to the vars.
3945(set) 2>&1 |
5c2a0669 3946 case `(ac_space=' '; set | grep ac_space) 2>&1` in
cd6ede75
UD
3947 *ac_space=\ *)
3948 # `set' does not quote correctly, so add quotes (double-quote substitution
3949 # turns \\\\ into \\, and sed turns \\ into \).
3950 sed -n \
3951 -e "s/'/'\\\\''/g" \
3952 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3953 ;;
3954 *)
3955 # `set' quotes correctly as required by POSIX, so do not add quotes.
3956 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3957 ;;
3958 esac >> confcache
3959if cmp -s $cache_file confcache; then
3960 :
3961else
3962 if test -w $cache_file; then
3963 echo "updating cache $cache_file"
3964 cat confcache > $cache_file
3965 else
3966 echo "not updating unwritable cache $cache_file"
3967 fi
3968fi
3969rm -f confcache
3970
3971trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3972
3973test "x$prefix" = xNONE && prefix=$ac_default_prefix
3974# Let make expand exec_prefix.
3975test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3976
3977# Any assignment to VPATH causes Sun make to only execute
3978# the first set of double-colon rules, so remove it if not needed.
3979# If there is a colon in the path, we need to keep it.
3980if test "x$srcdir" = x.; then
3981 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3982fi
3983
3984trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3985
3986DEFS=-DHAVE_CONFIG_H
3987
3988# Without the "./", some shells look in PATH for config.status.
3989: ${CONFIG_STATUS=./config.status}
3990
3991echo creating $CONFIG_STATUS
3992rm -f $CONFIG_STATUS
3993cat > $CONFIG_STATUS <<EOF
3994#! /bin/sh
3995# Generated automatically by configure.
3996# Run this file to recreate the current configuration.
3997# This directory was configured as follows,
3998# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3999#
4000# $0 $ac_configure_args
4001#
4002# Compiler output produced by configure, useful for debugging
4003# configure, is in ./config.log if it exists.
4004
4005ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4006for ac_option
4007do
4008 case "\$ac_option" in
4009 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4010 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4011 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4012 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
a808d541 4013 echo "$CONFIG_STATUS generated by autoconf version 2.13"
cd6ede75
UD
4014 exit 0 ;;
4015 -help | --help | --hel | --he | --h)
4016 echo "\$ac_cs_usage"; exit 0 ;;
4017 *) echo "\$ac_cs_usage"; exit 1 ;;
4018 esac
4019done
4020
4021ac_given_srcdir=$srcdir
4022ac_given_INSTALL="$INSTALL"
4023
4024trap 'rm -fr `echo "config.make glibcbug ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4025EOF
4026cat >> $CONFIG_STATUS <<EOF
4027
4028# Protect against being on the right side of a sed subst in config.status.
4029sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4030 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4031$ac_vpsub
4032$extrasub
5c2a0669 4033s%@SHELL@%$SHELL%g
cd6ede75
UD
4034s%@CFLAGS@%$CFLAGS%g
4035s%@CPPFLAGS@%$CPPFLAGS%g
4036s%@CXXFLAGS@%$CXXFLAGS%g
5c2a0669 4037s%@FFLAGS@%$FFLAGS%g
cd6ede75
UD
4038s%@DEFS@%$DEFS%g
4039s%@LDFLAGS@%$LDFLAGS%g
4040s%@LIBS@%$LIBS%g
4041s%@exec_prefix@%$exec_prefix%g
4042s%@prefix@%$prefix%g
4043s%@program_transform_name@%$program_transform_name%g
4044s%@bindir@%$bindir%g
4045s%@sbindir@%$sbindir%g
4046s%@libexecdir@%$libexecdir%g
4047s%@datadir@%$datadir%g
4048s%@sysconfdir@%$sysconfdir%g
4049s%@sharedstatedir@%$sharedstatedir%g
4050s%@localstatedir@%$localstatedir%g
4051s%@libdir@%$libdir%g
4052s%@includedir@%$includedir%g
4053s%@oldincludedir@%$oldincludedir%g
4054s%@infodir@%$infodir%g
4055s%@mandir@%$mandir%g
675322a5 4056s%@with_fp@%$with_fp%g
d67281a7 4057s%@with_cvs@%$with_cvs%g
deb7f0b4 4058s%@oldest_abi@%$oldest_abi%g
cd6ede75 4059s%@subdirs@%$subdirs%g
73237de3 4060s%@force_install@%$force_install%g
2a068d20 4061s%@all_warnings@%$all_warnings%g
cd6ede75
UD
4062s%@host@%$host%g
4063s%@host_alias@%$host_alias%g
4064s%@host_cpu@%$host_cpu%g
4065s%@host_vendor@%$host_vendor%g
4066s%@host_os@%$host_os%g
4067s%@base_machine@%$base_machine%g
4068s%@sysnames@%$sysnames%g
4069s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5c2a0669 4070s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
cd6ede75
UD
4071s%@INSTALL_DATA@%$INSTALL_DATA%g
4072s%@LN_S@%$LN_S%g
c218729d 4073s%@PWD_P@%$PWD_P%g
cd6ede75
UD
4074s%@build@%$build%g
4075s%@build_alias@%$build_alias%g
4076s%@build_cpu@%$build_cpu%g
4077s%@build_vendor@%$build_vendor%g
4078s%@build_os@%$build_os%g
4bca4c17
UD
4079s%@CC@%$CC%g
4080s%@MAKE@%$MAKE%g
4081s%@MSGFMT@%$MSGFMT%g
4082s%@MAKEINFO@%$MAKEINFO%g
aec103d3 4083s%@SED@%$SED%g
4bca4c17 4084s%@cross_linkable@%$cross_linkable%g
cd6ede75
UD
4085s%@BUILD_CC@%$BUILD_CC%g
4086s%@cross_compiling@%$cross_compiling%g
4087s%@CPP@%$CPP%g
4088s%@AR@%$AR%g
4089s%@RANLIB@%$RANLIB%g
4bca4c17 4090s%@MIG@%$MIG%g
ea9f119b 4091s%@CCVERSION@%$CCVERSION%g
3c720987 4092s%@SYSINCLUDES@%$SYSINCLUDES%g
74bd2300 4093s%@libc_cv_gcc_static_libgcc@%$libc_cv_gcc_static_libgcc%g
cd6ede75
UD
4094s%@BASH@%$BASH%g
4095s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g
4096s%@KSH@%$KSH%g
4097s%@libc_cv_have_ksh@%$libc_cv_have_ksh%g
5aa8ff62 4098s%@AWK@%$AWK%g
a2b08ee5 4099s%@PERL@%$PERL%g
c0016081
UD
4100s%@INSTALL_INFO@%$INSTALL_INFO%g
4101s%@OLD_DEBIAN_INSTALL_INFO@%$OLD_DEBIAN_INSTALL_INFO%g
ae113383 4102s%@BISON@%$BISON%g
cd6ede75 4103s%@VERSIONING@%$VERSIONING%g
2d499f55 4104s%@libc_cv_asm_protected_directive@%$libc_cv_asm_protected_directive%g
2c617417 4105s%@libc_cv_initfinit_array@%$libc_cv_initfinit_array%g
2f54c82d
UD
4106s%@libc_cv_z_nodelete@%$libc_cv_z_nodelete%g
4107s%@libc_cv_z_nodlopen@%$libc_cv_z_nodlopen%g
5d916713 4108s%@libc_cv_z_initfirst@%$libc_cv_z_initfirst%g
639c3248 4109s%@libc_cv_Bgroup@%$libc_cv_Bgroup%g
f13df7c7 4110s%@libc_cv_z_combreloc@%$libc_cv_z_combreloc%g
cd6ede75 4111s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g
b17277cf 4112s%@no_whole_archive@%$no_whole_archive%g
dff14448 4113s%@exceptions@%$exceptions%g
c8f3e6db 4114s%@LIBGD@%$LIBGD%g
8ed1e7d5 4115s%@sizeof_long_double@%$sizeof_long_double%g
74bd2300 4116s%@libc_cv_gcc_unwind_find_fde@%$libc_cv_gcc_unwind_find_fde%g
cd6ede75
UD
4117s%@uname_sysname@%$uname_sysname%g
4118s%@uname_release@%$uname_release%g
4119s%@uname_version@%$uname_version%g
dff14448 4120s%@old_glibc_headers@%$old_glibc_headers%g
cd6ede75 4121s%@libc_cv_slibdir@%$libc_cv_slibdir%g
a1d84548 4122s%@libc_cv_localedir@%$libc_cv_localedir%g
77259608 4123s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
cd6ede75 4124s%@libc_cv_rootsbindir@%$libc_cv_rootsbindir%g
b43b13ac 4125s%@use_ldconfig@%$use_ldconfig%g
cb343854 4126s%@ldd_rewrite_script@%$ldd_rewrite_script%g
cd6ede75
UD
4127s%@gnu_ld@%$gnu_ld%g
4128s%@gnu_as@%$gnu_as%g
4129s%@elf@%$elf%g
5af3245a 4130s%@xcoff@%$xcoff%g
650425ce 4131s%@static@%$static%g
cd6ede75 4132s%@shared@%$shared%g
cc3fa755 4133s%@pic_default@%$pic_default%g
cd6ede75
UD
4134s%@profile@%$profile%g
4135s%@omitfp@%$omitfp%g
4136s%@bounded@%$bounded%g
4137s%@static_nss@%$static_nss%g
4138s%@nopic_initfini@%$nopic_initfini%g
4139s%@DEFINES@%$DEFINES%g
7cabd57c 4140s%@linux_doors@%$linux_doors%g
746f4007 4141s%@mach_interface_list@%$mach_interface_list%g
cd6ede75 4142s%@VERSION@%$VERSION%g
ee74a442 4143s%@RELEASE@%$RELEASE%g
cd6ede75
UD
4144
4145CEOF
4146EOF
4147
4148cat >> $CONFIG_STATUS <<\EOF
4149
4150# Split the substitutions into bite-sized pieces for seds with
4151# small command number limits, like on Digital OSF/1 and HP-UX.
4152ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4153ac_file=1 # Number of current file.
4154ac_beg=1 # First line for current file.
4155ac_end=$ac_max_sed_cmds # Line after last line for current file.
4156ac_more_lines=:
4157ac_sed_cmds=""
4158while $ac_more_lines; do
4159 if test $ac_beg -gt 1; then
4160 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4161 else
4162 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4163 fi
4164 if test ! -s conftest.s$ac_file; then
4165 ac_more_lines=false
4166 rm -f conftest.s$ac_file
4167 else
4168 if test -z "$ac_sed_cmds"; then
4169 ac_sed_cmds="sed -f conftest.s$ac_file"
4170 else
4171 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4172 fi
4173 ac_file=`expr $ac_file + 1`
4174 ac_beg=$ac_end
4175 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4176 fi
4177done
4178if test -z "$ac_sed_cmds"; then
4179 ac_sed_cmds=cat
4180fi
4181EOF
4182
4183cat >> $CONFIG_STATUS <<EOF
4184
4185CONFIG_FILES=\${CONFIG_FILES-"config.make glibcbug ${config_makefile} ${config_uname}"}
4186EOF
4187cat >> $CONFIG_STATUS <<\EOF
4188for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4189 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4190 case "$ac_file" in
4191 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4192 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4193 *) ac_file_in="${ac_file}.in" ;;
4194 esac
4195
4196 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4197
4198 # Remove last slash and all that follows it. Not all systems have dirname.
4199 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4200 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4201 # The file is in a subdirectory.
4202 test ! -d "$ac_dir" && mkdir "$ac_dir"
4203 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4204 # A "../" for each directory in $ac_dir_suffix.
4205 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4206 else
4207 ac_dir_suffix= ac_dots=
4208 fi
4209
4210 case "$ac_given_srcdir" in
4211 .) srcdir=.
4212 if test -z "$ac_dots"; then top_srcdir=.
4213 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4214 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4215 *) # Relative path.
4216 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4217 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4218 esac
4219
4220 case "$ac_given_INSTALL" in
4221 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4222 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4223 esac
4224
4225 echo creating "$ac_file"
4226 rm -f "$ac_file"
4227 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4228 case "$ac_file" in
4229 *Makefile*) ac_comsub="1i\\
4230# $configure_input" ;;
4231 *) ac_comsub= ;;
4232 esac
4233
4234 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4235 sed -e "$ac_comsub
4236s%@configure_input@%$configure_input%g
4237s%@srcdir@%$srcdir%g
4238s%@top_srcdir@%$top_srcdir%g
4239s%@INSTALL@%$INSTALL%g
4240" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4241fi; done
4242rm -f conftest.s*
4243
4244# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4245# NAME is the cpp macro being defined and VALUE is the value it is being given.
4246#
4247# ac_d sets the value in "#define NAME VALUE" lines.
4248ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4249ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4250ac_dC='\3'
4251ac_dD='%g'
4252# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4253ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4254ac_uB='\([ ]\)%\1#\2define\3'
4255ac_uC=' '
4256ac_uD='\4%g'
4257# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4258ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4259ac_eB='$%\1#\2define\3'
4260ac_eC=' '
4261ac_eD='%g'
4262
4263if test "${CONFIG_HEADERS+set}" != set; then
4264EOF
4265cat >> $CONFIG_STATUS <<EOF
4266 CONFIG_HEADERS="config.h"
4267EOF
4268cat >> $CONFIG_STATUS <<\EOF
4269fi
4270for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4271 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4272 case "$ac_file" in
4273 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4274 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4275 *) ac_file_in="${ac_file}.in" ;;
4276 esac
4277
4278 echo creating $ac_file
4279
4280 rm -f conftest.frag conftest.in conftest.out
4281 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4282 cat $ac_file_inputs > conftest.in
4283
4284EOF
4285
4286# Transform confdefs.h into a sed script conftest.vals that substitutes
4287# the proper values into config.h.in to produce config.h. And first:
4288# Protect against being on the right side of a sed subst in config.status.
4289# Protect against being in an unquoted here document in config.status.
4290rm -f conftest.vals
4291cat > conftest.hdr <<\EOF
4292s/[\\&%]/\\&/g
4293s%[\\$`]%\\&%g
4294s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4295s%ac_d%ac_u%gp
4296s%ac_u%ac_e%gp
4297EOF
4298sed -n -f conftest.hdr confdefs.h > conftest.vals
4299rm -f conftest.hdr
4300
4301# This sed command replaces #undef with comments. This is necessary, for
4302# example, in the case of _POSIX_SOURCE, which is predefined and required
4303# on some systems where configure will not decide to define it.
4304cat >> conftest.vals <<\EOF
4305s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4306EOF
4307
4308# Break up conftest.vals because some shells have a limit on
4309# the size of here documents, and old seds have small limits too.
4310
4311rm -f conftest.tail
4312while :
4313do
4314 ac_lines=`grep -c . conftest.vals`
4315 # grep -c gives empty output for an empty file on some AIX systems.
4316 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4317 # Write a limited-size here document to conftest.frag.
4318 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4319 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4320 echo 'CEOF
4321 sed -f conftest.frag conftest.in > conftest.out
4322 rm -f conftest.in
4323 mv conftest.out conftest.in
4324' >> $CONFIG_STATUS
4325 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4326 rm -f conftest.vals
4327 mv conftest.tail conftest.vals
4328done
4329rm -f conftest.vals
4330
4331cat >> $CONFIG_STATUS <<\EOF
4332 rm -f conftest.frag conftest.h
4333 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4334 cat conftest.in >> conftest.h
4335 rm -f conftest.in
4336 if cmp -s $ac_file conftest.h 2>/dev/null; then
4337 echo "$ac_file is unchanged"
4338 rm -f conftest.h
4339 else
4340 # Remove last slash and all that follows it. Not all systems have dirname.
4341 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4342 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4343 # The file is in a subdirectory.
4344 test ! -d "$ac_dir" && mkdir "$ac_dir"
4345 fi
4346 rm -f $ac_file
4347 mv conftest.h $ac_file
4348 fi
4349fi; done
4350
4351EOF
4352
4353cat >> $CONFIG_STATUS <<EOF
4354ac_sources="`echo $libc_link_sources`"
4355ac_dests="`echo $libc_link_dests`"
4356EOF
4357
4358cat >> $CONFIG_STATUS <<\EOF
4359srcdir=$ac_given_srcdir
4360while test -n "$ac_sources"; do
4361 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4362 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4363
4364 echo "linking $srcdir/$ac_source to $ac_dest"
4365
4366 if test ! -r $srcdir/$ac_source; then
4367 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4368 fi
4369 rm -f $ac_dest
4370
4371 # Make relative symlinks.
4372 # Remove last slash and all that follows it. Not all systems have dirname.
4373 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4374 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4375 # The dest file is in a subdirectory.
4376 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4377 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4378 # A "../" for each directory in $ac_dest_dir_suffix.
4379 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4380 else
4381 ac_dest_dir_suffix= ac_dots=
4382 fi
4383
4384 case "$srcdir" in
4385 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4386 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4387 esac
4388
4389 # Make a symlink if possible; otherwise try a hard link.
4390 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4391 ln $srcdir/$ac_source $ac_dest; then :
4392 else
4393 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4394 fi
4395done
4396EOF
4397cat >> $CONFIG_STATUS <<EOF
c0fb8a56 4398config_vars='$config_vars'
cd6ede75
UD
4399EOF
4400cat >> $CONFIG_STATUS <<\EOF
4401
c0fb8a56
UD
4402case $CONFIG_FILES in *config.make*)
4403echo "$config_vars" >> config.make;;
4404esac
4405test -d bits || mkdir bits
cd6ede75
UD
4406exit 0
4407EOF
4408chmod +x $CONFIG_STATUS
4409rm -fr confdefs* $ac_clean_files
a808d541 4410test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
cd6ede75
UD
4411
4412if test "$no_recursion" != yes; then
4413
4414 # Remove --cache-file and --srcdir arguments so they do not pile up.
4415 ac_sub_configure_args=
4416 ac_prev=
4417 for ac_arg in $ac_configure_args; do
4418 if test -n "$ac_prev"; then
4419 ac_prev=
4420 continue
4421 fi
4422 case "$ac_arg" in
4423 -cache-file | --cache-file | --cache-fil | --cache-fi \
4424 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4425 ac_prev=cache_file ;;
4426 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4427 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
4428 ;;
4429 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4430 ac_prev=srcdir ;;
4431 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4432 ;;
4433 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
4434 esac
4435 done
4436
4437 for ac_config_dir in $add_ons; do
4438
4439 # Do not complain, so a configure script can configure whichever
4440 # parts of a large source tree are present.
4441 if test ! -d $srcdir/$ac_config_dir; then
4442 continue
4443 fi
4444
4445 echo configuring in $ac_config_dir
4446
4447 case "$srcdir" in
4448 .) ;;
4449 *)
4450 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
4451 else
4452 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
4453 fi
4454 ;;
4455 esac
4456
4457 ac_popdir=`pwd`
4458 cd $ac_config_dir
4459
4460 # A "../" for each directory in /$ac_config_dir.
4461 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4462
4463 case "$srcdir" in
4464 .) # No --srcdir option. We are building in place.
4465 ac_sub_srcdir=$srcdir ;;
4466 /*) # Absolute path.
4467 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
4468 *) # Relative path.
4469 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
4470 esac
4471
4472 # Check for guested configure; otherwise get Cygnus style configure.
4473 if test -f $ac_sub_srcdir/configure; then
a808d541 4474 ac_sub_configure=$ac_sub_srcdir/configure
cd6ede75
UD
4475 elif test -f $ac_sub_srcdir/configure.in; then
4476 ac_sub_configure=$ac_configure
4477 else
4478 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
4479 ac_sub_configure=
4480 fi
4481
4482 # The recursion is here.
4483 if test -n "$ac_sub_configure"; then
4484
4485 # Make the cache file name correct relative to the subdirectory.
4486 case "$cache_file" in
4487 /*) ac_sub_cache_file=$cache_file ;;
4488 *) # Relative path.
4489 ac_sub_cache_file="$ac_dots$cache_file" ;;
4490 esac
4491 case "$ac_given_INSTALL" in
4492 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4493 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4494 esac
4495
a808d541 4496 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
cd6ede75 4497 # The eval makes quoting arguments work.
a808d541 4498 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
cd6ede75
UD
4499 then :
4500 else
4501 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
4502 fi
4503 fi
4504
4505 cd $ac_popdir
4506 done
4507fi
4508