[evolution-data-server/cursor-staging: 6/23] 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/cursor-staging: 6/23] Added detection of ICU libs to configure.ac
- Date: Mon, 19 Aug 2013 18:55:09 +0000 (UTC)
commit 8a8e848dcf493c1ebd89e4bce3a5b66ee97d66cf
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 d6ad0ca..e49f545 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]