Move boost/intrusive to senf/boost_intrusive
[senf.git] / site_scons / senfutil.py
index 38c82b6..29992a3 100644 (file)
@@ -79,7 +79,7 @@ def SetupForSENF(env, senf_path = []):
     env.Append(
         LIBS              = [ 'rt' ],
         
-        CXXFLAGS          = [ '-Wno-long-long', '$CXXFLAGS_' ],
+        CXXFLAGS          = [ '-Wno-long-long', '$CXXFLAGS_', '-fno-strict-aliasing' ],
         CXXFLAGS_         = BuildTypeOptions('CXXFLAGS'),
         
         CPPDEFINES        = [ '$expandLogOption', '$CPPDEFINES_' ],
@@ -137,6 +137,7 @@ def SetupForSENF(env, senf_path = []):
                         CPPPATH = [ sconspath ],
                         BUNDLEDIR = sconspath,
                         SENFDIR = sconspath,
+                        SENFINCDIR = sconspath,
                         SENFSYSLAYOUT = False)
             try:
                 env.MergeFlags(file(os.path.join(path,"senf.conf")).read())
@@ -150,6 +151,7 @@ def SetupForSENF(env, senf_path = []):
                 print "\nUsing system SENF in '%s/'\n" % sconspath
             env.Append(BUNDLEDIR = os.path.join(sconspath,"lib/senf"),
                        SENFDIR = sconspath,
+                       SENFINCDIR = '%s/include' % sconspath,
                        SENFSYSLAYOUT = True)
             break
     else:
@@ -160,7 +162,7 @@ def SetupForSENF(env, senf_path = []):
 
     # Only add senf after all configure checks have run
     env.Append(
-        CPPPATH = '${NEED_BOOST_EXT and "$SENFDIR/boost_ext" or None}',
+        CPPPATH = '${NEED_BOOST_EXT and "$SENFINCDIR/boost_ext" or None}',
         LIBS = [ 'senf', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB',
                  '$BOOSTFSLIB' ],
         )
@@ -171,9 +173,9 @@ def SetupForSENF(env, senf_path = []):
 def DefaultOptions(env):
     env.Append(
         CXXFLAGS         = [ '-Wall', '-Woverloaded-virtual' ],
-        CXXFLAGS_final   = [ '-O2' ],
-        CXXFLAGS_normal  = [ '-O0', '-g' ],
-        CXXFLAGS_debug   = [ '$CXXFLAGS_normal' ],
+        CXXFLAGS_final   = [ '-O3' ],
+        CXXFLAGS_normal  = [ '-O2', '-g' ],
+        CXXFLAGS_debug   = [ '-O0', '-g' ],
 
         LINKFLAGS_normal = [ '-Wl,-S' ],
         LINKFLAGS_debug  = [ '-g' ],
@@ -196,11 +198,16 @@ def Glob(env, exclude=[], subdirs=[]):
 
 
 def Configure(env):
-    conf = env.Configure(clean=False, help=False, custom_tests = senfconf.Tests())
+    conf = env.Configure(clean=False, 
+                         help=False, 
+                         custom_tests=senfconf.Tests(), 
+                         config_h="#/senf/autoconf.hh")
     env.Replace(
         BOOST_VERSION  =  conf.CheckBoostVersion(),
         BOOST_VARIANT  = conf.CheckBoostVariants( '', 'mt' ),
         NEED_BOOST_EXT = not conf.CheckCXXHeader("boost/bimap.hpp"),
+        HAVE_BOOST_SPIRIT_INCLUDE_CLASSIC_HPP = conf.CheckCXXHeader(
+            "boost/spirit/include/classic.hpp"),
     )
     conf.Finish()