Add SASL version check. Require Cyrus 1.5, disallow any other versions.

This commit is contained in:
Howard Chu 2002-08-28 07:51:41 +00:00
parent 0f4bd59303
commit 254b3ef020
2 changed files with 23 additions and 0 deletions

View File

@ -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])])
])

View File

@ -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