--- From bheelinkg, fix automagic dependency on policykit configure.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -Naur gnome-session-2.23.5/configure.in gnome-session-2.23.5.new/configure.in --- gnome-session-2.23.5/configure.in 2008-07-23 03:08:03.000000000 +0530 +++ gnome-session-2.23.5.new/configure.in 2008-08-09 11:34:35.000000000 +0530 @@ -77,9 +77,18 @@ PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-2.0) PKG_CHECK_MODULES(EGG_LIBGNOMEUI, libgnomeui-2.0) -PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome >= $POLKIT_GNOME_REQUIRED, have_polkit=yes, have_polkit=no) +AC_ARG_ENABLE([polkit], + AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support (default auto)]), + enable_polkit=$enableval, + enable_polkit=auto) +if test "x$enable_polkit" != "xno"; then + PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome >= $POLKIT_GNOME_REQUIRED, have_polkit=yes, have_polkit=no) + if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then + AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found]) + fi +fi -if test "$have_polkit" = "yes"; then +if test "x$have_polkit" = "xyes"; then AC_DEFINE(HAVE_POLKIT_GNOME, [1], [whether PolKit GNOME was found]) fi