summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-16 18:34:00 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 17:28:55 -0500
commitc59249f9294e25c5c8d6c8281f0b3724e9598981 (patch)
tree702c942bd82a17090c3805961bce803bd5b477d3
parent1b0c87fc0f5fb39eca22f26cab9a8e4ffd32a6e7 (diff)
downloadqemu-c59249f9294e25c5c8d6c8281f0b3724e9598981.tar.gz
configure kvm in a single place
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rwxr-xr-xconfigure41
1 files changed, 13 insertions, 28 deletions
diff --git a/configure b/configure
index 4b3ee9b0f6..f96b9da7da 100755
--- a/configure
+++ b/configure
@@ -1964,19 +1964,6 @@ target_nptl="no"
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
gdb_xml_files=""
-target_kvm="$kvm"
-
-# Make sure the target and host cpus are compatible
-if test ! \( "$target_arch2" = "$cpu" -o \
- \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
- \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
- \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
- target_kvm="no"
-fi
-# Disable KVM for linux-user
-if test "$target_softmmu" = "no" ; then
- target_kvm="no"
-fi
case "$target_arch2" in
i386)
@@ -1988,11 +1975,6 @@ case "$target_arch2" in
echo "CONFIG_KQEMU=y" >> $config_mak
echo "#define CONFIG_KQEMU 1" >> $config_h
fi
- if test "$target_kvm" = "yes" ; then
- echo "CONFIG_KVM=y" >> $config_mak
- echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
- echo "#define CONFIG_KVM 1" >> $config_h
- fi
target_phys_bits=32
;;
x86_64)
@@ -2006,11 +1988,6 @@ case "$target_arch2" in
echo "CONFIG_KQEMU=y" >> $config_mak
echo "#define CONFIG_KQEMU 1" >> $config_h
fi
- if test "$target_kvm" = "yes" ; then
- echo "CONFIG_KVM=y" >> $config_mak
- echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
- echo "#define CONFIG_KVM 1" >> $config_h
- fi
target_phys_bits=64
;;
alpha)
@@ -2094,11 +2071,6 @@ case "$target_arch2" in
echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPCEMB 1" >> $config_h
- if test "$target_kvm" = "yes" ; then
- echo "CONFIG_KVM=y" >> $config_mak
- echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
- echo "#define CONFIG_KVM 1" >> $config_h
- fi
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64
;;
@@ -2174,6 +2146,19 @@ case "$target_arch2" in
echo "#define CONFIG_XEN 1" >> $config_h
fi
esac
+case "$target_arch2" in
+ i386|x86_64|ppcemb)
+ # Make sure the target and host cpus are compatible
+ if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
+ \( "$target_arch2" = "$cpu" -o \
+ \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
+ \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
+ \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
+ echo "CONFIG_KVM=y" >> $config_mak
+ echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
+ echo "#define CONFIG_KVM 1" >> $config_h
+ fi
+esac
echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_mak
echo "#define TARGET_PHYS_ADDR_BITS $target_phys_bits" >> $config_h
echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak