From 6d74e548e9e748007f6541dbcb0ed148e572332e Mon Sep 17 00:00:00 2001
From: Thilo Cestonaro <thilo@cestona.ro>
Date: Thu, 25 Aug 2011 14:47:52 +0200
Subject: fix compilation on ubuntu 11.10 (e.g. for gcc 4.6)

License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php

diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index cc052ca..88a195a 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -203,7 +203,7 @@ if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
 				"LIBS": gconf_bare_env["LIBS"],
 				"CCFLAGS": gconf_bare_env["CCFLAGS"],
 				"CPPPATH": gconf_bare_env["CPPPATH"],
-				"CPPDEFINES": gconf_bare_env["CPPDEFINES"],
+				"CPPDEFINES": gconf_bare_env.get("CPPDEFINES", []),
 			}
 		gconf_env.MergeFlags(gconf_flags)
 		if conf.CheckCHeader("gconf/gconf-client.h") and conf.CheckLib("gconf-2") :
@@ -212,7 +212,7 @@ if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
 				"LIBS": gconf_env["LIBS"],
 				"CCFLAGS": gconf_env["CCFLAGS"],
 				"CPPPATH": gconf_env["CPPPATH"],
-				"CPPDEFINES": gconf_env["CPPDEFINES"],
+				"CPPDEFINES": gconf_env.get("CPPDEFINES", []),
 			}
 	conf.Finish()
 
diff --git a/Swiftob/SConscript b/Swiftob/SConscript
index 43c4819..bb056bb 100644
--- a/Swiftob/SConscript
+++ b/Swiftob/SConscript
@@ -3,9 +3,9 @@ Import("env")
 
 if env["SCONS_STAGE"] == "build":
 	myenv = env.Clone()
+	myenv.MergeFlags(myenv.get("LUA_FLAGS", {}))
 	myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
 	myenv.MergeFlags(myenv["SWIFTEN_DEP_FLAGS"])
-	myenv.MergeFlags(myenv.get("LUA_FLAGS", {}))
 	sources = [
 		"linit.cpp",
 		"Swiftob.cpp",
-- 
cgit v0.10.2-6-g49f6