comparison configure.ac @ 1124:b5ff72dbc910

merge
author wycc
date Thu, 09 Dec 2010 07:48:46 +0800
parents 17cbb862a8c6
children eca737d33a18
comparison
equal deleted inserted replaced
1123:aad659b6b625 1124:b5ff72dbc910
81 AC_ARG_WITH([backend], 81 AC_ARG_WITH([backend],
82 [AS_HELP_STRING([--with-backend=FOO],[Use FOO as display backend (default is 'X')])], 82 [AS_HELP_STRING([--with-backend=FOO],[Use FOO as display backend (default is 'X')])],
83 [case "${withval}" in 83 [case "${withval}" in
84 ('X') backend='X'; default_graphic_engine="cairo" ;; 84 ('X') backend='X'; default_graphic_engine="cairo" ;;
85 ('dfb') backend='dfb'; default_graphic_engine="dfb" ;; 85 ('dfb') backend='dfb'; default_graphic_engine="dfb" ;;
86 ('console') backend='console'; default_graphic_engine="openvg" ;;
86 ('no') backend='none'; default_graphic_engine="cairo" ;; 87 ('no') backend='none'; default_graphic_engine="cairo" ;;
87 (*) AC_MSG_ERROR([bad value ${withval} for --with-backend]) ;; 88 (*) AC_MSG_ERROR([bad value ${withval} for --with-backend]) ;;
88 esac],[backend='X'; default_graphic_engine="cairo"]) 89 esac],[backend='X'; default_graphic_engine="cairo"])
89 90
90 AC_ARG_WITH([graphic-engine], 91 AC_ARG_WITH([graphic-engine],
103 [AS_HELP_STRING([--with-image-loader=FOO], 104 [AS_HELP_STRING([--with-image-loader=FOO],
104 [Use FOO as image loader (default is 'cairo')])], 105 [Use FOO as image loader (default is 'cairo')])],
105 [case "${withval}" in 106 [case "${withval}" in
106 ('cairo') image_loader="cairo" ;; 107 ('cairo') image_loader="cairo" ;;
107 ('imlib2') image_loader="imlib2" ;; 108 ('imlib2') image_loader="imlib2" ;;
108 ('no') image_loader="none" ;; 109 ('dummy') image_loader="dummy" ;;
109 (*) AC_MSG_ERROR([bad value ${withval} for --with-image-loader]) 110 (*) AC_MSG_ERROR([bad value ${withval} for --with-image-loader])
110 ;; 111 ;;
111 esac], [image_loader="cairo"]) 112 esac], [image_loader="cairo"])
112 113
113 xshm=false 114 xshm=false
121 esac], [xshm=true]) 122 esac], [xshm=true])
122 [fi] 123 [fi]
123 124
124 # Validate options 125 # Validate options
125 [case "${backend}-${graphic_engine}-${image_loader}" in 126 [case "${backend}-${graphic_engine}-${image_loader}" in
126 X-cairo-*|X-openvg-imlib2) ;; 127 X-cairo-*|X-openvg-imlib2|X-openvg-dummy) ;;
127 dfb-cairo-*) ;; 128 dfb-cairo-*) ;;
129 console-openvg-imlib2|console-openvg-dummy) ;;
128 none-*-*) ;; 130 none-*-*) ;;
129 *)] AC_MSG_ERROR([The combination of --with-backend=${backend}, --with-graphic-engine=${graphic_engine} and --with-image-loader=${image_loader} is invalid]) [;; 131 *)] AC_MSG_ERROR([The combination of --with-backend=${backend}, --with-graphic-engine=${graphic_engine} and --with-image-loader=${image_loader} is invalid]) [;;
130 esac] 132 esac]
131 133
132 [if [ x"${graphic_engine}" = x"skia" ]; then ] 134 [if [ x"${graphic_engine}" = x"skia" ]; then ]
183 185
184 [if [ x"${backend}" = x'dfb' -a x"${graphic_engine}" = x"cairo" ]; then] 186 [if [ x"${backend}" = x'dfb' -a x"${graphic_engine}" = x"cairo" ]; then]
185 AC_DEFINE([DFB_BACKEND]) 187 AC_DEFINE([DFB_BACKEND])
186 [fi] 188 [fi]
187 189
190 AM_CONDITIONAL([CONSOLE_BACKEND],
191 [test x$backend = x'console' -a x"${graphic_engine}" = x"openvg"])
192
193 [if [ x"${backend}" = x'console' -a x"${graphic_engine}" = x"openvg" ]; then]
194 AC_DEFINE([CONSOLE_BACKEND])
195 [fi]
196
188 AM_CONDITIONAL([CAIRO_IMG_LOADER], 197 AM_CONDITIONAL([CAIRO_IMG_LOADER],
189 [test x"${image_loader}" = x"cairo"]) 198 [test x"${image_loader}" = x"cairo"])
190 199
191 [if [ x"${image_loader}" = x"cairo" ]; then] 200 [if [ x"${image_loader}" = x"cairo" ]; then]
192 AC_DEFINE([CAIRO_IMG_LOADER]) 201 AC_DEFINE([CAIRO_IMG_LOADER])
198 AM_CONDITIONAL([IMLIB2_IMG_LOADER], 207 AM_CONDITIONAL([IMLIB2_IMG_LOADER],
199 [test x"${image_loader}" = x"imlib2"]) 208 [test x"${image_loader}" = x"imlib2"])
200 209
201 [if [ x"${image_loader}" = x"imlib2" ]; then] 210 [if [ x"${image_loader}" = x"imlib2" ]; then]
202 AC_DEFINE([IMLIB2_IMG_LOADER]) 211 AC_DEFINE([IMLIB2_IMG_LOADER])
212 [fi]
213
214 AM_CONDITIONAL([DUMMY_IMG_LOADER],
215 [test x"${image_loader}" = x"dummy"])
216
217 [if [ x"${image_loader}" = x"dummy" ]; then]
218 AC_DEFINE([DUMMY_IMG_LOADER])
203 [fi] 219 [fi]
204 220
205 AM_CONDITIONAL([XSHM], 221 AM_CONDITIONAL([XSHM],
206 [test x"${xshm}" = xtrue -a x"${graphic_engine}" = x"cairo" -a x$backend = x'X']) 222 [test x"${xshm}" = xtrue -a x"${graphic_engine}" = x"cairo" -a x$backend = x'X'])
207 223
250 AH_TEMPLATE([OPENVG_GRAPH_ENGINE], [Enable OpenVG Graphic Engine]) 266 AH_TEMPLATE([OPENVG_GRAPH_ENGINE], [Enable OpenVG Graphic Engine])
251 AH_TEMPLATE([CAIRO_GRAPH_ENGINE], [Enable Cairo Graphic Engine]) 267 AH_TEMPLATE([CAIRO_GRAPH_ENGINE], [Enable Cairo Graphic Engine])
252 AH_TEMPLATE([DFB_GRAPH_ENGINE], [Enable DirectFB Graphic Engine]) 268 AH_TEMPLATE([DFB_GRAPH_ENGINE], [Enable DirectFB Graphic Engine])
253 AH_TEMPLATE([CAIRO_IMG_LOADER], [Enable Cairo Image Loader]) 269 AH_TEMPLATE([CAIRO_IMG_LOADER], [Enable Cairo Image Loader])
254 AH_TEMPLATE([IMLIB2_IMG_LOADER], [Enable Imlib2 Image Loader]) 270 AH_TEMPLATE([IMLIB2_IMG_LOADER], [Enable Imlib2 Image Loader])
271 AH_TEMPLATE([DUMMY_IMG_LOADER], [Enable Dummy Image Loader])
255 AH_TEMPLATE([X_BACKEND], [Enable X backend]) 272 AH_TEMPLATE([X_BACKEND], [Enable X backend])
256 AH_TEMPLATE([DFB_BACKEND], [Enable DirectFB backend]) 273 AH_TEMPLATE([DFB_BACKEND], [Enable DirectFB backend])
274 AH_TEMPLATE([CONSOLE_BACKEND], [Enable console backend])
257 AH_TEMPLATE([XSHM], [Enable XSHM]) 275 AH_TEMPLATE([XSHM], [Enable XSHM])
258 276
259 AC_OUTPUT 277 AC_OUTPUT