]> git.ipfire.org Git - thirdparty/glibc.git/blame - configure
Update.
[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 ;;
136d4332
UD
1018s390) base_machine=s390 machine=s390/s390-32 ;;
1019s390x) base_machine=s390 machine=s390/s390-64 ;;
0da2f50b
UD
1020sh3*) base_machine=sh machine=sh/sh3 ;;
1021sh4*) base_machine=sh machine=sh/sh4 ;;
ca34d7a7
UD
1022sparc | sparcv[67])
1023 base_machine=sparc machine=sparc/sparc32 ;;
1024sparcv8 | supersparc | hypersparc)
1025 base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
ae6b8730
RH
1026sparcv8plus | sparcv8plusa | sparcv9)
1027 base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
ca34d7a7
UD
1028sparc64 | ultrasparc)
1029 base_machine=sparc machine=sparc/sparc64 ;;
0c8b61e6 1030thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
cd6ede75
UD
1031esac
1032
1033
dfd2257a
UD
1034if test "$base_machine" = "i386"; then
1035 cat >> confdefs.h <<\EOF
1036#define USE_REGPARMS 1
1037EOF
1038
1039fi
1040
cd6ede75
UD
1041# Compute the list of sysdep directories for this configuration.
1042# This can take a while to compute.
1043sysdep_dir=$srcdir/sysdeps
1044echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
136d4332 1045echo "configure:1046: checking sysdep dirs" >&5
cd6ede75
UD
1046# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
1047os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
1048
1049case "$os" in
1050gnu*)
1051 base_os=mach/hurd ;;
1052netbsd* | 386bsd* | freebsd* | bsdi*)
1053 base_os=unix/bsd/bsd4.4 ;;
1054osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
1055 base_os=unix/bsd ;;
1056sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
1057 base_os=unix/sysv ;;
9a97d1f7
UD
1058irix6*)
1059 base_os=unix/sysv/irix6/$os ;;
cd6ede75
UD
1060solaris[2-9]*)
1061 base_os=unix/sysv/sysv4 ;;
908c3d5b
UD
1062hpux*)
1063 base_os=unix/sysv/hpux/$os ;;
f0d8cfd7
UD
1064aix4.3*)
1065 base_os=unix/sysv/aix/aix4.3 ;;
cd6ede75
UD
1066none)
1067 base_os=standalone ;;
1068*)
1069 base_os='' ;;
1070esac
1071
1072# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
1073tail=$os
1074ostry=$os
1075while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do
1076 ostry="$ostry /$o"
1077 tail=$o
1078done
1079o=`echo $tail | sed 's/[0-9]*$//'`
1080if test $o != $tail; then
1081 ostry="$ostry /$o"
1082fi
1083# For linux-gnu, try linux-gnu, then linux.
1084o=`echo $tail | sed 's/-.*$//'`
1085if test $o != $tail; then
1086 ostry="$ostry /$o"
1087fi
1088
1089# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
1090base=
1091tail=$base_os
1092while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
1093 set $b
1094 base="$base /$1"
1095 tail="$2"
1096done
1097
ae6b8730 1098# For sparc/sparc32, try sparc/sparc32 and then sparc.
cd6ede75
UD
1099mach=
1100tail=$machine
1101while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
1102 set $m
1103 # Prepend the machine's FPU directory unless --without-fp.
1104 if test "$with_fp" = yes; then
1105 mach="$mach /$1/fpu"
1106 fi
1107 mach="$mach /$1"
1108 tail="$2"
1109done
1110
1111
1112# Find what sysdep directories exist.
1113sysnames=
1114IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1115for d in $add_ons_pfx ''; do
1116 for b in $base ''; do
1117 for m0 in $mach ''; do
1118 for v in /$vendor ''; do
ae828bc6 1119 test "$v" = / && continue
cd6ede75 1120 for o in /$ostry ''; do
ae828bc6 1121 test "$o" = / && continue
cd6ede75
UD
1122 for m in $mach ''; do
1123 if test "$m0$b$v$o$m"; then
1124 try="${d}sysdeps$m0$b$v$o$m"
1125 test -n "$enable_debug_configure" &&
1126 echo "$0 DEBUG: try $try" >&2
9c4c0024 1127 if test -d $srcdir/$try; then
cd6ede75
UD
1128 sysnames="$sysnames $try"
1129 { test -n "$o" || test -n "$b"; } && os_used=t
1130 { test -n "$m" || test -n "$m0"; } && machine_used=t
1131 fi
1132 fi
1133 done
1134 done
1135 done
1136 done
1137 done
1138done
1139IFS="$ac_save_ifs"
1140
1141if test -z "$os_used" && test "$os" != none; then
1142 { echo "configure: error: Operating system $os is not supported." 1>&2; exit 1; }
1143fi
1144if test -z "$machine_used" && test "$machine" != none; then
1145 { echo "configure: error: The $machine is not supported." 1>&2; exit 1; }
1146fi
1147
1148# We have now validated the configuration.
1149
1150
1151# If using ELF, look for an `elf' subdirectory of each machine directory.
1152# We prepend these rather than inserting them whereever the machine appears
1153# because things specified by the machine's ELF ABI should override
1154# OS-specific things, and should always be the same for any OS on the
1155# machine (otherwise what's the point of an ABI?).
1156if test "$elf" = yes; then
1157 elf_dirs=
1158 for d in $add_ons_pfx ''; do
cd6ede75 1159 for m in $mach; do
9c4c0024 1160 if test -d $srcdir/${d}sysdeps$m/elf; then
cd6ede75
UD
1161 elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
1162 fi
1163 done
1164 done
1165 sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
1166fi
1167
1168
1169# Expand the list of system names into a full list of directories
1170# from each element's parent name and Implies file (if present).
1171set $sysnames
1172names=
1173while test $# -gt 0; do
1174 name=$1
1175 shift
1176
1177 case " $names " in *" $name "*)
1178 # Already in the list.
1179 continue
1180 esac
1181
1182 # Report each name as we discover it, so there is no long pause in output.
1183 echo $ac_n "$name $ac_c" >&6
1184
1185 name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
1186
1187 case $name in
1188 /*) xsrcdir= ;;
1189 *) xsrcdir=$srcdir/ ;;
1190 esac
1191 test -n "$enable_debug_configure" &&
1192 echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2
1193
1194 if test -f $xsrcdir$name/Implies; then
1195 # Collect more names from the `Implies' file (removing comments).
1196 implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
1197 implied=
1198 for x in $implied_candidate; do
1199 if test -d $xsrcdir$name_base/$x; then
1200 implied="$implied $name_base/$x";
1201 else
1202 echo "configure: warning: $name/Implies specifies nonexistent $x" 1>&2
1203 fi
1204 done
1205 else
1206 implied=
1207 fi
1208
1209 # Add NAME to the list of names.
1210 names="$names $name"
1211
1212 # Find the parent of NAME, using the empty string if it has none.
1213 parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
1214
1215 # Add the names implied by NAME, and NAME's parent (if it has one), to
1216 # the list of names to be processed (the argument list). We prepend the
1217 # implied names to the list and append the parent. We want implied
1218 # directories to come before further directories inferred from the
1219 # configuration components; this ensures that for sysv4, unix/common
1220 # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
1221 # after sysv4).
1222 sysnames="`echo $implied $* $parent`"
1223 test -n "$sysnames" && set $sysnames
1224done
1225
1226# Add the default directories.
a3a4a74e 1227default_sysnames=sysdeps/generic
2de7874e 1228if test "$elf" = yes; then
a3a4a74e 1229 default_sysnames="sysdeps/generic/elf $default_sysnames"
2de7874e 1230fi
a3a4a74e 1231sysnames="$names $default_sysnames"
cd6ede75
UD
1232
1233# The other names were emitted during the scan.
a3a4a74e 1234echo "$ac_t""$default_sysnames" 1>&6
cd6ede75
UD
1235
1236
1237### Locate tools.
1238
1239# Find a good install program. We prefer a C program (faster),
1240# so one script is as good as another. But avoid the broken or
1241# incompatible versions:
1242# SysV /etc/install, /usr/sbin/install
1243# SunOS /usr/etc/install
1244# IRIX /sbin/install
1245# AIX /bin/install
5c2a0669 1246# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
cd6ede75
UD
1247# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1248# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1249# ./install, which can be erroneously created by make from ./install.sh.
1250echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
136d4332 1251echo "configure:1252: checking for a BSD compatible install" >&5
cd6ede75 1252if test -z "$INSTALL"; then
a808d541 1253if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
cd6ede75
UD
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255else
5c2a0669 1256 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
cd6ede75
UD
1257 for ac_dir in $PATH; do
1258 # Account for people who put trailing slashes in PATH elements.
1259 case "$ac_dir/" in
1260 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1261 *)
1262 # OSF1 and SCO ODT 3.0 have their own names for install.
5c2a0669
UD
1263 # Don't use installbsd from OSF since it installs stuff as root
1264 # by default.
1265 for ac_prog in ginstall scoinst install; do
cd6ede75
UD
1266 if test -f $ac_dir/$ac_prog; then
1267 if test $ac_prog = install &&
1268 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1269 # AIX install. It has an incompatible calling convention.
cd6ede75
UD
1270 :
1271 else
1272 ac_cv_path_install="$ac_dir/$ac_prog -c"
1273 break 2
1274 fi
1275 fi
1276 done
1277 ;;
1278 esac
1279 done
1280 IFS="$ac_save_IFS"
1281
1282fi
1283 if test "${ac_cv_path_install+set}" = set; then
1284 INSTALL="$ac_cv_path_install"
1285 else
1286 # As a last resort, use the slow shell script. We don't cache a
1287 # path for INSTALL within a source directory, because that will
1288 # break other packages using the cache if that directory is
1289 # removed, or if the path is relative.
1290 INSTALL="$ac_install_sh"
1291 fi
1292fi
1293echo "$ac_t""$INSTALL" 1>&6
1294
1295# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1296# It thinks the first close brace ends the variable substitution.
1297test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1298
a808d541 1299test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
5c2a0669 1300
cd6ede75
UD
1301test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1302
ed9c47d9 1303if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
cd6ede75 1304 # The makefiles need to use a different form to find it in $srcdir.
ed9c47d9 1305 INSTALL='\$(..)./scripts/install-sh -c'
cd6ede75
UD
1306fi
1307echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
136d4332 1308echo "configure:1309: checking whether ln -s works" >&5
a808d541 1309if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
cd6ede75
UD
1310 echo $ac_n "(cached) $ac_c" 1>&6
1311else
1312 rm -f conftestdata
1313if ln -s X conftestdata 2>/dev/null
1314then
1315 rm -f conftestdata
1316 ac_cv_prog_LN_S="ln -s"
1317else
1318 ac_cv_prog_LN_S=ln
1319fi
1320fi
1321LN_S="$ac_cv_prog_LN_S"
1322if test "$ac_cv_prog_LN_S" = "ln -s"; then
1323 echo "$ac_t""yes" 1>&6
1324else
1325 echo "$ac_t""no" 1>&6
1326fi
1327
63bda0c1 1328
c218729d
UD
1329# We need the physical current working directory. We cannot use the
1330# "pwd -P" shell builtin since that's not portable. Instead we try to
1331# find a pwd binary. Note that assigning to the PWD environment
1332# variable might have some interesting side effects, so we don't do
1333# that.
1334# Extract the first word of "pwd", so it can be a program name with args.
1335set dummy pwd; ac_word=$2
1336echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1337echo "configure:1338: checking for $ac_word" >&5
c218729d
UD
1338if eval "test \"`echo '$''{'ac_cv_path_PWD_P'+set}'`\" = set"; then
1339 echo $ac_n "(cached) $ac_c" 1>&6
1340else
1341 case "$PWD_P" in
1342 /*)
1343 ac_cv_path_PWD_P="$PWD_P" # Let the user override the test with a path.
1344 ;;
1345 ?:/*)
1346 ac_cv_path_PWD_P="$PWD_P" # Let the user override the test with a dos path.
1347 ;;
1348 *)
1349 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1350 ac_dummy="$PATH"
1351 for ac_dir in $ac_dummy; do
1352 test -z "$ac_dir" && ac_dir=.
1353 if test -f $ac_dir/$ac_word; then
1354 ac_cv_path_PWD_P="$ac_dir/$ac_word"
1355 break
1356 fi
1357 done
1358 IFS="$ac_save_ifs"
1359 test -z "$ac_cv_path_PWD_P" && ac_cv_path_PWD_P="no"
1360 ;;
1361esac
1362fi
1363PWD_P="$ac_cv_path_PWD_P"
1364if test -n "$PWD_P"; then
1365 echo "$ac_t""$PWD_P" 1>&6
1366else
1367 echo "$ac_t""no" 1>&6
1368fi
1369
1370if test "$PWD_P" = no; then
1371 { echo "configure: error: *** A pwd binary could not be found." 1>&2; exit 1; }
1372fi
1373
63bda0c1 1374# These programs are version sensitive.
4bca4c17 1375echo $ac_n "checking build system type""... $ac_c" 1>&6
136d4332 1376echo "configure:1377: checking build system type" >&5
a808d541
UD
1377
1378build_alias=$build
1379case "$build_alias" in
1380NONE)
1381 case $nonopt in
1382 NONE) build_alias=$host_alias ;;
1383 *) build_alias=$nonopt ;;
1384 esac ;;
1385esac
4bca4c17 1386
a808d541
UD
1387build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1388build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1389build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1390build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1391echo "$ac_t""$build" 1>&6
4bca4c17
UD
1392
1393if test $host != $build; then
1394 ac_tool_prefix=${host_alias}-
1395else
1396 ac_tool_prefix=
1397fi
1398
1399for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
1400do
1401# Extract the first word of "$ac_prog", so it can be a program name with args.
1402set dummy $ac_prog; ac_word=$2
1403echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1404echo "configure:1405: checking for $ac_word" >&5
a808d541 1405if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
cd6ede75
UD
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407else
63bda0c1
UD
1408 if test -n "$CC"; then
1409 ac_cv_prog_CC="$CC" # Let the user override the test.
cd6ede75 1410else
5c2a0669
UD
1411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1412 ac_dummy="$PATH"
1413 for ac_dir in $ac_dummy; do
4bca4c17
UD
1414 test -z "$ac_dir" && ac_dir=.
1415 if test -f $ac_dir/$ac_word; then
1416 ac_cv_prog_CC="$ac_prog"
1417 break
1418 fi
cd6ede75
UD
1419 done
1420 IFS="$ac_save_ifs"
1421fi
1422fi
4bca4c17
UD
1423CC="$ac_cv_prog_CC"
1424if test -n "$CC"; then
1425 echo "$ac_t""$CC" 1>&6
1426else
cd6ede75 1427 echo "$ac_t""no" 1>&6
4bca4c17
UD
1428fi
1429
1430test -n "$CC" && break
1431done
1432
1433if test -z "$CC"; then
1434 ac_verc_fail=yes
63bda0c1 1435else
4bca4c17
UD
1436 # Found it, now check the version.
1437 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
136d4332 1438echo "configure:1439: checking version of $CC" >&5
9dfa9a5a 1439 ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
4bca4c17
UD
1440 case $ac_prog_version in
1441 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
d60a7756 1442 *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
4bca4c17
UD
1443 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1444 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1445
63bda0c1 1446 esac
4bca4c17
UD
1447 echo "$ac_t""$ac_prog_version" 1>&6
1448fi
1449if test $ac_verc_fail = yes; then
1450 critic_missing=t
ae828bc6
UD
1451fi
1452
22e65f8f 1453for ac_prog in gnumake gmake make
4bca4c17
UD
1454do
1455# Extract the first word of "$ac_prog", so it can be a program name with args.
1456set dummy $ac_prog; ac_word=$2
1457echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1458echo "configure:1459: checking for $ac_word" >&5
a808d541 1459if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
04be94a8
UD
1460 echo $ac_n "(cached) $ac_c" 1>&6
1461else
63bda0c1
UD
1462 if test -n "$MAKE"; then
1463 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
04be94a8 1464else
5c2a0669
UD
1465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1466 ac_dummy="$PATH"
1467 for ac_dir in $ac_dummy; do
4bca4c17
UD
1468 test -z "$ac_dir" && ac_dir=.
1469 if test -f $ac_dir/$ac_word; then
1470 ac_cv_prog_MAKE="$ac_prog"
1471 break
1472 fi
04be94a8
UD
1473 done
1474 IFS="$ac_save_ifs"
1475fi
1476fi
4bca4c17
UD
1477MAKE="$ac_cv_prog_MAKE"
1478if test -n "$MAKE"; then
1479 echo "$ac_t""$MAKE" 1>&6
1480else
04be94a8 1481 echo "$ac_t""no" 1>&6
4bca4c17
UD
1482fi
1483
1484test -n "$MAKE" && break
1485done
1486
1487if test -z "$MAKE"; then
1488 ac_verc_fail=yes
63bda0c1 1489else
4bca4c17
UD
1490 # Found it, now check the version.
1491 echo $ac_n "checking version of $MAKE""... $ac_c" 1>&6
136d4332 1492echo "configure:1493: checking version of $MAKE" >&5
8fc1e2ca 1493 ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
4bca4c17
UD
1494 case $ac_prog_version in
1495 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2bbc70d5 1496 3.79* | 3.[89]*)
4bca4c17
UD
1497 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1498 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1499
63bda0c1 1500 esac
4bca4c17
UD
1501 echo "$ac_t""$ac_prog_version" 1>&6
1502fi
1503if test $ac_verc_fail = yes; then
1504 critic_missing=t
04be94a8 1505fi
cd6ede75 1506
63bda0c1 1507
22e65f8f 1508for ac_prog in gnumsgfmt gmsgfmt msgfmt
4bca4c17
UD
1509do
1510# Extract the first word of "$ac_prog", so it can be a program name with args.
1511set dummy $ac_prog; ac_word=$2
1512echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1513echo "configure:1514: checking for $ac_word" >&5
a808d541 1514if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
cd6ede75
UD
1515 echo $ac_n "(cached) $ac_c" 1>&6
1516else
63bda0c1
UD
1517 if test -n "$MSGFMT"; then
1518 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
cd6ede75 1519else
5c2a0669
UD
1520 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1521 ac_dummy="$PATH"
1522 for ac_dir in $ac_dummy; do
4bca4c17
UD
1523 test -z "$ac_dir" && ac_dir=.
1524 if test -f $ac_dir/$ac_word; then
1525 ac_cv_prog_MSGFMT="$ac_prog"
1526 break
1527 fi
cd6ede75
UD
1528 done
1529 IFS="$ac_save_ifs"
1530fi
1531fi
4bca4c17
UD
1532MSGFMT="$ac_cv_prog_MSGFMT"
1533if test -n "$MSGFMT"; then
1534 echo "$ac_t""$MSGFMT" 1>&6
1535else
cd6ede75 1536 echo "$ac_t""no" 1>&6
4bca4c17
UD
1537fi
1538
1539test -n "$MSGFMT" && break
1540done
1541
1542if test -z "$MSGFMT"; then
1543 ac_verc_fail=yes
63bda0c1 1544else
4bca4c17
UD
1545 # Found it, now check the version.
1546 echo $ac_n "checking version of $MSGFMT""... $ac_c" 1>&6
136d4332 1547echo "configure:1548: checking version of $MSGFMT" >&5
bdd421cc 1548 ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4bca4c17
UD
1549 case $ac_prog_version in
1550 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
bdd421cc 1551 0.[1-9][0-9].* | [1-9].*)
4bca4c17
UD
1552 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1553 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1554
63bda0c1 1555 esac
4bca4c17
UD
1556 echo "$ac_t""$ac_prog_version" 1>&6
1557fi
1558if test $ac_verc_fail = yes; then
1559 MSGFMT=: aux_missing=t
cd6ede75
UD
1560fi
1561
4bca4c17
UD
1562for ac_prog in makeinfo
1563do
1564# Extract the first word of "$ac_prog", so it can be a program name with args.
1565set dummy $ac_prog; ac_word=$2
1566echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1567echo "configure:1568: checking for $ac_word" >&5
a808d541 1568if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
cd6ede75
UD
1569 echo $ac_n "(cached) $ac_c" 1>&6
1570else
63bda0c1
UD
1571 if test -n "$MAKEINFO"; then
1572 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
cd6ede75 1573else
5c2a0669
UD
1574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1575 ac_dummy="$PATH"
1576 for ac_dir in $ac_dummy; do
4bca4c17
UD
1577 test -z "$ac_dir" && ac_dir=.
1578 if test -f $ac_dir/$ac_word; then
1579 ac_cv_prog_MAKEINFO="$ac_prog"
1580 break
1581 fi
cd6ede75
UD
1582 done
1583 IFS="$ac_save_ifs"
cd6ede75
UD
1584fi
1585fi
4bca4c17
UD
1586MAKEINFO="$ac_cv_prog_MAKEINFO"
1587if test -n "$MAKEINFO"; then
1588 echo "$ac_t""$MAKEINFO" 1>&6
1589else
cd6ede75 1590 echo "$ac_t""no" 1>&6
4bca4c17
UD
1591fi
1592
1593test -n "$MAKEINFO" && break
1594done
1595
1596if test -z "$MAKEINFO"; then
1597 ac_verc_fail=yes
63bda0c1 1598else
4bca4c17
UD
1599 # Found it, now check the version.
1600 echo $ac_n "checking version of $MAKEINFO""... $ac_c" 1>&6
136d4332 1601echo "configure:1602: checking version of $MAKEINFO" >&5
be1d9d95 1602 ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
4bca4c17
UD
1603 case $ac_prog_version in
1604 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1468be21 1605 4.*)
4bca4c17
UD
1606 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1607 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1608
63bda0c1 1609 esac
4bca4c17
UD
1610 echo "$ac_t""$ac_prog_version" 1>&6
1611fi
1612if test $ac_verc_fail = yes; then
1613 MAKEINFO=: aux_missing=t
cd6ede75
UD
1614fi
1615
aec103d3
UD
1616for ac_prog in gsed sed
1617do
1618# Extract the first word of "$ac_prog", so it can be a program name with args.
1619set dummy $ac_prog; ac_word=$2
1620echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1621echo "configure:1622: checking for $ac_word" >&5
a808d541 1622if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then
aec103d3
UD
1623 echo $ac_n "(cached) $ac_c" 1>&6
1624else
1625 if test -n "$SED"; then
1626 ac_cv_prog_SED="$SED" # Let the user override the test.
1627else
1628 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1629 ac_dummy="$PATH"
1630 for ac_dir in $ac_dummy; do
1631 test -z "$ac_dir" && ac_dir=.
1632 if test -f $ac_dir/$ac_word; then
1633 ac_cv_prog_SED="$ac_prog"
1634 break
1635 fi
1636 done
1637 IFS="$ac_save_ifs"
1638fi
1639fi
1640SED="$ac_cv_prog_SED"
1641if test -n "$SED"; then
1642 echo "$ac_t""$SED" 1>&6
1643else
1644 echo "$ac_t""no" 1>&6
1645fi
1646
1647test -n "$SED" && break
1648done
1649
1650if test -z "$SED"; then
1651 ac_verc_fail=yes
1652else
1653 # Found it, now check the version.
1654 echo $ac_n "checking version of $SED""... $ac_c" 1>&6
136d4332 1655echo "configure:1656: checking version of $SED" >&5
aec103d3
UD
1656 ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
1657 case $ac_prog_version in
1658 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
ce19d417 1659 3.0[2-9]*|3.[1-9]*|[4-9]*)
aec103d3
UD
1660 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1661 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1662
1663 esac
1664 echo "$ac_t""$ac_prog_version" 1>&6
1665fi
1666if test $ac_verc_fail = yes; then
1667 SED=: aux_missing=t
1668fi
1669
cd6ede75 1670
63bda0c1
UD
1671
1672echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
136d4332 1673echo "configure:1674: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
a808d541 1674if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then
63bda0c1
UD
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676else
1677
cd6ede75
UD
1678ac_ext=c
1679# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1680ac_cpp='$CPP $CPPFLAGS'
1681ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5c2a0669 1682ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cd6ede75
UD
1683cross_compiling=$ac_cv_prog_cc_cross
1684
5c2a0669
UD
1685cat > conftest.$ac_ext << EOF
1686
136d4332 1687#line 1688 "configure"
cd6ede75 1688#include "confdefs.h"
5c2a0669 1689
cd6ede75
UD
1690main(){return(0);}
1691EOF
136d4332 1692if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cd6ede75
UD
1693 ac_cv_prog_cc_works=yes
1694 # If we can't run a trivial program, we are probably using a cross compiler.
1695 if (./conftest; exit) 2>/dev/null; then
1696 ac_cv_prog_cc_cross=no
1697 else
1698 ac_cv_prog_cc_cross=yes
1699 fi
1700else
1701 echo "configure: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
1703 ac_cv_prog_cc_works=no
1704fi
1705rm -fr conftest*
5c2a0669
UD
1706ac_ext=c
1707# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1708ac_cpp='$CPP $CPPFLAGS'
1709ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1710ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1711cross_compiling=$ac_cv_prog_cc_cross
cd6ede75 1712
63bda0c1
UD
1713fi
1714
cd6ede75
UD
1715echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1716if test $ac_cv_prog_cc_works = no; then
1717 cross_linkable=no
1718 ac_cv_prog_cc_cross=yes
1719else
1720 cross_linkable=yes
1721fi
1722echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
136d4332 1723echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
a808d541 1724if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then
63bda0c1
UD
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726else
1727 :
1728fi
1729
cd6ede75
UD
1730echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1731
1732cross_compiling=$ac_cv_prog_cc_cross
1733
1734echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
136d4332 1735echo "configure:1736: checking whether we are using GNU C" >&5
a808d541 1736if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
cd6ede75
UD
1737 echo $ac_n "(cached) $ac_c" 1>&6
1738else
1739 cat > conftest.c <<EOF
1740#ifdef __GNUC__
1741 yes;
1742#endif
1743EOF
136d4332 1744if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
cd6ede75
UD
1745 ac_cv_prog_gcc=yes
1746else
1747 ac_cv_prog_gcc=no
1748fi
1749fi
1750
1751echo "$ac_t""$ac_cv_prog_gcc" 1>&6
63bda0c1 1752if test $ac_cv_prog_gcc != yes; then
cd6ede75
UD
1753 { echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
1754fi
1755
1756echo $ac_n "checking build system type""... $ac_c" 1>&6
136d4332 1757echo "configure:1758: checking build system type" >&5
a808d541
UD
1758
1759build_alias=$build
1760case "$build_alias" in
1761NONE)
1762 case $nonopt in
1763 NONE) build_alias=$host_alias ;;
1764 *) build_alias=$nonopt ;;
1765 esac ;;
1766esac
cd6ede75 1767
a808d541
UD
1768build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1769build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1770build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1771build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1772echo "$ac_t""$build" 1>&6
cd6ede75
UD
1773
1774if test $host != $build; then
1775 for ac_prog in gcc cc
1776do
1777# Extract the first word of "$ac_prog", so it can be a program name with args.
1778set dummy $ac_prog; ac_word=$2
1779echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1780echo "configure:1781: checking for $ac_word" >&5
a808d541 1781if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
cd6ede75
UD
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783else
1784 if test -n "$BUILD_CC"; then
1785 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1786else
5c2a0669
UD
1787 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
cd6ede75
UD
1790 test -z "$ac_dir" && ac_dir=.
1791 if test -f $ac_dir/$ac_word; then
1792 ac_cv_prog_BUILD_CC="$ac_prog"
1793 break
1794 fi
1795 done
1796 IFS="$ac_save_ifs"
1797fi
1798fi
1799BUILD_CC="$ac_cv_prog_BUILD_CC"
1800if test -n "$BUILD_CC"; then
1801 echo "$ac_t""$BUILD_CC" 1>&6
1802else
1803 echo "$ac_t""no" 1>&6
1804fi
1805
1806test -n "$BUILD_CC" && break
1807done
1808
1809fi
1810
1811echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
136d4332 1812echo "configure:1813: checking how to run the C preprocessor" >&5
cd6ede75
UD
1813# On Suns, sometimes $CPP names a directory.
1814if test -n "$CPP" && test -d "$CPP"; then
1815 CPP=
1816fi
1817if test -z "$CPP"; then
a808d541 1818if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
cd6ede75
UD
1819 echo $ac_n "(cached) $ac_c" 1>&6
1820else
1821 # This must be in double quotes, not single quotes, because CPP may get
1822 # substituted into the Makefile and "${CC-cc}" will confuse make.
1823 CPP="${CC-cc} -E"
1824 # On the NeXT, cc -E runs the code through the compiler's parser,
1825 # not just through cpp.
1826 cat > conftest.$ac_ext <<EOF
136d4332 1827#line 1828 "configure"
cd6ede75
UD
1828#include "confdefs.h"
1829#include <assert.h>
1830Syntax Error
1831EOF
1832ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
136d4332 1833{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669 1834ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
cd6ede75
UD
1835if test -z "$ac_err"; then
1836 :
1837else
1838 echo "$ac_err" >&5
1839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 rm -rf conftest*
1842 CPP="${CC-cc} -E -traditional-cpp"
1843 cat > conftest.$ac_ext <<EOF
136d4332 1844#line 1845 "configure"
cd6ede75
UD
1845#include "confdefs.h"
1846#include <assert.h>
1847Syntax Error
1848EOF
1849ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
136d4332 1850{ (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669
UD
1851ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1852if test -z "$ac_err"; then
1853 :
1854else
1855 echo "$ac_err" >&5
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 rm -rf conftest*
1859 CPP="${CC-cc} -nologo -E"
1860 cat > conftest.$ac_ext <<EOF
136d4332 1861#line 1862 "configure"
5c2a0669
UD
1862#include "confdefs.h"
1863#include <assert.h>
1864Syntax Error
1865EOF
1866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
136d4332 1867{ (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c2a0669 1868ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
cd6ede75
UD
1869if test -z "$ac_err"; then
1870 :
1871else
1872 echo "$ac_err" >&5
1873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 rm -rf conftest*
1876 CPP=/lib/cpp
1877fi
1878rm -f conftest*
1879fi
5c2a0669
UD
1880rm -f conftest*
1881fi
cd6ede75
UD
1882rm -f conftest*
1883 ac_cv_prog_CPP="$CPP"
1884fi
1885 CPP="$ac_cv_prog_CPP"
1886else
1887 ac_cv_prog_CPP="$CPP"
1888fi
1889echo "$ac_t""$CPP" 1>&6
1890
650425ce
UD
1891# Was a --with-binutils option given?
1892if test -n "$path_binutils"; then
1893 # Make absolute; ensure a single trailing slash.
1894 path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
63bda0c1 1895 CC="$CC -B$path_binutils"
650425ce 1896fi
27a5bb33
UD
1897AS=`$CC -print-prog-name=as`
1898LD=`$CC -print-prog-name=ld`
5edb9387 1899AR=`$CC -print-prog-name=ar`
cd6ede75
UD
1900
1901
5edb9387
UD
1902# ranlib has to be treated a bit differently since it might not exist at all.
1903RANLIB=`$CC -print-prog-name=ranlib`
1904if test $RANLIB = ranlib; then
1905# This extra check has to happen since gcc simply echos the parameter in
1906# case it cannot find the value in its own directories.
cd6ede75
UD
1907# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1908set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1909echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1910echo "configure:1911: checking for $ac_word" >&5
a808d541 1911if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
cd6ede75
UD
1912 echo $ac_n "(cached) $ac_c" 1>&6
1913else
1914 if test -n "$RANLIB"; then
1915 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1916else
5c2a0669
UD
1917 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1918 ac_dummy="$PATH"
1919 for ac_dir in $ac_dummy; do
cd6ede75
UD
1920 test -z "$ac_dir" && ac_dir=.
1921 if test -f $ac_dir/$ac_word; then
1922 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1923 break
1924 fi
1925 done
1926 IFS="$ac_save_ifs"
1927fi
1928fi
1929RANLIB="$ac_cv_prog_RANLIB"
1930if test -n "$RANLIB"; then
1931 echo "$ac_t""$RANLIB" 1>&6
1932else
1933 echo "$ac_t""no" 1>&6
1934fi
1935
1936
1937if test -z "$ac_cv_prog_RANLIB"; then
1938if test -n "$ac_tool_prefix"; then
1939 # Extract the first word of "ranlib", so it can be a program name with args.
1940set dummy ranlib; ac_word=$2
1941echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 1942echo "configure:1943: checking for $ac_word" >&5
a808d541 1943if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
cd6ede75
UD
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945else
1946 if test -n "$RANLIB"; then
1947 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1948else
5c2a0669
UD
1949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1950 ac_dummy="$PATH"
1951 for ac_dir in $ac_dummy; do
cd6ede75
UD
1952 test -z "$ac_dir" && ac_dir=.
1953 if test -f $ac_dir/$ac_word; then
1954 ac_cv_prog_RANLIB="ranlib"
1955 break
1956 fi
1957 done
1958 IFS="$ac_save_ifs"
1959 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1960fi
1961fi
1962RANLIB="$ac_cv_prog_RANLIB"
1963if test -n "$RANLIB"; then
1964 echo "$ac_t""$RANLIB" 1>&6
1965else
1966 echo "$ac_t""no" 1>&6
1967fi
1968
1969else
1970 RANLIB=":"
1971fi
1972fi
1973
5edb9387
UD
1974fi
1975
1976
1977# Determine whether we are using GNU binutils.
1978echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6
136d4332 1979echo "configure:1980: checking whether $AS is GNU as" >&5
a808d541 1980if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then
5edb9387
UD
1981 echo $ac_n "(cached) $ac_c" 1>&6
1982else
1983 # Most GNU programs take a -v and spit out some text including
1984# the word 'GNU'. Some try to read stdin, so give them /dev/null.
1985if $AS -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
1986 libc_cv_prog_as_gnu=yes
1987else
1988 libc_cv_prog_as_gnu=no
1989fi
1990rm -fr contest*
1991fi
1992
1993echo "$ac_t""$libc_cv_prog_as_gnu" 1>&6
1994rm -f a.out
1995gnu_as=$libc_cv_prog_as_gnu
1996
1997echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6
136d4332 1998echo "configure:1999: checking whether $LD is GNU ld" >&5
a808d541 1999if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then
5edb9387
UD
2000 echo $ac_n "(cached) $ac_c" 1>&6
2001else
2002 # Most GNU programs take a -v and spit out some text including
2003# the word 'GNU'. Some try to read stdin, so give them /dev/null.
2004if $LD -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
2005 libc_cv_prog_ld_gnu=yes
2006else
2007 libc_cv_prog_ld_gnu=no
2008fi
2009rm -fr contest*
2010fi
2011
2012echo "$ac_t""$libc_cv_prog_ld_gnu" 1>&6
2013gnu_ld=$libc_cv_prog_ld_gnu
2014
4bca4c17
UD
2015# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
2016set dummy ${ac_tool_prefix}mig; ac_word=$2
2017echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2018echo "configure:2019: checking for $ac_word" >&5
a808d541 2019if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
4bca4c17
UD
2020 echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022 if test -n "$MIG"; then
2023 ac_cv_prog_MIG="$MIG" # Let the user override the test.
2024else
5c2a0669
UD
2025 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2026 ac_dummy="$PATH"
2027 for ac_dir in $ac_dummy; do
4bca4c17
UD
2028 test -z "$ac_dir" && ac_dir=.
2029 if test -f $ac_dir/$ac_word; then
2030 ac_cv_prog_MIG="${ac_tool_prefix}mig"
2031 break
2032 fi
2033 done
2034 IFS="$ac_save_ifs"
2035 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
2036fi
2037fi
2038MIG="$ac_cv_prog_MIG"
2039if test -n "$MIG"; then
2040 echo "$ac_t""$MIG" 1>&6
2041else
2042 echo "$ac_t""no" 1>&6
2043fi
2044
2045
2046
cd6ede75 2047
ea9f119b 2048# Accept binutils 2.10.1 or newer (and also any ia64 2.9 version)
45ef592d
UD
2049# XXX Commented out because it filters out too many good versions.
2050# XXX --drepper
2051# AC_CHECK_PROG_VER(AS, $AS, --version,
2052# [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
2053# [2.10.[1-9]* | 2.1[1-9]* | 2.9-ia64-*], AS=: critic_missing=t)
ea9f119b
AJ
2054
2055if test -n "$critic_missing"; then
2056{ echo "configure: error:
2057*** Some critical program is missing or too old.
2058*** Check the INSTALL file for required versions." 1>&2; exit 1; }
2059fi
2060
2061test -n "$aux_missing" && echo "configure: warning:
2062*** An auxiliary program is missing or too old;
2063*** some features will be disabled.
2064*** Check the INSTALL file for required versions." 1>&2
2065
2066# glibcbug.in wants to know the compiler version.
2067CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'`
2068
2069
3c720987
UD
2070# if using special system headers, find out the compiler's sekrit
2071# header directory and add that to the list. NOTE: Only does the right
2072# thing on a system that doesn't need fixincludes. (Not presently a problem.)
2073if test -n "$sysheaders"; then
2074 ccheaders=`$CC -print-file-name=include`
2075 SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $sysheaders"
2076fi
2077
2078
f89ac85c
UD
2079# check if ranlib is necessary
2080echo $ac_n "checking whether ranlib is necessary""... $ac_c" 1>&6
136d4332 2081echo "configure:2082: checking whether ranlib is necessary" >&5
a808d541 2082if eval "test \"`echo '$''{'libc_cv_ranlib_necessary'+set}'`\" = set"; then
f38931a9
UD
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084else
f89ac85c
UD
2085 cat > conftest.c <<EOF
2086int a;
2087char b;
2088void c(void) {}
2089EOF
2090$CC $CFLAGS -c conftest.c
2091$AR cr conftest.a conftest.c
2092cp conftest.a conftest2.a
2093$RANLIB conftest.a
2094if cmp -s conftest.a conftest2.a; then
2095 libc_cv_ranlib_necessary=no
f38931a9 2096else
f89ac85c 2097 libc_cv_ranlib_necessary=yes
f38931a9 2098fi
f89ac85c 2099rm -rf conftest*
f38931a9
UD
2100fi
2101
f89ac85c
UD
2102echo "$ac_t""$libc_cv_ranlib_necessary" 1>&6
2103if test "$libc_cv_ranlib_necessary" = no; then
2104 RANLIB=:
2105fi
f38931a9 2106
3911660e
UD
2107# Test if LD_LIBRARY_PATH contains the notation for the current directory
2108# since this would lead to problems installing/building glibc.
2109# LD_LIBRARY_PATH contains the current directory if one of the following
2110# is true:
2111# - one of the terminals (":" and ";") is the first or last sign
2112# - two terminals occur directly after each other
2113# - the path contains an element with a dot in it
2114echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6
136d4332 2115echo "configure:2116: checking LD_LIBRARY_PATH variable" >&5
3911660e
UD
2116case ${LD_LIBRARY_PATH} in
2117 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
b3a86ae1 2118 ld_library_path_setting="contains current directory"
3911660e
UD
2119 ;;
2120 *)
2121 ld_library_path_setting="ok"
2122 ;;
2123esac
2124echo "$ac_t""$ld_library_path_setting" 1>&6
2125if test "$ld_library_path_setting" != "ok"; then
63bda0c1
UD
2126{ echo "configure: error:
2127*** LD_LIBRARY_PATH shouldn't contain the current directory when
2128*** building glibc. Please change the environment variable
2129*** and run configure again." 1>&2; exit 1; }
3911660e
UD
2130fi
2131
cd6ede75
UD
2132# Extract the first word of "bash", so it can be a program name with args.
2133set dummy bash; ac_word=$2
2134echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2135echo "configure:2136: checking for $ac_word" >&5
a808d541 2136if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
cd6ede75
UD
2137 echo $ac_n "(cached) $ac_c" 1>&6
2138else
2139 case "$BASH" in
2140 /*)
2141 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
2142 ;;
5c2a0669
UD
2143 ?:/*)
2144 ac_cv_path_BASH="$BASH" # Let the user override the test with a dos path.
2145 ;;
cd6ede75 2146 *)
5c2a0669
UD
2147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2148 ac_dummy="$PATH"
2149 for ac_dir in $ac_dummy; do
cd6ede75
UD
2150 test -z "$ac_dir" && ac_dir=.
2151 if test -f $ac_dir/$ac_word; then
2152 ac_cv_path_BASH="$ac_dir/$ac_word"
2153 break
2154 fi
2155 done
2156 IFS="$ac_save_ifs"
2157 test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no"
2158 ;;
2159esac
2160fi
2161BASH="$ac_cv_path_BASH"
2162if test -n "$BASH"; then
2163 echo "$ac_t""$BASH" 1>&6
2164else
2165 echo "$ac_t""no" 1>&6
2166fi
2167
2168if test "$BASH" != no &&
f43ce637 2169 $BASH -c 'test "$BASH_VERSINFO" \
6973fc01 2170 && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
cd6ede75
UD
2171 libc_cv_have_bash2=yes
2172else
2173 libc_cv_have_bash2=no
2174fi
2175
2176
2177if test "$BASH" = no; then
2178 # Extract the first word of "ksh", so it can be a program name with args.
2179set dummy ksh; ac_word=$2
2180echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2181echo "configure:2182: checking for $ac_word" >&5
a808d541 2182if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
cd6ede75
UD
2183 echo $ac_n "(cached) $ac_c" 1>&6
2184else
2185 case "$KSH" in
2186 /*)
2187 ac_cv_path_KSH="$KSH" # Let the user override the test with a path.
2188 ;;
5c2a0669
UD
2189 ?:/*)
2190 ac_cv_path_KSH="$KSH" # Let the user override the test with a dos path.
2191 ;;
cd6ede75 2192 *)
5c2a0669
UD
2193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2194 ac_dummy="$PATH"
2195 for ac_dir in $ac_dummy; do
cd6ede75
UD
2196 test -z "$ac_dir" && ac_dir=.
2197 if test -f $ac_dir/$ac_word; then
2198 ac_cv_path_KSH="$ac_dir/$ac_word"
2199 break
2200 fi
2201 done
2202 IFS="$ac_save_ifs"
2203 test -z "$ac_cv_path_KSH" && ac_cv_path_KSH="no"
2204 ;;
2205esac
2206fi
2207KSH="$ac_cv_path_KSH"
2208if test -n "$KSH"; then
2209 echo "$ac_t""$KSH" 1>&6
2210else
2211 echo "$ac_t""no" 1>&6
2212fi
2213
2214 if test "$KSH" = no; then
2215 libc_cv_have_ksh=no
2216 else
2217 libc_cv_have_ksh=yes
2218 fi
2219else
2220 KSH="$BASH"
2221
2222 libc_cv_have_ksh=yes
2223fi
2224
2225
6dab8688 2226for ac_prog in gawk mawk nawk awk
a2b08ee5
UD
2227do
2228# Extract the first word of "$ac_prog", so it can be a program name with args.
2229set dummy $ac_prog; ac_word=$2
2230echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2231echo "configure:2232: checking for $ac_word" >&5
a808d541 2232if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
5aa8ff62
UD
2233 echo $ac_n "(cached) $ac_c" 1>&6
2234else
2235 if test -n "$AWK"; then
2236 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2237else
5c2a0669
UD
2238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2239 ac_dummy="$PATH"
2240 for ac_dir in $ac_dummy; do
5aa8ff62
UD
2241 test -z "$ac_dir" && ac_dir=.
2242 if test -f $ac_dir/$ac_word; then
2243 ac_cv_prog_AWK="$ac_prog"
2244 break
2245 fi
2246 done
2247 IFS="$ac_save_ifs"
2248fi
2249fi
2250AWK="$ac_cv_prog_AWK"
2251if test -n "$AWK"; then
2252 echo "$ac_t""$AWK" 1>&6
2253else
2254 echo "$ac_t""no" 1>&6
2255fi
2256
2257test -n "$AWK" && break
2258done
2259
c0016081
UD
2260# Extract the first word of "perl", so it can be a program name with args.
2261set dummy perl; ac_word=$2
5aa8ff62 2262echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2263echo "configure:2264: checking for $ac_word" >&5
a808d541 2264if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
a2b08ee5
UD
2265 echo $ac_n "(cached) $ac_c" 1>&6
2266else
2267 case "$PERL" in
2268 /*)
2269 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2270 ;;
5c2a0669
UD
2271 ?:/*)
2272 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2273 ;;
a2b08ee5 2274 *)
5c2a0669
UD
2275 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2276 ac_dummy="$PATH"
2277 for ac_dir in $ac_dummy; do
a2b08ee5
UD
2278 test -z "$ac_dir" && ac_dir=.
2279 if test -f $ac_dir/$ac_word; then
2280 ac_cv_path_PERL="$ac_dir/$ac_word"
2281 break
2282 fi
2283 done
2284 IFS="$ac_save_ifs"
c0016081 2285 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
a2b08ee5
UD
2286 ;;
2287esac
2288fi
2289PERL="$ac_cv_path_PERL"
2290if test -n "$PERL"; then
2291 echo "$ac_t""$PERL" 1>&6
2292else
2293 echo "$ac_t""no" 1>&6
2294fi
2295
2fd5d029
RM
2296if test "$PERL" != no &&
2297 (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
2298 PERL=no
fc304e02 2299fi
c0016081
UD
2300# Extract the first word of "install-info", so it can be a program name with args.
2301set dummy install-info; ac_word=$2
2302echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2303echo "configure:2304: checking for $ac_word" >&5
a808d541 2304if eval "test \"`echo '$''{'ac_cv_path_INSTALL_INFO'+set}'`\" = set"; then
c0016081
UD
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306else
2307 case "$INSTALL_INFO" in
2308 /*)
2309 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
2310 ;;
5c2a0669
UD
2311 ?:/*)
2312 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a dos path.
2313 ;;
c0016081 2314 *)
5c2a0669 2315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9f2a9248 2316 ac_dummy="$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
5c2a0669 2317 for ac_dir in $ac_dummy; do
c0016081
UD
2318 test -z "$ac_dir" && ac_dir=.
2319 if test -f $ac_dir/$ac_word; then
2320 ac_cv_path_INSTALL_INFO="$ac_dir/$ac_word"
2321 break
2322 fi
2323 done
2324 IFS="$ac_save_ifs"
2325 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO="no"
2326 ;;
2327esac
2328fi
2329INSTALL_INFO="$ac_cv_path_INSTALL_INFO"
2330if test -n "$INSTALL_INFO"; then
2331 echo "$ac_t""$INSTALL_INFO" 1>&6
2332else
2333 echo "$ac_t""no" 1>&6
2334fi
2335
c0016081
UD
2336if test "$INSTALL_INFO" != "no"; then
2337echo $ac_n "checking for old Debian install-info""... $ac_c" 1>&6
136d4332 2338echo "configure:2339: checking for old Debian install-info" >&5
a808d541 2339if eval "test \"`echo '$''{'libc_cv_old_debian_install_info'+set}'`\" = set"; then
c0016081
UD
2340 echo $ac_n "(cached) $ac_c" 1>&6
2341else
2342 mkdir conftest.d
2343 # There is a hard ^_ on the next line. I am open to better ideas.
2344 (echo '\1f'
2345 echo 'File: dir Node: Top This is the top of the INFO tree'
2346 echo '* Menu:') >conftest.d/dir
2347 (echo 'INFO-DIR-SECTION i-d-s works'
2348 echo 'START-INFO-DIR-ENTRY'
2349 echo '* Prog: (prog). Program.'
2350 echo 'END-INFO-DIR-ENTRY') >conftest.d/prog.info
2351 if $INSTALL_INFO --info-dir=conftest.d conftest.d/prog.info >&5 2>&1
d8cceb4f 2352 then
c0016081
UD
2353 if grep -s 'i-d-s works' conftest.d/dir >/dev/null
2354 then libc_cv_old_debian_install_info=no
2355 else libc_cv_old_debian_install_info=yes
2356 fi
2357 else libc_cv_old_debian_install_info=no testfailed=t
2358 fi
2359 rm -fr conftest.d
2360fi
2361
2362echo "$ac_t""$libc_cv_old_debian_install_info" 1>&6
2363if test -n "$testfailed"
2364then echo "configure: warning: install-info errored out, check config.log" 1>&2
2365fi
2366OLD_DEBIAN_INSTALL_INFO=$libc_cv_old_debian_install_info
2367fi
a2b08ee5
UD
2368
2369
ae113383
UD
2370# Extract the first word of "bison", so it can be a program name with args.
2371set dummy bison; ac_word=$2
2372echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136d4332 2373echo "configure:2374: checking for $ac_word" >&5
ae113383
UD
2374if eval "test \"`echo '$''{'ac_cv_path_BISON'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2376else
2377 case "$BISON" in
2378 /*)
2379 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
2380 ;;
2381 ?:/*)
2382 ac_cv_path_BISON="$BISON" # Let the user override the test with a dos path.
2383 ;;
2384 *)
2385 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2386 ac_dummy="$PATH:/usr/local/bin:/usr/bin:/bin"
2387 for ac_dir in $ac_dummy; do
2388 test -z "$ac_dir" && ac_dir=.
2389 if test -f $ac_dir/$ac_word; then
2390 ac_cv_path_BISON="$ac_dir/$ac_word"
2391 break
2392 fi
2393 done
2394 IFS="$ac_save_ifs"
2395 test -z "$ac_cv_path_BISON" && ac_cv_path_BISON="no"
2396 ;;
2397esac
2398fi
2399BISON="$ac_cv_path_BISON"
2400if test -n "$BISON"; then
2401 echo "$ac_t""$BISON" 1>&6
2402else
2403 echo "$ac_t""no" 1>&6
2404fi
2405
2406
cd6ede75 2407echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
136d4332 2408echo "configure:2409: checking for signed size_t type" >&5
a808d541 2409if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
cd6ede75
UD
2410 echo $ac_n "(cached) $ac_c" 1>&6
2411else
2412 echo '#include <stddef.h>
2413FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
2414if eval "$ac_cpp conftest.c 2>/dev/null" \
2415| grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null; then
2416 libc_cv_signed_size_t=no
2417else
2418 libc_cv_signed_size_t=yes
2419fi
2420rm -f conftest*
2421fi
2422
2423echo "$ac_t""$libc_cv_signed_size_t" 1>&6
2424if test $libc_cv_signed_size_t = yes; then
2425 cat >> confdefs.h <<\EOF
2426#undef __SIZE_TYPE__
2427#define __SIZE_TYPE__ unsigned
2428EOF
2429fi
2430
2431echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
136d4332 2432echo "configure:2433: checking for libc-friendly stddef.h" >&5
a808d541 2433if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
cd6ede75
UD
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435else
2436 cat > conftest.$ac_ext <<EOF
136d4332 2437#line 2438 "configure"
cd6ede75
UD
2438#include "confdefs.h"
2439#define __need_size_t
2440#define __need_wchar_t
2441#include <stddef.h>
2442#define __need_NULL
2443#include <stddef.h>
2444int main() {
2445size_t size; wchar_t wchar;
2446#ifdef offsetof
2447#error stddef.h ignored __need_*
2448#endif
2449if (&size == NULL || &wchar == NULL) abort ();
2450; return 0; }
2451EOF
136d4332 2452if { (eval echo configure:2453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cd6ede75
UD
2453 rm -rf conftest*
2454 libc_cv_friendly_stddef=yes
2455else
2456 echo "configure: failed program was:" >&5
2457 cat conftest.$ac_ext >&5
2458 rm -rf conftest*
2459 libc_cv_friendly_stddef=no
2460fi
2461rm -f conftest*
2462fi
2463
2464echo "$ac_t""$libc_cv_friendly_stddef" 1>&6
2465if test $libc_cv_friendly_stddef = yes; then
2466 config_vars="$config_vars
2467override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
2468fi
2469
2470echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
136d4332 2471echo "configure:2472: checking whether we need to use -P to assemble .S files" >&5
a808d541 2472if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
cd6ede75
UD
2473 echo $ac_n "(cached) $ac_c" 1>&6
2474else
2475 cat > conftest.S <<EOF
2476#include "confdefs.h"
2477/* Nothing whatsoever. */
2478EOF
2479if ${CC-cc} $CFLAGS -c conftest.S 2>/dev/null; then
2480 libc_cv_need_minus_P=no
2481else
2482 libc_cv_need_minus_P=yes
2483fi
2484rm -f conftest*
2485fi
2486
2487echo "$ac_t""$libc_cv_need_minus_P" 1>&6
2488if test $libc_cv_need_minus_P = yes; then
2489 config_vars="$config_vars
2490asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
2491fi
2492
2293395f 2493echo $ac_n "checking whether .text pseudo-op must be used""... $ac_c" 1>&6
136d4332 2494echo "configure:2495: checking whether .text pseudo-op must be used" >&5
a808d541 2495if eval "test \"`echo '$''{'libc_cv_dot_text'+set}'`\" = set"; then
2293395f
UD
2496 echo $ac_n "(cached) $ac_c" 1>&6
2497else
2498 cat > conftest.s <<EOF
2499.text
2500EOF
2501libc_cv_dot_text=
2502if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
2503 libc_cv_dot_text=.text
2504fi
2505rm -f conftest*
2506fi
2507
2508if test -z "$libc_cv_dot_text"; then
2509 echo "$ac_t""no" 1>&6
2510else
2511 echo "$ac_t""yes" 1>&6
2512fi
2513
cd6ede75 2514echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
136d4332 2515echo "configure:2516: checking for assembler global-symbol directive" >&5
a808d541 2516if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
cd6ede75
UD
2517 echo $ac_n "(cached) $ac_c" 1>&6
2518else
2519 libc_cv_asm_global_directive=UNKNOWN
908c3d5b 2520for ac_globl in .globl .global .EXPORT; do
cd6ede75 2521 cat > conftest.s <<EOF
2293395f 2522 ${libc_cv_dot_text}
908c3d5b 2523 ${ac_globl} foo
cd6ede75
UD
2524foo:
2525EOF
2526 if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
2527 libc_cv_asm_global_directive=${ac_globl}
2528 fi
2529 rm -f conftest*
2530 test $libc_cv_asm_global_directive != UNKNOWN && break
2531done
2532fi
2533
2534echo "$ac_t""$libc_cv_asm_global_directive" 1>&6
2535if test $libc_cv_asm_global_directive = UNKNOWN; then
2536 { echo "configure: error: cannot determine asm global directive" 1>&2; exit 1; }
2537else
2538 cat >> confdefs.h <<EOF
2539#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
2540EOF
2541
2542fi
2543
2544echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
136d4332 2545echo "configure:2546: checking for .set assembler directive" >&5
a808d541 2546if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
cd6ede75
UD
2547 echo $ac_n "(cached) $ac_c" 1>&6
2548else
2549 cat > conftest.s <<EOF
2293395f 2550${libc_cv_dot_text}
cd6ede75
UD
2551foo:
2552.set glibc_conftest_frobozz,foo
2553$libc_cv_asm_global_directive glibc_conftest_frobozz
2554EOF
2555# The alpha-dec-osf1 assembler gives only a warning for `.set'
2556# (but it doesn't work), so we must do a linking check to be sure.
2557cat > conftest1.c <<\EOF
2558extern int glibc_conftest_frobozz;
2559main () { printf ("%d\n", glibc_conftest_frobozz); }
2560EOF
2561if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
2562 -o conftest conftest.s conftest1.c 1>&5 2>&5; then
2563 libc_cv_asm_set_directive=yes
2564else
2565 libc_cv_asm_set_directive=no
2566fi
2567rm -f conftest*
2568fi
2569
2570echo "$ac_t""$libc_cv_asm_set_directive" 1>&6
2571if test $libc_cv_asm_set_directive = yes; then
2572 cat >> confdefs.h <<\EOF
2573#define HAVE_ASM_SET_DIRECTIVE 1
2574EOF
2575
2576fi
2577
2aa15430
UD
2578# The Aix ld uses global .symbol_names instead of symbol_names.
2579case "$os" in
2580aix4.3*)
2581 cat >> confdefs.h <<\EOF
2582#define HAVE_ASM_GLOBAL_DOT_NAME 1
2583EOF
2584
2585esac
2586
cd6ede75 2587echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
136d4332 2588echo "configure:2589: checking for .symver assembler directive" >&5
a808d541 2589if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
cd6ede75
UD
2590 echo $ac_n "(cached) $ac_c" 1>&6
2591else
2592 cat > conftest.s <<EOF
2293395f 2593${libc_cv_dot_text}
cd6ede75
UD
2594_sym:
2595.symver _sym,sym@VERS
2596EOF
2597if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
2598 libc_cv_asm_symver_directive=yes
2599else
2600 libc_cv_asm_symver_directive=no
2601fi
2602rm -f conftest*
2603fi
2604
2605echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
2606echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
136d4332 2607echo "configure:2608: checking for ld --version-script" >&5
a808d541 2608if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
cd6ede75
UD
2609 echo $ac_n "(cached) $ac_c" 1>&6
2610else
2611 if test $libc_cv_asm_symver_directive = yes; then
2612 cat > conftest.s <<EOF
2293395f 2613${libc_cv_dot_text}
cd6ede75
UD
2614_sym:
2615.symver _sym,sym@VERS
2616EOF
2617 cat > conftest.map <<EOF
f43ce637 2618VERS_1 {
cd6ede75
UD
2619 global: sym;
2620};
f43ce637
UD
2621
2622VERS_2 {
2623 global: sym;
2624} VERS_1;
cd6ede75
UD
2625EOF
2626 if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
2627 if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
2628 -nostartfiles -nostdlib
2629 -Wl,--version-script,conftest.map
136d4332 2630 1>&5'; { (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
cd6ede75
UD
2631 then
2632 libc_cv_ld_version_script_option=yes
2633 else
2634 libc_cv_ld_version_script_option=no
2635 fi
2636 else
2637 libc_cv_ld_version_script_option=no
2638 fi
2639else
2640 libc_cv_ld_version_script_option=no
2641fi
2642rm -f conftest*
2643fi
2644
2645echo "$ac_t""$libc_cv_ld_version_script_option" 1>&6
7499a22a
RM
2646if test $shared != no &&
2647 test $libc_cv_asm_symver_directive = yes &&
650425ce
UD
2648 test $libc_cv_ld_version_script_option = yes &&
2649 test $enable_versioning = yes; then
cd6ede75
UD
2650 VERSIONING=yes
2651 cat >> confdefs.h <<\EOF
2652#define DO_VERSIONING 1
2653EOF
2654
2655else
2656 VERSIONING=no
2657fi
2658
2659
7499a22a 2660if test $shared != no && test $VERSIONING = no; then
f43ce637 2661 echo "\
f4017d20 2662*** WARNING: You should not compile GNU libc without versioning. Not using
f43ce637
UD
2663*** versioning will introduce incompatibilities so that old binaries
2664*** will not run anymore.
08a0d60a 2665*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
f43ce637 2666fi
cd6ede75
UD
2667if test $elf = yes; then
2668 echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
136d4332 2669echo "configure:2670: checking for .previous assembler directive" >&5
a808d541 2670if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
cd6ede75
UD
2671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
2673 cat > conftest.s <<EOF
2674.section foo_section
2675.previous
2676EOF
136d4332 2677 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
2678 libc_cv_asm_previous_directive=yes
2679 else
2680 libc_cv_asm_previous_directive=no
2681 fi
2682 rm -f conftest*
2683fi
2684
2685echo "$ac_t""$libc_cv_asm_previous_directive" 1>&6
2686 if test $libc_cv_asm_previous_directive = yes; then
2687 cat >> confdefs.h <<\EOF
2688#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
2689EOF
2690
2691 else
2692 echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
136d4332 2693echo "configure:2694: checking for .popsection assembler directive" >&5
a808d541 2694if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
cd6ede75
UD
2695 echo $ac_n "(cached) $ac_c" 1>&6
2696else
2697 cat > conftest.s <<EOF
2698.pushsection foo_section
2699.popsection
2700EOF
136d4332 2701 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
2702 libc_cv_asm_popsection_directive=yes
2703 else
2704 libc_cv_asm_popsection_directive=no
2705 fi
2706 rm -f conftest*
2707fi
2708
2709echo "$ac_t""$libc_cv_asm_popsection_directive" 1>&6
2710 if test $libc_cv_asm_popsection_directive = yes; then
2711 cat >> confdefs.h <<\EOF
2712#define HAVE_ASM_POPSECTION_DIRECTIVE 1
2713EOF
2714
2715 fi
2716 fi
2d499f55 2717 echo $ac_n "checking for .protected and .hidden assembler directive""... $ac_c" 1>&6
136d4332 2718echo "configure:2719: checking for .protected and .hidden assembler directive" >&5
2d499f55
UD
2719if eval "test \"`echo '$''{'libc_cv_asm_protected_directive'+set}'`\" = set"; then
2720 echo $ac_n "(cached) $ac_c" 1>&6
2721else
2722 cat > conftest.s <<EOF
2723.protected foo
2724foo:
2725.hidden bar
2726bar:
2727EOF
136d4332 2728 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2d499f55
UD
2729 libc_cv_asm_protected_directive=yes
2730 else
2731 libc_cv_asm_protected_directive=no
2732 fi
2733 rm -f conftest*
2734fi
2735
2736echo "$ac_t""$libc_cv_asm_protected_directive" 1>&6
2737
2f54c82d
UD
2738
2739 echo $ac_n "checking for -z nodelete option""... $ac_c" 1>&6
136d4332 2740echo "configure:2741: checking for -z nodelete option" >&5
2f54c82d
UD
2741if eval "test \"`echo '$''{'libc_cv_z_nodelete'+set}'`\" = set"; then
2742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744 cat > conftest.c <<EOF
2745int _start (void) { return 42; }
2746EOF
136d4332 2747 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,nodelete 1>&5'; { (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2f54c82d
UD
2748 then
2749 libc_cv_z_nodelete=yes
2750 else
2751 libc_cv_z_nodelete=no
2752 fi
2753 rm -f conftest*
2754fi
2755
2756echo "$ac_t""$libc_cv_z_nodelete" 1>&6
2757
2758
2759 echo $ac_n "checking for -z nodlopen option""... $ac_c" 1>&6
136d4332 2760echo "configure:2761: checking for -z nodlopen option" >&5
2f54c82d
UD
2761if eval "test \"`echo '$''{'libc_cv_z_nodlopen'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2763else
2764 cat > conftest.c <<EOF
2765int _start (void) { return 42; }
2766EOF
136d4332 2767 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,nodlopen 1>&5'; { (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2f54c82d
UD
2768 then
2769 libc_cv_z_nodlopen=yes
2770 else
2771 libc_cv_z_nodlopen=no
2772 fi
2773 rm -f conftest*
2774fi
2775
2776echo "$ac_t""$libc_cv_z_nodlopen" 1>&6
2777
5d916713
UD
2778
2779 echo $ac_n "checking for -z initfirst option""... $ac_c" 1>&6
136d4332 2780echo "configure:2781: checking for -z initfirst option" >&5
5d916713
UD
2781if eval "test \"`echo '$''{'libc_cv_z_initfirst'+set}'`\" = set"; then
2782 echo $ac_n "(cached) $ac_c" 1>&6
2783else
2784 cat > conftest.c <<EOF
2785int _start (void) { return 42; }
2786EOF
136d4332 2787 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,initfirst 1>&5'; { (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
5d916713
UD
2788 then
2789 libc_cv_z_initfirst=yes
2790 else
2791 libc_cv_z_initfirst=no
2792 fi
2793 rm -f conftest*
2794fi
2795
2796echo "$ac_t""$libc_cv_z_initfirst" 1>&6
2797
639c3248
UD
2798
2799 echo $ac_n "checking for -Bgroup option""... $ac_c" 1>&6
2800echo "configure:2801: checking for -Bgroup option" >&5
2801if eval "test \"`echo '$''{'libc_cv_Bgroup'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2803else
2804 cat > conftest.c <<EOF
2805int _start (void) { return 42; }
2806EOF
2807 if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5'; { (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
2808 then
2809 libc_cv_Bgroup=yes
2810 else
2811 libc_cv_Bgroup=no
2812 fi
2813 rm -f conftest*
2814fi
2815
2816echo "$ac_t""$libc_cv_Bgroup" 1>&6
2817
cd6ede75
UD
2818fi
2819
2820if test $elf != yes; then
2821 echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
639c3248 2822echo "configure:2823: checking for .init and .fini sections" >&5
a808d541 2823if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
cd6ede75
UD
2824 echo $ac_n "(cached) $ac_c" 1>&6
2825else
2826 cat > conftest.$ac_ext <<EOF
639c3248 2827#line 2828 "configure"
cd6ede75
UD
2828#include "confdefs.h"
2829
2830int main() {
2831asm (".section .init");
2832 asm (".section .fini");
2293395f 2833 asm ("${libc_cv_dot_text}");
cd6ede75
UD
2834; return 0; }
2835EOF
639c3248 2836if { (eval echo configure:2837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cd6ede75
UD
2837 rm -rf conftest*
2838 libc_cv_have_initfini=yes
2839else
2840 echo "configure: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 rm -rf conftest*
2843 libc_cv_have_initfini=no
2844fi
2845rm -f conftest*
2846fi
2847
2848echo "$ac_t""$libc_cv_have_initfini" 1>&6
2849 if test $libc_cv_have_initfini = yes; then
2850 cat >> confdefs.h <<\EOF
2851#define HAVE_INITFINI 1
2852EOF
2853
2854 fi
2855fi
2856
e26dd47f
UD
2857if test $elf = yes -a $gnu_ld = yes; then
2858 echo $ac_n "checking whether cc puts quotes around section names""... $ac_c" 1>&6
639c3248 2859echo "configure:2860: checking whether cc puts quotes around section names" >&5
e26dd47f
UD
2860if eval "test \"`echo '$''{'libc_cv_have_section_quotes'+set}'`\" = set"; then
2861 echo $ac_n "(cached) $ac_c" 1>&6
2862else
2863 cat > conftest.c <<EOF
2864 static const int foo
2865 __attribute__ ((section ("bar"))) = 1;
2866EOF
2867 if ${CC-cc} -S conftest.c -o conftest.s; then
2868 if grep '\.section.*"bar"' conftest.s >/dev/null; then
2869 libc_cv_have_section_quotes=yes
2870 else
2871 libc_cv_have_section_quotes=no
2872 fi
2873 else
2874 libc_cv_have_section_quotes=unknown
2875 fi
2876 rm -f conftest.cs
2877
2878fi
2879
2880echo "$ac_t""$libc_cv_have_section_quotes" 1>&6
2881 if test $libc_cv_have_section_quotes = yes; then
2882 cat >> confdefs.h <<\EOF
2883#define HAVE_SECTION_QUOTES 1
2884EOF
2885
2886 fi
2887fi
2888
9a0a462c
UD
2889
2890
cd6ede75
UD
2891if test $elf = yes; then
2892 libc_cv_asm_underscores=no
2893else
9a0a462c
UD
2894 if test $ac_cv_prog_cc_works = yes; then
2895 echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
639c3248 2896echo "configure:2897: checking for _ prefix on C symbol names" >&5
a808d541 2897if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
cd6ede75
UD
2898 echo $ac_n "(cached) $ac_c" 1>&6
2899else
2900 cat > conftest.$ac_ext <<EOF
639c3248 2901#line 2902 "configure"
cd6ede75
UD
2902#include "confdefs.h"
2903asm ("_glibc_foobar:");
2904int main() {
2905glibc_foobar ();
2906; return 0; }
2907EOF
639c3248 2908if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
cd6ede75
UD
2909 rm -rf conftest*
2910 libc_cv_asm_underscores=yes
2911else
2912 echo "configure: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2914 rm -rf conftest*
2915 libc_cv_asm_underscores=no
2916fi
2917rm -f conftest*
2918fi
2919
2920echo "$ac_t""$libc_cv_asm_underscores" 1>&6
9a0a462c
UD
2921 else
2922 echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
639c3248 2923echo "configure:2924: checking for _ prefix on C symbol names" >&5
a808d541 2924if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
9a0a462c
UD
2925 echo $ac_n "(cached) $ac_c" 1>&6
2926else
2927 cat > conftest.$ac_ext <<EOF
639c3248 2928#line 2929 "configure"
9a0a462c
UD
2929#include "confdefs.h"
2930void underscore_test(void) {
2931return; }
2932EOF
639c3248 2933if { (eval echo configure:2934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9a0a462c
UD
2934 if grep _underscore_test conftest* >/dev/null; then
2935 rm -f conftest*
2936 libc_cv_asm_underscores=yes
2937 else
2938 rm -f conftest*
2939 libc_cv_asm_underscores=no
2940 fi
2941else
2942 echo "configure: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 rm -f conftest*
2945 libc_cv_asm_underscores=no
2946fi
2947rm -f conftest*
2948fi
2949
2950echo "$ac_t""$libc_cv_asm_underscores" 1>&6
2951 fi
cd6ede75
UD
2952fi
2953if test $libc_cv_asm_underscores = no; then
2954 cat >> confdefs.h <<\EOF
2955#define NO_UNDERSCORES 1
2956EOF
2957
2958fi
2959
2960if test $elf = yes; then
2961 libc_cv_weak_symbols=yes
9a97d1f7
UD
2962fi
2963
2964echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
639c3248 2965echo "configure:2966: checking for assembler .weak directive" >&5
a808d541 2966if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
cd6ede75
UD
2967 echo $ac_n "(cached) $ac_c" 1>&6
2968else
2969 cat > conftest.s <<EOF
2293395f 2970${libc_cv_dot_text}
cd6ede75
UD
2971${libc_cv_asm_global_directive} foo
2972foo:
2973.weak foo
2974.weak bar; bar = foo
2975EOF
9a97d1f7
UD
2976if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
2977 libc_cv_asm_weak_directive=yes
2978else
2979 libc_cv_asm_weak_directive=no
2980fi
2981rm -f conftest*
cd6ede75
UD
2982fi
2983
2984echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
2985
2986if test $libc_cv_asm_weak_directive = no; then
2987 echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
639c3248 2988echo "configure:2989: checking for assembler .weakext directive" >&5
a808d541 2989if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
cd6ede75
UD
2990 echo $ac_n "(cached) $ac_c" 1>&6
2991else
2992 cat > conftest.s <<EOF
2293395f 2993${libc_cv_dot_text}
cd6ede75
UD
2994${libc_cv_asm_global_directive} foo
2995foo:
9a97d1f7
UD
2996.weakext bar foo
2997.weakext baz
2998${libc_cv_asm_global_directive} baz
2999baz:
cd6ede75
UD
3000EOF
3001 if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
3002 libc_cv_asm_weakext_directive=yes
3003 else
3004 libc_cv_asm_weakext_directive=no
3005 fi
3006 rm -f conftest*
3007fi
3008
3009echo "$ac_t""$libc_cv_asm_weakext_directive" 1>&6
3010
9a97d1f7 3011fi # no .weak
cd6ede75
UD
3012
3013if test $libc_cv_asm_weak_directive = yes; then
3014 cat >> confdefs.h <<\EOF
3015#define HAVE_ASM_WEAK_DIRECTIVE 1
3016EOF
3017
3018elif test $libc_cv_asm_weakext_directive = yes; then
3019 cat >> confdefs.h <<\EOF
3020#define HAVE_ASM_WEAKEXT_DIRECTIVE 1
3021EOF
3022
3023fi
3024
b15cb495
UD
3025case "${host_cpu}-${host_os}" in
3026 hppa*linux*)
3027 echo $ac_n "checking for assembler line separator""... $ac_c" 1>&6
639c3248 3028echo "configure:3029: checking for assembler line separator" >&5
b15cb495
UD
3029if eval "test \"`echo '$''{'libc_cv_asm_line_sep'+set}'`\" = set"; then
3030 echo $ac_n "(cached) $ac_c" 1>&6
3031else
3032 cat > conftest.s <<EOF
3033 nop ; is_old_puffin
3034EOF
639c3248 3035 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:3036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
b15cb495
UD
3036 libc_cv_asm_line_sep='!'
3037 else
3038 if test -z "$enable_hacker_mode"; then
3039 echo "*** You need a newer assembler to compile glibc"
3040 rm -f conftest*
3041 exit 1
3042 fi
3043 libc_cv_asm_line_sep=';'
3044 fi
3045 rm -f conftest*
3046fi
3047
3048echo "$ac_t""$libc_cv_asm_line_sep" 1>&6
3049 cat >> confdefs.h <<EOF
3050#define ASM_LINE_SEP $libc_cv_asm_line_sep
3051EOF
3052
3053 ;;
3054esac
3055
cd6ede75 3056echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
639c3248 3057echo "configure:3058: checking for ld --no-whole-archive" >&5
a808d541 3058if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
cd6ede75
UD
3059 echo $ac_n "(cached) $ac_c" 1>&6
3060else
3061 cat > conftest.c <<\EOF
3062_start () {}
3063int __eh_pc;
3064__throw () {}
3065EOF
3066if { ac_try='${CC-cc} $CFLAGS
3067 -nostdlib -nostartfiles -Wl,--no-whole-archive
639c3248 3068 -o conftest conftest.c 1>&5'; { (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
cd6ede75
UD
3069 libc_cv_ld_no_whole_archive=yes
3070else
3071 libc_cv_ld_no_whole_archive=no
3072fi
3073rm -f conftest*
3074fi
3075
3076echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
b17277cf
UD
3077if test $libc_cv_ld_no_whole_archive = yes; then
3078 no_whole_archive=-Wl,--no-whole-archive
3079fi
cd6ede75 3080
dff14448 3081echo $ac_n "checking for gcc -fexceptions""... $ac_c" 1>&6
639c3248 3082echo "configure:3083: checking for gcc -fexceptions" >&5
a808d541 3083if eval "test \"`echo '$''{'libc_cv_gcc_exceptions'+set}'`\" = set"; then
cd6ede75
UD
3084 echo $ac_n "(cached) $ac_c" 1>&6
3085else
3086 cat > conftest.c <<\EOF
3087_start () {}
3088int __eh_pc;
3089__throw () {}
3090EOF
3091if { ac_try='${CC-cc} $CFLAGS
dff14448 3092 -nostdlib -nostartfiles -fexceptions
639c3248 3093 -o conftest conftest.c 1>&5'; { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
dff14448 3094 libc_cv_gcc_exceptions=yes
cd6ede75 3095else
dff14448 3096 libc_cv_gcc_exceptions=no
cd6ede75
UD
3097fi
3098rm -f conftest*
3099fi
3100
dff14448
UD
3101echo "$ac_t""$libc_cv_gcc_exceptions" 1>&6
3102if test $libc_cv_gcc_exceptions = yes; then
3103 exceptions=-fexceptions
b17277cf 3104fi
cd6ede75 3105
d71b808a
UD
3106if test "$base_machine" = alpha ; then
3107echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
639c3248 3108echo "configure:3109: checking for function ..ng prefix" >&5
a808d541 3109if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
d71b808a
UD
3110 echo $ac_n "(cached) $ac_c" 1>&6
3111else
3112 cat > conftest.c <<\EOF
3113foo () { }
3114EOF
639c3248 3115if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:3116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
d71b808a
UD
3116then
3117 libc_cv_gcc_alpha_ng_prefix=yes
3118else
3119 libc_cv_gcc_alpha_ng_prefix=no
3120fi
3121rm -f conftest*
3122fi
3123
3124echo "$ac_t""$libc_cv_gcc_alpha_ng_prefix" 1>&6
3125if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
3126 cat >> confdefs.h <<\EOF
3127#define ASM_ALPHA_NG_SYMBOL_PREFIX "$"
3128EOF
3129
3130else
3131 cat >> confdefs.h <<\EOF
3132#define ASM_ALPHA_NG_SYMBOL_PREFIX ""
3133EOF
3134
3135fi
3136fi
3137
ebcd12d4
UD
3138if test "$host_cpu" = powerpc ; then
3139# Check for a bug present in at least versions 2.8.x of GCC
3140# and versions 1.0.x of EGCS.
3141echo $ac_n "checking whether clobbering cr0 causes problems""... $ac_c" 1>&6
639c3248 3142echo "configure:3143: checking whether clobbering cr0 causes problems" >&5
a808d541 3143if eval "test \"`echo '$''{'libc_cv_c_asmcr0_bug'+set}'`\" = set"; then
ebcd12d4
UD
3144 echo $ac_n "(cached) $ac_c" 1>&6
3145else
3146 cat > conftest.$ac_ext <<EOF
639c3248 3147#line 3148 "configure"
ebcd12d4
UD
3148#include "confdefs.h"
3149int tester(int x) { asm ("" : : : "cc"); return x & 123; }
3150int main() {
3151
3152; return 0; }
3153EOF
639c3248 3154if { (eval echo configure:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ebcd12d4
UD
3155 rm -rf conftest*
3156 libc_cv_c_asmcr0_bug='no'
3157else
3158 echo "configure: failed program was:" >&5
3159 cat conftest.$ac_ext >&5
3160 rm -rf conftest*
3161 libc_cv_c_asmcr0_bug='yes'
3162fi
3163rm -f conftest*
3164fi
3165
3166echo "$ac_t""$libc_cv_c_asmcr0_bug" 1>&6
3167if test "$libc_cv_c_asmcr0_bug" != 'no'; then
3168 cat >> confdefs.h <<\EOF
3169#define BROKEN_PPC_ASM_CR0 1
3170EOF
3171
3172fi
3173fi
3174
650425ce 3175echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
639c3248 3176echo "configure:3177: checking for DWARF2 unwind info support" >&5
a808d541 3177if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then
650425ce
UD
3178 echo $ac_n "(cached) $ac_c" 1>&6
3179else
3180 cat > conftest.c <<EOF
639c3248 3181#line 3182 "configure"
650425ce
UD
3182static char __EH_FRAME_BEGIN__;
3183_start ()
3184{
9756dfe1 3185#ifdef CHECK__register_frame
650425ce
UD
3186 __register_frame (__EH_FRAME_BEGIN__);
3187 __deregister_frame (__EH_FRAME_BEGIN__);
9756dfe1
UD
3188#endif
3189#ifdef CHECK__register_frame_info
3190 __register_frame_info (__EH_FRAME_BEGIN__);
3191 __deregister_frame_info (__EH_FRAME_BEGIN__);
3192#endif
650425ce
UD
3193}
3194int __eh_pc;
3195__throw () {}
3196/* FIXME: this is fragile. */
3197malloc () {}
3198strcmp () {}
3199strlen () {}
3200memcpy () {}
3201memset () {}
3202free () {}
3203abort () {}
dfd2257a 3204__bzero () {}
650425ce 3205EOF
9756dfe1 3206if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
650425ce 3207 -nostdlib -nostartfiles
639c3248 3208 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
9756dfe1 3209 libc_cv_gcc_dwarf2_unwind_info=static
650425ce
UD
3210else
3211 libc_cv_gcc_dwarf2_unwind_info=no
3212fi
9756dfe1
UD
3213if test $libc_cv_gcc_dwarf2_unwind_info = no; then
3214 if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame
3215 -nostdlib -nostartfiles
639c3248 3216 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
9756dfe1
UD
3217 libc_cv_gcc_dwarf2_unwind_info=yes
3218 else
3219 libc_cv_gcc_dwarf2_unwind_info=no
3220 fi
3221fi
650425ce
UD
3222rm -f conftest*
3223fi
3224
3225echo "$ac_t""$libc_cv_gcc_dwarf2_unwind_info" 1>&6
9756dfe1
UD
3226case $libc_cv_gcc_dwarf2_unwind_info in
3227yes)
650425ce
UD
3228 cat >> confdefs.h <<\EOF
3229#define HAVE_DWARF2_UNWIND_INFO 1
3230EOF
3231
9756dfe1
UD
3232 ;;
3233static)
3234 cat >> confdefs.h <<\EOF
3235#define HAVE_DWARF2_UNWIND_INFO 1
3236EOF
3237
3238 cat >> confdefs.h <<\EOF
3239#define HAVE_DWARF2_UNWIND_INFO_STATIC 1
3240EOF
3241
3242 ;;
3243esac
650425ce 3244
a8eab8b1 3245echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6
639c3248 3246echo "configure:3247: checking for __builtin_expect" >&5
a808d541 3247if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" = set"; then
a8eab8b1
UD
3248 echo $ac_n "(cached) $ac_c" 1>&6
3249else
3250 cat > conftest.c <<EOF
639c3248 3251#line 3252 "configure"
a8eab8b1
UD
3252int foo (int a)
3253{
3254 a = __builtin_expect (a, 10);
3255 return a == 10 ? 0 : 1;
3256}
3257EOF
3258if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
639c3248 3259 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
a8eab8b1
UD
3260 libc_cv_gcc_builtin_expect=yes
3261else
3262 libc_cv_gcc_builtin_expect=no
3263fi
3264rm -f conftest*
3265fi
3266
3267echo "$ac_t""$libc_cv_gcc_builtin_expect" 1>&6
3268if test "$libc_cv_gcc_builtin_expect" = yes; then
3269 cat >> confdefs.h <<\EOF
3270#define HAVE_BUILTIN_EXPECT 1
3271EOF
3272
3273fi
3274
3d558f4e 3275echo $ac_n "checking for local label subtraction""... $ac_c" 1>&6
639c3248 3276echo "configure:3277: checking for local label subtraction" >&5
a808d541 3277if eval "test \"`echo '$''{'libc_cv_gcc_subtract_local_labels'+set}'`\" = set"; then
3d558f4e
UD
3278 echo $ac_n "(cached) $ac_c" 1>&6
3279else
3280 cat > conftest.c <<EOF
639c3248 3281#line 3282 "configure"
3d558f4e
UD
3282int foo (int a)
3283{
3284 static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
3285 void *p = &&l1 + ar[a];
3286 goto *p;
3287 l1:
3288 return 1;
3289 l2:
3290 return 2;
3291}
3292EOF
3293if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
639c3248 3294 -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
3d558f4e
UD
3295 libc_cv_gcc_subtract_local_labels=yes
3296else
3297 libc_cv_gcc_subtract_local_labels=no
3298fi
3299rm -f conftest*
3300fi
3301
3302echo "$ac_t""$libc_cv_gcc_subtract_local_labels" 1>&6
3303if test "$libc_cv_gcc_subtract_local_labels" = yes; then
3304 cat >> confdefs.h <<\EOF
3305#define HAVE_SUBTRACT_LOCAL_LABELS 1
3306EOF
3307
3308fi
3309
c8f3e6db 3310echo $ac_n "checking for libgd""... $ac_c" 1>&6
639c3248 3311echo "configure:3312: checking for libgd" >&5
6dab8688
UD
3312if test "$with_gd" != "no"; then
3313 old_CFLAGS="$CFLAGS"
3314 CFLAGS="$CFLAGS $libgd_include"
3315 old_LDFLAGS="$LDFLAGS"
3316 LDFLAGS="$LDFLAGS $libgd_ldflags"
3317 old_LIBS="$LIBS"
3318 LIBS="$LIBS -lgd -lpng -lz -lm"
3319 cat > conftest.$ac_ext <<EOF
639c3248 3320#line 3321 "configure"
c8f3e6db
UD
3321#include "confdefs.h"
3322#include <gd.h>
3323int main() {
3324gdImagePng (0, 0)
3325; return 0; }
3326EOF
639c3248 3327if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c8f3e6db
UD
3328 rm -rf conftest*
3329 LIBGD=yes
3330else
3331 echo "configure: failed program was:" >&5
3332 cat conftest.$ac_ext >&5
3333 rm -rf conftest*
3334 LIBGD=no
3335fi
3336rm -f conftest*
6dab8688
UD
3337 CFLAGS="$old_CFLAGS"
3338 LDFLAGS="$old_LDFLAGS"
3339 LIBS="$old_LIBS"
3340else
3341 LIBGD=no
3342fi
c8f3e6db
UD
3343echo "$ac_t""$LIBGD" 1>&6
3344
3d558f4e 3345
8ed1e7d5 3346echo $ac_n "checking size of long double""... $ac_c" 1>&6
639c3248 3347echo "configure:3348: checking size of long double" >&5
8ed1e7d5
GK
3348if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
3349 echo $ac_n "(cached) $ac_c" 1>&6
3350else
3351 if test "$cross_compiling" = yes; then
3352 ac_cv_sizeof_long_double=0
3353else
3354 cat > conftest.$ac_ext <<EOF
639c3248 3355#line 3356 "configure"
8ed1e7d5
GK
3356#include "confdefs.h"
3357#include <stdio.h>
3358main()
3359{
3360 FILE *f=fopen("conftestval", "w");
3361 if (!f) exit(1);
3362 fprintf(f, "%d\n", sizeof(long double));
3363 exit(0);
3364}
3365EOF
639c3248 3366if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8ed1e7d5
GK
3367then
3368 ac_cv_sizeof_long_double=`cat conftestval`
3369else
3370 echo "configure: failed program was:" >&5
3371 cat conftest.$ac_ext >&5
3372 rm -fr conftest*
3373 ac_cv_sizeof_long_double=0
3374fi
3375rm -fr conftest*
3376fi
3377
3378fi
3379echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
3380cat >> confdefs.h <<EOF
3381#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
3382EOF
3383
3384
3385sizeof_long_double=$ac_cv_sizeof_long_double
3386
3387
cd6ede75
UD
3388### End of automated tests.
3389### Now run sysdeps configure fragments.
3390
3391# sysdeps configure fragments may set these with files to be linked below.
3392libc_link_dests=
3393libc_link_sources=
3394
cb343854 3395# They also can set these variables.
b43b13ac 3396use_ldconfig=no
cb343854
UD
3397ldd_rewrite_script=no
3398
cd6ede75
UD
3399# Iterate over all the sysdep directories we will use, running their
3400# configure fragments, and looking for a uname implementation.
3401uname=
3402for dir in $sysnames; do
3403 case $dir in
3404 /*) dest=$dir ;;
3405 *) dest=$srcdir/$dir ;;
3406 esac
3407 if test -r $dest/configure; then
3408 echo "$ac_t""running configure fragment for $dest" 1>&6
3409 . $dest/configure
3410 fi
3411
3412 if test -z "$uname"; then
3413 if test -r $dest/uname.c ||
3414 test -r $dest/uname.S ||
3415 { test -r $dest/syscalls.list &&
3416 grep '^uname[ ]' $dest/syscalls.list >/dev/null; }; then
3417 uname=$dir
3418 fi
3419 fi
3420done
3421
3422
3423
3424# If we will use the generic uname implementation, we must figure out what
3425# it will say by examining the system, and write the results in config-name.h.
3426if test "$uname" = "sysdeps/generic"; then
3427
3428 uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
3429 if test $uname_sysname != $config_os; then
3430 config_release=`echo $config_os | sed s/$uname_sysname//`
3431 fi
3432
3433 echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
639c3248 3434echo "configure:3435: checking OS release for uname" >&5
a808d541 3435if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
cd6ede75
UD
3436 echo $ac_n "(cached) $ac_c" 1>&6
3437else
3438 kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
3439 if test x`echo "$config_release" | sed "s/^$kernel_release//"` \
3440 != x$config_release; then
3441 # The configuration release is a substring of the kernel release.
3442 libc_cv_uname_release=$kernel_release
3443 elif test x$config_release != x; then
3444 libc_cv_uname_release=$config_release
3445 elif test x$kernel_release != x; then
3446 libc_cv_uname_release=$kernel_release
3447 else
3448 libc_cv_uname_release=unknown
3449 fi
3450fi
3451
3452echo "$ac_t""$libc_cv_uname_release" 1>&6
3453 uname_release="$libc_cv_uname_release"
3454
3455 echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
639c3248 3456echo "configure:3457: checking OS version for uname" >&5
a808d541 3457if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
cd6ede75
UD
3458 echo $ac_n "(cached) $ac_c" 1>&6
3459else
3460 kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
3461 if test -n "$kernel_version"; then
3462 libc_cv_uname_version="$kernel_version"
3463 else
3464 libc_cv_uname_version=unknown
3465 fi
3466fi
3467
3468echo "$ac_t""$libc_cv_uname_version" 1>&6
3469 uname_version="$libc_cv_uname_version"
3470
3471 config_uname=config-name.h:config-name.in
3472else
3473 # For non-generic uname, we don't need to create config-name.h at all.
3474 config_uname=
3475fi
3476
3477echo $ac_n "checking stdio selection""... $ac_c" 1>&6
639c3248 3478echo "configure:3479: checking stdio selection" >&5
cd6ede75
UD
3479
3480case $stdio in
3481libio) cat >> confdefs.h <<\EOF
3482#define USE_IN_LIBIO 1
3483EOF
3484 ;;
3485default) stdio=stdio ;;
3486esac
3487echo "$ac_t""$stdio" 1>&6
3488
a53bad16
UD
3489# Test for old glibc 2.0.x headers so that they can be removed properly
3490# Search only in includedir.
3491echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6
639c3248 3492echo "configure:3493: checking for old glibc 2.0.x headers" >&5
011ce8ed 3493if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
a53bad16
UD
3494then
3495 old_glibc_headers=yes
3496else
3497 old_glibc_headers=no
3498fi
3499echo "$ac_t""$old_glibc_headers" 1>&6
3500if test ${old_glibc_headers} = yes; then
3501 echo "configure: warning: *** During \"make install\" old headers from glibc 2.0.x will" 1>&2
3502 echo "configure: warning: *** be removed." 1>&2
3503fi
26b4d766 3504
cd6ede75
UD
3505
3506
3507
3508
3509
3510
cb343854 3511
dff14448 3512
e5aa91c3 3513
cd6ede75
UD
3514
3515if test $gnu_ld = yes; then
3516 cat >> confdefs.h <<\EOF
3517#define HAVE_GNU_LD 1
3518EOF
3519
3520fi
3521if test $gnu_as = yes; then
3522 cat >> confdefs.h <<\EOF
3523#define HAVE_GNU_AS 1
3524EOF
3525
3526fi
3527if test $elf = yes; then
3528 cat >> confdefs.h <<\EOF
3529#define HAVE_ELF 1
3530EOF
3531
3532fi
3533
3534
650425ce 3535
cd6ede75
UD
3536if test $shared = default; then
3537 if test $gnu_ld = yes; then
3538 shared=$elf
3539 else
3540 # For now we do not assume shared libs are available. In future more
3541 # tests might become available.
3542 shared=no
3543 fi
3544fi
3545
cc3fa755 3546echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
639c3248 3547echo "configure:3548: checking whether -fPIC is default" >&5
a808d541 3548if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
cc3fa755
UD
3549 echo $ac_n "(cached) $ac_c" 1>&6
3550else
3551 pic_default=yes
3552cat > conftest.c <<EOF
9756dfe1 3553#if defined __PIC__ || defined __pic__ || defined PIC || defined pic
cc3fa755
UD
3554# error PIC is default.
3555#endif
3556EOF
3557if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
3558 pic_default=no
3559fi
3560rm -f conftest.*
3561fi
3562
3563echo "$ac_t""$pic_default" 1>&6
3564
3565
3566
cd6ede75
UD
3567
3568
3569
3570
3571
3572
3573
7cabd57c
UD
3574case "$add_ons" in
3575 *door*) linux_doors=yes ;;
3576 *) linux_doors=no ;;
3577esac
3578
3579
cd6ede75
UD
3580if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
3581 config_makefile=
3582else
3583 config_makefile=Makefile
3584fi
3585
ee74a442
UD
3586VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
3587RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
3588
cd6ede75
UD
3589
3590
3591trap '' 1 2 15
3592cat > confcache <<\EOF
3593# This file is a shell script that caches the results of configure
3594# tests run on this system so they can be shared between configure
3595# scripts and configure runs. It is not useful on other systems.
3596# If it contains results you don't want to keep, you may remove or edit it.
3597#
3598# By default, configure uses ./config.cache as the cache file,
3599# creating it if it does not exist already. You can give configure
3600# the --cache-file=FILE option to use a different cache file; that is
3601# what configure does when it calls configure scripts in
3602# subdirectories, so they share the cache.
3603# Giving --cache-file=/dev/null disables caching, for debugging configure.
3604# config.status only pays attention to the cache file if you give it the
3605# --recheck option to rerun configure.
3606#
3607EOF
3608# The following way of writing the cache mishandles newlines in values,
3609# but we know of no workaround that is simple, portable, and efficient.
3610# So, don't put newlines in cache variables' values.
3611# Ultrix sh set writes to stderr and can't be redirected directly,
3612# and sets the high bit in the cache file unless we assign to the vars.
3613(set) 2>&1 |
5c2a0669 3614 case `(ac_space=' '; set | grep ac_space) 2>&1` in
cd6ede75
UD
3615 *ac_space=\ *)
3616 # `set' does not quote correctly, so add quotes (double-quote substitution
3617 # turns \\\\ into \\, and sed turns \\ into \).
3618 sed -n \
3619 -e "s/'/'\\\\''/g" \
3620 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3621 ;;
3622 *)
3623 # `set' quotes correctly as required by POSIX, so do not add quotes.
3624 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3625 ;;
3626 esac >> confcache
3627if cmp -s $cache_file confcache; then
3628 :
3629else
3630 if test -w $cache_file; then
3631 echo "updating cache $cache_file"
3632 cat confcache > $cache_file
3633 else
3634 echo "not updating unwritable cache $cache_file"
3635 fi
3636fi
3637rm -f confcache
3638
3639trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3640
3641test "x$prefix" = xNONE && prefix=$ac_default_prefix
3642# Let make expand exec_prefix.
3643test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3644
3645# Any assignment to VPATH causes Sun make to only execute
3646# the first set of double-colon rules, so remove it if not needed.
3647# If there is a colon in the path, we need to keep it.
3648if test "x$srcdir" = x.; then
3649 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3650fi
3651
3652trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3653
3654DEFS=-DHAVE_CONFIG_H
3655
3656# Without the "./", some shells look in PATH for config.status.
3657: ${CONFIG_STATUS=./config.status}
3658
3659echo creating $CONFIG_STATUS
3660rm -f $CONFIG_STATUS
3661cat > $CONFIG_STATUS <<EOF
3662#! /bin/sh
3663# Generated automatically by configure.
3664# Run this file to recreate the current configuration.
3665# This directory was configured as follows,
3666# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3667#
3668# $0 $ac_configure_args
3669#
3670# Compiler output produced by configure, useful for debugging
3671# configure, is in ./config.log if it exists.
3672
3673ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3674for ac_option
3675do
3676 case "\$ac_option" in
3677 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3678 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3679 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3680 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
a808d541 3681 echo "$CONFIG_STATUS generated by autoconf version 2.13"
cd6ede75
UD
3682 exit 0 ;;
3683 -help | --help | --hel | --he | --h)
3684 echo "\$ac_cs_usage"; exit 0 ;;
3685 *) echo "\$ac_cs_usage"; exit 1 ;;
3686 esac
3687done
3688
3689ac_given_srcdir=$srcdir
3690ac_given_INSTALL="$INSTALL"
3691
3692trap 'rm -fr `echo "config.make glibcbug ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3693EOF
3694cat >> $CONFIG_STATUS <<EOF
3695
3696# Protect against being on the right side of a sed subst in config.status.
3697sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3698 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3699$ac_vpsub
3700$extrasub
5c2a0669 3701s%@SHELL@%$SHELL%g
cd6ede75
UD
3702s%@CFLAGS@%$CFLAGS%g
3703s%@CPPFLAGS@%$CPPFLAGS%g
3704s%@CXXFLAGS@%$CXXFLAGS%g
5c2a0669 3705s%@FFLAGS@%$FFLAGS%g
cd6ede75
UD
3706s%@DEFS@%$DEFS%g
3707s%@LDFLAGS@%$LDFLAGS%g
3708s%@LIBS@%$LIBS%g
3709s%@exec_prefix@%$exec_prefix%g
3710s%@prefix@%$prefix%g
3711s%@program_transform_name@%$program_transform_name%g
3712s%@bindir@%$bindir%g
3713s%@sbindir@%$sbindir%g
3714s%@libexecdir@%$libexecdir%g
3715s%@datadir@%$datadir%g
3716s%@sysconfdir@%$sysconfdir%g
3717s%@sharedstatedir@%$sharedstatedir%g
3718s%@localstatedir@%$localstatedir%g
3719s%@libdir@%$libdir%g
3720s%@includedir@%$includedir%g
3721s%@oldincludedir@%$oldincludedir%g
3722s%@infodir@%$infodir%g
3723s%@mandir@%$mandir%g
d67281a7 3724s%@with_cvs@%$with_cvs%g
deb7f0b4 3725s%@oldest_abi@%$oldest_abi%g
cd6ede75 3726s%@subdirs@%$subdirs%g
73237de3 3727s%@force_install@%$force_install%g
2a068d20 3728s%@all_warnings@%$all_warnings%g
cd6ede75
UD
3729s%@host@%$host%g
3730s%@host_alias@%$host_alias%g
3731s%@host_cpu@%$host_cpu%g
3732s%@host_vendor@%$host_vendor%g
3733s%@host_os@%$host_os%g
3734s%@base_machine@%$base_machine%g
3735s%@sysnames@%$sysnames%g
3736s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5c2a0669 3737s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
cd6ede75
UD
3738s%@INSTALL_DATA@%$INSTALL_DATA%g
3739s%@LN_S@%$LN_S%g
c218729d 3740s%@PWD_P@%$PWD_P%g
cd6ede75
UD
3741s%@build@%$build%g
3742s%@build_alias@%$build_alias%g
3743s%@build_cpu@%$build_cpu%g
3744s%@build_vendor@%$build_vendor%g
3745s%@build_os@%$build_os%g
4bca4c17
UD
3746s%@CC@%$CC%g
3747s%@MAKE@%$MAKE%g
3748s%@MSGFMT@%$MSGFMT%g
3749s%@MAKEINFO@%$MAKEINFO%g
aec103d3 3750s%@SED@%$SED%g
4bca4c17 3751s%@cross_linkable@%$cross_linkable%g
cd6ede75
UD
3752s%@BUILD_CC@%$BUILD_CC%g
3753s%@cross_compiling@%$cross_compiling%g
3754s%@CPP@%$CPP%g
3755s%@AR@%$AR%g
3756s%@RANLIB@%$RANLIB%g
4bca4c17 3757s%@MIG@%$MIG%g
ea9f119b 3758s%@CCVERSION@%$CCVERSION%g
3c720987 3759s%@SYSINCLUDES@%$SYSINCLUDES%g
cd6ede75
UD
3760s%@BASH@%$BASH%g
3761s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g
3762s%@KSH@%$KSH%g
3763s%@libc_cv_have_ksh@%$libc_cv_have_ksh%g
5aa8ff62 3764s%@AWK@%$AWK%g
a2b08ee5 3765s%@PERL@%$PERL%g
c0016081
UD
3766s%@INSTALL_INFO@%$INSTALL_INFO%g
3767s%@OLD_DEBIAN_INSTALL_INFO@%$OLD_DEBIAN_INSTALL_INFO%g
ae113383 3768s%@BISON@%$BISON%g
cd6ede75 3769s%@VERSIONING@%$VERSIONING%g
2d499f55 3770s%@libc_cv_asm_protected_directive@%$libc_cv_asm_protected_directive%g
2f54c82d
UD
3771s%@libc_cv_z_nodelete@%$libc_cv_z_nodelete%g
3772s%@libc_cv_z_nodlopen@%$libc_cv_z_nodlopen%g
5d916713 3773s%@libc_cv_z_initfirst@%$libc_cv_z_initfirst%g
639c3248 3774s%@libc_cv_Bgroup@%$libc_cv_Bgroup%g
cd6ede75 3775s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g
b17277cf 3776s%@no_whole_archive@%$no_whole_archive%g
dff14448 3777s%@exceptions@%$exceptions%g
c8f3e6db 3778s%@LIBGD@%$LIBGD%g
8ed1e7d5 3779s%@sizeof_long_double@%$sizeof_long_double%g
cd6ede75
UD
3780s%@uname_sysname@%$uname_sysname%g
3781s%@uname_release@%$uname_release%g
3782s%@uname_version@%$uname_version%g
3783s%@stdio@%$stdio%g
dff14448 3784s%@old_glibc_headers@%$old_glibc_headers%g
cd6ede75 3785s%@libc_cv_slibdir@%$libc_cv_slibdir%g
a1d84548 3786s%@libc_cv_localedir@%$libc_cv_localedir%g
cd6ede75
UD
3787s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
3788s%@libc_cv_rootsbindir@%$libc_cv_rootsbindir%g
b43b13ac 3789s%@use_ldconfig@%$use_ldconfig%g
cb343854 3790s%@ldd_rewrite_script@%$ldd_rewrite_script%g
cd6ede75
UD
3791s%@gnu_ld@%$gnu_ld%g
3792s%@gnu_as@%$gnu_as%g
3793s%@elf@%$elf%g
650425ce 3794s%@static@%$static%g
cd6ede75 3795s%@shared@%$shared%g
cc3fa755 3796s%@pic_default@%$pic_default%g
cd6ede75
UD
3797s%@profile@%$profile%g
3798s%@omitfp@%$omitfp%g
3799s%@bounded@%$bounded%g
3800s%@static_nss@%$static_nss%g
3801s%@nopic_initfini@%$nopic_initfini%g
3802s%@DEFINES@%$DEFINES%g
7cabd57c 3803s%@linux_doors@%$linux_doors%g
cd6ede75 3804s%@VERSION@%$VERSION%g
ee74a442 3805s%@RELEASE@%$RELEASE%g
cd6ede75
UD
3806
3807CEOF
3808EOF
3809
3810cat >> $CONFIG_STATUS <<\EOF
3811
3812# Split the substitutions into bite-sized pieces for seds with
3813# small command number limits, like on Digital OSF/1 and HP-UX.
3814ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3815ac_file=1 # Number of current file.
3816ac_beg=1 # First line for current file.
3817ac_end=$ac_max_sed_cmds # Line after last line for current file.
3818ac_more_lines=:
3819ac_sed_cmds=""
3820while $ac_more_lines; do
3821 if test $ac_beg -gt 1; then
3822 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3823 else
3824 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3825 fi
3826 if test ! -s conftest.s$ac_file; then
3827 ac_more_lines=false
3828 rm -f conftest.s$ac_file
3829 else
3830 if test -z "$ac_sed_cmds"; then
3831 ac_sed_cmds="sed -f conftest.s$ac_file"
3832 else
3833 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3834 fi
3835 ac_file=`expr $ac_file + 1`
3836 ac_beg=$ac_end
3837 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3838 fi
3839done
3840if test -z "$ac_sed_cmds"; then
3841 ac_sed_cmds=cat
3842fi
3843EOF
3844
3845cat >> $CONFIG_STATUS <<EOF
3846
3847CONFIG_FILES=\${CONFIG_FILES-"config.make glibcbug ${config_makefile} ${config_uname}"}
3848EOF
3849cat >> $CONFIG_STATUS <<\EOF
3850for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3851 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3852 case "$ac_file" in
3853 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3854 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3855 *) ac_file_in="${ac_file}.in" ;;
3856 esac
3857
3858 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3859
3860 # Remove last slash and all that follows it. Not all systems have dirname.
3861 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3862 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3863 # The file is in a subdirectory.
3864 test ! -d "$ac_dir" && mkdir "$ac_dir"
3865 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3866 # A "../" for each directory in $ac_dir_suffix.
3867 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3868 else
3869 ac_dir_suffix= ac_dots=
3870 fi
3871
3872 case "$ac_given_srcdir" in
3873 .) srcdir=.
3874 if test -z "$ac_dots"; then top_srcdir=.
3875 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3876 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3877 *) # Relative path.
3878 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3879 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3880 esac
3881
3882 case "$ac_given_INSTALL" in
3883 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3884 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3885 esac
3886
3887 echo creating "$ac_file"
3888 rm -f "$ac_file"
3889 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3890 case "$ac_file" in
3891 *Makefile*) ac_comsub="1i\\
3892# $configure_input" ;;
3893 *) ac_comsub= ;;
3894 esac
3895
3896 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3897 sed -e "$ac_comsub
3898s%@configure_input@%$configure_input%g
3899s%@srcdir@%$srcdir%g
3900s%@top_srcdir@%$top_srcdir%g
3901s%@INSTALL@%$INSTALL%g
3902" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3903fi; done
3904rm -f conftest.s*
3905
3906# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3907# NAME is the cpp macro being defined and VALUE is the value it is being given.
3908#
3909# ac_d sets the value in "#define NAME VALUE" lines.
3910ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3911ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3912ac_dC='\3'
3913ac_dD='%g'
3914# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3915ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3916ac_uB='\([ ]\)%\1#\2define\3'
3917ac_uC=' '
3918ac_uD='\4%g'
3919# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3920ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3921ac_eB='$%\1#\2define\3'
3922ac_eC=' '
3923ac_eD='%g'
3924
3925if test "${CONFIG_HEADERS+set}" != set; then
3926EOF
3927cat >> $CONFIG_STATUS <<EOF
3928 CONFIG_HEADERS="config.h"
3929EOF
3930cat >> $CONFIG_STATUS <<\EOF
3931fi
3932for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3933 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3934 case "$ac_file" in
3935 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3936 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3937 *) ac_file_in="${ac_file}.in" ;;
3938 esac
3939
3940 echo creating $ac_file
3941
3942 rm -f conftest.frag conftest.in conftest.out
3943 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3944 cat $ac_file_inputs > conftest.in
3945
3946EOF
3947
3948# Transform confdefs.h into a sed script conftest.vals that substitutes
3949# the proper values into config.h.in to produce config.h. And first:
3950# Protect against being on the right side of a sed subst in config.status.
3951# Protect against being in an unquoted here document in config.status.
3952rm -f conftest.vals
3953cat > conftest.hdr <<\EOF
3954s/[\\&%]/\\&/g
3955s%[\\$`]%\\&%g
3956s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3957s%ac_d%ac_u%gp
3958s%ac_u%ac_e%gp
3959EOF
3960sed -n -f conftest.hdr confdefs.h > conftest.vals
3961rm -f conftest.hdr
3962
3963# This sed command replaces #undef with comments. This is necessary, for
3964# example, in the case of _POSIX_SOURCE, which is predefined and required
3965# on some systems where configure will not decide to define it.
3966cat >> conftest.vals <<\EOF
3967s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3968EOF
3969
3970# Break up conftest.vals because some shells have a limit on
3971# the size of here documents, and old seds have small limits too.
3972
3973rm -f conftest.tail
3974while :
3975do
3976 ac_lines=`grep -c . conftest.vals`
3977 # grep -c gives empty output for an empty file on some AIX systems.
3978 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3979 # Write a limited-size here document to conftest.frag.
3980 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3981 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3982 echo 'CEOF
3983 sed -f conftest.frag conftest.in > conftest.out
3984 rm -f conftest.in
3985 mv conftest.out conftest.in
3986' >> $CONFIG_STATUS
3987 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3988 rm -f conftest.vals
3989 mv conftest.tail conftest.vals
3990done
3991rm -f conftest.vals
3992
3993cat >> $CONFIG_STATUS <<\EOF
3994 rm -f conftest.frag conftest.h
3995 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3996 cat conftest.in >> conftest.h
3997 rm -f conftest.in
3998 if cmp -s $ac_file conftest.h 2>/dev/null; then
3999 echo "$ac_file is unchanged"
4000 rm -f conftest.h
4001 else
4002 # Remove last slash and all that follows it. Not all systems have dirname.
4003 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4004 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4005 # The file is in a subdirectory.
4006 test ! -d "$ac_dir" && mkdir "$ac_dir"
4007 fi
4008 rm -f $ac_file
4009 mv conftest.h $ac_file
4010 fi
4011fi; done
4012
4013EOF
4014
4015cat >> $CONFIG_STATUS <<EOF
4016ac_sources="`echo $libc_link_sources`"
4017ac_dests="`echo $libc_link_dests`"
4018EOF
4019
4020cat >> $CONFIG_STATUS <<\EOF
4021srcdir=$ac_given_srcdir
4022while test -n "$ac_sources"; do
4023 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4024 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4025
4026 echo "linking $srcdir/$ac_source to $ac_dest"
4027
4028 if test ! -r $srcdir/$ac_source; then
4029 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4030 fi
4031 rm -f $ac_dest
4032
4033 # Make relative symlinks.
4034 # Remove last slash and all that follows it. Not all systems have dirname.
4035 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4036 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4037 # The dest file is in a subdirectory.
4038 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4039 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4040 # A "../" for each directory in $ac_dest_dir_suffix.
4041 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4042 else
4043 ac_dest_dir_suffix= ac_dots=
4044 fi
4045
4046 case "$srcdir" in
4047 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4048 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4049 esac
4050
4051 # Make a symlink if possible; otherwise try a hard link.
4052 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4053 ln $srcdir/$ac_source $ac_dest; then :
4054 else
4055 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4056 fi
4057done
4058EOF
4059cat >> $CONFIG_STATUS <<EOF
c0fb8a56 4060config_vars='$config_vars'
cd6ede75
UD
4061EOF
4062cat >> $CONFIG_STATUS <<\EOF
4063
c0fb8a56
UD
4064case $CONFIG_FILES in *config.make*)
4065echo "$config_vars" >> config.make;;
4066esac
4067test -d bits || mkdir bits
cd6ede75
UD
4068exit 0
4069EOF
4070chmod +x $CONFIG_STATUS
4071rm -fr confdefs* $ac_clean_files
a808d541 4072test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
cd6ede75
UD
4073
4074if test "$no_recursion" != yes; then
4075
4076 # Remove --cache-file and --srcdir arguments so they do not pile up.
4077 ac_sub_configure_args=
4078 ac_prev=
4079 for ac_arg in $ac_configure_args; do
4080 if test -n "$ac_prev"; then
4081 ac_prev=
4082 continue
4083 fi
4084 case "$ac_arg" in
4085 -cache-file | --cache-file | --cache-fil | --cache-fi \
4086 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4087 ac_prev=cache_file ;;
4088 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4089 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
4090 ;;
4091 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4092 ac_prev=srcdir ;;
4093 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4094 ;;
4095 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
4096 esac
4097 done
4098
4099 for ac_config_dir in $add_ons; do
4100
4101 # Do not complain, so a configure script can configure whichever
4102 # parts of a large source tree are present.
4103 if test ! -d $srcdir/$ac_config_dir; then
4104 continue
4105 fi
4106
4107 echo configuring in $ac_config_dir
4108
4109 case "$srcdir" in
4110 .) ;;
4111 *)
4112 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
4113 else
4114 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
4115 fi
4116 ;;
4117 esac
4118
4119 ac_popdir=`pwd`
4120 cd $ac_config_dir
4121
4122 # A "../" for each directory in /$ac_config_dir.
4123 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4124
4125 case "$srcdir" in
4126 .) # No --srcdir option. We are building in place.
4127 ac_sub_srcdir=$srcdir ;;
4128 /*) # Absolute path.
4129 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
4130 *) # Relative path.
4131 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
4132 esac
4133
4134 # Check for guested configure; otherwise get Cygnus style configure.
4135 if test -f $ac_sub_srcdir/configure; then
a808d541 4136 ac_sub_configure=$ac_sub_srcdir/configure
cd6ede75
UD
4137 elif test -f $ac_sub_srcdir/configure.in; then
4138 ac_sub_configure=$ac_configure
4139 else
4140 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
4141 ac_sub_configure=
4142 fi
4143
4144 # The recursion is here.
4145 if test -n "$ac_sub_configure"; then
4146
4147 # Make the cache file name correct relative to the subdirectory.
4148 case "$cache_file" in
4149 /*) ac_sub_cache_file=$cache_file ;;
4150 *) # Relative path.
4151 ac_sub_cache_file="$ac_dots$cache_file" ;;
4152 esac
4153 case "$ac_given_INSTALL" in
4154 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4155 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4156 esac
4157
a808d541 4158 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
cd6ede75 4159 # The eval makes quoting arguments work.
a808d541 4160 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
4161 then :
4162 else
4163 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
4164 fi
4165 fi
4166
4167 cd $ac_popdir
4168 done
4169fi
4170