render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame 0003-add-spice-into-the-configure-file.patch

Justin M. Forbes a81953
From 0034da7fb15d1225e0fd725009743d48511a90b7 Mon Sep 17 00:00:00 2001
Justin M. Forbes a81953
From: Gerd Hoffmann <kraxel@redhat.com>
Justin M. Forbes a81953
Date: Wed, 24 Mar 2010 10:26:51 +0100
Justin M. Forbes a81953
Subject: [PATCH 03/39] add spice into the configure file
Justin M. Forbes a81953
Justin M. Forbes a81953
---
Justin M. Forbes a81953
 configure |   36 ++++++++++++++++++++++++++++++++++++
Justin M. Forbes a81953
 1 files changed, 36 insertions(+), 0 deletions(-)
Justin M. Forbes a81953
Justin M. Forbes a81953
diff --git a/configure b/configure
Justin M. Forbes a81953
index e09c442..2aaa6d7 100755
Justin M. Forbes a81953
--- a/configure
Justin M. Forbes a81953
+++ b/configure
Justin M. Forbes a81953
@@ -331,6 +331,7 @@ cpu_emulation="yes"
Justin M. Forbes a81953
 check_utests="no"
Justin M. Forbes a81953
 user_pie="no"
Justin M. Forbes a81953
 zero_malloc=""
Justin M. Forbes a81953
+spice=""
Justin M. Forbes a81953
Justin M. Forbes a81953
 # OS specific
Justin M. Forbes a81953
 if check_define __linux__ ; then
Justin M. Forbes a81953
@@ -647,6 +648,10 @@ for opt do
Justin M. Forbes a81953
   ;;
Justin M. Forbes a81953
   --enable-kvm-device-assignment) kvm_cap_device_assignment="yes"
Justin M. Forbes a81953
   ;;
Justin M. Forbes a81953
+  --disable-spice) spice="no"
Justin M. Forbes a81953
+  ;;
Justin M. Forbes a81953
+  --enable-spice) spice="yes"
Justin M. Forbes a81953
+  ;;
Justin M. Forbes a81953
   --enable-profiler) profiler="yes"
Justin M. Forbes a81953
   ;;
Justin M. Forbes a81953
   --enable-cocoa)
Justin M. Forbes a81953
@@ -933,6 +938,8 @@ echo "  --enable-docs            enable documentation build"
Justin M. Forbes a81953
 echo "  --disable-docs           disable documentation build"
Justin M. Forbes a81953
 echo "  --disable-vhost-net      disable vhost-net acceleration support"
Justin M. Forbes a81953
 echo "  --enable-vhost-net       enable vhost-net acceleration support"
Justin M. Forbes a81953
+echo "  --disable-spice          disable spice"
Justin M. Forbes a81953
+echo "  --enable-spice           enable spice"
Justin M. Forbes a81953
 echo ""
Justin M. Forbes a81953
 echo "NOTE: The object files are built at the place where configure is launched"
Justin M. Forbes a81953
 exit 1
Justin M. Forbes a81953
@@ -2184,6 +2191,30 @@ if compile_prog "" ""; then
Justin M. Forbes a81953
     gcc_attribute_warn_unused_result=yes
Justin M. Forbes a81953
 fi
Justin M. Forbes a81953
Justin M. Forbes a81953
+# spice probe
Justin M. Forbes a81953
+if test "$spice" != "no" ; then
Justin M. Forbes a81953
+  cat > $TMPC << EOF
Justin M. Forbes a81953
+#include <spice.h>
Justin M. Forbes a81953
+int main(void) { spice_server_new(); return 0; }
Justin M. Forbes a81953
+EOF
Justin M. Forbes a81953
+  spice_proto_ver=$($pkgconfig --modversion spice-protocol 2>/dev/null)
Justin M. Forbes a81953
+  spice_server_ver=$($pkgconfig --modversion spice-server 2>/dev/null)
Justin M. Forbes a81953
+  spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null)
Justin M. Forbes a81953
+  spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
Justin M. Forbes a81953
+  if compile_prog "$spice_cflags" "$spice_libs" ; then
Justin M. Forbes a81953
+    spice="yes"
Justin M. Forbes a81953
+    libs_softmmu="$libs_softmmu $spice_libs"
Justin M. Forbes a81953
+    QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags"
Justin M. Forbes a81953
+  else
Justin M. Forbes a81953
+    if test "$spice" = "yes" ; then
Justin M. Forbes a81953
+      feature_not_found "spice"
Justin M. Forbes a81953
+    fi
Justin M. Forbes a81953
+    spice="no"
Justin M. Forbes a81953
+  fi
Justin M. Forbes a81953
+fi
Justin M. Forbes a81953
+
Justin M. Forbes a81953
+##########################################
Justin M. Forbes a81953
+
Justin M. Forbes a81953
 ##########################################
Justin M. Forbes a81953
 # check if we have fdatasync
Justin M. Forbes a81953
Justin M. Forbes a81953
@@ -2329,6 +2360,7 @@ echo "preadv support    $preadv"
Justin M. Forbes a81953
 echo "fdatasync         $fdatasync"
Justin M. Forbes a81953
 echo "uuid support      $uuid"
Justin M. Forbes a81953
 echo "vhost-net support $vhost_net"
Justin M. Forbes a81953
+echo "spice support     $spice"
Justin M. Forbes a81953
Justin M. Forbes a81953
 if test $sdl_too_old = "yes"; then
Justin M. Forbes a81953
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
Justin M. Forbes a81953
@@ -2574,6 +2606,10 @@ else
Justin M. Forbes a81953
   echo "CONFIG_NO_CPU_EMULATION=y" >> $config_host_mak
Justin M. Forbes a81953
 fi
Justin M. Forbes a81953
Justin M. Forbes a81953
+if test "$spice" = "yes" ; then
Justin M. Forbes a81953
+  echo "CONFIG_SPICE=y" >> $config_host_mak
Justin M. Forbes a81953
+fi
Justin M. Forbes a81953
+
Justin M. Forbes a81953
 # XXX: suppress that
Justin M. Forbes a81953
 if [ "$bsd" = "yes" ] ; then
Justin M. Forbes a81953
   echo "CONFIG_BSD=y" >> $config_host_mak
Justin M. Forbes a81953
-- 
Justin M. Forbes a81953
1.7.2.3
Justin M. Forbes a81953