Raise the hard PolKit dep to 0.97

This commit is contained in:
Richard Hughes 2013-02-12 10:22:30 +00:00
parent 275644a1b8
commit e9b28d2abd
2 changed files with 1 additions and 18 deletions

View file

@ -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 ====================================================================

View file

@ -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;
}