URL: https://github.com/freeipa/freeipa/pull/6135 Author: rcritten Title: #6135: [Backport][ipa-4-9] Support building against OpenLDAP 2.6+ Action: opened
PR body: """ This PR was opened automatically because PR #6134 was pushed to master and backport to ipa-4-9 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6135/head:pr6135 git checkout pr6135
From 7c97f72689a3d969d0403959e4818612a4750af7 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <aboko...@redhat.com> Date: Tue, 11 Jan 2022 16:10:24 +0200 Subject: [PATCH] Support building against OpenLDAP 2.6+ OpenLDAP 2.6 deprecated separate libldap/libldap_r, there is only one (reentrant) variant for the library. Attempt to use _r variant by default. In case it is missing, assume we are using OpenLDAP 2.6 which has libraries without _r suffix. The functions are still reentrant so there is not functional difference. Fixes: https://pagure.io/freeipa/issue/9080 Signed-off-by: Alexander Bokovoy <aboko...@redhat.com> --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index ab210fc6139..80cc9ad9d7e 100644 --- a/configure.ac +++ b/configure.ac @@ -101,9 +101,13 @@ dnl --------------------------------------------------------------------------- SAVE_CPPFLAGS=$CPPFLAGS CPPFLAGS="$NSPR_CFLAGS $NSS_CFLAGS" -AC_CHECK_LIB([ldap_r], [ldap_search], [ ], AC_MSG_ERROR([libldap_r not found])) -AC_CHECK_LIB([lber], [ber_peek_tag], [ ], AC_MSG_ERROR([liblber not found])) -LDAP_LIBS="-lldap_r -llber" +SAVE_LIBS="$LIBS" +LIBS= +AC_SEARCH_LIBS([ldap_search], [ldap_r ldap], [], [AC_MSG_ERROR([libldap or libldap_r not found])]) +AC_SEARCH_LIBS([ber_peek_tag], [lber], [], [AC_MSG_ERROR([liblber not found])]) +LDAP_LIBS="$LIBS" +LDAP_CFLAGS="" +LIBS="$SAVE_LIBS" LDAP_CFLAGS="" AC_SUBST(LDAP_LIBS) AC_SUBST(LDAP_CFLAGS)
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure