Skip to content
Permalink
Browse files

Add a fallback to the old behaviour in case pkg-config didn't know an…

…ything about ncurses
  • Loading branch information
kripton committed Mar 17, 2020
1 parent 2022d7d commit 548b62a962ea3c6720686aa24f3569713fd7cc11
Showing with 8 additions and 1 deletion.
  1. +1 −0 configure.ac
  2. +7 −1 examples/Makefile.mk
@@ -446,6 +446,7 @@ 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])
AM_CONDITIONAL([HAVE_NCURSES_PKGCONFIG], [test "$libncurses_LIBS" != ""])

# pthread
ACX_PTHREAD([
@@ -91,9 +91,15 @@ 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) $(libncurses_LIBS)
examples_ola_dmxmonitor_SOURCES = examples/ola-dmxmonitor.cpp
if HAVE_NCURSES_PKGCONFIG
examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS)
examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS)
else
# Fallback when pkg-config didn't know about ncurses
examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses
examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses
endif
endif

noinst_PROGRAMS += examples/ola_throughput examples/ola_latency

0 comments on commit 548b62a

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