summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConscript.boot3
-rw-r--r--BuildTools/SCons/SConstruct15
2 files changed, 10 insertions, 8 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index ec3381d..3e8ab96 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -19,61 +19,62 @@ vars.Add(BoolVariable("ccache", "Use CCache", "no"))
vars.Add(EnumVariable("test", "Compile and run tests", "none", ["none", "all", "unit", "system"]))
vars.Add(BoolVariable("optimize", "Compile with optimizations turned on", "no"))
vars.Add(BoolVariable("debug", "Compile with debug information", "yes"))
vars.Add(BoolVariable("allow_warnings", "Allow compilation warnings during compilation", "yes"))
vars.Add(BoolVariable("assertions", "Compile with assertions", "yes"))
vars.Add(BoolVariable("max_jobs", "Build with maximum number of parallel jobs", "no"))
vars.Add(EnumVariable("target", "Choose a target platform for compilation", "native", ["native", "iphone-simulator", "iphone-device", "xcode", "android"]))
vars.Add('android_toolchain', "Path to Android toolchain")
vars.Add('android_sdk_bin', "Path to Android SDK's tools directory")
vars.Add(BoolVariable("swift_mobile", "Build mobile Swift", "no"))
vars.Add(BoolVariable("swiften_dll", "Build Swiften as dynamically linked library", "no"))
if os.name != "nt" :
vars.Add(BoolVariable("coverage", "Compile with coverage information", "no"))
if os.name == "posix" :
vars.Add(BoolVariable("valgrind", "Run tests with valgrind", "no"))
if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"):
vars.Add(BoolVariable("universal", "Create universal binaries", "no"))
vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no"))
vars.Add(BoolVariable("mac106", "Link against the 10.6 frameworks", "no"))
if os.name == "nt" :
vars.Add(PathVariable("vcredist", "MSVC redistributable dir", None, PathVariable.PathAccept))
if os.name == "nt" :
vars.Add(PathVariable("wix_bindir", "Path to WiX binaries", "", PathVariable.PathAccept))
if os.name == "nt" :
vars.Add(PackageVariable("bonjour", "Bonjour SDK location", "yes"))
vars.Add(PackageVariable("openssl", "OpenSSL location", "yes"))
vars.Add("openssl_libnames", "Comma-separated openssl library names to override defaults", None)
vars.Add(BoolVariable("openssl_force_bundled", "Force use of the bundled OpenSSL", "no"))
vars.Add("openssl_include", "Location of OpenSSL include files (if not under (openssl)/include)", None)
vars.Add("openssl_libdir", "Location of OpenSSL library files (if not under (openssl)/lib)", None)
-vars.Add(PackageVariable("hunspell", "Hunspell location", False))
+vars.Add(PackageVariable("hunspell_prefix", "Hunspell location", False))
+vars.Add(BoolVariable("hunspell_enable", "Build with Hunspell support", False))
vars.Add(PathVariable("boost_includedir", "Boost headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("boost_libdir", "Boost library location", None, PathVariable.PathAccept))
vars.Add(BoolVariable("boost_bundled_enable", "Allow use of bundled Boost as last resort", "true"))
vars.Add(PathVariable("zlib_includedir", "Zlib headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("zlib_libdir", "Zlib library location", None, PathVariable.PathAccept))
vars.Add(PathVariable("zlib_libfile", "Zlib library file (full path to file)", None, PathVariable.PathAccept))
vars.Add(BoolVariable("zlib_bundled_enable", "Allow use of bundled Zlib as last resort", "true"))
vars.Add(BoolVariable("try_gconf", "Try configuring for GConf?", "true"))
vars.Add(BoolVariable("try_libxml", "Try configuring for libXML?", "true"))
vars.Add(BoolVariable("try_expat", "Try configuring for expat?", "true"))
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", os.name == "nt" and "libexpat" or "expat")
vars.Add(PackageVariable("icu", "ICU library location", "no"))
vars.Add(BoolVariable("libidn_bundled_enable", "Allow use of bundled LibIDN", "true"))
vars.Add(BoolVariable("try_libidn", "Try configuring for LibIDN?", "true"))
vars.Add(PathVariable("libidn_includedir", "LibIDN headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libidn_libdir", "LibIDN library location", None, PathVariable.PathAccept))
vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn" or "idn")
vars.Add(BoolVariable("need_idn", "Whether an IDN library is required. Without this, most internal binaries will fail", "true"))
vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libminiupnpc_libdir", "LibMiniUPNPC library location", None, PathVariable.PathAccept))
vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", os.name == "nt" and "libminiupnpc" or "miniupnpc")
vars.Add(PathVariable("libnatpmp_includedir", "LibNATPMP headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libnatpmp_libdir", "LibNATPMP library location", None, PathVariable.PathAccept))
vars.Add("libnatpmp_libname", "LibNATPMP library name", os.name == "nt" and "libnatpmp" or "natpmp")
vars.Add(PathVariable("sqlite_includedir", "SQLite headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("sqlite_libdir", "SQLite library location", None, PathVariable.PathAccept))
vars.Add("sqlite_libname", "SQLite library name", os.name == "nt" and "libsqlite3" or "sqlite3")
vars.Add("sqlite_force_bundled", "Force use of the bundled SQLite", None)
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index ac4d003..dafd2b0 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -542,73 +542,74 @@ elif not env["HAVE_SECURETRANSPORT"] :
openssl_env.MergeFlags(openssl_flags)
openssl_conf = Configure(openssl_env)
if use_openssl and openssl_conf.CheckCHeader("openssl/ssl.h") :
env["HAVE_OPENSSL"] = 1
env["OPENSSL_FLAGS"] = openssl_flags
openssl_libnames = env.get("openssl_libnames", None)
if openssl_libnames:
env["OPENSSL_FLAGS"]["LIBS"] = openssl_libnames.split(',')
elif env["PLATFORM"] == "win32" :
env["OPENSSL_FLAGS"]["LIBS"] = ["libeay32MD", "ssleay32MD"]
else:
env["OPENSSL_FLAGS"]["LIBS"] = ["ssl", "crypto"]
if env["PLATFORM"] == "darwin" :
if platform.mac_ver()[0].startswith("10.5") :
env["OPENSSL_FLAGS"]["FRAMEWORKS"] = ["Security"]
else :
env["OPENSSL_FLAGS"] = {}
if env["PLATFORM"] == "win32" :
# If we're compiling for Windows and OpenSSL isn't being used, use Schannel
env["HAVE_SCHANNEL"] = True
openssl_conf.Finish()
if env["PLATFORM"] == "win32" :
# On Windows link to secur32. It is needed by Swiften/SASL/WindowsAuthentication
env.Append(LIBS = ["secur32"])
#Hunspell
hunspell_env = conf_env.Clone()
-hunspell_prefix = isinstance(env.get("hunspell", False), str) and env["hunspell"] or ""
+hunspell_prefix = isinstance(env.get("hunspell_prefix", False), str) and env["hunspell_prefix"] or ""
hunspell_flags = {}
if hunspell_prefix :
hunspell_flags = {"CPPPATH":[os.path.join(hunspell_prefix, "include")], "LIBPATH":[os.path.join(hunspell_prefix, "lib")]}
hunspell_env.MergeFlags(hunspell_flags)
env["HAVE_HUNSPELL"] = 0;
-hunspell_conf = Configure(hunspell_env)
-if hunspell_conf.CheckCXXHeader("hunspell/hunspell.hxx") and hunspell_conf.CheckLib("hunspell") :
- env["HAVE_HUNSPELL"] = 1
- hunspell_flags["LIBS"] = ["hunspell"]
- env["HUNSPELL_FLAGS"] = hunspell_flags
-hunspell_conf.Finish()
+if env.get("hunspell_enable", False) :
+ hunspell_conf = Configure(hunspell_env)
+ if hunspell_conf.CheckCXXHeader("hunspell/hunspell.hxx") and hunspell_conf.CheckLib("hunspell") :
+ env["HAVE_HUNSPELL"] = 1
+ hunspell_flags["LIBS"] = ["hunspell"]
+ env["HUNSPELL_FLAGS"] = hunspell_flags
+ hunspell_conf.Finish()
# Bonjour
if env["PLATFORM"] == "darwin" and env["target"] == "native" :
env["HAVE_BONJOUR"] = 1
elif env.get("bonjour", False) :
bonjour_env = conf_env.Clone()
bonjour_conf = Configure(bonjour_env)
bonjour_flags = {}
if env.get("bonjour") != True :
bonjour_prefix = env["bonjour"]
bonjour_flags["CPPPATH"] = [os.path.join(bonjour_prefix, "include")]
bonjour_flags["LIBPATH"] = [os.path.join(bonjour_prefix, "lib", "win32")]
bonjour_env.MergeFlags(bonjour_flags)
if bonjour_conf.CheckCHeader("dns_sd.h") and bonjour_conf.CheckLib("dnssd") :
env["HAVE_BONJOUR"] = 1
env["BONJOUR_FLAGS"] = bonjour_flags
env["BONJOUR_FLAGS"]["LIBS"] = ["dnssd"]
bonjour_conf.Finish()
# Cocoa & IOKit
if env["PLATFORM"] == "darwin" :
cocoa_conf = Configure(conf_env)
if cocoa_conf.CheckCHeader("IOKit/IOKitLib.h") :
env["HAVE_IOKIT"] = True
cocoa_conf.Finish()
# Qt
try :
myenv = env.Clone()
myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"])