dovecot-2.2: lib-fts requires libexttextcat actually - don't eve...

dovecot at dovecot.org dovecot at dovecot.org
Mon Apr 20 15:10:33 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/50ef619ce58a
changeset: 18426:50ef619ce58a
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Apr 20 18:08:56 2015 +0300
description:
lib-fts requires libexttextcat actually - don't even try to use textcat for it.
I'm also not sure yet if some libexttextcats are too old for it.

diffstat:

 configure.ac               |   2 ++
 src/lib-fts/fts-language.c |  15 +++++----------
 2 files changed, 7 insertions(+), 10 deletions(-)

diffs (73 lines):

diff -r 5b7e0fbd2565 -r 50ef619ce58a configure.ac
--- a/configure.ac	Mon Apr 20 18:02:31 2015 +0300
+++ b/configure.ac	Mon Apr 20 18:08:56 2015 +0300
@@ -2768,6 +2768,7 @@
   if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then
     PKG_CHECK_MODULES(LIBEXTTEXTCAT, libexttextcat)
     TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
+    AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, Define if you want exttextcat support for FTS)
     have_fts_exttextcat=yes
     # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong:
     AC_CHECK_HEADERS(libexttextcat/textcat.h)
@@ -2776,6 +2777,7 @@
       have_fts_exttextcat=yes
       AC_CHECK_HEADERS(libexttextcat/textcat.h)
       LIBEXTTEXTCAT_LIBS=-lexttextcat
+      AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, Define if you want exttextcat support for FTS)
       TEXTCAT_DATADIR="/usr/share/libexttextcat"
       AC_SUBST(LIBEXTTEXTCAT_LIBS)
     ], [
diff -r 5b7e0fbd2565 -r 50ef619ce58a src/lib-fts/fts-language.c
--- a/src/lib-fts/fts-language.c	Mon Apr 20 18:02:31 2015 +0300
+++ b/src/lib-fts/fts-language.c	Mon Apr 20 18:08:56 2015 +0300
@@ -8,13 +8,8 @@
 
 #ifdef HAVE_LIBEXTTEXTCAT_TEXTCAT_H
 #  include <libexttextcat/textcat.h>
-#  define HAVE_TEXTCAT
-#elif defined (HAVE_LIBTEXTCAT_TEXTCAT_H)
-#  include <libtextcat/textcat.h>
-#  define HAVE_TEXTCAT
-#elif defined (HAVE_FTS_TEXTCAT)
+#elif defined (HAVE_FTS_EXTTEXTCAT)
 #  include <textcat.h>
-#  define HAVE_TEXTCAT
 #endif
 
 #ifndef TEXTCAT_RESULT_UNKNOWN /* old textcat.h has typos */
@@ -99,7 +94,7 @@
 	struct fts_language_list *lp = *list;
 
 	*list = NULL;
-#ifdef HAVE_TEXTCAT
+#ifdef HAVE_FTS_EXTTEXTCAT
 	if (lp->textcat_handle != NULL)
 		textcat_Done(lp->textcat_handle);
 #endif
@@ -160,7 +155,7 @@
 	return *langp;
 }
 
-#ifdef HAVE_TEXTCAT
+#ifdef HAVE_FTS_EXTTEXTCAT
 static bool fts_language_match_lists(struct fts_language_list *list,
                                      candidate_t *candp, int candp_len,
                                      const struct fts_language **lang_r)
@@ -178,7 +173,7 @@
 }
 #endif
 
-#ifdef HAVE_TEXTCAT
+#ifdef HAVE_FTS_EXTTEXTCAT
 static int fts_language_textcat_init(struct fts_language_list *list)
 {
 	const char *config_path;
@@ -213,7 +208,7 @@
 			    size_t size ATTR_UNUSED,
 			    const struct fts_language **lang_r ATTR_UNUSED)
 {
-#ifdef HAVE_TEXTCAT
+#ifdef HAVE_FTS_EXTTEXTCAT
 	candidate_t *candp; /* textcat candidate result array pointer */
 	int cnt;
 	bool match = FALSE;


More information about the dovecot-cvs mailing list