From ae4735f621d89d84758769b76432d2319dda9827 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 15 Aug 2024 00:38:43 +0200 Subject: Reflect override of INSTALL_LJLIBD in package.path. Suggested by GitSparTV. #1239 --- src/Makefile | 3 +++ src/luaconf.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 224d21e7..43238912 100644 --- a/src/Makefile +++ b/src/Makefile @@ -299,6 +299,9 @@ endif ifneq (,$(LMULTILIB)) TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" endif +ifneq (,$(INSTALL_LJLIBD)) + TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\" +endif ############################################################################## # Target system detection. diff --git a/src/luaconf.h b/src/luaconf.h index f47f0680..1cf3a03c 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -37,7 +37,6 @@ #endif #define LUA_LROOT "/usr/local" #define LUA_LUADIR "/lua/5.1/" -#define LUA_LJDIR "/luajit-2.1/" #ifdef LUA_ROOT #define LUA_JROOT LUA_ROOT @@ -51,7 +50,11 @@ #define LUA_RCPATH #endif -#define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua" +#ifndef LUA_LJDIR +#define LUA_LJDIR LUA_JROOT "/share/luajit-2.1" +#endif + +#define LUA_JPATH ";" LUA_LJDIR "/?.lua" #define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR #define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR #define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua" -- cgit v1.2.3-55-g6feb