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