From bb20653c48391199eda22469a4ac37f4f81ce460 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.) (cherry picked from elinks-0.12 commit 4369b052ef2e47d89487a566386a0e8faceecc1c) --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index d0f5749a..023af06d 100644 --- a/configure.in +++ b/configure.in @@ -1792,7 +1792,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