mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 15:12:30 +00:00
chore(lua): Use PACKAGE_DATADIR and AM_CPPFLAGS
This commit is contained in:
+1
-1
@@ -196,4 +196,4 @@ libsub_root_a_SOURCES = \
|
|||||||
thread_worker.h
|
thread_worker.h
|
||||||
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)
|
AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -DPACKAGE_DATADIR=\"$(pkgdatadir)\"
|
||||||
|
|||||||
+2
-2
@@ -23,12 +23,12 @@
|
|||||||
|
|
||||||
namespace rpc {
|
namespace rpc {
|
||||||
|
|
||||||
|
#ifdef HAVE_LUA
|
||||||
|
|
||||||
const int LuaEngine::flag_string;
|
const int LuaEngine::flag_string;
|
||||||
const std::string LuaEngine::module_name = "rtorrent";
|
const std::string LuaEngine::module_name = "rtorrent";
|
||||||
const std::string LuaEngine::local_path = LUA_DATADIR "/?.lua;" LUA_DATADIR "/?/init.lua";
|
const std::string LuaEngine::local_path = LUA_DATADIR "/?.lua;" LUA_DATADIR "/?/init.lua";
|
||||||
|
|
||||||
#ifdef HAVE_LUA
|
|
||||||
|
|
||||||
LuaEngine::LuaEngine() {
|
LuaEngine::LuaEngine() {
|
||||||
m_luaState = luaL_newstate();
|
m_luaState = luaL_newstate();
|
||||||
luaL_openlibs(m_luaState);
|
luaL_openlibs(m_luaState);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_LUA
|
#ifdef HAVE_LUA
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
|
#define LUA_DATADIR PACKAGE_DATADIR "/lua"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace rpc {
|
namespace rpc {
|
||||||
|
|||||||
Reference in New Issue
Block a user