mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
lua: detect if static or dynamic linking is wanted
This commit is contained in:
@@ -110,6 +110,7 @@ PKG_CHECK_MODULES([LUA], [lua >= 5.2], echo "lua >= 5.2 found", [
|
|||||||
PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], echo "lua5.2 found", [
|
PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], echo "lua5.2 found", [
|
||||||
echo "=> lualib not found, assuming static lua in linker path..."
|
echo "=> lualib not found, assuming static lua in linker path..."
|
||||||
LUA_LIBS="-llua -ldl"
|
LUA_LIBS="-llua -ldl"
|
||||||
|
AC_DEFINE(STATIC_LUAPOSIX,1,[Define to 1 for static lua build.])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@@ -347,7 +347,7 @@ const luaL_Reg CLuaInstance::methods[] =
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef DYNAMIC_LUAPOSIX
|
#ifdef STATIC_LUAPOSIX
|
||||||
/* hack: we link against luaposix, which is included in our
|
/* hack: we link against luaposix, which is included in our
|
||||||
* custom built lualib */
|
* custom built lualib */
|
||||||
extern "C" { LUAMOD_API int (luaopen_posix_c) (lua_State *L); }
|
extern "C" { LUAMOD_API int (luaopen_posix_c) (lua_State *L); }
|
||||||
@@ -384,7 +384,7 @@ void CLuaInstance::registerFunctions()
|
|||||||
luaopen_io(lua);
|
luaopen_io(lua);
|
||||||
luaopen_string(lua);
|
luaopen_string(lua);
|
||||||
luaopen_math(lua);
|
luaopen_math(lua);
|
||||||
#ifndef DYNAMIC_LUAPOSIX
|
#ifdef STATIC_LUAPOSIX
|
||||||
luaopen_posix_c(lua);
|
luaopen_posix_c(lua);
|
||||||
#else
|
#else
|
||||||
dolibrary(lua,"posix");
|
dolibrary(lua,"posix");
|
||||||
|
Reference in New Issue
Block a user