qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] allow special paths for libusbx


From: Erik Rull
Subject: [Qemu-devel] [RFC] allow special paths for libusbx
Date: Wed, 27 Nov 2013 11:09:19 +0100 (CET)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]