From 4369b052ef2e47d89487a566386a0e8faceecc1c Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 15 Aug 2009 01:18:20 +0300 Subject: [PATCH] configure: Avoid two errors if TERM=unknown http://buildd.debian-ports.org/fetch.php?pkg=elinks&arch=hurd-i386&ver=0.12%7Epre5-1&stamp=1247378205&file=log&as=raw shows two unsightly errors, apparently triggered by TERM=unknown: tput: unknown terminal "unknown" /build/buildd/elinks-0.12~pre5/configure: line 25480: test: -ge: unary operator expected Hide the first of them by redirecting to /dev/null, and avoid the second one by substituting "0" if tput fails. I'm not sure why `which tput` is used instead of plain tput, but it doesn't seem to be causing any problems in practice. (There are problems in theory if tput is not installed, tput is found in a directory whose name contains spaces, or tput is a shell function or builtin.) --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index a6e830e4..b0f8968e 100644 --- a/configure.in +++ b/configure.in @@ -1711,7 +1711,7 @@ EL_LOG_CONFIG(LIBS, [Library flags (LIBS)], []) # Colored make output # =================================================================== -if test $(`which tput` colors) -ge 4; then +if test $(`which tput` colors 2> /dev/null || echo 0) -ge 4; then MAKE_COLOR=1 AC_SUBST(MAKE_COLOR) fi