[PATCH 16/24] Move kvm specific tests after main kvm test

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

 



Signed-off-by: Juan Quintela <quintela@xxxxxxxxxx>
---
 configure |  140 ++++++++++++++++++++++++++++++-------------------------------
 1 files changed, 69 insertions(+), 71 deletions(-)

diff --git a/configure b/configure
index ef7d03d..73ba095 100755
--- a/configure
+++ b/configure
@@ -905,76 +905,6 @@ EOF
 fi

 ##########################################
-# KVM probe
-
-case "$cpu" in
-    i386 | x86_64)
-	kvm_arch="x86"
-	;;
-    ppc)
-        kvm_arch="powerpc"
-        ;;
-    *)
-	kvm_arch="$cpu"
-	;;
-esac
-
-kvm_cflags=""
-
-if test "$kvm" != "no" ; then
-
-kvm_cflags="-I$source_path/kvm/include"
-kvm_cflags="$kvm_cflags -I$source_path/kvm/include/$kvm_arch"
-kvm_cflags="$kvm_cflags -idirafter $source_path/compat"
-
-# test for KVM_CAP_PIT
-
-cat > $TMPC <<EOF
-#include <linux/kvm.h>
-#ifndef KVM_CAP_PIT
-#error "kvm no pit capability"
-#endif
-int main(void) { return 0; }
-EOF
-    if compile_prog $kvm_cflags ""; then
-	kvm_cap_pit="yes"
-    fi
-
-# test for KVM_CAP_DEVICE_ASSIGNMENT
-
-cat > $TMPC <<EOF
-#include <linux/kvm.h>
-#ifndef KVM_CAP_DEVICE_ASSIGNMENT
-#error "kvm no device assignment capability"
-#endif
-int main(void) { return 0; }
-EOF
-    if compile_prog $kvm_cflags "" ; then
-	kvm_cap_device_assignment="yes"
-    fi
-fi
-
-# libpci probe for kvm_cap_device_assignment
-if test $kvm_cap_device_assignment = "yes" ; then
-cat > $TMPC << EOF
-#include <pci/pci.h>
-#ifndef PCI_VENDOR_ID
-#error NO LIBPCI
-#endif
-int main(void) { struct pci_access a; pci_init(&a); return 0; }
-EOF
-    if compile_prog "" "-lpci" ; then
-        libs_softmmu="-lpci $libs_softmmu"
-    else
-        echo
-        echo "Error: libpci check failed"
-        echo "Disable KVM Device Assignment capability."
-        echo
-        kvm_cap_device_assignment="no"
-    fi
-fi
-
-##########################################
 # zlib check

 cat > $TMPC << EOF
@@ -1372,7 +1302,23 @@ fi
 ##########################################
 # kvm probe
 if test "$kvm" != "no" ; then
-    cat > $TMPC <<EOF
+  case "$cpu" in
+  i386 | x86_64)
+    kvm_arch="x86"
+    ;;
+  ppc)
+    kvm_arch="powerpc"
+    ;;
+  *)
+    kvm_arch="$cpu"
+    ;;
+  esac
+
+  kvm_cflags="-I$source_path/kvm/include"
+  kvm_cflags="$kvm_cflags -I$source_path/kvm/include/$kvm_arch"
+  kvm_cflags="$kvm_cflags -idirafter $source_path/compat"
+
+  cat > $TMPC <<EOF
 #include <linux/kvm.h>
 #if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
 #error Invalid KVM version
@@ -1410,6 +1356,58 @@ EOF
 fi

 ##########################################
+# test for KVM_CAP_PIT
+
+if test "$kvm" != "no" ; then
+  cat > $TMPC <<EOF
+#include <linux/kvm.h>
+#ifndef KVM_CAP_PIT
+#error "kvm no pit capability"
+#endif
+int main(void) { return 0; }
+EOF
+  if compile_prog $kvm_cflags ""; then
+    kvm_cap_pit=yes
+  fi
+fi
+
+##########################################
+# test for KVM_CAP_DEVICE_ASSIGNMENT
+if test "$kvm" != "no" ; then
+  cat > $TMPC <<EOF
+#include <linux/kvm.h>
+#ifndef KVM_CAP_DEVICE_ASSIGNMENT
+#error "kvm no device assignment capability"
+#endif
+int main(void) { return 0; }
+EOF
+  if compile_prog $kvm_cflags "" ; then
+    kvm_cap_device_assignment=yes
+  fi
+fi
+
+##########################################
+# libpci probe for kvm_cap_device_assignment
+if test $kvm_cap_device_assignment = "yes" ; then
+  cat > $TMPC << EOF
+#include <pci/pci.h>
+#ifndef PCI_VENDOR_ID
+#error NO LIBPCI
+#endif
+int main(void) { struct pci_access a; pci_init(&a); return 0; }
+EOF
+  if compile_prog "" "-lpci" ; then
+    libs_softmmu="-lpci $libs_softmmu"
+  else
+    echo
+    echo "Error: libpci check failed"
+    echo "Disable KVM Device Assignment capability."
+    echo
+    kvm_cap_device_assignment=no
+  fi
+fi
+
+##########################################
 # pthread probe
 PTHREADLIBS_LIST="-lpthread -lpthreadGC2"

-- 
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux