diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-19 18:15:25 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-19 18:15:25 (GMT) |
commit | 4f5a6af54be1486517a7825e71b41c3bdab8f31e (patch) | |
tree | 8adb1c33475a4105d78c10e9a3ba1d6788f798f5 /BuildTools/SCons/SConstruct | |
parent | 3a7c72e4d4ef968f87425b3394eb5e2aa7882e20 (diff) | |
download | swift-contrib-4f5a6af54be1486517a7825e71b41c3bdab8f31e.zip swift-contrib-4f5a6af54be1486517a7825e71b41c3bdab8f31e.tar.bz2 |
Give LibXML priority over Expat.
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r-- | BuildTools/SCons/SConstruct | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index ce47b08..abe8860 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -264,11 +264,6 @@ if conf.CheckLib("c") : if conf.CheckLib("resolv") : env.Append(LIBS = ["resolv"]) -# Expat -if conf.CheckCHeader("expat.h") and conf.CheckLib("expat") : - env["HAVE_EXPAT"] = 1 - env["EXPAT_FLAGS"] = { "LIBS": ["expat"] } - # LibIDN if conf.CheckCHeader("idna.h") and conf.CheckLib("idn") : env["LIBIDN_FLAGS"] = { "LIBS": ["idn"] } @@ -342,21 +337,27 @@ if env["PLATFORM"] == "darwin" : conf.Finish() # LibXML -if not env.get("HAVE_EXPAT", False) : - conf = Configure(conf_env) +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 conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") : env["HAVE_LIBXML"] = 1 - env["LIBXML_FLAGS"] = { "LIBS": ["xml2"] } + env["LIBXML_FLAGS"] = { "CPPPATH": ["/usr/include/libxml2"], "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() +# Expat +conf = Configure(conf_env) +if not env.get("HAVE_LIBXML",0) and conf.CheckCHeader("expat.h") and conf.CheckLib("expat") : + env["HAVE_EXPAT"] = 1 + env["EXPAT_FLAGS"] = { "LIBS": ["expat"] } +conf.Finish() # Bundled expat bundledExpat = False |