replace libeditline with libedit
This commit is contained in:
@@ -6,18 +6,6 @@ dnl
|
||||
dnl el_init
|
||||
|
||||
AC_DEFUN([KRB_READLINE],[
|
||||
AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
|
||||
if test "$ac_cv_func_el_init" = yes ; then
|
||||
AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
|
||||
#include <histedit.h>]],
|
||||
[[el_init("", NULL, NULL, NULL);]])],
|
||||
[ac_cv_func_el_init_four=yes],
|
||||
[ac_cv_func_el_init_four=no])])
|
||||
if test "$ac_cv_func_el_init_four" = yes; then
|
||||
AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl readline
|
||||
|
||||
@@ -25,18 +13,15 @@ ac_foo=no
|
||||
build_editline=no
|
||||
if test "$with_readline" = yes; then
|
||||
:
|
||||
elif test "$with_libedit" = yes; then
|
||||
LIB_readline="${LIB_libedit}"
|
||||
elif test "$ac_cv_func_readline" = yes; then
|
||||
:
|
||||
elif test "$ac_cv_func_el_init" = yes; then
|
||||
ac_foo=yes
|
||||
build_editline=yes
|
||||
LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)"
|
||||
else
|
||||
build_editline=yes
|
||||
LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)"
|
||||
build_libedit=yes
|
||||
LIB_readline="\$(top_builddir)/lib/libedit/src/libheimedit.la \$(LIB_tgetent)"
|
||||
fi
|
||||
AM_CONDITIONAL(EDITLINE, test "$build_editline" = yes)
|
||||
AM_CONDITIONAL(el_compat, test "$ac_foo" = yes)
|
||||
AM_CONDITIONAL(LIBEDIT, test "$build_libedit" = yes)
|
||||
AC_DEFINE(HAVE_READLINE, 1,
|
||||
[Define if you have a readline compatible library.])dnl
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs,
|
||||
dnl default locations, conditional, config-program)
|
||||
dnl default locations, conditional, config-program, headers)
|
||||
|
||||
AC_DEFUN([rk_TEST_PACKAGE],[
|
||||
AC_ARG_WITH($1,
|
||||
@@ -91,6 +91,7 @@ if test "$with_$1" != no; then
|
||||
if test "$[]$1_cflags" -a "$[]$1_libs"; then
|
||||
CFLAGS="$[]$1_cflags $save_CFLAGS"
|
||||
LIBS="$[]$1_libs $save_LIBS"
|
||||
m4_ifval([$8],[AC_CHECK_HEADERS([[$8]])])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[
|
||||
INCLUDE_$1="$[]$1_cflags"
|
||||
LIB_$1="$[]$1_libs"
|
||||
@@ -101,6 +102,7 @@ if test "$with_$1" != no; then
|
||||
ires= lres=
|
||||
for i in $header_dirs; do
|
||||
CFLAGS="-I$i $save_CFLAGS"
|
||||
m4_ifval([$8],[AC_CHECK_HEADERS([[$8]])])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[ires=$i;break])
|
||||
done
|
||||
for i in $lib_dirs; do
|
||||
|
Reference in New Issue
Block a user