summaryrefslogtreecommitdiff
path: root/m4/evas_check_loader.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/evas_check_loader.m4')
-rw-r--r--m4/evas_check_loader.m4678
1 files changed, 0 insertions, 678 deletions
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
deleted file mode 100644
index ff48c3c..0000000
--- a/m4/evas_check_loader.m4
+++ /dev/null
@@ -1,678 +0,0 @@
1
2dnl use: ARG_ENABLE_EVAS_VG_LOADER(loader, default_value)
3
4AC_DEFUN([ARG_ENABLE_EVAS_VG_LOADER],
5[dnl
6m4_pushdef([DOWN], m4_tolower([$1]))dnl
7
8AC_ARG_ENABLE([vg-loader-[]DOWN],
9 [AC_HELP_STRING([--enable-vg-loader-[]DOWN], [enable $1 vg loader. @<:@default=$2@:>@])],
10 [
11 if test "x${enableval}" = "xyes" ; then
12 want_evas_vg_loader_[]DOWN="yes"
13 else
14 if test "x${enableval}" = "xstatic" ; then
15 want_evas_vg_loader_[]DOWN="static"
16 else
17 if test "x${enableval}" = "xauto" ; then
18 want_evas_vg_loader_[]DOWN="auto"
19 else
20 want_evas_vg_loader_[]DOWN="no"
21 fi
22 fi
23 fi
24 ],
25 [want_evas_vg_loader_[]DOWN="$2"])
26m4_popdef([DOWN])dnl
27])
28
29dnl use: EVAS_CHECK_VG_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
30
31AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_SVG],
32[
33
34have_dep="yes"
35evas_vg_loader_[]$1[]_cflags=""
36evas_vg_loader_[]$1[]_libs=""
37
38AC_SUBST([evas_vg_loader_$1_cflags])
39AC_SUBST([evas_vg_loader_$1_libs])
40
41AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
42
43])
44
45dnl use: EVAS_CHECK_VG_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
46
47AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_EET],
48[
49
50have_dep="yes"
51evas_vg_loader_[]$1[]_cflags=""
52evas_vg_loader_[]$1[]_libs=""
53
54AC_SUBST([evas_vg_loader_$1_cflags])
55AC_SUBST([evas_vg_loader_$1_libs])
56
57AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
58
59])
60
61dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value)
62
63AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER],
64[dnl
65m4_pushdef([DOWN], m4_tolower([$1]))dnl
66
67AC_ARG_ENABLE([image-loader-[]DOWN],
68 [AC_HELP_STRING([--enable-image-loader-[]DOWN], [enable $1 image loader. @<:@default=$2@:>@])],
69 [
70 if test "x${enableval}" = "xyes" ; then
71 want_evas_image_loader_[]DOWN="yes"
72 else
73 if test "x${enableval}" = "xstatic" ; then
74 want_evas_image_loader_[]DOWN="static"
75 else
76 if test "x${enableval}" = "xauto" ; then
77 want_evas_image_loader_[]DOWN="auto"
78 else
79 want_evas_image_loader_[]DOWN="no"
80 fi
81 fi
82 fi
83 ],
84 [want_evas_image_loader_[]DOWN="$2"])
85m4_popdef([DOWN])dnl
86])
87
88dnl use: EVAS_CHECK_LOADER_DEP_BMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
89
90AC_DEFUN([EVAS_CHECK_LOADER_DEP_BMP],
91[
92
93have_dep="yes"
94evas_image_loader_[]$1[]_cflags=""
95evas_image_loader_[]$1[]_libs=""
96
97AC_SUBST([evas_image_loader_$1_cflags])
98AC_SUBST([evas_image_loader_$1_libs])
99
100AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
101
102])
103
104dnl use: EVAS_CHECK_LOADER_DEP_DDS(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
105
106AC_DEFUN([EVAS_CHECK_LOADER_DEP_DDS],
107[
108
109have_dep="yes"
110evas_image_loader_[]$1[]_cflags=""
111evas_image_loader_[]$1[]_libs=""
112
113AC_SUBST([evas_image_loader_$1_cflags])
114AC_SUBST([evas_image_loader_$1_libs])
115
116AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
117
118])
119
120dnl use: EVAS_CHECK_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
121
122AC_DEFUN([EVAS_CHECK_LOADER_DEP_EET],
123[
124
125requirement=""
126have_dep="no"
127evas_image_loader_[]$1[]_cflags=""
128evas_image_loader_[]$1[]_libs=""
129
130dnl Eet is required
131have_dep="yes"
132
133AC_SUBST([evas_image_loader_$1_cflags])
134AC_SUBST([evas_image_loader_$1_libs])
135
136AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
137
138])
139
140dnl use: EVAS_CHECK_LOADER_DEP_GENERIC(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
141
142AC_DEFUN([EVAS_CHECK_LOADER_DEP_GENERIC],
143[
144
145have_dep="yes"
146evas_image_loader_[]$1[]_cflags=""
147evas_image_loader_[]$1[]_libs=""
148
149AC_SUBST([evas_image_loader_$1_cflags])
150AC_SUBST([evas_image_loader_$1_libs])
151
152AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
153
154])
155
156dnl use: EVAS_CHECK_LOADER_DEP_GIF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
157
158AC_DEFUN([EVAS_CHECK_LOADER_DEP_GIF],
159[
160
161have_dep="no"
162evas_image_loader_[]$1[]_cflags=""
163evas_image_loader_[]$1[]_libs=""
164
165AC_CHECK_HEADER([gif_lib.h], [have_dep="yes"])
166
167if test "x${have_dep}" = "xyes" ; then
168 AC_CHECK_LIB([gif],
169 [DGifOpenFileName],
170 [
171 evas_image_loader_[]$1[]_libs="-lgif"
172 ],
173 [have_dep="no"]
174 )
175
176 if test "x${have_dep}" = "xno" ; then
177 AC_CHECK_LIB([ungif],
178 [DGifOpenFileName],
179 [
180 have_dep="yes"
181 evas_image_loader_[]$1[]_libs="-lungif"
182 ]
183 )
184 fi
185fi
186
187if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
188 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
189fi
190
191AC_SUBST([evas_image_loader_$1_cflags])
192AC_SUBST([evas_image_loader_$1_libs])
193
194AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
195
196])
197
198dnl use: EVAS_CHECK_LOADER_DEP_ICO(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
199
200AC_DEFUN([EVAS_CHECK_LOADER_DEP_ICO],
201[
202
203have_dep="yes"
204evas_image_loader_[]$1[]_cflags=""
205evas_image_loader_[]$1[]_libs=""
206
207AC_SUBST([evas_image_loader_$1_cflags])
208AC_SUBST([evas_image_loader_$1_libs])
209
210AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
211
212])
213
214dnl use: EVAS_CHECK_LOADER_DEP_JPEG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
215
216AC_DEFUN([EVAS_CHECK_LOADER_DEP_JPEG],
217[
218
219have_dep="no"
220evas_image_loader_[]$1[]_cflags=""
221evas_image_loader_[]$1[]_libs=""
222
223AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"])
224
225if test "x${have_dep}" = "xyes" ; then
226 AC_CHECK_LIB([jpeg],
227 [jpeg_CreateDecompress],
228 [
229 evas_image_loader_[]$1[]_libs="-ljpeg"
230 AC_COMPILE_IFELSE(
231 [AC_LANG_PROGRAM(
232 [[
233#include <stdio.h>
234#include <jpeglib.h>
235#include <setjmp.h>
236 ]],
237 [[
238struct jpeg_decompress_struct decomp;
239decomp.region_x = 0;
240 ]])],
241 [have_jpeg_region="yes"],
242 [have_jpeg_region="no"])
243 ],
244 [have_dep="no"]
245 )
246 if test "x${have_jpeg_region}" = "xyes" ; then
247 AC_DEFINE(BUILD_LOADER_JPEG_REGION, [1], [JPEG Region Decode Support])
248 fi
249fi
250
251if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
252 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
253fi
254
255AC_SUBST([evas_image_loader_$1_cflags])
256AC_SUBST([evas_image_loader_$1_libs])
257
258AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
259
260])
261
262dnl use: EVAS_CHECK_LOADER_DEP_JP2K(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
263
264AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K],
265[
266
267requirement=""
268have_dep="no"
269evas_image_loader_[]$1[]_cflags=""
270evas_image_loader_[]$1[]_libs=""
271
272PKG_CHECK_EXISTS([libopenjp2 >= 2.0],
273 [
274 have_dep="yes"
275 requirement="libopenjp2 >= 2.0"
276 ],
277 [have_dep="no"])
278
279if test "x${have_dep}" = "xyes" ; then
280 if test "x$2" = "xstatic" ; then
281 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
282 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
283 fi
284 PKG_CHECK_MODULES([JP2K], [${requirement}])
285 evas_image_loader_[]$1[]_cflags="${JP2K_CFLAGS}"
286 evas_image_loader_[]$1[]_libs="${JP2K_LIBS}"
287fi
288
289AC_SUBST([evas_image_loader_$1_cflags])
290AC_SUBST([evas_image_loader_$1_libs])
291
292AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
293
294])
295
296dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
297
298AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS],
299[
300
301have_dep="yes"
302evas_image_loader_[]$1[]_cflags=""
303evas_image_loader_[]$1[]_libs=""
304
305AC_SUBST([evas_image_loader_$1_cflags])
306AC_SUBST([evas_image_loader_$1_libs])
307
308AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
309
310])
311
312dnl use: EVAS_CHECK_LOADER_DEP_PNG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
313
314AC_DEFUN([EVAS_CHECK_LOADER_DEP_PNG],
315[
316
317requirement=""
318have_dep="no"
319evas_image_loader_[]$1[]_cflags=""
320evas_image_loader_[]$1[]_libs=""
321
322dnl libpng.pc is the latest version of libpng that ahs been installed.
323dnl We check it first.
324PKG_CHECK_EXISTS([libpng >= 1.2.10],
325 [
326 have_dep="yes"
327 requirement="libpng >= 1.2.10"
328 ],
329 [have_dep="no"])
330
331if test "x${have_dep}" = "xno" ; then
332 PKG_CHECK_EXISTS([libpng15],
333 [
334 have_dep="yes"
335 requirement="libpng15"
336 ],
337 [have_dep="no"])
338fi
339
340if test "x${have_dep}" = "xno" ; then
341 PKG_CHECK_EXISTS([libpng14],
342 [
343 have_dep="yes"
344 requirement="libpng14"
345 ],
346 [have_dep="no"])
347fi
348
349if test "x${have_dep}" = "xno" ; then
350 PKG_CHECK_EXISTS([libpng12 >= 1.2.10],
351 [
352 have_dep="yes"
353 requirement="libpng12 >= 1.2.10"
354 ],
355 [have_dep="no"])
356fi
357
358if test "x${have_dep}" = "xyes" ; then
359 if test "x$2" = "xstatic" ; then
360 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
361 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
362 fi
363 PKG_CHECK_MODULES([PNG], [${requirement}])
364 evas_image_loader_[]$1[]_cflags="${PNG_CFLAGS}"
365 evas_image_loader_[]$1[]_libs="${PNG_LIBS}"
366fi
367
368AC_SUBST([evas_image_loader_$1_cflags])
369AC_SUBST([evas_image_loader_$1_libs])
370
371AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
372
373])
374
375dnl use: EVAS_CHECK_LOADER_DEP_PSD(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
376
377AC_DEFUN([EVAS_CHECK_LOADER_DEP_PSD],
378[
379
380have_dep="yes"
381evas_image_loader_[]$1[]_cflags=""
382evas_image_loader_[]$1[]_libs=""
383
384AC_SUBST([evas_image_loader_$1_cflags])
385AC_SUBST([evas_image_loader_$1_libs])
386
387AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
388
389])
390
391dnl use: EVAS_CHECK_LOADER_DEP_TGV(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
392
393AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGV],
394[
395
396have_dep="yes"
397evas_image_loader_[]$1[]_cflags=""
398evas_image_loader_[]$1[]_libs=""
399
400AC_SUBST([evas_image_loader_$1_cflags])
401AC_SUBST([evas_image_loader_$1_libs])
402
403AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
404
405])
406
407dnl use: EVAS_CHECK_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
408
409AC_DEFUN([EVAS_CHECK_LOADER_DEP_SVG],
410[
411
412requirement=""
413evas_image_loader_[]$1[]_cflags=""
414evas_image_loader_[]$1[]_libs=""
415version_esvg="0.0.18"
416version_ender="0.0.6"
417
418PKG_CHECK_EXISTS([esvg >= ${version_esvg} ender >= ${version_ender}],
419 [
420 have_dep="yes"
421 requirement="esvg >= ${version_esvg} ender >= ${version_ender}"
422 ],
423 [have_dep="no"])
424
425if test "x${have_dep}" = "xyes" ; then
426 if test "x$2" = "xstatic" ; then
427 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
428 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
429 fi
430 PKG_CHECK_MODULES([SVG], [${requirement}])
431 evas_image_loader_[]$1[]_cflags="${SVG_CFLAGS}"
432 evas_image_loader_[]$1[]_libs="${SVG_LIBS}"
433fi
434
435AC_SUBST([evas_image_loader_$1_cflags])
436AC_SUBST([evas_image_loader_$1_libs])
437
438AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
439
440])
441
442dnl use: EVAS_CHECK_LOADER_DEP_TGA(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
443
444AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGA],
445[
446
447have_dep="yes"
448evas_image_loader_[]$1[]_cflags=""
449evas_image_loader_[]$1[]_libs=""
450
451AC_SUBST([evas_image_loader_$1_cflags])
452AC_SUBST([evas_image_loader_$1_libs])
453
454AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
455
456])
457
458dnl use: EVAS_CHECK_LOADER_DEP_TIFF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
459
460AC_DEFUN([EVAS_CHECK_LOADER_DEP_TIFF],
461[
462
463have_dep="no"
464evas_image_loader_[]$1[]_cflags=""
465evas_image_loader_[]$1[]_libs=""
466
467AC_CHECK_HEADER([tiffio.h], [have_dep="yes"])
468
469if test "x${have_dep}" = "xyes" ; then
470 AC_CHECK_LIB([tiff],
471 [TIFFReadScanline],
472 [
473 evas_image_loader_[]$1[]_libs="-ltiff"
474 ],
475 [have_dep="no"]
476 )
477
478 if test "x${have_dep}" = "xno" ; then
479 AC_CHECK_LIB([tiff],
480 [TIFFReadScanline],
481 [
482 have_dep="yes"
483 evas_image_loader_[]$1[]_libs="-ltiff -ljpeg -lz -lm"
484 ]
485 )
486 fi
487
488 if test "x${have_dep}" = "xno" ; then
489 AC_CHECK_LIB([tiff34],
490 [TIFFReadScanline],
491 [
492 have_dep="yes"
493 evas_image_loader_[]$1[]_libs="-ltiff34 -ljpeg -lz -lm"
494 ]
495 )
496 fi
497fi
498
499if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
500 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
501fi
502
503AC_SUBST([evas_image_loader_$1_cflags])
504AC_SUBST([evas_image_loader_$1_libs])
505
506AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
507
508])
509
510dnl use: EVAS_CHECK_LOADER_DEP_WBMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
511
512AC_DEFUN([EVAS_CHECK_LOADER_DEP_WBMP],
513[
514
515have_dep="yes"
516evas_image_loader_[]$1[]_cflags=""
517evas_image_loader_[]$1[]_libs=""
518
519AC_SUBST([evas_image_loader_$1_cflags])
520AC_SUBST([evas_image_loader_$1_libs])
521
522AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
523
524])
525
526dnl use: EVAS_CHECK_LOADER_DEP_WEBP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
527
528AC_DEFUN([EVAS_CHECK_LOADER_DEP_WEBP],
529[
530
531have_dep="no"
532evas_image_loader_[]$1[]_cflags=""
533evas_image_loader_[]$1[]_libs=""
534
535AC_CHECK_HEADER([webp/decode.h], [have_dep="yes"])
536
537if test "x${have_dep}" = "xyes" ; then
538 AC_CHECK_LIB([webp],
539 [WebPDecodeRGBA],
540 [
541 evas_image_loader_[]$1[]_libs="-lwebp"
542 ],
543 [have_dep="no"]
544 )
545fi
546
547if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
548 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
549fi
550
551AC_SUBST([evas_image_loader_$1_cflags])
552AC_SUBST([evas_image_loader_$1_libs])
553
554AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
555
556])
557
558dnl use: EVAS_CHECK_LOADER_DEP_XPM(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
559
560AC_DEFUN([EVAS_CHECK_LOADER_DEP_XPM],
561[
562
563have_dep="yes"
564evas_image_loader_[]$1[]_cflags=""
565evas_image_loader_[]$1[]_libs=""
566
567AC_SUBST([evas_image_loader_$1_cflags])
568AC_SUBST([evas_image_loader_$1_libs])
569
570AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
571
572])
573
574dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro)
575AC_DEFUN([EVAS_CHECK_IMAGE_LOADER],
576[dnl
577m4_pushdef([UP], m4_toupper([$1]))dnl
578m4_pushdef([DOWN], m4_tolower([$1]))dnl
579
580want_loader="$2"
581want_static_loader="no"
582have_loader="no"
583have_evas_image_loader_[]DOWN="no"
584
585AC_MSG_CHECKING([whether to enable $1 image loader])
586AC_MSG_RESULT([${want_loader}])
587
588if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then
589 m4_default([EVAS_CHECK_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"])
590fi
591
592if test "x${have_loader}" = "xno"; then
593 if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic"; then
594 AC_MSG_ERROR([$1 dependencies not found])
595 fi
596fi
597
598AC_MSG_CHECKING([whether $1 image loader will be built])
599AC_MSG_RESULT([${have_loader}])
600
601if test "x${have_loader}" = "xyes" ; then
602 if test "x${want_loader}" = "xstatic" ; then
603 have_evas_image_loader_[]DOWN="static"
604 want_static_loader="yes"
605 else
606 have_evas_image_loader_[]DOWN="yes"
607 fi
608fi
609
610if test "x${have_loader}" = "xyes" ; then
611 AC_DEFINE(BUILD_LOADER_[]UP, [1], [UP Image Loader Support])
612fi
613
614AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_loader}" = "xyes"])
615
616if test "x${want_static_loader}" = "xyes" ; then
617 AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas])
618 have_static_module="yes"
619fi
620
621EFL_ADD_FEATURE([EVAS_LOADER], DOWN, [${have_evas_image_loader_]DOWN[}])dnl
622AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"])dnl
623m4_popdef([UP])dnl
624m4_popdef([DOWN])dnl
625])
626
627dnl use: EVAS_CHECK_VG_LOADER(loader, want_loader, macro)
628AC_DEFUN([EVAS_CHECK_VG_LOADER],
629[dnl
630m4_pushdef([UP], m4_toupper([$1]))dnl
631m4_pushdef([DOWN], m4_tolower([$1]))dnl
632
633want_loader="$2"
634want_static_loader="no"
635have_loader="no"
636have_evas_vg_loader_[]DOWN="no"
637
638AC_MSG_CHECKING([whether to enable $1 vg loader])
639AC_MSG_RESULT([${want_loader}])
640
641if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then
642 m4_default([EVAS_CHECK_VG_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"])
643fi
644
645if test "x${have_loader}" = "xno"; then
646 if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic"; then
647 AC_MSG_ERROR([$1 dependencies not found])
648 fi
649fi
650
651AC_MSG_CHECKING([whether $1 vg loader will be built])
652AC_MSG_RESULT([${have_loader}])
653
654if test "x${have_loader}" = "xyes" ; then
655 if test "x${want_loader}" = "xstatic" ; then
656 have_evas_vg_loader_[]DOWN="static"
657 want_static_loader="yes"
658 else
659 have_evas_vg_loader_[]DOWN="yes"
660 fi
661fi
662
663if test "x${have_loader}" = "xyes" ; then
664 AC_DEFINE(BUILD_VG_LOADER_[]UP, [1], [UP Image Loader Support])
665fi
666
667AM_CONDITIONAL(BUILD_VG_LOADER_[]UP, [test "x${have_loader}" = "xyes"])
668
669if test "x${want_static_loader}" = "xyes" ; then
670 AC_DEFINE(EVAS_STATIC_BUILD_VG_[]UP, [1], [Build $1 vg loader inside libevas])
671 have_static_module="yes"
672fi
673
674EFL_ADD_FEATURE([EVAS_VG_LOADER], DOWN, [${have_evas_vg_loader_]DOWN[}])dnl
675AM_CONDITIONAL(EVAS_STATIC_BUILD_VG_[]UP, [test "x${want_static_loader}" = "xyes"])dnl
676m4_popdef([UP])dnl
677m4_popdef([DOWN])dnl
678])