[Spice-devel] [spice-gtk Win32 PATCH 2/7] configure.ac: add --enable_gudev
Christophe Fergeau
cfergeau at redhat.com
Wed May 9 03:26:52 PDT 2012
On Mon, May 07, 2012 at 04:15:34PM +0300, Uri Lublin wrote:
> Instead of requiring it when usbredir is configured.
>
> The default value is "auto", which is "yes" for linux and "no" for Windows
> ---
> configure.ac | 29 ++++++++++++++++++++++++++++-
> gtk/Makefile.am | 2 ++
> 2 files changed, 30 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 09129b7..8ccdd18 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -343,7 +343,7 @@ if test "x$enable_usbredir" = "xno"; then
> have_usbredir="no"
> else
> PKG_CHECK_MODULES([USBREDIR],
> - [gudev-1.0 libusb-1.0 >= 1.0.9 libusbredirhost >= 0.4.2 libusbredirparser >= 0.4],
> + [libusb-1.0 >= 1.0.9 libusbredirhost >= 0.4.2 libusbredirparser >= 0.4],
> [have_usbredir=yes],
> [have_usbredir=no])
> if test "x$have_usbredir" = "xno" && test "x$enable_usbredir" = "xyes"; then
> @@ -355,6 +355,33 @@ else
> fi
> AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"])
>
> +AC_ARG_ENABLE([gudev],
> + AS_HELP_STRING([--enable-gudev=@<:@auto/yes/no@:>@],
> + [Enable gudev support @<:@default=auto@:>@]),
> + [],
> + [enable_gudev="auto"])
> +
> +if (test "x$enable_gudev" = "xauto" && test "x$os_win32" = "xyes") || \
I think this test is not strictly needed, if it's removed it will just
cause a useless PKG_CHECK_MODULES on Win32 but this will be ignored.
Christophe
> + test "x$enable_gudev" = "xno"; then
> + have_gudev="no"
> +else
> + PKG_CHECK_MODULES([GUDEV],
> + [gudev-1.0],
> + [have_gudev=yes],
> + [have_gudev=no])
> + if test "x$have_gudev" = "xno" && test "x$enable_gudev" = "xyes"; then
> + AC_MSG_ERROR([gudev support explicitly requested, but is not available])
> + fi
> + if test "x$have_gudev" = "xyes" && test "x$have_usbredir" = "xno"; then
> + AC_MSG_ERROR([gudev is defined but required usbredir is not])
> + fi
> + if test "x$have_gudev" = "xyes"; then
> + AC_DEFINE(USE_GUDEV, [1], [Define if supporting gudev])
> + fi
> +fi
> +AM_CONDITIONAL([WITH_GUDEV], [test "x$have_gudev" = "xyes"])
> +
> +
> AC_ARG_ENABLE([polkit],
> AS_HELP_STRING([--enable-polkit=@<:@auto/yes/no@:>@],
> [Enable PolicyKit support (for the usb acl helper)@<:@default=auto@:>@]),
> diff --git a/gtk/Makefile.am b/gtk/Makefile.am
> index 7b29e61..69cf0ef 100644
> --- a/gtk/Makefile.am
> +++ b/gtk/Makefile.am
> @@ -82,6 +82,7 @@ SPICE_COMMON_CPPFLAGS = \
> $(GST_CFLAGS) \
> $(SMARTCARD_CFLAGS) \
> $(USBREDIR_CFLAGS) \
> + $(GUDEV_CFLAGS) \
> $(NULL)
>
> AM_CPPFLAGS = \
> @@ -179,6 +180,7 @@ libspice_client_glib_2_0_la_LIBADD = \
> $(SASL_LIBS) \
> $(SMARTCARD_LIBS) \
> $(USBREDIR_LIBS) \
> + $(GUDEV_LIBS) \
> $(NULL)
>
> if WITH_POLKIT
> --
> 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/20120509/3412bb5b/attachment.pgp>
More information about the Spice-devel
mailing list