andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 6 months ago
Clone
dc8c34
From a6b70cbf66aee7b34d4a3e4b28ca2c40c853f22e Mon Sep 17 00:00:00 2001
dc8c34
From: Noriko Hosoi <nhosoi@redhat.com>
dc8c34
Date: Wed, 20 Aug 2014 13:51:40 -0700
dc8c34
Subject: [PATCH 254/255] Ticket #47875 - dirsrv not running with old openldap
dc8c34
dc8c34
Description: Changing the function of AC_CHECK_LIB from ldif_open
dc8c34
to _init so that regardless of the contents of the library, it's
dc8c34
linked to the server if it exists.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47875
dc8c34
dc8c34
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
dc8c34
(cherry picked from commit 38c74d224c250abd907636f7d78e95775ebf63dd)
dc8c34
(cherry picked from commit 4917a5e4856c7fe0fb4f9b023c21eb64f277e319)
dc8c34
(cherry picked from commit 62ef849326a010e9a17c576817b0afc2830a8a6d)
dc8c34
---
dc8c34
 m4/openldap.m4 | 8 ++++++--
dc8c34
 1 file changed, 6 insertions(+), 2 deletions(-)
dc8c34
dc8c34
diff --git a/m4/openldap.m4 b/m4/openldap.m4
dc8c34
index 74700d7..1e297c4 100644
dc8c34
--- a/m4/openldap.m4
dc8c34
+++ b/m4/openldap.m4
dc8c34
@@ -146,8 +146,12 @@ if test "$with_openldap" = yes ; then
dc8c34
   dnl ldif functionality into libldap
dc8c34
   ldap_lib_ldif=""
dc8c34
   LDFLAGS="$LDFLAGS"
dc8c34
-  AC_CHECK_LIB([ldap$ol_libver], [ldif_open], [ldap_lib_ldif=],
dc8c34
-               [ldap_lib_ldif=-lldif$ol_libver])
dc8c34
+  AC_CHECK_LIB([ldif$ol_libver], [_init], [ldap_lib_ldif=-lldif$ol_libver],
dc8c34
+    [ldap_lib_ldif=])
dc8c34
+  if test -z "$ldap_lib_ldif" ; then
dc8c34
+    AC_CHECK_LIB([ldif], [_init], [ldap_lib_ldif=-lldif],
dc8c34
+      [ldap_lib_ldif=])
dc8c34
+  fi
dc8c34
   AC_SUBST([ldap_lib_ldif])
dc8c34
   LDFLAGS="$save_ldflags"
dc8c34
   CPPFLAGS="$save_cppflags"
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34