Author: suokko
Date: Tue Aug 12 22:01:52 2008
New Revision: 28512
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28512&view=rev
Log:
Added boost asio and smart_ptr library checking to scons
Modified:
trunk/SConstruct
trunk/scons/boost.py
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=28512&r1=28511&r2=28512&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Tue Aug 12 22:01:52 2008
@@ -103,8 +103,8 @@
setup_cross_compile(env)
if env.get('cxxtool',""):
- env['CXX'] = env['cxxtool']
- env['ENV']['HOME'] = os.environ['HOME']
+ env['CXX'] = env['cxxtool']
+ env['ENV']['HOME'] = os.environ['HOME']
if env['distcc']: env.Tool('distcc')
if env['ccache']: env.Tool('ccache')
@@ -190,6 +190,7 @@
LIBS = ["intl"])
conf.CheckCPlusPlus(gcc_version = "3.3") and \
conf.CheckBoost("iostreams", require_version = "1.33.0") 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.")
@@ -216,6 +217,13 @@
have_server_prereqs = conf.CheckSDL('SDL_net') or Warning("Server
prerequisites are not met. wesnothd and campaignd cannot be built.")
have_test_prereqs = have_client_prereqs and have_server_prereqs and
conf.CheckBoost('unit_test_framework', require_version = "1.34.0") or
Warning("Unit tests are disabled because their prerequisites are not met.")
+
+# have_boost_asio = \
+# conf.CheckBoost("system", require_version = "1.35.0") and \
+# conf.CheckBoost("asio", require_version = "1.35.0", header_only =
True) or \
+# Warning("Boost 1.35 not found using old networking code.i")
+#
+# env["have_boost_asio"] = have_boost_asio;
if env["python"]:
env["python"] = (float(sys.version[:3]) >= 2.4) and conf.CheckPython()
or Warning("Python >= 2.4 not found. Python extensions will be disabled.")
@@ -270,7 +278,7 @@
env.Append(CPPDEFINES = "USE_INTERNAL_DATA")
if env['editor2']:
- env.Append(CPPDEFINES = "USE_EDITOR2")
+ env.Append(CPPDEFINES = "USE_EDITOR2")
if have_X:
env.Append(CPPDEFINES = "_X11")
@@ -282,8 +290,8 @@
if env["PLATFORM"] == 'win32':
env.Append(LIBS = ["wsock32", "intl", "z"], CXXFLAGS = ["-mthreads"],
LINKFLAGS = ["-mthreads"])
-if env["PLATFORM"] == 'darwin': # Mac OS X
- env.Append(FRAMEWORKS = "Carbon") # Carbon GUI
+if env["PLATFORM"] == 'darwin': # Mac OS X
+ env.Append(FRAMEWORKS = "Carbon") # Carbon GUI
try:
env["svnrev"] = Popen(Split("svnversion -n ."),
stdout=PIPE).communicate()[0]
@@ -509,7 +517,7 @@
config_h_re = re.compile(r"^.*#define\s*(\S*)\s*\"(\S*)\".*$", re.MULTILINE)
build_config = dict(
config_h_re.findall(File("config.h.dummy").get_contents()) )
env["version"] = build_config.get("PACKAGE_VERSION")
-if 'dist' in COMMAND_LINE_TARGETS: # Speedup, the manifest is expensive
+if 'dist' in COMMAND_LINE_TARGETS: # Speedup, the manifest is expensive
def dist_manifest():
"Get an argument list suitable for passing to a distribution archiver."
# Start by getting a list of all files under version control
@@ -580,8 +588,8 @@
#
env.Command("wesnoth-deps.dot", [],
"graph-includes -verbose --class wesnoth \
- -sysI /usr/include/c++/4.0 -sysI /usr/include -sysI /usr/include/SDL \
- --prefixstrip src/ -I src src > ${TARGET}")
+ -sysI /usr/include/c++/4.0 -sysI /usr/include -sysI
/usr/include/SDL \
+ --prefixstrip src/ -I src src > ${TARGET}")
env.Command("wesnoth-deps.png", "wesnoth-deps.dot",
"dot -Tpng -o ${TARGET} ${SOURCE}")
env.Clean(all, ["wesnoth-deps.dot", "wesnoth-deps.png"])
Modified: trunk/scons/boost.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/boost.py?rev=28512&r1=28511&r2=28512&view=diff
==============================================================================
--- trunk/scons/boost.py (original)
+++ trunk/scons/boost.py Tue Aug 12 22:01:52 2008
@@ -40,7 +40,7 @@
except:
pass
-def CheckBoost(context, boost_lib, require_version = None):
+def CheckBoost(context, boost_lib, require_version = None, header_only =
False):
env = context.env
if require_version:
context.Message("Checking for Boost %s library version >= %s... " %
(boost_lib, require_version))
@@ -55,7 +55,9 @@
boost_headers = { "regex" : "regex/config.hpp",
"iostreams" : "iostreams/constants.hpp",
- "unit_test_framework" : "test/unit_test.hpp" }
+ "unit_test_framework" : "test/unit_test.hpp",
+ "system" : "system/error_code.hpp"}
+
header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
libname = "boost_" + boost_lib + env.get("boost_suffix", "")
@@ -63,7 +65,8 @@
env.AppendUnique(CXXFLAGS = "-I" + boostdir, LIBPATH = [boostlibdir])
else:
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
- env.AppendUnique(LIBS = [libname])
+ if not header_only:
+ env.AppendUnique(LIBS = [libname])
test_program = """
#include <boost/%s>
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits