Properly handle STT_GNU_IFUNC symbols in do_sym.
[glibc.git] / configure.in
blob182c683e503946c90dc6ad9f0eeec32c3ad0cf03
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION([$CVSid$])
3 AC_PREREQ(2.53)dnl              dnl Minimum Autoconf version required.
4 AC_INIT([GNU C Library], [(see version.h)], [glibc])
5 AC_CONFIG_SRCDIR([include/features.h])
6 AC_CONFIG_HEADERS([config.h])
7 AC_CONFIG_AUX_DIR([scripts])
9 dnl This is here so we can set $subdirs directly based on configure fragments.
10 AC_CONFIG_SUBDIRS()
12 AC_CANONICAL_HOST
14 AC_PROG_CC
15 if test $host != $build; then
16   AC_CHECK_PROGS(BUILD_CC, gcc cc)
18 AC_SUBST(cross_compiling)
19 AC_PROG_CPP
20 # We need the C++ compiler only for testing.
21 AC_PROG_CXX
23 if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
24   AC_MSG_ERROR([you must configure in a separate build directory])
27 # This will get text that should go into config.make.
28 config_vars=
30 # Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
31 AC_ARG_WITH([gd],
32             AC_HELP_STRING([--with-gd=DIR],
33                            [find libgd include dir and library with prefix DIR]),
34             [dnl
35 case "$with_gd" in
36 yes|''|no) ;;
37 *) libgd_include="-I$withval/include"
38    libgd_ldflags="-L$withval/lib" ;;
39 esac
41 AC_ARG_WITH([gd-include],
42             AC_HELP_STRING([--with-gd-include=DIR],
43                            [find libgd include files in DIR]),
44             [dnl
45 case "$with_gd_include" in
46 ''|no) ;;
47 *) libgd_include="-I$withval" ;;
48 esac
50 AC_ARG_WITH([gd-lib],
51             AC_HELP_STRING([--with-gd-lib=DIR],
52                            [find libgd library files in DIR]),
53             [dnl
54 case "$with_gd_lib" in
55 ''|no) ;;
56 *) libgd_ldflags="-L$withval" ;;
57 esac
60 if test -n "$libgd_include"; then
61   config_vars="$config_vars
62 CFLAGS-memusagestat.c = $libgd_include"
64 if test -n "$libgd_ldflags"; then
65   config_vars="$config_vars
66 libgd-LDFLAGS = $libgd_ldflags"
69 dnl Arguments to specify presence of other packages/features.
70 AC_ARG_WITH([fp],
71             AC_HELP_STRING([--with-fp],
72                            [if using floating-point hardware @<:@default=yes@:>@]),
73             [with_fp=$withval],
74             [with_fp=yes])
75 AC_SUBST(with_fp)
76 AC_ARG_WITH([binutils],
77             AC_HELP_STRING([--with-binutils=PATH],
78                            [specify location of binutils (as and ld)]),
79             [path_binutils=$withval],
80             [path_binutils=''])
81 AC_ARG_WITH([elf],
82             AC_HELP_STRING([--with-elf],
83                            [if using the ELF object format]),
84             [elf=$withval],
85             [elf=no])
86 AC_ARG_WITH([selinux],
87             AC_HELP_STRING([--with-selinux],
88                            [if building with SELinux support]),
89             [with_selinux=$withval],
90             [with_selinux=auto])
91 AC_ARG_WITH([xcoff],
92             AC_HELP_STRING([--with-xcoff],
93                            [if using the XCOFF object format]),
94             [xcoff=$withval],
95             [xcoff=no])
96 AC_ARG_WITH([cvs],
97             AC_HELP_STRING([--without-cvs],
98                            [if CVS should not be used]),
99             [with_cvs=$withval],
100             [with_cvs=yes])
101 if test "$with_cvs" = yes; then
102   if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
103   then
104     with_cvs=no
105   fi
107 AC_SUBST(with_cvs)
109 AC_ARG_WITH([headers],
110             AC_HELP_STRING([--with-headers=PATH],
111                            [location of system headers to use
112                             (for example /usr/src/linux/include)
113                             @<:@default=compiler default@:>@]),
114             [sysheaders=$withval],
115             [sysheaders=''])
117 AC_ARG_ENABLE([sanity-checks],
118               AC_HELP_STRING([--disable-sanity-checks],
119                              [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
120               [enable_sanity=$enableval],
121               [enable_sanity=yes])
123 AC_SUBST(enable_check_abi)
124 AC_ARG_ENABLE([check-abi],
125               AC_HELP_STRING([--enable-check-abi],
126                              [do "make check-abi" in "make check" (no/warn/yes)
127                               @<:@default=no@:>@]),
128               [enable_check_abi=$enableval],
129               [enable_check_abi=no])
131 dnl Arguments to enable or disable building the static, shared, profiled,
132 dnl and -fomit-frame-pointer libraries.
133 dnl I've disabled this for now since we cannot build glibc without static
134 dnl libraries built in the moment.
135 dnl AC_ARG_ENABLE([static],
136 dnl               AC_HELP_STRING([--enable-static],
137 dnl                              [build static library @<:@default=yes@:>@]),
138 dnl               [static=$enableval],
139 dnl               [static=yes])
140 static=yes
141 AC_ARG_ENABLE([shared],
142               AC_HELP_STRING([--enable-shared],
143                              [build shared library @<:@default=yes if GNU ld & ELF@:>@]),
144               [shared=$enableval],
145               [shared=default])
146 AC_ARG_ENABLE([profile],
147               AC_HELP_STRING([--enable-profile],
148                              [build profiled library @<:@default=no@:>@]),
149               [profile=$enableval],
150               [profile=no])
151 AC_ARG_ENABLE([omitfp],
152               AC_HELP_STRING([--enable-omitfp],
153                              [build undebuggable optimized library @<:@default=no@:>@]),
154               [omitfp=$enableval],
155               [omitfp=no])
156 AC_ARG_ENABLE([bounded],
157               AC_HELP_STRING([--enable-bounded],
158                              [build with runtime bounds checking @<:@default=no@:>@]),
159               [bounded=$enableval],
160               [bounded=no])
161 AC_ARG_ENABLE([versioning],
162               AC_HELP_STRING([--disable-versioning],
163                              [do not include versioning information in the library objects @<:@default=yes if supported@:>@]),
164               [enable_versioning=$enableval],
165               [enable_versioning=yes])
167 AC_ARG_ENABLE([oldest-abi],
168               AC_HELP_STRING([--enable-oldest-abi=ABI],
169                              [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]),
170               [oldest_abi=$enableval],
171               [oldest_abi=no])
172 if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
173   oldest_abi=default
174 else
175   AC_DEFINE_UNQUOTED(GLIBC_OLDEST_ABI, "$oldest_abi")
177 AC_SUBST(oldest_abi)
179 AC_ARG_ENABLE([stackguard-randomization],
180               AC_HELP_STRING([--enable-stackguard-randomization],
181                              [initialize __stack_chk_guard canary with a random number at program start]),
182               [enable_stackguard_randomize=$enableval],
183               [enable_stackguard_randomize=no])
184 if test "$enable_stackguard_randomize" = yes; then
185   AC_DEFINE(ENABLE_STACKGUARD_RANDOMIZE)
188 dnl Generic infrastructure for drop-in additions to libc.
189 AC_ARG_ENABLE([add-ons],
190               AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
191                              [configure and build add-ons in DIR1,DIR2,...
192                               search for add-ons if no parameter given]),
193                              , [enable_add_ons=yes])
195 dnl Let the user avoid using TLS.  Don't know why but...
196 AC_ARG_WITH([tls],
197             AC_HELP_STRING([--with-tls],
198                            [enable support for TLS]),
199             [usetls=$withval],
200             [usetls=yes])
202 AC_ARG_WITH([__thread],
203             AC_HELP_STRING([--without-__thread],
204                            [do not use TLS features even when supporting them]),
205             [use__thread=$withval],
206             [use__thread=yes])
208 AC_ARG_ENABLE([hidden-plt],
209               AC_HELP_STRING([--disable-hidden-plt],
210                              [do not hide internal function calls to avoid PLT]),
211               [hidden=$enableval],
212               [hidden=yes])
213 if test "x$hidden" = xno; then
214   AC_DEFINE(NO_HIDDEN)
217 AC_ARG_ENABLE([bind-now],
218               AC_HELP_STRING([--enable-bind-now],
219                              [disable lazy relocations in DSOs]),
220               [bindnow=$enableval],
221               [bindnow=no])
222 AC_SUBST(bindnow)
224 dnl On some platforms we cannot use dynamic loading.  We must provide
225 dnl static NSS modules.
226 AC_ARG_ENABLE([static-nss],
227               AC_HELP_STRING([--enable-static-nss],
228                              [build static NSS modules @<:@default=no@:>@]),
229               [static_nss=$enableval],
230               [static_nss=no])
231 dnl Enable static NSS also if we build no shared objects.
232 if test x"$static_nss" = xyes || test x"$shared" = xno; then
233   static_nss=yes
234   AC_DEFINE(DO_STATIC_NSS)
237 AC_ARG_ENABLE([force-install],
238               AC_HELP_STRING([--disable-force-install],
239                              [don't force installation of files from this package, even if they are older than the installed files]),
240               [force_install=$enableval],
241               [force_install=yes])
242 AC_SUBST(force_install)
244 dnl On some platforms we allow dropping compatibility with all kernel
245 dnl versions.
246 AC_ARG_ENABLE([kernel],
247               AC_HELP_STRING([--enable-kernel=VERSION],
248                              [compile for compatibility with kernel not older than VERSION]),
249               [minimum_kernel=$enableval],
250               [])
251 dnl Prevent unreasonable values.
252 if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
253   # Better nothing than this.
254   minimum_kernel=""
255 else
256   if test "$minimum_kernel" = current; then
257     minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel=
258   fi
261 dnl For the development we sometimes want gcc to issue even more warnings.
262 dnl This is not the default since many of the extra warnings are not
263 dnl appropriate.
264 AC_ARG_ENABLE([all-warnings],
265               AC_HELP_STRING([--enable-all-warnings],
266                              [enable all useful warnings gcc can issue]),
267               [all_warnings=$enableval],
268               [])
269 AC_SUBST(all_warnings)
271 AC_ARG_ENABLE([multi-arch],
272               AC_HELP_STRING([--enable-multi-arch],
273                              [enable single DSO with optimizations for multiple architectures]),
274               [multi_arch=$enableval],
275               [multi_arch=no])
276 if test x"$multi_arch" = xyes; then
277   AC_DEFINE(USE_MULTIARCH)
278   multi_arch_d=/multiarch
280 AC_SUBST(multi_arch)
282 AC_ARG_ENABLE([experimental-malloc],
283               AC_HELP_STRING([--enable-experimental-malloc],
284                              [enable experimental malloc features]),
285               [experimental_malloc=$enableval],
286               [])
287 AC_SUBST(experimental_malloc)
289 AC_ARG_ENABLE([nss-crypt],
290               AC_HELP_STRING([--enable-nss-crypt],
291                              [enable libcrypt to use nss]),
292               [nss_crypt=$enableval],
293               [nss_crypt=no])
294 if test x$nss_crypt = xyes; then
295   nss_includes=-I$(nss-config --includedir 2>/dev/null)
296   if test $? -ne 0; then
297     AC_MSG_ERROR([cannot find include directory with nss-config])
298   fi
299   old_CFLAGS="$CFLAGS"
300   CFLAGS="$CFLAGS $nss_includes"
301   AC_COMPILE_IFELSE([typedef int PRBool;
302 #include <hasht.h>
303 #include <nsslowhash.h>
304 void f (void) { NSSLOW_Init (); }],
305              libc_cv_nss_crypt=yes,
306              AC_MSG_ERROR([
307 cannot find NSS headers with lowlevel hash function interfaces]))
308   old_LIBS="$LIBS"
309   LIBS="$LIBS -lfreebl3"
310   AC_LINK_IFELSE([AC_LANG_PROGRAM([typedef int PRBool;
311 #include <hasht.h>
312 #include <nsslowhash.h>],
313                                   [NSSLOW_Init();])],
314                  libc_cv_nss_crypt=yes,
315                  AC_MSG_ERROR([
316 cannot link program using lowlevel NSS hash functions]))
317   CFLAGS="$old_CFLAGS"
318   LIBS="$old_LIBS"
319 else
320   libc_cv_nss_crypt=no
322 AC_SUBST(libc_cv_nss_crypt)
324 # The way shlib-versions is used to generate soversions.mk uses a
325 # fairly simplistic model for name recognition that can't distinguish
326 # i486-pc-linux-gnu fully from i486-pc-gnu.  So we mutate a $host_os
327 # of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
328 # tell.  This doesn't get used much beyond that, so it's fairly safe.
329 case "$host_os" in
330 linux*)
331   ;;
332 gnu*)
333   host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
334   ;;
335 esac
337 # We keep the original values in `$config_*' and never modify them, so we
338 # can write them unchanged into config.make.  Everything else uses
339 # $machine, $vendor, and $os, and changes them whenever convenient.
340 config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
342 # Don't allow vendor == "unknown"
343 test "$config_vendor" = unknown && config_vendor=
344 config_os="`echo $config_os | sed 's/^unknown-//'`"
346 # Some configurations imply other options.
347 case "$host_os" in
348 # i586-linuxaout is mangled into i586-pc-linux-gnuaout
349 linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
350   ;;
351 gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
352   # These systems (almost) always use the ELF format.
353   elf=yes
354   ;;
355 aix*)
356   # These systems are always xcoff
357   xcoff=yes
358   elf=no
359   ;;
360 esac
362 # The configure fragment of an add-on port can modify these to supplement
363 # or override the table in the case statement below.  No fragment should
364 # ever change the config_* variables, however.
365 machine=$config_machine
366 vendor=$config_vendor
367 os=$config_os
368 base_os=''
370 # config.guess on some IBM machines says `rs6000' instead of `powerpc'.
371 # Unify this here.
372 if test "$machine" = rs6000; then
373   machine="powerpc"
376 # Braindead PowerPC box with absolutely no FPU.
377 case "$machine-$host_os" in
378   powerpc*-*soft)
379     with_fp=no
380     ;;
381 esac
383 submachine=
384 AC_ARG_WITH([cpu],
385             AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]),
386             [dnl
387   case "$withval" in
388   yes|'') AC_MSG_ERROR([--with-cpu requires an argument]) ;;
389   no) ;;
390   *) submachine="$withval" ;;
391   esac
394 # An add-on can set this when it wants to disable the sanity check below.
395 libc_config_ok=no
397 dnl Having this here, though empty, makes sure that if add-ons' fragments
398 dnl do AC_CONFIG_SUBDIRS([some-dir]), which just sets $subdirs, then
399 dnl our AC_OUTPUT will actually use it.
400 AC_CONFIG_SUBDIRS()
402 case "$enable_add_ons" in
403 ''|no) add_ons= ;;
404 yes|'*')
405  add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
406           sed 's@/[[^/]]*$@@' | sort | uniq`
407          add_ons_automatic=yes
408          ;;
409 *) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
410        add_ons_automatic=no ;;
411 esac
413 configured_add_ons=
414 add_ons_sfx=
415 add_ons_pfx=
416 if test x"$add_ons" != x; then
417   for f in $add_ons; do
418     # Some sanity checks
419     case "$f" in
420     crypt)
421       AC_MSG_ERROR([
422 *** It seems that you're using an old \`crypt' add-on.  crypt is now
423 *** part of glibc and using the old add-on will not work with this
424 *** release.  Start again with fresh sources and without the old
425 *** \`crypt' add-on.])
426     ;;
427     localedata)
428       AC_MSG_ERROR([
429 *** It seems that you're using an old \`localedata' add-on.  localedata
430 *** is now part of glibc and using the old add-on will not work with
431 *** this release.  Start again with fresh sources and without the old
432 *** \`localedata' add-on.])
433     ;;
434     esac
435   done
437   # Now source each add-on's configure fragment.
438   # The fragments can use $srcdir/$libc_add_on to find themselves,
439   # and test $add_ons_automatic to see if they were explicitly requested.
440   # A fragment can clear (or even change) $libc_add_on to affect
441   # whether it goes into the list to be actually used in the build.
442   use_add_ons=
443   for libc_add_on in $add_ons; do
444     # Test whether such a directory really exists.
445     # It can be absolute, or relative to $srcdir, or relative to the build dir.
446     case "$libc_add_on" in
447     /*)
448       libc_add_on_srcdir=$libc_add_on
449       ;;
450     *)
451       test -d "$srcdir/$libc_add_on" || {
452         if test -d "$libc_add_on"; then
453           libc_add_on="`pwd`/$libc_add_on"
454         else
455           AC_MSG_ERROR(add-on directory \"$libc_add_on\" does not exist)
456         fi
457       }
458       libc_add_on_srcdir=$srcdir/$libc_add_on
459       ;;
460     esac
462     libc_add_on_frag=$libc_add_on_srcdir/configure
463     libc_add_on_canonical=
464     libc_add_on_config_subdirs=
465     if test -r "$libc_add_on_frag"; then
466       AC_MSG_NOTICE(running configure fragment for add-on $libc_add_on)
467       libc_add_on_canonical=unknown
468       libc_add_on_subdirs=
469       . "$libc_add_on_frag"
470       test -z "$libc_add_on" || {
471         configured_add_ons="$configured_add_ons $libc_add_on"
472         if test "x$libc_add_on_canonical" = xunknown; then
473           AC_MSG_ERROR(fragment must set \$libc_add_on_canonical)
474         fi
475         for d in $libc_add_on_subdirs; do
476           case "$libc_add_on" in
477           /*) subdir_srcdir="$libc_add_on" ;;
478           *) subdir_srcdir="\$(..)$libc_add_on" ;;
479           esac
480           case "$d" in
481           .)
482             d="${libc_add_on_canonical:-$libc_add_on}"
483             ;;
484           /*)
485             subdir_srcdir="$d"
486             ;;
487           *)
488             subdir_srcdir="$subdir_srcdir/$d"
489             ;;
490           esac
491           d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
492           add_on_subdirs="$add_on_subdirs $d"
493           test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
494 $d-srcdir = $subdir_srcdir"
495         done
496         for d in $libc_add_on_config_subdirs; do
497           case "$d" in
498           /*) AC_MSG_ERROR(dnl
499 fragment uses absolute path in \$libc_add_on_config_subdirs) ;;
500           esac
501           if test ! -d "$libc_add_on_srcdir/$d"; then
502             AC_MSG_ERROR(fragment wants to configure missing directory $d)
503           fi
504           case "$libc_add_on" in
505           /*) AC_MSG_ERROR(dnl
506 relative path required for add-on using \$libc_add_on_config_subdirs) ;;
507           esac
508           subdirs="$subdirs $libc_add_on/$d"
509         done
510       }
511     fi
512     if test -n "$libc_add_on"; then
513       if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
514       then
515         AC_MSG_CHECKING(add-on $libc_add_on for preconfigure fragments)
516         for frag in $frags; do
517           name=`echo "$frag" | sed 's@/[[^/]]*$@@;s@^.*/@@'`
518           echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
519           . "$frag"
520         done
521         AC_MSG_RESULT()
522       fi
523       use_add_ons="$use_add_ons $libc_add_on"
524       add_ons_pfx="$add_ons_pfx $libc_add_on/"
525       test -z "$libc_add_on_canonical" ||
526       add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
527     fi
528   done
529   # Use echo to strip excess whitespace.
530   add_ons="`echo $use_add_ons`"
532 AC_SUBST(add_ons)
533 AC_SUBST(add_on_subdirs)
537 ### I put this here to prevent those annoying emails from people who cannot
538 ### read and try to compile glibc on unsupported platforms.  --drepper
540 ### By using the undocumented --enable-hacker-mode option for configure
541 ### one can skip this test to make the configuration not fail for unsupported
542 ### platforms.
544 if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
545   case "$machine-$host_os" in
546   *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
547     ;;
548   *)
549     echo "*** The GNU C library is currently not available for this platform."
550     echo "*** So far nobody cared to port it and if there is no volunteer it"
551     echo "*** might never happen.  So, if you have interest to see glibc on"
552     echo "*** this platform visit"
553     echo "***   http://www.gnu.org/software/libc/porting.html"
554     echo "*** and join the group of porters"
555     exit 1
556     ;;
557   esac
560 dnl We need to use [ and ] for other purposes for a while now.
561 changequote(,)dnl
562 # Expand the configuration machine name into a subdirectory by architecture
563 # type and particular chip.  If an add-on configure fragment already set
564 # base_machine, we don't change it.
565 test -n "$base_machine" || case "$machine" in
566 a29k | am29000) base_machine=a29k machine=a29k ;;
567 c3[012])        base_machine=cx0 machine=cx0/c30 ;;
568 c4[04])         base_machine=cx0 machine=cx0/c40 ;;
569 i[34567]86)     base_machine=i386 machine=i386/$machine ;;
570 ia64)           base_machine=ia64 machine=ia64 ;;
571 m88???)         base_machine=m88k machine=m88k/$machine ;;
572 m88k)           base_machine=m88k machine=m88k/m88100 ;;
573 powerpc)        base_machine=powerpc machine=powerpc/powerpc32 ;;
574 powerpc64)      base_machine=powerpc machine=powerpc/powerpc64 ;;
575 s390)           base_machine=s390 machine=s390/s390-32 ;;
576 s390x)          base_machine=s390 machine=s390/s390-64 ;;
577 sh3*)           base_machine=sh machine=sh/sh3 ;;
578 sh4*)           base_machine=sh machine=sh/sh4 ;;
579 sparc | sparcv[67])
580                 base_machine=sparc machine=sparc/sparc32 ;;
581 sparcv8 | supersparc | hypersparc)
582                 base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
583 sparcv8plus | sparcv8plusa | sparcv9)
584                 base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
585 sparcv8plusb | sparcv9b)
586                 base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
587 sparcv9v)
588                 base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;;
589 sparcv9v2)
590                 base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v2 ;;
591 sparc64)
592                 base_machine=sparc machine=sparc/sparc64 ;;
593 sparc64b)
594                 base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
595 sparc64v)
596                 base_machine=sparc machine=sparc/sparc64/sparcv9v ;;
597 sparc64v2)
598                 base_machine=sparc machine=sparc/sparc64/sparcv9v2 ;;
599 *)              base_machine=$machine ;;
600 esac
601 changequote([,])dnl
602 AC_SUBST(base_machine)
604 if test "$base_machine" = "i386"; then
605   AC_DEFINE(USE_REGPARMS)
608 # Compute the list of sysdep directories for this configuration.
609 # This can take a while to compute.
610 sysdep_dir=$srcdir/sysdeps
611 AC_MSG_CHECKING(sysdep dirs)
612 dnl We need to use [ and ] for other purposes for a while now.
613 changequote(,)dnl
614 # Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
615 os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
617 test "x$base_os" != x || case "$os" in
618 gnu*)
619   base_os=mach/hurd ;;
620 netbsd* | 386bsd* | freebsd* | bsdi*)
621   base_os=unix/bsd/bsd4.4 ;;
622 osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
623   base_os=unix/bsd ;;
624 sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
625   base_os=unix/sysv ;;
626 irix6*)
627   base_os=unix/sysv/irix6/$os ;;
628 solaris[2-9]*)
629   base_os=unix/sysv/sysv4 ;;
630 hpux*)
631   base_os=unix/sysv/hpux/$os ;;
632 aix4.3*)
633   base_os=unix/sysv/aix/aix4.3 ;;
634 none)
635   base_os=standalone ;;
636 esac
638 # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
639 tail=$os
640 ostry=$os
641 while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do
642   ostry="$ostry /$o"
643   tail=$o
644 done
645 o=`echo $tail | sed 's/[0-9]*$//'`
646 if test $o != $tail; then
647   ostry="$ostry /$o"
649 # For linux-gnu, try linux-gnu, then linux.
650 o=`echo $tail | sed 's/-.*$//'`
651 if test $o != $tail; then
652   ostry="$ostry /$o"
655 # For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
656 base=
657 tail=$base_os
658 while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
659   set $b
660   base="$base /$1"
661   tail="$2"
662 done
664 # For sparc/sparc32, try sparc/sparc32 and then sparc.
665 mach=
666 tail=$machine${submachine:+/$submachine}
667 while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
668   set $m
669   # Prepend the machine's FPU directory unless --without-fp.
670   if test "$with_fp" = yes; then
671     mach="$mach /$1/fpu"
672   else
673     mach="$mach /$1/nofpu"
674   fi
675   mach="$mach /$1"
676   tail="$2"
677 done
679 dnl We are done with glob and regexp uses of [ and ]; return to autoconf.
680 changequote([,])dnl
682 # Find what sysdep directories exist.
683 sysnames_add_ons=
684 sysnames=
685 for b in $base ''; do
686   for m0 in $mach ''; do
687     for v in /$vendor ''; do
688       test "$v" = / && continue
689       for o in /$ostry ''; do
690         test "$o" = / && continue
691         for m in $multi_arch_d $mach ''; do
692           for d in $add_ons_pfx ''; do
693             for a in $add_ons_sfx ''; do
694               if test -n "$m0$m0sub$b$v$o$m$msub"; then
695                 try_srcdir="${srcdir}/"
696                 case "$d" in
697                 /*) try_srcdir= ;;
698                 esac
699                 try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
700                 test -n "$enable_debug_configure" &&
701                 echo "$0 [DEBUG]: try $try" >&2
702                 if test -d "$try_srcdir$try"; then
703                   sysnames="$sysnames $try"
704                   { test -n "$o" || test -n "$b"; } && os_used=t
705                   { test -n "$m" || test -n "$m0"; } && machine_used=t
706                   case x${m0:-$m} in
707                   x*/$submachine) submachine_used=t ;;
708                   esac
709                   if test -n "$d"; then
710                     case "$sysnames_add_ons" in
711                     *" $d "*) ;;
712                     *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
713                     esac
714                   fi
715                 fi
716               fi
717             done
718           done
719         done
720       done
721     done
722   done
723 done
725 if test -z "$os_used" && test "$os" != none; then
726   AC_MSG_ERROR(Operating system $os is not supported.)
728 if test -z "$machine_used" && test "$machine" != none; then
729   AC_MSG_ERROR(The $machine is not supported.)
731 if test -z "$submachine_used" && test -n "$submachine"; then
732   AC_MSG_ERROR(The $submachine subspecies of $host_cpu is not supported.)
734 AC_SUBST(submachine)
736 # We have now validated the configuration.
739 # If using ELF, look for an `elf' subdirectory of each machine directory.
740 # We prepend these rather than inserting them whereever the machine appears
741 # because things specified by the machine's ELF ABI should override
742 # OS-specific things, and should always be the same for any OS on the
743 # machine (otherwise what's the point of an ABI?).
744 if test "$elf" = yes; then
745   elf_dirs=
746   for d in $add_ons_pfx ''; do
747     for m in $mach; do
748       if test -d $srcdir/${d}sysdeps$m/elf; then
749         elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
750       fi
751     done
752   done
753   sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
757 # Expand the list of system names into a full list of directories
758 # from each element's parent name and Implies file (if present).
759 set $sysnames
760 names=
761 while test $# -gt 0; do
762   name=$1
763   shift
765   case " $names " in *" $name "*)
766     # Already in the list.
767     continue
768   esac
770   # Report each name as we discover it, so there is no long pause in output.
771   echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
773   name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
775   case $name in
776     /*) xsrcdir= ;;
777     *)  xsrcdir=$srcdir/ ;;
778   esac
779   test -n "$enable_debug_configure" &&
780   echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2
782   if test -f $xsrcdir$name/Implies; then
783     # Collect more names from the `Implies' file (removing comments).
784     implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
785     implied=
786     for x in $implied_candidate; do
787       found=no
788       if test -d $xsrcdir$name_base/$x; then
789         implied="$implied $name_base/$x";
790         found=yes
791       fi
792       for d in $add_ons_pfx ''; do
793         try="${d}sysdeps/$x"
794         case $d in
795          /*) try_srcdir= ;;
796          *) try_srcdir=$srcdir/ ;;
797         esac
798         test -n "$enable_debug_configure" &&
799          echo "[DEBUG]: $name implied $x try($d) {$try_srcdir}$try" >&2
800         if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try;
801         then
802           implied="$implied $try"
803           found=yes
804           case "$sysnames_add_ons" in
805           *" $d "*) ;;
806           *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
807           esac
808         fi
809       done
810       if test $found = no; then
811         AC_MSG_WARN($name/Implies specifies nonexistent $x)
812       fi
813     done
814   else
815     implied=
816   fi
818   # Add NAME to the list of names.
819   names="$names $name"
821   # Find the parent of NAME, using the empty string if it has none.
822 changequote(,)dnl
823   parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
824 changequote([,])dnl
826   # Add the names implied by NAME, and NAME's parent (if it has one), to
827   # the list of names to be processed (the argument list).  We prepend the
828   # implied names to the list and append the parent.  We want implied
829   # directories to come before further directories inferred from the
830   # configuration components; this ensures that for sysv4, unix/common
831   # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
832   # after sysv4).
833   sysnames="`echo $implied $* $parent`"
834   test -n "$sysnames" && set $sysnames
835 done
837 # Add the default directories.
838 default_sysnames=sysdeps/generic
839 if test "$elf" = yes; then
840   default_sysnames="sysdeps/generic/elf $default_sysnames"
842 sysnames="$names $default_sysnames"
843 AC_SUBST(sysnames)
844 # The other names were emitted during the scan.
845 AC_MSG_RESULT($default_sysnames)
847 # Collect the list of add-ons that supply partial sysdeps trees.
848 sysdeps_add_ons=
849 for add_on in $add_ons; do
850   case "$add_on" in
851   /*) xsrcdir= ;;
852   *) xsrcdir="$srcdir/" ;;
853   esac
855   test -d "$xsrcdir$add_on/sysdeps" || {
856     case "$configured_add_ons " in
857     *" $add_on "*) ;;
858     *|'')
859       AC_MSG_ERROR(add-on $add_on has no configure fragment or sysdeps tree)
860       ;;
861     esac
862     continue
863   }
865   sysdeps_add_ons="$sysdeps_add_ons $add_on"
866   case "$sysnames_add_ons" in
867   *" $add_on/ "*) ;;
868   *|'')
869     AC_MSG_WARN(add-on $add_on contributed no sysdeps directories)
870     continue ;;
871   esac
873   found=no
874   for d in $sysnames; do
875     case "$d" in
876     $add_on/sysdeps/*) ;;
877     *) continue ;;
878     esac
879     (cd "$xsrcdir$d" && for f in *[[!~]]; do
880        case "$f" in
881        sys|bits)
882          for ff in $f/*.h; do
883            test -d "$ff" || { test -e "$ff" && exit 88; }
884          done
885          ;;
886        *)
887          test -d "$f" || { test -e "$f" && exit 88; }
888          ;;
889        esac
890      done)
891     if test $? -eq 88; then
892       found=yes
893       break
894     fi
895   done
896   if test $found = no; then
897     AC_MSG_WARN(add-on $add_on contributed no useful sysdeps directories)
898   fi
899 done
900 AC_SUBST(sysdeps_add_ons)
903 ### Locate tools.
905 AC_PROG_INSTALL
906 if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
907   # The makefiles need to use a different form to find it in $srcdir.
908   INSTALL='\$(..)./scripts/install-sh -c'
910 AC_PROG_LN_S
912 LIBC_PROG_BINUTILS
913 AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
915 # Accept binutils 2.13 or newer.
916 AC_CHECK_PROG_VER(AS, $AS, --version,
917                   [GNU assembler.* \([0-9]*\.[0-9.]*\)],
918                   [2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
919 AC_CHECK_PROG_VER(LD, $LD, --version,
920                   [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
921                   [2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")
923 # We need the physical current working directory.  We cannot use the
924 # "pwd -P" shell builtin since that's not portable.  Instead we try to
925 # find a pwd binary.  Note that assigning to the PWD environment
926 # variable might have some interesting side effects, so we don't do
927 # that.
928 AC_PATH_PROG(PWD_P, pwd, no)
929 if test "$PWD_P" = no; then
930   AC_MSG_ERROR(*** A pwd binary could not be found.)
933 # These programs are version sensitive.
934 AC_CHECK_TOOL_PREFIX
935 AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
936   [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
937   critic_missing="$critic_missing gcc")
938 AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
939   [GNU Make[^0-9]*\([0-9][0-9.]*\)],
940   [3.79* | 3.[89]*], critic_missing="$critic_missing make")
942 AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
943   [GNU gettext.* \([0-9]*\.[0-9.]*\)],
944   [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*],
945   MSGFMT=: aux_missing="$aux_missing msgfmt")
946 AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
947   [GNU texinfo.* \([0-9][0-9.]*\)],
948   [4.*],
949   MAKEINFO=: aux_missing="$aux_missing makeinfo")
950 AC_CHECK_PROG_VER(SED, sed, --version,
951   [GNU sed version \([0-9]*\.[0-9.]*\)],
952   [3.0[2-9]*|3.[1-9]*|[4-9]*],
953   SED=: aux_missing="$aux_missing sed")
955 AC_CHECK_PROGS(AUTOCONF, autoconf, no)
956 case "x$AUTOCONF" in
957 xno|x|x:) AUTOCONF=no ;;
959   AC_CACHE_CHECK(dnl
960 whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl
961   if (cd $srcdir; $AUTOCONF $ACFLAGS configure.in > /dev/null 2>&1); then
962     libc_cv_autoconf_works=yes
963   else
964     libc_cv_autoconf_works=no
965   fi])
966   test $libc_cv_autoconf_works = yes || AUTOCONF=no
967   ;;
968 esac
969 if test "x$with_cvs" = xyes && test "x$AUTOCONF" = xno; then
970   # If --without-cvs they probably won't change configure.in, so no complaints.
971   aux_missing="$aux_missing autoconf"
974 test -n "$critic_missing" && AC_MSG_ERROR([
975 *** These critical programs are missing or too old:$critic_missing
976 *** Check the INSTALL file for required versions.])
978 test -n "$aux_missing" && AC_MSG_WARN([
979 *** These auxiliary programs are missing or incompatible versions:$aux_missing
980 *** some features will be disabled.
981 *** Check the INSTALL file for required versions.])
983 # if using special system headers, find out the compiler's sekrit
984 # header directory and add that to the list.  NOTE: Only does the right
985 # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
986 if test -n "$sysheaders"; then
987   SYSINCLUDES=-nostdinc
988   for d in include include-fixed; do
989     i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" &&
990     SYSINCLUDES="$SYSINCLUDES -isystem $i"
991   done
992   SYSINCLUDES="$SYSINCLUDES \
993 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
994   if test -n "$CXX"; then
995     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
996     cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
997     cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
998     CXX_SYSINCLUDES="-isystem $cxxheaders \
999 -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
1000   fi
1002 AC_SUBST(SYSINCLUDES)
1003 AC_SUBST(CXX_SYSINCLUDES)
1005 # check if ranlib is necessary
1006 AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl
1007 cat > conftest.c <<EOF
1008 int a;
1009 char b;
1010 void c(void) {}
1012 $CC $CFLAGS $CPPFLAGS -c conftest.c
1013 $AR cr conftest.a conftest.o
1014 cp conftest.a conftest2.a
1015 $RANLIB conftest.a
1016 if cmp -s conftest.a conftest2.a; then
1017   libc_cv_ranlib_necessary=no
1018 else
1019   libc_cv_ranlib_necessary=yes
1021 rm -rf conftest*])
1022 if test "$libc_cv_ranlib_necessary" = no; then
1023  RANLIB=:
1026 # Test if LD_LIBRARY_PATH contains the notation for the current directory
1027 # since this would lead to problems installing/building glibc.
1028 # LD_LIBRARY_PATH contains the current directory if one of the following
1029 # is true:
1030 # - one of the terminals (":" and ";") is the first or last sign
1031 # - two terminals occur directly after each other
1032 # - the path contains an element with a dot in it
1033 AC_MSG_CHECKING(LD_LIBRARY_PATH variable)
1034 changequote(,)dnl
1035 case ${LD_LIBRARY_PATH} in
1036   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1037     ld_library_path_setting="contains current directory"
1038     ;;
1039   *)
1040     ld_library_path_setting="ok"
1041     ;;
1042 esac
1043 changequote([,])dnl
1044 AC_MSG_RESULT($ld_library_path_setting)
1045 if test "$ld_library_path_setting" != "ok"; then
1046 AC_MSG_ERROR([
1047 *** LD_LIBRARY_PATH shouldn't contain the current directory when
1048 *** building glibc. Please change the environment variable
1049 *** and run configure again.])
1052 AC_CACHE_CHECK(whether GCC supports -static-libgcc, libc_cv_gcc_static_libgcc, [dnl
1053 if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then
1054   libc_cv_gcc_static_libgcc=
1055 else
1056   libc_cv_gcc_static_libgcc=-static-libgcc
1057 fi])
1058 AC_SUBST(libc_cv_gcc_static_libgcc)
1060 AC_PATH_PROG(BASH_SHELL, bash, no)
1061 if test "$BASH_SHELL" != no &&
1062    $BASH_SHELL -c 'test "$BASH_VERSINFO" \
1063              && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
1064   libc_cv_have_bash2=yes
1065 else
1066   libc_cv_have_bash2=no
1068 AC_SUBST(libc_cv_have_bash2)
1070 dnl We need a ksh compatible shell for tzselect.
1071 if test "$BASH_SHELL" = no; then
1072   AC_PATH_PROG(KSH, ksh, no)
1073   if test "$KSH" = no; then
1074     libc_cv_have_ksh=no
1075   else
1076     libc_cv_have_ksh=yes
1077   fi
1078 else
1079   KSH="$BASH_SHELL"
1080   AC_SUBST(KSH)
1081   libc_cv_have_ksh=yes
1083 AC_SUBST(libc_cv_have_ksh)
1085 AC_PROG_AWK
1086 AC_PATH_PROG(PERL, perl, no)
1087 if test "$PERL" != no &&
1088    (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
1089   PERL=no
1091 AC_PATH_PROG(INSTALL_INFO, install-info, no,
1092              $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
1093 AC_PATH_PROG(BISON, bison, no, $PATH:/usr/local/bin:/usr/bin:/bin)
1095 AC_CACHE_CHECK(for signed size_t type, libc_cv_signed_size_t, [dnl
1096 echo '#include <stddef.h>
1097 FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
1098 if eval "$ac_cpp conftest.c 2>/dev/null" \
1099 | grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null; then
1100   libc_cv_signed_size_t=no
1101 else
1102   libc_cv_signed_size_t=yes
1104 rm -f conftest*])
1105 if test $libc_cv_signed_size_t = yes; then
1106   dnl Do this by hand instead of AC_DEFINE so can add #undef to avoid warnings.
1107   cat >> confdefs.h <<\EOF
1108 #undef __SIZE_TYPE__
1109 #define __SIZE_TYPE__ unsigned
1113 AC_CACHE_CHECK(for libc-friendly stddef.h, libc_cv_friendly_stddef, [dnl
1114 AC_TRY_COMPILE(dnl
1115 [#define __need_size_t
1116 #define __need_wchar_t
1117 #include <stddef.h>
1118 #define __need_NULL
1119 #include <stddef.h>], [size_t size; wchar_t wchar;
1120 #ifdef offsetof
1121 #error stddef.h ignored __need_*
1122 #endif
1123 if (&size == NULL || &wchar == NULL) abort ();],
1124                libc_cv_friendly_stddef=yes,
1125                libc_cv_friendly_stddef=no)])
1126 if test $libc_cv_friendly_stddef = yes; then
1127   config_vars="$config_vars
1128 override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
1131 AC_CACHE_CHECK(whether we need to use -P to assemble .S files,
1132                libc_cv_need_minus_P, [dnl
1133 cat > conftest.S <<EOF
1134 #include "confdefs.h"
1135 /* Nothing whatsoever.  */
1137 if AC_TRY_COMMAND(${CC-cc} $CPPFLAGS $ASFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD); then
1138   libc_cv_need_minus_P=no
1139 else
1140   libc_cv_need_minus_P=yes
1142 rm -f conftest*])
1143 if test $libc_cv_need_minus_P = yes; then
1144   config_vars="$config_vars
1145 asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
1148 AC_MSG_CHECKING(whether .text pseudo-op must be used)
1149 AC_CACHE_VAL(libc_cv_dot_text, [dnl
1150 cat > conftest.s <<EOF
1151 .text
1153 libc_cv_dot_text=
1154 if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1155   libc_cv_dot_text=.text
1157 rm -f conftest*])
1158 if test -z "$libc_cv_dot_text"; then
1159   AC_MSG_RESULT(no)
1160 else
1161   AC_MSG_RESULT(yes)
1164 AC_CACHE_CHECK(for assembler global-symbol directive,
1165                libc_cv_asm_global_directive, [dnl
1166 libc_cv_asm_global_directive=UNKNOWN
1167 for ac_globl in .globl .global .EXPORT; do
1168   cat > conftest.s <<EOF
1169         ${libc_cv_dot_text}
1170         ${ac_globl} foo
1171 foo:
1173   if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1174     libc_cv_asm_global_directive=${ac_globl}
1175   fi
1176   rm -f conftest*
1177   test $libc_cv_asm_global_directive != UNKNOWN && break
1178 done])
1179 if test $libc_cv_asm_global_directive = UNKNOWN; then
1180   AC_MSG_ERROR(cannot determine asm global directive)
1181 else
1182   AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
1185 AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl
1186 cat > conftest.s <<EOF
1187 ${libc_cv_dot_text}
1188 foo:
1189 .set glibc_conftest_frobozz,foo
1190 $libc_cv_asm_global_directive glibc_conftest_frobozz
1192 # The alpha-dec-osf1 assembler gives only a warning for `.set'
1193 # (but it doesn't work), so we must do a linking check to be sure.
1194 cat > conftest1.c <<\EOF
1195 extern int glibc_conftest_frobozz;
1196 void _start() { glibc_conftest_frobozz = 1; }
1198 if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
1199             -nostartfiles -nostdlib \
1200             -o conftest conftest.s conftest1.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
1201   libc_cv_asm_set_directive=yes
1202 else
1203   libc_cv_asm_set_directive=no
1205 rm -f conftest*])
1206 if test $libc_cv_asm_set_directive = yes; then
1207   AC_DEFINE(HAVE_ASM_SET_DIRECTIVE)
1210 AC_CACHE_CHECK(for assembler .type directive prefix,
1211                libc_cv_asm_type_prefix, [dnl
1212 libc_cv_asm_type_prefix=no
1213 for ac_try_prefix in '@' '%' '#'; do
1214   cat > conftest.s <<EOF
1215         ${libc_cv_dot_text}
1216         ${libc_cv_asm_global_directive} foo
1217         .type foo, ${ac_try_prefix}object
1218         .size foo, 1
1219 foo:
1220         .byte 1
1222   if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1223     libc_cv_asm_type_prefix=${ac_try_prefix}
1224   fi
1225   rm -f conftest*
1226   test "x$libc_cv_asm_type_prefix" != xno && break
1227 done])
1228 if test "x$libc_cv_asm_type_prefix" != xno; then
1229   AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
1232 AC_CACHE_CHECK(for assembler gnu_unique_object symbol type,
1233                libc_cv_asm_unique_object, [dnl
1234 cat > conftest.s <<EOF
1235 ${libc_cv_dot_text}
1236 _sym:
1237 .type _sym, ${libc_cv_asm_type_prefix}gnu_unique_object
1239 if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
1240   libc_cv_asm_unique_object=yes
1241 else
1242   libc_cv_asm_unique_object=no
1244 rm -f conftest*])
1245 if test $libc_cv_asm_unique_object = yes; then
1246   AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT)
1249 # For the multi-arch option we need support in the assembler.
1250 if test "$multi_arch" = yes; then
1251   if test "x$libc_cv_asm_type_prefix" != xno; then
1252 AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
1253                libc_cv_asm_gnu_indirect_function, [dnl
1254 cat > conftest.s <<EOF
1255 .type foo,%gnu_indirect_function
1257 if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
1258 then
1259   libc_cv_asm_gnu_indirect_function=yes
1260 else
1261   libc_cv_asm_gnu_indirect_function=no
1263 rm -f conftest*])
1264   else
1265     libc_cv_asm_gnu_indirect_function=no
1266   fi
1267   if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
1268     AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
1269   fi
1272 AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
1273 [cat > conftest.s <<EOF
1274 ${libc_cv_dot_text}
1275 _sym:
1276 .symver _sym,sym@VERS
1278 if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
1279   libc_cv_asm_symver_directive=yes
1280 else
1281   libc_cv_asm_symver_directive=no
1283 rm -f conftest*])
1284 AC_CACHE_CHECK(for ld --version-script, libc_cv_ld_version_script_option, [dnl
1285 if test $libc_cv_asm_symver_directive = yes; then
1286   cat > conftest.s <<EOF
1287 ${libc_cv_dot_text}
1288 _sym:
1289 .symver _sym,sym@VERS
1291   cat > conftest.map <<EOF
1292 VERS_1 {
1293         global: sym;
1296 VERS_2 {
1297         global: sym;
1298 } VERS_1;
1300   if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
1301     if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
1302                                 -o conftest.so conftest.o
1303                                 -nostartfiles -nostdlib
1304                                 -Wl,--version-script,conftest.map
1305                        1>&AS_MESSAGE_LOG_FD]);
1306     then
1307       libc_cv_ld_version_script_option=yes
1308     else
1309       libc_cv_ld_version_script_option=no
1310     fi
1311   else
1312     libc_cv_ld_version_script_option=no
1313   fi
1314 else
1315   libc_cv_ld_version_script_option=no
1317 rm -f conftest*])
1318 if test $shared != no &&
1319    test $libc_cv_asm_symver_directive = yes &&
1320    test $libc_cv_ld_version_script_option = yes &&
1321    test $enable_versioning = yes; then
1322   VERSIONING=yes
1323   AC_DEFINE(DO_VERSIONING)
1324 else
1325   VERSIONING=no
1327 AC_SUBST(VERSIONING)
1329 if test $elf = yes && test $shared != no && test $VERSIONING = no; then
1330   echo "\
1331 *** WARNING: You should not compile GNU libc without versioning. Not using
1332 *** versioning will introduce incompatibilities so that old binaries
1333 *** will not run anymore.
1334 *** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
1336 if test $elf = yes; then
1337   AC_CACHE_CHECK(for .previous assembler directive,
1338                  libc_cv_asm_previous_directive, [dnl
1339   cat > conftest.s <<EOF
1340 .section foo_section
1341 .previous
1343   if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
1344     libc_cv_asm_previous_directive=yes
1345   else
1346     libc_cv_asm_previous_directive=no
1347   fi
1348   rm -f conftest*])
1349   if test $libc_cv_asm_previous_directive = yes; then
1350     AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
1351   else
1352     AC_CACHE_CHECK(for .popsection assembler directive,
1353                    libc_cv_asm_popsection_directive, [dnl
1354     cat > conftest.s <<EOF
1355 .pushsection foo_section
1356 .popsection
1358     if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
1359       libc_cv_asm_popsection_directive=yes
1360     else
1361       libc_cv_asm_popsection_directive=no
1362     fi
1363     rm -f conftest*])
1364     if test $libc_cv_asm_popsection_directive = yes; then
1365       AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
1366     fi
1367   fi
1368   AC_CACHE_CHECK(for .protected and .hidden assembler directive,
1369                  libc_cv_asm_protected_directive, [dnl
1370   cat > conftest.s <<EOF
1371 .protected foo
1372 foo:
1373 .hidden bar
1374 bar:
1376   if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
1377     libc_cv_asm_protected_directive=yes
1378   else
1379     AC_MSG_ERROR(assembler support for symbol visibility is required)
1380   fi
1381   rm -f conftest*])
1383   if test $libc_cv_asm_protected_directive = yes; then
1384     AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
1385                  libc_cv_visibility_attribute,
1386                  [cat > conftest.c <<EOF
1387                   int foo __attribute__ ((visibility ("hidden"))) = 1;
1388                   int bar __attribute__ ((visibility ("protected"))) = 1;
1390                   libc_cv_visibility_attribute=no
1391                   if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
1392                     if grep '\.hidden.*foo' conftest.s >/dev/null; then
1393                       if grep '\.protected.*bar' conftest.s >/dev/null; then
1394                         libc_cv_visibility_attribute=yes
1395                       fi
1396                     fi
1397                   fi
1398                   rm -f conftest.[cs]
1399                  ])
1400     if test $libc_cv_visibility_attribute != yes; then
1401       AC_MSG_ERROR(compiler support for visibility attribute is required)
1402     fi
1403   fi
1405   if test $libc_cv_visibility_attribute = yes; then
1406     AC_CACHE_CHECK(for broken __attribute__((visibility())),
1407                  libc_cv_broken_visibility_attribute,
1408                  [cat > conftest.c <<EOF
1409                   int foo (int x);
1410                   int bar (int x) __asm__ ("foo") __attribute__ ((visibility ("hidden")));
1411                   int bar (int x) { return x; }
1413                   libc_cv_broken_visibility_attribute=yes
1414                   if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s1>&AS_MESSAGE_LOG_FD); then
1415 changequote(,)dnl
1416                     if grep '\.hidden[  _]foo' conftest.s >/dev/null; then
1417 changequote([,])dnl
1418                       libc_cv_broken_visibility_attribute=no
1419                     fi
1420                   fi
1421                   rm -f conftest.c conftest.s
1422                  ])
1423     if test $libc_cv_broken_visibility_attribute = yes; then
1424       AC_MSG_ERROR(working compiler support for visibility attribute is required)
1425     fi
1426   fi
1428   AC_CACHE_CHECK(for broken __attribute__((alias())),
1429                  libc_cv_broken_alias_attribute,
1430                  [cat > conftest.c <<EOF
1431                   extern int foo (int x) __asm ("xyzzy");
1432                   int bar (int x) { return x; }
1433                   extern __typeof (bar) foo __attribute ((weak, alias ("bar")));
1434                   extern int dfoo;
1435                   extern __typeof (dfoo) dfoo __asm ("abccb");
1436                   int dfoo = 1;
1438                   libc_cv_broken_alias_attribute=yes
1439                   if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
1440                     if grep 'xyzzy' conftest.s >/dev/null &&
1441                        grep 'abccb' conftest.s >/dev/null; then
1442                       libc_cv_broken_alias_attribute=no
1443                     fi
1444                   fi
1445                   rm -f conftest.c conftest.s
1446                  ])
1447   if test $libc_cv_broken_alias_attribute = yes; then
1448     AC_MSG_ERROR(working alias attribute support required)
1449   fi
1451   if test $libc_cv_visibility_attribute = yes; then
1452     AC_CACHE_CHECK(whether to put _rtld_local into .sdata section,
1453                  libc_cv_have_sdata_section,
1454                  [echo "int i;" > conftest.c
1455                   libc_cv_have_sdata_section=no
1456                   if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
1457                      | grep '\.sdata' >/dev/null; then
1458                     libc_cv_have_sdata_section=yes
1459                   fi
1460                   rm -f conftest.c conftest.so
1461                  ])
1462     if test $libc_cv_have_sdata_section = yes; then
1463       AC_DEFINE(HAVE_SDATA_SECTION)
1464     fi
1465   fi
1467   AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
1468                  libc_cv_initfini_array, [dnl
1469   cat > conftest.c <<EOF
1470 int _start (void) { return 0; }
1471 int __start (void) { return 0; }
1472 int foo (void) { return 1; }
1473 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
1475   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
1476                      -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
1477   then
1478     if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
1479       libc_cv_initfini_array=yes
1480     else
1481       libc_cv_initfini_array=no
1482     fi
1483   else
1484     libc_cv_initfini_array=no
1485   fi
1486   rm -f conftest*])
1487   if test $libc_cv_initfini_array != yes; then
1488     AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
1489   fi
1491   AC_CACHE_CHECK(for libunwind-support in compiler,
1492                  libc_cv_cc_with_libunwind, [
1493     cat > conftest.c <<EOF
1494 int main (void) { return 0; }
1496     if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
1497        conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
1498       libc_cv_cc_with_libunwind=yes
1499     else
1500       libc_cv_cc_with_libunwind=no
1501     fi
1502     rm -f conftest*])
1503   AC_SUBST(libc_cv_cc_with_libunwind)
1504   if test $libc_cv_cc_with_libunwind = yes; then
1505     AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
1506   fi
1508   AC_CACHE_CHECK(for -z nodelete option,
1509                  libc_cv_z_nodelete, [dnl
1510   cat > conftest.c <<EOF
1511 int _start (void) { return 42; }
1513   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1514                      -fPIC -shared -o conftest.so conftest.c
1515                      -nostartfiles -nostdlib
1516                      -Wl,--enable-new-dtags,-z,nodelete 1>&AS_MESSAGE_LOG_FD])
1517   then
1518     libc_cv_z_nodelete=yes
1519   else
1520     AC_MSG_ERROR(linker with -z nodelete support required)
1521   fi
1522   rm -f conftest*])
1524   AC_CACHE_CHECK(for -z nodlopen option,
1525                  libc_cv_z_nodlopen, [dnl
1526   cat > conftest.c <<EOF
1527 int _start (void) { return 42; }
1529   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1530                         -fPIC -shared -o conftest.so conftest.c
1531                         -nostartfiles -nostdlib
1532                         -Wl,--enable-new-dtags,-z,nodlopen 1>&AS_MESSAGE_LOG_FD])
1533   then
1534     libc_cv_z_nodlopen=yes
1535   else
1536     AC_MSG_ERROR(linker with -z nodlopen support required)
1537   fi
1538   rm -f conftest*])
1540   AC_CACHE_CHECK(for -z initfirst option,
1541                  libc_cv_z_initfirst, [dnl
1542   cat > conftest.c <<EOF
1543 int _start (void) { return 42; }
1545   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1546                         -fPIC -shared -o conftest.so conftest.c
1547                         -nostartfiles -nostdlib
1548                         -Wl,--enable-new-dtags,-z,initfirst 1>&AS_MESSAGE_LOG_FD])
1549   then
1550     libc_cv_z_initfirst=yes
1551   else
1552     AC_MSG_ERROR(linker with -z initfirst support required)
1553   fi
1554   rm -f conftest*])
1556   case "$base_machine" in
1557 changequote(,)dnl
1558     i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
1559 changequote([,])dnl
1560       AC_CACHE_CHECK(for -z relro option,
1561                      libc_cv_z_relro, [dnl
1562   libc_cv_z_relro=no
1563   if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
1564   then
1565     if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
1566     then
1567       libc_cv_z_relro=yes
1568     fi
1569   fi])
1570       if test "$libc_cv_z_relro" = no; then
1571         AC_MSG_ERROR(linker with -z relro support required)
1572       fi
1573       ;;
1574     *) ;;
1575    esac
1577   AC_CACHE_CHECK(for -Bgroup option,
1578                  libc_cv_Bgroup, [dnl
1579   cat > conftest.c <<EOF
1580 int _start (void) { return 42; }
1582   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1583                               -fPIC -shared -o conftest.so conftest.c
1584                               -Wl,-Bgroup -nostdlib 1>&AS_MESSAGE_LOG_FD])
1585   then
1586     libc_cv_Bgroup=yes
1587   else
1588     libc_cv_Bgroup=no
1589   fi
1590   rm -f conftest*])
1591   AC_SUBST(libc_cv_Bgroup)
1593   AC_CACHE_CHECK(for libgcc_s suffix,
1594                  libc_cv_libgcc_s_suffix, [dnl
1595   cat > conftest.c <<EOF
1596 int main (void) { return 0; }
1598 changequote(,)dnl
1599   libc_cv_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
1600                            -fPIC -shared -shared-libgcc -o conftest.so \
1601                            conftest.c -v 2>&1 >/dev/null \
1602                            | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
1603 changequote([,])dnl
1604   rm -f conftest*])
1605   AC_SUBST(libc_cv_libgcc_s_suffix)
1607   AC_CACHE_CHECK(for --as-needed option,
1608                  libc_cv_as_needed, [dnl
1609   cat > conftest.c <<EOF
1610 int main (void) { return 0; }
1612   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1613                               -fPIC -shared -o conftest.so conftest.c
1614                               -lgcc_s$libc_cv_libgcc_s_suffix -Wl,--as-needed
1615                               -nostdlib 1>&AS_MESSAGE_LOG_FD])
1616   then
1617     libc_cv_as_needed=yes
1618   else
1619     libc_cv_as_needed=no
1620   fi
1621   rm -f conftest*])
1622   AC_SUBST(libc_cv_as_needed)
1624   ASFLAGS_config=
1625   AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
1626                  libc_cv_as_noexecstack, [dnl
1627   cat > conftest.c <<EOF
1628 void foo (void) { }
1630   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
1631                      -S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
1632      && grep -q .note.GNU-stack conftest.s \
1633      && AC_TRY_COMMAND([${CC-cc} $ASFLAGS -Wa,--noexecstack
1634                        -c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
1635   then
1636     libc_cv_as_noexecstack=yes
1637   else
1638     libc_cv_as_noexecstack=no
1639   fi
1640   rm -f conftest*])
1641   if test $libc_cv_as_noexecstack = yes; then
1642     ASFLAGS_config="$ASFLAGS_config -Wa,--noexecstack"
1643   fi
1644   AC_SUBST(ASFLAGS_config)
1646   AC_CACHE_CHECK(for -z combreloc,
1647                  libc_cv_z_combreloc, [dnl
1648   cat > conftest.c <<EOF
1649 extern int bar (int);
1650 extern int mumble;
1651 int foo (void) { return bar (mumble); }
1653   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1654                         -fPIC -shared -o conftest.so conftest.c
1655                         -nostdlib -nostartfiles
1656                         -Wl,-z,combreloc 1>&AS_MESSAGE_LOG_FD])
1657   then
1658 dnl The following test is a bit weak.  We must use a tool which can test
1659 dnl cross-platform since the gcc used can be a cross compiler.  Without
1660 dnl introducing new options this is not easily doable.  Instead use a tool
1661 dnl which always is cross-platform: readelf.  To detect whether -z combreloc
1662 dnl look for a section named .rel.dyn.
1663     if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
1664       libc_cv_z_combreloc=yes
1665     else
1666       libc_cv_z_combreloc=no
1667     fi
1668   else
1669     libc_cv_z_combreloc=no
1670   fi
1671   rm -f conftest*])
1672   if test "$libc_cv_z_combreloc" = yes; then
1673     AC_DEFINE(HAVE_Z_COMBRELOC)
1674   fi
1675   AC_SUBST(libc_cv_z_combreloc)
1677   AC_CACHE_CHECK(for -z execstack,
1678                  libc_cv_z_execstack, [dnl
1679   cat > conftest.c <<EOF
1680 int _start (void) { return 42; }
1682   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1683                               -fPIC -shared -o conftest.so conftest.c
1684                               -Wl,-z,execstack -nostdlib
1685                               1>&AS_MESSAGE_LOG_FD])
1686   then
1687     libc_cv_z_execstack=yes
1688   else
1689     libc_cv_z_execstack=no
1690   fi
1691   rm -f conftest*])
1692   AC_SUBST(libc_cv_z_execstack)
1694   AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
1695   cat > conftest.c <<EOF
1696 int foo;
1697 main () { return 0;}
1699   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fpie
1700                               -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
1701   then
1702     libc_cv_fpie=yes
1703   else
1704     libc_cv_fpie=no
1705   fi
1706   rm -f conftest*])
1708   AC_SUBST(libc_cv_fpie)
1710   AC_CACHE_CHECK(for --hash-style option,
1711                  libc_cv_hashstyle, [dnl
1712   cat > conftest.c <<EOF
1713 int _start (void) { return 42; }
1715   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1716                               -fPIC -shared -o conftest.so conftest.c
1717                               -Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
1718   then
1719     libc_cv_hashstyle=yes
1720   else
1721     libc_cv_hashstyle=no
1722   fi
1723   rm -f conftest*])
1724   AC_SUBST(libc_cv_hashstyle)
1727 AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
1728 cat > conftest.c <<EOF
1729 int foo;
1731 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder -fno-section-anchors
1732                             conftest.c 1>&AS_MESSAGE_LOG_FD])
1733 then
1734   libc_cv_fno_toplevel_reorder=yes
1735 else
1736   libc_cv_fno_toplevel_reorder=no
1738 rm -f conftest*])
1739 if test $libc_cv_fno_toplevel_reorder = yes; then
1740   fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors"
1741 else
1742   fno_unit_at_a_time=-fno-unit-at-a-time
1744 AC_SUBST(fno_unit_at_a_time)
1746 AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
1747 cat > conftest.c <<EOF
1748 int foo;
1749 main () { return 0;}
1751 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
1752                             -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
1753 then
1754   libc_cv_ssp=yes
1755 else
1756   libc_cv_ssp=no
1758 rm -f conftest*])
1759 AC_SUBST(libc_cv_ssp)
1761 AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
1762 cat > conftest.c <<EOF
1763 int foo;
1764 #ifdef __GNUC_GNU_INLINE__
1765 main () { return 0;}
1766 #else
1767 #error
1768 #endif
1770 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -std=gnu99 -fgnu89-inline
1771                             -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD])
1772 then
1773   libc_cv_gnu89_inline=yes
1774 else
1775   libc_cv_gnu89_inline=no
1777 rm -f conftest*])
1778 if test $libc_cv_gnu89_inline = yes; then
1779   libc_cv_gnu89_inline=-fgnu89-inline
1780 else
1781   libc_cv_gnu89_inline=
1783 AC_SUBST(libc_cv_gnu89_inline)
1785 if test $elf != yes; then
1786   AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
1787                  [AC_TRY_COMPILE(, [asm (".section .init");
1788                                     asm (".section .fini");
1789                                     asm ("${libc_cv_dot_text}");],
1790                                  libc_cv_have_initfini=yes,
1791                                  libc_cv_have_initfini=no)])
1792   AC_SUBST(libc_cv_have_initfini)dnl
1793   if test $libc_cv_have_initfini = yes; then
1794     AC_DEFINE(HAVE_INITFINI)
1795   fi
1798 if test $elf = yes; then
1799   AC_CACHE_CHECK(whether cc puts quotes around section names,
1800                  libc_cv_have_section_quotes,
1801                  [cat > conftest.c <<EOF
1802                   static const int foo
1803                   __attribute__ ((section ("bar"))) = 1;
1805                   if ${CC-cc} -S conftest.c -o conftest.s; then
1806                     if grep '\.section.*"bar"' conftest.s >/dev/null; then
1807                       libc_cv_have_section_quotes=yes
1808                     else
1809                       libc_cv_have_section_quotes=no
1810                     fi
1811                   else
1812                     libc_cv_have_section_quotes=unknown
1813                   fi
1814                   rm -f conftest.[cs]
1815                  ])
1816   if test $libc_cv_have_section_quotes = yes; then
1817     AC_DEFINE(HAVE_SECTION_QUOTES)
1818   fi
1821 dnl AC_CHECK_ASM_UNDERSCORE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1822 AC_DEFUN(AC_CHECK_ASM_UNDERSCORE,
1823 [cat > conftest.$ac_ext <<EOF
1824 dnl This sometimes fails to find confdefs.h, for some reason.
1825 dnl [#]line $LINENO "[$]0"
1826 [#]line $LINENO "configure"
1827 #include "confdefs.h"
1828 void underscore_test(void) {
1829 return; }
1831 if AC_TRY_EVAL(ac_compile); then
1832   if grep _underscore_test conftest* >/dev/null; then
1833     ifelse([$1], , :, [rm -f conftest*
1834     $1])
1835   else
1836     ifelse([$2], , , [rm -f conftest*
1837     $2])
1838   fi
1839 else
1840   echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
1841   cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
1842   ifelse([$2], , , [rm -f conftest*
1843   $2])
1845 rm -f conftest*])
1847 if test $elf = yes; then
1848   libc_cv_asm_underscores=no
1849 else
1850   if test $ac_cv_prog_cc_works = yes; then
1851     AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
1852                    [AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
1853                                 libc_cv_asm_underscores=yes,
1854                                 libc_cv_asm_underscores=no)])
1855   else
1856     AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
1857                    [AC_CHECK_ASM_UNDERSCORE(libc_cv_asm_underscores=yes,
1858                                             libc_cv_asm_underscores=no)])
1859   fi
1861 if test $libc_cv_asm_underscores = no; then
1862   AC_DEFINE(NO_UNDERSCORES)
1865 if test $elf = yes; then
1866   libc_cv_weak_symbols=yes
1869 AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
1870                [dnl
1871 cat > conftest.s <<EOF
1872 ${libc_cv_dot_text}
1873 ${libc_cv_asm_global_directive} foo
1874 foo:
1875 .weak foo
1876 .weak bar; bar = foo
1878 if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1879   libc_cv_asm_weak_directive=yes
1880 else
1881   libc_cv_asm_weak_directive=no
1883 rm -f conftest*])
1885 if test $libc_cv_asm_weak_directive = no; then
1886   AC_CACHE_CHECK(for assembler .weakext directive,
1887                  libc_cv_asm_weakext_directive,
1888                  [dnl
1889 cat > conftest.s <<EOF
1890 ${libc_cv_dot_text}
1891 ${libc_cv_asm_global_directive} foo
1892 foo:
1893 .weakext bar foo
1894 .weakext baz
1895 ${libc_cv_asm_global_directive} baz
1896 baz:
1898   if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1899     libc_cv_asm_weakext_directive=yes
1900   else
1901     libc_cv_asm_weakext_directive=no
1902   fi
1903   rm -f conftest*])
1905 fi # no .weak
1907 if test $libc_cv_asm_weak_directive = yes; then
1908   AC_DEFINE(HAVE_ASM_WEAK_DIRECTIVE)
1909 elif test $libc_cv_asm_weakext_directive = yes; then
1910   AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
1913 AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl
1914 case $machine in
1915   sparc/sparc64*) cfi_offset=2047;;
1916   *) cfi_offset=0;;
1917 esac
1918 cat > conftest.s <<EOF
1919         .text
1920         .type   func,%function
1921 func:
1922         .cfi_startproc
1923         .cfi_remember_state
1924         .cfi_rel_offset 1, $cfi_offset
1925         .cfi_endproc
1927 if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1928   libc_cv_asm_cfi_directives=yes
1929 else
1930   libc_cv_asm_cfi_directives=no
1932 rm -f conftest*])
1933 if test $libc_cv_asm_cfi_directives = yes; then
1934   AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES)
1937 AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
1938 cat > conftest.c <<\EOF
1939 _start () {}
1940 int __eh_pc;
1941 __throw () {}
1943 dnl No \ in command here because it ends up inside ''.
1944 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1945                             -nostdlib -nostartfiles -Wl,--no-whole-archive
1946                             -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then
1947   libc_cv_ld_no_whole_archive=yes
1948 else
1949   libc_cv_ld_no_whole_archive=no
1951 rm -f conftest*])
1952 if test $libc_cv_ld_no_whole_archive = yes; then
1953   no_whole_archive=-Wl,--no-whole-archive
1955 AC_SUBST(no_whole_archive)dnl
1957 AC_CACHE_CHECK(for gcc -fexceptions, libc_cv_gcc_exceptions, [dnl
1958 cat > conftest.c <<\EOF
1959 _start () {}
1960 int __eh_pc;
1961 __throw () {}
1963 dnl No \ in command here because it ends up inside ''.
1964 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
1965                             -nostdlib -nostartfiles -fexceptions
1966                             -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then
1967   libc_cv_gcc_exceptions=yes
1968 else
1969   libc_cv_gcc_exceptions=no
1971 rm -f conftest*])
1972 if test $libc_cv_gcc_exceptions = yes; then
1973   exceptions=-fexceptions
1975 AC_SUBST(exceptions)dnl
1977 if test "$host_cpu" = powerpc ; then
1978 # Check for a bug present in at least versions 2.8.x of GCC
1979 # and versions 1.0.x of EGCS.
1980 AC_CACHE_CHECK(whether clobbering cr0 causes problems,libc_cv_c_asmcr0_bug,[dnl
1981 AC_TRY_COMPILE([int tester(int x) { asm ("" : : : "cc"); return x & 123; }],,
1982                libc_cv_c_asmcr0_bug='no',
1983                libc_cv_c_asmcr0_bug='yes')])
1984 if test "$libc_cv_c_asmcr0_bug" != 'no'; then
1985   AC_DEFINE(BROKEN_PPC_ASM_CR0)
1989 dnl Check whether compiler understands __builtin_expect.
1990 AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
1991 [cat > conftest.c <<EOF
1992 #line $LINENO "configure"
1993 int foo (int a)
1995   a = __builtin_expect (a, 10);
1996   return a == 10 ? 0 : 1;
1999 dnl No \ in command here because it ends up inside ''.
2000 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
2001                             -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
2002   libc_cv_gcc_builtin_expect=yes
2003 else
2004   libc_cv_gcc_builtin_expect=no
2006 rm -f conftest*])
2007 if test "$libc_cv_gcc_builtin_expect" = yes; then
2008   AC_DEFINE(HAVE_BUILTIN_EXPECT)
2011 AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl
2012 cat > conftest.c <<\EOF
2013 void zero (void *x)
2015   __builtin_memset (x, 0, 1000);
2019 if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null]);
2020 then
2021   libc_cv_gcc_builtin_memset=no
2022 else
2023   libc_cv_gcc_builtin_memset=yes
2025 rm -f conftest* ])
2026 if test "$libc_cv_gcc_builtin_memset" = yes ; then
2027   AC_DEFINE(HAVE_BUILTIN_MEMSET)
2030 AC_CACHE_CHECK(for redirection of built-in functions, libc_cv_gcc_builtin_redirection, [dnl
2031 cat > conftest.c <<\EOF
2032 extern char *strstr (const char *, const char *) __asm ("my_strstr");
2033 char *foo (const char *a, const char *b)
2035   return __builtin_strstr (a, b);
2039 if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null]);
2040 then
2041   libc_cv_gcc_builtin_redirection=yes
2042 else
2043   libc_cv_gcc_builtin_redirection=no
2045 rm -f conftest* ])
2046 if test "$libc_cv_gcc_builtin_redirection" = yes ; then
2047   AC_DEFINE(HAVE_BUILTIN_REDIRECTION)
2050 dnl Check whether the compiler supports the __thread keyword.
2051 if test "x$use__thread" != xno; then
2052   AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
2053   [cat > conftest.c <<\EOF
2054 __thread int a = 42;
2056   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
2057     libc_cv_gcc___thread=yes
2058   else
2059     libc_cv_gcc___thread=no
2060   fi
2061   rm -f conftest*])
2062   if test "$libc_cv_gcc___thread" = yes; then
2063     AC_DEFINE(HAVE___THREAD)
2064   fi
2065 else
2066   libc_cv_gcc___thread=no
2069 if test "$libc_cv_gcc___thread" = yes; then
2070   dnl Check whether the compiler supports the tls_model attribute.
2071   AC_CACHE_CHECK([for tls_model attribute], libc_cv_gcc_tls_model_attr, [dnl
2072   cat > conftest.c <<\EOF
2073 extern __thread int a __attribute__((tls_model ("initial-exec")));
2075   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then
2076     libc_cv_gcc_tls_model_attr=yes
2077   else
2078     libc_cv_gcc_tls_model_attr=no
2079   fi
2080   rm -f conftest*])
2081   if test "$libc_cv_gcc_tls_model_attr" = yes; then
2082     AC_DEFINE(HAVE_TLS_MODEL_ATTRIBUTE)
2083   fi
2086 if test -n "$submachine"; then
2087   AC_CACHE_CHECK([for compiler option for CPU variant],
2088                  libc_cv_cc_submachine, [dnl
2089   libc_cv_cc_submachine=no
2090   for opt in "-march=$submachine" "-mcpu=$submachine"; do
2091     if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
2092       libc_cv_cc_submachine="$opt"
2093       break
2094     fi
2095   done])
2096   if test "x$libc_cv_cc_submachine" = xno; then
2097     AC_MSG_ERROR([${CC-cc} does not support $submachine])
2098   fi
2100 AC_SUBST(libc_cv_cc_submachine)
2102 dnl Check whether we have the gd library available.
2103 AC_MSG_CHECKING(for libgd)
2104 if test "$with_gd" != "no"; then
2105   old_CFLAGS="$CFLAGS"
2106   CFLAGS="$CFLAGS $libgd_include"
2107   old_LDFLAGS="$LDFLAGS"
2108   LDFLAGS="$LDFLAGS $libgd_ldflags"
2109   old_LIBS="$LIBS"
2110   LIBS="$LIBS -lgd -lpng -lz -lm"
2111   AC_TRY_LINK([#include <gd.h>], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no)
2112   CFLAGS="$old_CFLAGS"
2113   LDFLAGS="$old_LDFLAGS"
2114   LIBS="$old_LIBS"
2115 else
2116   LIBGD=no
2118 AC_MSG_RESULT($LIBGD)
2119 AC_SUBST(LIBGD)
2121 # SELinux detection
2122 if test x$with_selinux = xno ; then
2123   have_selinux=no;
2124 else
2125   # See if we have the SELinux library
2126   AC_CHECK_LIB(selinux, is_selinux_enabled,
2127                have_selinux=yes, have_selinux=no)
2128   # See if we have the SELinux header with the NSCD permissions in it.
2129   if test x$have_selinux = xyes ; then
2130     AC_MSG_CHECKING([for NSCD Flask permissions in selinux/av_permissions.h])
2131     AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
2132                     [#ifdef NSCD__SHMEMHOST
2133                      return 0;
2134                      #else
2135                      #error NSCD__SHMEMHOST not defined
2136                      #endif],
2137                     have_selinux=yes, have_selinux=no)
2138     AC_MSG_RESULT($have_selinux)
2139   fi
2141   if test x$with_selinux = xyes ; then
2142     if test x$have_selinux = xno ; then
2143       AC_MSG_ERROR([SELinux explicitly required, but sufficiently recent SELinux library not found])
2144     fi
2145   fi
2147 # Check if we're building with SELinux support.
2148 if test "x$have_selinux" = xyes; then
2149   AC_DEFINE(HAVE_SELINUX, 1, [SELinux support])
2151   # See if we have the libaudit library
2152   AC_CHECK_LIB(audit, audit_log_user_avc_message,
2153                have_libaudit=yes, have_libaudit=no)
2154   if test "x$have_libaudit" = xyes; then
2155     AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support])
2156   fi
2157   AC_SUBST(have_libaudit)
2159   # See if we have the libcap library
2160   AC_CHECK_LIB(cap, cap_init, have_libcap=yes, have_libcap=no)
2161   if test "x$have_libcap" = xyes; then
2162     AC_DEFINE(HAVE_LIBCAP, 1, [SELinux libcap support])
2163   fi
2164   AC_SUBST(have_libcap)
2166 AC_SUBST(have_selinux)
2168 dnl check for the size of 'long double'.
2169 AC_CHECK_SIZEOF(long double, 0)
2170 sizeof_long_double=$ac_cv_sizeof_long_double
2171 AC_SUBST(sizeof_long_double)
2173 ### End of automated tests.
2174 ### Now run sysdeps configure fragments.
2176 # They also can set these variables.
2177 use_ldconfig=no
2178 ldd_rewrite_script=no
2179 libc_cv_sysconfdir=$sysconfdir
2180 libc_cv_gcc_unwind_find_fde=no
2181 libc_cv_idn=no
2183 # Iterate over all the sysdep directories we will use, running their
2184 # configure fragments, and looking for a uname implementation.
2185 uname=
2186 for dir in $sysnames; do
2187   case $dir in
2188     /*) dest=$dir ;;
2189     *)  dest=$srcdir/$dir ;;
2190   esac
2191   if test -r $dest/configure; then
2192     AC_MSG_RESULT(running configure fragment for $dir)
2193     . $dest/configure
2194   fi
2196   if test -z "$uname"; then
2197     if test -r $dest/uname.c ||
2198        test -r $dest/uname.S ||
2199        { test -r $dest/syscalls.list &&
2200          grep '^uname[  ]' $dest/syscalls.list >/dev/null; }; then
2201       uname=$dir
2202     fi
2203   fi
2204 ]dnl
2205 done
2207 if test x$libc_cv_gcc_unwind_find_fde = xyes; then
2208   AC_DEFINE(EXPORT_UNWIND_FIND_FDE)
2210 AC_SUBST(libc_cv_gcc_unwind_find_fde)
2212 # If we will use the generic uname implementation, we must figure out what
2213 # it will say by examining the system, and write the results in config-name.h.
2214 if test "$uname" = "sysdeps/generic"; then
2216 changequote(,)dnl
2217   uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
2218 changequote([,])dnl
2219   if test $uname_sysname != $config_os; then
2220     config_release=`echo $config_os | sed s/$uname_sysname//`
2221   fi
2223 AC_DEFUN(LIBC_KERNEL_ID, [dnl
2224     if test -r /vmunix; then
2225       kernel_id=`strings /vmunix | grep UNIX`
2226     elif test -r /dynix; then
2227       kernel_id=`strings /dynix | grep DYNIX`
2228     else
2229       kernel_id=
2230     fi
2231 ])dnl
2233   AC_CACHE_CHECK(OS release for uname, libc_cv_uname_release, [dnl
2234 LIBC_KERNEL_ID
2235 changequote(,)dnl
2236   kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
2237 changequote([,])dnl
2238   if test x`echo "$config_release" | sed "s/^$kernel_release//"` \
2239          != x$config_release; then
2240     # The configuration release is a substring of the kernel release.
2241     libc_cv_uname_release=$kernel_release
2242   elif test x$config_release != x; then
2243     libc_cv_uname_release=$config_release
2244   elif test x$kernel_release != x; then
2245     libc_cv_uname_release=$kernel_release
2246   else
2247     libc_cv_uname_release=unknown
2248   fi])
2249   uname_release="$libc_cv_uname_release"
2251   AC_CACHE_CHECK(OS version for uname, libc_cv_uname_version, [dnl
2252 LIBC_KERNEL_ID
2253 changequote(,)dnl
2254   kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
2255 changequote([,])dnl
2256   if test -n "$kernel_version"; then
2257     libc_cv_uname_version="$kernel_version"
2258   else
2259     libc_cv_uname_version=unknown
2260   fi])
2261   uname_version="$libc_cv_uname_version"
2263 AC_SUBST(uname_sysname) AC_SUBST(uname_release) AC_SUBST(uname_version)dnl
2264   config_uname=config-name.h:config-name.in
2265 else
2266   # For non-generic uname, we don't need to create config-name.h at all.
2267   config_uname=
2270 dnl This is tested by existing code and it's simpler to avoid changing it.
2271 AC_DEFINE(USE_IN_LIBIO)
2273 # Test for old glibc 2.0.x headers so that they can be removed properly
2274 # Search only in includedir.
2275 AC_MSG_CHECKING(for old glibc 2.0.x headers)
2276 if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
2277 then
2278   old_glibc_headers=yes
2279 else
2280   old_glibc_headers=no
2282 AC_MSG_RESULT($old_glibc_headers)
2283 if test ${old_glibc_headers} = yes; then
2284   AC_MSG_WARN(*** During \"make install\" old headers from glibc 2.0.x will)
2285   AC_MSG_WARN(*** be removed.)
2287 AC_SUBST(old_glibc_headers)
2289 AC_SUBST(libc_cv_slibdir)
2290 AC_SUBST(libc_cv_localedir)
2291 AC_SUBST(libc_cv_sysconfdir)
2292 AC_SUBST(libc_cv_rootsbindir)
2293 AC_SUBST(libc_cv_forced_unwind)
2295 dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
2296 AC_SUBST(libc_cv_cpp_asm_debuginfo)
2297 AC_SUBST(libc_cv_cc_sse4)
2298 AC_SUBST(libc_cv_cc_avx)
2300 AC_SUBST(use_ldconfig)
2301 AC_SUBST(ldd_rewrite_script)
2303 AC_SUBST(elf) AC_SUBST(xcoff)
2304 if test $elf = yes; then
2305   AC_DEFINE(HAVE_ELF)
2307 if test $xcoff = yes; then
2308   AC_DEFINE(HAVE_XCOFF)
2311 AC_SUBST(static)
2312 AC_SUBST(shared)
2313 if test $shared = default; then
2314   shared=$elf
2317 AC_CACHE_CHECK([whether -fPIC is default], libc_cv_pic_default,
2318 [libc_cv_pic_default=yes
2319 cat > conftest.c <<EOF
2320 #if defined __PIC__ || defined __pic__ || defined PIC || defined pic
2321 # error PIC is default.
2322 #endif
2324 if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
2325   libc_cv_pic_default=no
2327 rm -f conftest.*])
2328 AC_SUBST(libc_cv_pic_default)
2330 AC_SUBST(profile)
2331 AC_SUBST(omitfp)
2332 AC_SUBST(bounded)
2333 AC_SUBST(static_nss)
2334 AC_SUBST(nopic_initfini)
2336 AC_SUBST(DEFINES)
2338 dnl See sysdeps/mach/configure.in for this variable.
2339 AC_SUBST(mach_interface_list)
2341 if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
2342   config_makefile=
2343 else
2344   config_makefile=Makefile
2347 VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
2348 RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
2349 AC_SUBST(VERSION)
2350 AC_SUBST(RELEASE)
2352 AC_CONFIG_FILES([config.make ${config_makefile} ${config_uname}])
2353 AC_CONFIG_COMMANDS([default],[[
2354 case $CONFIG_FILES in *config.make*)
2355 echo "$config_vars" >> config.make;;
2356 esac
2357 test -d bits || mkdir bits]],[[config_vars='$config_vars']])
2358 AC_OUTPUT