aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-05-03 17:29:08 +0300
committerAvi Kivity <avi@redhat.com>2009-05-03 17:33:58 +0300
commit073636dba7deae71697476c75743c5c7f5c78c6b (patch)
tree92815ec05a6f946829be42c21c8e5cb5b994e2b7
parent75dceb6be221cbab2767731e0d659755786a24cb (diff)
Read kvm version from KVM_VERSION file
This allows the packager to add a KVM_VERSION file to the tarball instead of modifying the source. Signed-off-by: Avi Kivity <avi@redhat.com>
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index 0cfdf7b4f..04e072b01 100755
--- a/configure
+++ b/configure
@@ -152,6 +152,17 @@ case "$cpu" in
cpu="unknown"
;;
esac
+
+kvm_version() {
+ local fname="$(dirname "$0")/KVM_VERSION"
+
+ if test -f "$fname"; then
+ cat "$fname"
+ else
+ echo "kvm-devel"
+ fi
+}
+
gprof="no"
sparse="no"
bigendian="no"
@@ -190,6 +201,7 @@ aix="no"
blobs="yes"
fdt="yes"
sdl_x11="no"
+pkgversion="$(kvm_version)"
signalfd="no"
eventfd="no"
cpu_emulation="yes"
@@ -1474,7 +1486,7 @@ fi
qemu_version=`head $source_path/VERSION`
echo "VERSION=$qemu_version" >>$config_mak
echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
-echo "#define KVM_VERSION \"kvm-devel\"" >> $config_h
+echo "#define KVM_VERSION \"${pkgversion}\"" >> $config_h
echo "SRC_PATH=$source_path" >> $config_mak
if [ "$source_path_used" = "yes" ]; then