dovecot-2.2: configure: Added --with-textcat parameter

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 2 23:55:08 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/33685b996cf2
changeset: 18396:33685b996cf2
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 03 08:53:45 2015 +0900
description:
configure: Added --with-textcat parameter

diffstat:

 configure.ac |  28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diffs (45 lines):

diff -r 9e85aeb92fa8 -r 33685b996cf2 configure.ac
--- a/configure.ac	Thu Apr 02 08:12:41 2015 +0900
+++ b/configure.ac	Fri Apr 03 08:53:45 2015 +0900
@@ -164,6 +164,11 @@
   TEST_WITH(stemmer, $withval),
   want_stemmer=auto)
 
+AC_ARG_WITH(textcat,
+AS_HELP_STRING([--with-textcat], [Build with libtextcat support (for CLucene) (auto)]),
+  TEST_WITH(textcat, $withval),
+  want_textcat=auto)
+
 AC_ARG_WITH(solr,
 AS_HELP_STRING([--with-solr], [Build with Solr full text search support]),
   TEST_WITH(solr, $withval),
@@ -2742,15 +2747,20 @@
     AC_CHECK_LIB(stemmer, sb_stemmer_new, [
       have_lucene_stemmer=yes
       AC_DEFINE(HAVE_LUCENE_STEMMER,, Define if you want stemming support for CLucene)
-      AC_CHECK_LIB(textcat, special_textcat_Init, [
-	have_lucene_textcat=yes
-	AC_DEFINE(HAVE_LUCENE_TEXTCAT,, Define if you want textcat support for CLucene)
-      ], [
-        AC_CHECK_LIB(exttextcat, special_textcat_Init, [
-          have_lucene_exttextcat=yes
-          AC_DEFINE(HAVE_LUCENE_EXTTEXTCAT,, Define if you want textcat (Debian version) support for CLucene)
-        ])
-      ])
+      if test $want_textcat != no; then
+	AC_CHECK_LIB(textcat, special_textcat_Init, [
+	  have_lucene_textcat=yes
+	  AC_DEFINE(HAVE_LUCENE_TEXTCAT,, Define if you want textcat support for CLucene)
+	], [
+	  AC_CHECK_LIB(exttextcat, special_textcat_Init, [
+	    have_lucene_exttextcat=yes
+	    AC_DEFINE(HAVE_LUCENE_EXTTEXTCAT,, Define if you want textcat (Debian version) support for CLucene)
+	  ])
+	])
+        if test $want_textcat = yes && test "$have_lucene_exttextcat" != yes && test "$have_lucene_textcat" != yes; then
+	  AC_ERROR([Can't build with textcat support: libtextcat or libexttextcat not found])
+	fi
+      fi
     ], [
       if test $want_stemmer = yes; then
 	AC_ERROR([Can't build with stemmer support: libstemmer not found])


More information about the dovecot-cvs mailing list