[gnome-system-tools] Make policykit support optional via a configure switch



commit f6ecba13cadb8a3ea8516f1ff0773720ed14b5b6
Author: Gilles Dartiguelongue <eva gentoo org>
Date:   Tue Jun 30 10:28:52 2009 +0200

    Make policykit support optional via a configure switch
    
    GNOME Bug #578550.

 ChangeLog    |   15 ++++++++++-----
 configure.in |   19 +++++++++++++++----
 2 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 24c50a0..6389531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,15 @@
+2009-06-30  Gilles Dartiguelongue <gdartigu svn gnome org>
+
+	* configure.in: make policykit support optional via a
+	configure switch. Bug #578550.
+
 2009-06-29  Milan Bouchet-Valat  <nalimilan club fr>
-	* interfaces/users.ui
-	* src/users/privileges-table.c
-	* src/users/user-settings.c
-	* src/users/user-settings.h
-        Add an option to allow password-less logins. Bug #414862.
 
+	* interfaces/users.ui:
+	* src/users/privileges-table.c:
+	* src/users/user-settings.c:
+	* src/users/user-settings.h:
+        Add an option to allow password-less logins. Bug #414862.
 
 2009-04-28  Thomas H.P. Andersen  <phomes gmail com>
 
diff --git a/configure.in b/configure.in
index 89a92e1..7dc69d9 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-AC_PREREQ(2.52)
+AC_PREREQ(2.60)
 AC_INIT(gnome-system-tools, 2.27.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-system-tools)
 AC_CONFIG_SRCDIR(src/common/gst-tool.c)
 AC_CONFIG_MACRO_DIR([m4])
@@ -88,10 +88,21 @@ DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
 AC_SUBST(DBUS_LIBS)
 AC_SUBST(DBUS_CFLAGS)
 
-PKG_CHECK_MODULES(POLKIT, polkit-dbus >= $POLICYKIT_REQUIRED, have_polkit=yes, have_polkit=no)
+dnl Policykit support
 
-if test "$have_polkit" = "yes"; then
-  AC_DEFINE(HAVE_POLKIT, [1], [whether PolKit was found])
+have_polkit=no
+AC_ARG_ENABLE(polkit,
+	AS_HELP_STRING([--enable-polkit],[Enable policykit support (default yes)]),
+	[], [enable_polkit=yes])
+
+if test "x$enable_polkit" = "xyes"; then
+	PKG_CHECK_MODULES(POLKIT,[polkit-dbus >= $POLICYKIT_REQUIRED], have_polkit=yes)
+
+	if test "$have_polkit" = "yes"; then
+		AC_DEFINE(HAVE_POLKIT, [1], [whether PolKit was found])
+	else
+		AC_MSG_ERROR([Policykit support requested but not found])
+	fi
 fi
 
 AC_SUBST(POLKIT_LIBS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]