[evolution-data-server/openismus-work-master: 14/74] Added detection of ICU libs to configure.ac
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 14/74] Added detection of ICU libs to configure.ac
- Date: Thu, 18 Jul 2013 22:09:26 +0000 (UTC)
commit 837b40cddc588cfc8335a0a81b35722e2c7671e8
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Fri Apr 26 21:29:31 2013 +0900
Added detection of ICU libs to configure.ac
configure.ac | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6349a5a..c6172d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -422,6 +422,35 @@ dnl ******************************
EVO_PHONENUMBER_SUPPORT
+dnl *******************
+dnl Check for ICU
+dnl *******************
+dnl
+dnl ICU recently started shipping pkg-config files but it's
+dnl not present on many systems, if we don't find the pkg-config
+dnl file then let's fallback on a manual check
+enable_icu=no
+PKG_CHECK_MODULES(ICU, icu-i18n, enable_icu=yes, [
+ enable_icu=yes
+ AC_CHECK_HEADERS(unicode/ucol.h,, enable_icu=no)
+ AC_MSG_CHECKING([for libicui18n])
+ LIBS_old=$LIBS
+ LIBS="$LIBS -licui18n -licuuc -licudata"
+ AC_TRY_LINK([#include <unicode/ucol.h>],
+ [ucol_open ("", NULL);],
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no); enable_icu=no)
+ LIBS=$LIBS_old
+ if [test x$enable_icu = xyes]; then
+ ICU_CFLAGS=-D_REENTRANT
+ ICU_LIBS="-licui18n -licuuc -licudata"
+ AC_SUBST(ICU_CFLAGS)
+ AC_SUBST(ICU_LIBS)
+ else
+ AC_MSG_ERROR([ICU libs not found, icu-i18n is required.])
+ fi
+])
+
dnl *************************
dnl Check for GTK+
dnl *************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]