* AC_CHECK_TYPE, which checks whether sys/types.h defines a given type.
* AC_TRY_LINK, which obsoletes AC_COMPILE_CHECK.
* AC_PREFIX_PROGRAM, which obsoletes AC_PREFIX.
+* AC_HEADER_DIRENT, which obsoletes AC_DIR_HEADER.
* AC_ARG_ENABLE and AC_ARG_WITH, which obsolete AC_ENABLE and AC_WITH.
* AC_SUBST_FILE, to insert one file into another.
override the file name "config.status".
* AC_PROG_INSTALL looks for install.sh in the directory specified by
AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default.
-* AC_HEADER_DIRENT (formerly AC_DIR_HEADER) defines standard macro
- names as well as the old ones, e.g. HAVE_DIRENT_H as well as DIRENT.
** New utilities:
* autoscan to generate a preliminary configure.in for a package by
dnl if test "${$1+set}" = set; then
if eval "test \"`echo '${'$1'+set}'`\" = set"; then
dnl This verbose message is just for testing the caching code.
- AC_MSG_RESULT(using cached value for $1)
+dnl AC_MSG_RESULT(using cached value for $1)
+ AC_MSG_RESULT(using cached value)
else
$2
fi
define(AC_HEADER_DIRENT,
[AC_PROVIDE([$0])dnl
AC_MSG_CHECKING(for directory library header)
+dnl We don't use AC_CHECK_HEADERS so we can stop when we get a match.
AC_CACHE_VAL(ac_cv_header_dir,
[ac_cv_header_dir=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
])dnl
dnl
define(AC_OS_XENIX,
-[AC_REQUIRE([AC_HEADER_DIRENT])dnl
+[AC_REQUIRE([AC_DIR_HEADER])dnl
AC_MSG_CHECKING(for Xenix)
AC_EGREP_CPP(yes,
[#if defined(M_XENIX) && !defined(M_UNIX)
The following macros check for certain operating systems that need
special treatment for some programs, due to exceptional oddities in
-their header files or libraries. These macros are kludges; they should
-be replaced someday with a more systematic approach, based either on the
+their header files or libraries. These macros are warts; they should
+be replaced by a more systematic approach, based either on the
functions they make available or the environments they provide.
@defmac AC_OS_AIX
@maindex OS_XENIX
If on Xenix, add @samp{-lx} to @code{make} variable @code{LIBS}. Also,
if @file{sys/ndir.h} is not being used, add @samp{-ldir} to @code{LIBS}.
-Needed when using the directory reading functions. This macro must be
-called after @code{AC_HEADER_DIRENT}.
+Needed when using the directory reading functions. This macro calls
+@code{AC_DIR_HEADER} if it has not been called already.
@end defmac
@node General Purpose Macros, Manual Configuration, Specific Tests, Top
test -n "$print_version" && exit 0
# Make SYMS newline-separated rather than blank-separated, and remove dups.
-syms="`for sym in $syms; do echo $sym; done | sort | uniq`"
+# Start each symbol with a blank (to match the blank after "#undef")
+# to reduce the possibility of mistakenly matching another symbol that
+# is a substring of it.
+syms="`for sym in $syms; do echo $sym; done | sort | uniq | sed 's@^@ @'`"
if test $# -eq 0; then
tmpout=autoh$$
test -f ${config_h}.top && cat ${config_h}.top
-# This puts each paragraph on its own line, separated by @s.
+# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
# Make sure the boundary of template files is also the boundary
# of the paragraph. Extra newlines don't hurt since they will
test -n "$print_version" && exit 0
# Make SYMS newline-separated rather than blank-separated, and remove dups.
-syms="`for sym in $syms; do echo $sym; done | sort | uniq`"
+# Start each symbol with a blank (to match the blank after "#undef")
+# to reduce the possibility of mistakenly matching another symbol that
+# is a substring of it.
+syms="`for sym in $syms; do echo $sym; done | sort | uniq | sed 's@^@ @'`"
if test $# -eq 0; then
tmpout=autoh$$
test -f ${config_h}.top && cat ${config_h}.top
-# This puts each paragraph on its own line, separated by @s.
+# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
# Make sure the boundary of template files is also the boundary
# of the paragraph. Extra newlines don't hurt since they will
test -n "$print_version" && exit 0
# Make SYMS newline-separated rather than blank-separated, and remove dups.
-syms="`for sym in $syms; do echo $sym; done | sort | uniq`"
+# Start each symbol with a blank (to match the blank after "#undef")
+# to reduce the possibility of mistakenly matching another symbol that
+# is a substring of it.
+syms="`for sym in $syms; do echo $sym; done | sort | uniq | sed 's@^@ @'`"
if test $# -eq 0; then
tmpout=autoh$$
test -f ${config_h}.top && cat ${config_h}.top
-# This puts each paragraph on its own line, separated by @s.
+# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
# Make sure the boundary of template files is also the boundary
# of the paragraph. Extra newlines don't hurt since they will
The following macros check for certain operating systems that need
special treatment for some programs, due to exceptional oddities in
-their header files or libraries. These macros are kludges; they should
-be replaced someday with a more systematic approach, based either on the
+their header files or libraries. These macros are warts; they should
+be replaced by a more systematic approach, based either on the
functions they make available or the environments they provide.
@defmac AC_OS_AIX
@maindex OS_XENIX
If on Xenix, add @samp{-lx} to @code{make} variable @code{LIBS}. Also,
if @file{sys/ndir.h} is not being used, add @samp{-ldir} to @code{LIBS}.
-Needed when using the directory reading functions. This macro must be
-called after @code{AC_HEADER_DIRENT}.
+Needed when using the directory reading functions. This macro calls
+@code{AC_DIR_HEADER} if it has not been called already.
@end defmac
@node General Purpose Macros, Manual Configuration, Specific Tests, Top
dnl if test "${$1+set}" = set; then
if eval "test \"`echo '${'$1'+set}'`\" = set"; then
dnl This verbose message is just for testing the caching code.
- AC_MSG_RESULT(using cached value for $1)
+dnl AC_MSG_RESULT(using cached value for $1)
+ AC_MSG_RESULT(using cached value)
else
$2
fi
define(AC_HEADER_DIRENT,
[AC_PROVIDE([$0])dnl
AC_MSG_CHECKING(for directory library header)
+dnl We don't use AC_CHECK_HEADERS so we can stop when we get a match.
AC_CACHE_VAL(ac_cv_header_dir,
[ac_cv_header_dir=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
])dnl
dnl
define(AC_OS_XENIX,
-[AC_REQUIRE([AC_HEADER_DIRENT])dnl
+[AC_REQUIRE([AC_DIR_HEADER])dnl
AC_MSG_CHECKING(for Xenix)
AC_EGREP_CPP(yes,
[#if defined(M_XENIX) && !defined(M_UNIX)