autoconf: 1999-10-02 Akim Demaille <akim@epita.fr> (611ec)

From 611ec2ae1345a7f7c5a65e07986ee39c2e4540bb Mon Sep 17 00:00:00 2001
From: Akim Demaille <[EMAIL REDACTED]>
Date: Mon, 4 Oct 1999 08:22:07 +0000
Subject: [PATCH] 1999-10-02  Akim Demaille  <akim@epita.fr>

	AC_DIR_HEADERS is hasbeen'ed.

	* acspecific.m4 (AC_DIR_HEADER): Raised from obsolete to hasbeen.

	* acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT):
 	Removed, were used only by AC_DIR_HEADER and were not documented.

	* autoheader.m4: Remove the hooks for AC_CHECK_HEADERS_DIRENT.

	* autoconf.texi (Particular Headers): Removed the documentation of
	AC_DIR_HEADER.

	* autoconf.texi (Environment Variables): Remove the very last
	traces of documentation of --env-VAR.
---
 ChangeLog                | 17 ++++++++++
 INSTALL                  | 22 +++++++------
 acspecific.m4            | 69 +++-------------------------------------
 autoconf.texi            | 62 +++++++++++-------------------------
 autoheader.m4            |  5 ---
 configure                | 68 +++++++++++++++++++++++++++++++++++----
 doc/autoconf.texi        | 62 +++++++++++-------------------------
 doc/install.texi         | 36 ++++++++++++---------
 install.texi             | 36 ++++++++++++---------
 lib/autoconf/specific.m4 | 69 +++-------------------------------------
 10 files changed, 179 insertions(+), 267 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 30d498ab..10b31da2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+1999-10-02  Akim Demaille  <akim@epita.fr>
+
+	AC_DIR_HEADERS is hasbeen'ed.
+
+	* acspecific.m4 (AC_DIR_HEADER): Raised from obsolete to hasbeen.
+
+	* acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT):
+ 	Removed, were used only by AC_DIR_HEADER and were not documented.
+
+	* autoheader.m4: Remove the hooks for AC_CHECK_HEADERS_DIRENT.
+
+	* autoconf.texi (Particular Headers): Removed the documentation of
+	AC_DIR_HEADER.
+
+	* autoconf.texi (Environment Variables): Remove the very last
+	traces of documentation of --env-VAR.
+
 1999-10-02  Akim Demaille  <akim@epita.fr>
 
 	Remove hasbeen'ed macros from the documentation.
diff --git a/INSTALL b/INSTALL
index d11dae29..942c83bb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -62,11 +62,7 @@ for details on some of the pertinent environment variables.
 them in the environment.  You can do that on the command line like this:
      ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 
-   Please, note that the former interface:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-   or
-     env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-   is deprecated and should be avoided.
+   *Note Environment Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
@@ -160,11 +156,17 @@ Environment Variables
    Variables not defined in a site shell script can be set in the
 environment passed to configure.  However, some packages may run
 configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you can set them
-in the `configure' command line, using `--env-VAR=value' or
-`VAR=value'.  For example, the switch `--env-CC=/usr/local2/bin/gcc'
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+     ./configure CC=/usr/local2/bin/gcc
+   will cause the specified gcc to be used as the C compiler (unless it
+is overridden in the site shell script).
+
+   Please, note that the former interface:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+   or
+     env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+   should be avoided.
 
 Operation Controls
 ==================
diff --git a/acspecific.m4 b/acspecific.m4
index 33f4adc0..19eca094 100644
--- a/acspecific.m4
+++ b/acspecific.m4
@@ -833,76 +833,15 @@ AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
   [ac_header_dirent=$ac_hdr; break])
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
+  AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
 else
-AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
+  AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
 fi
 ])
 
-dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
-dnl defines the type `DIR'.  dirent.h on NextStep 3.2 doesn't.
-dnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND)
-AC_DEFUN(AC_CHECK_HEADER_DIRENT,
-[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
-AC_MSG_CHECKING([for $1 that defines DIR])
-AC_CACHE_VAL(ac_cv_header_dirent_$ac_safe,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <$1>], [DIR *dirp = 0;],
-  eval "ac_cv_header_dirent_$ac_safe=yes",
-  eval "ac_cv_header_dirent_$ac_safe=no")])dnl
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  $2
-else
-  AC_MSG_RESULT(no)
-fi
-])
-
-dnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that
-dnl defines `DIR'.
-dnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION])
-define(AC_CHECK_HEADERS_DIRENT,
-[for ac_hdr in $1
-do
-AC_CHECK_HEADER_DIRENT($ac_hdr,
-[changequote(, )dnl
-  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
-done])
 
 AC_DEFUN(AC_DIR_HEADER,
-[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break])
-done
-
-case "$ac_header_dirent" in
-dirent.h)
-  AC_DEFINE(DIRENT, 1,
-            [Define if you have <dirent.h>.]) ;;
-sys/ndir.h)
-  AC_DEFINE(SYSNDIR, 1,
-            [Define if you don't have <dirent.h>, but have <sys/ndir.h>.]) ;;
-sys/dir.h)
-  AC_DEFINE(SYSDIR, 1,
-            [Define if you don't have <dirent.h>, but have <sys/dir.h>]) ;;
-ndir.h)
-  AC_DEFINE(NDIR, 1,
-            [Define if you don't have <dirent.h>, but have <ndir.h>.]) ;;
-esac
-
-AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
-[AC_TRY_RUN([#include <sys/types.h>
-#include <$ac_header_dirent>
-int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
-  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
-if test $ac_cv_func_closedir_void = yes; then
-  AC_DEFINE(VOID_CLOSEDIR, 1,
-            [Define if the `closedir' function returns void instead of `int'.])
-fi
-])
+[AC_HASBEEN([$0], [; instead use AC_HEADER_DIRENT])])
 
 AC_DEFUN(AC_HEADER_STAT,
 [AC_CACHE_CHECK(whether stat file-mode macros are broken,
@@ -1115,7 +1054,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
    back from the file, nor mmap's back from the file at a different
    address.  (There have been systems where private was not correctly
    implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
+   VM page cache was not coherent with the file system buffer cache
    like early versions of FreeBSD and possibly contemporary NetBSD.)
    For shared mappings, we should conversely verify that changes get
    propogated back to all the places they're supposed to be.
diff --git a/autoconf.texi b/autoconf.texi
index 31799138..f0d75a46 100644
--- a/autoconf.texi
+++ b/autoconf.texi
@@ -8,7 +8,7 @@
 
 @set EDITION 2.14.1
 @set VERSION 2.14.1
-@set UPDATED June 1999
+@set UPDATED October 1999
 
 @iftex
 @finalout
@@ -800,8 +800,8 @@ Process any command-line arguments and find the source code directory.
 source directory; @code{configure} checks for this file's existence to
 make sure that the directory that it is told contains the source code in
 fact does.  Occasionally people accidentally specify the wrong directory
-with @samp{--srcdir}; this is a safety check.  @xref{Invoking configure},
-for more information.
+with @samp{--srcdir}; this is a safety check.  @xref{Invoking
+configure}, for more information.
 @end defmac
 
 Small packages may store all their macros in @code{aclocal.m4}.  As the
@@ -893,7 +893,8 @@ If you pass @var{extra-cmds}, those commands will be inserted into
 substitutions performed on them in @code{configure}.  You can use
 @var{init-cmds} to pass variables from @code{configure} to the
 @var{extra-cmds}.  If @code{AC_OUTPUT_COMMANDS} has been called, the
-commands given to it are run just before the commands passed to this macro.
+commands given to it are run just before the commands passed to this
+macro.
 @end defmac
 
 @defmac AC_OUTPUT_COMMANDS (@var{extra-cmds} @r{[}, @var{init-cmds}@r{]})
@@ -948,8 +949,8 @@ variables that are set in @code{configure}.  To make @code{configure}
 substitute a particular variable into the output files, the macro
 @code{AC_SUBST} must be called with that variable name as an argument.
 Any occurrences of @samp{@@@var{variable}@@} for other variables are
-left unchanged.  @xref{Setting Output Variables}, for more information on
-creating output variables with @code{AC_SUBST}.
+left unchanged.  @xref{Setting Output Variables}, for more information
+on creating output variables with @code{AC_SUBST}.
 
 A software package that uses a @code{configure} script should be
 distributed with a file @file{Makefile.in}, but no @file{Makefile}; that
@@ -973,9 +974,9 @@ Some output variables are preset by the Autoconf macros.  Some of the
 Autoconf macros set additional output variables, which are mentioned in
 the descriptions for those macros.  @xref{Output Variable Index}, for a
 complete list of output variables.  Here is what each of the preset ones
-contains.  @xref{Directory Variables, , Variables for Installation Directories,
-standards, The GNU Coding Standards}, for more information about
-the variables with names that end in @samp{dir}.
+contains.  @xref{Directory Variables, , Variables for Installation
+Directories, standards, The GNU Coding Standards}, for more information
+about the variables with names that end in @samp{dir}.
 
 @defvar bindir
 @ovindex bindir
@@ -1798,8 +1799,8 @@ standard place.  Otherwise set @code{LEX} to @samp{lex} and
 @defmac AC_PROG_LN_S
 @maindex PROG_LN_S
 @ovindex LN_S
-If @samp{ln -s} works on the current filesystem (the operating system
-and filesystem support symbolic links), set output variable @code{LN_S}
+If @samp{ln -s} works on the current file system (the operating system
+and file system support symbolic links), set output variable @code{LN_S}
 to @samp{ln -s}, otherwise set it to @samp{ln}.
 
 If the link is put in a directory other than the current directory, its
@@ -2332,33 +2333,6 @@ example, @code{struct timeval} or @code{struct timezone} as well as
 @end example
 @end defmac
 
-@defmac AC_DIR_HEADER
-@maindex DIR_HEADER
-@cvindex DIRENT
-@cvindex SYSDIR
-@cvindex SYSNDIR
-@cvindex NDIR
-@cvindex VOID_CLOSEDIR
-Like calling @code{AC_HEADER_DIRENT} and @code{AC_FUNC_CLOSEDIR_VOID},
-but defines a different set of C preprocessor macros to indicate which
-header file is found.  This macro and the names it defines are
-considered obsolete.  The names it defines are:
-
-@c The printed table looks too spaced out with blank lines between the entries.
-@table @file
-@item dirent.h
-@code{DIRENT}
-@item sys/ndir.h
-@code{SYSNDIR}
-@item sys/dir.h
-@code{SYSDIR}
-@item ndir.h
-@code{NDIR}
-@end table
-
-In addition, if the @code{closedir} function does not return a
-meaningful value, define @code{VOID_CLOSEDIR}.
-@end defmac
 
 @defmac AC_HEADER_DIRENT
 @maindex HEADER_DIRENT
@@ -3658,7 +3632,7 @@ track of whether the remaining cases need to be checked.
 
 @example
 @group
-AC_MSG_CHECKING(how to get filesystem type)
+AC_MSG_CHECKING(how to get file system type)
 fstype=no
 # The order of these tests is important.
 AC_TRY_CPP([#include <sys/statvfs.h>
@@ -4214,8 +4188,9 @@ for the name of your organization or software package.
 Most of the Autoconf macros' names follow a structured naming convention
 that indicates the kind of feature check by the name.  The macro names
 consist of several words, separated by underscores, going from most
-general to most specific.   The names of their cache variables use the
-same convention (@pxref{Cache Variable Names}, for more information on them).
+general to most specific.  The names of their cache variables use the
+same convention (@pxref{Cache Variable Names}, for more information on
+them).
 
 The first word of the name after @samp{AC_} usually tells the category
 of feature being tested.  Here are the categories used in Autoconf for
@@ -4837,6 +4812,7 @@ Features and packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
+
 --enable and --with options recognized:
   --with-foo              use foo (default is NO)
 @end example
@@ -6064,8 +6040,8 @@ checks.
 
 This is an alphabetical list of the variables that Autoconf can
 substitute into files that it creates, typically one or more
-@file{Makefile}s.  @xref{Setting Output Variables}, for more information on how
-this is done.
+@file{Makefile}s.  @xref{Setting Output Variables}, for more information
+on how this is done.
 
 @printindex ov
 
diff --git a/autoheader.m4 b/autoheader.m4
index 0b4a99aa..4a4e1ec5 100644
--- a/autoheader.m4
+++ b/autoheader.m4
@@ -55,9 +55,6 @@ dnl Ignore CPP macro arguments.
 @@@syms="$syms patsubst($1, [(.*$])"@@@
 ])])
 
-dnl AC_VERBATIM
-define([AC_VERBATIM], [])
-
 dnl AH_TEMPLATE(KEY, DESCRIPTION)
 dnl Issue an autoheader template for KEY, i.e., a comment composed
 dnl of DESCRIPTION (properly wrapped), and then #undef KEY.
@@ -171,14 +168,12 @@ define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
 @@@config_h=AC_CONFIG_H@@@
 ])
 
-define([AC_VERBATIM], [AH_VERBATIM($@)])
 define([AC_DEFINE], [AH_DEFINE($@)])
 define([AC_DEFINE_UNQUOTED], [AH_DEFINE($@)])
 define([AC_NEED_DECLS], [AH_NEED_DECLS($@)])
 define([AC_CHECK_SIZEOF], [AH_CHECK_SIZEOF($@)])
 define([AC_CHECK_FUNCS], [AH_CHECK_FUNCS($@)])
 define([AC_CHECK_HEADERS], [AH_CHECK_HEADERS($@)])
-define([AC_CHECK_HEADERS_DIRENT], [AH_CHECK_HEADERS($@)])
 define([AC_CHECK_LIB], [AH_CHECK_LIB($@)])
 define([AC_PROG_LEX], [AH_PROG_LEX($@)])
 define([AC_FUNC_ALLOCA], [AH_FUNC_ALLOCA($@)])
diff --git a/configure b/configure
index 2da527be..a0d98550 100755
--- a/configure
+++ b/configure
@@ -904,6 +904,12 @@ cat > $CONFIG_STATUS <<EOF
 # Compiler output produced by configure, useful for debugging
 # configure, is in ./config.log if it exists.
 
+# Files that config.status was made for.
+config_files="\\
+    Makefile testsuite/Makefile"
+config_links="\\
+    :"
+
 ac_cs_usage="\\
 \\\`$CONFIG_STATUS' instantiates files from templates according to the
 current configuration.
@@ -916,11 +922,13 @@ Usage: $CONFIG_STATUS [OPTIONS] FILE...
 
 Files to instantiate:
   Configuration files:
-    Makefile testsuite/Makefile 
+\$config_files
+  Links to install:
+\$config_links
 
 Report bugs to <bug-autoconf@gnu.org>."
 
-ac_cs_version="\
+ac_cs_version="\\
 $CONFIG_STATUS generated by autoconf version 2.14.1.
 Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by running
   $0 $ac_configure_args"
@@ -930,9 +938,6 @@ ac_cs_root=cs\$\$
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-# Files that config.status was made for.
-config_files="Makefile testsuite/Makefile" 
-
 for ac_option
 do
   case "\$ac_option" in
@@ -943,7 +948,7 @@ do
     echo "\$ac_cs_version"; exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
-  *) # Find out the files to process
+  *) # Find out the files to process.
     for ac_file in \$config_files
     do
       case \$ac_file in
@@ -964,6 +969,16 @@ do
       esac
     done
     test -z "\$ac_option" && continue
+    for ac_file in \$config_links
+    do
+      case \$ac_file in
+        \$ac_option | \$ac_option:* )
+          CONFIG_LINKS="\$CONFIG_LINKS \$ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "\$ac_option" && continue
     echo "$CONFIG_STATUS: invalid argument: \$ac_option"; exit 1
    ;;
   esac
@@ -975,6 +990,7 @@ cat >> $CONFIG_STATUS <<EOF
 # If there were arguments, don't assign a default value.
 if test \$# = 0; then
   : \${CONFIG_FILES="\$config_files"}
+  : \${CONFIG_LINKS="\$config_links"}
 fi
 
 # Remove all the CONFIG_FILES, and trap to remove the temp files.
@@ -1133,6 +1149,46 @@ s%@INSTALL@%$INSTALL%;t t
 fi; done
 rm -f $ac_cs_root.s*
 EOF
+cat >> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+
+for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then
+  ac_dest=`echo "$ac_file"|sed 's%:.*%%'`
+  ac_source=`echo "$ac_file"|sed 's%[^:]*:%%'`
+
+  echo "linking $srcdir/$ac_source to $ac_dest"
+
+  if test ! -r $srcdir/$ac_source; then
+    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+  fi
+  rm -f $ac_dest
+
+  # Make relative symlinks.
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+    # The dest file is in a subdirectory.
+    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dest_dir_suffix.
+    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dest_dir_suffix= ac_dots=
+  fi
+
+  case "$srcdir" in
+  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+  esac
+
+  # Make a symlink if possible; otherwise try a hard link.
+  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+     ln $srcdir/$ac_source $ac_dest; then :
+  else
+    { echo "configure: error: cannot link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+  fi
+fi; done
+EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 31799138..f0d75a46 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -8,7 +8,7 @@
 
 @set EDITION 2.14.1
 @set VERSION 2.14.1
-@set UPDATED June 1999
+@set UPDATED October 1999
 
 @iftex
 @finalout
@@ -800,8 +800,8 @@ Process any command-line arguments and find the source code directory.
 source directory; @code{configure} checks for this file's existence to
 make sure that the directory that it is told contains the source code in
 fact does.  Occasionally people accidentally specify the wrong directory
-with @samp{--srcdir}; this is a safety check.  @xref{Invoking configure},
-for more information.
+with @samp{--srcdir}; this is a safety check.  @xref{Invoking
+configure}, for more information.
 @end defmac
 
 Small packages may store all their macros in @code{aclocal.m4}.  As the
@@ -893,7 +893,8 @@ If you pass @var{extra-cmds}, those commands will be inserted into
 substitutions performed on them in @code{configure}.  You can use
 @var{init-cmds} to pass variables from @code{configure} to the
 @var{extra-cmds}.  If @code{AC_OUTPUT_COMMANDS} has been called, the
-commands given to it are run just before the commands passed to this macro.
+commands given to it are run just before the commands passed to this
+macro.
 @end defmac
 
 @defmac AC_OUTPUT_COMMANDS (@var{extra-cmds} @r{[}, @var{init-cmds}@r{]})
@@ -948,8 +949,8 @@ variables that are set in @code{configure}.  To make @code{configure}
 substitute a particular variable into the output files, the macro
 @code{AC_SUBST} must be called with that variable name as an argument.
 Any occurrences of @samp{@@@var{variable}@@} for other variables are
-left unchanged.  @xref{Setting Output Variables}, for more information on
-creating output variables with @code{AC_SUBST}.
+left unchanged.  @xref{Setting Output Variables}, for more information
+on creating output variables with @code{AC_SUBST}.
 
 A software package that uses a @code{configure} script should be
 distributed with a file @file{Makefile.in}, but no @file{Makefile}; that
@@ -973,9 +974,9 @@ Some output variables are preset by the Autoconf macros.  Some of the
 Autoconf macros set additional output variables, which are mentioned in
 the descriptions for those macros.  @xref{Output Variable Index}, for a
 complete list of output variables.  Here is what each of the preset ones
-contains.  @xref{Directory Variables, , Variables for Installation Directories,
-standards, The GNU Coding Standards}, for more information about
-the variables with names that end in @samp{dir}.
+contains.  @xref{Directory Variables, , Variables for Installation
+Directories, standards, The GNU Coding Standards}, for more information
+about the variables with names that end in @samp{dir}.
 
 @defvar bindir
 @ovindex bindir
@@ -1798,8 +1799,8 @@ standard place.  Otherwise set @code{LEX} to @samp{lex} and
 @defmac AC_PROG_LN_S
 @maindex PROG_LN_S
 @ovindex LN_S
-If @samp{ln -s} works on the current filesystem (the operating system
-and filesystem support symbolic links), set output variable @code{LN_S}
+If @samp{ln -s} works on the current file system (the operating system
+and file system support symbolic links), set output variable @code{LN_S}
 to @samp{ln -s}, otherwise set it to @samp{ln}.
 
 If the link is put in a directory other than the current directory, its
@@ -2332,33 +2333,6 @@ example, @code{struct timeval} or @code{struct timezone} as well as
 @end example
 @end defmac
 
-@defmac AC_DIR_HEADER
-@maindex DIR_HEADER
-@cvindex DIRENT
-@cvindex SYSDIR
-@cvindex SYSNDIR
-@cvindex NDIR
-@cvindex VOID_CLOSEDIR
-Like calling @code{AC_HEADER_DIRENT} and @code{AC_FUNC_CLOSEDIR_VOID},
-but defines a different set of C preprocessor macros to indicate which
-header file is found.  This macro and the names it defines are
-considered obsolete.  The names it defines are:
-
-@c The printed table looks too spaced out with blank lines between the entries.
-@table @file
-@item dirent.h
-@code{DIRENT}
-@item sys/ndir.h
-@code{SYSNDIR}
-@item sys/dir.h
-@code{SYSDIR}
-@item ndir.h
-@code{NDIR}
-@end table
-
-In addition, if the @code{closedir} function does not return a
-meaningful value, define @code{VOID_CLOSEDIR}.
-@end defmac
 
 @defmac AC_HEADER_DIRENT
 @maindex HEADER_DIRENT
@@ -3658,7 +3632,7 @@ track of whether the remaining cases need to be checked.
 
 @example
 @group
-AC_MSG_CHECKING(how to get filesystem type)
+AC_MSG_CHECKING(how to get file system type)
 fstype=no
 # The order of these tests is important.
 AC_TRY_CPP([#include <sys/statvfs.h>
@@ -4214,8 +4188,9 @@ for the name of your organization or software package.
 Most of the Autoconf macros' names follow a structured naming convention
 that indicates the kind of feature check by the name.  The macro names
 consist of several words, separated by underscores, going from most
-general to most specific.   The names of their cache variables use the
-same convention (@pxref{Cache Variable Names}, for more information on them).
+general to most specific.  The names of their cache variables use the
+same convention (@pxref{Cache Variable Names}, for more information on
+them).
 
 The first word of the name after @samp{AC_} usually tells the category
 of feature being tested.  Here are the categories used in Autoconf for
@@ -4837,6 +4812,7 @@ Features and packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
+
 --enable and --with options recognized:
   --with-foo              use foo (default is NO)
 @end example
@@ -6064,8 +6040,8 @@ checks.
 
 This is an alphabetical list of the variables that Autoconf can
 substitute into files that it creates, typically one or more
-@file{Makefile}s.  @xref{Setting Output Variables}, for more information on how
-this is done.
+@file{Makefile}s.  @xref{Setting Output Variables}, for more information
+on how this is done.
 
 @printindex ov
 
diff --git a/doc/install.texi b/doc/install.texi
index a3bd5053..7b7119ec 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -77,15 +77,8 @@ them in the environment.  You can do that on the command line like this:
 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 @end example
 
-Please, note that the former interface:
-@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-or
-@example
-env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-is deprecated and should be avoided.
+@xref{Environment Variables}, for more details.
+
 
 @node Multiple Architectures
 @section Compiling For Multiple Architectures
@@ -185,12 +178,25 @@ script.  A warning: not all @code{configure} scripts look for a site script.
 Variables not defined in a site shell script can be set in the
 environment passed to configure.  However, some packages may run
 configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you can set them
-in the @code{configure} command line, using @samp{--env-VAR=value} or
-@samp{VAR=value}.  For example, the switch
-@samp{--env-CC=/usr/local2/bin/gcc} will cause the specified gcc to be
-used as the C compiler (unless it is overridden in the site shell
-script).
+variables may be lost.  In order to avoid this problem, you should set
+them in the @code{configure} command line, using @samp{VAR=value}.  For
+example:
+@example
+./configure CC=/usr/local2/bin/gcc
+@end example
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Please, note that the former interface:
+@example
+CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+@end example
+or
+@example
+env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+@end example
+should be avoided.
+
 
 @node Operation Controls
 @section Operation Controls
diff --git a/install.texi b/install.texi
index a3bd5053..7b7119ec 100644
--- a/install.texi
+++ b/install.texi
@@ -77,15 +77,8 @@ them in the environment.  You can do that on the command line like this:
 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 @end example
 
-Please, note that the former interface:
-@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-or
-@example
-env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-is deprecated and should be avoided.
+@xref{Environment Variables}, for more details.
+
 
 @node Multiple Architectures
 @section Compiling For Multiple Architectures
@@ -185,12 +178,25 @@ script.  A warning: not all @code{configure} scripts look for a site script.
 Variables not defined in a site shell script can be set in the
 environment passed to configure.  However, some packages may run
 configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you can set them
-in the @code{configure} command line, using @samp{--env-VAR=value} or
-@samp{VAR=value}.  For example, the switch
-@samp{--env-CC=/usr/local2/bin/gcc} will cause the specified gcc to be
-used as the C compiler (unless it is overridden in the site shell
-script).
+variables may be lost.  In order to avoid this problem, you should set
+them in the @code{configure} command line, using @samp{VAR=value}.  For
+example:
+@example
+./configure CC=/usr/local2/bin/gcc
+@end example
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Please, note that the former interface:
+@example
+CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+@end example
+or
+@example
+env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+@end example
+should be avoided.
+
 
 @node Operation Controls
 @section Operation Controls
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 33f4adc0..19eca094 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -833,76 +833,15 @@ AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
   [ac_header_dirent=$ac_hdr; break])
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
+  AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
 else
-AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
+  AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
 fi
 ])
 
-dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
-dnl defines the type `DIR'.  dirent.h on NextStep 3.2 doesn't.
-dnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND)
-AC_DEFUN(AC_CHECK_HEADER_DIRENT,
-[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
-AC_MSG_CHECKING([for $1 that defines DIR])
-AC_CACHE_VAL(ac_cv_header_dirent_$ac_safe,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <$1>], [DIR *dirp = 0;],
-  eval "ac_cv_header_dirent_$ac_safe=yes",
-  eval "ac_cv_header_dirent_$ac_safe=no")])dnl
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  $2
-else
-  AC_MSG_RESULT(no)
-fi
-])
-
-dnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that
-dnl defines `DIR'.
-dnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION])
-define(AC_CHECK_HEADERS_DIRENT,
-[for ac_hdr in $1
-do
-AC_CHECK_HEADER_DIRENT($ac_hdr,
-[changequote(, )dnl
-  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
-done])
 
 AC_DEFUN(AC_DIR_HEADER,
-[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break])
-done
-
-case "$ac_header_dirent" in
-dirent.h)
-  AC_DEFINE(DIRENT, 1,
-            [Define if you have <dirent.h>.]) ;;
-sys/ndir.h)
-  AC_DEFINE(SYSNDIR, 1,
-            [Define if you don't have <dirent.h>, but have <sys/ndir.h>.]) ;;
-sys/dir.h)
-  AC_DEFINE(SYSDIR, 1,
-            [Define if you don't have <dirent.h>, but have <sys/dir.h>]) ;;
-ndir.h)
-  AC_DEFINE(NDIR, 1,
-            [Define if you don't have <dirent.h>, but have <ndir.h>.]) ;;
-esac
-
-AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
-[AC_TRY_RUN([#include <sys/types.h>
-#include <$ac_header_dirent>
-int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
-  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
-if test $ac_cv_func_closedir_void = yes; then
-  AC_DEFINE(VOID_CLOSEDIR, 1,
-            [Define if the `closedir' function returns void instead of `int'.])
-fi
-])
+[AC_HASBEEN([$0], [; instead use AC_HEADER_DIRENT])])
 
 AC_DEFUN(AC_HEADER_STAT,
 [AC_CACHE_CHECK(whether stat file-mode macros are broken,
@@ -1115,7 +1054,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
    back from the file, nor mmap's back from the file at a different
    address.  (There have been systems where private was not correctly
    implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
+   VM page cache was not coherent with the file system buffer cache
    like early versions of FreeBSD and possibly contemporary NetBSD.)
    For shared mappings, we should conversely verify that changes get
    propogated back to all the places they're supposed to be.

(Patch may be truncated, please check the link at the top of this post.)