diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-27 16:04:52 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-07-22 03:48:03 +0300 |
commit | f9d4fc347ba7927d4a723c3226f215bdcaab126e (patch) | |
tree | e2c40b214d1469cc2b57d699f91856b50ef651e0 | |
parent | e76334e08ca939f1963ce7ece0e60a3d12247467 (diff) |
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.
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | src/Makefile.am | 25 |
2 files changed, 55 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 224b530..f95221a 100644 --- a/configure.ac +++ b/configure.ac @@ -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} " diff --git a/src/Makefile.am b/src/Makefile.am index ff4fa14..7ebc4de 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 |