diff configure.ac @ 18412:1c516f905152

configure: Stemmer and textcat checks are now done even if CLucene isn't used. They'll be useful for other FTS backends as well. This patch doesn't change any actual functionality.
author Timo Sirainen <tss@iki.fi>
date Mon, 20 Apr 2015 15:12:14 +0300
parents 33685b996cf2
children 68c5e0db61db
line wrap: on
line diff
--- a/configure.ac	Mon Apr 20 15:02:04 2015 +0300
+++ b/configure.ac	Mon Apr 20 15:12:14 2015 +0300
@@ -160,12 +160,12 @@
 AM_CONDITIONAL(BUILD_LUCENE, test "$want_lucene" = "yes")
 
 AC_ARG_WITH(stemmer,
-AS_HELP_STRING([--with-stemmer], [Build with libstemmer support (for CLucene) (auto)]),
+AS_HELP_STRING([--with-stemmer], [Build with libstemmer support (for FTS) (auto)]),
   TEST_WITH(stemmer, $withval),
   want_stemmer=auto)
 
 AC_ARG_WITH(textcat,
-AS_HELP_STRING([--with-textcat], [Build with libtextcat support (for CLucene) (auto)]),
+AS_HELP_STRING([--with-textcat], [Build with libtextcat support (for FTS) (auto)]),
   TEST_WITH(textcat, $withval),
   want_textcat=auto)
 
@@ -2743,36 +2743,38 @@
     # FIXME: we should verify here that this actually works..
     CLUCENE_LIBS="-lclucene-shared -lclucene-core"
   ])
-  if test $want_stemmer != no; 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)
-      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])
-      fi
-    ])
-  fi
   have_lucene=yes
   fts="$fts lucene"
 fi
-AM_CONDITIONAL(BUILD_LUCENE_STEMMER, test "$have_lucene_stemmer" = "yes")
-AM_CONDITIONAL(BUILD_LUCENE_TEXTCAT, test "$have_lucene_textcat" = "yes")
-AM_CONDITIONAL(BUILD_LUCENE_EXTTEXTCAT, test "$have_lucene_exttextcat" = "yes")
+
+if test $want_stemmer != no; then
+  AC_CHECK_LIB(stemmer, sb_stemmer_new, [
+    have_fts_stemmer=yes
+    AC_DEFINE(HAVE_FTS_STEMMER,, Define if you want stemming support for FTS)
+  ], [
+    if test $want_stemmer = yes; then
+      AC_ERROR([Can't build with stemmer support: libstemmer not found])
+    fi
+  ])
+fi
+AM_CONDITIONAL(BUILD_FTS_STEMMER, test "$have_fts_stemmer" = "yes")
+
+if test $want_textcat != no; then
+  AC_CHECK_LIB(textcat, special_textcat_Init, [
+    have_fts_textcat=yes
+    AC_DEFINE(HAVE_FTS_TEXTCAT,, Define if you want textcat support for FTS)
+  ], [
+    AC_CHECK_LIB(exttextcat, special_textcat_Init, [
+      have_fts_exttextcat=yes
+      AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, Define if you want libexttextcat support for FTS)
+    ])
+  ])
+  if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then
+    AC_ERROR([Can't build with textcat support: libtextcat or libexttextcat not found])
+  fi
+fi
+AM_CONDITIONAL(BUILD_FTS_TEXTCAT, test "$have_fts_textcat" = "yes")
+AM_CONDITIONAL(BUILD_FTS_EXTTEXTCAT, test "$have_fts_exttextcat" = "yes")
 
 if test $have_lucene = no; then
   not_fts="$not_fts lucene"