# HG changeset patch # User Shih-Yuan Lee (FourDollars) # Date 1280568660 -28800 # Node ID 21f944e79b19bb2febf1a5abb2b2e0aae06dfe7a # Parent 34710e86b4a28b55aa9bf07590becf2e0a5780c5 Use --with-backend to specify display backend. diff -r 34710e86b4a2 -r 21f944e79b19 build-mipsel.sh --- a/build-mipsel.sh Sat Jul 31 16:36:53 2010 +0800 +++ b/build-mipsel.sh Sat Jul 31 17:31:00 2010 +0800 @@ -1,5 +1,5 @@ #!/bin/sh autoreconf -ifs -./configure --host mipsel-linux --build i686-pc-linux-gnu --prefix ${TANGO} --disable-sh_text --disable-X_supp +./configure --host mipsel-linux --build i686-pc-linux-gnu --prefix ${TANGO} --disable-sh_text --with-backend=dfb make && make install diff -r 34710e86b4a2 -r 21f944e79b19 configure.ac --- a/configure.ac Sat Jul 31 16:36:53 2010 +0800 +++ b/configure.ac Sat Jul 31 17:31:00 2010 +0800 @@ -64,13 +64,14 @@ AC_DEFINE([SH_STEXT]) [fi] -AC_ARG_ENABLE([X_supp], - [AS_HELP_STRING([--disable-X_supp],[Turn off X backend])], - [case "${enableval}" in - (yes) X_supp=true ;; - (no) X_supp=false ;; - (*) AC_MSG_ERROR([bad value ${enableval} for --disable-X_supp]) ;; - esac],[X_supp=true]) +AC_ARG_WITH([backend], + [AS_HELP_STRING([--with-backend=FOO],[Use FOO as display backend (default is 'X')])], + [case "${withval}" in + ('X') backend='X' ;; + ('dfb') backend='dfb' ;; + ('no') backend='none' ;; + (*) AC_MSG_ERROR([bad value ${withval} for --with-backend]) ;; + esac],[backend='X']) AC_ARG_ENABLE([skia], [AS_HELP_STRING([--enable-skia],[Turn on Skia instead of Cairo])], @@ -114,12 +115,18 @@ AC_DEFINE([SH_TEXT]) [fi] -# Define AM and AC variable for X_supp +# Define AM and AC variable for display backend + +AM_CONDITIONAL([X_BACKEND], [test x$backend = x'X' -a x$cairo = xtrue]) -AM_CONDITIONAL([X_SUPP], [test x$X_supp = xtrue -a x$cairo = xtrue]) +[if [ x"${backend}" = x'X' -a x"${cairo}" = xtrue ]; then] + AC_DEFINE([X_BACKEND]) +[fi] -[if [ x"${X_supp}" = xtrue -a x"${cairo}" = xtrue ]; then] - AC_DEFINE([X_SUPP]) +AM_CONDITIONAL([DFB_BACKEND], [test x$backend = x'dfb' -a x$cairo = xtrue]) + +[if [ x"${backend}" = x'dfb' -a x"${cairo}" = xtrue ]; then] + AC_DEFINE([DFB_BACKEND]) [fi] # Checks for libraries. @@ -153,6 +160,7 @@ AH_TEMPLATE([SH_STEXT],[Enable sh_stext object]) AH_TEMPLATE([SKIA_GRAPH_ENGINE], [Enable Skia Graphic Engine]) AH_TEMPLATE([CAIRO_GRAPH_ENGINE], [Enable Cairo Graphic Engine]) -AH_TEMPLATE([X_SUPP], [Enable X backend]) +AH_TEMPLATE([X_BACKEND], [Enable X backend]) +AH_TEMPLATE([DFB_BACKEND], [Enable DirectFB backend]) AC_OUTPUT diff -r 34710e86b4a2 -r 21f944e79b19 examples/Makefile.am --- a/examples/Makefile.am Sat Jul 31 16:36:53 2010 +0800 +++ b/examples/Makefile.am Sat Jul 31 17:31:00 2010 +0800 @@ -1,3 +1,3 @@ -if X_SUPP +if X_BACKEND SUBDIRS = calculator svg2code_ex tank dynamic drag menu endif diff -r 34710e86b4a2 -r 21f944e79b19 include/mb.h --- a/include/mb.h Sat Jul 31 16:36:53 2010 +0800 +++ b/include/mb.h Sat Jul 31 17:31:00 2010 +0800 @@ -5,7 +5,7 @@ #include "mb_types.h" #include "mb_redraw_man.h" -#ifdef X_SUPP +#ifdef X_BACKEND #include "mb_X_supp.h" #endif #include "mb_animate.h" diff -r 34710e86b4a2 -r 21f944e79b19 include/mb_config.h.in --- a/include/mb_config.h.in Sat Jul 31 16:36:53 2010 +0800 +++ b/include/mb_config.h.in Sat Jul 31 17:31:00 2010 +0800 @@ -14,6 +14,9 @@ #undef SH_STEXT /* Enable X backend */ -#undef X_SUPP +#undef X_BACKEND + +/* Enable DirectFB backend */ +#undef DFB_BACKEND #endif /* __MB_CONFIG_H_ */ diff -r 34710e86b4a2 -r 21f944e79b19 src/Makefile.am --- a/src/Makefile.am Sat Jul 31 16:36:53 2010 +0800 +++ b/src/Makefile.am Sat Jul 31 17:31:00 2010 +0800 @@ -12,7 +12,7 @@ noinst_PROGRAMS += testcase endif -if X_SUPP +if X_BACKEND MBAF_SOURCES=mbaf/mbapp.c mbaf/mbbutton.c mbaf/mbobject.c mbaf/animated_menu.c else MBAF_SOURCES= @@ -32,7 +32,7 @@ libmbfly_la_SOURCES += shape_stext.c endif -if X_SUPP +if X_BACKEND libmbfly_la_SOURCES += X_supp.c endif