diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/m4/evas_check_engine.m4 | 972 |
1 files changed, 0 insertions, 972 deletions
diff --git a/libraries/evas/m4/evas_check_engine.m4 b/libraries/evas/m4/evas_check_engine.m4 deleted file mode 100644 index 6275795..0000000 --- a/libraries/evas/m4/evas_check_engine.m4 +++ /dev/null | |||
@@ -1,972 +0,0 @@ | |||
1 | |||
2 | dnl use: EVAS_CHECK_ENGINE_DEP_BUFFER(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
3 | |||
4 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_BUFFER], | ||
5 | [ | ||
6 | |||
7 | have_dep="yes" | ||
8 | evas_engine_[]$1[]_cflags="" | ||
9 | evas_engine_[]$1[]_libs="" | ||
10 | |||
11 | AC_SUBST([evas_engine_$1_cflags]) | ||
12 | AC_SUBST([evas_engine_$1_libs]) | ||
13 | |||
14 | if test "x${have_dep}" = "xyes" ; then | ||
15 | m4_default([$4], [:]) | ||
16 | else | ||
17 | m4_default([$5], [:]) | ||
18 | fi | ||
19 | |||
20 | ]) | ||
21 | |||
22 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
23 | |||
24 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB], | ||
25 | [ | ||
26 | |||
27 | have_dep="no" | ||
28 | evas_engine_[]$1[]_cflags="" | ||
29 | evas_engine_[]$1[]_libs="" | ||
30 | |||
31 | AC_PATH_X | ||
32 | AC_PATH_XTRA | ||
33 | |||
34 | AC_CHECK_HEADER([X11/X.h], [have_dep="yes"]) | ||
35 | |||
36 | if test "x${have_dep}" = "xyes" ; then | ||
37 | AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"]) | ||
38 | fi | ||
39 | |||
40 | if test "x${have_dep}" = "xyes" ; then | ||
41 | AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"]) | ||
42 | fi | ||
43 | |||
44 | if test "x${have_dep}" = "xyes" ; then | ||
45 | if test "x$2" = "xyes" ; then | ||
46 | x_libs="${x_libs} -lX11 -lXext" | ||
47 | else | ||
48 | x_dir=${x_dir:-/usr/X11R6} | ||
49 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
50 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext" | ||
51 | fi | ||
52 | evas_engine_[]$1[]_cflags="${x_cflags}" | ||
53 | evas_engine_[]$1[]_libs="${x_libs}" | ||
54 | fi | ||
55 | |||
56 | AC_SUBST([evas_engine_$1_cflags]) | ||
57 | AC_SUBST([evas_engine_$1_libs]) | ||
58 | |||
59 | if test "x${have_dep}" = "xyes" ; then | ||
60 | m4_default([$4], [:]) | ||
61 | else | ||
62 | m4_default([$5], [:]) | ||
63 | fi | ||
64 | |||
65 | ]) | ||
66 | |||
67 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
68 | |||
69 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB], | ||
70 | [ | ||
71 | |||
72 | evas_engine_[]$1[]_cflags="" | ||
73 | evas_engine_[]$1[]_libs="" | ||
74 | |||
75 | AC_PATH_X | ||
76 | AC_PATH_XTRA | ||
77 | |||
78 | AC_CHECK_HEADER([GL/gl.h], | ||
79 | [have_dep="yes"], | ||
80 | [have_dep="no"], | ||
81 | [ | ||
82 | #include <GL/gl.h> | ||
83 | #include <GL/glext.h> | ||
84 | #include <GL/glx.h> | ||
85 | #include <X11/Xlib.h> | ||
86 | #include <X11/Xatom.h> | ||
87 | #include <X11/Xutil.h> | ||
88 | #include <X11/extensions/Xrender.h> | ||
89 | #include <X11/Xresource.h> | ||
90 | ]) | ||
91 | |||
92 | gl_pt_lib=""; | ||
93 | have_gl_pt="no" | ||
94 | |||
95 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
96 | CFLAGS_save="${CFLAGS}" | ||
97 | CFLAGS="${CFLAGS} -pthread" | ||
98 | LIBS_save="${LIBS}" | ||
99 | LIBS="${LIBS} -pthread" | ||
100 | AC_LINK_IFELSE( | ||
101 | [AC_LANG_PROGRAM([[ | ||
102 | #include <pthread.h> | ||
103 | ]], | ||
104 | [[ | ||
105 | pthread_create(NULL, NULL, NULL, NULL); | ||
106 | ]])], | ||
107 | [have_gl_pt="yes"], | ||
108 | [have_gl_pt="no"]) | ||
109 | CFLAGS=${CFLAGS_save} | ||
110 | LIBS=${LIBS_save} | ||
111 | AC_MSG_RESULT([${have_gl_pt}]) | ||
112 | |||
113 | if test "x$have_gl_pt" = "xyes" ; then | ||
114 | gl_pt_lib=" -pthread" | ||
115 | fi | ||
116 | |||
117 | if test "x${have_dep}" = "xyes" ; then | ||
118 | AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"]) | ||
119 | fi | ||
120 | |||
121 | if test "x${have_dep}" = "xyes" ; then | ||
122 | AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"]) | ||
123 | fi | ||
124 | |||
125 | if test "x${have_dep}" = "xyes" ; then | ||
126 | AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib) | ||
127 | fi | ||
128 | |||
129 | if test "x$gl_flavor_gles" = "xyes" ; then | ||
130 | have_dep=no | ||
131 | fi | ||
132 | |||
133 | if test "x${have_dep}" = "xyes" ; then | ||
134 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
135 | if test "x${have_dep}" = "xyes" ; then | ||
136 | if test "x$2" = "xyes" ; then | ||
137 | x_libs="${x_libs} -lX11 -lXext -lXrender" | ||
138 | else | ||
139 | x_dir=${x_dir:-/usr/X11R6} | ||
140 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
141 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender" | ||
142 | fi | ||
143 | evas_engine_[]$1[]_cflags="-I/usr/include ${x_cflags}" | ||
144 | evas_engine_[]$1[]_libs="${x_libs} -lGL $gl_pt_lib" | ||
145 | evas_engine_gl_common_libs="-lGL $gl_pt_lib" | ||
146 | fi | ||
147 | else | ||
148 | if test "x$2" = "xyes" ; then | ||
149 | x_libs="${x_libs} -lX11 -lXext -lXrender" | ||
150 | else | ||
151 | x_dir=${x_dir:-/usr/X11R6} | ||
152 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
153 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender" | ||
154 | fi | ||
155 | AC_CHECK_HEADER([GLES2/gl2.h], | ||
156 | [have_egl="yes"], | ||
157 | [have_egl="no"], | ||
158 | [ | ||
159 | #include <GLES2/gl2.h> | ||
160 | #include <GLES2/gl2ext.h> | ||
161 | #include <EGL/egl.h> | ||
162 | #include <X11/Xlib.h> | ||
163 | #include <X11/Xatom.h> | ||
164 | #include <X11/Xutil.h> | ||
165 | #include <X11/extensions/Xrender.h> | ||
166 | #include <X11/Xresource.h> | ||
167 | ]) | ||
168 | if test "x${have_egl}" = "xyes" ; then | ||
169 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib) | ||
170 | if test "x${have_glesv2}" = "xyes" ; then | ||
171 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
172 | if test "x${have_dep}" = "xyes" ; then | ||
173 | evas_engine_[]$1[]_cflags="${x_cflags}" | ||
174 | evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
175 | evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib" | ||
176 | have_dep="yes" | ||
177 | AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support]) | ||
178 | gles_variety_sgx="yes" | ||
179 | fi | ||
180 | fi | ||
181 | fi | ||
182 | fi | ||
183 | |||
184 | AC_SUBST([evas_engine_$1_cflags]) | ||
185 | AC_SUBST([evas_engine_$1_libs]) | ||
186 | |||
187 | |||
188 | if test "x${have_dep}" = "xyes" ; then | ||
189 | m4_default([$4], [:]) | ||
190 | else | ||
191 | m4_default([$5], [:]) | ||
192 | fi | ||
193 | |||
194 | ]) | ||
195 | |||
196 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
197 | |||
198 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB], | ||
199 | [ | ||
200 | |||
201 | requirement="" | ||
202 | have_dep="no" | ||
203 | evas_engine_[]$1[]_cflags="" | ||
204 | evas_engine_[]$1[]_libs="" | ||
205 | |||
206 | PKG_CHECK_MODULES([XCB], | ||
207 | [xcb xcb-shm xcb-image >= 0.2.1 pixman-1], | ||
208 | [ | ||
209 | have_dep="yes" | ||
210 | requirement="xcb xcb-shm xcb-image pixman-1" | ||
211 | evas_engine_[]$1[]_cflags="${XCB_CFLAGS}" | ||
212 | evas_engine_[]$1[]_libs="${XCB_LIBS}" | ||
213 | ],[ | ||
214 | have_dep="no" | ||
215 | ] | ||
216 | ) | ||
217 | |||
218 | AC_SUBST([evas_engine_$1_cflags]) | ||
219 | AC_SUBST([evas_engine_$1_libs]) | ||
220 | |||
221 | if test "x$3" = "xstatic" ; then | ||
222 | requirement_evas="${requirement} ${requirement_evas}" | ||
223 | fi | ||
224 | |||
225 | if test "x${have_dep}" = "xyes" ; then | ||
226 | m4_default([$4], [:]) | ||
227 | else | ||
228 | m4_default([$5], [:]) | ||
229 | fi | ||
230 | |||
231 | ]) | ||
232 | |||
233 | |||
234 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
235 | |||
236 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XCB], | ||
237 | [ | ||
238 | |||
239 | evas_engine_[]$1[]_cflags="" | ||
240 | evas_engine_[]$1[]_libs="" | ||
241 | |||
242 | AC_PATH_X | ||
243 | AC_PATH_XTRA | ||
244 | |||
245 | AC_CHECK_HEADER([GL/gl.h], | ||
246 | [have_dep="yes"], | ||
247 | [have_dep="no"], | ||
248 | [ | ||
249 | #include <GL/gl.h> | ||
250 | #include <GL/glext.h> | ||
251 | #include <GL/glx.h> | ||
252 | ]) | ||
253 | |||
254 | gl_pt_lib=""; | ||
255 | have_gl_pt="no" | ||
256 | |||
257 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
258 | CFLAGS_save="${CFLAGS}" | ||
259 | CFLAGS="${CFLAGS} -pthread" | ||
260 | LIBS_save="${LIBS}" | ||
261 | LIBS="${LIBS} -pthread" | ||
262 | AC_LINK_IFELSE( | ||
263 | [AC_LANG_PROGRAM([[ | ||
264 | #include <pthread.h> | ||
265 | ]], | ||
266 | [[ | ||
267 | pthread_create(NULL, NULL, NULL, NULL); | ||
268 | ]])], | ||
269 | [have_gl_pt="yes"], | ||
270 | [have_gl_pt="no"]) | ||
271 | CFLAGS=${CFLAGS_save} | ||
272 | LIBS=${LIBS_save} | ||
273 | AC_MSG_RESULT([${have_gl_pt}]) | ||
274 | |||
275 | if test "x$have_gl_pt" = "xyes" ; then | ||
276 | gl_pt_lib=" -pthread" | ||
277 | fi | ||
278 | |||
279 | if test "x${have_dep}" = "xyes" ; then | ||
280 | AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"]) | ||
281 | fi | ||
282 | |||
283 | if test "x${have_dep}" = "xyes" ; then | ||
284 | AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"]) | ||
285 | fi | ||
286 | |||
287 | if test "x${have_dep}" = "xyes" ; then | ||
288 | AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib) | ||
289 | fi | ||
290 | |||
291 | PKG_CHECK_MODULES([XCB_GL], | ||
292 | [x11-xcb xcb xcb-glx xcb-render xcb-renderutil], | ||
293 | [ | ||
294 | have_dep="yes" | ||
295 | requirement="x11-xcb xcb xcb-glx xcb-render xcb-renderutil" | ||
296 | evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS}" | ||
297 | evas_engine_[]$1[]_libs="${XCB_GL_LIBS}" | ||
298 | ],[ | ||
299 | have_dep="no" | ||
300 | ] | ||
301 | ) | ||
302 | |||
303 | if test "x$gl_flavor_gles" = "xyes" ; then | ||
304 | have_dep=no | ||
305 | fi | ||
306 | |||
307 | if test "x${have_dep}" = "xyes" ; then | ||
308 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
309 | if test "x${have_dep}" = "xyes" ; then | ||
310 | if test "x$2" = "xyes" ; then | ||
311 | x_libs="${x_libs} -lX11 -lXext -lXrender" | ||
312 | else | ||
313 | x_dir=${x_dir:-/usr/X11R6} | ||
314 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
315 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender" | ||
316 | fi | ||
317 | evas_engine_[]$1[]_cflags="-I/usr/include ${XCB_GL_CFLAGS} ${x_cflags}" | ||
318 | evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGL $gl_pt_lib" | ||
319 | evas_engine_gl_common_libs="-lGL $gl_pt_lib" | ||
320 | fi | ||
321 | else | ||
322 | if test "x$2" = "xyes" ; then | ||
323 | x_libs="${x_libs} -lX11 -lXext -lXrender" | ||
324 | else | ||
325 | x_dir=${x_dir:-/usr/X11R6} | ||
326 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
327 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender" | ||
328 | fi | ||
329 | AC_CHECK_HEADER([GLES2/gl2.h], | ||
330 | [have_egl="yes"], | ||
331 | [have_egl="no"], | ||
332 | [ | ||
333 | #include <GLES2/gl2.h> | ||
334 | #include <GLES2/gl2ext.h> | ||
335 | #include <EGL/egl.h> | ||
336 | ]) | ||
337 | if test "x${have_egl}" = "xyes" ; then | ||
338 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib) | ||
339 | if test "x${have_glesv2}" = "xyes" ; then | ||
340 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
341 | if test "x${have_dep}" = "xyes" ; then | ||
342 | evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS} ${x_cflags}" | ||
343 | evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
344 | evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib" | ||
345 | have_dep="yes" | ||
346 | AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support]) | ||
347 | gles_variety_sgx="yes" | ||
348 | fi | ||
349 | fi | ||
350 | fi | ||
351 | fi | ||
352 | |||
353 | AC_SUBST([evas_engine_$1_cflags]) | ||
354 | AC_SUBST([evas_engine_$1_libs]) | ||
355 | |||
356 | if test "x${have_dep}" = "xyes" ; then | ||
357 | m4_default([$4], [:]) | ||
358 | else | ||
359 | m4_default([$5], [:]) | ||
360 | fi | ||
361 | |||
362 | ]) | ||
363 | |||
364 | |||
365 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
366 | |||
367 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI], | ||
368 | [ | ||
369 | |||
370 | have_dep="no" | ||
371 | evas_engine_[]$1[]_cflags="" | ||
372 | evas_engine_[]$1[]_libs="" | ||
373 | |||
374 | AC_CHECK_HEADER([windows.h], | ||
375 | [ | ||
376 | have_dep="yes" | ||
377 | evas_engine_[]$1[]_libs="-lgdi32" | ||
378 | ] | ||
379 | ) | ||
380 | |||
381 | AC_SUBST([evas_engine_$1_cflags]) | ||
382 | AC_SUBST([evas_engine_$1_libs]) | ||
383 | |||
384 | if test "x${have_dep}" = "xyes" ; then | ||
385 | m4_default([$4], [:]) | ||
386 | else | ||
387 | m4_default([$5], [:]) | ||
388 | fi | ||
389 | |||
390 | ]) | ||
391 | |||
392 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
393 | |||
394 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW], | ||
395 | [ | ||
396 | |||
397 | have_dep="no" | ||
398 | evas_engine_[]$1[]_cflags="" | ||
399 | evas_engine_[]$1[]_libs="" | ||
400 | |||
401 | AC_CHECK_HEADER([ddraw.h], | ||
402 | [ | ||
403 | have_dep="yes" | ||
404 | evas_engine_[]$1[]_libs="-lddraw" | ||
405 | ] | ||
406 | ) | ||
407 | |||
408 | AC_SUBST([evas_engine_$1_cflags]) | ||
409 | AC_SUBST([evas_engine_$1_libs]) | ||
410 | |||
411 | if test "x${have_dep}" = "xyes" ; then | ||
412 | m4_default([$4], [:]) | ||
413 | else | ||
414 | m4_default([$5], [:]) | ||
415 | fi | ||
416 | |||
417 | ]) | ||
418 | |||
419 | dnl use: EVAS_CHECK_ENGINE_DEP_DIRECT3D(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
420 | |||
421 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DIRECT3D], | ||
422 | [ | ||
423 | |||
424 | evas_engine_[]$1[]_cflags="" | ||
425 | evas_engine_[]$1[]_libs="" | ||
426 | |||
427 | AC_CHECK_HEADERS([d3d9.h d3dx9.h], | ||
428 | [ | ||
429 | have_dep="yes" | ||
430 | evas_engine_[]$1[]_libs="-ld3d9 -ld3dx9 -lgdi32" | ||
431 | ], | ||
432 | [have_dep="no"; break] | ||
433 | ) | ||
434 | |||
435 | AC_SUBST([evas_engine_$1_cflags]) | ||
436 | AC_SUBST([evas_engine_$1_libs]) | ||
437 | |||
438 | if test "x${have_dep}" = "xyes" ; then | ||
439 | m4_default([$4], [:]) | ||
440 | else | ||
441 | m4_default([$5], [:]) | ||
442 | fi | ||
443 | |||
444 | ]) | ||
445 | |||
446 | |||
447 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_COCOA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
448 | |||
449 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_COCOA], | ||
450 | [ | ||
451 | |||
452 | evas_engine_[]$1[]_cflags="" | ||
453 | evas_engine_[]$1[]_libs="" | ||
454 | |||
455 | AC_LANG_PUSH([Objective C]) | ||
456 | |||
457 | LIBS_save="$LIBS" | ||
458 | LIBS="$LIBS -framework Cocoa" | ||
459 | AC_LINK_IFELSE( | ||
460 | [AC_LANG_PROGRAM( | ||
461 | [[ | ||
462 | #include <Cocoa/Cocoa.h> | ||
463 | ]], | ||
464 | [[ | ||
465 | NSWindow *window; | ||
466 | window = [[NSWindow alloc] | ||
467 | initWithContentRect:NSMakeRect(0, 0, 1, 1) | ||
468 | styleMask:(NSTitledWindowMask) | ||
469 | backing:NSBackingStoreBuffered | ||
470 | defer:NO | ||
471 | screen:nil | ||
472 | ]; | ||
473 | ]])], | ||
474 | [ | ||
475 | have_dep="yes" | ||
476 | evas_engine_[]$1[]_libs="-framework Cocoa" | ||
477 | ], | ||
478 | [have_dep="no"]) | ||
479 | LIBS="$LIBS_save" | ||
480 | |||
481 | AC_LANG_POP([Objective C]) | ||
482 | |||
483 | if test "x${have_dep}" = "xyes" ; then | ||
484 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
485 | fi | ||
486 | |||
487 | AC_SUBST([evas_engine_$1_cflags]) | ||
488 | AC_SUBST([evas_engine_$1_libs]) | ||
489 | |||
490 | if test "x${have_dep}" = "xyes" ; then | ||
491 | m4_default([$4], [:]) | ||
492 | else | ||
493 | m4_default([$5], [:]) | ||
494 | fi | ||
495 | |||
496 | ]) | ||
497 | |||
498 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
499 | |||
500 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_SDL], | ||
501 | [ | ||
502 | |||
503 | requirement="" | ||
504 | have_dep="no" | ||
505 | evas_engine_[]$1[]_cflags="" | ||
506 | evas_engine_[]$1[]_libs="" | ||
507 | |||
508 | PKG_CHECK_MODULES([SDL], | ||
509 | [sdl >= 1.2.0], | ||
510 | [ | ||
511 | have_dep="yes" | ||
512 | requirement="sdl" | ||
513 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
514 | evas_engine_[]$1[]_libs="${SDL_LIBS}" | ||
515 | ] | ||
516 | ) | ||
517 | |||
518 | AC_SUBST([evas_engine_$1_cflags]) | ||
519 | AC_SUBST([evas_engine_$1_libs]) | ||
520 | |||
521 | if test "x$3" = "xstatic" ; then | ||
522 | requirement_evas="${requirement} ${requirement_evas}" | ||
523 | fi | ||
524 | |||
525 | if test "x${have_dep}" = "xyes" ; then | ||
526 | m4_default([$4], [:]) | ||
527 | else | ||
528 | m4_default([$5], [:]) | ||
529 | fi | ||
530 | |||
531 | ]) | ||
532 | |||
533 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
534 | |||
535 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL], | ||
536 | [ | ||
537 | |||
538 | requirement="" | ||
539 | have_dep="no" | ||
540 | evas_engine_[]$1[]_cflags="" | ||
541 | evas_engine_[]$1[]_libs="" | ||
542 | |||
543 | PKG_CHECK_MODULES([SDL], | ||
544 | [sdl >= 1.2.0], | ||
545 | [ | ||
546 | have_dep="yes" | ||
547 | requirement="sdl" | ||
548 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
549 | evas_engine_[]$1[]_libs="${SDL_LIBS}" | ||
550 | ] | ||
551 | ) | ||
552 | |||
553 | gl_pt_lib=""; | ||
554 | have_gl_pt="no" | ||
555 | |||
556 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
557 | CFLAGS_save="${CFLAGS}" | ||
558 | CFLAGS="${CFLAGS} -pthread" | ||
559 | LIBS_save="${LIBS}" | ||
560 | LIBS="${LIBS} -pthread" | ||
561 | AC_LINK_IFELSE( | ||
562 | [AC_LANG_PROGRAM([[ | ||
563 | #include <pthread.h> | ||
564 | ]], | ||
565 | [[ | ||
566 | pthread_create(NULL, NULL, NULL, NULL); | ||
567 | ]])], | ||
568 | [have_gl_pt="yes"], | ||
569 | [have_gl_pt="no"]) | ||
570 | CFLAGS=${CFLAGS_save} | ||
571 | LIBS=${LIBS_save} | ||
572 | AC_MSG_RESULT([${have_gl_pt}]) | ||
573 | |||
574 | if test "x$have_gl_pt" = "xyes" ; then | ||
575 | gl_pt_lib=" -pthread" | ||
576 | fi | ||
577 | |||
578 | AC_CHECK_HEADER([GL/gl.h], | ||
579 | [have_dep="yes"], | ||
580 | [have_dep="no"], | ||
581 | [ | ||
582 | #include <GL/gl.h> | ||
583 | #include <GL/glext.h> | ||
584 | ]) | ||
585 | |||
586 | if test "x$gl_flavor_gles" = "xyes" ; then | ||
587 | have_dep=no | ||
588 | fi | ||
589 | |||
590 | if test "x${have_dep}" = "xyes" ; then | ||
591 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
592 | evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lm $gl_pt_lib" | ||
593 | evas_engine_gl_common_libs="-lGL -lm $gl_pt_lib" | ||
594 | else | ||
595 | AC_CHECK_HEADER([SDL/SDL_opengles.h], | ||
596 | [have_egl="yes"], | ||
597 | [have_egl="no"], | ||
598 | [ | ||
599 | #include <SDL/SDL_opengles.h> | ||
600 | #include <EGL/egl.h> | ||
601 | ]) | ||
602 | if test "x${have_egl}" = "xyes" ; then | ||
603 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib) | ||
604 | if test "x${have_glesv2}" = "xyes" ; then | ||
605 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
606 | evas_engine_[]$1[]_libs="${SDL_LIBS} -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
607 | evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib" | ||
608 | have_dep="yes" | ||
609 | AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support]) | ||
610 | gles_variety_sgx="yes" | ||
611 | fi | ||
612 | fi | ||
613 | fi | ||
614 | |||
615 | AC_SUBST([evas_engine_$1_cflags]) | ||
616 | AC_SUBST([evas_engine_$1_libs]) | ||
617 | |||
618 | if test "x$3" = "xstatic" ; then | ||
619 | requirement_evas="${requirement} ${requirement_evas}" | ||
620 | fi | ||
621 | |||
622 | if test "x${have_dep}" = "xyes" ; then | ||
623 | m4_default([$4], [:]) | ||
624 | else | ||
625 | m4_default([$5], [:]) | ||
626 | fi | ||
627 | |||
628 | ]) | ||
629 | |||
630 | dnl use: EVAS_CHECK_ENGINE_DEP_FB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
631 | |||
632 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_FB], | ||
633 | [ | ||
634 | |||
635 | have_dep="no" | ||
636 | evas_engine_[]$1[]_cflags="" | ||
637 | evas_engine_[]$1[]_libs="" | ||
638 | |||
639 | AC_CHECK_HEADER([linux/fb.h], [have_dep="yes"]) | ||
640 | |||
641 | AC_SUBST([evas_engine_$1_cflags]) | ||
642 | AC_SUBST([evas_engine_$1_libs]) | ||
643 | |||
644 | if test "x${have_dep}" = "xyes" ; then | ||
645 | m4_default([$4], [:]) | ||
646 | else | ||
647 | m4_default([$5], [:]) | ||
648 | fi | ||
649 | |||
650 | ]) | ||
651 | |||
652 | dnl use: EVAS_CHECK_ENGINE_DEP_DIRECTFB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
653 | |||
654 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DIRECTFB], | ||
655 | [ | ||
656 | |||
657 | requirement="" | ||
658 | have_dep="no" | ||
659 | evas_engine_[]$1[]_cflags="" | ||
660 | evas_engine_[]$1[]_libs="" | ||
661 | |||
662 | PKG_CHECK_MODULES([DIRECTFB], | ||
663 | [directfb >= 0.9.16], | ||
664 | [ | ||
665 | have_dep="yes" | ||
666 | requirement="directfb" | ||
667 | evas_engine_[]$1[]_cflags="${DIRECTFB_CFLAGS}" | ||
668 | evas_engine_[]$1[]_libs="${DIRECTFB_LIBS}" | ||
669 | ] | ||
670 | ) | ||
671 | |||
672 | AC_SUBST([evas_engine_$1_cflags]) | ||
673 | AC_SUBST([evas_engine_$1_libs]) | ||
674 | |||
675 | if test "x$3" = "xstatic" ; then | ||
676 | requirement_evas="${requirement} ${requirement_evas}" | ||
677 | fi | ||
678 | |||
679 | if test "x${have_dep}" = "xyes" ; then | ||
680 | m4_default([$4], [:]) | ||
681 | else | ||
682 | m4_default([$5], [:]) | ||
683 | fi | ||
684 | |||
685 | ]) | ||
686 | |||
687 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
688 | |||
689 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11], | ||
690 | [ | ||
691 | |||
692 | have_dep="no" | ||
693 | evas_engine_[]$1[]_cflags="" | ||
694 | evas_engine_[]$1[]_libs="" | ||
695 | |||
696 | PKG_CHECK_MODULES([XCB], | ||
697 | [xcb xcb-shm xcb-image >= 0.2.1 pixman-1], | ||
698 | [ | ||
699 | have_dep="yes" | ||
700 | requirement="xcb xcb-shm xcb-image pixman-1" | ||
701 | evas_engine_[]$1[]_cflags="${XCB_CFLAGS}" | ||
702 | evas_engine_[]$1[]_libs="${XCB_LIBS}" | ||
703 | ],[ | ||
704 | have_dep="no" | ||
705 | ] | ||
706 | ) | ||
707 | |||
708 | AC_SUBST([evas_engine_$1_cflags]) | ||
709 | AC_SUBST([evas_engine_$1_libs]) | ||
710 | |||
711 | if test "x$3" = "xstatic" ; then | ||
712 | requirement_evas="${requirement} ${requirement_evas}" | ||
713 | fi | ||
714 | |||
715 | if test "x${have_dep}" = "xyes" ; then | ||
716 | m4_default([$4], [:]) | ||
717 | else | ||
718 | m4_default([$5], [:]) | ||
719 | fi | ||
720 | |||
721 | ]) | ||
722 | |||
723 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
724 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_X11], | ||
725 | [ | ||
726 | |||
727 | have_dep="no" | ||
728 | evas_engine_[]$1[]_cflags="" | ||
729 | evas_engine_[]$1[]_libs="" | ||
730 | |||
731 | AC_PATH_X | ||
732 | AC_PATH_XTRA | ||
733 | |||
734 | AC_CHECK_HEADER([X11/X.h], [have_dep="yes"]) | ||
735 | |||
736 | if test "x${have_dep}" = "xyes" ; then | ||
737 | AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"]) | ||
738 | fi | ||
739 | |||
740 | if test "x${have_dep}" = "xyes" ; then | ||
741 | AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"]) | ||
742 | fi | ||
743 | |||
744 | if test "x${have_dep}" = "xyes" ; then | ||
745 | if test "x$2" = "xyes" ; then | ||
746 | x_libs="${x_libs} -lX11 -lXext" | ||
747 | else | ||
748 | x_dir=${x_dir:-/usr/X11R6} | ||
749 | x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} | ||
750 | x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext" | ||
751 | fi | ||
752 | evas_engine_[]$1[]_cflags="${x_cflags}" | ||
753 | evas_engine_[]$1[]_libs="${x_libs}" | ||
754 | fi | ||
755 | |||
756 | AC_SUBST([evas_engine_$1_cflags]) | ||
757 | AC_SUBST([evas_engine_$1_libs]) | ||
758 | |||
759 | if test "x${have_dep}" = "xyes" ; then | ||
760 | m4_default([$4], [:]) | ||
761 | else | ||
762 | m4_default([$5], [:]) | ||
763 | fi | ||
764 | |||
765 | ]) | ||
766 | |||
767 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
768 | |||
769 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_DDRAW], | ||
770 | [ | ||
771 | |||
772 | have_dep="no" | ||
773 | evas_engine_[]$1[]_cflags="" | ||
774 | evas_engine_[]$1[]_libs="" | ||
775 | |||
776 | AC_CHECK_HEADER([ddraw.h], | ||
777 | [ | ||
778 | have_dep="yes" | ||
779 | evas_engine_[]$1[]_libs="-lddraw -lgdi32" | ||
780 | ] | ||
781 | ) | ||
782 | |||
783 | AC_SUBST([evas_engine_$1_cflags]) | ||
784 | AC_SUBST([evas_engine_$1_libs]) | ||
785 | |||
786 | if test "x${have_dep}" = "xyes" ; then | ||
787 | m4_default([$4], [:]) | ||
788 | else | ||
789 | m4_default([$5], [:]) | ||
790 | fi | ||
791 | |||
792 | ]) | ||
793 | |||
794 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_WINCE(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
795 | |||
796 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_WINCE], | ||
797 | [ | ||
798 | |||
799 | have_dep="yes" | ||
800 | evas_engine_[]$1[]_cflags="" | ||
801 | evas_engine_[]$1[]_libs="" | ||
802 | |||
803 | AC_SUBST([evas_engine_$1_cflags]) | ||
804 | AC_SUBST([evas_engine_$1_libs]) | ||
805 | |||
806 | if test "x${have_dep}" = "xyes" ; then | ||
807 | m4_default([$4], [:]) | ||
808 | else | ||
809 | m4_default([$5], [:]) | ||
810 | fi | ||
811 | |||
812 | ]) | ||
813 | |||
814 | dnl use: EVAS_CHECK_ENGINE_DEP_PSL1GHT(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
815 | |||
816 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_PSL1GHT], | ||
817 | [ | ||
818 | |||
819 | have_dep="no" | ||
820 | evas_engine_[]$1[]_cflags="" | ||
821 | evas_engine_[]$1[]_libs="" | ||
822 | |||
823 | AC_CHECK_HEADER([rsx/rsx.h], [have_dep="yes"]) | ||
824 | |||
825 | AC_SUBST([evas_engine_$1_cflags]) | ||
826 | AC_SUBST([evas_engine_$1_libs]) | ||
827 | |||
828 | if test "x${have_dep}" = "xyes" ; then | ||
829 | m4_default([$4], [:]) | ||
830 | else | ||
831 | m4_default([$5], [:]) | ||
832 | fi | ||
833 | |||
834 | ]) | ||
835 | |||
836 | |||
837 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
838 | |||
839 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM], | ||
840 | [ | ||
841 | |||
842 | have_dep="yes" | ||
843 | evas_engine_[]$1[]_cflags="" | ||
844 | evas_engine_[]$1[]_libs="" | ||
845 | |||
846 | AC_SUBST([evas_engine_$1_cflags]) | ||
847 | AC_SUBST([evas_engine_$1_libs]) | ||
848 | |||
849 | if test "x${have_dep}" = "xyes" ; then | ||
850 | m4_default([$4], [:]) | ||
851 | else | ||
852 | m4_default([$5], [:]) | ||
853 | fi | ||
854 | |||
855 | ]) | ||
856 | |||
857 | |||
858 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
859 | |||
860 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL], | ||
861 | [ | ||
862 | |||
863 | requirement="" | ||
864 | have_dep="no" | ||
865 | evas_engine_[]$1[]_cflags="" | ||
866 | evas_engine_[]$1[]_libs="" | ||
867 | |||
868 | PKG_CHECK_MODULES([WAYLAND_EGL], | ||
869 | [egl >= 7.10 glesv2 gl wayland-client wayland-egl], | ||
870 | [ | ||
871 | have_dep="yes" | ||
872 | requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl" | ||
873 | evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" | ||
874 | evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" | ||
875 | ],[ | ||
876 | have_dep="no" | ||
877 | ] | ||
878 | ) | ||
879 | |||
880 | if test "x${have_dep}" = "xyes" ; then | ||
881 | PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"]) | ||
882 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm) | ||
883 | if test "x${have_glesv2}" = "xyes" ; then | ||
884 | evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" | ||
885 | evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL" | ||
886 | fi | ||
887 | fi | ||
888 | |||
889 | AC_SUBST([evas_engine_$1_cflags]) | ||
890 | AC_SUBST([evas_engine_$1_libs]) | ||
891 | |||
892 | if test "x$3" = "xstatic" ; then | ||
893 | requirement_evas="${requirement} ${requirement_evas}" | ||
894 | fi | ||
895 | |||
896 | if test "x${have_dep}" = "xyes" ; then | ||
897 | m4_default([$4], [:]) | ||
898 | else | ||
899 | m4_default([$5], [:]) | ||
900 | fi | ||
901 | |||
902 | ]) | ||
903 | |||
904 | |||
905 | dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description) | ||
906 | |||
907 | |||
908 | AC_DEFUN([EVAS_CHECK_ENGINE], | ||
909 | [ | ||
910 | |||
911 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
912 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
913 | |||
914 | want_engine="$2" | ||
915 | want_static_engine="no" | ||
916 | have_engine="no" | ||
917 | have_evas_engine_[]DOWN="no" | ||
918 | |||
919 | AC_ARG_ENABLE([$1], | ||
920 | [AC_HELP_STRING([--enable-$1], [enable $4 rendering backend])], | ||
921 | [ | ||
922 | if test "x${enableval}" = "xyes" ; then | ||
923 | want_engine="yes" | ||
924 | else | ||
925 | if test "x${enableval}" = "xstatic" ; then | ||
926 | want_engine="static" | ||
927 | else | ||
928 | want_engine="no" | ||
929 | fi | ||
930 | fi | ||
931 | ]) | ||
932 | |||
933 | AC_MSG_CHECKING([whether to enable $4 rendering backend]) | ||
934 | AC_MSG_RESULT([${want_engine}]) | ||
935 | |||
936 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then | ||
937 | m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"]) | ||
938 | fi | ||
939 | |||
940 | if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then | ||
941 | AC_MSG_ERROR([$4 dependencies not found (strict dependencies checking)]) | ||
942 | fi | ||
943 | |||
944 | AC_MSG_CHECKING([whether $4 rendering backend will be built]) | ||
945 | AC_MSG_RESULT([${have_engine}]) | ||
946 | |||
947 | if test "x${have_engine}" = "xyes" ; then | ||
948 | if test "x${want_engine}" = "xstatic" ; then | ||
949 | have_evas_engine_[]DOWN="static" | ||
950 | want_static_engine="yes" | ||
951 | else | ||
952 | have_evas_engine_[]DOWN="yes" | ||
953 | fi | ||
954 | fi | ||
955 | |||
956 | if test "x${have_engine}" = "xyes" ; then | ||
957 | AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend]) | ||
958 | fi | ||
959 | |||
960 | AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"]) | ||
961 | |||
962 | if test "x${want_static_engine}" = "xyes" ; then | ||
963 | AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas]) | ||
964 | have_static_module="yes" | ||
965 | fi | ||
966 | |||
967 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"]) | ||
968 | |||
969 | m4_popdef([UP]) | ||
970 | m4_popdef([DOWN]) | ||
971 | |||
972 | ]) | ||