--- configure.orig	Fri Dec  3 19:42:32 2004
+++ configure	Sat Dec  4 10:17:24 2004
@@ -20385,7 +20385,7 @@
 
 fi
 if test "$found" = "no"; then
-  for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
+  for dir in ${prefix} /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
     as_ac_File=`echo "ac_cv_file_$dir/include/readline.h" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $dir/include/readline.h" >&5
 echo $ECHO_N "checking for $dir/include/readline.h... $ECHO_C" >&6
