From b99209cce4a91de279bb62dbc4246845bf0e755d Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 19 Nov 2001 04:18:45 +0000 Subject: Detect libreadline>=4.0, and set HAVE_NEW_LIBREADLINE. At the moment this is only to get the cast right, but it might help with other parts of the API that changed later. (This used to be commit b792c9317ab62fe407de34ed811cc883a7652cc4) --- source3/configure.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index aacad250f8..506a34d941 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -483,6 +483,15 @@ AC_ARG_WITH(readline, AC_SUBST(TERMLIBS) AC_SUBST(TERMLDFLAGS) +# The readline API changed slightly from readline3 to readline4, so +# code will generate warnings on one of them unless we have a few +# special cases. +AC_CHECK_LIB(readline, rl_completion_matches, + [AC_DEFINE(HAVE_NEW_LIBREADLINE, 1, + [Do we have rl_completion_matches?])], + [], + [$TERMLIBS]) + # The following test taken from the cvs sources # If we can't find connect, try looking in -lsocket, -lnsl, and -linet. # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has -- cgit