venus: Remove dedebug
[openafs.git] / src / cf / gss.m4
1 AC_DEFUN([OPENAFS_GSS],
2   [
3 dnl Probe for GSSAPI
4 dnl
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.
8 dnl
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],
12         [RRA_LIB_GSSAPI])
13
14 dnl Check for the characteristics of whatever GSSAPI we found, if we found one
15   BUILD_GSSAPI=no
16   AS_IF([test x"$GSSAPI_LIBS" != x],
17       [BUILD_GSSAPI=yes
18        RRA_LIB_GSSAPI_SWITCH
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])
24
25 dnl Determine if we should build rxgk
26   BUILD_RXGK=no
27   AS_IF([test x"$BUILD_GSSAPI" = xyes],
28     [BUILD_RXGK=yes
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])])
36
37 dnl Determine if we should enable rxgk support (note that this is a different
38 dnl decision than whether we should build rxgk)
39   ENABLE_RXGK="no"
40   RXGK_LIBS=""
41   RXGK_LIBS_RPC=""
42   RXGK_CFLAGS=""
43   RXGK_GSSAPI_LIBS=""
44   AS_IF([test "$enable_rxgk" = yes],
45     [AS_IF([test "$BUILD_RXGK" = yes],
46        [ENABLE_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])],
53
54        [AC_MSG_ERROR([Insufficient GSS-API support to enable rxgk])])],
55     [ENABLE_RXGK="no"])
56
57   AC_SUBST([ENABLE_RXGK])
58   AC_SUBST([RXGK_LIBS])
59   AC_SUBST([RXGK_LIBS_RPC])
60   AC_SUBST([RXGK_CFLAGS])
61   AC_SUBST([RXGK_GSSAPI_LIBS])])