summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-07 19:38:44 +0100
committerStefano Karapetsas <[email protected]>2013-11-07 19:38:44 +0100
commitc38e25ccb5f77ae4bfca9a43e54b4554220bdba9 (patch)
tree3917c71710a202026cef5ac72237f0680401becf /configure.ac
parentc17333cbd562c8021ad152b6a41d7eaa46617719 (diff)
downloadmate-session-manager-c38e25ccb5f77ae4bfca9a43e54b4554220bdba9.tar.bz2
mate-session-manager-c38e25ccb5f77ae4bfca9a43e54b4554220bdba9.tar.xz
Make upower optional
This commit is just an improved version of the pull request by Wolfgang Ulbrich at https://github.com/mate-desktop/mate-session-manager/pull/38 making it working with both upower and systemd, and improving configure part
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 88a669b..b706409 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,6 @@ PKG_CHECK_MODULES(MATE_SESSION,
gio-2.0 >= $GIO_REQUIRED
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
- upower-glib >= $UPOWER_REQUIRED
)
PKG_CHECK_MODULES(SESSION_PROPERTIES,
@@ -128,6 +127,24 @@ AM_CONDITIONAL(HAVE_SYSTEMD, test "x$use_systemd" = "xyes")
AC_SUBST(HAVE_SYSTEMD)
dnl ====================================================================
+dnl UPOWER
+dnl ====================================================================
+
+AC_ARG_ENABLE(upower,
+ AS_HELP_STRING([--enable-upower],
+ [Use upower to suspend/hibernate]),
+ enable_upower=$enableval,
+ enable_upower=yes)
+if test "x$enable_upower" = "xyes"; then
+ PKG_CHECK_MODULES(UPOWER, upower-glib >= $UPOWER_REQUIRED, has_upower=yes, has_upower=no)
+ AC_DEFINE(HAVE_UPOWER, 1, [upower support])
+ AC_SUBST(UPOWER_CFLAGS)
+ AC_SUBST(UPOWER_LIBS)
+fi
+AM_CONDITIONAL(HAVE_UPOWER, test "x$enable_upower" = "xyes")
+AC_SUBST(HAVE_UPOWER)
+
+dnl ====================================================================
dnl X development libraries check
dnl ====================================================================
@@ -385,6 +402,7 @@ echo "
GTK+ version: ${with_gtk}
Default WM: ${with_default_wm}
Systemd support: ${use_systemd}
+ Upower support: ${enable_upower}
IPv6 support: ${have_full_ipv6}
Backtrace support: ${have_backtrace}
XRender support: ${have_xrender}