diff options
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r-- | BuildTools/SCons/SConstruct | 15 |
1 files changed, 8 insertions, 7 deletions
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"]) |