From 65656b483fb72582a88784f20d0ad21ffefa6b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sat, 6 Nov 2010 18:14:13 +0100 Subject: Make expat libname a config option. diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 136c7ed..fb90d69 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -35,8 +35,9 @@ if os.name == "nt" : vars.Add(PackageVariable("bonjour", "Bonjour SDK location", "yes")) vars.Add(PackageVariable("openssl", "OpenSSL location", "yes")) vars.Add(PackageVariable("boost", "Boost location", "yes")) -vars.Add(PathVariable("expat_libdir", "Expat library location", None, PathVariable.PathAccept)) vars.Add(PathVariable("expat_includedir", "Expat headers location", None, PathVariable.PathAccept)) +vars.Add(PathVariable("expat_libdir", "Expat library location", None, PathVariable.PathAccept)) +vars.Add("expat_libname", "Expat library name", "libexpat" if os.name == "nt" else "expat") vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept)) vars.Add(PathVariable("docbook_xml", "DocBook XML", None, PathVariable.PathAccept)) vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccept)) @@ -463,15 +464,11 @@ if not env.get("HAVE_LIBXML",0) : expat_flags["LIBPATH"] = [env["expat_libdir"]] if env.get("expat_includedir", None) : expat_flags["CPPPATH"] = [env["expat_includedir"]] - if env["PLATFORM"] == "win32" : - expat_libname = "libexpat" - else : - expat_libname = "expat" expat_conf_env.MergeFlags(expat_flags) conf = Configure(expat_conf_env) - if conf.CheckCHeader("expat.h") and conf.CheckLib(expat_libname) : + if conf.CheckCHeader("expat.h") and conf.CheckLib(env["expat_libname"]) : env["HAVE_EXPAT"] = 1 - env["EXPAT_FLAGS"] = { "LIBS": [expat_libname] } + env["EXPAT_FLAGS"] = { "LIBS": [env["expat_libname"]] } env["EXPAT_FLAGS"].update(expat_flags) conf.Finish() -- cgit v0.10.2-6-g49f6