diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-05-26 18:30:54 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-06-18 08:56:34 +0200 |
commit | 639869703f3e8b0ce34d83b523ff611e85cfd93b (patch) | |
tree | dc72c59b87a83d02758ae81f979a25e21b226a8b /m4/evas_check_engine.m4 | |
parent | 4f8e15c16c4f68b6fae8708b177ce672daefc59c (diff) |
autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!
This time the final version, ci has been adjusted, and now does not try
anymore to build a removed buildsystem. However, the scripts in there
need cleaning up.
Differential Revision: https://phab.enlightenment.org/D9027
Diffstat (limited to '')
-rw-r--r-- | m4/evas_check_engine.m4 | 629 |
1 files changed, 0 insertions, 629 deletions
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4 deleted file mode 100644 index d15c8d5f01..0000000000 --- a/m4/evas_check_engine.m4 +++ /dev/null | |||
@@ -1,629 +0,0 @@ | |||
1 | AC_DEFUN([REQUIRED_WAYLAND_VERSION], [1.11.0]) | ||
2 | |||
3 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
4 | |||
5 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB], | ||
6 | [ | ||
7 | |||
8 | EFL_FIND_X(evas_engine_[]$1, | ||
9 | [X11/X.h], [X11 XCreateImage Xext XShmCreateImage], | ||
10 | [ | ||
11 | if test "x$3" = "xstatic"; then | ||
12 | requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas" | ||
13 | fi | ||
14 | ifelse([$4], , :, [$4]) | ||
15 | ],[ | ||
16 | ifelse([$5], , :, [$5]) | ||
17 | ]) | ||
18 | ]) | ||
19 | |||
20 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
21 | |||
22 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB], | ||
23 | [ | ||
24 | |||
25 | EFL_FIND_X(evas_engine_[]$1, | ||
26 | [X11/Xlib.h X11/Xatom.h X11/Xutil.h X11/extensions/Xrender.h X11/Xresource.h], | ||
27 | [X11 XCreateColormap Xrender XRenderCreatePicture], | ||
28 | [ | ||
29 | CFLAGS_save="$CFLAGS" | ||
30 | CFLAGS="$evas_engine_[]$1[]_cflags $CFLAGS" | ||
31 | CPPFLAGS_save="$CPPFLAGS" | ||
32 | CPPFLAGS="$evas_engine_[]$1[]_cflags $CPPFLAGS" | ||
33 | |||
34 | AC_CHECK_HEADER([GL/gl.h], | ||
35 | [have_dep="yes"], | ||
36 | [have_dep="no"], | ||
37 | [ | ||
38 | #include <GL/gl.h> | ||
39 | #include <GL/glext.h> | ||
40 | #include <GL/glx.h> | ||
41 | #include <X11/Xlib.h> | ||
42 | #include <X11/Xatom.h> | ||
43 | #include <X11/Xutil.h> | ||
44 | #include <X11/extensions/Xrender.h> | ||
45 | #include <X11/Xresource.h> | ||
46 | ]) | ||
47 | |||
48 | gl_pt_lib="" | ||
49 | have_gl_pt="no" | ||
50 | |||
51 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
52 | CFLAGS_pt_save="$CFLAGS" | ||
53 | CFLAGS="$CFLAGS -pthread" | ||
54 | LIBS_pt_save="$LIBS" | ||
55 | LIBS="$LIBS -pthread" | ||
56 | AC_LINK_IFELSE( | ||
57 | [AC_LANG_PROGRAM([[ | ||
58 | #include <pthread.h> | ||
59 | ]], | ||
60 | [[ | ||
61 | pthread_create(NULL, NULL, NULL, NULL); | ||
62 | ]])], | ||
63 | [have_gl_pt="yes"], | ||
64 | [have_gl_pt="no"]) | ||
65 | CFLAGS=$CFLAGS_pt_save | ||
66 | LIBS=$LIBS_pt_save | ||
67 | AC_MSG_RESULT([$have_gl_pt]) | ||
68 | |||
69 | if test "x$have_gl_pt" = "xyes" ; then | ||
70 | gl_pt_lib=" -pthread" | ||
71 | fi | ||
72 | |||
73 | if test "x$have_dep" = "xyes"; then | ||
74 | LIBS_save="$LIBS" | ||
75 | LIBS="$LIBS $evas_engine_[]$1[]_libs" | ||
76 | AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], [-lm $gl_pt_lib]) | ||
77 | LIBS="$LIBS_save" | ||
78 | fi | ||
79 | |||
80 | if test "x${with_opengl}" = "xes" ; then | ||
81 | have_dep=no | ||
82 | fi | ||
83 | |||
84 | if test "x$have_dep" = "xyes" ; then | ||
85 | evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGL $gl_pt_lib" | ||
86 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGL $gl_pt_lib" | ||
87 | else | ||
88 | AC_CHECK_HEADER([GLES2/gl2.h], | ||
89 | [have_egl="yes"], | ||
90 | [have_egl="no"], | ||
91 | [ | ||
92 | #include <GLES2/gl2.h> | ||
93 | #include <GLES2/gl2ext.h> | ||
94 | #include <EGL/egl.h> | ||
95 | #include <X11/Xlib.h> | ||
96 | #include <X11/Xatom.h> | ||
97 | #include <X11/Xutil.h> | ||
98 | #include <X11/extensions/Xrender.h> | ||
99 | #include <X11/Xresource.h> | ||
100 | ]) | ||
101 | if test "x${have_egl}" = "xyes" ; then | ||
102 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib) | ||
103 | if test "x${have_glesv2}" = "xyes" ; then | ||
104 | evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
105 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm $gl_pt_lib" | ||
106 | have_dep="yes" | ||
107 | AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support]) | ||
108 | gles_variety_sgx="yes" | ||
109 | fi | ||
110 | fi | ||
111 | fi | ||
112 | |||
113 | CPPFLAGS="$CPPFLAGS_save" | ||
114 | CFLAGS="$CFLAGS_save" | ||
115 | |||
116 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
117 | requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas" | ||
118 | fi | ||
119 | |||
120 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
121 | ],[ | ||
122 | ifelse([$5], , :, [$5]) | ||
123 | ]) | ||
124 | ]) | ||
125 | |||
126 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
127 | |||
128 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI], | ||
129 | [ | ||
130 | |||
131 | have_dep="no" | ||
132 | evas_engine_[]$1[]_cflags="" | ||
133 | evas_engine_[]$1[]_libs="" | ||
134 | |||
135 | AC_CHECK_HEADER([windows.h], | ||
136 | [ | ||
137 | have_dep="yes" | ||
138 | evas_engine_[]$1[]_libs="-lgdi32" | ||
139 | ]) | ||
140 | |||
141 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
142 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
143 | fi | ||
144 | |||
145 | AC_SUBST([evas_engine_$1_cflags]) | ||
146 | AC_SUBST([evas_engine_$1_libs]) | ||
147 | |||
148 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
149 | |||
150 | ]) | ||
151 | |||
152 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
153 | |||
154 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW], | ||
155 | [ | ||
156 | |||
157 | have_dep="no" | ||
158 | evas_engine_[]$1[]_cflags="" | ||
159 | evas_engine_[]$1[]_libs="" | ||
160 | |||
161 | AC_CHECK_HEADER([ddraw.h], | ||
162 | [ | ||
163 | have_dep="yes" | ||
164 | evas_engine_[]$1[]_libs="-lddraw" | ||
165 | ]) | ||
166 | |||
167 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
168 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
169 | fi | ||
170 | |||
171 | AC_SUBST([evas_engine_$1_cflags]) | ||
172 | AC_SUBST([evas_engine_$1_libs]) | ||
173 | |||
174 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
175 | |||
176 | ]) | ||
177 | |||
178 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_COCOA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
179 | |||
180 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_COCOA], | ||
181 | [ | ||
182 | |||
183 | evas_engine_[]$1[]_cflags="" | ||
184 | evas_engine_[]$1[]_libs="" | ||
185 | |||
186 | AC_LANG_PUSH([Objective C]) | ||
187 | |||
188 | LIBS_save="$LIBS" | ||
189 | LIBS="$LIBS -framework Cocoa" | ||
190 | AC_LINK_IFELSE( | ||
191 | [AC_LANG_PROGRAM( | ||
192 | [[ | ||
193 | #include <Cocoa/Cocoa.h> | ||
194 | ]], | ||
195 | [[ | ||
196 | NSWindow *window; | ||
197 | window = [[NSWindow alloc] | ||
198 | initWithContentRect:NSMakeRect(0, 0, 1, 1) | ||
199 | styleMask:(NSTitledWindowMask) | ||
200 | backing:NSBackingStoreBuffered | ||
201 | defer:NO | ||
202 | screen:nil | ||
203 | ]; | ||
204 | ]])], | ||
205 | [ | ||
206 | have_dep="yes" | ||
207 | evas_engine_[]$1[]_libs="-framework Cocoa -framework OpenGL" | ||
208 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs" | ||
209 | ], | ||
210 | [have_dep="no"]) | ||
211 | LIBS="$LIBS_save" | ||
212 | |||
213 | AC_LANG_POP([Objective C]) | ||
214 | |||
215 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
216 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
217 | fi | ||
218 | |||
219 | AC_SUBST([evas_engine_$1_cflags]) | ||
220 | AC_SUBST([evas_engine_$1_libs]) | ||
221 | |||
222 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
223 | |||
224 | ]) | ||
225 | |||
226 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
227 | |||
228 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL], | ||
229 | [ | ||
230 | |||
231 | requirement="" | ||
232 | have_dep="no" | ||
233 | evas_engine_[]$1[]_cflags="" | ||
234 | evas_engine_[]$1[]_libs="" | ||
235 | |||
236 | PKG_CHECK_EXISTS([sdl2 >= 2.0.0], | ||
237 | [ | ||
238 | have_dep="yes" | ||
239 | requirement="sdl2 >= 2.0.0" | ||
240 | ], | ||
241 | [have_dep="no"]) | ||
242 | |||
243 | if test "x${have_dep}" = "xyes" ; then | ||
244 | if test "x$3" = "xstatic" ; then | ||
245 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
246 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
247 | else | ||
248 | PKG_CHECK_MODULES([SDL], [${requirement}]) | ||
249 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
250 | evas_engine_[]$1[]_libs="${SDL_LIBS}" | ||
251 | fi | ||
252 | fi | ||
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 | AC_CHECK_HEADER([GL/gl.h], | ||
280 | [have_dep="yes"], | ||
281 | [have_dep="no"], | ||
282 | [ | ||
283 | #include <GL/gl.h> | ||
284 | #include <GL/glext.h> | ||
285 | ]) | ||
286 | |||
287 | if test "x${with_opengl}" = "xes" ; then | ||
288 | have_dep=no | ||
289 | fi | ||
290 | |||
291 | if test "x${have_dep}" = "xyes" ; then | ||
292 | evas_engine_[]$1[]_libs="${evas_engine_[]$1[]_libs} -lGL -lm $gl_pt_lib" | ||
293 | evas_engine_gl_common_libs="-lGL -lm $gl_pt_lib" | ||
294 | else | ||
295 | AC_CHECK_HEADER([SDL2/SDL_opengles.h], | ||
296 | [have_egl="yes"], | ||
297 | [have_egl="no"], | ||
298 | [ | ||
299 | #include <SDL2/SDL_opengles.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 -lm $gl_pt_lib) | ||
304 | if test "x${have_glesv2}" = "xyes" ; then | ||
305 | evas_engine_[]$1[]_libs="${evas_engine_[]$1[]_libs} -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
306 | evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib" | ||
307 | have_dep="yes" | ||
308 | AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support]) | ||
309 | gles_variety_sgx="yes" | ||
310 | fi | ||
311 | fi | ||
312 | fi | ||
313 | |||
314 | AC_SUBST([evas_engine_$1_cflags]) | ||
315 | AC_SUBST([evas_engine_$1_libs]) | ||
316 | |||
317 | if test "x$3" = "xstatic" ; then | ||
318 | requirement_evas="${requirement} ${requirement_evas}" | ||
319 | fi | ||
320 | |||
321 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
322 | |||
323 | ]) | ||
324 | |||
325 | |||
326 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
327 | |||
328 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM], | ||
329 | [ | ||
330 | |||
331 | requirement="" | ||
332 | have_dep="no" | ||
333 | evas_engine_[]$1[]_cflags="" | ||
334 | evas_engine_[]$1[]_libs="" | ||
335 | |||
336 | PKG_CHECK_EXISTS([wayland-client >= REQUIRED_WAYLAND_VERSION], | ||
337 | [ | ||
338 | have_dep="yes" | ||
339 | requirement="wayland-client" | ||
340 | ], | ||
341 | [have_dep="no"]) | ||
342 | |||
343 | if test "x${have_dep}" = "xyes" ; then | ||
344 | if test "x$3" = "xstatic" ; then | ||
345 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
346 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
347 | else | ||
348 | PKG_CHECK_MODULES([WAYLAND_SHM], [${requirement}]) | ||
349 | evas_engine_[]$1[]_cflags="${WAYLAND_SHM_CFLAGS}" | ||
350 | evas_engine_[]$1[]_libs="${WAYLAND_SHM_LIBS}" | ||
351 | fi | ||
352 | fi | ||
353 | |||
354 | AC_SUBST([evas_engine_$1_cflags]) | ||
355 | AC_SUBST([evas_engine_$1_libs]) | ||
356 | |||
357 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
358 | |||
359 | ]) | ||
360 | |||
361 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
362 | |||
363 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL], | ||
364 | [ | ||
365 | |||
366 | requirement="" | ||
367 | have_dep="no" | ||
368 | evas_engine_[]$1[]_cflags="" | ||
369 | evas_engine_[]$1[]_libs="" | ||
370 | |||
371 | if test "x${with_opengl}" = "xes" ; then | ||
372 | gl_library="glesv2" | ||
373 | else | ||
374 | gl_library="gl" | ||
375 | fi | ||
376 | |||
377 | PKG_CHECK_EXISTS([egl ${gl_library} wayland-client >= REQUIRED_WAYLAND_VERSION wayland-egl], | ||
378 | [ | ||
379 | have_dep="yes" | ||
380 | requirement="egl ${gl_library} wayland-client wayland-egl" | ||
381 | ], | ||
382 | [have_dep="no"]) | ||
383 | |||
384 | if test "x${have_dep}" = "xyes" ; then | ||
385 | if test "${gl_library}" != "gl" ; then | ||
386 | have_egl="yes" | ||
387 | fi | ||
388 | if test "x$3" = "xstatic" ; then | ||
389 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
390 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
391 | else | ||
392 | PKG_CHECK_MODULES([WAYLAND_EGL], [${requirement}]) | ||
393 | evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" | ||
394 | evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" | ||
395 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
396 | fi | ||
397 | fi | ||
398 | |||
399 | AC_SUBST([evas_engine_$1_cflags]) | ||
400 | AC_SUBST([evas_engine_$1_libs]) | ||
401 | |||
402 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
403 | |||
404 | ]) | ||
405 | |||
406 | |||
407 | dnl use: EVAS_CHECK_ENGINE_DEP_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
408 | |||
409 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DRM], | ||
410 | [ | ||
411 | |||
412 | requirement="" | ||
413 | have_dep="no" | ||
414 | have_hw_dep="no" | ||
415 | evas_engine_[]$1[]_cflags="" | ||
416 | evas_engine_[]$1[]_libs="" | ||
417 | |||
418 | PKG_CHECK_EXISTS([libdrm], | ||
419 | [ | ||
420 | have_dep="yes" | ||
421 | requirement="libdrm" | ||
422 | ], [have_dep="no"]) | ||
423 | |||
424 | if test "x${have_dep}" = "xyes" ; then | ||
425 | if test "x$3" = "xstatic" ; then | ||
426 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
427 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
428 | else | ||
429 | PKG_CHECK_MODULES([DRM], [${requirement}]) | ||
430 | evas_engine_[]$1[]_cflags="${DRM_CFLAGS}" | ||
431 | evas_engine_[]$1[]_libs="${DRM_LIBS}" | ||
432 | fi | ||
433 | fi | ||
434 | |||
435 | AC_SUBST([evas_engine_$1_cflags]) | ||
436 | AC_SUBST([evas_engine_$1_libs]) | ||
437 | |||
438 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
439 | |||
440 | ]) | ||
441 | |||
442 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
443 | |||
444 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_DRM], | ||
445 | [ | ||
446 | |||
447 | requirement="" | ||
448 | have_dep="no" | ||
449 | have_hw_dep="no" | ||
450 | evas_engine_[]$1[]_cflags="" | ||
451 | evas_engine_[]$1[]_libs="" | ||
452 | |||
453 | if test "x${with_opengl}" = "xes" ; then | ||
454 | gl_library="glesv2" | ||
455 | else | ||
456 | AC_MSG_ERROR([We currently do not support GL DRM without OpenGL ES. Please consider OpenGL ES if you want to use it.]) | ||
457 | fi | ||
458 | |||
459 | PKG_CHECK_EXISTS([egl ${gl_library} libdrm gbm wayland-client >= REQUIRED_WAYLAND_VERSION], | ||
460 | [ | ||
461 | have_dep="yes" | ||
462 | requirement="egl ${gl_library} libdrm gbm wayland-client >= REQUIRED_WAYLAND_VERSION" | ||
463 | ], | ||
464 | [have_dep="no"]) | ||
465 | |||
466 | if test "x${have_dep}" = "xyes" ; then | ||
467 | if test "x$3" = "xstatic" ; then | ||
468 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
469 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
470 | else | ||
471 | PKG_CHECK_MODULES([GL_DRM], [${requirement}]) | ||
472 | evas_engine_[]$1[]_cflags="${GL_DRM_CFLAGS}" | ||
473 | evas_engine_[]$1[]_libs="${GL_DRM_LIBS}" | ||
474 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
475 | fi | ||
476 | fi | ||
477 | |||
478 | AC_SUBST([evas_engine_$1_cflags]) | ||
479 | AC_SUBST([evas_engine_$1_libs]) | ||
480 | |||
481 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
482 | |||
483 | ]) | ||
484 | |||
485 | dnl use: EVAS_CHECK_ENGINE_DEP_EGLFS(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
486 | |||
487 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_EGLFS], | ||
488 | [ | ||
489 | |||
490 | requirement="" | ||
491 | have_dep="no" | ||
492 | have_hw_dep="no" | ||
493 | evas_engine_[]$1[]_cflags="" | ||
494 | evas_engine_[]$1[]_libs="" | ||
495 | |||
496 | if test "x${with_opengl}" = "xes" ; then | ||
497 | gl_library="glesv2" | ||
498 | else | ||
499 | AC_MSG_ERROR([We do not support Eglfs without OpenGL ES. Please consider OpenGL ES if you want to use it.]) | ||
500 | fi | ||
501 | |||
502 | PKG_CHECK_EXISTS([egl >= 7.10 ${gl_library}], | ||
503 | [ | ||
504 | have_dep="yes" | ||
505 | requirement="egl >= 7.10 ${gl_library}" | ||
506 | ], | ||
507 | [have_dep="no"]) | ||
508 | |||
509 | if test "x${have_dep}" = "xyes" ; then | ||
510 | if test "x$3" = "xstatic" ; then | ||
511 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
512 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
513 | else | ||
514 | PKG_CHECK_MODULES([EGLFS], [${requirement}]) | ||
515 | evas_engine_[]$1[]_cflags="${EGLFS_CFLAGS}" | ||
516 | evas_engine_[]$1[]_libs="${EGLFS_LIBS}" | ||
517 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
518 | fi | ||
519 | fi | ||
520 | |||
521 | AC_SUBST([evas_engine_$1_cflags]) | ||
522 | AC_SUBST([evas_engine_$1_libs]) | ||
523 | |||
524 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
525 | |||
526 | ]) | ||
527 | |||
528 | |||
529 | dnl use: EVAS_ENGINE(name, want_engine, [DEPENDENCY-CHECK-CODE]) | ||
530 | dnl | ||
531 | dnl defines BUILD_ENGINE_NAME if it should be built | ||
532 | dnl defines BUILD_STATIC_BUILD_NAME if should be built statically | ||
533 | dnl | ||
534 | dnl will call DEPENDENCY-CHECK-CODE if it should be built, | ||
535 | dnl if some dependency fail just call AC_MSG_ERROR() to abort. | ||
536 | |||
537 | AC_DEFUN([EVAS_ENGINE], | ||
538 | [dnl | ||
539 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
540 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
541 | |||
542 | want_engine="$2" | ||
543 | want_static_engine="no" | ||
544 | have_engine="no" | ||
545 | have_evas_engine_[]DOWN="no" | ||
546 | |||
547 | evas_engine_[]m4_defn([DOWN])[]_cflags="" | ||
548 | evas_engine_[]m4_defn([DOWN])[]_libs="" | ||
549 | |||
550 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then | ||
551 | $3 | ||
552 | |||
553 | have_engine="yes" | ||
554 | if test "x${want_engine}" = "xstatic" ; then | ||
555 | have_evas_engine_[]DOWN="static" | ||
556 | want_static_engine="yes" | ||
557 | else | ||
558 | have_evas_engine_[]DOWN="yes" | ||
559 | fi | ||
560 | fi | ||
561 | |||
562 | AC_DEFINE_IF(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"], | ||
563 | [1], [Build $1 Evas engine]) | ||
564 | AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"]) | ||
565 | |||
566 | AC_DEFINE_IF(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"], | ||
567 | [1], [Build $1 Evas engine inside libevas]) | ||
568 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"]) | ||
569 | |||
570 | AC_SUBST([evas_engine_]m4_defn([DOWN])[_cflags]) | ||
571 | AC_SUBST([evas_engine_]m4_defn([DOWN])[_libs]) | ||
572 | |||
573 | EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}])dnl | ||
574 | m4_popdef([UP])dnl | ||
575 | m4_popdef([DOWN])dnl | ||
576 | ]) | ||
577 | |||
578 | |||
579 | |||
580 | dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description) | ||
581 | AC_DEFUN([EVAS_CHECK_ENGINE], | ||
582 | [dnl | ||
583 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
584 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
585 | |||
586 | want_engine="$2" | ||
587 | want_static_engine="no" | ||
588 | have_engine="no" | ||
589 | have_evas_engine_[]DOWN="no" | ||
590 | |||
591 | AC_MSG_CHECKING([whether to enable $4 rendering backend]) | ||
592 | AC_MSG_RESULT([${want_engine}]) | ||
593 | |||
594 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then | ||
595 | m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"]) | ||
596 | fi | ||
597 | |||
598 | if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes"; then | ||
599 | AC_MSG_ERROR([$4 dependencies not found]) | ||
600 | fi | ||
601 | |||
602 | AC_MSG_CHECKING([whether $4 rendering backend will be built]) | ||
603 | AC_MSG_RESULT([${have_engine}]) | ||
604 | |||
605 | if test "x${have_engine}" = "xyes" ; then | ||
606 | if test "x${want_engine}" = "xstatic" ; then | ||
607 | have_evas_engine_[]DOWN="static" | ||
608 | want_static_engine="yes" | ||
609 | else | ||
610 | have_evas_engine_[]DOWN="yes" | ||
611 | fi | ||
612 | fi | ||
613 | |||
614 | if test "x${have_engine}" = "xyes" ; then | ||
615 | AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend]) | ||
616 | fi | ||
617 | |||
618 | AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"]) | ||
619 | |||
620 | if test "x${want_static_engine}" = "xyes" ; then | ||
621 | AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas]) | ||
622 | have_static_module="yes" | ||
623 | fi | ||
624 | |||
625 | EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}]) | ||
626 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"])dnl | ||
627 | m4_popdef([UP])dnl | ||
628 | m4_popdef([DOWN])dnl | ||
629 | ]) | ||