forked from enlightenment/efl
use a macro for edje external support
SVN revision: 48211
This commit is contained in:
parent
c3673ba481
commit
00364256fd
|
@ -108,28 +108,7 @@ PKG_CHECK_EXISTS([evas-opengl-x11], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas Op
|
||||||
|
|
||||||
PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
|
PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
|
||||||
|
|
||||||
enable_edje_external="yes"
|
EFL_EDJE_EXTERNAL([have_edje_external="yes"], [have_edje_external="no"])
|
||||||
want_edje_external="auto"
|
|
||||||
AC_MSG_CHECKING([if should provide Edje EXTERNAL support...])
|
|
||||||
AC_ARG_ENABLE([edje-external],
|
|
||||||
[AC_HELP_STRING([--disable-edje-external], [disable providing Edje EXTERNAL support. @<:@default=detect@:>@])],
|
|
||||||
[want_edje_external=$enableval], [])
|
|
||||||
AC_MSG_RESULT([${enable_edje_external}])
|
|
||||||
if test "x$want_edje_external" != "xno"; then
|
|
||||||
PKG_CHECK_MODULES([EDJE_EXTERNAL],
|
|
||||||
[edje],
|
|
||||||
[enable_edje_external="yes"],
|
|
||||||
[enable_edje_external="no"]
|
|
||||||
)
|
|
||||||
else
|
|
||||||
enable_edje_external="no"
|
|
||||||
fi
|
|
||||||
if test "x$want_edje_external" = "xyes" -a "x$enable_edje_external" = "xno"; then
|
|
||||||
AC_MSG_ERROR([Edje EXTERNAL support requested, but Edje not found by pkg-config.])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(ENABLE_EDJE_EXTERNAL, test "x$enable_edje_external" = "xyes")
|
|
||||||
AC_SUBST(EDJE_EXTERNAL_CFLAGS)
|
|
||||||
AC_SUBST(EDJE_EXTERNAL_LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
### Checks for header files
|
### Checks for header files
|
||||||
|
@ -225,7 +204,7 @@ echo
|
||||||
echo " Build emotion_test...: $have_emotion_test"
|
echo " Build emotion_test...: $have_emotion_test"
|
||||||
echo " edje_cc..............: ${edje_cc}"
|
echo " edje_cc..............: ${edje_cc}"
|
||||||
echo
|
echo
|
||||||
echo " Edje EXTERNAL support: ${enable_edje_external}"
|
echo " Edje EXTERNAL support: ${have_edje_external}"
|
||||||
echo
|
echo
|
||||||
echo "Compilation............: make (or gmake)"
|
echo "Compilation............: make (or gmake)"
|
||||||
echo " CPPFLAGS.............: $CPPFLAGS"
|
echo " CPPFLAGS.............: $CPPFLAGS"
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
|
||||||
|
dnl That code is public domain and can be freely used or copied.
|
||||||
|
|
||||||
|
dnl Macro that check if edje external should be enabled or not
|
||||||
|
|
||||||
|
dnl Usage: EFL_EDJE_EXTERNAL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
dnl Call AC_SUBST(EDJE_EXTERNAL_CFLAGS)
|
||||||
|
dnl Call AC_SUBST(EDJE_EXTERNAL_LIBS)
|
||||||
|
dnl Define conditional ENABLE_EDJE_EXTERNAL
|
||||||
|
|
||||||
|
AC_DEFUN([EFL_EDJE_EXTERNAL],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([edje-external],
|
||||||
|
[AC_HELP_STRING([--disable-edje-external],
|
||||||
|
[disable providing Edje EXTERNAL support. @<:@default=enabled@:>@])],
|
||||||
|
[
|
||||||
|
if test "x${enableval}" = "xyes" ; then
|
||||||
|
_efl_want_edje_external="yes"
|
||||||
|
else
|
||||||
|
_efl_want_edje_external="no"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[_efl_want_edje_external="auto"])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if should provide Edje EXTERNAL support...])
|
||||||
|
AC_MSG_RESULT([${_efl_want_edje_external}])
|
||||||
|
|
||||||
|
_efl_enable_edje_external="no"
|
||||||
|
if ! test "x${_efl_want_edje_external}" = "xno" ; then
|
||||||
|
PKG_CHECK_MODULES([EDJE_EXTERNAL],
|
||||||
|
[edje],
|
||||||
|
[_efl_enable_edje_external="yes"],
|
||||||
|
[_efl_enable_edje_external="no"])
|
||||||
|
else
|
||||||
|
AC_SUBST(EDJE_EXTERNAL_CFLAGS)
|
||||||
|
AC_SUBST(EDJE_EXTERNAL_LIBS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x${_efl_want_edje_external}" = "xyes" && test "x${_efl_enable_edje_external}" = "xno" ; then
|
||||||
|
AC_MSG_ERROR([Edje EXTERNAL support requested, but Edje not found by pkg-config.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_EDJE_EXTERNAL], [test "x${_efl_enable_edje_external}" = "xyes"])
|
||||||
|
|
||||||
|
AS_IF([test "x${_efl_enable_edje_external}" = "xyes"], [$1], [$2])
|
||||||
|
|
||||||
|
])
|
Loading…
Reference in New Issue