diff options
Diffstat (limited to 'BuildTools/SCons')
-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 |