Ticket #52 (closed enhancement: fixed)
Make the database drivers loadable modules
| Reported by: | smoku | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | storage |
| Version: | 2.1 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
When creating a binary distribution of jabberd2 (e.g. RPM or deb) you can never know which database backend the user wants to use for storage and authreg. So the options are to either go with a default and force the user who wants to use something else to rebuild the package, or include as many database drivers as possible, and force the user to install all database library packages jabberd is linked against, even if they aren't actually being used in his setup. Both situations are not what a user can expect from a binary package.
To overcome this dilemma, I've turned the database drivers into dynamically loadable modules, so that only the database modules that are actually used by c2s and sm get loaded and add their runtime dependencies to jabberd.
This has so far only been tested on Linux, but I expect it to work everywhere where dlopen is supported. If support for a wider range of platforms is needed, I could try to use libltdl that comes with libtool.
