X-Git-Url: http://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/d4b010a6dc3c999c9d3488a453ab2be1af18b6c9..e599119f0492b01f1f21a8cce8d695c314dab3b1:/m4/base.m4 diff --git a/m4/base.m4 b/m4/base.m4 index 86d6b84..fd9b811 100644 --- a/m4/base.m4 +++ b/m4/base.m4 @@ -1,4 +1,4 @@ -dnl Copyright © 2012, 2014 Nick Bowler +dnl Copyright © 2012, 2014, 2021 Nick Bowler dnl dnl Base directory handling for dxcommon. dnl @@ -60,9 +60,19 @@ AC_DEFUN_ONCE([DX_INIT], [m4_do( [_DX_SET_BASEDIR([$1])], [AC_SUBST([DX_BASEDIR])], [AC_CONFIG_COMMANDS_PRE( - [[DX_BASEDIR]="AS_ESCAPE(m4_dquote(m4_defn([_DX_BASEDIR])))"])])]) + [[DX_BASEDIR]="\${top_srcdir}/AS_ESCAPE( + m4_dquote(m4_defn([_DX_BASEDIR])))"])])]) dnl DX_BASEDIR dnl dnl This macro expands to the dxcommon base directory, as a quoted string. AC_DEFUN([DX_BASEDIR], [m4_ignore(DX_INIT())m4_defn([_DX_BASEDIR])]) + +dnl DX_RUN_LOG(command) +dnl +dnl Run a command, logging all of the command, its output, and overall +dnl exit status to config.log. The expansion of this macro is a single +dnl complex shell command suitable for use in shell conditionals. +AC_DEFUN([DX_RUN_LOG], [{ (set -x; $1;) >&AS_MESSAGE_LOG_FD 2>&1 + dx_status=$?; AS_ECHO(["\$? = $dx_status"]) >&AS_MESSAGE_LOG_FD 2>&1 + test $dx_status = 0; }])