From: Timo Sirainen Date: Fri, 4 Jan 2013 03:49:33 +0000 (+0200) Subject: configure: Use pkg-config with clucene if available. X-Git-Tag: 2.2.beta1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bfa4f4e042def419b7b80b05f7d2cf5d0f9f6a0;p=thirdparty%2Fdovecot%2Fcore.git configure: Use pkg-config with clucene if available. --- diff --git a/configure.ac b/configure.ac index 923018bbd6..27cc07a5cb 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/plugins/fts-lucene/Makefile.am b/src/plugins/fts-lucene/Makefile.am index 2c21042b56..cf9db2e194 100644 --- a/src/plugins/fts-lucene/Makefile.am +++ b/src/plugins/fts-lucene/Makefile.am @@ -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 \