--- configure.ac.sav	2005-08-23 17:17:47.000000000 -0400
+++ configure.ac	2005-08-23 17:20:05.000000000 -0400
@@ -1046,17 +1046,17 @@
 
 dnl ** (Mac OS X only: check for GMP.framework)
 HaveFrameworkGMP=NO
-if test $HostPlatform = "powerpc-apple-darwin"; then
- AC_MSG_CHECKING([for GMP.framework])
- save_libs="$LIBS"
- LIBS="-framework GMP"
- AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
- if test $HaveFrameworkGMP = YES; then
-  AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
- fi;
- LIBS="$save_libs"
- AC_MSG_RESULT([$HaveFrameworkGMP])
-fi;
+dnl if test $HostPlatform = "powerpc-apple-darwin"; then
+dnl  AC_MSG_CHECKING([for GMP.framework])
+dnl save_libs="$LIBS"
+dnl LIBS="-framework GMP"
+dnl AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
+dnl if test $HaveFrameworkGMP = YES; then
+dnl  AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
+dnl fi;
+dnl LIBS="$save_libs"
+dnl AC_MSG_RESULT([$HaveFrameworkGMP])
+dnl fi;
 AC_SUBST(HaveFrameworkGMP)
 
 dnl ** check for mingwex library
@@ -1088,12 +1088,12 @@
 
 if test $HaveLibTermcap = YES ; then
   LIBS="-l$LibTermcap $LIBS"
-  AC_CHECK_LIB(readline, readline, HaveLibReadline=YES, HaveLibReadline=NO)
+  AC_CHECK_LIB(readline.5, readline, HaveLibReadline=YES, HaveLibReadline=NO)
 fi
 
 if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES ; then
   AC_DEFINE([HAVE_READLINE_LIBS], [1], [Define to 1 if readline plus any additional libs needed for it exist.])
-  LibsReadline="readline $LibTermcap"
+  LibsReadline="readline.5 $LibTermcap"
 else
   AC_DEFINE([HAVE_READLINE_LIBS], [0], [Define to 1 if readline plus any additional libs needed for it exist.])
   LibsReadline=
@@ -1101,10 +1101,10 @@
 AC_SUBST(LibsReadline)
 
 if test "$HaveLibReadline"; then
-  AC_CHECK_LIB(readline, rl_erase_empty_line,
+  AC_CHECK_LIB(readline.5, 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_CHECK_LIB(readline, rl_free_undo_list,
+  AC_CHECK_LIB(readline.5, 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.])])
 else
