From 39ba87d8ad45e240cdceef5307bea981d8d03235 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 2 Sep 2017 20:33:02 +0100 Subject: Be more general when specifying icu- libraries. --- wscript | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'wscript') 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 \n int main() { boost::locale::conv::to_utf ("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=""" -- cgit v1.2.3