[tracker/parser-unicode-libs-review] Fixed auto mode of --with-unicode-support



commit 8f67d410385de2378fec23e4475cb0d5e341b7b7
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed May 5 17:23:01 2010 +0200

    Fixed auto mode of --with-unicode-support

 configure.ac |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c3192a4..c1d59d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -834,13 +834,28 @@ AM_CONDITIONAL(HAVE_MINER_FLICKR, test "x$have_miner_flickr" = "xyes")
 #  3)  glib
 ##################################################################
 
+# Check for libunistring...
+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"
+
+# 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
+AC_CHECK_HEADER(unicode/ubrk.h, [have_libicu=yes],[have_libicu=no])
+LIBICU_CFLAGS=""
+LIBICU_LIBS="-licuuc"
+
 # Configure option
 AC_ARG_WITH([unicode-support],
             AS_HELP_STRING([--with-unicode-support],
-                           [Unicode support library? (libunistring|libicu|glib) [[default=auto]]]))
+                           [Unicode support library? (libunistring|libicu|glib) [[default=auto]]]),,
+            [with_unicode_support=auto])
 
 # If auto, decide ourselves
-if test "x$with_unicode_support" = "x"; then
+if test "x$with_unicode_support" = "xauto"; then
    if test "x$have_libunistring" = "xyes"; then
       with_unicode_support=libunistring
    else
@@ -855,12 +870,6 @@ fi
 case "x$with_unicode_support" in
      # Use libunistring
      "xlibunistring")
-        # Check for libunistring...
-        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
@@ -871,12 +880,6 @@ case "x$with_unicode_support" in
      ;;
      # Use libicu
      "xlibicu")
-        # 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
-        AC_CHECK_HEADER(unicode/ubrk.h, [have_libicu=yes],[have_libicu=no])
-        LIBICU_CFLAGS=""
-        LIBICU_LIBS="-licuuc"
         AC_SUBST(LIBICU_CFLAGS)
         AC_SUBST(LIBICU_LIBS)
         if test "x$have_libicu" = "xyes"; then



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