mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
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 4369b052ef
)
This commit is contained in:
parent
87eac68dc3
commit
bb20653c48
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user