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