diff options
Diffstat (limited to 'libraries/evas/m4/evas_check_loader.m4')
-rw-r--r-- | libraries/evas/m4/evas_check_loader.m4 | 560 |
1 files changed, 560 insertions, 0 deletions
diff --git a/libraries/evas/m4/evas_check_loader.m4 b/libraries/evas/m4/evas_check_loader.m4 new file mode 100644 index 0000000..e1fb5a9 --- /dev/null +++ b/libraries/evas/m4/evas_check_loader.m4 | |||
@@ -0,0 +1,560 @@ | |||
1 | dnl use: EVAS_CHECK_LOADER_DEP_EDB(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
2 | |||
3 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_EDB], | ||
4 | [ | ||
5 | |||
6 | requirement="" | ||
7 | have_dep="no" | ||
8 | evas_image_loader_[]$1[]_cflags="" | ||
9 | evas_image_loader_[]$1[]_libs="" | ||
10 | |||
11 | PKG_CHECK_MODULES([EDB], [edb], [have_dep="yes" requirement="edb"], [have_dep="no"]) | ||
12 | evas_image_loader_[]$1[]_cflags="${EDB_CFLAGS}" | ||
13 | evas_image_loader_[]$1[]_libs="${EDB_LIBS}" | ||
14 | |||
15 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
16 | AC_SUBST([evas_image_loader_$1_libs]) | ||
17 | |||
18 | if test "x$2" = "xstatic" ; then | ||
19 | requirement_evas="${requirement} ${requirement_evas}" | ||
20 | fi | ||
21 | |||
22 | if test "x${have_dep}" = "xyes" ; then | ||
23 | m4_default([$3], [:]) | ||
24 | else | ||
25 | m4_default([$4], [:]) | ||
26 | fi | ||
27 | |||
28 | ]) | ||
29 | |||
30 | dnl use: EVAS_CHECK_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
31 | |||
32 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_EET], | ||
33 | [ | ||
34 | |||
35 | requirement="" | ||
36 | have_dep="no" | ||
37 | evas_image_loader_[]$1[]_cflags="" | ||
38 | evas_image_loader_[]$1[]_libs="" | ||
39 | |||
40 | PKG_CHECK_MODULES([EET], [eet >= 1.5.0], [have_dep="yes" requirement="eet >= 1.4.0"], [have_dep="no"]) | ||
41 | evas_image_loader_[]$1[]_cflags="${EET_CFLAGS}" | ||
42 | evas_image_loader_[]$1[]_libs="${EET_LIBS}" | ||
43 | |||
44 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
45 | AC_SUBST([evas_image_loader_$1_libs]) | ||
46 | |||
47 | if test "x$2" = "xstatic" ; then | ||
48 | requirement_evas="${requirement} ${requirement_evas}" | ||
49 | fi | ||
50 | |||
51 | if test "x${have_dep}" = "xyes" ; then | ||
52 | m4_default([$3], [:]) | ||
53 | else | ||
54 | m4_default([$4], [:]) | ||
55 | fi | ||
56 | |||
57 | ]) | ||
58 | |||
59 | dnl use: EVAS_CHECK_LOADER_DEP_GIF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
60 | |||
61 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_GIF], | ||
62 | [ | ||
63 | |||
64 | have_dep="no" | ||
65 | evas_image_loader_[]$1[]_cflags="" | ||
66 | evas_image_loader_[]$1[]_libs="" | ||
67 | |||
68 | AC_CHECK_HEADER([gif_lib.h], [have_dep="yes"]) | ||
69 | |||
70 | if test "x${have_dep}" = "xyes" ; then | ||
71 | AC_CHECK_LIB([gif], | ||
72 | [DGifOpenFileName], | ||
73 | [ | ||
74 | evas_image_loader_[]$1[]_libs="-lgif" | ||
75 | ], | ||
76 | [have_dep="no"] | ||
77 | ) | ||
78 | |||
79 | if test "x${have_dep}" = "xno" ; then | ||
80 | AC_CHECK_LIB([ungif], | ||
81 | [DGifOpenFileName], | ||
82 | [ | ||
83 | have_dep="yes" | ||
84 | evas_image_loader_[]$1[]_libs="-lungif" | ||
85 | ] | ||
86 | ) | ||
87 | fi | ||
88 | fi | ||
89 | |||
90 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
91 | AC_SUBST([evas_image_loader_$1_libs]) | ||
92 | |||
93 | if test "x${have_dep}" = "xyes" ; then | ||
94 | m4_default([$3], [:]) | ||
95 | else | ||
96 | m4_default([$4], [:]) | ||
97 | fi | ||
98 | |||
99 | ]) | ||
100 | |||
101 | dnl use: EVAS_CHECK_LOADER_DEP_JPEG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
102 | |||
103 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_JPEG], | ||
104 | [ | ||
105 | |||
106 | have_dep="no" | ||
107 | evas_image_loader_[]$1[]_cflags="" | ||
108 | evas_image_loader_[]$1[]_libs="" | ||
109 | |||
110 | AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"]) | ||
111 | |||
112 | if test "x${have_dep}" = "xyes" ; then | ||
113 | AC_CHECK_LIB([jpeg], | ||
114 | [jpeg_CreateDecompress], | ||
115 | [ | ||
116 | evas_image_loader_[]$1[]_libs="-ljpeg" | ||
117 | AC_COMPILE_IFELSE( | ||
118 | [AC_LANG_PROGRAM( | ||
119 | [[ | ||
120 | #include <stdio.h> | ||
121 | #include <jpeglib.h> | ||
122 | #include <setjmp.h> | ||
123 | ]], | ||
124 | [[ | ||
125 | struct jpeg_decompress_struct decomp; | ||
126 | decomp.region_x = 0; | ||
127 | ]])], | ||
128 | [have_jpeg_region="yes"], | ||
129 | [have_jpeg_region="no"]) | ||
130 | ], | ||
131 | [have_dep="no"] | ||
132 | ) | ||
133 | if test "x${have_jpeg_region}" = "xyes" ; then | ||
134 | AC_DEFINE(BUILD_LOADER_JPEG_REGION, [1], [JPEG Region Decode Support]) | ||
135 | fi | ||
136 | fi | ||
137 | |||
138 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
139 | AC_SUBST([evas_image_loader_$1_libs]) | ||
140 | |||
141 | if test "x${have_dep}" = "xyes" ; then | ||
142 | m4_default([$3], [:]) | ||
143 | else | ||
144 | m4_default([$4], [:]) | ||
145 | fi | ||
146 | |||
147 | ]) | ||
148 | |||
149 | dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
150 | |||
151 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS], | ||
152 | [ | ||
153 | |||
154 | have_dep="yes" | ||
155 | evas_image_loader_[]$1[]_cflags="" | ||
156 | evas_image_loader_[]$1[]_libs="" | ||
157 | |||
158 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
159 | AC_SUBST([evas_image_loader_$1_libs]) | ||
160 | |||
161 | if test "x${have_dep}" = "xyes" ; then | ||
162 | m4_default([$3], [:]) | ||
163 | else | ||
164 | m4_default([$4], [:]) | ||
165 | fi | ||
166 | |||
167 | ]) | ||
168 | |||
169 | dnl use: EVAS_CHECK_LOADER_DEP_PNG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
170 | |||
171 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PNG], | ||
172 | [ | ||
173 | |||
174 | requirement="" | ||
175 | have_dep="no" | ||
176 | evas_image_loader_[]$1[]_cflags="" | ||
177 | evas_image_loader_[]$1[]_libs="" | ||
178 | |||
179 | dnl libpng.pc is the latest version of libpng that ahs been installed. | ||
180 | dnl We check it first. | ||
181 | PKG_CHECK_MODULES([PNG], | ||
182 | [libpng >= 1.2.10], | ||
183 | [have_dep="yes" requirement="libpng"], | ||
184 | [have_dep="no"]) | ||
185 | |||
186 | if test "x${have_dep}" = "xno" ; then | ||
187 | PKG_CHECK_MODULES([PNG], | ||
188 | [libpng15], | ||
189 | [have_dep="yes" requirement="libpng15"], | ||
190 | [have_dep="no"]) | ||
191 | fi | ||
192 | |||
193 | if test "x${have_dep}" = "xno" ; then | ||
194 | PKG_CHECK_MODULES([PNG], | ||
195 | [libpng14], | ||
196 | [have_dep="yes" requirement="libpng14"], | ||
197 | [have_dep="no"]) | ||
198 | fi | ||
199 | |||
200 | if test "x${have_dep}" = "xno" ; then | ||
201 | PKG_CHECK_MODULES([PNG], | ||
202 | [libpng12 >= 1.2.10], | ||
203 | [have_dep="yes" requirement="libpng12"], | ||
204 | [have_dep="no"]) | ||
205 | fi | ||
206 | |||
207 | evas_image_loader_[]$1[]_cflags="${PNG_CFLAGS}" | ||
208 | evas_image_loader_[]$1[]_libs="${PNG_LIBS}" | ||
209 | |||
210 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
211 | AC_SUBST([evas_image_loader_$1_libs]) | ||
212 | |||
213 | if test "x$2" = "xstatic" ; then | ||
214 | requirement_evas="${requirement} ${requirement_evas}" | ||
215 | fi | ||
216 | |||
217 | if test "x${have_dep}" = "xyes" ; then | ||
218 | m4_default([$3], [:]) | ||
219 | else | ||
220 | m4_default([$4], [:]) | ||
221 | fi | ||
222 | |||
223 | ]) | ||
224 | |||
225 | dnl use: EVAS_CHECK_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
226 | |||
227 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_SVG], | ||
228 | [ | ||
229 | |||
230 | requirement="" | ||
231 | have_dep="no" | ||
232 | evas_image_loader_[]$1[]_cflags="" | ||
233 | evas_image_loader_[]$1[]_libs="" | ||
234 | |||
235 | PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 | ||
236 | cairo >= 1.0.0], | ||
237 | [have_dep="yes" requirement="librsvg-2.0 cairo"], | ||
238 | [have_svg="no"] | ||
239 | ) | ||
240 | |||
241 | if test "x${have_dep}" = "xyes" ; then | ||
242 | evas_image_loader_[]$1[]_cflags="${SVG_CFLAGS}" | ||
243 | evas_image_loader_[]$1[]_libs="${SVG_LIBS}" | ||
244 | fi | ||
245 | |||
246 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
247 | AC_SUBST([evas_image_loader_$1_libs]) | ||
248 | |||
249 | if test "x$2" = "xstatic" ; then | ||
250 | requirement_evas="${requirement} ${requirement_evas}" | ||
251 | fi | ||
252 | |||
253 | if test "x${have_dep}" = "xyes" ; then | ||
254 | m4_default([$3], [:]) | ||
255 | else | ||
256 | m4_default([$4], [:]) | ||
257 | fi | ||
258 | |||
259 | ]) | ||
260 | |||
261 | dnl use: EVAS_CHECK_LOADER_DEP_TIFF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
262 | |||
263 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_TIFF], | ||
264 | [ | ||
265 | |||
266 | have_dep="no" | ||
267 | evas_image_loader_[]$1[]_cflags="" | ||
268 | evas_image_loader_[]$1[]_libs="" | ||
269 | |||
270 | AC_CHECK_HEADER([tiffio.h], [have_dep="yes"]) | ||
271 | |||
272 | if test "x${have_dep}" = "xyes" ; then | ||
273 | AC_CHECK_LIB([tiff], | ||
274 | [TIFFReadScanline], | ||
275 | [ | ||
276 | evas_image_loader_[]$1[]_libs="-ltiff" | ||
277 | ], | ||
278 | [have_dep="no"] | ||
279 | ) | ||
280 | |||
281 | if test "x${have_dep}" = "xno" ; then | ||
282 | AC_CHECK_LIB([tiff], | ||
283 | [TIFFReadScanline], | ||
284 | [ | ||
285 | have_dep="yes" | ||
286 | evas_image_loader_[]$1[]_libs="-ltiff -ljpeg -lz -lm" | ||
287 | ] | ||
288 | ) | ||
289 | fi | ||
290 | |||
291 | if test "x${have_dep}" = "xno" ; then | ||
292 | AC_CHECK_LIB([tiff34], | ||
293 | [TIFFReadScanline], | ||
294 | [ | ||
295 | have_dep="yes" | ||
296 | evas_image_loader_[]$1[]_libs="-ltiff34 -ljpeg -lz -lm" | ||
297 | ] | ||
298 | ) | ||
299 | fi | ||
300 | fi | ||
301 | |||
302 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
303 | AC_SUBST([evas_image_loader_$1_libs]) | ||
304 | |||
305 | if test "x${have_dep}" = "xyes" ; then | ||
306 | m4_default([$3], [:]) | ||
307 | else | ||
308 | m4_default([$4], [:]) | ||
309 | fi | ||
310 | |||
311 | ]) | ||
312 | |||
313 | dnl use: EVAS_CHECK_LOADER_DEP_XPM(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
314 | |||
315 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_XPM], | ||
316 | [ | ||
317 | |||
318 | have_dep="yes" | ||
319 | evas_image_loader_[]$1[]_cflags="" | ||
320 | evas_image_loader_[]$1[]_libs="" | ||
321 | |||
322 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
323 | AC_SUBST([evas_image_loader_$1_libs]) | ||
324 | |||
325 | if test "x${have_dep}" = "xyes" ; then | ||
326 | m4_default([$3], [:]) | ||
327 | else | ||
328 | m4_default([$4], [:]) | ||
329 | fi | ||
330 | |||
331 | ]) | ||
332 | |||
333 | dnl use: EVAS_CHECK_LOADER_DEP_BMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
334 | |||
335 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_BMP], | ||
336 | [ | ||
337 | |||
338 | have_dep="yes" | ||
339 | evas_image_loader_[]$1[]_cflags="" | ||
340 | evas_image_loader_[]$1[]_libs="" | ||
341 | |||
342 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
343 | AC_SUBST([evas_image_loader_$1_libs]) | ||
344 | |||
345 | if test "x${have_dep}" = "xyes" ; then | ||
346 | m4_default([$3], [:]) | ||
347 | else | ||
348 | m4_default([$4], [:]) | ||
349 | fi | ||
350 | |||
351 | ]) | ||
352 | |||
353 | dnl use: EVAS_CHECK_LOADER_DEP_ICO(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
354 | |||
355 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_ICO], | ||
356 | [ | ||
357 | |||
358 | have_dep="yes" | ||
359 | evas_image_loader_[]$1[]_cflags="" | ||
360 | evas_image_loader_[]$1[]_libs="" | ||
361 | |||
362 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
363 | AC_SUBST([evas_image_loader_$1_libs]) | ||
364 | |||
365 | if test "x${have_dep}" = "xyes" ; then | ||
366 | m4_default([$3], [:]) | ||
367 | else | ||
368 | m4_default([$4], [:]) | ||
369 | fi | ||
370 | |||
371 | ]) | ||
372 | |||
373 | dnl use: EVAS_CHECK_LOADER_DEP_TGA(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
374 | |||
375 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGA], | ||
376 | [ | ||
377 | |||
378 | have_dep="yes" | ||
379 | evas_image_loader_[]$1[]_cflags="" | ||
380 | evas_image_loader_[]$1[]_libs="" | ||
381 | |||
382 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
383 | AC_SUBST([evas_image_loader_$1_libs]) | ||
384 | |||
385 | if test "x${have_dep}" = "xyes" ; then | ||
386 | m4_default([$3], [:]) | ||
387 | else | ||
388 | m4_default([$4], [:]) | ||
389 | fi | ||
390 | |||
391 | ]) | ||
392 | |||
393 | dnl use: EVAS_CHECK_LOADER_DEP_WBMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
394 | |||
395 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_WBMP], | ||
396 | [ | ||
397 | |||
398 | have_dep="yes" | ||
399 | evas_image_loader_[]$1[]_cflags="" | ||
400 | evas_image_loader_[]$1[]_libs="" | ||
401 | |||
402 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
403 | AC_SUBST([evas_image_loader_$1_libs]) | ||
404 | |||
405 | if test "x${have_dep}" = "xyes" ; then | ||
406 | m4_default([$3], [:]) | ||
407 | else | ||
408 | m4_default([$4], [:]) | ||
409 | fi | ||
410 | |||
411 | ]) | ||
412 | |||
413 | dnl use: EVAS_CHECK_LOADER_DEP_PSD(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
414 | |||
415 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PSD], | ||
416 | [ | ||
417 | |||
418 | have_dep="yes" | ||
419 | evas_image_loader_[]$1[]_cflags="" | ||
420 | evas_image_loader_[]$1[]_libs="" | ||
421 | |||
422 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
423 | AC_SUBST([evas_image_loader_$1_libs]) | ||
424 | |||
425 | if test "x${have_dep}" = "xyes" ; then | ||
426 | m4_default([$3], [:]) | ||
427 | else | ||
428 | m4_default([$4], [:]) | ||
429 | fi | ||
430 | |||
431 | ]) | ||
432 | |||
433 | dnl use: EVAS_CHECK_LOADER_DEP_GENERIC(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
434 | |||
435 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_GENERIC], | ||
436 | [ | ||
437 | |||
438 | have_dep="yes" | ||
439 | evas_image_loader_[]$1[]_cflags="" | ||
440 | evas_image_loader_[]$1[]_libs="" | ||
441 | |||
442 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
443 | AC_SUBST([evas_image_loader_$1_libs]) | ||
444 | |||
445 | if test "x${have_dep}" = "xyes" ; then | ||
446 | m4_default([$3], [:]) | ||
447 | else | ||
448 | m4_default([$4], [:]) | ||
449 | fi | ||
450 | |||
451 | ]) | ||
452 | |||
453 | dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro) | ||
454 | |||
455 | |||
456 | AC_DEFUN([EVAS_CHECK_IMAGE_LOADER], | ||
457 | [ | ||
458 | |||
459 | m4_pushdef([UP], m4_toupper([$1])) | ||
460 | m4_pushdef([DOWN], m4_tolower([$1])) | ||
461 | |||
462 | want_loader="$2" | ||
463 | want_static_loader="no" | ||
464 | have_loader="no" | ||
465 | have_evas_image_loader_[]DOWN="no" | ||
466 | |||
467 | AC_ARG_ENABLE([image-loader-[]DOWN], | ||
468 | [AC_HELP_STRING([--enable-image-loader-[]DOWN], [enable $1 image loader])], | ||
469 | [ | ||
470 | if test "x${enableval}" = "xyes" ; then | ||
471 | want_loader="yes" | ||
472 | else | ||
473 | if test "x${enableval}" = "xstatic" ; then | ||
474 | want_loader="static" | ||
475 | else | ||
476 | want_loader="no" | ||
477 | fi | ||
478 | fi | ||
479 | ] | ||
480 | ) | ||
481 | |||
482 | AC_MSG_CHECKING([whether to enable $1 image loader]) | ||
483 | AC_MSG_RESULT([${want_loader}]) | ||
484 | |||
485 | if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then | ||
486 | m4_default([EVAS_CHECK_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"]) | ||
487 | fi | ||
488 | |||
489 | if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then | ||
490 | AC_MSG_ERROR([$1 dependencies not found (strict dependencies checking)]) | ||
491 | fi | ||
492 | |||
493 | AC_MSG_CHECKING([whether $1 image loader will be built]) | ||
494 | AC_MSG_RESULT([${have_loader}]) | ||
495 | |||
496 | if test "x${have_loader}" = "xyes" ; then | ||
497 | if test "x${want_loader}" = "xstatic" ; then | ||
498 | have_evas_image_loader_[]DOWN="static" | ||
499 | want_static_loader="yes" | ||
500 | else | ||
501 | have_evas_image_loader_[]DOWN="yes" | ||
502 | fi | ||
503 | fi | ||
504 | |||
505 | if test "x${have_loader}" = "xyes" ; then | ||
506 | AC_DEFINE(BUILD_LOADER_[]UP, [1], [UP Image Loader Support]) | ||
507 | fi | ||
508 | |||
509 | AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_loader}" = "xyes"]) | ||
510 | |||
511 | if test "x${want_static_loader}" = "xyes" ; then | ||
512 | AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas]) | ||
513 | have_static_module="yes" | ||
514 | fi | ||
515 | |||
516 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"]) | ||
517 | |||
518 | m4_popdef([UP]) | ||
519 | m4_popdef([DOWN]) | ||
520 | |||
521 | ]) | ||
522 | |||
523 | dnl use: EVAS_CHECK_FONT_LOADER(want) | ||
524 | |||
525 | |||
526 | AC_DEFUN([EVAS_CHECK_FONT_LOADER], | ||
527 | [ | ||
528 | |||
529 | pushdef([UP], translit([$1], [a-z], [A-Z]))dnl | ||
530 | pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl | ||
531 | |||
532 | want_loader="$1" | ||
533 | have_evas_font_loader_eet="no" | ||
534 | |||
535 | AC_ARG_ENABLE([font-loader-eet], | ||
536 | [AC_HELP_STRING([--disable-font-loader-eet], | ||
537 | [disable EET font loader. [[default=enabled]]])], | ||
538 | [want_loader=${enableval}] | ||
539 | ) | ||
540 | |||
541 | AC_MSG_CHECKING([whether to enable Eet font loader]) | ||
542 | AC_MSG_RESULT([${want_loader}]) | ||
543 | |||
544 | if test "x$want_loader" = "xyes" -o "x$want_loader" = "xauto"; then | ||
545 | PKG_CHECK_MODULES([EET], [eet >= 1.5.0], [have_evas_font_loader_eet="yes"], [have_evas_font_loader_eet="no"]) | ||
546 | fi | ||
547 | |||
548 | if test "x${have_evas_font_loader_eet}" = "xno" -a "x$want_loader" = "xyes" -a "x$use_strict" = "xyes" ; then | ||
549 | AC_MSG_ERROR([Eet dependencies not found (strict dependencies checking)]) | ||
550 | fi | ||
551 | |||
552 | if test "x$have_evas_font_loader_eet" = "xyes" ; then | ||
553 | AC_DEFINE([BUILD_FONT_LOADER_EET], [1], [EET Font Loader Support]) | ||
554 | requirement_evas="eet >= 1.5.0 ${requirement_evas}" | ||
555 | fi | ||
556 | |||
557 | popdef([UP]) | ||
558 | popdef([DOWN]) | ||
559 | |||
560 | ]) | ||