[tracker/parser-libunistring-review] Enable choosing between libicu, libunistring or just glib for Unicode support
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/parser-libunistring-review] Enable choosing between libicu, libunistring or just glib for Unicode support
- Date: Tue, 4 May 2010 16:31:25 +0000 (UTC)
commit c1bf621ef03f1c951ed5b3b4eec731bfd8a0dfb7
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon May 3 11:48:46 2010 +0200
Enable choosing between libicu, libunistring or just glib for Unicode support
configure.ac | 45 ++++++++++++++++++++++++++++++++++-----------
1 files changed, 34 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4e88f0c..ba39dba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -800,14 +800,14 @@ fi
AM_CONDITIONAL(HAVE_GNOME_KEYRING, test "x$have_gnome_keyring" = "xyes")
##################################################################
-# Enable libunistring for a full Unicode-compliant word break algorithm?
+# GLib, libunistring or libicu?
##################################################################
-AC_ARG_ENABLE(libunistring,
- AS_HELP_STRING([--enable-libunistring],
- [enable libunistring to perform Unicode-compliant word breaks [[default=auto]]]),,
- [enable_libunistring=auto])
-
-if test "x$enable_libunistring" != "xno" ; then
+AC_ARG_WITH([unicode-support],
+ AS_HELP_STRING([--with-unicode-support],
+ [Unicode support library? (glib|libunistring|libicu) [[default=glib]]]))
+if test "x$with_unicode_support" = "xlibunistring"; then
+ # Check for libunistring...
+ unicode_library=libunistring
AC_CHECK_HEADER(uniwbrk.h,
AC_CHECK_LIB(unistring, u8_wordbreaks))
@@ -820,13 +820,36 @@ if test "x$enable_libunistring" != "xno" ; then
AC_SUBST(LIBUNISTRING_LIBS)
if test "x$have_libunistring" = "xyes"; then
- AC_DEFINE(HAVE_LIBUNISTRING, [], [Unicode support library])
+ AC_DEFINE(HAVE_LIBUNISTRING, [], [libunistring Unicode support library])
+ else
+ AC_MSG_ERROR([***libunistring requested but not found - exiting!])
fi
else
- have_libunistring="no (disabled)"
+ if test "x$with_unicode_support" = "xlibicu"; then
+ # Check for libicu... Note that AC_CHECK_LIB cannot be used as
+ # symbol name includes libicu library version... don't want to
+ # look for ubrk_next_4_2
+ unicode_library=libicu
+ AC_CHECK_HEADER(unicode/ubrk.h, [have_libicu=yes],[have_libicu=no])
+
+ LIBICU_CFLAGS="-Iunicode"
+ LIBICU_LIBS="-licuuc"
+
+ AC_SUBST(LIBICU_CFLAGS)
+ AC_SUBST(LIBICU_LIBS)
+
+ if test "x$have_libicu" = "xyes"; then
+ AC_DEFINE(HAVE_LIBICU, [], [libicu Unicode support library])
+ else
+ AC_MSG_ERROR([***libicu requested but not found - exiting!])
+ fi
+ else
+ unicode_library=glib
+ fi
fi
-AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$have_libunistring" = "yes")
+AM_CONDITIONAL(HAVE_LIBUNISTRING, test "x$have_libunistring" = "xyes")
+AM_CONDITIONAL(HAVE_LIBICU, test "x$have_libicu" = "xyes")
####################################################################
@@ -1785,7 +1808,7 @@ Build Configuration:
Support for file monitoring: $have_file_monitor
Support for accent stripping (unac): $have_unac
Support for Cyrillic languages (enca): $have_enca
- Support for GNU libunistring: $have_libunistring
+ Unicode support library: $unicode_library
Applications:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]