From beab003e41199640664c80bbeb04cad2eefc6b59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Thu, 22 Apr 2010 21:39:43 +0200
Subject: Don't compile LibXML if Expat was found.


diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index e1e8e24..ee42e57 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -284,21 +284,22 @@ if env["PLATFORM"] == "darwin" :
 	conf.Finish()
 
 # LibXML
-conf = Configure(conf_env)
-if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :
-	env["HAVE_LIBXML"] = 1
-	env["LIBXML_FLAGS"] = { "LIBS": ["xml2"] }
-conf.Finish()
-
-if not env.get("HAVE_LIBXML", 0) :
-	libxml_env = conf_env.Clone()
-	libxml_env.Append(CPPPATH = ["/usr/include/libxml2"])
-	conf = Configure(libxml_env)
+if not env.get("HAVE_EXPAT", False) :
+	conf = Configure(conf_env)
 	if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :
 		env["HAVE_LIBXML"] = 1
-		env["LIBXML_FLAGS"] = { "CPPPATH": ["/usr/include/libxml2"], "LIBS": ["xml2"] }
+		env["LIBXML_FLAGS"] = { "LIBS": ["xml2"] }
 	conf.Finish()
 
+	if not env.get("HAVE_LIBXML", 0) :
+		libxml_env = conf_env.Clone()
+		libxml_env.Append(CPPPATH = ["/usr/include/libxml2"])
+		conf = Configure(libxml_env)
+		if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :
+			env["HAVE_LIBXML"] = 1
+			env["LIBXML_FLAGS"] = { "CPPPATH": ["/usr/include/libxml2"], "LIBS": ["xml2"] }
+		conf.Finish()
+
 # Bundled expat
 bundledExpat = False
 if not env.get("HAVE_EXPAT", 0) :
-- 
cgit v0.10.2-6-g49f6