summaryrefslogtreecommitdiffstats
path: root/term-utils/Makemodule.am
diff options
context:
space:
mode:
authorMike Frysinger2013-09-29 06:44:43 +0200
committerKarel Zak2013-09-30 13:41:07 +0200
commit2b8f22bd90f8074c714afaa872c314287e54a9a6 (patch)
tree10ed8a0302cbc37aa0c3e904dea6f92e6ae7ce1b /term-utils/Makemodule.am
parentsetterm: fix term.h/ncurses.h include ordering (diff)
downloadkernel-qcow2-util-linux-2b8f22bd90f8074c714afaa872c314287e54a9a6.tar.gz
kernel-qcow2-util-linux-2b8f22bd90f8074c714afaa872c314287e54a9a6.tar.xz
kernel-qcow2-util-linux-2b8f22bd90f8074c714afaa872c314287e54a9a6.zip
clean up term lib handling
The ncurses package has been providing pkg-config files for a while now. So let's start using them to get the proper linker & compiler flags. It can make a difference when ncurses is configured in a way that requires extra link time flags but util-linux doesn't provide them, or when the headers live in a weird place and util-linux can't find them. Since the NCURSES_LIBS is always defined for the Makefile, there's no need to gate on the HAVE_NCURSES conditional. When it's disabled, the var will simply be empty. With a minor tweak to how tinfo is handled, we can do the same thing -- we just always use TINFO_LIBS in the Makefile's. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'term-utils/Makemodule.am')
-rw-r--r--term-utils/Makemodule.am7
1 files changed, 2 insertions, 5 deletions
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
index 470987344..b1c28f2f5 100644
--- a/term-utils/Makemodule.am
+++ b/term-utils/Makemodule.am
@@ -28,11 +28,8 @@ if BUILD_SETTERM
usrbin_exec_PROGRAMS += setterm
dist_man_MANS += term-utils/setterm.1
setterm_SOURCES = term-utils/setterm.c
-if HAVE_TINFO
-setterm_LDADD = $(LDADD) -ltinfo
-else
-setterm_LDADD = $(LDADD) @NCURSES_LIBS@
-endif
+setterm_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS)
+setterm_LDADD = $(LDADD) $(NCURSES_LIBS) $(TINFO_LIBS)
endif