mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
* configure.in: Add --with-readline flag.
* configure: Rebuilt.
This commit is contained in:
parent
d77fb593b6
commit
29860306e9
2 changed files with 301 additions and 273 deletions
40
configure.in
40
configure.in
|
@ -98,23 +98,33 @@ for termlib in ncurses termcap ; do
|
|||
AC_CHECK_LIB(${termlib}, tgoto,
|
||||
[LIBS="-l${termlib} $LIBS"; break])
|
||||
done
|
||||
AC_CHECK_LIB(readline, main)
|
||||
AC_CHECK_FUNCS(rl_clear_signals rl_cleanup_after_signal)
|
||||
|
||||
AC_CACHE_CHECK([for rl_getc_function pointer in readline],
|
||||
ac_cv_var_rl_getc_function,
|
||||
[AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>],
|
||||
[rl_getc_function;],
|
||||
[ac_cv_var_rl_getc_function=yes],
|
||||
[ac_cv_var_rl_getc_function=no])])
|
||||
if test "$ac_cv_var_rl_getc_function" = "yes"; then
|
||||
AC_DEFINE(HAVE_RL_GETC_FUNCTION)
|
||||
fi
|
||||
AC_ARG_WITH([readline],
|
||||
[ --with-readline use Readline library for command-line editing],
|
||||
[], [with_readline=yes])
|
||||
|
||||
if test "x$with_readline" = "xyes"; then
|
||||
AC_CHECK_LIB(readline, main)
|
||||
AC_CHECK_FUNCS(rl_clear_signals rl_cleanup_after_signal)
|
||||
|
||||
AC_CACHE_CHECK([for rl_getc_function pointer in readline],
|
||||
ac_cv_var_rl_getc_function,
|
||||
[AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>],
|
||||
[rl_getc_function;],
|
||||
[ac_cv_var_rl_getc_function=yes],
|
||||
[ac_cv_var_rl_getc_function=no])])
|
||||
if test "${ac_cv_var_rl_getc_function}" = "yes"; then
|
||||
AC_DEFINE(HAVE_RL_GETC_FUNCTION)
|
||||
fi
|
||||
|
||||
if test $ac_cv_lib_readline_main = yes \
|
||||
-a $ac_cv_var_rl_getc_function = no; then
|
||||
AC_MSG_WARN([Warning: libreadline is too old on your system. You need])
|
||||
AC_MSG_WARN([readline version 2.1 or later.])
|
||||
fi
|
||||
|
||||
if test $ac_cv_lib_readline_main = yes -a $ac_cv_var_rl_getc_function = no; then
|
||||
echo 'Warning: libreadline is too old on your system. Need >= 2.1.'
|
||||
fi
|
||||
|
||||
# Checks for dynamic linking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue