noinst_LTLIBRARIES = libfts.la
# I$(top_srcdir)/src/lib-fts needed to include
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-test \
-I$(top_srcdir)/src/lib-mail \
-I$(top_srcdir)/src/lib-fts \
$(LIBEXTTEXTCAT_CFLAGS) \
$(LIBICU_CFLAGS) \
-DUDHRDIR=\""$(top_srcdir)/src/lib-fts"\" \
-DDATADIR=\"$(pkgdatadir)\" \
-DTEST_STOPWORDS_DIR=\""$(top_srcdir)/src/lib-fts/stopwords"\"
stopwordsdir = $(datadir)/${PACKAGE_TARNAME}/stopwords
dist_stopwords_DATA = \
BUILT_SOURCES = $(srcdir)/word-boundary-data.c \
$(srcdir)/word-break-data.c
EXTRA_DIST = \
$(srcdir)/WordBreakProperty.txt:
test -f $@ || wget -O $@ https://dovecot.org/res/WordBreakProperty.txt
perl $(srcdir)/word-properties.pl boundaries $(srcdir)/WordBreakProperty.txt > $@
$(srcdir)/PropList.txt:
test -f $@ || wget -O $@ https://dovecot.org/res/PropList.txt
perl $(srcdir)/word-properties.pl breaks $(srcdir)/PropList.txt > $@
if BUILD_FTS_STEMMER
STEMMER_LIBS = -lstemmer
endif
if BUILD_FTS_EXTTEXTCAT
TEXTCAT_LIBS = $(LIBEXTTEXTCAT_LIBS)
else
if BUILD_FTS_TEXTCAT
TEXTCAT_LIBS = -ltextcat
endif
endif
if BUILD_LIBICU
ICU_SOURCES = fts-icu.c
NORMALIZER_LIBS = $(LIBICU_LIBS)
ICU_TESTS = test-fts-icu
endif
libfts_la_LIBADD = \
$(STEMMER_LIBS) \
$(TEXTCAT_LIBS) \
$(NORMALIZER_LIBS)
libfts_la_SOURCES = \
$(ICU_SOURCES)
headers = \
pkginc_libdir=$(pkgincludedir)
pkginc_lib_HEADERS = $(headers)
deps=../lib-dovecot/libdovecot.la
pkglib_LTLIBRARIES = libdovecot-fts.la
libdovecot_fts_la_SOURCES =
libdovecot_fts_la_LIBADD = libfts.la $(deps)
libdovecot_fts_la_DEPENDENCIES = libfts.la $(deps)
libdovecot_fts_la_LDFLAGS = -export-dynamic
test_programs = \
$(ICU_TESTS) \
$(TEST_FTS_LANGUAGE) \
test-fts-filter \
test-fts-tokenizer
noinst_PROGRAMS = $(test_programs)
test_libs = \
test_deps = $(noinst_LTLIBRARIES) $(test_libs)
test_fts_icu_SOURCES = test-fts-icu.c
test_fts_icu_LDADD = fts-icu.lo $(LIBICU_LIBS) $(test_libs)
test_fts_icu_DEPENDENCIES = fts-icu.lo $(test_deps)
test_fts_filter_SOURCES = test-fts-filter.c
test_fts_filter_LDADD = libfts.la $(test_libs)
test_fts_filter_DEPENDENCIES = libfts.la $(test_deps)
if BUILD_FTS_EXTTEXTCAT
TEST_FTS_LANGUAGE = test-fts-language
test_fts_language_SOURCES = test-fts-language.c
test_fts_language_LDADD = fts-language.lo $(test_libs) $(TEXTCAT_LIBS)
test_fts_language_DEPENDENCIES = $(test_deps)
endif
test_fts_tokenizer_SOURCES = test-fts-tokenizer.c
test_fts_tokenizer_LDADD = fts-tokenizer.lo fts-tokenizer-generic.lo fts-tokenizer-address.lo fts-tokenizer-common.lo ../lib-mail/libmail.la $(test_libs)
test_fts_tokenizer_DEPENDENCIES = ../lib-mail/libmail.la $(test_deps)
check-local:
for bin in $(test_programs); do \
if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
done