qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] allow special paths for libusbx
@ 2013-11-27 10:09 Erik Rull
  2013-11-27 10:14 ` Paolo Bonzini
  2013-11-27 10:25 ` Daniel P. Berrange
  0 siblings, 2 replies; 7+ messages in thread
From: Erik Rull @ 2013-11-27 10:09 UTC (permalink / raw)
  To: qemu-devel@nongnu.org; +Cc: Paolo Bonzini, Gerd Hoffmann

Hi all,

I don't have libusbx installed on my system but the source package is available
and compiled for development.
This may also help other users to enable the libusbx support without having it
actually installed on the compile machine.

It's a first attempt, feel free to optimize it. I would be happy if someone
could commit a patch like that for the next release - this would make it
possible to use the next qemu release instead of the git version with own
patches.

The call parameters would be filled like:

--enable-libusb-special-headers=-I/home/erik/libusbx/libusb
--enable-libusb-special-libs="-L/home/erik/libusbx/libusb/.libs -lusb-1.0"


Thanks.

Erik



---
diff --git a/configure b/configure
index 0666228..98cc72b 100755
--- a/configure
+++ b/configure
@@ -935,6 +935,10 @@ for opt do
   ;;
   --enable-libusb) libusb="yes"
   ;;
+  --enable-libusb-special-headers=*) libusb="yes"; libusb_cflags="$optarg"
+  ;;
+  --enable-libusb-special-libs=*) libusb="yes"; libusb_libs="$optarg"
+  ;;
   --disable-usb-redir) usb_redir="no"
   ;;
   --enable-usb-redir) usb_redir="yes"
@@ -3155,6 +3159,11 @@ fi

 # check for libusb
 if test "$libusb" != "no" ; then
+    if test -n "$libusb_cflags" && test -n "$libusb_libs"; then
+        libusb="yes"
+        QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
+        libs_softmmu="$libs_softmmu $libusb_libs"
+    else
     if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
         libusb="yes"
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
@@ -3167,6 +3176,7 @@ if test "$libusb" != "no" ; then
         fi
         libusb="no"
     fi
+    fi
 fi

 # check for usbredirparser for usb network redirection support

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-27 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 10:09 [Qemu-devel] [RFC] allow special paths for libusbx Erik Rull
2013-11-27 10:14 ` Paolo Bonzini
2013-11-27 10:24   ` Erik Rull
2013-11-27 10:38     ` Paolo Bonzini
2013-11-27 11:33       ` Erik Rull
2013-11-27 13:19       ` Erik Rull
2013-11-27 10:25 ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).