Update.
[platform/upstream/glibc.git] / configure.in
index 7b07d4b..f2a0e1a 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_REVISION([$CVSid$])
-AC_PREREQ(2.11)dnl             dnl Minimum Autoconf version required.
+AC_PREREQ(2.13)dnl             dnl Minimum Autoconf version required.
 AC_INIT(include/features.h)
 AC_CONFIG_HEADER(config.h)
 AC_CONFIG_AUX_DIR(scripts)
@@ -32,6 +32,41 @@ yes)
 gettext-srcdir = $withval" ;;
 esac
 ])
+# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
+AC_ARG_WITH(gd, dnl
+  --with-gd=DIR           find libgd include dir and library with prefix DIR,
+           [dnl
+case "$with_gd" in
+yes|''|no) ;;
+*) libgd_include="-I$withval/include"
+   libgd_ldflags="-L$withval/lib" ;;
+esac
+])
+AC_ARG_WITH(gd-include, dnl
+  --with-gd-include=DIR   find libgd include files in DIR,
+            [dnl
+case "$with_gd_include" in
+''|no) ;;
+*) libgd_include="-I$withval" ;;
+esac
+])
+AC_ARG_WITH(gd-lib, dnl
+  --with-gd-lib=DIR       find libgd library files in DIR,
+            [dnl
+case "$with_gd_lib" in
+''|no) ;;
+*) libgd_ldflags="-L$withval" ;;
+esac
+])
+
+if test -n "$libgd_include"; then
+  config_vars="$config_vars
+CFLAGS-memprofstat.c = $libgd_include"
+fi
+if test -n "$libgd_ldflags"; then
+  config_vars="$config_vars
+libgd-LDFLAGS = $libgd_ldflags"
+fi
 
 dnl Arguments to specify presence of other packages/features.
 AC_ARG_WITH(fp, dnl
@@ -70,9 +105,12 @@ AC_ARG_ENABLE(sanity-checks, dnl
 
 dnl Arguments to enable or disable building the static, shared, profiled,
 dnl and -fomit-frame-pointer libraries.
-AC_ARG_ENABLE(static, dnl
-[  --enable-static         build static library [default=yes]],
-             static=$enableval, static=yes)
+dnl I've disabled this for now since we cannot build glibc without static
+dnl libraries built in the moment.
+dnl AC_ARG_ENABLE(static, dnl
+dnl [  --enable-static         build static library [default=yes]],
+dnl          static=$enableval, static=yes)
+static=yes
 AC_ARG_ENABLE(shared, dnl
 [  --enable-shared         build shared library [default=yes if GNU ld & ELF]],
              shared=$enableval, shared=default)
@@ -96,12 +134,8 @@ AC_ARG_ENABLE(add-ons, dnl
                          configure and build add-ons in DIR1,DIR2,...
                           search for add-ons if no parameter given],
   [case "$enableval" in
-    yes) if test "$srcdir" = "."; then
-          add_ons=`echo */configure | sed -e 's!/configure!!g'`
-        else
-          add_ons=`echo $srcdir/*/configure | \
-                   sed -e 's!/configure!!g' -e "s!$srcdir/!!g"`
-        fi;;
+    yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
+        test "$add_ons" = "*" && add_ons= ;;
     *) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
    esac],
   [add_ons=])
@@ -134,6 +168,22 @@ AC_ARG_ENABLE(force-install,
              force_install=$enableval, force_install=yes)
 AC_SUBST(force_install)
 
+dnl On some platforms we allow dropping compatibility with all kernel
+dnl versions.
+AC_ARG_ENABLE(kernel,
+[  --enable-kernel=VERSION compile for compatibility with kernel not older
+                           than VERSION],
+              minimum_kernel=$enableval)
+dnl Prevent unreasonable values.
+if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
+  # Better nothing than this.
+  minimum_kernel=""
+else
+  if test "$minimum_kernel" = current; then
+    minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel=
+  fi
+fi
+
 AC_CANONICAL_HOST
 
 # The way shlib-versions is used to generate soversions.mk uses a
@@ -149,30 +199,6 @@ gnu*)
   ;;
 esac
 
-###
-### I put this here to prevent those annoying emails from people who cannot
-### read and try to compile glibc on unsupported platforms.  --drepper
-###
-### By using the undocumented --enable-hacker-mode option for configure
-### one can skip this test to make the configuration not fail for unsupported
-### platforms.
-###
-if test -z "$enable_hacker_mode"; then
-  case "$machine-$host_os" in
-  *-linux* | *-gnu* | arm*-none*)
-    ;;
-  *)
-    echo "*** The GNU C library is currently not available for this platform."
-    echo "*** So far nobody cared to port it and if there is no volunteer it"
-    echo "*** might never happen.  So, if you have interest to see glibc on"
-    echo "*** this platform visit"
-    echo "***  http://www.gnu.org/software/libc/porting.html"
-    echo "*** and join the group of porters"
-    exit 1
-    ;;
-  esac
-fi
-
 # We keep the original values in `$config_*' and never modify them, so we
 # can write them unchanged into config.make.  Everything else uses
 # $machine, $vendor, and $os, and changes them whenever convenient.
@@ -198,6 +224,30 @@ machine=$config_machine
 vendor=$config_vendor
 os=$config_os
 
+###
+### I put this here to prevent those annoying emails from people who cannot
+### read and try to compile glibc on unsupported platforms.  --drepper
+###
+### By using the undocumented --enable-hacker-mode option for configure
+### one can skip this test to make the configuration not fail for unsupported
+### platforms.
+###
+if test -z "$enable_hacker_mode"; then
+  case "$machine-$host_os" in
+  *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+    ;;
+  *)
+    echo "*** The GNU C library is currently not available for this platform."
+    echo "*** So far nobody cared to port it and if there is no volunteer it"
+    echo "*** might never happen.  So, if you have interest to see glibc on"
+    echo "*** this platform visit"
+    echo "***  http://www.gnu.org/software/libc/porting.html"
+    echo "*** and join the group of porters"
+    exit 1
+    ;;
+  esac
+fi
+
 dnl We need to use [ and ] for other purposes for a while now.
 changequote(,)dnl
 # Expand the configuration machine name into a subdirectory by architecture
@@ -218,12 +268,14 @@ mips64*)  base_machine=mips64 machine=mips/mips64/$machine ;;
 mips*)         base_machine=mips
                case "`uname -m`" in
                IP22) machine=mips/mips3 ;;
-               *)    machine=mips/$machine ,,
+               *)    machine=mips/$machine ;;
                esac ;;
 sparc | sparcv[67])
                base_machine=sparc machine=sparc/sparc32 ;;
 sparcv8 | supersparc | hypersparc)
                base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
+sparcv8plus | sparcv8plusa | sparcv9)
+               base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
 sparc64 | ultrasparc)
                base_machine=sparc machine=sparc/sparc64 ;;
 esac
@@ -256,6 +308,10 @@ irix6*)
   base_os=unix/sysv/irix6/$os ;;
 solaris[2-9]*)
   base_os=unix/sysv/sysv4 ;;
+hpux*)
+  base_os=unix/sysv/hpux/$os ;;
+aix4.3*)
+  base_os=unix/sysv/aix/aix4.3 ;;
 none)
   base_os=standalone ;;
 *)
@@ -288,7 +344,7 @@ while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
   tail="$2"
 done
 
-# For sparc/sparc9, try sparc/sparc9 and then sparc.
+# For sparc/sparc32, try sparc/sparc32 and then sparc.
 mach=
 tail=$machine
 while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
@@ -319,11 +375,7 @@ for d in $add_ons_pfx ''; do
              try="${d}sysdeps$m0$b$v$o$m"
              test -n "$enable_debug_configure" &&
              echo "$0 [DEBUG]: try $try" >&2
-             case $try in
-               /*) dest=$try ;;
-               *)  dest=$srcdir/$try ;;
-             esac
-             if test -d $dest; then
+             if test -d $srcdir/$try; then
                sysnames="$sysnames $try"
                { test -n "$o" || test -n "$b"; } && os_used=t
                { test -n "$m" || test -n "$m0"; } && machine_used=t
@@ -355,12 +407,8 @@ fi
 if test "$elf" = yes; then
   elf_dirs=
   for d in $add_ons_pfx ''; do
-    case $d in
-      /*) xsrcdir= ;;
-      *)  xsrcdir=$srcdir/ ;;
-    esac
     for m in $mach; do
-      if test -d $xsrcdir${d}sysdeps$m/elf; then
+      if test -d $srcdir/${d}sysdeps$m/elf; then
        elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
       fi
     done
@@ -429,37 +477,44 @@ changequote([,])dnl
 done
 
 # Add the default directories.
-sysnames="$names sysdeps/generic"
+default_sysnames=sysdeps/generic
+if test "$elf" = yes; then
+  default_sysnames="sysdeps/generic/elf $default_sysnames"
+fi
+sysnames="$names $default_sysnames"
 AC_SUBST(sysnames)
 # The other names were emitted during the scan.
-AC_MSG_RESULT(sysdeps/generic)
+AC_MSG_RESULT($default_sysnames)
 
 
 ### Locate tools.
 
 AC_PROG_INSTALL
-if test "$INSTALL" = "${srcdir}/install-sh -c"; then
+if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
   # The makefiles need to use a different form to find it in $srcdir.
-  INSTALL='\$(..)./install-sh -c'
+  INSTALL='\$(..)./scripts/install-sh -c'
 fi
 AC_PROG_LN_S
 
 # These programs are version sensitive.
 AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
-  [version \([egcst0-9.-]*\)],
-  [egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9.[0-9]*],
+  [version \([egcygnustp-]*[0-9.]*\)],
+  [egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*gcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]],
   critic_missing=t)
-AC_CHECK_PROG_VER(MAKE, make gmake, --version,
-  [version \([0-9][0-9.]*\), by],
+AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
+  [GNU Make[^0-9]*\([0-9][0-9.]*\)],
   [3.75 | 3.76.[1-9]* | 3.7[789]* | 3.[89]*], critic_missing=t)
 
-AC_CHECK_PROG_VER(MSGFMT, msgfmt gmsgfmt, --version,
-  [GNU gettext.*\([0-9][0-9]*\.[0-9]*\)],
-  [0.[1-9][0-9] | [1-9].*], MSGFMT=: aux_missing=t)
+AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
+  [GNU gettext.* \([0-9]*\.[0-9.]*\)],
+  [0.[1-9][0-9].* | [1-9].*], MSGFMT=: aux_missing=t)
 AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
-  [GNU texinfo \([0-9][0-9.]*\)],
-  [3.1[1-9] | 3.[2-9][0-9]], MAKEINFO=: aux_missing=t)
+  [GNU texinfo.* \([0-9][0-9.]*\)],
+  [3.1[1-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]], MAKEINFO=: aux_missing=t)
+AC_CHECK_PROG_VER(SED, gsed sed, --version,
+  [GNU sed version \([0-9]*\.[0-9.]*\)],
+  [3.02], SED=: aux_missing=t)
 
 if test -n "$critic_missing"; then
 AC_MSG_ERROR([
@@ -472,6 +527,10 @@ test -n "$aux_missing" && AC_MSG_WARN([
 *** some features will be disabled.
 *** Check the INSTALL file for required versions.])
 
+# glibcbug.in wants to know the compiler version.
+CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'`
+AC_SUBST(CCVERSION)
+
 AC_PROG_CC_LOCAL
 AC_CANONICAL_BUILD
 if test $host != $build; then
@@ -480,8 +539,6 @@ fi
 AC_SUBST(cross_compiling)
 AC_PROG_CPP
 LIBC_PROG_BINUTILS
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_CHECK_TOOL(MIG, mig)
 
 # if using special system headers, find out the compiler's sekrit
@@ -566,8 +623,37 @@ fi
 AC_SUBST(libc_cv_have_ksh)
 
 AC_PROG_AWK
-AC_PATH_PROGS(PERL, perl, no)
+AC_PATH_PROG(PERL, perl, no)
 AC_SUBST(PERL)
+AC_PATH_PROG(INSTALL_INFO, install-info, no,
+            $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
+AC_SUBST(INSTALL_INFO)
+if test "$INSTALL_INFO" != "no"; then
+AC_CACHE_CHECK(for old Debian install-info, libc_cv_old_debian_install_info,
+ [mkdir conftest.d
+  # There is a hard ^_ on the next line.  I am open to better ideas.
+  (echo '\1f'
+  echo 'File: dir      Node: Top       This is the top of the INFO tree'
+  echo '* Menu:') >conftest.d/dir
+  (echo 'INFO-DIR-SECTION i-d-s works'
+  echo 'START-INFO-DIR-ENTRY'
+  echo '* Prog: (prog).   Program.'
+  echo 'END-INFO-DIR-ENTRY') >conftest.d/prog.info
+  if $INSTALL_INFO --info-dir=conftest.d conftest.d/prog.info >&AC_FD_CC 2>&1
+  then
+    if grep -s 'i-d-s works' conftest.d/dir >/dev/null
+    then libc_cv_old_debian_install_info=no
+    else libc_cv_old_debian_install_info=yes
+    fi
+  else libc_cv_old_debian_install_info=no testfailed=t
+  fi
+  rm -fr conftest.d])
+if test -n "$testfailed"
+then AC_MSG_WARN([install-info errored out, check config.log])
+fi
+OLD_DEBIAN_INSTALL_INFO=$libc_cv_old_debian_install_info
+fi
+AC_SUBST(OLD_DEBIAN_INSTALL_INFO)
 
 AC_CACHE_CHECK(for signed size_t type, libc_cv_signed_size_t, [dnl
 echo '#include <stddef.h>
@@ -622,13 +708,29 @@ if test $libc_cv_need_minus_P = yes; then
 asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
 fi
 
+AC_MSG_CHECKING(whether .text pseudo-op must be used)
+AC_CACHE_VAL(libc_cv_dot_text, [dnl
+cat > conftest.s <<EOF
+.text
+EOF
+libc_cv_dot_text=
+if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
+  libc_cv_dot_text=.text
+fi
+rm -f conftest*])
+if test -z "$libc_cv_dot_text"; then
+  AC_MSG_RESULT(no)
+else
+  AC_MSG_RESULT(yes)
+fi
+
 AC_CACHE_CHECK(for assembler global-symbol directive,
               libc_cv_asm_global_directive, [dnl
 libc_cv_asm_global_directive=UNKNOWN
-for ac_globl in .globl .global; do
+for ac_globl in .globl .global .EXPORT; do
   cat > conftest.s <<EOF
-.text
-${ac_globl} foo
+       ${libc_cv_dot_text}
+       ${ac_globl} foo
 foo:
 EOF
   if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
@@ -645,7 +747,7 @@ fi
 
 AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl
 cat > conftest.s <<EOF
-.text
+${libc_cv_dot_text}
 foo:
 .set glibc_conftest_frobozz,foo
 $libc_cv_asm_global_directive glibc_conftest_frobozz
@@ -669,7 +771,7 @@ fi
 
 AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
 [cat > conftest.s <<EOF
-.text
+${libc_cv_dot_text}
 _sym:
 .symver _sym,sym@VERS
 EOF
@@ -682,7 +784,7 @@ rm -f conftest*])
 AC_CACHE_CHECK(for ld --version-script, libc_cv_ld_version_script_option, [dnl
 if test $libc_cv_asm_symver_directive = yes; then
   cat > conftest.s <<EOF
-.text
+${libc_cv_dot_text}
 _sym:
 .symver _sym,sym@VERS
 EOF
@@ -727,7 +829,7 @@ if test $VERSIONING = no; then
 *** WARNING: You should not compile GNU libc without versioning. Not using
 *** versioning will introduce incompatibilities so that old binaries
 *** will not run anymore.
-*** For versioning you need recent binutils (binutils-2.8.1.0.17 or newer)."
+*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
 fi
 if test $elf = yes; then
   AC_CACHE_CHECK(for .previous assembler directive,
@@ -767,7 +869,7 @@ if test $elf != yes; then
   AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
                 [AC_TRY_COMPILE(, [asm (".section .init");
                                    asm (".section .fini");
-                                   asm (".text");],
+                                   asm ("${libc_cv_dot_text}");],
                                 libc_cv_have_initfini=yes,
                                 libc_cv_have_initfini=no)])
   AC_SUBST(libc_cv_have_initfini)dnl
@@ -825,9 +927,9 @@ if test $elf = yes; then
 fi
 
 AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
-                [dnl
+              [dnl
 cat > conftest.s <<EOF
-.text
+${libc_cv_dot_text}
 ${libc_cv_asm_global_directive} foo
 foo:
 .weak foo
@@ -845,7 +947,7 @@ if test $libc_cv_asm_weak_directive = no; then
                 libc_cv_asm_weakext_directive,
                 [dnl
 cat > conftest.s <<EOF
-.text
+${libc_cv_dot_text}
 ${libc_cv_asm_global_directive} foo
 foo:
 .weakext bar foo
@@ -888,7 +990,7 @@ if test $libc_cv_ld_no_whole_archive = yes; then
 fi
 AC_SUBST(no_whole_archive)dnl
 
-AC_CACHE_CHECK(for gcc -fno-exceptions, libc_cv_gcc_no_exceptions, [dnl
+AC_CACHE_CHECK(for gcc -fexceptions, libc_cv_gcc_exceptions, [dnl
 cat > conftest.c <<\EOF
 _start () {}
 int __eh_pc;
@@ -896,17 +998,17 @@ __throw () {}
 EOF
 dnl No \ in command here because it ends up inside ''.
 if AC_TRY_COMMAND([${CC-cc} $CFLAGS
-                           -nostdlib -nostartfiles -fno-exceptions
+                           -nostdlib -nostartfiles -fexceptions
                            -o conftest conftest.c 1>&AC_FD_CC]); then
-  libc_cv_gcc_no_exceptions=yes
+  libc_cv_gcc_exceptions=yes
 else
-  libc_cv_gcc_no_exceptions=no
+  libc_cv_gcc_exceptions=no
 fi
 rm -f conftest*])
-if test $libc_cv_ld_no_whole_archive = yes; then
-  no_exceptions=-fno-exceptions
+if test $libc_cv_gcc_exceptions = yes; then
+  exceptions=-fexceptions
 fi
-AC_SUBST(no_exceptions)dnl
+AC_SUBST(exceptions)dnl
 
 if test "$base_machine" = alpha ; then
 AC_CACHE_CHECK(for function ..ng prefix, libc_cv_gcc_alpha_ng_prefix, [dnl
@@ -995,6 +1097,72 @@ static)
   ;;
 esac
 
+dnl Check whether compiler understands __builtin_expect.
+AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
+[cat > conftest.c <<EOF
+#line __oline__ "configure"
+int foo (int a)
+{
+  a = __builtin_expect (a, 10);
+  return a == 10 ? 0 : 1;
+}
+EOF
+dnl No \ in command here because it ends up inside ''.
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles
+                           -o conftest conftest.c -lgcc >&AC_FD_CC]); then
+  libc_cv_gcc_builtin_expect=yes
+else
+  libc_cv_gcc_builtin_expect=no
+fi
+rm -f conftest*])
+if test "$libc_cv_gcc_builtin_expect" = yes; then
+  AC_DEFINE(HAVE_BUILTIN_EXPECT)
+fi
+
+dnl Check whether the compiler supports subtraction of local labels.
+AC_CACHE_CHECK(for local label subtraction, libc_cv_gcc_subtract_local_labels,
+[cat > conftest.c <<EOF
+changequote(,)dnl
+#line __oline__ "configure"
+int foo (int a)
+{
+  static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
+  void *p = &&l1 + ar[a];
+  goto *p;
+ l1:
+  return 1;
+ l2:
+  return 2;
+}
+changequote([,])dnl
+EOF
+dnl No \ in command here because it ends up inside ''.
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles
+                           -o conftest conftest.c -lgcc >&AC_FD_CC]); then
+  libc_cv_gcc_subtract_local_labels=yes
+else
+  libc_cv_gcc_subtract_local_labels=no
+fi
+rm -f conftest*])
+if test "$libc_cv_gcc_subtract_local_labels" = yes; then
+  AC_DEFINE(HAVE_SUBTRACT_LOCAL_LABELS)
+fi
+
+dnl Check whether we have the gd library available.
+AC_MSG_CHECKING(for libgd)
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $libgd_include"
+old_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $libgd_ldflags"
+old_LIBS="$LIBS"
+LIBS="$LIBS -lgd -lpng -lz"
+AC_TRY_LINK([#include <gd.h>], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no)
+CFLAGS="$old_CFLAGS"
+LDFLAGS="$old_LDFLAGS"
+LIBS="$old_LIBS"
+AC_MSG_RESULT($LIBGD)
+AC_SUBST(LIBGD)
+
 ### End of automated tests.
 ### Now run sysdeps configure fragments.
 
@@ -1003,6 +1171,7 @@ libc_link_dests=
 libc_link_sources=
 
 # They also can set these variables.
+use_ldconfig=no
 ldd_rewrite_script=no
 
 # Iterate over all the sysdep directories we will use, running their
@@ -1097,22 +1266,28 @@ default) stdio=stdio ;;
 esac
 AC_MSG_RESULT($stdio)
 
-AC_MSG_CHECKING(ldap selection)
-AC_SUBST(LDAP)
-case $add_ons in
-*ldap*)
-   ldap=yes
-   LDAP=ldap ;;
-*) ldap=no
-   LDAP= ;;
-esac
-AC_MSG_RESULT($ldap)
+# Test for old glibc 2.0.x headers so that they can be removed properly
+# Search only in includedir.
+AC_MSG_CHECKING(for old glibc 2.0.x headers)
+if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
+then
+  old_glibc_headers=yes
+else
+  old_glibc_headers=no
+fi
+AC_MSG_RESULT($old_glibc_headers)
+if test ${old_glibc_headers} = yes; then
+  AC_MSG_WARN(*** During \"make install\" old headers from glibc 2.0.x will)
+  AC_MSG_WARN(*** be removed.)
+fi
+AC_SUBST(old_glibc_headers)
 
 AC_SUBST(libc_cv_slibdir)
+AC_SUBST(libc_cv_localedir)
 AC_SUBST(libc_cv_sysconfdir)
 AC_SUBST(libc_cv_rootsbindir)
 
-AC_SUBST(has_ldconfig)
+AC_SUBST(use_ldconfig)
 AC_SUBST(ldd_rewrite_script)
 
 AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
@@ -1159,6 +1334,12 @@ AC_SUBST(nopic_initfini)
 
 AC_SUBST(DEFINES)
 
+case "$add_ons" in
+  *door*) linux_doors=yes ;;
+  *) linux_doors=no ;;
+esac
+AC_SUBST(linux_doors)
+
 if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
   config_makefile=
 else
@@ -1170,6 +1351,10 @@ RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
 AC_SUBST(VERSION)
 AC_SUBST(RELEASE)
 
+echo '*** Do NOT install this release on any production system!'
+echo '*** It is known to be broken and will be so for quite some time.'
+echo '*** Use the latest released version instead.'
+
 AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, [
 case $CONFIG_FILES in *config.make*)
 echo "$config_vars" >> config.make;;