diff --git a/configure.ac b/configure.ac index de515ed48dd..fe80b4e1443 100644 --- a/configure.ac +++ b/configure.ac @@ -857,19 +857,6 @@ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" CFLAGS="$CFLAGS $ZLIB_CFLAGS" LIBS="$LIBS $ZLIB_LIBS" -####################################################################### -# Check for Lua # -####################################################################### - -PKG_CHECK_MODULES(LUA, [lua >= 5.1], , [ - AC_MSG_RESULT([no]) - PKG_CHECK_MODULES(LUA, [lua5.1 >= 5.1], , [ - AC_MSG_RESULT([no]) - PKG_CHECK_MODULES(LUA, [lua-5.1 >= 5.1]) - ])]) -CPPFLAGS="$CPPFLAGS $LUA_CFLAGS" -LIBS="$LIBS $LUA_LIBS" - ####################################################################### # Check for different notifications systems # ####################################################################### diff --git a/src/Makefile.am b/src/Makefile.am index bdeb66f549e..166ee79f1d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -340,8 +340,8 @@ wesnoth_SOURCES = \ game.cpp \ $(wesnoth_source) -wesnoth_LDADD = $(INTERNALLIBS) $(THELIBS) $(PANGO_LIBS) $(FONTCONFIG_LIBS) -wesnoth_DEPENDENCIES=libwesnoth-core.a libwesnoth.a +wesnoth_LDADD = $(INTERNALLIBS) $(THELIBS) $(PANGO_LIBS) $(FONTCONFIG_LIBS) lua/liblua.a +wesnoth_DEPENDENCIES=libwesnoth-core.a libwesnoth.a lua/liblua.a if ANA wesnoth_LDADD += $(BOOST_SYSTEM_LIBS) $(BOOST_THREAD_LIBS) -lana wesnoth_DEPENDENCIES += libana.a @@ -557,6 +557,9 @@ libana_a_SOURCES = \ CXXFLAGS += -Iana/api endif +lua/liblua.a: + $(MAKE) -C lua/ a CC="$(CXX)" + # Until game_config.cpp is removed, this will be needed to ensure that the # REVISION constant gets updated correctly. If and when that definition is # moved elsewhere, this dependency must follow it. diff --git a/src/ai/lua/core.cpp b/src/ai/lua/core.cpp index 95a2d30868c..da01ca4bc42 100644 --- a/src/ai/lua/core.cpp +++ b/src/ai/lua/core.cpp @@ -18,10 +18,8 @@ * */ -extern "C" { -#include -#include -} +#include "lua/lualib.h" +#include "lua/lauxlib.h" #include #include diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 1a87c509040..b3590b2a2cf 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -30,10 +30,8 @@ * - luaW_ functions are helpers in Lua style. */ -extern "C" { -#include -#include -} +#include "lua/lualib.h" +#include "lua/lauxlib.h" #include #include