Commit f9d4fc34 authored by Alon Levy's avatar Alon Levy

xspice: add configure option and make target

adds --enable-xspice[=no|yes|only], which builds an spiceqxl_drv.so target, and
defines SUPPORT_XSPICE. Fails build if spice-server not found. If you
set to only it will not build the qxl driver. This is useful for easier
packaging by not creating unpackaged artifacts.
parent e76334e0
......@@ -76,6 +76,35 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
# Checks for libraries.
enable_qxl=yes
AC_ARG_ENABLE(xspice,
[ --enable-xspice[[=(no|yes|only)]] Build the xspice driver
no (default) Do not build
yes Build in addition to qxl
only Only build xspice],
[ if test "x$enableval" = "xyes"; then
enable_xspice=yes
elif test "x$enableval" = "xonly"; then
enable_xspice=yes
enable_qxl=no
else
enable_xspice=no
fi
])
if test "x$enable_xspice" = "xyes"; then
PKG_CHECK_MODULES([SPICE], [spice-server >= 0.6.3],
[
AC_SUBST(SPICE_CFLAGS)
AC_SUBST(SPICE_LIBS)
],
)
else
enable_xspice=no
fi
AM_CONDITIONAL(BUILD_XSPICE, test "x$enable_xspice" = "xyes")
AM_CONDITIONAL(BUILD_QXL, test "x$enable_qxl" = "xyes")
PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.8.1])
AC_CHECK_FILE(.git, [
......@@ -100,5 +129,6 @@ echo "
prefix: ${prefix}
c compiler: ${CC}
Build qxl: ${enable_qxl}
Build xspice: ${enable_xspice}
"
......@@ -29,6 +29,7 @@ SUBDIRS=uxa
AM_CFLAGS = $(SPICE_PROTOCOL_CFLAGS) $(XORG_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS)
if BUILD_QXL
qxl_drv_la_LTLIBRARIES = qxl_drv.la
qxl_drv_la_LDFLAGS = -module -avoid-version
qxl_drv_ladir = @moduledir@/drivers
......@@ -47,3 +48,27 @@ qxl_drv_la_SOURCES = \
lookup3.c \
lookup3.h \
qxl_cursor.c
endif
if BUILD_XSPICE
spiceqxl_drv_la_LTLIBRARIES = spiceqxl_drv.la
spiceqxl_drv_la_LDFLAGS = -module -avoid-version $(SPICE_LIBS)
spiceqxl_drv_ladir = @moduledir@/drivers
spiceqxl_drv_la_CFLAGS = -DXSPICE $(AM_CFLAGS) $(SPICE_CFLAGS)
spiceqxl_drv_la_LIBADD = uxa/libuxa.la
spiceqxl_drv_la_SOURCES = \
qxl.h \
qxl_driver.c \
qxl_image.c \
qxl_surface.c \
qxl_ring.c \
qxl_mem.c \
mspace.c \
mspace.h \
lookup3.c \
lookup3.h \
qxl_cursor.c
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment