]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Use pkg-config with clucene if available.
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Jan 2013 03:49:33 +0000 (05:49 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Jan 2013 03:49:33 +0000 (05:49 +0200)
configure.ac
src/plugins/fts-lucene/Makefile.am

index 923018bbd61744178ae4d371d1d6ed2c8cfe3b5f..27cc07a5cb81502853c88bd1b105d88ee4c05b73 100644 (file)
@@ -2660,6 +2660,11 @@ AM_CONDITIONAL(BUILD_SOLR, test "$have_solr" = "yes")
 
 have_lucene=no
 if test "$want_lucene" = "yes"; then
+  PKG_CHECK_MODULES(CLUCENE, libclucene-core,, [
+    # no pkg-config file for clucene. fallback to defaults.
+    # 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
index 2c21042b568fa71aa41f2ad429bb733dd7d7d6f1..cf9db2e194a9a799b6a74960235d32ad1f7708cf 100644 (file)
@@ -8,6 +8,9 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/plugins/fts \
        -I$(top_srcdir)/src/doveadm
 
+AM_CXXFLAGS = \
+       $(CLUCENE_CFLAGS)
+
 NOPLUGIN_LDFLAGS =
 lib21_fts_lucene_plugin_la_LDFLAGS = -module -avoid-version
 lib20_doveadm_fts_lucene_plugin_la_LDFLAGS = -module -avoid-version
@@ -28,7 +31,7 @@ endif
 endif
 
 lib21_fts_lucene_plugin_la_LIBADD = \
-       -lclucene-shared -lclucene-core $(TEXTCAT_LIBS) $(STEMMER_LIBS)
+       $(CLUCENE_LIBS) $(TEXTCAT_LIBS) $(STEMMER_LIBS)
 
 lib21_fts_lucene_plugin_la_SOURCES = \
        fts-lucene-plugin.c \