summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/m4/_colorize_result_prepare.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/m4/_colorize_result_prepare.m4 b/tool/m4/_colorize_result_prepare.m4
index 292155f113..af572caa18 100644
--- a/tool/m4/_colorize_result_prepare.m4
+++ b/tool/m4/_colorize_result_prepare.m4
@@ -1,7 +1,13 @@
# -*- Autoconf -*-
AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
- AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
+ AS_CASE(["x${CONFIGURE_TTY}"],
+ [xyes|xalways],[rb_cv_configure_tty=1],
+ [xno|xnever], [rb_cv_configure_tty=0],
+ [AS_IF([test -t 1],
+ [rb_cv_configure_tty=1],
+ [rb_cv_configure_tty=0])])
+ AS_IF([test $rb_cv_configure_tty -eq 1], [
msg_begin="`tput smso 2>/dev/null`"
AS_CASE(["$msg_begin"], ['@<:@'*m],
[msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"