From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Make QEmu depends on libpci Date: Fri, 21 Nov 2008 08:10:59 -0600 Message-ID: <4926C173.3090408@codemonkey.ws> References: <1227274886-23459-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity To: Sheng Yang Return-path: Received: from qw-out-2122.google.com ([74.125.92.24]:59991 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbYKUOLE (ORCPT ); Fri, 21 Nov 2008 09:11:04 -0500 Received: by qw-out-2122.google.com with SMTP id 3so176941qwe.37 for ; Fri, 21 Nov 2008 06:11:02 -0800 (PST) In-Reply-To: <1227274886-23459-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > libpci is handy to handle some pci device related things. > > This is the same as first patch I sent in MSI userspace patchset in kvm > mailing list, and this one is based on QEmu upstream. > It should be an optional dependency. If libpci isn't present, then you should disable PCI passthrough. See the checks for gnutls, libvde, bluez, etc. Regards, Anthony LIguori > Signed-off-by: Sheng Yang > --- > Makefile.target | 2 +- > configure | 19 +++++++++++++++++++ > 2 files changed, 20 insertions(+), 1 deletions(-) > > diff --git a/Makefile.target b/Makefile.target > index 3cdf7db..7cf5b00 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -598,7 +598,7 @@ else > OBJS+=block-raw-posix.o > endif > > -LIBS+=-lz > +LIBS+=-lz -lpci > ifdef CONFIG_ALSA > LIBS += -lasound > endif > diff --git a/configure b/configure > index 1f3d233..1f35e3d 100755 > --- a/configure > +++ b/configure > @@ -764,6 +764,25 @@ else > fi > > ########################################## > +# libpci probe > +cat > $TMPC << EOF > +#include > +#ifndef PCI_VENDOR_ID > +#error NO LIBPCI > +#endif > +int main(void) { return 0; } > +EOF > +if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC 2>/dev/null ; then > + : > +else > + echo > + echo "Error: libpci check failed" > + echo "Make sure to have the libpci libs and headers installed." > + echo > + exit 1 > +fi > + > +########################################## > # SDL probe > > sdl_too_old=no >