lua.c loads 'readline' dynamically

(See comments in luaconf.h.) This change allows easier compilation,
as Lua compiles and works even if the package 'readline' is absent
from the system. Moreover, non-interactive uses don't load the library,
making the stand-alone slightly faster for small loads.
This commit is contained in:
Roberto Ierusalimschy
2024-07-04 17:11:58 -03:00
parent 781219dbe1
commit 366c855648
4 changed files with 90 additions and 29 deletions

View File

@@ -70,9 +70,9 @@ LOCAL = $(TESTS) $(CWARNS)
# enable Linux goodies
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
MYLDFLAGS= $(LOCAL) -Wl,-E
MYLIBS= -ldl -lreadline
MYLIBS= -ldl
CC= gcc