summaryrefslogtreecommitdiff
blob: 48843728f4aed117d36409a5f3f336132aed20f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 586c07b431e9b0e1f11a9017ee0b84dc9b8ec08a Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Mon, 5 May 2014 22:34:14 -0400
Subject: [PATCH] Make logind and old upower check non-automagic

---
 configure.ac | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2f6fa7a..6e908cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,15 @@ PKG_CHECK_MODULES(CINNAMON_SESSION,
 
 dnl We can only support old upower
 dnl https://bugzilla.gnome.org/show_bug.cgi?id=710383
-PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+AC_ARG_ENABLE([old-upower],
+              AS_HELP_STRING([--disable-old-upower], [Do not check for old UPower API]),
+              [enable_old_upower=$enableval],
+              [enable_old_upower=auto])
+
+have_old_upower=no
+if test x$enable_old_upower != xno ; then
+  PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+fi
 AS_IF([test x$have_old_upower = xyes], [
   AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower])
 ])
@@ -96,7 +104,15 @@ dnl ====================================================================
 dnl Check for logind
 dnl ====================================================================
 
-PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd-login >= 183], [have_logind=yes], [have_logind=no])
+AC_ARG_ENABLE([logind],
+              AS_HELP_STRING([--disable-logind], [Do not check for logind]),
+              [enable_logind=$enableval],
+              [enable_logind=auto])
+
+have_logind=no
+if test x$enable_logind != xno ; then
+    PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd-login >= 183], [have_logind=yes], [have_logind=no])
+fi
 
 if test x$have_logind = xyes; then
     AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
-- 
2.4.3