From 2e817711bcfc8076b2500ab298e281357ed50115 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 15 Apr 2002 11:19:32 +0000 Subject: [PATCH] Fix rl_attempted_completion_over --- client/client.c | 9 +++++---- configure.in | 11 ++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/client.c b/client/client.c index ff43888..f472260 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.149 2002-04-13 18:09:01 adam Exp $ + * $Id: client.c,v 1.150 2002-04-15 11:19:32 adam Exp $ */ #include @@ -89,11 +89,12 @@ static QueryType queryType = QueryType_Prefix; static CCL_bibset bibset; /* CCL bibset handle */ #endif -#if HAVE_READLINE_READLINE_H -#ifndef RL_READLINE_VERSION +#if HAVE_READLINE_COMPLETION_OVER + +#else +/* readline doesn't have this var. Define it ourselves. */ int rl_attempted_completion_over = 0; #endif -#endif /* set this one to 1, to avoid decode of unknown MARCs */ #define AVOID_MARC_DECODE 1 diff --git a/configure.in b/configure.in index 7dce624..b7469a7 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2001 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.69 2002-04-14 21:27:47 adam Exp $ +dnl $Id: configure.in,v 1.70 2002-04-15 11:19:32 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.8.7) dnl @@ -135,6 +135,15 @@ AC_CHECK_LIB(readline, readline, [READLINE_LIBS="$READLINE_LIBS -lreadline $READ AC_CHECK_LIB(history, add_history, [READLINE_LIBS="$READLINE_LIBS -lhistory"]) if test "$ac_cv_lib_readline_readline" = "yes"; then AC_CHECK_HEADERS(readline/readline.h readline/history.h) + OLDLIBS=$LIBS + LIBS="$LIBS $READLINE_LIBS" + AC_TRY_LINK([#include ],[ + static void f() + { + rl_attempted_completion_over = 0; + } + ],AC_DEFINE(HAVE_READLINE_COMPLETION_OVER)) + LIBS=$OLDLIBS fi dnl ------ various functions AC_CHECK_FUNCS(vsnprintf gettimeofday poll) -- 1.7.10.4