Do not check for pkcheck

All we need is D-Bus.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2018-03-07 10:17:57 +01:00
parent 0d4b988b3e
commit 2499d1a095
1 changed files with 11 additions and 21 deletions

View File

@ -25,27 +25,18 @@ AC_DEFUN([LIBVIRT_ARG_POLKIT], [
AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [
AC_REQUIRE([LIBVIRT_CHECK_DBUS]) AC_REQUIRE([LIBVIRT_CHECK_DBUS])
PKCHECK_PATH=
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
dnl Check for new polkit first. We directly talk over DBus dnl All we need to talk to polkit is D-Bus.
dnl but we use existence of pkcheck binary as a sign that if test "x$with_dbus" = "xyes" ; then
dnl we should prefer polkit-1 over polkit-0, so we check AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
dnl for it even though we don't ultimately use it [use PolicyKit for UNIX socket access checks])
AC_PATH_PROG([PKCHECK_PATH], [pkcheck], [], [$LIBVIRT_SBIN_PATH]) with_polkit="yes"
if test "x$PKCHECK_PATH" != "x" ; then else
dnl Found pkcheck, so ensure dbus-devel is present if test "x$with_polkit" = "xcheck" ; then
if test "x$with_dbus" = "xyes" ; then with_polkit=no
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
with_polkit="yes"
else else
if test "x$with_polkit" = "xcheck" ; then AC_MSG_ERROR(
with_polkit=no [You must install dbus to compile libvirt with polkit-1])
else
AC_MSG_ERROR(
[You must install dbus to compile libvirt with polkit-1])
fi
fi fi
fi fi
fi fi
@ -54,6 +45,5 @@ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [
]) ])
AC_DEFUN([LIBVIRT_RESULT_POLKIT], [ AC_DEFUN([LIBVIRT_RESULT_POLKIT], [
msg="$PKCHECK_PATH (version 1)" LIBVIRT_RESULT([polkit], [$with_polkit])
LIBVIRT_RESULT([polkit], [$with_polkit], [$msg])
]) ])