changeset 10010:399d769e593c HEAD

plugins: Added dependencies. The dependencies can only be checked if the dlopen() can successfully open the module, so use (apparently) non-portable ltlibrary linking to force the libraries we depend on to load with us.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Oct 2009 21:22:12 -0400
parents bdd87f9ccccf
children 80a99cd5148f
files src/plugins/fts-solr/Makefile.am src/plugins/fts-solr/fts-solr-plugin.c src/plugins/fts-solr/fts-solr-plugin.h src/plugins/fts-squat/Makefile.am src/plugins/fts-squat/fts-squat-plugin.c src/plugins/fts-squat/fts-squat-plugin.h src/plugins/imap-acl/Makefile.am src/plugins/imap-acl/imap-acl-plugin.c src/plugins/imap-acl/imap-acl-plugin.h src/plugins/imap-quota/Makefile.am src/plugins/imap-quota/imap-quota-plugin.c src/plugins/imap-quota/imap-quota-plugin.h src/plugins/mail-log/Makefile.am src/plugins/mail-log/mail-log-plugin.c src/plugins/mail-log/mail-log-plugin.h src/plugins/trash/Makefile.am src/plugins/trash/trash-plugin.c src/plugins/trash/trash-plugin.h
diffstat 18 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/fts-solr/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-solr/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -12,6 +12,7 @@
 	lib21_fts_solr_plugin.la
 
 lib21_fts_solr_plugin_la_LIBADD = \
+	../fts/lib20_fts_plugin.la \
 	$(CURL_LIBS) -lexpat
 
 lib21_fts_solr_plugin_la_SOURCES = \
--- a/src/plugins/fts-solr/fts-solr-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-solr/fts-solr-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -83,3 +83,5 @@
 	fts_backend_unregister(fts_backend_solr.name);
 	hook_mail_user_created = fts_solr_next_hook_mail_user_created;
 }
+
+const char *fts_solr_plugin_dependencies[] = { "fts", NULL };
--- a/src/plugins/fts-solr/fts-solr-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-solr/fts-solr-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -18,6 +18,7 @@
 	struct fts_solr_settings set;
 };
 
+extern const char *fts_solr_plugin_dependencies[];
 extern struct fts_backend fts_backend_solr;
 extern MODULE_CONTEXT_DEFINE(fts_solr_user_module, &mail_user_module_register);
 
--- a/src/plugins/fts-squat/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-squat/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -10,6 +10,9 @@
 module_LTLIBRARIES = \
 	lib21_fts_squat_plugin.la
 
+lib21_fts_squat_plugin_la_LIBADD = \
+	../fts/lib20_fts_plugin.la
+
 lib21_fts_squat_plugin_la_SOURCES = \
 	fts-squat-plugin.c \
 	fts-backend-squat.c \
--- a/src/plugins/fts-squat/fts-squat-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-squat/fts-squat-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -14,3 +14,5 @@
 {
 	fts_backend_unregister(fts_backend_squat.name);
 }
+
+const char *fts_squat_plugin_dependencies[] = { "fts", NULL };
--- a/src/plugins/fts-squat/fts-squat-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/fts-squat/fts-squat-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -3,6 +3,7 @@
 
 #include "fts-api-private.h"
 
+extern const char *fts_squat_plugin_dependencies[];
 extern struct fts_backend fts_backend_squat;
 
 void fts_squat_plugin_init(void);
--- a/src/plugins/imap-acl/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-acl/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -14,6 +14,9 @@
 imap_module_LTLIBRARIES = \
 	lib02_imap_acl_plugin.la
 
+lib02_imap_acl_plugin_la_LIBADD = \
+	../acl/lib01_acl_plugin.la
+
 lib02_imap_acl_plugin_la_SOURCES = \
 	imap-acl-plugin.c
 
--- a/src/plugins/imap-acl/imap-acl-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-acl/imap-acl-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -643,3 +643,5 @@
 
 	hook_client_created = next_hook_client_created;
 }
+
+const char *imap_acl_plugin_dependencies[] = { "acl", NULL };
--- a/src/plugins/imap-acl/imap-acl-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-acl/imap-acl-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -1,6 +1,8 @@
 #ifndef IMAP_ACL_PLUGIN_H
 #define IMAP_ACL_PLUGIN_H
 
+extern const char *imap_acl_plugin_dependencies[];
+
 void imap_acl_plugin_init(void);
 void imap_acl_plugin_deinit(void);
 
--- a/src/plugins/imap-quota/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-quota/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -13,6 +13,9 @@
 imap_module_LTLIBRARIES = \
 	lib11_imap_quota_plugin.la
 
+lib11_imap_quota_plugin_la_LIBADD = \
+	../quota/lib10_quota_plugin.la
+
 lib11_imap_quota_plugin_la_SOURCES = \
 	imap-quota-plugin.c
 
--- a/src/plugins/imap-quota/imap-quota-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-quota/imap-quota-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -223,3 +223,5 @@
 
 	hook_client_created = next_hook_client_created;
 }
+
+const char *imap_quota_plugin_dependencies[] = { "quota", NULL };
--- a/src/plugins/imap-quota/imap-quota-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/imap-quota/imap-quota-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -1,6 +1,8 @@
 #ifndef IMAP_QUOTA_PLUGIN_H
 #define IMAP_QUOTA_PLUGIN_H
 
+extern const char *imap_quota_plugin_dependencies[];
+
 void imap_quota_plugin_init(void);
 void imap_quota_plugin_deinit(void);
 
--- a/src/plugins/mail-log/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/mail-log/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -13,6 +13,9 @@
 module_LTLIBRARIES = \
 	lib20_mail_log_plugin.la
 
+lib20_mail_log_plugin_la_LIBADD = \
+	../notify/lib15_notify_plugin.la
+
 lib20_mail_log_plugin_la_SOURCES = \
 	mail-log-plugin.c
 
--- a/src/plugins/mail-log/mail-log-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/mail-log/mail-log-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -430,3 +430,5 @@
 {
 	notify_unregister(mail_log_ctx);
 }
+
+const char *mail_log_plugin_dependencies[] = { "notify", NULL };
--- a/src/plugins/mail-log/mail-log-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/mail-log/mail-log-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -1,6 +1,8 @@
 #ifndef MAIL_LOG_PLUGIN_H
 #define MAIL_LOG_PLUGIN_H
 
+extern const char *mail_log_plugin_dependencies[];
+
 void mail_log_plugin_init(void);
 void mail_log_plugin_deinit(void);
 
--- a/src/plugins/trash/Makefile.am	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/trash/Makefile.am	Thu Oct 08 21:22:12 2009 -0400
@@ -10,6 +10,9 @@
 module_LTLIBRARIES = \
 	lib11_trash_plugin.la
 
+lib11_trash_plugin_la_LIBADD = \
+	../quota/lib10_quota_plugin.la
+
 lib11_trash_plugin_la_SOURCES = \
 	trash-plugin.c
 
--- a/src/plugins/trash/trash-plugin.c	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/trash/trash-plugin.c	Thu Oct 08 21:22:12 2009 -0400
@@ -333,3 +333,5 @@
 {
 	hook_mail_namespaces_created = trash_hook_mail_namespaces_created;
 }
+
+const char *trash_plugin_dependencies[] = { "quota", NULL };
--- a/src/plugins/trash/trash-plugin.h	Thu Oct 08 21:19:29 2009 -0400
+++ b/src/plugins/trash/trash-plugin.h	Thu Oct 08 21:22:12 2009 -0400
@@ -1,6 +1,8 @@
 #ifndef TRASH_PLUGIN_H
 #define TRASH_PLUGIN_H
 
+extern const char *trash_plugin_dependencies[];
+
 void trash_plugin_init(void);
 void trash_plugin_deinit(void);