diff options
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/up-polkit.c | 4 |
2 files changed, 1 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 0af9d5e..8e43803 100644 --- a/configure.ac +++ b/configure.ac @@ -142,20 +142,7 @@ AC_SUBST(WARNINGFLAGS_C) PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.21.5]) PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0]) PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.76]) - -# polkit >= 0.97 uses polkit_authority_get_sync() rather than -# polkit_authority_get -PKG_CHECK_MODULES(POLKIT, \ - polkit-gobject-1 >= 0.97, - has_new_polkit=yes, - has_new_polkit=no) -if test x$has_new_polkit = xno; then - PKG_CHECK_MODULES(POLKIT, \ - polkit-gobject-1 >= 0.91) -else - AC_DEFINE(USE_SECURITY_POLKIT_NEW, 1, [if we should use PolicyKits new API]) -fi - +PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.97) PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.16.1]) dnl ==================================================================== diff --git a/src/up-polkit.c b/src/up-polkit.c index 8f9af65..ce84c04 100644 --- a/src/up-polkit.c +++ b/src/up-polkit.c @@ -250,16 +250,12 @@ up_polkit_init (UpPolkit *polkit) goto out; } -#ifdef USE_SECURITY_POLKIT_NEW polkit->priv->authority = polkit_authority_get_sync (NULL, &error); if (polkit->priv->authority == NULL) { g_error ("failed to get pokit authority: %s", error->message); g_error_free (error); goto out; } -#else - polkit->priv->authority = polkit_authority_get (); -#endif out: return; } |