]> www.fi.muni.cz Git - evince.git/commitdiff
[build] Only fail on missing gnome-keyring when requested explicitly
authorHib Eris <hib@hiberis.nl>
Tue, 9 Jun 2009 10:01:16 +0000 (12:01 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 9 Jun 2009 10:01:16 +0000 (12:01 +0200)
configure.ac

index 41dd94a89d6729bacc370df84f266d9ce9dae50c..ca89c277297fe28546981b2ca9296e509499735e 100644 (file)
@@ -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)