aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/m4/efl_examples.m4
blob: 2a809adff58c1823e3116bd467b6ca27411ddacb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
dnl Copyright (C) 2008 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 building examples is wanted.

dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES

AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
[

dnl configure option

AC_ARG_ENABLE([build-examples],
   [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
   [
    if test "x${enableval}" = "xyes" ; then
       _efl_enable_build_examples="yes"
    else
       _efl_enable_build_examples="no"
    fi
   ],
   [_efl_enable_build_examples="no"])

AC_MSG_CHECKING([whether examples are built])
AC_MSG_RESULT([${_efl_enable_build_examples}])

AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")

AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
])


dnl Macro that check if installing examples is wanted.

dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES

AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
[

dnl configure option

AC_ARG_ENABLE([install-examples],
   [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
   [
    if test "x${enableval}" = "xyes" ; then
       _efl_enable_install_examples="yes"
    else
       _efl_enable_install_examples="no"
    fi
   ],
   [_efl_enable_install_examples="no"])

AC_MSG_CHECKING([whether examples are installed])
AC_MSG_RESULT([${_efl_enable_install_examples}])

AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")

AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
])

dnl End of efl_examples.m4