]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Avoid a fork in _AC_RUN_LOG and _AC_RUN_LOG_STDERR
authorPaolo Bonzini <bonzini@gnu.org>
Thu, 23 Oct 2008 16:36:17 +0000 (18:36 +0200)
committerPaolo Bonzini <bonzini@gnu.org>
Thu, 23 Oct 2008 16:37:08 +0000 (18:37 +0200)
* lib/autoconf/general.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR):
Return a boolean status code based on $ac_status.

ChangeLog
lib/autoconf/general.m4

index 105d486305ce8f8ecac903700b3a32244d682d82..8d0f78a476b10f32c9269052e5a9bfd7eb04ffab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-23  Paolo Bonzini  <bonzinI@gnu.org>
+
+       Avoid a fork in _AC_RUN_LOG and _AC_RUN_LOG_STDERR
+       * lib/autoconf/general.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR):
+       Return a boolean status code based on $ac_status.
+
 2008-10-23  Paolo Bonzini  <bonzinI@gnu.org>
 
        Ensure actions can look at conftest* files.
index 54d092294f0592baa0e25b33ea3d32ed103aa606..a6778c557106b0f83e0f5ba7a1732ecafbd1a990 100644 (file)
@@ -2228,13 +2228,15 @@ AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
 
 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
 # ----------------------------------
-# Eval COMMAND, save the exit status in ac_status, and log it.
+# Eval COMMAND, save the exit status in ac_status, and log it.  The return
+# code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF
+# constructs.
 AC_DEFUN([_AC_RUN_LOG],
 [{ { $2; } >&AS_MESSAGE_LOG_FD
   ($1) 2>&AS_MESSAGE_LOG_FD
   ac_status=$?
   _AS_ECHO_LOG([\$? = $ac_status])
-  (exit $ac_status); }])
+  test $ac_status = 0; }])
 
 
 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
@@ -2244,6 +2246,8 @@ AC_DEFUN([_AC_RUN_LOG],
 # use.
 # Note that when tracing, most shells will leave the traces in stderr
 # starting with "+": that's what this macro tries to address.
+# The return code is 0 if COMMAND succeeded, so that it can be used directly
+# in AS_IF constructs.
 AC_DEFUN([_AC_RUN_LOG_STDERR],
 [{ { $2; } >&AS_MESSAGE_LOG_FD
   ($1) 2>conftest.er1
@@ -2252,7 +2256,7 @@ AC_DEFUN([_AC_RUN_LOG_STDERR],
   rm -f conftest.er1
   cat conftest.err >&AS_MESSAGE_LOG_FD
   _AS_ECHO_LOG([\$? = $ac_status])
-  (exit $ac_status); }])
+  test $ac_status = 0; }])
 
 # _AC_DO_ECHO(COMMAND)
 # --------------------