aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-08-12 18:29:56 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 19:33:15 -0500
commitb31a0277558db5eeb71164ad511467cf5125b853 (patch)
tree03f874a8bab73029d87b47aae4b237bdab3b1e34 /configure
parentfc321b4b3753702dccc591bd01d38c74ef2e7d8b (diff)
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 18 insertions, 13 deletions
diff --git a/configure b/configure
index ef462afcb6..abb2dfbe44 100755
--- a/configure
+++ b/configure
@@ -183,6 +183,7 @@ curl=""
curses=""
docs=""
fdt=""
+kvm=""
nptl=""
sdl=""
vde=""
@@ -215,7 +216,6 @@ guest_base=""
uname_release=""
io_thread="no"
mixemu="no"
-kvm="no"
kerneldir=""
aix="no"
blobs="yes"
@@ -337,7 +337,6 @@ AIX)
linux="yes"
linux_user="yes"
usb="linux"
- kvm="yes"
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
audio_possible_drivers="$audio_possible_drivers fmod"
fi
@@ -463,6 +462,8 @@ for opt do
;;
--disable-kvm) kvm="no"
;;
+ --enable-kvm) kvm="yes"
+ ;;
--enable-profiler) profiler="yes"
;;
--enable-cocoa)
@@ -650,6 +651,7 @@ echo " --enable-fdt enable fdt device tree"
echo " --disable-bluez disable bluez stack connectivity"
echo " --enable-bluez enable bluez stack connectivity"
echo " --disable-kvm disable KVM acceleration support"
+echo " --enable-kvm enable KVM acceleration support"
echo " --disable-nptl disable usermode NPTL support"
echo " --enable-nptl disable usermode NPTL support"
echo " --enable-system enable all system emulation targets"
@@ -1216,7 +1218,7 @@ fi
##########################################
# kvm probe
-if test "$kvm" = "yes" ; then
+if test "$kvm" != "no" ; then
cat > $TMPC <<EOF
#include <linux/kvm.h>
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
@@ -1247,20 +1249,23 @@ EOF
kvm_cflags=""
fi
if compile_prog "$kvm_cflags" "" ; then
- :
+ kvm=yes
else
- kvm="no";
- if [ -x "`which awk 2>/dev/null`" ] && \
- [ -x "`which grep 2>/dev/null`" ]; then
- kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
+ if test "$kvm" = "yes" ; then
+ if [ -x "`which awk 2>/dev/null`" ] && \
+ [ -x "`which grep 2>/dev/null`" ]; then
+ kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
| grep "error: " \
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
- if test "$kvmerr" != "" ; then
- kvm="no - (${kvmerr})\n\
- NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
-recent kvm-kmod from http://sourceforge.net/projects/kvm."
+ if test "$kvmerr" != "" ; then
+ echo -e "${kvmerr}\n\
+ NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
+ recent kvm-kmod from http://sourceforge.net/projects/kvm."
+ fi
fi
+ feature_not_found "kvm"
fi
+ kvm=no
fi
fi
@@ -1625,7 +1630,7 @@ echo "GUEST_BASE $guest_base"
echo "vde support $vde"
echo "IO thread $io_thread"
echo "Install blobs $blobs"
-echo -e "KVM support $kvm"
+echo "KVM support $kvm"
echo "fdt support $fdt"
echo "preadv support $preadv"