qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] Make QEmu depends on libpci


From: Sheng Yang
Subject: [Qemu-devel] [PATCH] Make QEmu depends on libpci
Date: Fri, 21 Nov 2008 21:41:26 +0800

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.

Signed-off-by: Sheng Yang <address@hidden>
---
 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 <pci/pci.h>
+#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
-- 
1.5.4.5





reply via email to

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