From: Marco Bettini Date: Mon, 22 Jan 2024 16:42:35 +0000 (+0000) Subject: lib-storage: Add lang-user to Makefile X-Git-Tag: 2.4.1~1003 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83e048f6ab9eb4b06c2fd392273b136706c406b4;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Add lang-user to Makefile Also, switch fts-plugin from static linking to dynamic. Otherwise static variables in filters and tokenizers modules end up with duplicated/split storage. --- diff --git a/src/config/Makefile.am b/src/config/Makefile.am index 7640ef241b..8bd38c9e35 100644 --- a/src/config/Makefile.am +++ b/src/config/Makefile.am @@ -19,6 +19,7 @@ AM_CPPFLAGS = \ -DPKG_RUNDIR=\""$(rundir)"\" \ -DPKG_STATEDIR=\""$(statedir)"\" \ -DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \ + -DDATADIR=\"$(pkgdatadir)\" \ -DEXAMPLE_CONFIG_DIR=\""$(exampledir)"\" \ -DMODULEDIR=\""$(moduledir)"\" \ -DSSLDIR=\""$(ssldir)\"" \ diff --git a/src/lib-language/Makefile.am b/src/lib-language/Makefile.am index 66cf965262..1c68a3f50f 100644 --- a/src/lib-language/Makefile.am +++ b/src/lib-language/Makefile.am @@ -5,6 +5,7 @@ noinst_LTLIBRARIES = liblanguage.la # in lang-tokenizer-generic.c AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib-settings \ -I$(top_srcdir)/src/lib-test \ -I$(top_srcdir)/src/lib-mail \ -I$(top_srcdir)/src/lib-language \ @@ -92,6 +93,7 @@ liblanguage_la_SOURCES = \ lang-tokenizer-address.c \ lang-tokenizer-common.c \ lang-tokenizer-generic.c \ + lang-settings.c \ $(ICU_SOURCES) headers = \ @@ -106,7 +108,8 @@ headers = \ lang-tokenizer-common.h \ lang-tokenizer-private.h \ lang-tokenizer-generic-private.h \ - lang-indexer-status.h + lang-indexer-status.h \ + lang-settings.h pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) @@ -135,8 +138,8 @@ test_lang_icu_LDADD = lang-icu.lo $(LIBICU_LIBS) $(test_libs) test_lang_icu_DEPENDENCIES = lang-icu.lo $(test_deps) test_lang_filter_SOURCES = test-lang-filter.c -test_lang_filter_LDADD = liblanguage.la $(test_libs) -test_lang_filter_DEPENDENCIES = liblanguage.la $(test_deps) +test_lang_filter_LDADD = liblanguage.la ../lib-settings/libsettings.la $(test_libs) +test_lang_filter_DEPENDENCIES = liblanguage.la ../lib-settings/libsettings.la $(test_deps) if BUILD_LANG_EXTTEXTCAT TEST_LANGUAGE = test-language @@ -146,8 +149,8 @@ test_language_DEPENDENCIES = $(test_deps) endif test_lang_tokenizer_SOURCES = test-lang-tokenizer.c -test_lang_tokenizer_LDADD = lang-tokenizer.lo lang-tokenizer-generic.lo lang-tokenizer-address.lo lang-tokenizer-common.lo ../lib-mail/libmail.la $(test_libs) -test_lang_tokenizer_DEPENDENCIES = ../lib-mail/libmail.la $(test_deps) +test_lang_tokenizer_LDADD = liblanguage.la ../lib-settings/libsettings.la ../lib-mail/libmail.la $(test_libs) +test_lang_tokenizer_DEPENDENCIES = liblanguage.la ../lib-settings/libsettings.la ../lib-mail/libmail.la $(test_deps) check-local: for bin in $(test_programs); do \ diff --git a/src/lib-language/lang-settings.c b/src/lib-language/lang-settings.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/lib-language/lang-settings.h b/src/lib-language/lang-settings.h new file mode 100644 index 0000000000..41c56f5875 --- /dev/null +++ b/src/lib-language/lang-settings.h @@ -0,0 +1,17 @@ +#ifndef LANG_SETTINGS_H +#define LANG_SETTINGS_H + +#include "array.h" + +ARRAY_DEFINE_TYPE(lang_settings, struct lang_settings *); +struct lang_settings { + pool_t pool; +}; + +struct langs_settings { + pool_t pool; +}; + +extern const struct setting_parser_info langs_setting_parser_info; + +#endif diff --git a/src/lib-storage/Makefile.am b/src/lib-storage/Makefile.am index 497629f98e..81037ed24e 100644 --- a/src/lib-storage/Makefile.am +++ b/src/lib-storage/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-master \ -I$(top_srcdir)/src/lib-settings \ -I$(top_srcdir)/src/lib-charset \ + -I$(top_srcdir)/src/lib-language \ -I$(top_srcdir)/src/lib-mail \ -I$(top_srcdir)/src/lib-smtp \ -I$(top_srcdir)/src/lib-imap \ @@ -65,6 +66,7 @@ libstorage_la_SOURCES = \ mailbox-tree.c \ mailbox-uidvalidity.c \ mailbox-watch.c \ + lang-user.c \ test-mail-storage-common.c headers = \ @@ -102,6 +104,7 @@ headers = \ mailbox-tree.h \ mailbox-uidvalidity.h \ mailbox-watch.h \ + lang-user.h \ test-mail-storage-common.h shlibs = \ @@ -118,7 +121,8 @@ shlibs = \ list/libstorage_list.la \ index/libstorage_index.la \ ../lib-index/libindex.la \ - ../lib-imap-storage/libimap-storage.la + ../lib-imap-storage/libimap-storage.la \ + ../lib-language/liblanguage.la libstorage_la_LIBADD = $(shlibs) libstorage_la_DEPENDENCIES = $(shlibs) diff --git a/src/plugins/fts/Makefile.am b/src/plugins/fts/Makefile.am index 8831a74cfe..49d96b67f9 100644 --- a/src/plugins/fts/Makefile.am +++ b/src/plugins/fts/Makefile.am @@ -22,7 +22,7 @@ lib20_fts_plugin_la_LDFLAGS = -module -avoid-version module_LTLIBRARIES = \ lib20_fts_plugin.la -lib20_fts_plugin_la_LIBADD = ../../lib-language/liblanguage.la +lib20_fts_plugin_la_LIBADD = ../../lib-language/libdovecot-language.la lib20_fts_plugin_la_SOURCES = \ fts-api.c \