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