summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Limber/SConscript3
-rw-r--r--QA/UnitTest/SConscript3
-rw-r--r--SConstruct20
-rw-r--r--Slimber/Cocoa/SConscript2
-rw-r--r--Slimber/Qt/SConscript3
-rw-r--r--Swift/QtUI/SConscript3
-rw-r--r--Swiften/SConscript3
7 files changed, 30 insertions, 7 deletions
diff --git a/Limber/SConscript b/Limber/SConscript
index 77e0c50..7d8c849 100644
--- a/Limber/SConscript
+++ b/Limber/SConscript
@@ -3,7 +3,8 @@ Import("env")
myenv = env.Clone()
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
-myenv.MergeFlags(env["EXPAT_FLAGS"])
+myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.MergeFlags(env["OPENSSL_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript
index 505b633..095ef68 100644
--- a/QA/UnitTest/SConscript
+++ b/QA/UnitTest/SConscript
@@ -11,7 +11,8 @@ if "check" in COMMAND_LINE_TARGETS or env.GetOption("clean") :
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["SQLITE_FLAGS"])
- myenv.MergeFlags(env["EXPAT_FLAGS"])
+ myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+ myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.MergeFlags(env["ZLIB_FLAGS"])
checker = myenv.Program("checker", ["checker.cpp"] + env["UNITTEST_SOURCES"])
for i in ["HOME", "USERPROFILE", "APPDATA"]:
diff --git a/SConstruct b/SConstruct
index af4d153..283cc12 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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) :
diff --git a/Slimber/Cocoa/SConscript b/Slimber/Cocoa/SConscript
index 25d7579..a354bc8 100644
--- a/Slimber/Cocoa/SConscript
+++ b/Slimber/Cocoa/SConscript
@@ -5,6 +5,8 @@ myenv.MergeFlags(env["SLIMBER_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
+myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.Append(FRAMEWORKS = "Cocoa")
myenv.Program("Slimber", [
diff --git a/Slimber/Qt/SConscript b/Slimber/Qt/SConscript
index de2e910..b2b8320 100644
--- a/Slimber/Qt/SConscript
+++ b/Slimber/Qt/SConscript
@@ -9,7 +9,8 @@ myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["CPPUNIT_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
-myenv.MergeFlags(env["EXPAT_FLAGS"])
+myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"])
myenv.Tool("nsis", toolpath = ["#/BuildTools/SCons/Tools"])
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 7a955bf..384dcd4 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -25,9 +25,10 @@ myenv.MergeFlags(env["CPPUNIT_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["SQLITE_FLAGS"])
-myenv.MergeFlags(env["EXPAT_FLAGS"])
myenv.MergeFlags(env["ZLIB_FLAGS"])
myenv.MergeFlags(env["OPENSSL_FLAGS"])
+myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"])
myenv.Tool("nsis", toolpath = ["#/BuildTools/SCons/Tools"])
diff --git a/Swiften/SConscript b/Swiften/SConscript
index a9cc1c1..4a4ad86 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -9,7 +9,8 @@ myenv = env.Clone()
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["SQLITE_FLAGS"])
-myenv.MergeFlags(env["EXPAT_FLAGS"])
+myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
+myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.MergeFlags(env["ZLIB_FLAGS"])
myenv.MergeFlags(env["OPENSSL_FLAGS"])