[Spice-devel] [PATCH 1/3] qxl-virtio: add compilation support for qxl-virtio and for debugging stuffs
Erlon Cruz
erlon.cruz at br.flextronics.com
Fri Aug 24 12:10:58 PDT 2012
Signed-off-by: Erlon R. Cruz <erlon.cruz at fit-tecnologia.org.br>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio at fit-tecnologia.org.br>
Signed-off-by: Rafael F. Santos <fonsecasantos.rafael at gmail.com>
---
Makefile.am | 5 ++++-
configure.ac | 34 ++++++++++++++++++++++++++++++++++
src/Makefile.am | 34 ++++++++++++++++++++++++++++++++--
3 files changed, 70 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c19e659..fe0c686 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,4 +35,7 @@ EXTRA_DIST = \
README \
README.xspice
-DISTCHECK_CONFIGURE_FLAGS=--enable-xspice
+DISTCHECK_CONFIGURE_FLAGS = \
+ --enable-xspice \
+ --enable-virtio-qxl
+
diff --git a/configure.ac b/configure.ac
index a18910a..735f640 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,6 +102,38 @@ if test "x$enable_xspice" = "xyes"; then
else
enable_xspice=no
fi
+
+AC_ARG_ENABLE(virtio_qxl,
+[ --enable-virtio-qxl[[=(no|yes|only)]] Build the virtio-qxl driver
+ no (default) Do not build
+ yes Build in addition to qxl
+ only Only build virtio-qxl],
+[ if test "x$enableval" = "xyes"; then
+ enable_virtio_qxl=yes
+ elif test "x$enableval" = "xonly"; then
+ enable_virtio_qxl=yes
+ enable_qxl=no
+ else
+ enable_virtio_qxl=no
+ fi
+])
+
+if test ! "x$enable_virtio_qxl" = "xyes"; then
+ enable_virtio_qxl=no
+fi
+
+AC_ARG_ENABLE(debug,
+[ --enable-debug Compile with extra debug information],
+[enable_debug=yes])
+
+if test ! "x$enable_debug" = "xyes"; then
+ enable_debug=no
+fi
+
+
+AM_CONDITIONAL(BUILD_VIRTIO_QXL, test "x$enable_virtio_qxl" = "xyes")
+AM_CONDITIONAL(BUILD_DUMP_COMMANDS, test "x$enable_cmd_dump" = "xyes")
+AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
AM_CONDITIONAL(BUILD_XSPICE, test "x$enable_xspice" = "xyes")
AM_CONDITIONAL(BUILD_QXL, test "x$enable_qxl" = "xyes")
@@ -136,4 +168,6 @@ echo "
Build qxl: ${enable_qxl}
Build xspice: ${enable_xspice}
+ Build virtio-qxl: ${enable_virtio_qxl}
+ Debug: ${enable_debug}
"
diff --git a/src/Makefile.am b/src/Makefile.am
index 79ea3cc..fe8f5f0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,12 +29,20 @@ SUBDIRS=uxa
AM_CFLAGS = $(SPICE_PROTOCOL_CFLAGS) $(XORG_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS)
+if ENABLE_DEBUG
+DEBUGFLAGS = -DENABLE_DEBUG -O0 -g
+endif
+
+if BUILD_DUMP_COMMANDS
+DUMPFLAGS = -DDUMP_COMMANDS
+endif
+
if BUILD_QXL
qxl_drv_la_LTLIBRARIES = qxl_drv.la
qxl_drv_la_LDFLAGS = -module -avoid-version
qxl_drv_ladir = @moduledir@/drivers
-
qxl_drv_la_LIBADD = uxa/libuxa.la
+qxl_drv_la_CFLAGS = $(AM_CFLAGS) $(DEBUGFLAGS) $(DUMPFLAGS)
qxl_drv_la_SOURCES = \
qxl.h \
@@ -51,12 +59,34 @@ qxl_drv_la_SOURCES = \
compat-api.h
endif
+if BUILD_VIRTIO_QXL
+
+virtioqxl_drv_la_LTLIBRARIES = virtioqxl_drv.la
+virtioqxl_drv_la_LDFLAGS = -module -avoid-version
+virtioqxl_drv_ladir = @moduledir@/drivers
+virtioqxl_drv_la_CFLAGS = -DVIRTIO_QXL $(AM_CFLAGS) $(DEBUGFLAGS) $(DUMPFLAGS)
+virtioqxl_drv_la_LIBADD = uxa/libuxa.la
+
+virtioqxl_drv_la_SOURCES = \
+ qxl.h \
+ qxl_driver.c \
+ qxl_image.c \
+ qxl_surface.c \
+ qxl_ring.c \
+ qxl_mem.c \
+ mspace.c \
+ mspace.h \
+ murmurhash3.c \
+ murmurhash3.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_CFLAGS = -DXSPICE $(AM_CFLAGS) $(SPICE_CFLAGS) $(DEBUGFLAGS) $(DUMPFLAGS)
spiceqxl_drv_la_LIBADD = uxa/libuxa.la
--
1.7.4.1
More information about the Spice-devel
mailing list