diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-07 21:07:20 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-07 21:07:20 (GMT) |
commit | fe8e3d918ef5893c67a6dc47512667f42ca720d2 (patch) | |
tree | 39b34b495c32d071e63e812019424dafde0f5bf6 /configure.in | |
parent | 39cdfff69161c3f1299172e8cbb4dc1a871e3931 (diff) | |
download | cpython-fe8e3d918ef5893c67a6dc47512667f42ca720d2.zip cpython-fe8e3d918ef5893c67a6dc47512667f42ca720d2.tar.gz cpython-fe8e3d918ef5893c67a6dc47512667f42ca720d2.tar.bz2 |
If there is no libtermcap all the readline tests failed.
This inappropriately disabled some capabilities which exist.
Now test for readline in -lreadline, if not found there, try it
in -ltermcap only if not in -lreadline. If both libraries are
required, there will need to be more work, but I'm not sure
under what conditions both libraries would be required.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.in b/configure.in index acd0168..db2bf52 100644 --- a/configure.in +++ b/configure.in @@ -2871,10 +2871,17 @@ then [Define this if you have flockfile(), getc_unlocked(), and funlockfile()]) fi +# check where readline lives +AC_CHECK_LIB(readline, readline) +if test "$ac_cv_have_readline_readline" = no +then + AC_CHECK_LIB(termcap, readline) +fi + # check for readline 2.1 AC_CHECK_LIB(readline, rl_callback_handler_install, AC_DEFINE(HAVE_RL_CALLBACK, 1, - [Define if you have readline 2.1]), , -ltermcap) + [Define if you have readline 2.1]), , ) # check for readline 2.2 AC_TRY_CPP([#include <readline/readline.h>], @@ -2890,12 +2897,12 @@ fi # check for readline 4.0 AC_CHECK_LIB(readline, rl_pre_input_hook, AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1, - [Define if you have readline 4.0]), , -ltermcap) + [Define if you have readline 4.0]), , ) # check for readline 4.2 AC_CHECK_LIB(readline, rl_completion_matches, AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, - [Define if you have readline 4.2]), , -ltermcap) + [Define if you have readline 4.2]), , ) # also in readline 4.2 AC_TRY_CPP([#include <readline/readline.h>], |