summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConstruct66
1 files changed, 14 insertions, 52 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index fb90d69..85a8205 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -34,7 +34,6 @@ if os.name == "nt" :
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_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")
@@ -317,77 +316,40 @@ if conf.CheckCHeader("idna.h") and conf.CheckLib("idn") :
else :
env["LIBIDN_BUNDLED"] = 1
-# Avahi
-if env["PLATFORM"] != "darwin" :
- if conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") :
- env["HAVE_AVAHI"] = True
- env["AVAHI_FLAGS"] = { "LIBS": ["avahi-client", "avahi-common"] }
-
-conf.Finish()
-
# Boost
-env["BOOST_FLAGS"] = {}
-boost_prefix = env["boost"] if isinstance(env["boost"], str) else None
-boost_win32_libsuffix = ""
-boost_win32_libprefix = ""
-if boost_prefix :
- # FIXME: Only use the include flag that has the includes
- env["BOOST_FLAGS"]["CPPPATH"] = [os.path.join(boost_prefix, "include"), os.path.join(boost_prefix)]
- env["BOOST_FLAGS"]["LIBPATH"] = [os.path.join(boost_prefix, "lib")]
-
- # Try to auto-detect the boost libraries on windows
- if env["PLATFORM"] == "win32" :
- if os.path.isdir(os.path.join(boost_prefix, "lib")) :
- for file in os.listdir(os.path.join(boost_prefix, "lib")) :
- m = re.match("(lib)?boost_signals(-(.*)-mt-(s-)?1(.*)).lib", file)
- if m :
- # Give precedence over the dynamic
- if not boost_win32_libsuffix or "-s-" in boost_win32_libsuffix :
- boost_win32_libsuffix = m.group(2)
- boost_win32_libprefix = m.group(1) if m.group(1) else ""
- if not "-s-" in boost_win32_libsuffix :
- env["BOOST_FLAGS"]["CPPDEFINES"] = ["BOOST_ALL_DYN_LINK"]
-
-boost_env = conf_env.Clone()
-boost_env.MergeFlags(env["BOOST_FLAGS"])
-boost_conf = Configure(boost_env)
boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")]
allLibsPresent = True
libNames = []
for (lib, header) in boostLibs :
- # Check if we find the header
if header :
header = "boost/" + header
else :
header = "boost/" + lib + ".hpp"
- if not boost_conf.CheckCXXHeader(header) :
+ if not conf.CheckCXXHeader(header) :
allLibsPresent = False
break
-
- # Check if we find the lib
libName = "boost_" + lib
- if env["PLATFORM"] == "win32" :
- libName = boost_win32_libprefix + libName + boost_win32_libsuffix
- if not boost_conf.CheckLib(libName) :
+ if not conf.CheckLib(libName) :
+ libName += "-mt"
+ if not conf.CheckLib(libName) :
allLibsPresent = False
break
- libNames.append(libName)
- else :
- if not boost_conf.CheckLib(libName) :
- libName += "-mt"
- if not boost_conf.CheckLib(libName) :
- allLibsPresent = False
- break
- libNames.append(libName)
+ libNames.append(libName)
if allLibsPresent :
- env["BOOST_FLAGS"]["LIBS"] = libNames
- if not boost_conf.CheckCXXHeader("boost/uuid/uuid.hpp") :
+ env["BOOST_FLAGS"] = { "LIBS": libNames }
+ if not conf.CheckCXXHeader("boost/uuid/uuid.hpp") :
# FIXME: Remove this workaround when UUID is available in most distros
env["BOOST_BUNDLED_UUID_ONLY"] = True
else :
env["BOOST_BUNDLED"] = True
-boost_conf.Finish()
+# Avahi
+if env["PLATFORM"] != "darwin" :
+ if conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") :
+ env["HAVE_AVAHI"] = True
+ env["AVAHI_FLAGS"] = { "LIBS": ["avahi-client", "avahi-common"] }
+
+conf.Finish()
# Xss
env["HAVE_XSS"] = 0