summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-09-02 20:33:02 +0100
committerCarl Hetherington <cth@carlh.net>2017-09-02 20:54:01 +0100
commit39ba87d8ad45e240cdceef5307bea981d8d03235 (patch)
tree9fb669ca4709402a1a801df8e4cdf9fd2589db3d /wscript
parent02835350334d04c02d3181a0d770871c3723e251 (diff)
Be more general when specifying icu- libraries.
Diffstat (limited to 'wscript')
-rw-r--r--wscript11
1 files changed, 10 insertions, 1 deletions
diff --git a/wscript b/wscript
index f6adb06..2d4dbc5 100644
--- a/wscript
+++ b/wscript
@@ -74,13 +74,22 @@ def configure(conf):
lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
uselib_store='BOOST_FILESYSTEM')
+ # Find the icu- libraries on the system as we need to link to them when we look for boost locale.
+ locale_libs = ['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix]
+ for pkg in subprocess.check_output(['pkg-config', '--list-all']).splitlines():
+ if pkg.startswith("icu-"):
+ for lib in subprocess.check_output(['pkg-config', '--libs', pkg.split()[0]]).split():
+ name = lib[2:]
+ if not name in locale_libs:
+ locale_libs.append(name)
+
conf.check_cxx(fragment="""
#include <boost/locale.hpp>\n
int main() { boost::locale::conv::to_utf<char> ("a", "cp850"); }\n
""",
msg='Checking for boost locale library',
libpath='/usr/local/lib',
- lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix, 'icuio', 'icule', 'iculx', 'icutu', 'icuuc'],
+ lib=locale_libs,
uselib_store='BOOST_LOCALE')
conf.check_cxx(fragment="""