diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-08-16 18:54:15 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-08-16 22:13:30 (GMT) |
commit | 3f489e625589d6523b082e534f9ab71f1d9c3cbd (patch) | |
tree | 2c6f5382a7186cdce500642c9faeccf859b903a4 /SConstruct | |
parent | 9ed3516fc091010637b7eba3678a1566507c59eb (diff) | |
download | swift-contrib-3f489e625589d6523b082e534f9ab71f1d9c3cbd.zip swift-contrib-3f489e625589d6523b082e534f9ab71f1d9c3cbd.tar.bz2 |
Add LibXML support to build system.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -162,13 +162,29 @@ 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"] = "" - env.Append(LIBS = ["expat"]) + env["EXPAT_FLAGS"] = { "LIBS": ["expat"] } 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 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) : |