From: Howard Chu Date: Wed, 28 Aug 2002 07:51:41 +0000 (+0000) Subject: Add SASL version check. Require Cyrus 1.5, disallow any other versions. X-Git-Tag: OPENLDAP_REL_ENG_2_0_26~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=254b3ef020e6ebe20c05b9109194fdce0062460d;p=thirdparty%2Fopenldap.git Add SASL version check. Require Cyrus 1.5, disallow any other versions. --- diff --git a/build/openldap.m4 b/build/openldap.m4 index 1b29f91489..e76f7a63bc 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -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 +#else +#include +#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])]) +]) diff --git a/configure.in b/configure.in index 234cd5534d..ddc21aebf5 100644 --- a/configure.in +++ b/configure.in @@ -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