configure.ac: Only check for xinerama for client builds

Xinerama support is only used for the X11 client, but is currently
being checked even for server only builds. This commit ensures Xinerama
is not checked for/added to spice-server.pc when not building the
client.
This commit is contained in:
Christophe Fergeau 2014-11-21 10:45:23 +01:00
parent 6a49d59e7e
commit 87149e48ed

View File

@ -282,6 +282,11 @@ AC_SUBST(GL_CFLAGS)
AC_SUBST(GL_LIBS)
AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
# Add parameter for libXinerama
AC_ARG_ENABLE([xinerama],
[AS_HELP_STRING([--disable-xinerama],
[disable Xinerama library @<:@default=no@:>@])])
if test "x$red_target" = "xx11" && test "x$enable_client" = "xyes" ; then
if test "$os_linux" = yes; then
PKG_CHECK_MODULES(ALSA, alsa)
@ -301,8 +306,21 @@ if test "x$red_target" = "xx11" && test "x$enable_client" = "xyes" ; then
xrandr >= 1.2,
have_xrandr12=yes,
have_xrandr12=no)
if test "x$enable_xinerama" != "xno"; then
PKG_CHECK_MODULES(XINERAMA,
xinerama >= 1.0,
have_xinerama=yes,
have_xinerama=no)
else
have_xinerama=no
fi
if test "x$enable_xinerama" = "xyes" && test "x$have_xinerama" = "xno"; then
AC_MSG_ERROR([Requested Xinerama library was not found])
fi
else
have_xrandr12=no
have_xinerama=no
fi
AM_CONDITIONAL([HAVE_XRANDR12], [test "x$have_xrandr12" = "xyes"])
@ -310,24 +328,6 @@ if test "x$have_xrandr12" = "xyes" ; then
AC_DEFINE([HAVE_XRANDR12], [], [Define if we have XRANDR 12])
fi
# Add parameter for libXinerama
AC_ARG_ENABLE([xinerama],
[AS_HELP_STRING([--disable-xinerama],
[disable Xinerama library @<:@default=no@:>@])])
if test "x$enable_xinerama" != "xno"; then
PKG_CHECK_MODULES(XINERAMA,
xinerama >= 1.0,
have_xinerama=yes,
have_xinerama=no)
else
have_xinerama=no
fi
if test "x$enable_xinerama" = "xyes" && test "x$have_xinerama" = "xno"; then
AC_MSG_ERROR([Requested Xinerama library was not found])
fi
AM_CONDITIONAL([HAVE_XINERAMA], [test "x$have_xinerama" = "xyes"])
if test "x$have_xinerama" = "xyes" ; then
AC_DEFINE([HAVE_XINERAMA], [], [Define if we have Xinerama])