+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.
# _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)
# 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
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)
# --------------------