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