Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51102 - in sandbox/SCons: libs/regex/build tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-02-08 11:26:16


Author: loonycyborg
Date: 2009-02-08 11:26:16 EST (Sun, 08 Feb 2009)
New Revision: 51102
URL: http://svn.boost.org/trac/boost/changeset/51102

Log:
Added support for building Boost.Regex with ICU support.

Text files modified:
   sandbox/SCons/libs/regex/build/SConscript | 2 ++
   sandbox/SCons/tools/scons/boost-configure.py | 12 +++++++++++-
   2 files changed, 13 insertions(+), 1 deletions(-)

Modified: sandbox/SCons/libs/regex/build/SConscript
==============================================================================
--- sandbox/SCons/libs/regex/build/SConscript (original)
+++ sandbox/SCons/libs/regex/build/SConscript 2009-02-08 11:26:16 EST (Sun, 08 Feb 2009)
@@ -1,5 +1,7 @@
 # vi: syntax=python:et:ts=4
 Import("env")
+if env.CheckICU():
+ env.Append(CPPDEFINES = ["BOOST_HAS_ICU=1"])
 env.BoostLibrary(
     "regex",
     Split("""

Modified: sandbox/SCons/tools/scons/boost-configure.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-configure.py (original)
+++ sandbox/SCons/tools/scons/boost-configure.py 2009-02-08 11:26:16 EST (Sun, 08 Feb 2009)
@@ -1,4 +1,5 @@
 # vi: syntax=python:et:ts=4
+from subprocess import Popen, PIPE
 
 class DependencyChecker:
     flags = {}
@@ -39,18 +40,27 @@
 class CheckMPI(DependencyChecker):
     def Check(self, env):
         try:
- from subprocess import Popen, PIPE
             self.flags = env.ParseFlags(Popen(["mpic++", "-showme"], stdout = PIPE).communicate()[0].split(" ", 1)[1])
             env.AppendUnique(**self.flags)
             self.have_dep = self.conf.CheckCHeader("mpi.h")
         except:
             self.have_dep = False
 
+class CheckICU(DependencyChecker):
+ def Check(self, env):
+ try:
+ self.flags = env.ParseFlags(Popen(["icu-config", "--ldflags", "--cxxflags"], stdout = PIPE).communicate()[0])
+ env.AppendUnique(**self.flags)
+ self.have_dep = self.conf.CheckCHeader("unicode/utypes.h")
+ except:
+ self.have_dep = False
+
 def generate(env):
     env.AddMethod(CheckZLib())
     env.AddMethod(CheckBZip2())
     env.AddMethod(CheckPython())
     env.AddMethod(CheckMPI())
+ env.AddMethod(CheckICU())
 
 def exists():
     return True


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk