From 5a797b494bd2005afd44bd8982c1bd89d1d92ab5 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 8 May 2002 23:17:25 +0000 Subject: configure.ac: If LDAP comes up unusable, try #including before giving up. Old versions of OpenLDAP require that. --- ChangeLog | 5 +++++ configure.ac | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c0f7db2c2..283b0117c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-08 David Shaw + + * configure.ac: If LDAP comes up unusable, try #including + before giving up. Old versions of OpenLDAP require that. + 2002-05-03 David Shaw * configure.ac: In g10defs.h, use \ for the directory separator diff --git a/configure.ac b/configure.ac index d5979cb6c..825ac36db 100644 --- a/configure.ac +++ b/configure.ac @@ -297,7 +297,22 @@ if test "$try_ldap" = yes ; then [gnupg_cv_func_ldap_init=yes], [gnupg_cv_func_ldap_init=no])]) - if test $gnupg_cv_func_ldap_init = yes; then + if test $gnupg_cv_func_ldap_init = no; then + AC_CACHE_CHECK([whether I can make LDAP be sane with lber.h], + [gnupg_cv_func_ldaplber_init], + [AC_TRY_LINK([#include +#include ], + [ldap_open("foobar",1234);], + [gnupg_cv_func_ldaplber_init=yes], + [gnupg_cv_func_ldaplber_init=no])]) + fi + + if test "$gnupg_cv_func_ldaplber_init" = yes ; then + AC_DEFINE(NEED_LBER_H,1,[Define if the LDAP library requires including lber.h before ldap.h]) + fi + + if test "$gnupg_cv_func_ldap_init" = yes || \ + test "$gnupg_cv_func_ldaplber_init" = yes ; then GPGKEYS_LDAP="gpgkeys_ldap" fi -- cgit v1.2.3