]> git.sur5r.net Git - openldap/commitdiff
Add SASL version check. Require Cyrus 1.5, disallow any other versions.
authorHoward Chu <hyc@openldap.org>
Wed, 28 Aug 2002 07:51:41 +0000 (07:51 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 28 Aug 2002 07:51:41 +0000 (07:51 +0000)
build/openldap.m4
configure.in

index 1b29f91489ab13a3fb83e7578b7f327cb9c31a96..e76f7a63bc767d74b472bc20d7d2b7d705b73a67 100644 (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])])
+])
index 234cd5534d679a52f223363dbd5b8bae71ebecce..ddc21aebf5e5e81b54258757e26a0a592d96037f 100644 (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