1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

build: Use LDAP_DEPRECATED to detect ldap library.

* m4/ldap.m4: Define LDAP_DEPRECATED when test.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-09-15 11:21:28 +09:00
parent 7a936505dc
commit ddc6f7d194
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -44,6 +44,7 @@ if test x$_ldap_with != xno ; then
#include <winsock2.h>
#include <winldap.h>
#else
#define LDAP_DEPRECATED 1
#include <ldap.h>
#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 <lber.h>
#define LDAP_DEPRECATED 1
#include <ldap.h>]],[[ldap_open("foobar",1234);]])],
[gnupg_cv_func_ldaplber_init=yes],[gnupg_cv_func_ldaplber_init=no])
AC_MSG_RESULT([$gnupg_cv_func_ldaplber_init])