From: Hib Eris Date: Tue, 9 Jun 2009 10:01:16 +0000 (+0200) Subject: [build] Only fail on missing gnome-keyring when requested explicitly X-Git-Tag: EVINCE_2_27_3~41 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=62f49fb645c00fd0ab52588a70cec76019e04afa;p=evince.git [build] Only fail on missing gnome-keyring when requested explicitly --- diff --git a/configure.ac b/configure.ac index 41dd94a8..ca89c277 100644 --- a/configure.ac +++ b/configure.ac @@ -151,13 +151,23 @@ AC_ARG_WITH(keyring, 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)