diff options
author | Mike Frysinger | 2013-09-29 06:44:43 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-30 13:41:07 +0200 |
commit | 2b8f22bd90f8074c714afaa872c314287e54a9a6 (patch) | |
tree | 10ed8a0302cbc37aa0c3e904dea6f92e6ae7ce1b /text-utils/Makemodule.am | |
parent | setterm: fix term.h/ncurses.h include ordering (diff) | |
download | kernel-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 'text-utils/Makemodule.am')
-rw-r--r-- | text-utils/Makemodule.am | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/text-utils/Makemodule.am b/text-utils/Makemodule.am index d3ebfdc5b..a2b6fe9b2 100644 --- a/text-utils/Makemodule.am +++ b/text-utils/Makemodule.am @@ -53,11 +53,8 @@ if BUILD_PG usrbin_exec_PROGRAMS += pg dist_man_MANS += text-utils/pg.1 pg_SOURCES = text-utils/pg.c -pg_CFLAGS = $(AM_CFLAGS) $(BSD_WARN_CFLAGS) -pg_LDADD = $(LDADD) libcommon.la @NCURSES_LIBS@ -if HAVE_TINFO -pg_LDADD += -ltinfo -endif +pg_CFLAGS = $(AM_CFLAGS) $(BSD_WARN_CFLAGS) $(NCURSES_CFLAGS) +pg_LDADD = $(LDADD) libcommon.la $(NCURSES_LIBS) $(TINFO_LIBS) endif # BUILD_PG @@ -65,12 +62,8 @@ if BUILD_UL usrbin_exec_PROGRAMS += ul dist_man_MANS += text-utils/ul.1 ul_SOURCES = text-utils/ul.c -ul_LDADD = $(LDADD) -if HAVE_TINFO -ul_LDADD += -ltinfo -else -ul_LDADD += @NCURSES_LIBS@ -endif +ul_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS) +ul_LDADD = $(LDADD) $(NCURSES_LIBS) $(TINFO_LIBS) endif # BUILD_UL @@ -78,17 +71,11 @@ if BUILD_MORE bin_PROGRAMS += more dist_man_MANS += text-utils/more.1 more_SOURCES = text-utils/more.c -more_CFLAGS = $(AM_CFLAGS) $(BSD_WARN_CFLAGS) -more_LDADD = $(LDADD) -if HAVE_TINFO -more_LDADD += -ltinfo -else -if HAVE_NCURSES -more_LDADD += @NCURSES_LIBS@ -else +more_CFLAGS = $(AM_CFLAGS) $(BSD_WARN_CFLAGS) $(NCURSES_CFLAGS) +more_LDADD = $(LDADD) $(NCURSES_LIBS) $(TINFO_LIBS) +if HAVE_TERMCAP more_LDADD += -ltermcap endif -endif check_PROGRAMS += test_more test_more_SOURCES = $(more_SOURCES) |