]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
tweaks for error handling
authorDavid MacKenzie <djm@djmnet.org>
Sat, 27 Aug 1994 01:27:32 +0000 (01:27 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Sat, 27 Aug 1994 01:27:32 +0000 (01:27 +0000)
acgeneral.m4
acspecific.m4
autoconf.texi
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/specific.m4

index ad1a3d5a803d655eb34dd112d6b5c13db9797b68..6e77b16bc81743e3450c44e9cc0803c4dd24f3f8 100644 (file)
@@ -1125,8 +1125,8 @@ cat > conftest.${ac_ext} <<EOF
 #include "confdefs.h"
 [$2]
 EOF
-eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
-if egrep "$1" conftest.out >/dev/null 2>&1; then
+if eval "$ac_cpp conftest.${ac_ext}" 2>&AC_FD_CC |
+  egrep "$1" >/dev/null 2>&1; then
   ifelse([$3], , :, [rm -rf conftest*
   $3])
 ifelse([$4], , , [else
@@ -1219,8 +1219,9 @@ ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
 if test -z "$ac_err"; then
   ifelse([$2], , :, [rm -rf conftest*
   $2])
-ifelse([$3], , , [else
-  rm -rf conftest*
+else
+  echo "$ac_err" >&AC_FD_CC
+ifelse([$3], , , [  rm -rf conftest*
   $3
 ])dnl
 fi
index a82c0003293ae8aa682f23308aa0db5fb7477116..e55c199caed5276a0ebf209e960e19a8fb265e51 100644 (file)
@@ -854,7 +854,8 @@ fi
 ])dnl
 dnl
 AC_DEFUN(AC_FUNC_ALLOCA,
-[# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 AC_MSG_CHECKING([for working alloca.h])
 AC_CACHE_VAL(ac_cv_header_alloca_h,
index 7f132b2a91da41637064fd2fd49de1f237bd79f2..6b4a86ca7d059cd6f1436249364fbc5ec2e06c2b 100644 (file)
@@ -1913,13 +1913,11 @@ prints @samp{checking for @var{echo-text}} to the standard output first.
 
 @defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]})
 @maindex EGREP_CPP
-@var{program} is the text of a C or C++ program, on which shell variable and
-backquote substitutions are performed.  If the output of running the
-preprocessor on @var{program} contains the @code{egrep} regular
-expression @var{pattern}, execute shell commands @var{action-if-found},
-otherwise execute @var{action-if-not-found}.  (It is an unfortunate
-oversight that we use the word @code{PROGRAM} in Autoconf macro names to
-sometimes mean C or C++ source code and sometimes mean a UNIX command.)
+@var{program} is the text of a C or C++ program, on which shell
+variable, backquote, and backslash substitutions are performed.  If the
+output of running the preprocessor on @var{program} contains the
+@code{egrep} regular expression @var{pattern}, execute shell commands
+@var{action-if-found}, otherwise execute @var{action-if-not-found}.
 
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
@@ -1946,12 +1944,12 @@ your programs.
 
 @defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
 @maindex TRY_CPP
-@var{includes} is C or C++ @code{#include} statements and declarations, on
-which shell variable and backquote substitutions are performed.
-(Actually, it can be any C program, but other statements are probably
-not useful.)  If the preprocessor produces no error messages while
-processing it, run shell commands @var{action-if-true}.  Otherwise run
-shell commands @var{action-if-false}.
+@var{includes} is C or C++ @code{#include} statements and declarations,
+on which shell variable, backquote, and backslash substitutions are
+performed.  (Actually, it can be any C program, but other statements are
+probably not useful.)  If the preprocessor produces no error messages
+while processing it, run shell commands @var{action-if-true}.  Otherwise
+run shell commands @var{action-if-false}.
 
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
index 7f132b2a91da41637064fd2fd49de1f237bd79f2..6b4a86ca7d059cd6f1436249364fbc5ec2e06c2b 100644 (file)
@@ -1913,13 +1913,11 @@ prints @samp{checking for @var{echo-text}} to the standard output first.
 
 @defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]})
 @maindex EGREP_CPP
-@var{program} is the text of a C or C++ program, on which shell variable and
-backquote substitutions are performed.  If the output of running the
-preprocessor on @var{program} contains the @code{egrep} regular
-expression @var{pattern}, execute shell commands @var{action-if-found},
-otherwise execute @var{action-if-not-found}.  (It is an unfortunate
-oversight that we use the word @code{PROGRAM} in Autoconf macro names to
-sometimes mean C or C++ source code and sometimes mean a UNIX command.)
+@var{program} is the text of a C or C++ program, on which shell
+variable, backquote, and backslash substitutions are performed.  If the
+output of running the preprocessor on @var{program} contains the
+@code{egrep} regular expression @var{pattern}, execute shell commands
+@var{action-if-found}, otherwise execute @var{action-if-not-found}.
 
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
@@ -1946,12 +1944,12 @@ your programs.
 
 @defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
 @maindex TRY_CPP
-@var{includes} is C or C++ @code{#include} statements and declarations, on
-which shell variable and backquote substitutions are performed.
-(Actually, it can be any C program, but other statements are probably
-not useful.)  If the preprocessor produces no error messages while
-processing it, run shell commands @var{action-if-true}.  Otherwise run
-shell commands @var{action-if-false}.
+@var{includes} is C or C++ @code{#include} statements and declarations,
+on which shell variable, backquote, and backslash substitutions are
+performed.  (Actually, it can be any C program, but other statements are
+probably not useful.)  If the preprocessor produces no error messages
+while processing it, run shell commands @var{action-if-true}.  Otherwise
+run shell commands @var{action-if-false}.
 
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
index ad1a3d5a803d655eb34dd112d6b5c13db9797b68..6e77b16bc81743e3450c44e9cc0803c4dd24f3f8 100644 (file)
@@ -1125,8 +1125,8 @@ cat > conftest.${ac_ext} <<EOF
 #include "confdefs.h"
 [$2]
 EOF
-eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
-if egrep "$1" conftest.out >/dev/null 2>&1; then
+if eval "$ac_cpp conftest.${ac_ext}" 2>&AC_FD_CC |
+  egrep "$1" >/dev/null 2>&1; then
   ifelse([$3], , :, [rm -rf conftest*
   $3])
 ifelse([$4], , , [else
@@ -1219,8 +1219,9 @@ ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
 if test -z "$ac_err"; then
   ifelse([$2], , :, [rm -rf conftest*
   $2])
-ifelse([$3], , , [else
-  rm -rf conftest*
+else
+  echo "$ac_err" >&AC_FD_CC
+ifelse([$3], , , [  rm -rf conftest*
   $3
 ])dnl
 fi
index a82c0003293ae8aa682f23308aa0db5fb7477116..e55c199caed5276a0ebf209e960e19a8fb265e51 100644 (file)
@@ -854,7 +854,8 @@ fi
 ])dnl
 dnl
 AC_DEFUN(AC_FUNC_ALLOCA,
-[# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 AC_MSG_CHECKING([for working alloca.h])
 AC_CACHE_VAL(ac_cv_header_alloca_h,