5 opt.load('compiler_cxx')
6 opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows')
7 opt.add_option('--static', action='store_true', default=False, help='build statically')
8 opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests')
11 conf.load('compiler_cxx')
12 conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2'])
14 conf.env.TARGET_WINDOWS = conf.options.target_windows
15 conf.env.STATIC = conf.options.static
16 conf.env.DISABLE_TESTS = conf.options.disable_tests
18 if conf.options.target_windows:
19 boost_lib_suffix = '-mt'
23 conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='LIBXML++', mandatory=True)
25 conf.check_cxx(fragment="""
26 #include <boost/filesystem.hpp>\n
27 int main() { boost::filesystem::copy_file ("a", "b"); }\n
29 msg='Checking for boost filesystem library',
30 libpath='/usr/local/lib',
31 lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
32 uselib_store='BOOST_FILESYSTEM')
34 if not conf.options.disable_tests:
35 conf.check_cxx(fragment="""
36 #define BOOST_TEST_MODULE Config test\n
37 #include <boost/test/unit_test.hpp>\n
40 msg='Checking for boost unit testing library',
41 lib=['boost_unit_test_framework%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
42 uselib_store='BOOST_TEST')
48 bld(source='libcxml.pc.in',
50 includedir='%s/include' % bld.env.PREFIX,
51 libs="-L${libdir} -lcxml",
52 install_path='${LIBDIR}/pkgconfig')
55 if not bld.env.DISABLE_TESTS: