From 073636dba7deae71697476c75743c5c7f5c78c6b Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 3 May 2009 17:29:08 +0300 Subject: [PATCH] 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 --- configure | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0cfdf7b4f0..04e072b012 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 -- 2.11.4.GIT