--- Makefile.orig	2008-02-10 13:08:21.000000000 +0100
+++ Makefile	2008-02-10 13:08:21.000000000 +0100
@@ -33,7 +33,7 @@
 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
 
 # Convenience platforms targets.
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris linux_wo_readline
 
 # What to install.
 TO_BIN= lua luac
--- src/Makefile.orig	2008-02-10 13:08:21.000000000 +0100
+++ src/Makefile	2008-02-10 13:08:21.000000000 +0100
@@ -107,8 +107,11 @@
 	$(MAKE) all MYCFLAGS=
 
 linux:
-	$(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
+	$(MAKE) all MYCFLAGS+="-DLUA_USE_LINUX -DLUA_USE_READLINE" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
 
+linux_wo_readline:
+	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl"
+	
 macosx:
 	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
 # use this on Mac OS X 10.3-
--- src/luaconf.h.orig	2008-01-18 18:07:48.000000000 +0100
+++ src/luaconf.h	2008-02-10 13:08:21.000000000 +0100
@@ -36,7 +36,6 @@
 #if defined(LUA_USE_LINUX)
 #define LUA_USE_POSIX
 #define LUA_USE_DLOPEN		/* needs an extra library: -ldl */
-#define LUA_USE_READLINE	/* needs some extra libraries */
 #endif
 
 #if defined(LUA_USE_MACOSX)
