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

Alon Levy alevy at redhat.com
Thu May 31 08:01:07 PDT 2012


On Thu, May 31, 2012 at 05:44:23PM +0300, Uri Lublin wrote:
> From: Nahum Shalman <nshalman at elys.com>
> 

ACK.

Now you're making me feel back about the few patches I already
cherry-picked to 0.10 without asking anyone.

> Consolidate two separate chunks of library hunting that depend on the
> same check.
> 
> Check if we're actually building the client before looking for
> client only libraries.
> 
> Hide some of the final output if we're not building the client.
> 
> (cherry picked from master commit c3eae628725012678b7141b49b0a15b8718ea9b3)
> ---
>  configure.ac |   21 +++++++++------------
>  1 files changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b92c154..13c68c6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -172,7 +172,7 @@ AC_DEFINE_UNQUOTED([POSIX_YIELD_FUNC],$posix_yield_func,[The POSIX RT yield func
>  
>  SPICE_REQUIRES=""
>  
> -if test "x$enable_gui" = "xyes"; then
> +if test "x$enable_gui" = "xyes" && test "x$enable_client" = "xyes" ; then
>      PKG_CHECK_MODULES(CEGUI06, CEGUI-0.6 >= 0.6.0 CEGUI-0.6 < 0.7.0,
>      [
>          AC_SUBST(CEGUI06_CFLAGS)
> @@ -243,7 +243,7 @@ SPICE_REQUIRES+=" openssl"
>  # AC_SUBST(GL_LIBS)
>  # SPICE_REQUIRES+=" gl glu"
>  
> -if test "x$enable_opengl" = "xyes"; then
> +if test "x$enable_opengl" = "xyes" && test "x$enable_client" = "xyes" ; then
>     AC_CHECK_LIB(GL, glBlendFunc, GL_LIBS="$GL_LIBS -lGL", enable_opengl=no)
>     AC_CHECK_LIB(GLU, gluSphere, GL_LIBS="$GL_LIBS -lGLU", enable_opengl=no)
>     AC_DEFINE([USE_OPENGL], [1], [Define to build with OpenGL support])
> @@ -258,11 +258,14 @@ AC_SUBST(GL_CFLAGS)
>  AC_SUBST(GL_LIBS)
>  SPICE_NONPKGCONFIG_LIBS+=" $GL_LIBS"
>  
> -if test "$red_target" = "x11"; then
> +if test "x$red_target" = "xx11" && test "x$enable_client" = "xyes" ; 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,
> @@ -277,12 +280,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,
> @@ -534,18 +531,18 @@ echo "
>          python:                   ${PYTHON}
>  
>          Build Spice client:       ${enable_client}
> -
> +" ; if test "x$enable_client" == "xyes"; then echo "\
>          Have XRANDR 1.2:          ${have_xrandr12}
>  
>          Have Xinerama:            ${have_xinerama}
>  
> -        Support tunneling:        ${enable_tunnel}
> -
>          Red target:               ${red_target}
>  
>          OpenGL:                   ${enable_opengl}
>  
>          GUI:                      ${enable_gui}
> +" ; fi ; echo "\
> +        Support tunneling:        ${enable_tunnel}
>  
>          Smartcard:                ${enable_smartcard}
>  
> -- 
> 1.7.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list