[Spice-devel] [PATCH 03/24] build: only check for x11 extensions when building for x11 platform.

Alon Levy alevy at redhat.com
Tue Dec 7 13:28:02 PST 2010


From: Gerd Hoffmann <kraxel at redhat.com>

---
 configure.ac |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7718a6d..4b732b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,26 +232,32 @@ AC_SUBST(GL_CFLAGS)
 AC_SUBST(GL_LIBS)
 SPICE_NONPKGCONFIG_LIBS+=" $GL_LIBS"
 
-PKG_CHECK_MODULES(XRANDR, xrandr)
-PKG_CHECK_MODULES(XFIXES, xfixes)
-AC_SUBST(XRANDR_CFLAGS)
-AC_SUBST(XRANDR_LIBS)
-SPICE_REQUIRES+=" xrandr xfixes"
-
-PKG_CHECK_MODULES(XRANDR12,
-        xrandr >= 1.2,
-        have_xrandr12=yes,
-        have_xrandr12=no)
+if test "$red_target" = "x11"; then
+	PKG_CHECK_MODULES(XRANDR, xrandr)
+	PKG_CHECK_MODULES(XFIXES, xfixes)
+	AC_SUBST(XRANDR_CFLAGS)
+	AC_SUBST(XRANDR_LIBS)
+	SPICE_REQUIRES+=" xrandr xfixes"
+
+	PKG_CHECK_MODULES(XRANDR12,
+	        xrandr >= 1.2,
+	        have_xrandr12=yes,
+	        have_xrandr12=no)
+else
+	have_xrandr12=no
+fi
 
 AM_CONDITIONAL([HAVE_XRANDR12], [test "x$have_xrandr12" = "xyes"])
 if test "x$have_xrandr12" = "xyes" ; then
   AC_DEFINE([HAVE_XRANDR12], [], [Define if we have XRANDR 12])
 fi
 
-PKG_CHECK_MODULES(MISC_X, x11 xext xrender)
-AC_SUBST(MISC_X_CFLAGS)
-AC_SUBST(MISC_X_LIBS)
-SPICE_REQUIRES+=" x11 xext xrender"
+if test "$red_target" = "x11"; then
+	PKG_CHECK_MODULES(MISC_X, x11 xext xrender)
+	AC_SUBST(MISC_X_CFLAGS)
+	AC_SUBST(MISC_X_LIBS)
+	SPICE_REQUIRES+=" x11 xext xrender"
+fi
 
 # Add parameter for (partial) static linkage of spice client.
 # this is used to achive single binary package for all (?) distros.
-- 
1.7.3.2



More information about the Spice-devel mailing list