Skip to content
Permalink
Browse files

Use pkg-info to detect library flags to link against ncurses

  • Loading branch information
kripton committed Mar 15, 2020
1 parent 79ca37d commit 7471f2ebe902b7a70c1a1dadd9e026f29abc1746
Showing with 5 additions and 2 deletions.
  1. +3 −0 configure.ac
  2. +2 −2 examples/Makefile.mk
@@ -437,6 +437,9 @@ AM_CONDITIONAL([HAVE_LIBFTD2XX], [test "x$have_libftd2xx" = xyes])
AC_CHECK_HEADERS([curses.h ncurses/curses.h])
AC_CHECK_LIB([ncurses], [initscr], [have_ncurses="yes"])
AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncurses" = xyes])
# Defines libncurses_LIBS that we can use to link against ncurses
# Needed since >=ncurses-6 where -ltinfo is needed in addition to -lncurses
PKG_CHECK_MODULES(libncurses, [ncurses >= 5])

# pthread
ACX_PTHREAD([
@@ -91,9 +91,9 @@ examples_ola_uni_stats_LDADD = $(EXAMPLE_COMMON_LIBS)
if HAVE_NCURSES
bin_PROGRAMS += examples/ola_dmxconsole examples/ola_dmxmonitor
examples_ola_dmxconsole_SOURCES = examples/ola-dmxconsole.cpp
examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses
examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS)
examples_ola_dmxmonitor_SOURCES = examples/ola-dmxmonitor.cpp
examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses
examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS)
endif

noinst_PROGRAMS += examples/ola_throughput examples/ola_latency

0 comments on commit 7471f2e

Please sign in to comment.
You can’t perform that action at this time.