[tracker/parser-unicode-libs-review] FTS parsers: fix options in configure
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/parser-unicode-libs-review] FTS parsers: fix options in configure
- Date: Tue, 18 May 2010 17:56:02 +0000 (UTC)
commit b614aa3a951476e7cfdc84ed24f6079355646671
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue May 18 19:51:30 2010 +0200
FTS parsers: fix options in configure
configure.ac | 22 +++++++++++++---------
src/libtracker-fts/Makefile.am | 12 ++++++------
2 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 16c5eda..9f06089 100644
--- a/configure.ac
+++ b/configure.ac
@@ -867,15 +867,19 @@ AM_CONDITIONAL(HAVE_MINER_FLICKR, test "x$have_miner_flickr" = "xyes")
# 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_SEARCH_LIBS(u8_wordbreaks,
+ unistring,
+ [have_libunistring=yes],
+ [have_libunistring=no]))
+LIBUNISTRING_CFLAGS=""
+LIBUNISTRING_LIBS="-lunistring"
# 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])
+AC_CHECK_HEADER(unicode/ubrk.h,
+ [have_libicu=yes],
+ [have_libicu=no])
LIBICU_CFLAGS=""
LIBICU_LIBS="-licuuc"
@@ -904,7 +908,7 @@ case "x$with_unicode_support" in
AC_SUBST(LIBUNISTRING_CFLAGS)
AC_SUBST(LIBUNISTRING_LIBS)
if test "x$have_libunistring" = "xyes"; then
- AC_DEFINE(HAVE_LIBUNISTRING, [], [libunistring Unicode support library])
+ AC_DEFINE(HAVE_LIBUNISTRING, [1], [libunistring Unicode support library])
else
AC_MSG_ERROR([***libunistring requested but not found - exiting!])
fi
@@ -914,7 +918,7 @@ case "x$with_unicode_support" in
AC_SUBST(LIBICU_CFLAGS)
AC_SUBST(LIBICU_LIBS)
if test "x$have_libicu" = "xyes"; then
- AC_DEFINE(HAVE_LIBICU, [], [libicu Unicode support library])
+ AC_DEFINE(HAVE_LIBICU, [1], [libicu Unicode support library])
else
AC_MSG_ERROR([***libicu requested but not found - exiting!])
fi
@@ -925,8 +929,8 @@ case "x$with_unicode_support" in
*) AC_MSG_ERROR([***wrong value for --with-unicode-support: $with_unicode_support - exiting!]) ;;
esac
-AM_CONDITIONAL(HAVE_LIBUNISTRING, test "x$have_libunistring" = "xyes")
-AM_CONDITIONAL(HAVE_LIBICU, test "x$have_libicu" = "xyes")
+AM_CONDITIONAL(BUILD_LIBUNISTRING_PARSER, test "x$with_unicode_support" = "xlibunistring")
+AM_CONDITIONAL(BUILD_LIBICU_PARSER, test "x$with_unicode_support" = "xlibicu")
####################################################################
# Miner Evolution
diff --git a/src/libtracker-fts/Makefile.am b/src/libtracker-fts/Makefile.am
index 62c6d7a..bb4a097 100644
--- a/src/libtracker-fts/Makefile.am
+++ b/src/libtracker-fts/Makefile.am
@@ -11,10 +11,10 @@ INCLUDES = \
$(UNAC_CFLAGS) \
$(SQLITE3_CFLAGS)
-if HAVE_LIBUNISTRING
+if BUILD_LIBUNISTRING_PARSER
INCLUDES += $(LIBUNISTRING_CFLAGS)
else
-if HAVE_LIBICU
+if BUILD_LIBICU_PARSER
INCLUDES += $(LIBICU_CFLAGS)
else
INCLUDES += $(PANGO_CFLAGS)
@@ -34,10 +34,10 @@ libtracker_fts_la_SOURCES = \
tracker-parser-utils.h \
tracker-parser.h
-if HAVE_LIBUNISTRING
+if BUILD_LIBUNISTRING_PARSER
libtracker_fts_la_SOURCES += tracker-parser-libunistring.c
else
-if HAVE_LIBICU
+if BUILD_LIBICU_PARSER
libtracker_fts_la_SOURCES += tracker-parser-libicu.c
else
libtracker_fts_la_SOURCES += tracker-parser-glib.c
@@ -53,10 +53,10 @@ libtracker_fts_la_LIBADD = \
$(UNAC_LIBS) \
$(GLIB2_LIBS)
-if HAVE_LIBUNISTRING
+if BUILD_LIBUNISTRING_PARSER
libtracker_fts_la_LIBADD += $(LIBUNISTRING_LIBS)
else
-if HAVE_LIBICU
+if BUILD_LIBICU_PARSER
libtracker_fts_la_LIBADD += $(LIBICU_LIBS)
else
libtracker_fts_la_LIBADD += $(PANGO_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]