diff options
Diffstat (limited to 'src/luaconf.h')
-rw-r--r-- | src/luaconf.h | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/src/luaconf.h b/src/luaconf.h index d55caab1..224bfada 100644 --- a/src/luaconf.h +++ b/src/luaconf.h | |||
@@ -23,26 +23,40 @@ | |||
23 | ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" | 23 | ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" |
24 | #else | 24 | #else |
25 | /* | 25 | /* |
26 | ** Note to distribution maintainers: do NOT patch the following line! | 26 | ** Note to distribution maintainers: do NOT patch the following lines! |
27 | ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. | 27 | ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. |
28 | */ | 28 | */ |
29 | #define LUA_ROOT "/usr/local/" | 29 | #ifndef LUA_MULTILIB |
30 | #define LUA_LDIR LUA_ROOT "share/lua/5.1/" | 30 | #define LUA_MULTILIB "lib" |
31 | #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" | 31 | #endif |
32 | #ifdef LUA_XROOT | 32 | #ifndef LUA_LMULTILIB |
33 | #define LUA_JDIR LUA_XROOT "share/luajit-2.0.2/" | 33 | #define LUA_LMULTILIB "lib" |
34 | #define LUA_XPATH \ | 34 | #endif |
35 | ";" LUA_XROOT "share/lua/5.1/?.lua;" LUA_XROOT "share/lua/5.1/?/init.lua" | 35 | #define LUA_LROOT "/usr/local" |
36 | #define LUA_XCPATH LUA_XROOT "lib/lua/5.1/?.so;" | 36 | #define LUA_LUADIR "/lua/5.1/" |
37 | #define LUA_LJDIR "/luajit-2.0.2/" | ||
38 | |||
39 | #ifdef LUA_ROOT | ||
40 | #define LUA_JROOT LUA_ROOT | ||
41 | #define LUA_RLDIR LUA_ROOT "/share" LUA_LUADIR | ||
42 | #define LUA_RCDIR LUA_ROOT "/" LUA_MULTILIB LUA_LUADIR | ||
43 | #define LUA_RLPATH ";" LUA_RLDIR "?.lua;" LUA_RLDIR "?/init.lua" | ||
44 | #define LUA_RCPATH ";" LUA_RCDIR "?.so" | ||
37 | #else | 45 | #else |
38 | #define LUA_JDIR LUA_ROOT "share/luajit-2.0.2/" | 46 | #define LUA_JROOT LUA_LROOT |
39 | #define LUA_XPATH | 47 | #define LUA_RLPATH |
40 | #define LUA_XCPATH | 48 | #define LUA_RCPATH |
41 | #endif | 49 | #endif |
42 | #define LUA_PATH_DEFAULT \ | 50 | |
43 | "./?.lua;" LUA_JDIR"?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua" LUA_XPATH | 51 | #define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua" |
44 | #define LUA_CPATH_DEFAULT \ | 52 | #define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR |
45 | "./?.so;" LUA_CDIR"?.so;" LUA_XCPATH LUA_CDIR"loadall.so" | 53 | #define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR |
54 | #define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua" | ||
55 | #define LUA_LCPATH1 ";" LUA_LCDIR "?.so" | ||
56 | #define LUA_LCPATH2 ";" LUA_LCDIR "loadall.so" | ||
57 | |||
58 | #define LUA_PATH_DEFAULT "./?.lua" LUA_JPATH LUA_LLPATH LUA_RLPATH | ||
59 | #define LUA_CPATH_DEFAULT "./?.so" LUA_LCPATH1 LUA_RCPATH LUA_LCPATH2 | ||
46 | #endif | 60 | #endif |
47 | 61 | ||
48 | /* Environment variable names for path overrides and initialization code. */ | 62 | /* Environment variable names for path overrides and initialization code. */ |