summaryrefslogtreecommitdiff
blob: 18b0de8f576145977aec0bf669ac4461891fdede (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
diff -Naur ConsoleKit-0.2.10/configure.ac ConsoleKit-0.2.10.new/configure.ac
--- ConsoleKit-0.2.10/configure.ac	2008-02-13 09:25:50.000000000 +0530
+++ ConsoleKit-0.2.10.new/configure.ac	2008-08-09 11:36:25.000000000 +0530
@@ -55,10 +55,21 @@
   gthread-2.0 >= $GLIB_REQUIRED_VERSION
 )
 
-PKG_CHECK_MODULES(POLKIT,
-  polkit >= $POLKIT_REQUIRED_VERSION,
-  have_polkit=yes,
-  have_polkit=no)
+AC_ARG_ENABLE([polkit],
+  AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support (default auto)]),
+  enable_polkit=$enableval,
+  enable_polkit=auto)
+
+if test "x$enable_polkit" != "xno"; then
+  PKG_CHECK_MODULES(POLKIT,
+    polkit >= $POLKIT_REQUIRED_VERSION,
+    have_polkit=yes,
+    have_polkit=no)
+  if test "x$enable_polkit"  = "xyes" -a "x$have_polkit" = "xno"; then
+    AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
+  fi
+fi
+
 if test "x$have_polkit" = "xyes" ; then
        AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
 fi