$NetBSD: patch-ad,v 1.2 2000/04/16 08:56:16 mycroft Exp $ --- configure.in.orig Sat Jan 1 23:05:50 2000 +++ configure.in Sun Apr 16 04:44:17 2000 @@ -47,22 +47,26 @@ AC_SUBST(GMP_SUBDIRS) AC_SUBST(GMP_LIBS) -AC_CHECK_LIB(ncurses, tgetent, LIBS="-lncurses $LIBS" termcap=yes, - AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes, - termcap=no)) +AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes, + termcap=no) if test "$termcap" = yes; then AC_CHECK_HEADERS(termcap.h) AC_DEFINE(HAVE_LIBTERMCAP) fi -AC_CHECK_LIB(readline, readline) -if test "$ac_cv_lib_readline_readline" = yes; then - AC_CHECK_HEADERS(readline/readline.h) - AC_CHECK_LIB(readline, add_history, history=yes, +AC_CHECK_LIB(edit, readline, readlinelib=edit have_readline=yes, + AC_CHECK_LIB(readline, readline, readlinelib=readline have_readline=yes, + readline=no)) +if test "$have_readline" = yes; then + LIBS="-l$readlinelib $LIBS" + AC_CHECK_HEADERS(readline.h readline/readline.h) + AC_DEFINE(HAVE_LIBREADLINE) + AC_CHECK_LIB($readlinelib, tilde_expand, AC_DEFINE(HAVE_TILDE_EXPAND)) + AC_CHECK_LIB($readlinelib, add_history, history=yes, AC_CHECK_LIB(history, add_history, LIBS="-lhistory" history=yes, history=no)) if test "$history" = yes; then - AC_CHECK_HEADERS(readline/history.h) + AC_CHECK_HEADERS(history.h readline/history.h) AC_DEFINE(HAVE_LIBHISTORY) fi fi