diff --git a/src/Makefile.am b/src/Makefile.am index 9dee76b5..6b2f1c9a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -196,4 +196,4 @@ libsub_root_a_SOURCES = \ thread_worker.h -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) +AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -DPACKAGE_DATADIR=\"$(pkgdatadir)\" diff --git a/src/rpc/lua.cc b/src/rpc/lua.cc index e998eb51..d0ba44b3 100644 --- a/src/rpc/lua.cc +++ b/src/rpc/lua.cc @@ -23,12 +23,12 @@ namespace rpc { +#ifdef HAVE_LUA + const int LuaEngine::flag_string; const std::string LuaEngine::module_name = "rtorrent"; const std::string LuaEngine::local_path = LUA_DATADIR "/?.lua;" LUA_DATADIR "/?/init.lua"; -#ifdef HAVE_LUA - LuaEngine::LuaEngine() { m_luaState = luaL_newstate(); luaL_openlibs(m_luaState); diff --git a/src/rpc/lua.h b/src/rpc/lua.h index 584dc38d..f171f751 100644 --- a/src/rpc/lua.h +++ b/src/rpc/lua.h @@ -6,6 +6,7 @@ #ifdef HAVE_LUA #include +#define LUA_DATADIR PACKAGE_DATADIR "/lua" #endif namespace rpc {