From: Pavel Roskin Date: Fri, 20 Oct 2000 00:15:34 +0000 (+0000) Subject: * NEWS: Documented changes in AC_PROG_CPP and AC_TRY_CPP. X-Git-Tag: autoconf-2.50~548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1328e61cb7f76ddcf447a8166da5ebb2a62aa4b0;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 7187c0c5f..09cd2c08c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-19 Pavel Roskin + + * 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 * doc/autoconf.texi (Shellology): Documented quirks in ash-0.2. diff --git a/NEWS b/NEWS index edda2df64..bc3d5b097 100644 --- a/NEWS +++ b/NEWS @@ -191,6 +191,10 @@ test cases in this new frame work. 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. diff --git a/acgeneral.m4 b/acgeneral.m4 index b54c6d669..4f6a78fc3 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -3389,10 +3389,9 @@ fi # 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], diff --git a/doc/autoconf.texi b/doc/autoconf.texi index b25ab60fe..92cd48840 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -4057,7 +4057,7 @@ using the program @code{ansi2knr}, which comes with Automake. @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. @@ -4065,6 +4065,11 @@ If the current language is C (@pxref{Language Choice}), many of the 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}) @@ -4102,7 +4107,7 @@ compilers. @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. @@ -4110,6 +4115,12 @@ If the current language is C++ (@pxref{Language Choice}), many of the 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}) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index b54c6d669..4f6a78fc3 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -3389,10 +3389,9 @@ fi # 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],