summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r--BuildTools/SCons/SConscript.boot55
1 files changed, 47 insertions, 8 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 767c326..51be9ab 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -13,4 +13,7 @@ vars.Add('cxxflags', "Extra C++ compiler flags")
vars.Add('link', "Linker")
vars.Add('linkflags', "Extra linker flags")
+vars.Add('ar', "Archiver (ar or lib)")
+if os.name == "nt":
+ vars.Add('mt', "manifest tool")
vars.Add(BoolVariable("ccache", "Use CCache", "no"))
vars.Add(EnumVariable("test", "Compile and run tests", "none", ["none", "all", "unit", "system"]))
@@ -40,15 +43,28 @@ 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(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", "libexpat" if os.name == "nt" else "expat")
+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 bunded Expat", "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", "libidn" if os.name == "nt" else "idn")
+vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn" or "idn")
vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libminiupnpc_libdir", "LibMiniUPNPC library location", None, PathVariable.PathAccept))
@@ -59,5 +75,5 @@ vars.Add("libnatpmp_libname", "LibNATPMP library name", "libnatpmp" if os.name =
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", "libsqlite3" if os.name == "nt" else "sqlite3")
+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)
vars.Add(PathVariable("lua_includedir", "Lua headers location", None, PathVariable.PathAccept))
@@ -70,4 +86,5 @@ vars.Add(PathVariable("editline_libdir", "Readline library location", None, Path
vars.Add("editline_libname", "Readline library name", "libedit" if os.name == "nt" else "edit")
+vars.Add(BoolVariable("try_avahi", "Try configuring for avahi?", "true"))
vars.Add(PathVariable("avahi_includedir", "Avahi headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("avahi_libdir", "Avahi library location", None, PathVariable.PathAccept))
@@ -83,9 +100,10 @@ vars.Add(BoolVariable("set_iterator_debug_level", "Set _ITERATOR_DEBUG_LEVEL=0",
vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for DNS lookup.", "no"))
+vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true"))
+
################################################################################
# Set up default build & configure environment
################################################################################
-
env_ENV = {
'PATH' : os.environ['PATH'],
@@ -93,8 +111,9 @@ env_ENV = {
'TERM' : os.environ.get("TERM", ""),
}
+
if "MSVC_VERSION" in ARGUMENTS :
- env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"])
+ env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"], platform = ARGUMENTS.get("PLATFORM", None))
else :
- env = Environment(ENV = env_ENV, variables = vars)
+ env = Environment(ENV = env_ENV, variables = vars, platform = ARGUMENTS.get("PLATFORM", None))
Help(vars.GenerateHelpText(env))
@@ -172,4 +191,7 @@ if "cc" in env :
if "cxx" in env :
env["CXX"] = env["cxx"]
+if "ar" in env :
+ env["AR"] = env["ar"]
+
if "link" in env :
env["SHLINK"] = env["link"]
@@ -262,4 +284,11 @@ if env["PLATFORM"] == "posix" and platform.machine() == "x86_64" :
if env["PLATFORM"] == "win32" :
env.Append(CXXFLAGS = ["/wd4068"])
+elif env["PLATFORM"] == "hpux" :
+ # HP-UX gives a flood of minor warnings if this is enabled
+ #env.Append(CXXFLAGS = ["+w"])
+ pass
+elif env["PLATFORM"] == "sunos" :
+ #env.Append(CXXFLAGS = ["-z verbose"])
+ pass
else :
if "clang" in env["CXX"] :
@@ -299,10 +328,20 @@ if env["PLATFORM"] == "win32" :
env.Append(LINKFLAGS = ["/INCREMENTAL:no", "/NOLOGO"])
if int(env["MSVS_VERSION"].split(".")[0]) < 10 :
- env["LINKCOM"] = [env["LINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1']
- env["SHLINKCOM"] = [env["SHLINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2']
+ mt = env.get('mt')
+ if not mt:
+ mt = 'mt.exe'
+ env["LINKCOM"] = [env["LINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1' % mt]
+ env["SHLINKCOM"] = [env["SHLINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2' % mt]
if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphone-simulator", "xcode", "android"] :
env["PLATFORM_FLAGS"]["FRAMEWORKS"] += ["IOKit", "AppKit", "SystemConfiguration", "Security", "SecurityInterface"]
+# Required by boost headers on HP-UX
+if env["PLATFORM"] == "hpux" :
+ env.Append(CXXFLAGS = ["+hpxstd98", "-mt", "-AA"])
+ # FIXME: Need -AA for linking C++ but not C
+ #env.Append(LINKFLAGS = ["-AA"])
+
+
# Testing
env["TEST_TYPE"] = env["test"]