]> git.sur5r.net Git - openldap/commitdiff
Require 2.1.3 or higher for Cyrus SASL 2
authorHoward Chu <hyc@openldap.org>
Tue, 7 May 2002 23:56:59 +0000 (23:56 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 7 May 2002 23:56:59 +0000 (23:56 +0000)
build/openldap.m4
configure.in

index 81a7c8c66d8a0011afbf2953bf20c8c19b391db6..0fd68466f86d2c387f419d80208b83622c7c54c6 100644 (file)
@@ -1183,3 +1183,16 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
   fi
 ])dnl
 dnl
+dnl --------------------------------------------------------------------
+dnl Check for Cyrus SASL version compatility, need 2.1.3 or newer
+AC_DEFUN([OL_SASL2_COMPAT],
+[AC_CACHE_CHECK([Cyrus SASL 2 library version], [ol_cv_sasl2_compat],[
+       AC_EGREP_CPP(__sasl2_version_compat,[
+#include <sasl/sasl.h>
+
+/* require 2.1.3 or later */
+#if SASL_VERSION_MAJOR >= 2 && (SASL_VERSION_MINOR > 1 || SASL_VERSION_STEP > 2)
+       __sasl2_version_compat
+#endif
+       ],      [ol_cv_sasl2_compat=yes], [ol_cv_sasl2_compat=no])])
+])
index f025695d272b8af2c93c6a11a9b4b979fadbac07..53b3ee60674066aa413c2f1d85bc298ce7ccdde9 100644 (file)
@@ -2169,6 +2169,14 @@ if test $ol_with_cyrus_sasl != no ; then
                                [ol_link_sasl="-lsasl"])])
        fi
 
+       if test $ol_link_sasl = "-lsasl2"; then
+               OL_SASL2_COMPAT
+
+               if test $ol_cv_sasl2_compat = no ; then
+                       ol_link_sasl=no
+                       AC_MSG_ERROR(SASL: Cyrus SASL2 version obsolete)
+               fi
+       fi
        if test $ol_link_sasl = no ; then
                if test $ol_with_cyrus_sasl != auto ; then
                        AC_MSG_ERROR([Could not locate Cyrus SASL])