- dnl This is not done until here because we need to have KRBLIBS set
- dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssglue -ldl)
- AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
- AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssglue -ldl)
-
-fi
-
-AC_CHECK_DECL([AI_ADDRCONFIG],
- AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
- [Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
- [ #include <netdb.h> ] )
-
-if test "$enable_tirpc" = yes; then
- AC_CHECK_LIB(tirpc, clnt_tli_create, ,
- AC_MSG_ERROR([libtirpc not found.]))
- AC_CHECK_HEADERS(tirpc/netconfig.h, ,
- AC_MSG_ERROR([libtirpc headers not found.]))
- AC_CHECK_FUNCS([bindresvport_sa getnetconfig \
- clnt_create clnt_create_timed \
- clnt_vc_create clnt_dg_create xdr_rpcb])
-fi
-
-if test "$enable_ipv6" = yes; then
- if test "$enable_tirpc" = no; then
- AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
+ dnl Invoked after AC_KERBEROS_V5; AC_LIBRPCSECGSS needs to have KRBLIBS set
+ AC_LIBRPCSECGSS
+
+ dnl librpcsecgss already has a dependency on libgssapi,
+ dnl but we need to make sure we get the right version
+ if test "$enable_gss" = yes; then
+ AC_RPCSEC_VERSION
+ if test x"$GSSGLUE_LIBS" != x""; then
+ GSSAPI_CFLAGS=$GSSGLUE_CFLAGS
+ GSSAPI_LIBS=$GSSGLUE_LIBS
+ else
+ GSSAPI_CFLAGS=$GSSKRB_CFLAGS
+ GSSAPI_LIBS=$GSSKRB_LIBS
+ fi
+ AC_SUBST([GSSAPI_CFLAGS])
+ AC_SUBST([GSSAPI_LIBS])