[PATCH] [ConsoleKit] add --disable-policy-kit configure option

S.Çağlar Onur caglar at pardus.org.tr
Wed Jan 30 18:01:12 PST 2008


Hi;

5895396bc583ae08c5041f5b81f5f9d0a2888e22 converts PolicyKit to an optional dependency but log says "if present it builds with it. If not, polkit support is disabled" 

Please apply following to disable PolicyKit support explicitly with --disable-policy-kit configure option, so distros can disable that support to prevent themself from a circular dependency hell.

diff --git a/configure.ac b/configure.ac
index f44163e..4816303 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,14 +55,12 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
   gthread-2.0 >= $GLIB_REQUIRED_VERSION
 )
 
-PKG_CHECK_MODULES(POLKIT,
-  polkit >= $POLKIT_REQUIRED_VERSION,
-  have_polkit=yes,
-  have_polkit=no)
-if test "x$have_polkit" = "xyes" ; then
-       AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+AC_ARG_ENABLE([policy-kit], AS_HELP_STRING([--disable-policy-kit], [Do not use PolicyKit]), [use_policy_kit=$enableval], [use_policy_kit=yes])
+if test "x$use_policy_kit" != "xno"; then
+  PKG_CHECK_MODULES(POLKIT, polkit >= $POLKIT_REQUIRED_VERSION)
+  AC_DEFINE(HAVE_POLKIT, [], [Define if we use PolicyKit])
 fi
-AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes)
+AM_CONDITIONAL(HAVE_POLKIT, test x$use_policy_kit = xyes)
 AC_SUBST(HAVE_POLKIT)
 
 PKG_CHECK_MODULES(LIBDBUS,


Cheers
-- 
S.Çağlar Onur <caglar at pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!


More information about the hal mailing list