[Spice-devel] [PATCH spice-gtk 1/5] configure.ac: Cleanup policykit checks
Christophe Fergeau
cfergeau at redhat.com
Fri Jan 27 10:03:35 PST 2012
On Fri, Jan 27, 2012 at 04:58:54PM +0100, Hans de Goede wrote:
> * No need to set AM_CONDITIONAL WITH_POLKIT from the enable_usbredir tests, it
> get sets from the enable_polkit tests in all paths
> * Improve the help text: mention auto as option, policykit -> PolicyKit,
> not yes but auto is the default
> * Warn when building with usbredir support but not building the acl helper
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> configure.ac | 11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 2cb4075..d7be7b2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -342,7 +342,6 @@ AC_ARG_ENABLE([usbredir],
>
> if test "x$enable_usbredir" = "xno"; then
> AM_CONDITIONAL(WITH_USBREDIR, false)
> - AM_CONDITIONAL(WITH_POLKIT, false)
> else
> PKG_CHECK_MODULES([USBREDIR],
> [gudev-1.0 libusb-1.0 >= 1.0.9 libusbredirhost >= 0.3.3],
> @@ -358,15 +357,14 @@ else
> fi
>
> AC_ARG_ENABLE([polkit],
> - AS_HELP_STRING([--enable-polkit=@<:@yes/no@:>@],
> - [Enable policykit support (for the usb acl helper)@<:@default=yes@:>@]),
> + AS_HELP_STRING([--enable-polkit=@<:@auto/yes/no@:>@],
> + [Enable PolicyKit support (for the usb acl helper)@<:@default=auto@:>@]),
> [],
> [enable_polkit="auto"])
>
> if test x"$have_usbredir" = "xyes" && test "x$enable_polkit" != "xno"; then
> - have_polkit=yes
> PKG_CHECK_MODULES([POLKIT], [polkit-gobject-1 >= 0.96],
> - [],
> + [have_polkit=yes],
> [have_polkit=no])
> AC_CHECK_HEADER([acl/libacl.h], [], [have_polkit=no])
> AC_CHECK_LIB([acl], [acl_get_file], [ACL_LIBS=-lacl], [have_polkit=no])
> @@ -388,6 +386,9 @@ else
> AM_CONDITIONAL(WITH_POLKIT, false)
> fi
>
> +if test "x$have_usbredir" = "xyes" && test "x$have_polkit" != "xyes"; then
> + AC_MSG_WARN([Building with usbredir support, but *not* building the usb acl helper])
> +fi
This bit could go as an else for:
if test x"$have_polkit" = "xyes"; then
AC_SUBST(ACL_LIBS)
AC_DEFINE(USE_POLKIT, [1], [Define if supporting polkit])
fi
but that's not really important.
>
> AC_ARG_WITH([usb-acl-helper-dir],
> AS_HELP_STRING([--with-usb-acl-helper-dir=DIR],
> --
> 1.7.7.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120127/5ea0a752/attachment.pgp>
More information about the Spice-devel
mailing list