summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-22 19:39:43 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-22 19:39:43 (GMT)
commitbeab003e41199640664c80bbeb04cad2eefc6b59 (patch)
treea186c7a0fba023d45e0dad7f79b401dd61197c80
parent6838ea0d6e566050b49f8aff46bda85442945826 (diff)
downloadswift-beab003e41199640664c80bbeb04cad2eefc6b59.zip
swift-beab003e41199640664c80bbeb04cad2eefc6b59.tar.bz2
Don't compile LibXML if Expat was found.
-rw-r--r--BuildTools/SCons/SConstruct23
1 files changed, 12 insertions, 11 deletions
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) :