aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2026-01-20 13:06:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2026-01-20 13:06:16 -0300
commite992c6a95939c8e1fe357bfce481e0d0c762c3c6 (patch)
tree5755e2d0ce6b8e7bbca0d7c1cebf6b51b0d7e607 /luaconf.h
parentf5d1e8639bf5df24c761602354218df21f796a30 (diff)
downloadlua-e992c6a95939c8e1fe357bfce481e0d0c762c3c6.tar.gz
lua-e992c6a95939c8e1fe357bfce481e0d0c762c3c6.tar.bz2
lua-e992c6a95939c8e1fe357bfce481e0d0c762c3c6.zip
Some compilation options configurable from makefile
Compilation options LUA_COMPAT_GLOBAL, LUA_COMPAT_LOOPVAR, and LUA_READLINELIB do not affect the API, so they can be changed through the make file.
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/luaconf.h b/luaconf.h
index f076c984..1b72e338 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -70,15 +70,19 @@
70#if defined(LUA_USE_LINUX) 70#if defined(LUA_USE_LINUX)
71#define LUA_USE_POSIX 71#define LUA_USE_POSIX
72#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ 72#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
73#if !defined(LUA_READLINELIB)
73#define LUA_READLINELIB "libreadline.so" 74#define LUA_READLINELIB "libreadline.so"
74#endif 75#endif
76#endif
75 77
76 78
77#if defined(LUA_USE_MACOSX) 79#if defined(LUA_USE_MACOSX)
78#define LUA_USE_POSIX 80#define LUA_USE_POSIX
79#define LUA_USE_DLOPEN /* macOS does not need -ldl */ 81#define LUA_USE_DLOPEN /* macOS does not need -ldl */
82#if !defined(LUA_READLINELIB)
80#define LUA_READLINELIB "libedit.dylib" 83#define LUA_READLINELIB "libedit.dylib"
81#endif 84#endif
85#endif
82 86
83 87
84#if defined(LUA_USE_IOS) 88#if defined(LUA_USE_IOS)
@@ -339,14 +343,18 @@
339/* 343/*
340@@ LUA_COMPAT_GLOBAL avoids 'global' being a reserved word 344@@ LUA_COMPAT_GLOBAL avoids 'global' being a reserved word
341*/ 345*/
342#define LUA_COMPAT_GLOBAL 346#if !defined(LUA_COMPAT_GLOBAL)
347#define LUA_COMPAT_GLOBAL 1
348#endif
343 349
344 350
345/* 351/*
346@@ LUA_COMPAT_LOOPVAR makes for-loop control variables not read-only, 352@@ LUA_COMPAT_LOOPVAR makes for-loop control variables not read-only,
347** as they were in previous versions. 353** as they were in previous versions.
348*/ 354*/
349/* #define LUA_COMPAT_LOOPVAR */ 355#if !defined(LUA_COMPAT_LOOPVAR)
356#define LUA_COMPAT_LOOPVAR 0
357#endif
350 358
351 359
352/* 360/*