[Spice-devel] [PATCH] cleanup x11 library detection for building client

Nahum Shalman nshalman at elys.com
Thu May 3 08:00:08 PDT 2012


consolidate two separate chunks of library hunting that depend on the
same check, and check if we're actually building the client.

hide some of the final output if we're not building the client
---
 configure.ac |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4b24c7d..aaa388c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,11 +269,14 @@ AC_SUBST(GL_CFLAGS)
 AC_SUBST(GL_LIBS)
 SPICE_NONPKGCONFIG_LIBS+=" $GL_LIBS"
 
-if test "$red_target" = "x11"; then
+if test "$red_target" = "x11" && test "$enable_client" = "yes" ; then
 	PKG_CHECK_MODULES(XRANDR, xrandr)
 	PKG_CHECK_MODULES(XFIXES, xfixes)
+	PKG_CHECK_MODULES(MISC_X, x11 xext xrender)
 	AC_SUBST(XRANDR_CFLAGS)
 	AC_SUBST(XRANDR_LIBS)
+	AC_SUBST(MISC_X_CFLAGS)
+	AC_SUBST(MISC_X_LIBS)
 
 	PKG_CHECK_MODULES(XRANDR12,
 	        xrandr >= 1.2,
@@ -288,12 +291,6 @@ if test "x$have_xrandr12" = "xyes" ; then
   AC_DEFINE([HAVE_XRANDR12], [], [Define if we have XRANDR 12])
 fi
 
-if test "$red_target" = "x11"; then
-	PKG_CHECK_MODULES(MISC_X, x11 xext xrender)
-	AC_SUBST(MISC_X_CFLAGS)
-	AC_SUBST(MISC_X_LIBS)
-fi
-
 PKG_CHECK_MODULES(XINERAMA,
         xinerama >= 1.0,
         have_xinerama=yes,
@@ -485,11 +482,11 @@ echo "
         python:                   ${PYTHON}
 
         Build Spice client:       ${enable_client}
-
+" ; if test $enable_client == "yes"; then echo "
         Have XRANDR 1.2:          ${have_xrandr12}
 
         Have Xinerama:            ${have_xinerama}
-
+" ; fi ; echo "
         Support tunneling:        ${enable_tunnel}
 
         Red target:               ${red_target}
-- 
1.7.7.6



More information about the Spice-devel mailing list