Revision 9fd8d8d7 configure
b/configure | ||
---|---|---|
953 | 953 |
if test "$kvm" = "yes" ; then |
954 | 954 |
cat > $TMPC <<EOF |
955 | 955 |
#include <linux/kvm.h> |
956 |
#if !defined(KVM_API_VERSION) || \ |
|
957 |
KVM_API_VERSION < 12 || \ |
|
958 |
KVM_API_VERSION > 12 || \ |
|
959 |
!defined(KVM_CAP_USER_MEMORY) || \ |
|
960 |
!defined(KVM_CAP_SET_TSS_ADDR) || \ |
|
961 |
!defined(KVM_CAP_DESTROY_MEMORY_REGION_WORKS) |
|
956 |
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12 |
|
962 | 957 |
#error Invalid KVM version |
963 | 958 |
#endif |
959 |
#if !defined(KVM_CAP_USER_MEMORY) |
|
960 |
#error Missing KVM capability KVM_CAP_USER_MEMORY |
|
961 |
#endif |
|
962 |
#if !defined(KVM_CAP_SET_TSS_ADDR) |
|
963 |
#error Missing KVM capability KVM_CAP_SET_TSS_ADDR |
|
964 |
#endif |
|
965 |
#if !defined(KVM_CAP_DESTROY_MEMORY_REGION_WORKS) |
|
966 |
#error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS |
|
967 |
#endif |
|
964 | 968 |
int main(void) { return 0; } |
965 | 969 |
EOF |
966 | 970 |
if test "$kerneldir" != "" ; then |
... | ... | |
980 | 984 |
> /dev/null 2>/dev/null ; then |
981 | 985 |
: |
982 | 986 |
else |
983 |
kvm="no" |
|
987 |
kvm="no"; |
|
988 |
if [ -x "`which awk 2>/dev/null`" ] && \ |
|
989 |
[ -x "`which grep 2>/dev/null`" ]; then |
|
990 |
kvmerr=`$cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $kvm_cflags $TMPC 2>&1 \ |
|
991 |
| grep "error: " \ |
|
992 |
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'` |
|
993 |
if test "$kvmerr" != "" ; then |
|
994 |
kvm="no - (${kvmerr})" |
|
995 |
fi |
|
996 |
fi |
|
984 | 997 |
fi |
985 | 998 |
fi |
986 | 999 |
|
Also available in: Unified diff