summaryrefslogtreecommitdiff
path: root/src/external
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-05-06 14:31:30 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-05-06 10:24:37 -0400
commitbfbf5cb0f00c60c0f000f56c282377b13b9a89ab (patch)
treef549ede04872bc13912cfdbe9b86eabc473117cb /src/external
parentd818283d39d56204ffe710b6c9b83a2cf497f946 (diff)
downloadsssd-bfbf5cb0f00c60c0f000f56c282377b13b9a89ab.tar.gz
sssd-bfbf5cb0f00c60c0f000f56c282377b13b9a89ab.tar.bz2
sssd-bfbf5cb0f00c60c0f000f56c282377b13b9a89ab.zip
Add support for openldap24 package on RHEL 5.7
Diffstat (limited to 'src/external')
-rw-r--r--src/external/ldap.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/src/external/ldap.m4 b/src/external/ldap.m4
index 87d95fa8..b56eb340 100644
--- a/src/external/ldap.m4
+++ b/src/external/ldap.m4
@@ -9,11 +9,31 @@ dnl ---------------------------------------------------------------------------
dnl - Check for Mozilla LDAP or OpenLDAP SDK
dnl ---------------------------------------------------------------------------
+for p in /usr/include/openldap24; do
+ if test -f "${p}/ldap.h"; then
+ OPENLDAP_CFLAGS="${OPENLDAP_CFLAGS} -I${p}"
+ break;
+ fi
+done
+
+for p in /usr/lib64/openldap24 /usr/lib/openldap24; do
+ if test -f "${p}/libldap.so"; then
+ OPENLDAP_LIBS="${OPENLDAP_LIBS} -L${p}"
+ break;
+ fi
+done
+
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+CFLAGS="$CFLAGS $OPENLDAP_CFLAGS"
+LIBS="$LIBS $OPENLDAP_LIBS"
AC_CHECK_LIB(ldap, ldap_search, with_ldap=yes)
dnl Check for other libraries we need to link with to get the main routines.
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes], , -llber) }
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes], , -llber -lkrb) }
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes], , -llber -lkrb -ldes) }
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
dnl Recently, we need -lber even though the main routines are elsewhere,
dnl because otherwise be get link errors w.r.t. ber_pvt_opt_on. So just
dnl check for that (it's a variable not a fun but that doesn't seem to
@@ -38,6 +58,7 @@ else
fi
AC_SUBST(OPENLDAP_LIBS)
+AC_SUBST(OPENLDAP_CFLAGS)
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS