[evolution-data-server/openismus-work-3-8: 20/121] 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-3-8: 20/121] Added detection of ICU libs to configure.ac
- Date: Thu, 3 Oct 2013 22:20:40 +0000 (UTC)
commit 4edbd311b414ea1a7fec6ac27de0554f84081231
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 80a3074..19322c0 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]