git » lua.git » main » tree

[main] / paths.patch

diff --git a/src/luaconf.h b/src/luaconf.h
--- a/src/luaconf.h	2023-05-03 06:02:30.000000000 +1000
+++ b/src/luaconf.h	2023-12-13 12:24:30.287727037 +1100
@@ -224,19 +224,28 @@
 #else			/* }{ */
 
 #define LUA_ROOT	"/usr/local/"
+#define LUA_ROOT2	"/usr/"
 #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR "/"
+#define LUA_LDIR2	LUA_ROOT2 "share/lua/" LUA_VDIR "/"
 #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR "/"
+#define LUA_CDIR2	LUA_ROOT2 "lib/lua/" LUA_VDIR "/"
 
 #if !defined(LUA_PATH_DEFAULT)
 #define LUA_PATH_DEFAULT  \
 		LUA_LDIR"?.lua;"  LUA_LDIR"?/init.lua;" \
+		LUA_LDIR2"?.lua;"  LUA_LDIR2"?/init.lua;" \
 		LUA_CDIR"?.lua;"  LUA_CDIR"?/init.lua;" \
+		LUA_CDIR2"?.lua;"  LUA_CDIR2"?/init.lua;" \
 		"./?.lua;" "./?/init.lua"
 #endif
 
 #if !defined(LUA_CPATH_DEFAULT)
 #define LUA_CPATH_DEFAULT \
-		LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
+		LUA_CDIR"?.so;" \
+		LUA_CDIR2"?.so;" \
+		LUA_CDIR"loadall.so;" \
+		LUA_CDIR2"loadall.so;" \
+		"./?.so"
 #endif
 
 #endif			/* } */