author | francesco-ST <francesco.abbate@st.com> | 2011年02月01日 13:04:45 +0100 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2011年02月01日 13:04:45 +0100 |
commit | bd2c1b886cfe9b69a2f8491e700d00639303f798 (patch) | |
tree | d611836e71a8676e750a244f0cb749da405ed490 | |
parent | 90cd68ed973eeefae9e04b7ced38b0a079618501 (diff) | |
download | gsl-shell-bd2c1b886cfe9b69a2f8491e700d00639303f798.tar.gz |
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | lua/src/luaconf.h | 26 |
@@ -75,7 +75,7 @@ ifeq ($(strip $(DEBUG)), yes) endif C_SRC_FILES += gsl-shell.c -SUBDIRS_DEFS += -DGSL_SHELL_LUA # -DLUA_ROOT=$(PREFIX) +SUBDIRS_DEFS += -DGSL_SHELL_LUA -DLUA_ROOT=$(PREFIX) TARGETS = $(GSL_SHELL) ifeq ($(strip $(ENABLE_AGG_PLOT)), yes) diff --git a/lua/src/luaconf.h b/lua/src/luaconf.h index e2cb2616..6905db77 100644 --- a/lua/src/luaconf.h +++ b/lua/src/luaconf.h @@ -8,6 +8,9 @@ #ifndef lconfig_h #define lconfig_h +#define QUOTEME_(x) #x +#define QUOTEME(x) QUOTEME_(x) + #include <limits.h> #include <stddef.h> @@ -80,6 +83,27 @@ ** 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" + +#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" +#endif +#else #if defined(_WIN32) /* ** In Windows, any exclamation mark ('!') in the path is replaced by the @@ -103,7 +127,7 @@ #define LUA_CPATH_DEFAULT \ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" #endif - +#endif /* @@ LUA_DIRSEP is the directory separator (for submodules). |