projects/aports·blob master · refs

34 lines · 1.2 KiB

1diff --git a/src/luaconf.h b/src/luaconf.h
2index bdac085..a4a0d9e 100644
3--- a/src/luaconf.h
4+++ b/src/luaconf.h
5@@ -245,16 +245,28 @@
6 #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
7 #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
8
9+#define LUA_VENDOR_ROOT "/usr/"
10+/* Path for version-specific Lua modules. */
11+#define LUA_VENDOR_LDIR LUA_VENDOR_ROOT "share/lua/" LUA_VDIR "/"
12+/* Path for Lua modules that are compatible with Lua 5.1 and newer. */
13+#define LUA_VENDOR_COMMON_LDIR LUA_VENDOR_ROOT "share/lua/common/"
14+#define LUA_VENDOR_CDIR LUA_VENDOR_ROOT "lib/lua/" LUA_VDIR "/"
15+
16 #if !defined(LUA_PATH_DEFAULT)
17 #define LUA_PATH_DEFAULT \
18 LUA_LDIR "?.lua;" LUA_LDIR "?/init.lua;" \
19 LUA_CDIR "?.lua;" LUA_CDIR "?/init.lua;" \
20+ LUA_VENDOR_LDIR"?.lua;" LUA_VENDOR_LDIR"?/init.lua;" \
21+ LUA_VENDOR_CDIR"?.lua;" LUA_VENDOR_CDIR"?/init.lua;" \
22+ LUA_VENDOR_COMMON_LDIR"?.lua;" LUA_VENDOR_COMMON_LDIR"?/init.lua;" \
23 "./?.lua;" "./?/init.lua"
24 #endif
25
26 #if !defined(LUA_CPATH_DEFAULT)
27 #define LUA_CPATH_DEFAULT \
28- LUA_CDIR "?.so;" LUA_CDIR "loadall.so;" "./?.so"
29+ LUA_CDIR "?.so;" LUA_CDIR "loadall.so;" \
30+ LUA_VENDOR_CDIR "?.so;" LUA_VENDOR_CDIR "loadall.so;" \
31+ "./?.so"
32 #endif
33
34 #endif /* } */