summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-09-25 20:31:05 +0100
committerCarl Hetherington <cth@carlh.net>2015-09-25 20:31:05 +0100
commit74efa45d8cad7e4cf85c85520d093f5d072d7f04 (patch)
treed3c89c8b761c9ccd77d7e10a4b5ddc09601b6988 /wscript
parentd19b91245294336288d65dc34d0d9240bee6202d (diff)
Improve finding of libicu without pkgconfig.
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/wscript b/wscript
index c4e6fdf42..2970e8fc5 100644
--- a/wscript
+++ b/wscript
@@ -162,7 +162,19 @@ def configure(conf):
# libicu
if conf.check_cfg(package='icu-i18n', args='--cflags --libs', uselib_store='ICU', mandatory=False) is None:
if conf.check_cfg(package='icu', args='--cflags --libs', uselib_store='ICU', mandatory=False) is None:
- Logs.pprint('RED', 'libicu not found')
+ conf.check_cxx(fragment="""
+ #include <unicode/ucsdet.h>
+ int main(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UCharsetDetector* detector = ucsdet_open (&status);
+ return 0; }\n
+ """,
+ mandatory=True,
+ msg='Checking for libicu',
+ okmsg='yes',
+ libpath=['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'],
+ lib=['icuio', 'icui18n', 'icudata'],
+ uselib_store='ICU')
# libsndfile
conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)