From 2b8f22bd90f8074c714afaa872c314287e54a9a6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 29 Sep 2013 00:44:43 -0400 Subject: 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 --- misc-utils/Makemodule.am | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'misc-utils') diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am index fcfec7bac..70bb33988 100644 --- a/misc-utils/Makemodule.am +++ b/misc-utils/Makemodule.am @@ -10,19 +10,11 @@ if !HAVE_LANGINFO cal_SOURCES += lib/langinfo.c endif -cal_LDADD = $(LDADD) libcommon.la - -if HAVE_TINFO -cal_LDADD += -ltinfo @NCURSES_LIBS@ -else -if HAVE_NCURSES -cal_LDADD += @NCURSES_LIBS@ -else +cal_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS) +cal_LDADD = $(LDADD) libcommon.la $(NCURSES_LIBS) $(TINFO_LIBS) if HAVE_TERMCAP cal_LDADD += -ltermcap endif -endif # !HAVE_NCURSES -endif # !HAVE_TINFO usrbin_exec_PROGRAMS += logger -- cgit v1.2.3-55-g7522