Patchwork configure: ignore spice libraries on 32 bit.

login
register
mail settings
Submitter Rusty Russell
Date Feb. 8, 2012, 12:17 a.m.
Message ID <878vkegovg.fsf@rustcorp.com.au>
Download mbox | patch
Permalink /patch/140044/
State New
Headers show

Comments

Rusty Russell - Feb. 8, 2012, 12:17 a.m.
As featured on:
        https://bugs.launchpad.net/qemu-linaro/+bug/928432

Since we compile with -Werror, the presence of spice headers breaks
compile.  Yet except for x86-64, it doesn't compile, doesn't work, isn't
supported.  See: http://spice-space.org/faq.html

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 configure |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/configure b/configure
index c9ff673..84118e4 100755
--- a/configure
+++ b/configure
@@ -2509,7 +2509,7 @@  if compile_prog "" "" ; then
     need_offsetof=no
 fi
 
-# spice probe
+# spice probe: x86-64 only (see http://spice-space.org/page/FAQ)
 if test "$spice" != "no" ; then
   cat > $TMPC << EOF
 #include <spice.h>
@@ -2517,7 +2517,8 @@  int main(void) { spice_server_new(); return 0; }
 EOF
   spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
   spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
-  if $pkg_config --atleast-version=0.6.0 spice-server >/dev/null 2>&1 && \
+  if [ "$ARCH" = x86_64 ] && \
+     $pkg_config --atleast-version=0.6.0 spice-server >/dev/null 2>&1 && \
      compile_prog "$spice_cflags" "$spice_libs" ; then
     spice="yes"
     libs_softmmu="$libs_softmmu $spice_libs"