summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-10-12 18:39:10 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-12 18:39:10 +0900
commit0d9b168146f2b505d298a763d5bfaa6918074366 (patch)
treeae77b12de8c44b8d2e74cff9d0ba90eeadfe6893 /m4
parentbdf79fa8f0ffd0b968cf607365b3a6e842595d08 (diff)
evas/module: Added a new module vg_loader for svg
Reviewers: cedric, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4346
Diffstat (limited to 'm4')
-rw-r--r--m4/evas_check_loader.m496
1 files changed, 96 insertions, 0 deletions
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index b2f5c5a..5bf9277 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -1,4 +1,47 @@
1 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
2dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value) 45dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value)
3 46
4AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER], 47AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER],
@@ -592,3 +635,56 @@ AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"])
592m4_popdef([UP])dnl 635m4_popdef([UP])dnl
593m4_popdef([DOWN])dnl 636m4_popdef([DOWN])dnl
594]) 637])
638
639dnl use: EVAS_CHECK_VG_LOADER(loader, want_loader, macro)
640AC_DEFUN([EVAS_CHECK_VG_LOADER],
641[dnl
642m4_pushdef([UP], m4_toupper([$1]))dnl
643m4_pushdef([DOWN], m4_tolower([$1]))dnl
644
645want_loader="$2"
646want_static_loader="no"
647have_loader="no"
648have_evas_vg_loader_[]DOWN="no"
649
650AC_MSG_CHECKING([whether to enable $1 vg loader])
651AC_MSG_RESULT([${want_loader}])
652
653if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then
654 m4_default([EVAS_CHECK_VG_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"])
655fi
656
657if test "x${have_loader}" = "xno"; then
658 if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic"; then
659 AC_MSG_ERROR([$1 dependencies not found])
660 fi
661fi
662
663AC_MSG_CHECKING([whether $1 vg loader will be built])
664AC_MSG_RESULT([${have_loader}])
665
666if test "x${have_loader}" = "xyes" ; then
667 if test "x${want_loader}" = "xstatic" ; then
668 have_evas_vg_loader_[]DOWN="static"
669 want_static_loader="yes"
670 else
671 have_evas_vg_loader_[]DOWN="yes"
672 fi
673fi
674
675if test "x${have_loader}" = "xyes" ; then
676 AC_DEFINE(BUILD_VG_LOADER_[]UP, [1], [UP Image Loader Support])
677fi
678
679AM_CONDITIONAL(BUILD_VG_LOADER_[]UP, [test "x${have_loader}" = "xyes"])
680
681if test "x${want_static_loader}" = "xyes" ; then
682 AC_DEFINE(EVAS_STATIC_BUILD_VG_[]UP, [1], [Build $1 vg loader inside libevas])
683 have_static_module="yes"
684fi
685
686EFL_ADD_FEATURE([EVAS_VG_LOADER], DOWN, [${have_evas_vg_loader_]DOWN[}])dnl
687AM_CONDITIONAL(EVAS_STATIC_BUILD_VG_[]UP, [test "x${want_static_loader}" = "xyes"])dnl
688m4_popdef([UP])dnl
689m4_popdef([DOWN])dnl
690])