forked from enlightenment/efl
Eina: fix CFLAGS value when --enable-assert is used
SVN revision: 73112
This commit is contained in:
parent
ad0427d107
commit
ffc3e8ea82
|
@ -1,14 +0,0 @@
|
|||
m4_ifndef([AC_HEADER_ASSERT], [
|
||||
# AC_HEADER_ASSERT
|
||||
# ----------------
|
||||
# Check whether to enable assertions.
|
||||
AC_DEFUN([AC_HEADER_ASSERT],
|
||||
[
|
||||
AC_MSG_CHECKING([whether to enable assertions])
|
||||
AC_ARG_ENABLE([assert],
|
||||
[ --disable-assert turn off assertions],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
|
||||
[AC_MSG_RESULT(yes)])
|
||||
])
|
||||
])
|
|
@ -229,6 +229,19 @@ if test "x${have_stringshare_usage}" = "xyes"; then
|
|||
AC_DEFINE(EINA_STRINGSHARE_USAGE, 1, [Report Eina stringshare usage pattern])
|
||||
fi
|
||||
|
||||
# Assert or fail.
|
||||
|
||||
AC_ARG_ENABLE([assert],
|
||||
[AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
prefer_assert="yes"
|
||||
else
|
||||
prefer_assert="no"
|
||||
fi
|
||||
],
|
||||
[prefer_assert="no"])
|
||||
|
||||
# Check if we want to benchmark on real data
|
||||
enable_benchmark_e17="no"
|
||||
AC_ARG_ENABLE([e17],
|
||||
|
|
|
@ -44,17 +44,17 @@ if test "x${_efl_enable_tests}" = "xyes" ; then
|
|||
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
|
||||
m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
|
||||
# remove any optimisation flag and force debug symbols
|
||||
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
|
||||
if test "x${prefer_assert}" = "xno"; then
|
||||
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
|
||||
else
|
||||
m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
|
||||
fi
|
||||
efl_enable_coverage="yes"
|
||||
else
|
||||
AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Substitution
|
||||
AC_SUBST(EFL_COVERAGE_CFLAGS)
|
||||
AC_SUBST(EFL_COVERAGE_LIBS)
|
||||
|
||||
AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
|
||||
|
||||
AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
|
||||
|
|
Loading…
Reference in New Issue