]> git.meshlink.io Git - meshlink/commitdiff
Only compile the monitor example application if ncurses is available.
authorGuus Sliepen <guus@meshlink.io>
Wed, 16 Jan 2019 18:10:20 +0000 (19:10 +0100)
committerGuus Sliepen <guus@meshlink.io>
Wed, 16 Jan 2019 18:10:20 +0000 (19:10 +0100)
configure.ac
examples/.gitignore
examples/Makefile.am

index 275bf5f138cbbf54f6f2e1fd9763cf177e80b8d4..2309d358e2920ae90aaec8709860647d4e299271 100644 (file)
@@ -96,6 +96,10 @@ PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1.0], [cmocka=true], [cmocka=false])
 PKG_CHECK_MODULES([LXC], [lxc >= 2.0.0], [lxc=true], [lxc=false])
 AM_CONDITIONAL(BLACKBOX_TESTS, test "$cmocka" = true -a "$lxc" = true)
 
+dnl Additional example code
+PKG_CHECK_MODULES([NCURSES], [ncurses >= 5], [curses=true], [curses=false])
+AM_CONDITIONAL(CURSES, test "$curses" = true)
+
 dnl Install test binaries
 AC_ARG_ENABLE([install_tests],
   [AS_HELP_STRING([--enable-install-tests], [include test binaries in installation])],
index a1f84221846e4e57d20406546847290152162ae7..681b8897a97bc093ffb899ea96eb62a53e5a14c6 100644 (file)
@@ -4,3 +4,4 @@ chat
 chatpp
 manynodes
 meshlinkapp
+monitor
index 9ce812d2df1287fc542f9eb41f0ed1b86398693a..9243cafbaafa8392bf3e86fe6f03809eb263fc8d 100644 (file)
@@ -18,5 +18,7 @@ manynodes_LDADD = ${top_builddir}/src/libmeshlink.la
 channels_SOURCES = channels.c
 channels_LDADD = ${top_builddir}/src/libmeshlink.la
 
+if CURSES
 monitor_SOURCES = monitor.c
-monitor_LDADD = ${top_builddir}/src/libmeshlink.la -lcurses -lm
+monitor_LDADD = ${top_builddir}/src/libmeshlink.la $(NCURSES_LIBS) -lm
+endif