check for rfc5587 before building gs2
[cyrus-sasl.git] / configure
index 40a5f30..0dc2660 100755 (executable)
--- a/configure
+++ b/configure
@@ -19003,6 +19003,21 @@ _ACEOF
 fi
 rm -f -r conftest*
 
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
+  rfc5587=yes
+fi
+rm -f -r conftest*
+
   elif test "$ac_cv_header_gssapi_gssapi_h"; then
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19023,6 +19038,21 @@ _ACEOF
 fi
 rm -f -r conftest*
 
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
+  rfc5587=yes
+fi
+rm -f -r conftest*
+
   fi
 fi
 
@@ -19097,10 +19127,14 @@ if test $ac_cv_lib_resolv_res_search = yes; then
   GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
 fi
 
-  SASL_MECHS="$SASL_MECHS libgs2.la libgssapiv2.la"
-  SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o gssapi.o"
-  SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gs2.c ../plugins/gssapi.c"
-
+  SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+  SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+  SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+  if test "$rfc5587" = "yes"; then
+    SASL_MECHS="$SASL_MECHS libgs2.la"
+    SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
+    SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gs2.c"
+  fi
   cmu_save_LIBS="$LIBS"
   LIBS="$LIBS $GSSAPIBASE_LIBS"