changeset 1111:fa5f71d4aa04

console backend
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 08 Dec 2010 18:59:44 +0800
parents 851a062368bd
children 1993e5ae60aa
files configure.ac include/mb_backend.h include/mb_config.h.in src/Makefile.am
diffstat 4 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Wed Dec 08 18:31:39 2010 +0800
+++ b/configure.ac	Wed Dec 08 18:59:44 2010 +0800
@@ -83,6 +83,7 @@
         [case "${withval}" in
             ('X') backend='X'; default_graphic_engine="cairo" ;;
             ('dfb') backend='dfb'; default_graphic_engine="dfb" ;;
+	    ('console') backend='console'; default_graphic_engine="openvg" ;;
             ('no') backend='none'; default_graphic_engine="cairo" ;;
             (*) AC_MSG_ERROR([bad value ${withval} for --with-backend]) ;;
         esac],[backend='X'; default_graphic_engine="cairo"])
@@ -125,6 +126,7 @@
 [case "${backend}-${graphic_engine}-${image_loader}" in
     X-cairo-*|X-openvg-imlib2|X-openvg-dummy) ;;
     dfb-cairo-*) ;;
+    console-openvg-imlib2) ;;
     none-*-*) ;;
     *)] AC_MSG_ERROR([The combination of --with-backend=${backend}, --with-graphic-engine=${graphic_engine} and --with-image-loader=${image_loader} is invalid]) [;;
 esac]
@@ -185,6 +187,13 @@
     AC_DEFINE([DFB_BACKEND])
 [fi]
 
+AM_CONDITIONAL([CONSOLE_BACKEND],
+	[test x$backend = x'console' -a x"${graphic_engine}" = x"openvg"])
+
+[if [ x"${backend}" = x'console' -a x"${graphic_engine}" = x"openvg" ]; then]
+    AC_DEFINE([CONSOLE_BACKEND])
+[fi]
+
 AM_CONDITIONAL([CAIRO_IMG_LOADER],
 	[test x"${image_loader}" = x"cairo"])
 
@@ -262,6 +271,7 @@
 AH_TEMPLATE([DUMMY_IMG_LOADER], [Enable Dummy Image Loader])
 AH_TEMPLATE([X_BACKEND], [Enable X backend])
 AH_TEMPLATE([DFB_BACKEND], [Enable DirectFB backend])
+AH_TEMPLATE([CONSOLE_BACKEND], [Enable console backend])
 AH_TEMPLATE([XSHM], [Enable XSHM])
 
 AC_OUTPUT
--- a/include/mb_backend.h	Wed Dec 08 18:31:39 2010 +0800
+++ b/include/mb_backend.h	Wed Dec 08 18:59:44 2010 +0800
@@ -16,6 +16,10 @@
 #inclde "mb_dfb_supp.h"
 #endif
 
+#ifdef CONSOLE_BACKEND
+#include "mb_cons_supp.h"
+#endif
+
 struct _mb_rt;
 typedef struct _mb_rt mb_rt_t;
 
--- a/include/mb_config.h.in	Wed Dec 08 18:31:39 2010 +0800
+++ b/include/mb_config.h.in	Wed Dec 08 18:59:44 2010 +0800
@@ -36,4 +36,10 @@
 /* Enable DirectFB backend */
 #undef DFB_BACKEND
 
+/* Enable console backend */
+#undef CONSOLE_BACKEND
+
+/* Enable XSHM */
+#undef XSHM
+
 #endif /* __MB_CONFIG_H_ */
--- a/src/Makefile.am	Wed Dec 08 18:31:39 2010 +0800
+++ b/src/Makefile.am	Wed Dec 08 18:59:44 2010 +0800
@@ -45,6 +45,10 @@
 libmbfly_la_SOURCES += dfb_supp.c
 endif
 
+if CONSOLE_BACKEND
+libmbfly_la_SOURCES += cons_supp.c
+endif
+
 if CAIRO_IMG_LOADER
 libmbfly_la_SOURCES += img_ldr.c
 endif