From d1f1707adc03317760b0f75e04d0f3dd425e547f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 30 Nov 2010 00:57:15 -0500 Subject: [PATCH] Bug 31965 - some GNU/Linux distributions lack icu.pc but have icu-config Patch from suzuki toshiya. --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bda299a..4f3247c 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,15 @@ if $have_glib; then fi AM_CONDITIONAL(HAVE_GLIB, $have_glib) -PKG_CHECK_MODULES(ICU, icu, have_icu=true, have_icu=false) +PKG_CHECK_MODULES(ICU, icu, have_icu=true, [ + AC_CHECK_PROG([have_icu], [icu-config], [have_icu], [true], [false], [$PATH]) + if $have_icu; then + icu_cflags=`icu-config --cppflags` + icu_libs=`icu-config --ldflags-libsonly` + AC_SUBST(ICU_CFLAGS, [$icu_cflags]) + AC_SUBST(ICU_LIBS, [$icu_libs]) + fi +]) if $have_icu; then AC_DEFINE(HAVE_ICU, 1, [Have ICU library]) fi -- 2.7.4