summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/qemu-kvm/README2
-rw-r--r--system/qemu-kvm/qemu-kvm.SlackBuild10
2 files changed, 11 insertions, 1 deletions
diff --git a/system/qemu-kvm/README b/system/qemu-kvm/README
index f2db915c53..13a421d7bc 100644
--- a/system/qemu-kvm/README
+++ b/system/qemu-kvm/README
@@ -21,3 +21,5 @@ different group, then run the SlackBuild like this:
Don't forget to load the 'kvm-intel' or 'kvm-amd' module (depending on
your processor) prior to running 'qemu-kvm'.
+
+spice is an optional dependency.
diff --git a/system/qemu-kvm/qemu-kvm.SlackBuild b/system/qemu-kvm/qemu-kvm.SlackBuild
index b271df276b..8f0990fa07 100644
--- a/system/qemu-kvm/qemu-kvm.SlackBuild
+++ b/system/qemu-kvm/qemu-kvm.SlackBuild
@@ -84,6 +84,13 @@ sed -i "s|^CFLAGS=\"-g\ |CFLAGS=\"|" configure
sed -i "s|^LDFLAGS=\"-g\ |LDFLAGS=\"|" configure
sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure
+# check if spice support is enabled
+if pkg-config --exists spice-server ; then
+ with_spice="--enable-spice"
+else
+ with_spice="--disable-spice"
+fi
+
# The script builds only the 32/64 bit x86 compatible Linux Target CPU emulator.
# If you need to emulate other available architectures you should install the
# "qemu" package, not the "qemu-kvm" package. This package will only be useful
@@ -97,7 +104,8 @@ CFLAGS="$SLKCFLAGS" \
--enable-mixemu \
--audio-drv-list=alsa,oss,sdl,esd \
--enable-system \
- --target-list="x86_64-softmmu"
+ --target-list="x86_64-softmmu" \
+ $with_spice
make V=1 \
OS_CFLAGS="$SLKCFLAGS" \