--- lib/configure/readline.om	2007-05-14 18:38:18.000000000 +0200
+++ readline.om	2012-07-27 09:25:28.000000000 +0200
@@ -35,7 +35,7 @@
         # Test that readline exists
         if $(and $(CheckHeader readline/readline.h readline/history.h), $(CheckLib ncurses readline, tgetent tgetstr readline))
             READLINE_AVAILABLE = true
-            READLINE_CLIBS = -lncurses -lreadline
+            READLINE_CLIBS = -L$(LIBDIR) -lncurses -lreadline
             READLINE_CFLAGS += -DREADLINE_ENABLED
 
             # Test for GNU