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