summaryrefslogtreecommitdiff
blob: d438220b84881ddfe78735971f90c30b5be7b08d (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
51
52
From d3ebde7427514ca9ab92b6f7937ebb5ab8efb063 Mon Sep 17 00:00:00 2001
From: Poncho <poncho@spahan.ch>
Date: Sun, 27 Sep 2015 14:25:58 +0200
Subject: [PATCH] make zeitgeist dependency optional

---
 configure.ac | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 19a44b4..afb0c3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,9 +83,24 @@ PKG_CHECK_MODULES(BIJIBEN,
                     uuid
                     webkitgtk-3.0])
 
-PKG_CHECK_MODULES(ZEITGEIST, zeitgeist-2.0, [have_zeitgeist=yes], [have_zeitgeist=no])
 
-AM_CONDITIONAL(BUILD_ZEITGEIST, test x$have_zeitgeist = xyes)
+# check for zeitgeist
+AC_ARG_ENABLE([zeitgeist],
+  [AS_HELP_STRING([--disable-zeitgeist], [Disable zeitgeist support @<:@auto@:>@])],
+  [:],
+  [enable_zeitgeist=auto])
+
+AS_IF([test "$enable_zeitgeist" != "no"],
+  [PKG_CHECK_MODULES([ZEITGEIST],
+    [zeitgeist-2.0],
+    [enable_zeitgeist=yes],
+    [AS_IF([test "$enable_zeitgeist" = "yes"],
+      [AC_MSG_ERROR([zeitgeist-2.0 required, but not found.])],
+      [enable_zeitgeist=no])
+    ])
+])
+
+AM_CONDITIONAL([BUILD_ZEITGEIST], [test "$enable_zeitgeist" = "yes"])
 
 
 GLIB_GSETTINGS
@@ -113,7 +128,7 @@ src/Makefile
 AC_OUTPUT
 
 echo "	Version:	        $VERSION
-        Enable Zeitgeist  $have_zeitgeist
+        Enable Zeitgeist  $enable_zeitgeist
 
 	Run make to compile."
 
-- 
2.4.9