Skip to contentSkip to conversation

configure: usbredir fixes

PATCH In review Aurelien Jarno 3 participants 3 messages Sep 11, 2012 – Sep 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: usbredir fixes

usbredir is only used by system emulation, so add the libraries to libs_softmmu instead of LIBS.

Cc Michael Tokarev <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 7656c32..cf2621a 100755
@@ -2763,7 +2763,7 @@ if test "$usb_redir" != "no" ; then
         usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null)
         usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
         QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
-        LIBS="$LIBS $usb_redir_libs"
+        libs_softmmu="$LIBS $usb_redir_libs"
     else
         if test "$usb_redir" = "yes"; then
             feature_not_found "usb-redir"
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 2 lines · Aurelien Jarno

usbredir is only used by system emulation, so add the libraries to libs_softmmu instead of LIBS.

Fwiw, original code breaks user-static build - not it only tries to link with unused library but also some distros does not package/provide static (.a) library for libusbredirparser (I dunno if it is a general issue).

This patch fixes that. It has been in Debian as a bugfix since the time usbredir were introduced.

Quoted 20 lines
Cc Michael Tokarev <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 7656c32..cf2621a 100755
@@ -2763,7 +2763,7 @@ if test "$usb_redir" != "no" ; then
         usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null)
         usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
         QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
-        LIBS="$LIBS $usb_redir_libs"
+        libs_softmmu="$LIBS $usb_redir_libs"
     else
         if test "$usb_redir" = "yes"; then
             feature_not_found "usb-redir"
#2 lore raw
In reply to Aurelien Jarno
Quoted 2 lines · Aurelien Jarno

usbredir is only used by system emulation, so add the libraries to libs_softmmu instead of LIBS.

Patch added to usb patch queue.

thanks,
Gerd