gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--lua/src/luaconf.h 48
-rw-r--r--luajit2/src/luaconf.h 37
-rw-r--r--makedefs 3
3 files changed, 25 insertions, 63 deletions
diff --git a/lua/src/luaconf.h b/lua/src/luaconf.h
index 6905db77..50a8046d 100644
--- a/lua/src/luaconf.h
+++ b/lua/src/luaconf.h
@@ -83,50 +83,30 @@
** hierarchy or if you want to install your libraries in
** non-conventional directories.
*/
-#ifdef GSL_SHELL_LUA
-#if defined(_WIN32)
-/*
-** In Windows, any exclamation mark ('!') in the path is replaced by the
-** path of the directory of the executable file of the current process.
-*/
-#define GSL_SHELL_CDIR "!\\"
-#define LUA_PATH_DEFAULT \
- ".\\?.lua;" GSL_SHELL_CDIR"?.lua;" GSL_SHELL_CDIR"?\\init.lua"
-#define LUA_CPATH_DEFAULT \
- ".\\?.dll;" GSL_SHELL_CDIR"?.dll;" GSL_SHELL_CDIR"loadall.dll"
-
+/* Default path for loading Lua and C modules with require(). */
+#ifndef LUA_STRICT
+ #define STDLIB_NAME "gsl-shell"
#else
-#define LUA_ROOT_Q QUOTEME(LUA_ROOT) "/"
-#define GSL_SHELL_CDIR LUA_ROOT_Q "lib/gsl-shell/"
-#define LUA_PATH_DEFAULT \
- "./?.lua;" GSL_SHELL_CDIR"?.lua;" GSL_SHELL_CDIR"?/init.lua"
-#define LUA_CPATH_DEFAULT \
- "./?.so;" GSL_SHELL_CDIR"?.so;" GSL_SHELL_CDIR"loadall.so"
+ #define STDLIB_NAME "lua/5.1"
#endif
-#else
#if defined(_WIN32)
/*
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
*/
-#define LUA_LDIR "!\\lua\\"
+#define LUA_LDIR "!\\" STDLIB_NAME "\\"
#define LUA_CDIR "!\\"
-#define LUA_PATH_DEFAULT \
- ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua"
+#define LUA_PATH_DEFAULT \
+ ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;"
#define LUA_CPATH_DEFAULT \
- ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
-
+ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
-#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
-#define LUA_PATH_DEFAULT \
- "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
-#define LUA_CPATH_DEFAULT \
- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
-#endif
+#define LUA_ROOT_Q QUOTEME(LUA_ROOT) "/"
+#define LUA_LDIR LUA_ROOT_Q "share/" STDLIB_NAME "/"
+#define LUA_CDIR LUA_ROOT_Q "lib/" STDLIB_NAME "/"
+#define LUA_PATH_DEFAULT "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua" \
+ ";" LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
+#define LUA_CPATH_DEFAULT "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
#endif
/*
diff --git a/luajit2/src/luaconf.h b/luajit2/src/luaconf.h
index 3cd5b93e..ae5dd118 100644
--- a/luajit2/src/luaconf.h
+++ b/luajit2/src/luaconf.h
@@ -25,16 +25,16 @@
#endif
/* Default path for loading Lua and C modules with require(). */
+#ifndef LUA_STRICT
+ #define STDLIB_NAME "gsl-shell"
+#else
+ #define STDLIB_NAME "lua/5.1"
+#endif
#ifdef LUA_USE_WIN
/*
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
*/
- #ifdef GSL_SHELL_LUA
- #define STDLIB_NAME "gsl-shell"
- #else
- #define STDLIB_NAME "lua"
- #endif
#define LUA_LDIR "!\\" STDLIB_NAME "\\"
#define LUA_CDIR "!\\"
#define LUA_PATH_DEFAULT \
@@ -42,33 +42,12 @@
#define LUA_CPATH_DEFAULT \
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
- #ifdef GSL_SHELL_LUA
- #define STDLIB_NAME "gsl-shell"
- #else
- #define STDLIB_NAME "lua/5.1"
- #endif
#define LUA_ROOT_Q QUOTEME(LUA_ROOT) "/"
#define LUA_LDIR LUA_ROOT_Q "share/" STDLIB_NAME "/"
#define LUA_CDIR LUA_ROOT_Q "lib/" STDLIB_NAME "/"
-#ifdef LUA_XROOT
-#define LUA_JDIR LUA_XROOT "share/luajit-2.0.0-beta5/"
-#define LUA_XPATH \
- ";" LUA_XROOT "share/" STDLIB_NAME "/?.lua;" LUA_XROOT "share/" STDLIB_NAME "/?/init.lua"
-#define LUA_XCPATH LUA_XROOT "lib/" STDLIB_NAME "/?.so;"
-#else
-#define LUA_JDIR LUA_ROOT_Q "share/luajit-2.0.0-beta5/"
-#define LUA_XPATH
-#define LUA_XCPATH
-#endif
- #ifdef GSL_SHELL_LUA
- #define LUA_PATH_DEFAULT "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua"
- #define LUA_CPATH_DEFAULT "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
- #else
- #define LUA_PATH_DEFAULT \
- "./?.lua;" LUA_JDIR"?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua" LUA_XPATH
- #define LUA_CPATH_DEFAULT \
- "./?.so;" LUA_CDIR"?.so;" LUA_XCPATH LUA_CDIR"loadall.so"
- #endif
+#define LUA_PATH_DEFAULT "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua" \
+ ";" LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
+#define LUA_CPATH_DEFAULT "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
#endif
/* Environment variable names for path overrides and initialization code. */
diff --git a/makedefs b/makedefs
index 5bfcf94e..f6cf85b0 100644
--- a/makedefs
+++ b/makedefs
@@ -38,3 +38,6 @@ ifeq ($(strip $(ENABLE_AGG_PLOT)), yes)
DEFS += -DDISABLE_GAMMA_CORR
endif
endif
+
+DEFS += -DLUA_ROOT="$(PREFIX)"
+
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月27日 09:55:24 +0000

AltStyle によって変換されたページ (->オリジナル) /