From: Timo Sirainen Date: Thu, 2 Apr 2015 23:53:45 +0000 (+0900) Subject: configure: Added --with-textcat parameter X-Git-Tag: 2.2.17.rc1~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e94ce0c7fbcd43345c3344d3c1d7f4e29d462ca5;p=thirdparty%2Fdovecot%2Fcore.git configure: Added --with-textcat parameter --- diff --git a/configure.ac b/configure.ac index ae8096b1e6..f8145edfbc 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,11 @@ AS_HELP_STRING([--with-stemmer], [Build with libstemmer support (for CLucene) (a 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 @@ if test "$want_lucene" = "yes"; then 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])