mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
Add SASL version check. Require Cyrus 1.5, disallow any other versions.
This commit is contained in:
parent
0f4bd59303
commit
254b3ef020
@ -1165,3 +1165,21 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
|
||||
fi
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
dnl --------------------------------------------------------------------
|
||||
dnl Check for Cyrus SASL version compatility, need 1.5.x, can't use 2.x
|
||||
AC_DEFUN([OL_SASL_COMPAT],
|
||||
[AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[
|
||||
AC_EGREP_CPP(__sasl_compat,[
|
||||
#ifdef HAVE_SASL_SASL_H
|
||||
#include <sasl/sasl.h>
|
||||
#else
|
||||
#include <sasl.h>
|
||||
#endif
|
||||
|
||||
/* require 1.5.x, unable to use 2.x */
|
||||
#if SASL_VERSION_MAJOR == 1 && SASL_VERSION_MINOR >= 5
|
||||
char *__sasl_compat = "1.5.x okay";
|
||||
#endif
|
||||
], [ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
|
||||
])
|
||||
|
@ -1842,6 +1842,11 @@ if test $ol_with_cyrus_sasl != no ; then
|
||||
if test $have_cyrus_sasl != no ; then
|
||||
SASL_LIBS="-lsasl"
|
||||
AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
|
||||
OL_SASL_COMPAT
|
||||
if test $ol_cv_sasl_compat = no ; then
|
||||
ol_link_sasl=no
|
||||
AC_MSG_ERROR([Cyrus SASL library located but incompatible])
|
||||
fi
|
||||
ol_link_sasl=yes
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user