* doc/autoconf.texi (Compilers and Preprocessors): Likewise.
* acgeneral.m4 (AC_TRY_CPP): Comment changes.
+2000-10-19 Pavel Roskin <proski@gnu.org>
+
+ * NEWS: Documented changes in AC_PROG_CPP and AC_TRY_CPP.
+ * doc/autoconf.texi (Compilers and Preprocessors): Likewise.
+ * acgeneral.m4 (AC_TRY_CPP): Comment changes.
+
2000-10-19 Pavel Roskin <proski@gnu.org>
* doc/autoconf.texi (Shellology): Documented quirks in ash-0.2.
Checks if the compiler supports ISO C, included when needs special
options.
+- AC_PROG_CPP
+ Checking whether the preprocessor indicates missing includes by the
+ error code. stderr is checked by AC_TRY_CPP only as a fallback.
+
- AC_LANG
Takes a language as argument and replaces AC_LANG_C,
AC_LANG_CPLUSPLUS and AC_LANG_FORTRAN77.
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
-# Capture the stderr of cpp. eval is necessary to expand ac_cpp. We
-# used to copy stderr to stdout and capture it in a variable, but that
-# breaks under sh -x, which writes compile commands starting with ` +'
-# to stderr in eval and subshells.
+# AC_TRY_CPP is used to check whether particular header files exist.
+# You can check for one at a time, or more than one if you need several
+# header files to all exist for some purpose.
#
# INCLUDES are not defaulted.
AC_DEFUN([AC_TRY_CPP],
@maindex PROG_CPP
@ovindex CPP
Set output variable @code{CPP} to a command that runs the
-C preprocessor. If @samp{$CC -E} doesn't work, it uses @file{/lib/cpp}.
+C preprocessor. If @samp{$CC -E} doesn't work, @file{/lib/cpp} is used.
It is only portable to run @code{CPP} on files with a @file{.c}
extension.
specific test macros use the value of @code{CPP} indirectly by calling
@code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, @code{AC_EGREP_HEADER}, or
@code{AC_EGREP_CPP}.
+
+Some preprocessors don't indicate missing include files by the error
+status. For such preprocessors an internal variable is set that causes
+other macros to check the standard error from the preprocessor and
+consider the test failed if any warnings have been reported.
@end defmac
@defmac AC_PROG_CXX (@ovar{compiler-search-list})
@maindex PROG_CXXCPP
@ovindex CXXCPP
Set output variable @code{CXXCPP} to a command that runs the C++
-preprocessor. If @samp{$CXX -E} doesn't work, it uses @file{/lib/cpp}.
+preprocessor. If @samp{$CXX -E} doesn't work, @file{/lib/cpp} is used.
It is only portable to run @code{CXXCPP} on files with a @file{.c},
@file{.C}, or @file{.cc} extension.
specific test macros use the value of @code{CXXCPP} indirectly by
calling @code{AC_TRY_CPP}, @code{AC_CHECK_HEADER},
@code{AC_EGREP_HEADER}, or @code{AC_EGREP_CPP}.
+
+Some preprocessors don't indicate missing include files by the error
+status. For such preprocessors an internal variable is set that causes
+other macros to check the standard error from the preprocessor and
+consider the test failed if any warnings have been reported. However,
+it is not known whether such broken preprocessors exist for C++.
@end defmac
@defmac AC_PROG_F77 (@ovar{compiler-search-list})
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
-# Capture the stderr of cpp. eval is necessary to expand ac_cpp. We
-# used to copy stderr to stdout and capture it in a variable, but that
-# breaks under sh -x, which writes compile commands starting with ` +'
-# to stderr in eval and subshells.
+# AC_TRY_CPP is used to check whether particular header files exist.
+# You can check for one at a time, or more than one if you need several
+# header files to all exist for some purpose.
#
# INCLUDES are not defaulted.
AC_DEFUN([AC_TRY_CPP],