configure kvm in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Juan Quintela 2009-07-16 18:34:00 +02:00 committed by Anthony Liguori
parent 1b0c87fc0f
commit c59249f929
1 changed files with 13 additions and 28 deletions

41
configure vendored
View File

@ -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