From 44c0a8168e5fb2bd2f8292ca8966e6372e7a7c7e Mon Sep 17 00:00:00 2001 From: "Brian L. Troutwine" Date: Fri, 7 Apr 2017 01:03:15 -0700 Subject: [PATCH] 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 --- lua-source/src/Makefile | 6 +++--- lua-source/src/luaconf.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lua-source/src/Makefile b/lua-source/src/Makefile index d71c75c..46f4062 100644 --- a/lua-source/src/Makefile +++ b/lua-source/src/Makefile @@ -102,15 +102,15 @@ c89: freebsd: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" generic: $(ALL) linux: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl" macosx: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" CC=cc mingw: $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ diff --git a/lua-source/src/luaconf.h b/lua-source/src/luaconf.h index fd447cc..8536286 100644 --- a/lua-source/src/luaconf.h +++ b/lua-source/src/luaconf.h @@ -61,14 +61,12 @@ #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) #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* MacOS does not need -ldl */ -#define LUA_USE_READLINE /* needs an extra library: -lreadline */ #endif