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