summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 11 insertions, 3 deletions
diff --git a/wscript b/wscript
index b7eeb443..4734bfab 100644
--- a/wscript
+++ b/wscript
@@ -220,13 +220,19 @@ def configure(conf):
okmsg='yes',
errmsg='too old\nPlease install boost version %s or higher.' % boost_version[0])
+ conf.env.HAVE_BOOST_SYSTEM = conf.check_cxx(lib='boost_system%s' % boost_lib_suffix, mandatory=False)
+ def boost_libs(name):
+ libs = ['boost_system%s' % boost_lib_suffix] if conf.env.HAVE_BOOST_SYSTEM else []
+ libs.append('boost_%s%s' % (name, boost_lib_suffix))
+ return libs
+
conf.check_cxx(fragment="""
#include <boost/filesystem.hpp>\n
int main() { boost::filesystem::copy_file ("a", "b"); }\n
""",
msg='Checking for boost filesystem library',
libpath='/usr/local/lib',
- lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
+ lib=boost_libs('filesystem'),
uselib_store='BOOST_FILESYSTEM')
conf.check_cxx(fragment="""
@@ -262,7 +268,7 @@ def configure(conf):
""",
msg='Checking for boost datetime library',
libpath='/usr/local/lib',
- lib=['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
+ lib=boost_libs('date_time'),
uselib_store='BOOST_DATETIME')
conf.check_cfg(package='libavcodec', args='--cflags --libs', uselib_store='AVCODEC', mandatory=True)
@@ -305,7 +311,9 @@ def build(bld):
else:
boost_lib_suffix = ''
- libs="-L${libdir} -ldcp%s -lcxml -lboost_system%s" % (bld.env.API_VERSION, boost_lib_suffix)
+ libs="-L${libdir} -ldcp%s -lcxml " % bld.env.API_VERSION
+ if bld.env.HAVE_BOOST_SYSTEM:
+ libs += " -lboost_system%s" % boost_lib_suffix
if bld.env.HAVE_HARU:
libs += " -lhpdf"
if bld.env.TARGET_LINUX: