Enlightenment CVS committal Author : doursse Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/m4 Modified Files: ecore_check_module.m4 Log Message: add ECORE_EVAS_CHECK_MODULE m4 macro to check availability of an ecore evas module =================================================================== RCS file: /cvs/e/e17/libs/ecore/m4/ecore_check_module.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ecore_check_module.m4 4 Nov 2007 19:34:06 -0000 1.3 +++ ecore_check_module.m4 17 Jul 2008 05:40:08 -0000 1.4 @@ -43,7 +43,7 @@ AC_MSG_RESULT([no]) fi -AM_CONDITIONAL(BUILD_ECORE_[]UP, test $have_ecore_[]DOWN = yes) +AM_CONDITIONAL(BUILD_ECORE_[]UP, test "x$have_ecore_[]DOWN" = "xyes") if test "x$have_ecore_[]DOWN" = "xyes" ; then ifelse([$4], , :, [$4]) @@ -53,6 +53,46 @@ AC_SUBST(ecore_[]DOWN[]_cflags) AC_SUBST(ecore_[]DOWN[]_libs) + +popdef([UP]) +popdef([DOWN]) +]) + +dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([ECORE_EVAS_CHECK_MODULE], +[ +pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl +pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl + +have_ecore_evas_[]DOWN="no" +want_module="$2" + +AC_ARG_ENABLE(ecore-$1, + AC_HELP_STRING( + [--enable-ecore-evas-$1], + [enable $3 support in the ecore_evas module.] + ), + [ want_module=$enableval ] +) +AC_MSG_CHECKING(whether ecore_evas $3 support is to be built) +AC_MSG_RESULT($want_module) + +if test "x$4" = "xyes" -a \ + "x$have_ecore_evas" = "xyes" -a \ + "x$want_module" = "xyes" ; then + PKG_CHECK_MODULES(EVAS_[]UP, evas-$1, + [ + AC_DEFINE(BUILD_ECORE_EVAS_[]UP, 1, [Support for $3 Engine in Ecore_Evas]) + have_ecore_evas_[]DOWN="yes"; + ] + ) +fi + +if test "x$have_ecore_evas_[]DOWN" = "xyes" ; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi popdef([UP]) popdef([DOWN]) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs