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>