EFL 1.7 svn doobies
[profile/ivi/eina.git] / m4 / common / efl_benchmark.m4
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.
3
4 dnl Macro that check if benchmark support is wanted.
5
6 dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7 dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK
8
9 AC_DEFUN([EFL_CHECK_BENCHMARK],
10 [
11
12 dnl configure option
13
14 AC_ARG_ENABLE([benchmark],
15    [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])],
16    [
17     if test "x${enableval}" = "xyes" ; then
18        _efl_enable_benchmark="yes"
19     else
20        _efl_enable_benchmark="no"
21     fi
22    ],
23    [_efl_enable_benchmark="no"])
24
25 AC_MSG_CHECKING([whether benchmark are built])
26 AC_MSG_RESULT([${_efl_enable_benchmark}])
27
28 AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes")
29
30 AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2])
31 ])
32
33 dnl End of efl_benchmark.m4