mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
configure.ac: Try and link to a sample LDAP program to check if the LDAP
we're about to use is really sane. The most common problem (using a very old OpenLDAP), could be fixed with an extra #include, but this would not be very portable to other LDAP libraries.
This commit is contained in:
parent
77dbf12bc3
commit
4735060540
@ -1,3 +1,11 @@
|
||||
2002-04-30 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* configure.ac: Try and link to a sample LDAP program to check if
|
||||
the LDAP we're about to use is really sane. The most common
|
||||
problem (using a very old OpenLDAP), could be fixed with an extra
|
||||
#include, but this would not be very portable to other LDAP
|
||||
libraries.
|
||||
|
||||
2002-04-29 Werner Koch <wk@gnupg.org>
|
||||
|
||||
Released 1.0.7.
|
||||
|
19
configure.ac
19
configure.ac
@ -273,10 +273,25 @@ if test "$NO_PIC" = yes; then
|
||||
try_dynload=no
|
||||
fi
|
||||
|
||||
# Try and link a LDAP test program to weed out unusable LDAP libraries
|
||||
|
||||
if test "$try_ldap" = yes ; then
|
||||
AC_CHECK_LIB(ldap,ldap_init,
|
||||
[GPGKEYS_LDAP="gpgkeys_ldap"],,-llber -lresolv)
|
||||
_ldap_save_libs=$LIBS
|
||||
LIBS="-lldap -llber -lresolv $LIBS"
|
||||
|
||||
AC_CACHE_CHECK([whether LDAP is sane],
|
||||
[gnupg_cv_func_ldap_init],
|
||||
[AC_TRY_LINK([#include <ldap.h>],
|
||||
[ldap_open("foobar",1234);],
|
||||
[gnupg_cv_func_ldap_init=yes],
|
||||
[gnupg_cv_func_ldap_init=no])])
|
||||
|
||||
if test $gnupg_cv_func_ldap_init = yes; then
|
||||
GPGKEYS_LDAP="gpgkeys_ldap"
|
||||
fi
|
||||
|
||||
LIBS=$_ldap_save_libs
|
||||
fi
|
||||
AC_SUBST(GPGKEYS_LDAP)
|
||||
|
||||
if test "$try_mailto" = yes ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user