From ddac531cdf1b4613c6e17463b73b7ef7755647e0 Mon Sep 17 00:00:00 2001 From: joq Date: Sun, 8 Jun 2003 14:22:26 +0000 Subject: [PATCH] check readline() library dependencies git-svn-id: svn+ssh://jackaudio.org/trunk/jack@412 0c269be4-1314-0410-8aa9-9f06e86f4224 --- configure.in | 9 ++++++++- example-clients/Makefile.am | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 9cd4147..ad23922 100644 --- a/configure.in +++ b/configure.in @@ -247,10 +247,17 @@ if test x$HAVE_SNDFILE = xfalse; then AC_MSG_WARN([*** the jackrec example client will not be built]) fi -AC_CHECK_LIB(readline, readline, [HAVE_READLINE=true], [HAVE_READLINE=false]) +# on some systems, readline depends on termcap or ncurses, respectively +READLINE_DEPS="" +AC_CHECK_LIB(termcap, tgetent, [READLINE_DEPS="$READLINE_DEPS -ltermcap"]) +AC_CHECK_LIB(ncurses, tgetent, [READLINE_DEPS="$READLINE_DEPS -lncurses"]) +AC_CHECK_LIB(readline, readline, + [HAVE_READLINE=true], [HAVE_READLINE=false], [$READLINE_DEPS] +) if test x$HAVE_READLINE = xfalse; then AC_MSG_WARN([*** the jack_transport example client will not be built]) fi +AC_SUBST(READLINE_DEPS) # you need doxygen to make dist. AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) diff --git a/example-clients/Makefile.am b/example-clients/Makefile.am index 6895c28..ae24c2e 100644 --- a/example-clients/Makefile.am +++ b/example-clients/Makefile.am @@ -82,7 +82,7 @@ endif if HAVE_READLINE jack_transport_SOURCES = transport.c -jack_transport_LDFLAGS = -lhistory -lreadline -lrt -ldl -lpthread +jack_transport_LDFLAGS = -lhistory -lreadline @READLINE_DEPS@ -lrt -ldl -lpthread jack_transport_LDADD = ../libjack/libjack.la endif