From e2c5a6b7fd4446e94457bf2757cac36f2fe851bd Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 20 Oct 2010 15:53:29 +0200 Subject: [PATCH 2/2] fix building with --disable-polkit --- configure.ac.in | 6 +++--- src/xfpm-polkit.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index f5cba7b..8b5f081 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -85,10 +85,10 @@ XDT_CHECK_PACKAGE([XRANDR],[xrandr], [xrandr_minimum_version]) AC_ARG_ENABLE([polkit], [AC_HELP_STRING([--disable-polkit], [Do not enable PolicyKit support (default=enabled)])], - [], - [ac_cv_enable_polkit=polkit]) + [ac_cv_enable_polkit=no], + [ac_cv_enable_polkit=yes]) AC_MSG_CHECKING([whether to build with polkit support]) -if test "x$ac_cv_enable_polkit" = !"xyes"; then +if test "x$ac_cv_enable_polkit" = "xno"; then AC_MSG_RESULT([no]) polkit="no" else diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index e699e80..1d0d178 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -565,6 +565,8 @@ xfpm_polkit_get (void) gboolean xfpm_polkit_check_auth (XfpmPolkit *polkit, const gchar *action_id) { +#ifdef ENABLE_POLKIT xfpm_polkit_init_data (polkit); +#endif return xfpm_polkit_check_auth_intern (polkit, action_id); } -- 1.7.1