summaryrefslogtreecommitdiffstats
path: root/term-utils/Makemodule.am
diff options
context:
space:
mode:
authorKarel Zak2013-10-04 13:28:37 +0200
committerKarel Zak2013-10-04 13:28:37 +0200
commitccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3 (patch)
tree8b73970ce0050e0b3cacd84f9889771a2b44ce6d /term-utils/Makemodule.am
parentlibfdisk: cleanup warning messages (diff)
downloadkernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.tar.gz
kernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.tar.xz
kernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.zip
build-sys: use tinfo *or* ncurses for more(1), ul(1) and setterm(1)
* it seems that we don't have to link the utils with ncurses, tinfo is enough. This change saves one unnecessary dependence. * libtinfo is also distributed with pkg-config files, so we can use PKG_CHECK_MODULES() as a primary source for LIBS and CFLAGS. * add TINFO_CFLAGS (although it's probably always empty) Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/Makemodule.am')
-rw-r--r--term-utils/Makemodule.am11
1 files changed, 9 insertions, 2 deletions
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
index b1c28f2f5..e53471f23 100644
--- a/term-utils/Makemodule.am
+++ b/term-utils/Makemodule.am
@@ -28,8 +28,15 @@ if BUILD_SETTERM
usrbin_exec_PROGRAMS += setterm
dist_man_MANS += term-utils/setterm.1
setterm_SOURCES = term-utils/setterm.c
-setterm_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS)
-setterm_LDADD = $(LDADD) $(NCURSES_LIBS) $(TINFO_LIBS)
+setterm_CFLAGS = $(AM_CFLAGS)
+setterm_LDADD = $(LDADD)
+if HAVE_TINFO
+setterm_LDADD += $(TINFO_LIBS)
+setterm_CFLAGS += $(TINFO_CFLAGS)
+else
+setterm_LDADD += $(NCURSES_LIBS)
+setterm_CFLAGS += $(NCURSES_CFLAGS)
+endif
endif