[Spice-devel] [spice-gtk Win32 v5 12/22] Windows mingw: usb: configure.ac: do not require GUDEV for USBREDIR

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 9 07:44:34 PDT 2012


ack

On Mon, Jul 9, 2012 at 2:14 PM, Uri Lublin <uril at redhat.com> wrote:
> For windows GUDEV is not required
> For Linux GUDEV is checked as a part of USBREDIR block, but
> as a separate check.
> ---
>  configure.ac    |   15 ++++++++++++++-
>  gtk/Makefile.am |    2 ++
>  2 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3841c56..233ce4d 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
> @@ -352,6 +352,19 @@ else
>    if test "x$have_usbredir" = "xyes"; then
>      AC_DEFINE(USE_USBREDIR, [1], [Define if supporting usbredir proxying])
>    fi
> +
> +  # Require gudev for non-windows
> +  if test "x$os_win32" = "xno"; then
> +    PKG_CHECK_MODULES([GUDEV],
> +                      [gudev-1.0],
> +                      [have_gudev=yes],
> +                      [have_gudev=no])
> +
> +    if test "x$have_usbredir" = "xyes" && test "x$have_gudev" = "xno"; then
> +      AC_MSG_ERROR([usbredir requested but required gudev is not available])
> +    fi
> +    AC_DEFINE(USE_GUDEV, [1], [Define if supporting gudev])
> +  fi
>  fi
>  AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"])
>
> diff --git a/gtk/Makefile.am b/gtk/Makefile.am
> index f5f6bc6..10fa9cd 100644
> --- a/gtk/Makefile.am
> +++ b/gtk/Makefile.am
> @@ -83,6 +83,7 @@ SPICE_COMMON_CPPFLAGS =                                               \
>         $(GST_CFLAGS)                                           \
>         $(SMARTCARD_CFLAGS)                                     \
>         $(USBREDIR_CFLAGS)                                      \
> +       $(GUDEV_CFLAGS)                                         \
>         $(NULL)
>
>  AM_CPPFLAGS =                                  \
> @@ -183,6 +184,7 @@ libspice_client_glib_2_0_la_LIBADD =                                        \
>         $(SASL_LIBS)                                                    \
>         $(SMARTCARD_LIBS)                                               \
>         $(USBREDIR_LIBS)                                                \
> +       $(GUDEV_LIBS)                                                   \
>         $(NULL)
>
>  if WITH_POLKIT
> --
> 1.7.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list