configure: Avoid two errors if TERM=unknown
commit4369b052ef2e47d89487a566386a0e8faceecc1c
authorKalle Olavi Niemitalo <kon@iki.fi>
Fri, 14 Aug 2009 22:18:20 +0000 (15 01:18 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Fri, 14 Aug 2009 22:59:09 +0000 (15 01:59 +0300)
tree6b305cf7252b3f88557acd8020eeeeebf0a46a63
parentc9f487cdf44c97948559d882f7b59e37b51cd7af
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