[Spice-devel] [spice-gtk Win32 v2 PATCH 2/5] Windows mingw: usb: configure.ac: do not require GUDEV for USBREDIR
Uri Lublin
uril at redhat.com
Sun May 20 09:34:09 PDT 2012
For windows GUDEV is not required
- GUDEV is alwasy checked as part of USBREDIR, and fails
if USBREDIR but no GUDEV on non-windows.
- Added GUDEV env-variables in gtk/Makefile.am
---
configure.ac | 20 +++++++++++++++++++-
gtk/Makefile.am | 2 ++
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 09129b7..f39fbe8 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,8 +352,26 @@ else
if test "x$have_usbredir" = "xyes"; then
AC_DEFINE(USE_USBREDIR, [1], [Define if supporting usbredir proxying])
fi
+
+ # require GUDEV unless os_win32 is true
+ PKG_CHECK_MODULES([GUDEV],
+ [gudev-1.0],
+ [have_gudev=yes],
+ [have_gudev=no])
+ if test "x$have_gudev" = "xyes"; then
+ AC_DEFINE(USE_GUDEV, [1], [Define if supporting gudev])
+ fi
+
fi
AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"])
+AM_CONDITIONAL([WITH_GUDEV], [test "x$have_gudev" = "xyes"])
+
+# for non-win32 usbredir requires gudev
+if test "x$have_usbredir" = "xyes" && test "x$have_gudev" = "xno" && \
+ test "x$os_win32" = "xno"; then
+ AC_MSG_ERROR([usbredir requested but required gudev is not available])
+fi
+
AC_ARG_ENABLE([polkit],
AS_HELP_STRING([--enable-polkit=@<:@auto/yes/no@:>@],
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
More information about the Spice-devel
mailing list