On Oct 30, 2006, at 2:40 PM, Deborah Goldsmith wrote:
I think I have this partially figured out.

The following patch to libraries/readline/configure.ac seems to do the trick for Darwin:

--- configure.ac.save   2006-10-10 12:09:04.000000000 -0700
+++ configure.ac        2006-11-02 17:32:50.000000000 -0800
@@ -43,7 +43,10 @@
dnl ** is our readline really readline, or is it BSD's libedit?
if test x"$HaveLibReadline" = xYES ; then
- AC_CHECK_LIB(readline, rl_readline_version, ReadlineIsLibedit=NO, ReadlineIsLibedit=YES) + AC_CHECK_DECL(rl_readline_version, ReadlineIsLibedit=NO, ReadlineIsLibedit=YES,
+[#include <stdio.h>
+#include <readline/readline.h>
+])
fi
if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES && test x"$ReadlineIsLibedit" = xNO ; then
@@ -56,9 +59,12 @@
AC_SUBST(READLINE_LIBS)
if test x"$HaveLibReadline" = xYES && test x"$ReadlineIsLibedit" = xNO ; then
-  AC_CHECK_LIB(readline, rl_erase_empty_line,
+  AC_CHECK_DECL(rl_erase_empty_line,
[AC_DEFINE([HAVE_READLINE_4], [1], [Define to 1 if readline has version >= 4.0.])], - [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has version >= 4.0.])]) + [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has version >= 4.0.])],
+[#include <stdio.h>
+#include <readline/readline.h>
+])
   AC_CHECK_LIB(readline, rl_free_undo_list,
[AC_DEFINE([HAVE_READLINE_4_2], [1], [Define to 1 if readline has version >= 4.2.])], [AC_DEFINE([HAVE_READLINE_4_2], [0], [Define to 1 if readline has version >= 4.2.])])

When I build with this patch after configuring to look for GNU readline in /usr/local, everything works. I don't know if this particular patch will work well on other systems. Maybe folks could try it out?

Thanks,
Deborah

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to