no) WITH_KEYRING=no ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-keyring) ;;
esac],
- [WITH_KEYRING=yes]) dnl Default value
-AM_CONDITIONAL(WITH_KEYRING, test x$WITH_KEYRING = "xyes")
-
+ [WITH_KEYRING=check]) dnl Default value
+
+if test x$WITH_KEYRING != "xno"; then
+ PKG_CHECK_MODULES(KEYRING, gnome-keyring-1 >= $KEYRING_REQUIRED,
+ WITH_KEYRING=yes,
+ if test "x$WITH_KEYRING" = "xcheck"; then
+ WITH_KEYRING=no
+ AC_MSG_WARN(The use of gnome-keyring is disabled since required library gnome-keyring-1 >= $KEYRING_REQUIRED was not found.)
+ else
+ AC_MSG_FAILURE(Gnome-keyring test failed: $KEYRING_PKG_ERRORS)
+ fi
+ )
+fi
if test x$WITH_KEYRING = "xyes"; then
- PKG_CHECK_MODULES(KEYRING, gnome-keyring-1 >= $KEYRING_REQUIRED)
AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
fi
+AM_CONDITIONAL(WITH_KEYRING, test x$WITH_KEYRING = "xyes")
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)