--- configure.in.old 2008-10-13 23:08:18.000000000 +0200 +++ configure.in 2008-10-13 23:10:46.000000000 +0200 @@ -1,4 +1,4 @@ -AC_PREREQ(2.52) +AC_PREREQ(2.60) AC_INIT(gnome-system-tools, 2.22.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,20 @@ 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])) + +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)