summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-18 07:12:38 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-18 07:12:38 +0000
commit4ae8b8cf8617ffcc2f82576ca586cff91f5fdda3 (patch)
tree2e7323a4f7f7ae08addcfed16795cc96ef5d39bd /configure.ac
parent766a0c790d31795a2eaa51f9e7981b13eeb378a7 (diff)
merge: do not use recursive make for unit tests
SVN revision: 79413
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac113
1 files changed, 76 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac
index 510b3d1ed5..e2d1b852a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,44 @@ VMAJ=v_maj
49AC_SUBST([VMAJ]) 49AC_SUBST([VMAJ])
50 50
51 51
52#### Additional options to configure
53
54AC_ARG_WITH([profile],
55 [AC_HELP_STRING([--with-profile=PROFILE],
56 [use the predefined build profile, one of: dev, debug and release.
57 @<:@default=dev@:>@])],
58 [build_profile=${withval}],
59 [build_profile=dev])
60
61case "${build_profile}" in
62 dev|debug|release)
63 ;;
64 *)
65 AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
66 ;;
67esac
68
69prefer_assert="no"
70case "${build_profile}" in
71 dev|debug)
72 prefer_assert="yes"
73 ;;
74esac
75
76# TODO: add some build "profile" (server, full, etc...)
77
78AC_ARG_ENABLE([coverage],
79 [AC_HELP_STRING([--enable-coverage], [enable unit testing coverage. @<:@default==disabled@:>@])],
80 [
81 if test "x${enableval}" = "xyes" ; then
82 want_coverage="yes"
83 else
84 want_coverage="no"
85 fi
86 ],
87 [want_coverage="no"])
88
89
52#### Default values 90#### Default values
53 91
54requirements_libs_evil="" 92requirements_libs_evil=""
@@ -193,26 +231,6 @@ AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
193AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"]) 231AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
194 232
195 233
196#### Additional options to configure
197
198AC_ARG_WITH([profile],
199 [AC_HELP_STRING([--with-profile=PROFILE],
200 [use the predefined build profile, one of: dev, debug and release.
201 @<:@default=dev@:>@])],
202 [build_profile=${withval}],
203 [build_profile=dev])
204
205case "${build_profile}" in
206 dev|debug|release)
207 ;;
208 *)
209 AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
210 ;;
211esac
212
213# TODO: add some build "profile" (server, full, etc...)
214
215
216#### Checks for programs 234#### Checks for programs
217 235
218### libtool 236### libtool
@@ -274,9 +292,42 @@ fi
274 292
275EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) 293EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
276 294
295# lcov
296
297_efl_enable_coverage="no"
298if test "x${want_coverage}" = "xyes" ; then
299 AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
300 if test "x${have_lcov}" = "xyes" ; then
301 EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
302 EFL_COV_LIBS="${EFL_COV_LIBS} -lgcov"
303 if test "x${prefer_assert}" = "xno"; then
304 EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -DNDEBUG"
305 else
306 EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -g -O0 -DDEBUG"
307 fi
308 _efl_enable_coverage="yes"
309 else
310 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
311 fi
312fi
313
314AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "x${_efl_enable_coverage}" = "xyes"])
315
316AC_SUBST([EFL_COV_CFLAGS])
317AC_SUBST([EFL_COV_LIBS])
318
277 319
278#### Checks for libraries 320#### Checks for libraries
279 321
322# check unit testing library
323
324PKG_CHECK_MODULES([CHECK],
325 [check >= 0.9.5],
326 [_efl_enable_tests="yes"],
327 [_efl_enable_tests="no"])
328
329AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
330
280 331
281#### Checks for header files 332#### Checks for header files
282 333
@@ -569,17 +620,6 @@ fi
569 620
570AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) 621AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
571 622
572## Tests
573
574prefer_assert="no"
575case "$build_profile" in
576 dev|debug)
577 prefer_assert="yes"
578 ;;
579esac
580
581EFL_CHECK_TESTS(EINA)
582
583## Benchmarks 623## Benchmarks
584 624
585PKG_CHECK_MODULES([GLIB], 625PKG_CHECK_MODULES([GLIB],
@@ -1829,11 +1869,6 @@ src/examples/eet/Makefile
1829src/examples/eo/Makefile 1869src/examples/eo/Makefile
1830src/examples/evas/Makefile 1870src/examples/evas/Makefile
1831src/lib/eina/eina_config.h 1871src/lib/eina/eina_config.h
1832src/tests/Makefile
1833src/tests/eina/Makefile
1834src/tests/eet/Makefile
1835src/tests/eo/Makefile
1836src/tests/evas/Makefile
1837spec/efl.spec 1872spec/efl.spec
1838pc/evil.pc 1873pc/evil.pc
1839pc/eina.pc 1874pc/eina.pc
@@ -1950,7 +1985,11 @@ echo " Line Dither Mask........: $conv_line_dither"
1950echo " No Dither Mask for 16bpp: $conv_no_dither" 1985echo " No Dither Mask for 16bpp: $conv_no_dither"
1951echo " Tiled 32BPP rotate......: $have_tile_rotate" 1986echo " Tiled 32BPP rotate......: $have_tile_rotate"
1952echo 1987echo
1953echo "Tests..................: make check (Coverage: ${_efl_enable_coverage})" 1988echo "Tests..................: ${_efl_enable_tests}"
1989if test "x${_efl_enable_tests}" = "xyes"; then
1990echo " Coverage...........: ${_efl_enable_coverage}"
1991echo " Build and run......: make check"
1992fi
1954echo "Examples...............: make examples" 1993echo "Examples...............: make examples"
1955echo " installation.......: make install-examples" 1994echo " installation.......: make install-examples"
1956if test "x${build_doc}" = "xyes"; then 1995if test "x${build_doc}" = "xyes"; then