[telepathy-mission-control/master] configure.ac: add the ability to autodetect gnome-keyring

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Sep 14 08:24:30 PDT 2009


The default is still to disable it - distributors enabling this extra
dependency (which is probably desirable) should make a conscious decision
to do so.
---
 configure.ac |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index e893378..2f8848c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,9 +278,22 @@ AC_ARG_ENABLE(gnome-keyring,
                 keyring_enabled="no"
         ]
 )
+
+PKG_PROG_PKG_CONFIG()
+
+if test "x$keyring_enabled" = xauto
+then
+    PKG_CHECK_EXISTS([gnome-keyring-1], [keyring_enabled=yes],
+                     [keyring_enabled=no])
+fi
+
 AM_CONDITIONAL(ENABLE_GNOME_KEYRING, [test x$keyring_enabled = xyes])
+
 if test "x$keyring_enabled" = xyes
 then
+  PKG_CHECK_MODULES([GNOME_KEYRING], [gnome-keyring-1])
+  AC_SUBST([GNOME_KEYRING_LIBS])
+  AC_SUBST([GNOME_KEYRING_CFLAGS])
   AC_DEFINE([ENABLE_GNOME_KEYRING], [1], [Define whether gnome-keyring support is enabled])
 else
   AC_DEFINE([ENABLE_GNOME_KEYRING], [0], [Define whether gnome-keyring support is enabled])
@@ -312,13 +325,6 @@ then
   AC_SUBST(GMODULE_CFLAGS)
 fi
 
-if test "x$keyring_enabled" = xyes
-then
-  PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1)
-  AC_SUBST(GNOME_KEYRING_LIBS)
-  AC_SUBST(GNOME_KEYRING_CFLAGS)
-fi
-
 dnl docs/Makefile.am needs to know whether it's an out of tree build
 dnl (srcdir != builddir)
 AM_CONDITIONAL([OUT_OF_TREE_BUILD], [test "z$ac_srcdir" != z.])
-- 
1.5.6.5




More information about the telepathy-commits mailing list