Author: loonycyborg
Date: Fri Sep 26 14:42:09 2008
New Revision: 29687
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29687&view=rev
Log:
Added config check for gzip support in boost iostreams.
Modified:
trunk/SConstruct
trunk/scons/boost.py
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=29687&r1=29686&r2=29687&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Fri Sep 26 14:42:09 2008
@@ -201,6 +201,7 @@
LIBS = ["intl"])
conf.CheckCPlusPlus(gcc_version = "3.3") and \
conf.CheckBoost("iostreams", require_version = "1.33.0") and \
+ conf.CheckBoostIostreamsGZip() and \
conf.CheckBoost("smart_ptr", header_only = True) and \
conf.CheckCHeader("libintl.h", "<>") and \
conf.CheckSDL(require_version = '1.2.7') or Die("Base prerequisites are
not met.")
Modified: trunk/scons/boost.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/boost.py?rev=29687&r1=29686&r2=29687&view=diff
==============================================================================
--- trunk/scons/boost.py (original)
+++ trunk/scons/boost.py Fri Sep 26 14:42:09 2008
@@ -96,4 +96,34 @@
env.Replace(**backup)
return False
-config_checks = { "CheckBoost" : CheckBoost }
+def CheckBoostIostreamsGZip(context):
+ env = context.env
+ backup = env.Clone().Dictionary()
+
+ context.Message("Checking for gzip support in Boost Iostreams... ")
+ test_program = """
+ #include <boost/iostreams/filtering_stream.hpp>
+ #include <boost/iostreams/filter/gzip.hpp>
+
+ int main()
+ {
+ boost::iostreams::filtering_stream<boost::iostreams::output>
filter;
+
filter.push(boost::iostreams::gzip_compressor(boost::iostreams::gzip_params()));
+ }
+ \n"""
+
+ for zlib in ["", "z"]:
+ env.Append(LIBS = [zlib])
+ comment = ""
+ if zlib:
+ comment = " //Trying to link against '%s'.\n" % zlib
+ if context.TryLink(comment + test_program, ".cpp"):
+ context.Result("yes")
+ return True
+ else:
+ env.Replace(**backup)
+
+ context.Result("no")
+ return False
+
+config_checks = { "CheckBoost" : CheckBoost, "CheckBoostIostreamsGZip" :
CheckBoostIostreamsGZip }
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits