+AC_SUBST(KRB5_LIBS)
+AC_SUBST(KRB5_CFLAGS)
+
+# Linux keyring
+AH_TEMPLATE(HAVE_KEYUTILS, [define if your system supports the Linux keyring functions])
+AC_ARG_WITH(keyutils, [ --with-keyutils Enable support for the Linux keyring stash])
+DOLDA_PKG([HAS_KEYUTILS], [test "$with_keyutils" = no && HAS_KEYUTILS=no],
+ [AC_CHECK_LIB(keyutils, keyctl_search, [:], [HAS_KEYUTILS=no])])
+if test "$with_keyutils" = yes -a "$HAS_KEYUTILS" = no; then
+ AC_MSG_ERROR([*** cannot find keyutils on this system])
+fi
+if test "$HAS_KEYUTILS" = yes; then
+ AC_DEFINE(HAVE_KEYUTILS)
+ KEYUTILS_LIBS=-lkeyutils
+fi
+AC_SUBST([KEYUTILS_LIBS])