summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-09-23 12:07:32 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2011-09-28 16:29:18 +0100
commit17246cccff176888eae16b8ce673e2c5f0da440f (patch)
treed1320ab3e034c2599acfd8f3eec72e8c4fc6e43b
parent25799ee8f5b02a8893d7bc5c8007e58b9d444bdd (diff)
configure: optionally depend on upower-glib
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aa8aa98e..9ce47e9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -362,6 +362,33 @@ fi
AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
+# -----------------------------------------------------------
+# Suspend/resume tracking goop
+# -----------------------------------------------------------
+
+AC_ARG_ENABLE([upower],
+ [AS_HELP_STRING([--enable-upower],
+ [monitor device suspending and resuming using upower-glib @<:@default=auto@:>@])],
+ [],
+ [enable_upower=auto])
+
+if test "x$enable_upower" != xno; then
+ PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib],
+ [AC_DEFINE([HAVE_UPOWER], [1], [Define to use upower-glib])
+ have_upower=yes
+ ],
+ [if test "x$enable_upower" == xyes; then
+ AC_MSG_ERROR([$UPOWER_GLIB_PKG_ERRORS])
+ else
+ have_upower=no
+ fi
+ ])
+else
+ have_upower=no
+fi
+
+AC_SUBST([UPOWER_GLIB_CFLAGS])
+AC_SUBST([UPOWER_GLIB_LIBS])
dnl ***************************************************************************
dnl Check for marshal and enum generators
@@ -416,6 +443,7 @@ Configure summary:
Gnome Keyring................: ${keyring_enabled}
Network Manager integration..: ${have_nm}
ConnMan integration..........: ${have_connman}
+ Suspend tracking with UPower.: ${have_upower}
Aegis........................: ${aegis_enabled}
libaccounts-glib backend.....: ${libaccounts_sso_enabled}
Hidden accounts-glib accounts: ${with_accounts_glib_hidden_service_type}