summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/Makemodule.am
diff options
context:
space:
mode:
authorKarel Zak2015-02-27 13:57:34 +0100
committerKarel Zak2015-02-27 13:57:34 +0100
commit4310faf9507b863adf0d735564f28db5c68ca600 (patch)
treee60620d3a69b9566e9e214cc316ccf2525bc116d /libsmartcols/src/Makemodule.am
parentMerge branch 'fixes' of https://github.com/rudimeier/util-linux (diff)
downloadkernel-qcow2-util-linux-4310faf9507b863adf0d735564f28db5c68ca600.tar.gz
kernel-qcow2-util-linux-4310faf9507b863adf0d735564f28db5c68ca600.tar.xz
kernel-qcow2-util-linux-4310faf9507b863adf0d735564f28db5c68ca600.zip
lib/colors: use libtinfo to check terminal capability
The current implementation assumes that all terminals supports colors and users are forcet to use terminal-colors.d/ to disable colors for some terminals. This patch checks for maximal supported colors for the current terminal and colors are automatically disabled for terminals like vt100. The patch moves lib/colors.c from libcommon.la to libtcolors.la to avoid collisions with another utils. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/Makemodule.am')
-rw-r--r--libsmartcols/src/Makemodule.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsmartcols/src/Makemodule.am b/libsmartcols/src/Makemodule.am
index c1facad0c..49ffea65f 100644
--- a/libsmartcols/src/Makemodule.am
+++ b/libsmartcols/src/Makemodule.am
@@ -22,7 +22,7 @@ libsmartcols_la_SOURCES= \
nodist_libsmartcols_la_SOURCES = libsmartcols/src/smartcolsP.h
-libsmartcols_la_LIBADD = libcommon.la
+libsmartcols_la_LIBADD = libcommon.la libtcolors.la
libsmartcols_la_CFLAGS = \
$(SOLIB_CFLAGS) \
@@ -31,6 +31,7 @@ libsmartcols_la_CFLAGS = \
libsmartcols_la_DEPENDENCIES = \
libcommon.la \
+ libtcolors.la \
libsmartcols/src/libsmartcols.sym \
libsmartcols/src/libsmartcols.h.in
@@ -48,7 +49,7 @@ if BUILD_LIBSMARTCOLS_TESTS
check_PROGRAMS += test_smartcols
libsmartcols_tests_cflags = $(libsmartcols_la_CFLAGS)
-libsmartcols_tests_ldadd = libsmartcols.la libcommon.la
+libsmartcols_tests_ldadd = libsmartcols.la libcommon.la libtcolors.la
test_smartcols_SOURCES = libsmartcols/src/test.c
test_smartcols_CFLAGS = $(libsmartcols_tests_cflags)