mail[Wesnoth-commits] r44916 - in /trunk: configure.ac src/Makefile.am src/ai/lua/core.cpp src/scripting/lua.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 30, 2010 - 10:03:
Author: silene
Date: Fri Jul 30 10:03:12 2010
New Revision: 44916

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44916&view=rev
Log:
Switched to embedded Lua.

Modified:
    trunk/configure.ac
    trunk/src/Makefile.am
    trunk/src/ai/lua/core.cpp
    trunk/src/scripting/lua.cpp

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=44916&r1=44915&r2=44916&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Jul 30 10:03:12 2010
@@ -858,19 +858,6 @@
 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                           #
 #######################################################################
 found_notifications=no

Modified: trunk/src/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/Makefile.am?rev=44916&r1=44915&r2=44916&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Jul 30 10:03:12 2010
@@ -340,8 +340,8 @@
        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 @@
 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.

Modified: trunk/src/ai/lua/core.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/lua/core.cpp?rev=44916&r1=44915&r2=44916&view=diff
==============================================================================
--- trunk/src/ai/lua/core.cpp (original)
+++ trunk/src/ai/lua/core.cpp Fri Jul 30 10:03:12 2010
@@ -18,10 +18,8 @@
  *
  */
 
-extern "C" {
-#include <lualib.h>
-#include <lauxlib.h>
-}
+#include "lua/lualib.h"
+#include "lua/lauxlib.h"
 
 #include <cassert>
 #include <cstring>

Modified: trunk/src/scripting/lua.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/scripting/lua.cpp?rev=44916&r1=44915&r2=44916&view=diff
==============================================================================
--- trunk/src/scripting/lua.cpp (original)
+++ trunk/src/scripting/lua.cpp Fri Jul 30 10:03:12 2010
@@ -30,10 +30,8 @@
  *   - luaW_ functions are helpers in Lua style.
  */
 
-extern "C" {
-#include <lualib.h>
-#include <lauxlib.h>
-}
+#include "lua/lualib.h"
+#include "lua/lauxlib.h"
 
 #include <cassert>
 #include <cstring>




Related Messages


Powered by MHonArc, Updated Fri Jul 30 10:20:15 2010