summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch')
-rw-r--r--meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 0000000000..ad879d466b
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Pending
2
3--- ConsoleKit-0.4.6.orig/configure.ac
4+++ ConsoleKit-0.4.6/configure.ac
5@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
6 gthread-2.0 >= $GLIB_REQUIRED_VERSION
7 )
8
9-PKG_CHECK_MODULES(POLKIT,
10- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
11- have_polkit=yes,
12- have_polkit=no)
13+AC_ARG_WITH([polkit],
14+ [AS_HELP_STRING([--with-polkit],
15+ [support PolicyKit @<:@default=check@:>@])],
16+ [],
17+ [with_polkit=check])
18+
19+AS_IF([test "x$with_polkit" != xno],
20+ [PKG_CHECK_MODULES(POLKIT,
21+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
22+ have_polkit=yes,
23+ [if test "x$with_polkit" != xcheck; then
24+ AC_MSG_FAILURE(
25+ [--with-polkit was given, but test for polkit failed])
26+ else
27+ have_polkit=no
28+ fi
29+ ])])
30+
31 if test "x$have_polkit" = "xyes" ; then
32 AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
33 fi