diff options
Diffstat (limited to 'BuildTools')
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 3 | ||||
-rw-r--r-- | BuildTools/SCons/SConstruct | 15 |
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 @@ -46,7 +46,8 @@ vars.Add("openssl_libnames", "Comma-separated openssl library names to override 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")) diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index ac4d003..dafd2b0 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -569,19 +569,20 @@ if env["PLATFORM"] == "win32" : #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" : |