Re: readline problems

Magnus Lie Hetland <[email protected]> Mon, 30 Dec 2002 00:50:31 +0100
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
Magnus Lie Hetland <[email protected]>:
>
[snip]
> > It would be a good learning experience. :-)
> 
> Heh. My learning experiences with autotools so far have been -- shall
> we say, "interesting". :]
> 
> I'll take a look, but I expect I won't get far.

Wouldn't you know -- it wasn't really that hard:

AC_TRY_CPP([#include <readline/readline.h>],
have_readline=yes, have_readline=no)
if test $have_readline = yes
then
  AC_EGREP_HEADER([extern int rl_completion_append_character;],
  [readline/readline.h],
  AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1))
fi

After putting this somewhere in configure.in it should only be a
matter of inserting the #ifdef's you talked about, referring to
HAVE_RL_COMPLETION_APPEND_CHARACTER. (I assume rl_prep_terminal is
linked to rl_completion_append_character in terms of versions here.)

-- 
Magnus Lie Hetland
http://hetland.org