From: Jan Kiszka <jan.kis...@web.de>

Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
kernel headers. Use it when available and not overruled by --kerneldir.
If there is no kvm-kmod and no --kerneldir, we continue to fall back to
the qemu-kvm's kernel headers.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com>

diff --git a/configure b/configure
index 20c374a..6ba565a 100755
--- a/configure
+++ b/configure
@@ -1424,6 +1424,8 @@ EOF
             kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include"
       fi
   else
+    kvm_cflags=`pkg-config --cflags kvm-kmod 2> /dev/null`
+    if test "$kvm_cflags" = ""; then
       case "$cpu" in
       i386 | x86_64)
         kvm_arch="x86"
@@ -1438,6 +1440,7 @@ EOF
       kvm_cflags="-I$source_path/kvm/include"
       kvm_cflags="$kvm_cflags -include $source_path/kvm/include/linux/config.h"
       kvm_cflags="$kvm_cflags -I$source_path/kvm/include/$kvm_arch"
+    fi
   fi
   kvm_cflags="$kvm_cflags -idirafter $source_path/compat"
   if compile_prog "$kvm_cflags" "" ; then
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to