Add kvm to new feature convention
Extra error message is only given if --enable-kvm was given Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
fc321b4b37
commit
b31a027755
19
configure
vendored
19
configure
vendored
@ -183,6 +183,7 @@ curl=""
|
|||||||
curses=""
|
curses=""
|
||||||
docs=""
|
docs=""
|
||||||
fdt=""
|
fdt=""
|
||||||
|
kvm=""
|
||||||
nptl=""
|
nptl=""
|
||||||
sdl=""
|
sdl=""
|
||||||
vde=""
|
vde=""
|
||||||
@ -215,7 +216,6 @@ guest_base=""
|
|||||||
uname_release=""
|
uname_release=""
|
||||||
io_thread="no"
|
io_thread="no"
|
||||||
mixemu="no"
|
mixemu="no"
|
||||||
kvm="no"
|
|
||||||
kerneldir=""
|
kerneldir=""
|
||||||
aix="no"
|
aix="no"
|
||||||
blobs="yes"
|
blobs="yes"
|
||||||
@ -337,7 +337,6 @@ AIX)
|
|||||||
linux="yes"
|
linux="yes"
|
||||||
linux_user="yes"
|
linux_user="yes"
|
||||||
usb="linux"
|
usb="linux"
|
||||||
kvm="yes"
|
|
||||||
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
|
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
|
||||||
audio_possible_drivers="$audio_possible_drivers fmod"
|
audio_possible_drivers="$audio_possible_drivers fmod"
|
||||||
fi
|
fi
|
||||||
@ -463,6 +462,8 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--disable-kvm) kvm="no"
|
--disable-kvm) kvm="no"
|
||||||
;;
|
;;
|
||||||
|
--enable-kvm) kvm="yes"
|
||||||
|
;;
|
||||||
--enable-profiler) profiler="yes"
|
--enable-profiler) profiler="yes"
|
||||||
;;
|
;;
|
||||||
--enable-cocoa)
|
--enable-cocoa)
|
||||||
@ -650,6 +651,7 @@ echo " --enable-fdt enable fdt device tree"
|
|||||||
echo " --disable-bluez disable bluez stack connectivity"
|
echo " --disable-bluez disable bluez stack connectivity"
|
||||||
echo " --enable-bluez enable bluez stack connectivity"
|
echo " --enable-bluez enable bluez stack connectivity"
|
||||||
echo " --disable-kvm disable KVM acceleration support"
|
echo " --disable-kvm disable KVM acceleration support"
|
||||||
|
echo " --enable-kvm enable KVM acceleration support"
|
||||||
echo " --disable-nptl disable usermode NPTL support"
|
echo " --disable-nptl disable usermode NPTL support"
|
||||||
echo " --enable-nptl disable usermode NPTL support"
|
echo " --enable-nptl disable usermode NPTL support"
|
||||||
echo " --enable-system enable all system emulation targets"
|
echo " --enable-system enable all system emulation targets"
|
||||||
@ -1216,7 +1218,7 @@ fi
|
|||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# kvm probe
|
# kvm probe
|
||||||
if test "$kvm" = "yes" ; then
|
if test "$kvm" != "no" ; then
|
||||||
cat > $TMPC <<EOF
|
cat > $TMPC <<EOF
|
||||||
#include <linux/kvm.h>
|
#include <linux/kvm.h>
|
||||||
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
|
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
|
||||||
@ -1247,20 +1249,23 @@ EOF
|
|||||||
kvm_cflags=""
|
kvm_cflags=""
|
||||||
fi
|
fi
|
||||||
if compile_prog "$kvm_cflags" "" ; then
|
if compile_prog "$kvm_cflags" "" ; then
|
||||||
:
|
kvm=yes
|
||||||
else
|
else
|
||||||
kvm="no";
|
if test "$kvm" = "yes" ; then
|
||||||
if [ -x "`which awk 2>/dev/null`" ] && \
|
if [ -x "`which awk 2>/dev/null`" ] && \
|
||||||
[ -x "`which grep 2>/dev/null`" ]; then
|
[ -x "`which grep 2>/dev/null`" ]; then
|
||||||
kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
|
kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
|
||||||
| grep "error: " \
|
| grep "error: " \
|
||||||
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
|
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
|
||||||
if test "$kvmerr" != "" ; then
|
if test "$kvmerr" != "" ; then
|
||||||
kvm="no - (${kvmerr})\n\
|
echo -e "${kvmerr}\n\
|
||||||
NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
|
NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
|
||||||
recent kvm-kmod from http://sourceforge.net/projects/kvm."
|
recent kvm-kmod from http://sourceforge.net/projects/kvm."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
feature_not_found "kvm"
|
||||||
|
fi
|
||||||
|
kvm=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1625,7 +1630,7 @@ echo "GUEST_BASE $guest_base"
|
|||||||
echo "vde support $vde"
|
echo "vde support $vde"
|
||||||
echo "IO thread $io_thread"
|
echo "IO thread $io_thread"
|
||||||
echo "Install blobs $blobs"
|
echo "Install blobs $blobs"
|
||||||
echo -e "KVM support $kvm"
|
echo "KVM support $kvm"
|
||||||
echo "fdt support $fdt"
|
echo "fdt support $fdt"
|
||||||
echo "preadv support $preadv"
|
echo "preadv support $preadv"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user