[tracker/parser-unicode-libs-review: 64/85] Look for libunistring at configure time



commit bdbd73928f4f595b0596447e48bf054e9c8076a1
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Apr 27 18:07:01 2010 +0200

    Look for libunistring at configure time

 configure.ac |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 562ac15..b3cead7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -826,6 +826,35 @@ fi
 
 AM_CONDITIONAL(HAVE_MINER_FLICKR, test "x$have_miner_flickr" = "xyes")
 
+##################################################################
+# Enable libunistring for a full Unicode-compliant word break algorithm?
+##################################################################
+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_CHECK_HEADER(uniwbrk.h,
+		   AC_CHECK_LIB(unistring, u8_wordbreaks))
+
+   have_libunistring=${ac_cv_lib_unistring_u8_wordbreaks:-no}
+
+   LIBUNISTRING_CFLAGS="$CFLAGS"
+   LIBUNISTRING_LIBS="$LIBS"
+
+   AC_SUBST(LIBUNISTRING_CFLAGS)
+   AC_SUBST(LIBUNISTRING_LIBS)
+
+   if test "x$have_libunistring" = "xyes"; then
+     AC_DEFINE(HAVE_LIBUNISTRING, [], [Unicode support library])
+   fi
+else
+   have_libunistring="no  (disabled)"
+fi
+
+AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$have_libunistring" = "yes")
+
 ####################################################################
 # Miner Evolution
 ####################################################################
@@ -1783,6 +1812,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
 
 Applications:
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]