From 1b8d4b26b6289de60d5ec6fbc53ae9a318fc60d2 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Tue, 24 Sep 2002 13:41:51 +0000 Subject: * THANKS: Remove duplicate. * NEWS: Bring in cosmetic changes from stable branch. * configure.ac: Figure out whether the LDAP library supports ldap_get_option, ld_errno, or neither. --- configure.ac | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 26e5250a8..f48e1b3ca 100644 --- a/configure.ac +++ b/configure.ac @@ -383,6 +383,46 @@ if test "$try_ldap" = yes ; then if test "$gnupg_cv_func_ldap_init" = yes || \ test "$gnupg_cv_func_ldaplber_init" = yes ; then GPGKEYS_LDAP="gpgkeys_ldap" + + AC_MSG_CHECKING([whether LDAP supports ldap_get_option]) + + if test "$gnupg_cv_func_ldap_init" = yes ; then + AC_TRY_LINK([#include ], + [ldap_get_option((void *)0,0,(void *)0);], + [gnupg_cv_func_ldap_get_option=yes], + [gnupg_cv_func_ldap_get_option=no]) + else + AC_TRY_LINK([#include +#include ],[ldap_get_option((void *)0,0,(void *)0);], + [gnupg_cv_func_ldap_get_option=yes], + [gnupg_cv_func_ldap_get_option=no]) + fi + + AC_MSG_RESULT([$gnupg_cv_func_ldap_get_option]) + + if test "$gnupg_cv_func_ldap_get_option" = yes ; then + AC_DEFINE(HAVE_LDAP_GET_OPTION,1,[Define if the LDAP library has ldap_get_option]) + else + AC_MSG_CHECKING([whether LDAP supports ld_errno]) + + if test "$gnupg_cv_func_ldap_init" = yes ; then + AC_TRY_COMPILE([#include ], + [LDAP *ldap; ldap->ld_errno;], + [gnupg_cv_func_ldap_ld_errno=yes], + [gnupg_cv_func_ldap_ld_errno=no]) + else + AC_TRY_LINK([#include +#include ],[LDAP *ldap; ldap->ld_errno;], + [gnupg_cv_func_ldap_ld_errno=yes], + [gnupg_cv_func_ldap_ld_errno=no]) + fi + + AC_MSG_RESULT([$gnupg_cv_func_ldap_ld_errno]) + + if test "$gnupg_cv_func_ldap_ld_errno" = yes ; then + AC_DEFINE(HAVE_LDAP_LD_ERRNO,1,[Define if the LDAP library supports ld_errno]) + fi + fi fi LIBS=$_ldap_save_libs -- cgit v1.2.3