9290838
From 93e27ddf8c5e60eb932528cf1c560d81be108f96 Mon Sep 17 00:00:00 2001
5ba1a77
From: Hans de Goede <hdegoede@redhat.com>
5ba1a77
Date: Tue, 25 Sep 2012 13:22:21 +0200
5544c1b
Subject: [PATCH] usb-redir: Adjust pkg-config check for usbredirparser .pc
5544c1b
 file rename (v2)
5ba1a77
5ba1a77
The usbredir 0.5 release introduced the new API for 64 bit packet ids, but
5ba1a77
it kept the libusbredirparser.pc name as is, meaning that older versions of
5ba1a77
qemu will still have their pkg-config check for usbredirparser fulfilled,
5ba1a77
and build with the usb-redir device. Due to the API change there will be
5ba1a77
some compiler warnings, but the build will succeed, however the usb-redir
5ba1a77
device will be broken on 32 bit machines.
5ba1a77
5ba1a77
To solve this a new usbredir-0.5.2 release is coming, which renames the
5ba1a77
libusbredirparser.pc file to libusbredirparser-0.5.pc, so that it will no
5ba1a77
longer fulfill the pkg-config check of the qemu-1.2 and older releases,
5ba1a77
stopping the (silent) breakage. This patch adjusts qemu master's configure
5ba1a77
to properly detect the new usbredir release.
5ba1a77
5ba1a77
Changes in v2:
5ba1a77
-Not only use the new .pc name in the check but also when getting cflags
5ba1a77
 and libs!
5ba1a77
5ba1a77
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5ba1a77
---
5ba1a77
 configure | 6 +++---
5ba1a77
 1 file changed, 3 insertions(+), 3 deletions(-)
5ba1a77
5ba1a77
diff --git a/configure b/configure
f375e62
index d43d61a..8dac47b 100755
5ba1a77
--- a/configure
5ba1a77
+++ b/configure
f375e62
@@ -2757,10 +2757,10 @@ fi
5ba1a77
 
5ba1a77
 # check for usbredirparser for usb network redirection support
5ba1a77
 if test "$usb_redir" != "no" ; then
5ba1a77
-    if $pkg_config --atleast-version=0.5 libusbredirparser >/dev/null 2>&1 ; then
5ba1a77
+    if $pkg_config --atleast-version=0.5 libusbredirparser-0.5 >/dev/null 2>&1 ; then
5ba1a77
         usb_redir="yes"
5ba1a77
-        usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null)
5ba1a77
-        usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
5ba1a77
+        usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5 2>/dev/null)
5ba1a77
+        usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5 2>/dev/null)
5ba1a77
         QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
5ba1a77
         libs_softmmu="$libs_softmmu $usb_redir_libs"
5ba1a77
     else