diff options
author | Alexey Neyman <stilor@att.net> | 2018-04-29 22:04:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 22:04:23 (GMT) |
commit | 5c24106d3b6ddb5229874a74e3cfe0059fa8ce8d (patch) | |
tree | 6ae4685ef53ec2b10593fe19fc1397bc8619f311 /m4/ctng_log.m4 | |
parent | 51f0e7c649a84c66ce0111703498dc4466e35562 (diff) | |
parent | 74979fb19b2c7220dab4196c0d34e0c29b341b09 (diff) |
Merge pull request #953 from stilor/docker-testing2
Docker configuration for Gentoo + a bunch of fixes
Diffstat (limited to 'm4/ctng_log.m4')
-rw-r--r-- | m4/ctng_log.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/m4/ctng_log.m4 b/m4/ctng_log.m4 new file mode 100644 index 0000000..3f1428c --- /dev/null +++ b/m4/ctng_log.m4 @@ -0,0 +1,29 @@ +# CTNG_MSG_LOG(MSG) +# Log the MSG message to config.log +AC_DEFUN([CTNG_MSG_LOG], + [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"]) >&AS_MESSAGE_LOG_FD]) + +# CTNG_MSG_LOG_CMD(CMD, [DESC]) +# Log the output of a command CMD to config.log, prepending the +# description DESC. +AC_DEFUN([CTNG_MSG_LOG_CMD], + [AS_IF([test -n "AS_ESCAPE([$2])"], + [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$2]):"]) >&AS_MESSAGE_LOG_FD], + [AS_ECHO(["$as_me:${as_lineno-$LINENO}: output from command '$1':"]) >&AS_MESSAGE_LOG_FD]) + $1 | sed 's/^/| /' >&AS_MESSAGE_LOG_FD]) + +# CTNG_MSG_LOG_ENVVAR(VAR, [DESC]) +# Log the contents of an environment variable VAR to config.log, prepending the +# description DESC. +AC_DEFUN([CTNG_MSG_LOG_ENVVAR], + [AS_IF([test -n "AS_ESCAPE([$2])"], + [CTNG_MSG_LOG_CMD([AS_ECHO(["$$1"])], [$2])], + [CTNG_MSG_LOG_CMD([AS_ECHO(["$$1"])], [variable $1 is set to])])]) + +# CTNG_MSG_LOG_FILE(FILE, [DESC]) +# Log the contents of a file FILE to config.log, prepending the +# description DESC. +AC_DEFUN([CTNG_MSG_LOG_FILE], + [AS_IF([test -n "AS_ESCAPE([$2])"], + [CTNG_MSG_LOG_CMD([cat $1], [$2])], + [CTNG_MSG_LOG_CMD([cat $1], [contents of $1])])]) |