From: Paolo Bonzini Date: Thu, 23 Oct 2008 16:36:17 +0000 (+0200) Subject: Avoid a fork in _AC_RUN_LOG and _AC_RUN_LOG_STDERR X-Git-Tag: v2.63b~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db60987f02c42b4ead01b7f569f5e8c71c0ecf87;p=thirdparty%2Fautoconf.git 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. --- diff --git a/ChangeLog b/ChangeLog index 105d4863..8d0f78a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-23 Paolo Bonzini + + 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 Ensure actions can look at conftest* files. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 54d09229..a6778c55 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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) # --------------------