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":