From b50b534ab9416aa34b49420e33adba56333a3530 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 20 Jan 2014 14:19:41 -0800 Subject: [PATCH] fix boost_regex icu detection on linux when statically linking --- SConstruct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index ccedc7d32..2a47146f6 100644 --- a/SConstruct +++ b/SConstruct @@ -923,7 +923,11 @@ int main() def boost_regex_has_icu(context): if env['RUNTIME_LINK'] == 'static': - context.env.AppendUnique(LIBS='icudata') + # re-order icu libs to ensure linux linker is happy + for lib_name in ['icui18n',env['ICU_LIB_NAME'],'icudata']: + if lib_name in context.env['LIBS']: + context.env['LIBS'].remove(lib_name) + context.env.Append(LIBS=lib_name) ret = context.TryRun(""" #include @@ -1323,7 +1327,6 @@ if not preconfigured: # http://lists.boost.org/Archives/boost/2009/03/150076.php # we need libicui18n if using static boost libraries, so it is # important to try this check with the library linked - env.AppendUnique(LIBS='icui18n') if conf.boost_regex_has_icu(): # TODO - should avoid having this be globally defined... env.Append(CPPDEFINES = '-DBOOST_REGEX_HAS_ICU')