summaryrefslogtreecommitdiff
path: root/legacy/evas/m4
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2011-07-08 00:18:22 +0000
committerChristopher Michael <cpmichael1@comcast.net>2011-07-08 00:18:22 +0000
commit1ebf2090d81ca54d39c1c4ecd0a833300249c671 (patch)
treecbf528db8879adf0f89d0deff0f21cde52cbd371 /legacy/evas/m4
parenta8d25e6c8600e8db35ea503c1ea957039b5bf381 (diff)
Evas: Fix up the check_engine macros for xcb engine & xlib changes.
SVN revision: 61137
Diffstat (limited to 'legacy/evas/m4')
-rw-r--r--legacy/evas/m4/evas_check_engine.m4125
1 files changed, 121 insertions, 4 deletions
diff --git a/legacy/evas/m4/evas_check_engine.m4 b/legacy/evas/m4/evas_check_engine.m4
index b968602..25803b1 100644
--- a/legacy/evas/m4/evas_check_engine.m4
+++ b/legacy/evas/m4/evas_check_engine.m4
@@ -64,9 +64,9 @@ fi
64 64
65]) 65])
66 66
67dnl use: EVAS_CHECK_ENGINE_DEP_GL_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 67dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
68 68
69AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_X11], 69AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB],
70[ 70[
71 71
72evas_engine_[]$1[]_cflags="" 72evas_engine_[]$1[]_cflags=""
@@ -187,10 +187,10 @@ evas_engine_[]$1[]_cflags=""
187evas_engine_[]$1[]_libs="" 187evas_engine_[]$1[]_libs=""
188 188
189PKG_CHECK_MODULES([XCB], 189PKG_CHECK_MODULES([XCB],
190 [xcb xcb-shm xcb-image >= 0.2.1 pixman-1], 190 [xcb xcb-shm xcb-image >= 0.2.1 xcb-aux pixman-1],
191 [ 191 [
192 have_dep="yes" 192 have_dep="yes"
193 requirement="xcb xcb-shm xcb-image pixman-1" 193 requirement="xcb xcb-shm xcb-image xcb-aux pixman-1"
194 evas_engine_[]$1[]_cflags="${XCB_CFLAGS}" 194 evas_engine_[]$1[]_cflags="${XCB_CFLAGS}"
195 evas_engine_[]$1[]_libs="${XCB_LIBS}" 195 evas_engine_[]$1[]_libs="${XCB_LIBS}"
196 ],[ 196 ],[
@@ -213,6 +213,123 @@ fi
213 213
214]) 214])
215 215
216
217dnl use: EVAS_CHECK_ENGINE_DEP_GL_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
218
219AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XCB],
220[
221
222evas_engine_[]$1[]_cflags=""
223evas_engine_[]$1[]_libs=""
224
225AC_PATH_X
226AC_PATH_XTRA
227
228AC_CHECK_HEADER([GL/gl.h],
229 [have_dep="yes"],
230 [have_dep="no"],
231 [
232#include <GL/gl.h>
233#include <GL/glext.h>
234#include <GL/glx.h>
235 ])
236
237gl_pt_lib="";
238have_gl_pt="no"
239AC_CHECK_LIB([pthread], [pthread_create], [have_gl_pt="yes"], [have_gl_pt="no"])
240if test "x$have_gl_pt" = "xyes" ; then
241 gl_pt_lib=" -lpthread"
242fi
243
244if test "x${have_dep}" = "xyes" ; then
245 AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"])
246fi
247
248if test "x${have_dep}" = "xyes" ; then
249 AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
250fi
251
252if test "x${have_dep}" = "xyes" ; then
253 AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib)
254fi
255
256PKG_CHECK_MODULES([XCB_GL],
257 [x11-xcb xcb xcb-aux xcb-glx xcb-render xcb-renderutil],
258 [
259 have_dep="yes"
260 requirement="x11-xcb xcb xcb-aux xcb-glx xcb-render xcb-renderutil"
261 evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS}"
262 evas_engine_[]$1[]_libs="${XCB_GL_LIBS}"
263 ],[
264 have_dep="no"
265 ]
266)
267
268if test "x$gl_flavor_gles" = "xyes" ; then
269 have_dep=no
270fi
271
272if test "x${have_dep}" = "xyes" ; then
273 PKG_CHECK_MODULES([GL_EET], [eet >= 1.4.0], [have_dep="yes"], [have_dep="no"])
274 if test "x${have_dep}" = "xyes" ; then
275 if test "x$2" = "xyes" ; then
276 x_libs="${x_libs} -lX11 -lXext -lXrender"
277 else
278 x_dir=${x_dir:-/usr/X11R6}
279 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
280 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
281 fi
282 evas_engine_[]$1[]_cflags="-I/usr/include ${XCB_GL_CFLAGS} ${x_cflags}"
283 evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGL $gl_pt_lib"
284 evas_engine_gl_common_libs="-lGL $gl_pt_lib"
285 fi
286else
287 if test "x$2" = "xyes" ; then
288 x_libs="${x_libs} -lX11 -lXext -lXrender"
289 else
290 x_dir=${x_dir:-/usr/X11R6}
291 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
292 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
293 fi
294 AC_CHECK_HEADER([GLES2/gl2.h],
295 [have_egl="yes"],
296 [have_egl="no"],
297 [
298#include <GLES2/gl2.h>
299#include <GLES2/gl2ext.h>
300#include <EGL/egl.h>
301 ])
302 if test "x${have_egl}" = "xyes" ; then
303 AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
304 if test "x${have_glesv2}" = "xyes" ; then
305 PKG_CHECK_MODULES([GL_EET], [eet >= 1.4.0], [have_dep="yes"], [have_dep="no"])
306 if test "x${have_dep}" = "xyes" ; then
307 evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS} ${x_cflags}"
308 evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
309 evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
310 have_dep="yes"
311 gl_flavor_gles="no"
312 AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
313 gles_variety_sgx="yes"
314 fi
315 fi
316 fi
317fi
318
319AC_SUBST([evas_engine_$1_cflags])
320AC_SUBST([evas_engine_$1_libs])
321
322if test "x${have_dep}" = "xyes" ; then
323 m4_default([$4], [:])
324else
325 m4_default([$5], [:])
326fi
327
328])
329
330
331
332
216dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 333dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
217 334
218AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI], 335AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI],