summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-01-20 14:13:30 +0100
committerMartin Mares <mj@ucw.cz>2000-01-20 14:13:30 +0100
commit7211be1cffdee84fd15e8b6b2a07a644948f1455 (patch)
tree1a5a56054e5212cff23442bc39eddd4f916b9640 /configure.in
parent9fac310d1a4e46f4bcc70177e59cbf93763ef479 (diff)
downloadbird-7211be1cffdee84fd15e8b6b2a07a644948f1455.tar
bird-7211be1cffdee84fd15e8b6b2a07a644948f1455.zip
Configure, link and use the readline library.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 1e1fdba..579c6bd 100644
--- a/configure.in
+++ b/configure.in
@@ -134,12 +134,19 @@ else
AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
fi
+CLIENT=
+CLIENT_LIBS=
if test "$enable_client" = yes ; then
CLIENT=client
-else
- CLIENT=
+ AC_CHECK_LIB(history, add_history, CLIENT_LIBS="-lhistory")
+ AC_CHECK_LIB(ncurses, tgetent, USE_TERMCAP_LIB=-lncurses,
+ AC_CHECK_LIB(curses, tgetent, USE_TERMCAP_LIB=-lcurses,
+ AC_CHECK_LIB(termcap, tgetent, USE_TERMCAP_LIB=-ltermcap)))
+ AC_CHECK_LIB(readline, readline, CLIENT_LIBS="-lreadline $CLIENT_LIBS $USE_TERMCAP_LIB",
+ AC_MSG_ERROR([[The client requires GNU readline library. Either install the library or use --disable-client to compile without the client.]]), $USE_TERMCAP_LIB)
fi
AC_SUBST(CLIENT)
+AC_SUBST(CLIENT_LIBS)
mkdir -p $objdir/sysdep
AC_CONFIG_HEADER($objdir/sysdep/autoconf.h:sysdep/autoconf.h.in)