diff --git a/m4/ldap.m4 b/m4/ldap.m4 index f92bc3ce3..92dcf8b03 100644 --- a/m4/ldap.m4 +++ b/m4/ldap.m4 @@ -44,6 +44,7 @@ if test x$_ldap_with != xno ; then #include #include #else +#define LDAP_DEPRECATED 1 #include #endif ]],[[ldap_open("foobar",1234);]])], @@ -53,6 +54,7 @@ if test x$_ldap_with != xno ; then if test $gnupg_cv_func_ldap_init = no; then AC_MSG_CHECKING([whether I can make LDAP be sane with lber.h]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#define LDAP_DEPRECATED 1 #include ]],[[ldap_open("foobar",1234);]])], [gnupg_cv_func_ldaplber_init=yes],[gnupg_cv_func_ldaplber_init=no]) AC_MSG_RESULT([$gnupg_cv_func_ldaplber_init])