1 dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2 dnl That code is public domain and can be freely used or copied.
4 dnl Macro that check if building examples is wanted.
6 dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7 dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
9 AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
14 AC_ARG_ENABLE([build-examples],
15 [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_build_examples="yes"
20 _efl_enable_build_examples="no"
23 [_efl_enable_build_examples="no"])
25 AC_MSG_CHECKING([whether examples are built])
26 AC_MSG_RESULT([${_efl_enable_build_examples}])
28 AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
30 AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
34 dnl Macro that check if installing examples is wanted.
36 dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
37 dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
39 AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
44 AC_ARG_ENABLE([install-examples],
45 [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
47 if test "x${enableval}" = "xyes" ; then
48 _efl_enable_install_examples="yes"
50 _efl_enable_install_examples="no"
53 [_efl_enable_install_examples="no"])
55 AC_MSG_CHECKING([whether examples are installed])
56 AC_MSG_RESULT([${_efl_enable_install_examples}])
58 AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
60 AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
63 dnl End of efl_examples.m4