On Mon, Sep 24, 2012 at 12:18:36PM +0200, Sumit Bose wrote:
> On Sun, Sep 23, 2012 at 09:10:04PM +0200, Jakub Hrozek wrote:
> > To test, remove the openldap24 RPMs on RHEL5 systems and attempt to
> > build the SSSD. Without the patch, compilation fails because there's no
> > LDAPDerefRes. With the patch, the build process fails during configure.
> > 
> > https://fedorahosted.org/sssd/ticket/1317
> 
> ACK, because I assume that LDAPDerefRes was introduced in OpenLDAP
> together with, ldap_create_deref_control_value(),
> ldap_parse_derefresponse_control() and ldap_derefresponse_free(). But if
> time permits I wouldn't mind if you want to add those calls to
> AC_CHECK_FUNCS in src/external/ldap.m4 as well.
> 
> bye,
> Sumit

Sure, attached.
>From 38bd9d6e1edf6150caeaa91b3f6f1b6be5a8b4be Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Sat, 22 Sep 2012 08:32:41 +0200
Subject: [PATCH] Detect LDAPDerefRes in configure script

https://fedorahosted.org/sssd/ticket/1317
---
 src/external/ldap.m4 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/external/ldap.m4 b/src/external/ldap.m4
index 
f2435094375399afcc9717fb15fa264d67eabdc4..8899df9d7c73dae25b97347022651d768986333e
 100644
--- a/src/external/ldap.m4
+++ b/src/external/ldap.m4
@@ -64,7 +64,10 @@ SAVE_CFLAGS=$CFLAGS
 SAVE_LIBS=$LIBS
 CFLAGS="$CFLAGS $OPENLDAP_CFLAGS"
 LIBS="$LIBS $OPENLDAP_LIBS"
-AC_CHECK_FUNCS([ldap_control_create ldap_init_fd])
+AC_CHECK_FUNCS([ldap_control_create ldap_init_fd \
+                ldap_create_deref_control_value  \
+                ldap_parse_derefresponse_control \
+                ldap_derefresponse_free])
 AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg],
                  [AC_RUN_IFELSE(
                    [AC_LANG_PROGRAM(
@@ -79,6 +82,11 @@ AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg],
                    [])],
                  [], [[#include <ldap.h>]])
 
+AC_CHECK_TYPE([LDAPDerefRes],
+              [],
+              [AC_MSG_ERROR([The OpenLDAP version found does not contain the 
required type LDAPDerefRes])],
+              [[#include <ldap.h>]])
+
 CFLAGS=$SAVE_CFLAGS
 LIBS=$SAVE_LIBS
 
-- 
1.7.11.4

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to