1 dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
2 AC_DEFUN([ECORE_CHECK_MODULE],
4 pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
5 pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
8 ecore_[]DOWN[]_cflags=""
13 AC_ARG_ENABLE(ecore-[]DOWN,
15 [--enable-ecore-[]DOWN],
16 [enable the ecore_[]DOWN module. [[default=disabled]]]
18 [ want_ecore_[]DOWN=$enableval ],
19 [ want_ecore_[]DOWN=no ])
22 AC_ARG_ENABLE(ecore-[]DOWN,
24 [--disable-ecore-[]DOWN],
25 [disable the ecore_[]DOWN module. [[default=enabled]]]
27 [ want_ecore_[]DOWN=$enableval ],
28 [ want_ecore_[]DOWN=yes ])
31 AC_MSG_CHECKING(whether ecore_[]DOWN module is to be built)
33 if test "x$want_ecore_[]DOWN" = "xyes" ; then
34 if test "x$3" = "x" -o "x$3" = "xyes" ; then
35 AC_DEFINE(BUILD_ECORE_[]UP, 1, [Build Ecore_$1 Module])
36 have_ecore_[]DOWN="yes"
37 ecore_[]DOWN[]_libs="-lecore_[]DOWN"
40 AC_MSG_RESULT([no (dependancy failed)])
46 AM_CONDITIONAL(BUILD_ECORE_[]UP, test "x$have_ecore_[]DOWN" = "xyes")
48 if test "x$have_ecore_[]DOWN" = "xyes" ; then
49 ifelse([$4], , :, [$4])
51 ifelse([$5], , :, [$5])
54 AC_SUBST(ecore_[]DOWN[]_cflags)
55 AC_SUBST(ecore_[]DOWN[]_libs)
61 dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
62 AC_DEFUN([ECORE_EVAS_CHECK_MODULE],
64 pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
65 pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl
67 have_ecore_evas_[]DOWN="no"
70 AC_ARG_ENABLE(ecore-$1,
72 [--enable-ecore-evas-$1],
73 [enable $3 support in the ecore_evas module.]
75 [ want_module=$enableval ]
77 AC_MSG_CHECKING(whether ecore_evas $3 support is to be built)
78 AC_MSG_RESULT($want_module)
80 if test "x$4" = "xyes" -a \
81 "x$have_ecore_evas" = "xyes" -a \
82 "x$want_module" = "xyes" ; then
83 PKG_CHECK_MODULES(EVAS_[]UP, evas-$1,
85 AC_DEFINE(BUILD_ECORE_EVAS_[]UP, 1, [Support for $3 Engine in Ecore_Evas])
86 have_ecore_evas_[]DOWN="yes";
91 if test "x$have_ecore_evas_[]DOWN" = "xyes" ; then
92 ifelse([$5], , :, [$5])
94 ifelse([$6], , :, [$6])