Find ncurses from pkg-config if possible, and prefer separate libtinfo

Recent ncurses can be configured --with-termlib, which splits out the
terminfo-level functions from libncurses into a separate libtinfo.
This allows us to avoid an unnecessary dependency on libncurses.  (We
already avoided this on distributions that link with -Wl,--as-needed.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

Closes #128 github pull request.
This commit is contained in:
Anders Kaseorg
2012-03-22 18:25:15 -04:00
committed by Keith Winstein
parent fd0ddf0e22
commit 9cec566cd1
4 changed files with 15 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(BOOST_CPPFLAGS) $(protobuf_CFLAGS) $(poll_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(BOOST_CPPFLAGS) $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(poll_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) -fno-default-inline -pipe
LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a $(poll_LIBS) -lm $(protobuf_LIBS)
LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a $(poll_LIBS) -lm $(TINFO_LIBS) $(protobuf_LIBS)
if COND_THIRD_LIBSTDDJB
AM_CPPFLAGS += -I$(top_srcdir)/third/libstddjb
LDADD += $(top_builddir)/third/libstddjb/libstddjb.a