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