summaryrefslogtreecommitdiff
path: root/extensions/source/config/ldap/ldapaccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/config/ldap/ldapaccess.cxx')
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 1c5e3f286..41c5e4f82 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -315,14 +315,17 @@ void LdapConnection::loadModule()
if ( !s_Ldap_Module )
{
#if defined(WIN) || defined(WNT)
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("nsldap32v50.dll"));
+# define LIBLDAP "nsldap32v50.dll"
#else
-#ifdef WITH_OPENLDAP
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap.so"));
-#else
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap50.so"));
-#endif
+# ifdef WITH_OPENLDAP
+# define xstr(s) str(s)
+# define str(s) #s
+# define LIBLDAP "libldap-" xstr(LDAP_VENDOR_VERSION_MAJOR) "." xstr(LDAP_VENDOR_VERSION_MINOR) ".so." xstr(LDAP_VENDOR_VERSION_MAJOR)
+# else
+# define LIBLDAP "libldap50.so"
+# endif
#endif
+ const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(LIBLDAP));
// load the dbtools library
s_Ldap_Module = osl_loadModuleRelative(&thisModule, sModuleName.pData, 0);