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