summarylogtreecommitdiffstats
path: root/patch_gcc6.patch
blob: 865c91c97f98823db4cf54740f7af60aa35929ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/scons/boost.py b/scons/boost.py                                                                                       
index d48829d..e0dfbcc 100644
--- a/scons/boost.py
+++ b/scons/boost.py
@@ -1,6 +1,6 @@
 # vi: syntax=python:et:ts=4
 from config_check_utils import find_include
-from os.path import join, dirname, basename
+from os.path import join, dirname, basename, samefile
 from glob import glob
 import re
 
@@ -69,10 +69,11 @@ def CheckBoost(context, boost_lib, require_version = None, header_only = False):
     header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
     libname = "boost_" + boost_lib + env.get("boost_suffix", "")
 
-    if env["fast"]:
-        env.AppendUnique(CXXFLAGS = ["-isystem", boostdir], LIBPATH = [boostlibdir])
-    else:
-        env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
+    if not samefile(boostdir, "/usr/include"):
+        if env["fast"]:
+           env.AppendUnique(CXXFLAGS = ["-isystem", boostdir], LIBPATH = [boostlibdir])
+        else:
+           env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
     if not header_only:
         env.AppendUnique(LIBS = [libname])
     if boost_lib == "thread" and env["PLATFORM"] == "posix":