1 AC_DEFUN([OPENAFS_GSS],
5 dnl Don't do this if we don't have krb5. Otherwise, if someone runs configure
6 dnl with no arguments on a system without krb5 libs, RRA_LIB_GSSAPI will fail,
7 dnl preventing the build from moving forwards.
9 dnl Also don't probe for GSSAPI if --without-gssapi was given, so we don't
10 dnl accidentally autodetect gss libs and use them.
11 AS_IF([test x"$BUILD_KRB5" = xyes && test x"$with_gssapi" != xno],
14 dnl Check for the characteristics of whatever GSSAPI we found, if we found one
16 AS_IF([test x"$GSSAPI_LIBS" != x],
19 AC_CHECK_FUNCS([gss_pseudo_random \
20 krb5_gss_register_acceptor_identity \
21 gss_krb5_ccache_name])
22 RRA_LIB_GSSAPI_RESTORE])
23 AC_SUBST([BUILD_GSSAPI])
25 dnl Determine if we should build rxgk
27 AS_IF([test x"$BUILD_GSSAPI" = xyes],
29 dnl At this point, we're not using any GSS-API bits yet, but we'll need
30 dnl gss_pseudo_random() in the future
31 AS_IF([test x"$ac_cv_func_gss_pseudo_random" != xyes],
32 [AC_MSG_NOTICE([GSS-API does not have gss_pseudo_random, this may break in the future])])])
33 AC_SUBST([BUILD_RXGK])
34 AS_IF([test x"$BUILD_RXGK" = xyes],
35 [AC_DEFINE([BUILD_RXGK], [1], [Build rxgk])])
37 dnl Determine if we should enable rxgk support (note that this is a different
38 dnl decision than whether we should build rxgk)
44 AS_IF([test "$enable_rxgk" = yes],
45 [AS_IF([test "$BUILD_RXGK" = yes],
47 RXGK_LIBS="\$(top_builddir)/src/rxgk/liboafs_rxgk.la"
48 RXGK_LIBS_RPC="\$(top_builddir)/src/rxgk/librxgk_pic.la"
49 RXGK_CFLAGS="\$(CPPFLAGS_gssapi)"
50 RXGK_GSSAPI_LIBS="\$(LDFLAGS_gssapi) \$(LIB_gssapi)"
51 AC_DEFINE([ENABLE_RXGK], [1],
52 [Build rxgk support into applications])],
54 [AC_MSG_ERROR([Insufficient GSS-API support to enable rxgk])])],
57 AC_SUBST([ENABLE_RXGK])
59 AC_SUBST([RXGK_LIBS_RPC])
60 AC_SUBST([RXGK_CFLAGS])
61 AC_SUBST([RXGK_GSSAPI_LIBS])])