diff options
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r-- | BuildTools/SCons/SConstruct | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 2da3787..c084cff 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -203,61 +203,61 @@ boost_flags = {} if env.get("boost_libdir", None) : boost_flags["LIBPATH"] = [env["boost_libdir"]] if env.get("boost_includedir", None) : if env["PLATFORM"] == "win32" or env["PLATFORM"] == "hpux" or env["PLATFORM"] == "sunos" : boost_flags["CPPPATH"] = [env["boost_includedir"]] else : # Using isystem to avoid getting warnings from a system boost # Unfortunately, this also disables dependency tracking boost_flags["CPPFLAGS"] = [("-isystem", env["boost_includedir"])] boost_conf_env.MergeFlags(boost_flags) conf = Configure(boost_conf_env) boostLibs = [(None, "signals2.hpp"), ("system", "system/system_error.hpp"), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("date_time", "date_time/date.hpp")] allLibsPresent = True libNames = [] for (lib, header) in boostLibs : if header : header = "boost/" + header else : header = "boost/" + lib + ".hpp" if not conf.CheckCXXHeader(header) : allLibsPresent = False break if lib and env["PLATFORM"] != "win32" : libName = "boost_" + lib if not conf.CheckLib(libName, language='CXX') : libName += "-mt" if not conf.CheckLib(libName, language='CXX') : allLibsPresent = False break libNames.append(libName) -if allLibsPresent : +if not env.get("boost_force_bundled") and allLibsPresent : env["BOOST_FLAGS"] = boost_flags if env["PLATFORM"] != "win32" : env["BOOST_FLAGS"].update({"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 elif not env.get("boost_bundled_enable", True) : print "Error: Boost not found and boost_bundled_enable is false" Exit(1) else : env["BOOST_BUNDLED"] = True conf.Finish() # Xss env["HAVE_XSS"] = 0 if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" : xss_flags = { "LIBPATH": ["/usr/X11R6/lib"], "LIBS": ["Xss"] } xss_env = conf_env.Clone() xss_env.MergeFlags(xss_flags) conf = Configure(xss_env) if conf.CheckFunc("XScreenSaverQueryExtension") : env["HAVE_XSS"] = 1 env["XSS_FLAGS"] = xss_flags conf.Finish() # GConf @@ -410,81 +410,81 @@ conf.Finish() # Fallback to bundled LibIDN if not env.get("HAVE_ICU", False) and not env.get("HAVE_LIBIDN", False) : if env.get("libidn_bundled_enable", True) : env["HAVE_LIBIDN"] = 1 env["LIBIDN_BUNDLED"] = 1 elif env.get("need_idn", True): print "Error: ICU and LIBIDN not found, and libidn_bundled_enable is false" Exit(1) else: print "Proceeding without an IDN library because need_idn was false. This will break all internal binaries" # Unbound if env["unbound"] : env["LDNS_BUNDLED"] = 1 env["UNBOUND_BUNDLED"] = 1 else : env["LDNS_FLAGS"] = {} env["UNBOUND_FLAGS"] = {} # LibMiniUPnPc if env["experimental_ft"] : libminiupnpc_flags = {"CPPPATH": ["/usr/include/miniupnpc/"]} libminiupnpc_conf_env = conf_env.Clone() if env.get("libminiupnpc_libdir", None) : libminiupnpc_flags["LIBPATH"] = [env["libminiupnpc_libdir"]] if env.get("libminiupnpc_includedir", None) : libminiupnpc_flags["CPPPATH"] = [env["libminiupnpc_includedir"]] libminiupnpc_conf_env.MergeFlags(libminiupnpc_flags) conf = Configure(libminiupnpc_conf_env) - if conf.CheckCHeader("miniupnpc.h") and conf.CheckLib(env["libminiupnpc_libname"]) : + if not env.get("libminiupnpc_force_bundled") and conf.CheckCHeader("miniupnpc.h") and conf.CheckLib(env["libminiupnpc_libname"]) : env["HAVE_LIBMINIUPNPC"] = 1 env["LIBMINIUPNPC_FLAGS"] = { "LIBS": ["miniupnpc"] } env["LIBMINIUPNPC_FLAGS"].update(libminiupnpc_flags) else : env["LIBMINIUPNPC_BUNDLED"] = 1 conf.Finish() else : env["LIBMINIUPNPC_FLAGS"] = {} # LibNATPMP if env["experimental_ft"] : libnatpmp_flags = {} libnatpmp_conf_env = conf_env.Clone() if env.get("libnatpmp_libdir", None) : libnatpmp_flags["LIBPATH"] = [env["libnatpmp_libdir"]] if env.get("libnatpmp_includedir", None) : libnatpmp_flags["CPPPATH"] = [env["libnatpmp_includedir"]] libnatpmp_conf_env.MergeFlags(libnatpmp_flags) conf = Configure(libnatpmp_conf_env) - if conf.CheckCHeader("natpmp.h") and conf.CheckLib(env["libnatpmp_libname"]) : + if not env.get("libnatpmp_force_bundled") and conf.CheckCHeader("natpmp.h") and conf.CheckLib(env["libnatpmp_libname"]) : env["HAVE_LIBNATPMP"] = 1 env["LIBNATPMP_FLAGS"] = { "LIBS": ["natpmp"] } env["LIBNATPMP_FLAGS"].update(libnatpmp_flags) else : env["LIBNATPMP_BUNDLED"] = 1 conf.Finish() else : env["LIBNATPMP_FLAGS"] = {} # SQLite if env["experimental"] : sqlite_conf_env = conf_env.Clone() sqlite_flags = {} if env.get("sqlite_libdir", None) : sqlite_flags["LIBPATH"] = [env["sqlite_libdir"]] if env.get("sqlite_includedir", None) : sqlite_flags["CPPPATH"] = [env["sqlite_includedir"]] sqlite_conf_env.MergeFlags(sqlite_flags) conf = Configure(sqlite_conf_env) if conf.CheckCHeader("sqlite3.h") and conf.CheckLib(env["sqlite_libname"]) and not env.get("sqlite_force_bundled", False): env["HAVE_SQLITE"] = 1 env["SQLITE_FLAGS"] = { "LIBS": [env["sqlite_libname"]] } env["SQLITE_FLAGS"].update(sqlite_flags) else : env["SQLITE_BUNDLED"] = 1 conf.Finish() else : env["SQLITE_FLAGS"] = {} |