Skip to content

Commit 6fcd35f

Browse files
author
Brian L. Troutwine
committed
Remove readline from lua
The cernan use-case for lua is one that does not use readline. On systems that attempt to statically linked cernan against MUSL libc the readline dependency breaks the build on account of the difficulty of building readline in that environment. I could not determine if there were a cleaner way to disable readline other than but permanently. That is, maybe this approach is a hack. I _think_ disabling readline is okay here as the focus of the library appears to be the use of lua in a purely embedded environment. Signed-off-by: Brian L. Troutwine <blt@postmates.com>
1 parent d92ff39 commit 6fcd35f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lua-source/src/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ c89:
102102

103103

104104
freebsd:
105-
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
105+
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX"
106106

107107
generic: $(ALL)
108108

109109
linux:
110-
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
110+
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
111111

112112
macosx:
113-
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
113+
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" CC=cc
114114

115115
mingw:
116116
$(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \

lua-source/src/luaconf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@
6161
#if defined(LUA_USE_LINUX)
6262
#define LUA_USE_POSIX
6363
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
64-
#define LUA_USE_READLINE /* needs some extra libraries */
6564
#endif
6665

6766

6867
#if defined(LUA_USE_MACOSX)
6968
#define LUA_USE_POSIX
7069
#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
71-
#define LUA_USE_READLINE /* needs an extra library: -lreadline */
7270
#endif
7371

7472

0 commit comments

Comments
 (0)