rxgk: Do not require gss_pseudo_random
[openafs.git] / src / cf / gss.m4
1 AC_DEFUN([OPENAFS_GSS],
2 dnl Probe for GSSAPI
3   [RRA_LIB_GSSAPI
4 dnl Check for the characteristics of whatever GSSAPI we found, if we found one
5   BUILD_GSSAPI=no
6   AS_IF([test x"$GSSAPI_LIBS" != x],
7       [BUILD_GSSAPI=yes
8        RRA_LIB_GSSAPI_SWITCH
9        AC_CHECK_FUNCS([gss_pseudo_random \
10                        krb5_gss_register_acceptor_identity \
11                        gss_krb5_ccache_name])
12        RRA_LIB_GSSAPI_RESTORE])
13   AC_SUBST([BUILD_GSSAPI])
14
15 dnl Determine if we should build rxgk
16   BUILD_RXGK=no
17   AS_IF([test x"$BUILD_GSSAPI" = xyes],
18     [BUILD_RXGK=yes
19 dnl At this point, we're not using any GSS-API bits yet, but we'll need
20 dnl gss_pseudo_random() in the future
21      AS_IF([test x"$ac_cv_func_gss_pseudo_random" != xyes],
22        [AC_MSG_NOTICE([GSS-API does not have gss_pseudo_random, this may break in the future])])])
23   AC_SUBST([BUILD_RXGK])
24   AS_IF([test x"$BUILD_RXGK" = xyes],
25         [AC_DEFINE([BUILD_RXGK], [1], [Build rxgk])])
26
27 dnl Determine if we should enable rxgk support (note that this is a different
28 dnl decision than whether we should build rxgk)
29   ENABLE_RXGK="no"
30   RXGK_LIBS=""
31   RXGK_LIBS_RPC=""
32   RXGK_CFLAGS=""
33   RXGK_GSSAPI_LIBS=""
34   AS_IF([test "$enable_rxgk" = yes],
35     [AS_IF([test "$BUILD_RXGK" = yes],
36        [ENABLE_RXGK="yes"
37         RXGK_LIBS="\$(top_builddir)/src/rxgk/liboafs_rxgk.la"
38         RXGK_LIBS_RPC="\$(top_builddir)/src/rxgk/librxgk_pic.la"
39         RXGK_CFLAGS="\$(CPPFLAGS_gssapi)"
40         RXGK_GSSAPI_LIBS="\$(LDFLAGS_gssapi) \$(LIB_gssapi)"
41         AC_DEFINE([ENABLE_RXGK], [1],
42                   [Build rxgk support into applications])],
43
44        [AC_MSG_ERROR([Insufficient GSS-API support to enable rxgk])])],
45     [ENABLE_RXGK="no"])
46
47   AC_SUBST([ENABLE_RXGK])
48   AC_SUBST([RXGK_LIBS])
49   AC_SUBST([RXGK_LIBS_RPC])
50   AC_SUBST([RXGK_CFLAGS])
51   AC_SUBST([RXGK_GSSAPI_LIBS])])