--- configure.in.old 2008-10-13 22:48:51.000000000 +0200 +++ configure.in 2008-10-13 22:53:59.000000000 +0200 @@ -1,4 +1,4 @@ -AC_PREREQ(2.52) +AC_PREREQ(2.60) dnl ============================================================== dnl Process this file with autoconf to produce a configure script. dnl ============================================================== @@ -122,10 +122,19 @@ AC_SUBST(DISPATCHER_CFLAGS) dnl check for PolicyKit -PKG_CHECK_MODULES(POLKIT, polkit-dbus >= $POLICYKIT_REQUIRED, have_polkit=yes, have_polkit=no) -if test "$have_polkit" = "yes"; then - AC_DEFINE(HAVE_POLKIT, [1], [whether PolicyKit 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 PolicyKit was found]) + else + AC_MSG_ERROR([policykit support requested but not found]) + fi fi AC_SUBST(POLKIT_LIBS)