build-sys: Add configure option to enable statistics

Follow up to 5fba8dd1a3
to make it easier to enable them

Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Pavel Grunt 2016-11-29 09:38:27 +01:00 committed by Frediano Ziglio
parent cb3216aa83
commit 06cb7378ad
2 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,7 @@ makecheck:
statistics:
script:
- CFLAGS="$CFLAGS -DRED_STATISTICS " ./autogen.sh
- ./autogen.sh --enable-statistics
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)

View File

@ -218,6 +218,11 @@ AM_CONDITIONAL([BUILD_MANUAL], [test -n "$ASCIIDOC" || test -n "$A2X"])
AM_CONDITIONAL([BUILD_HTML_MANUAL], [test -n "$ASCIIDOC"])
AM_CONDITIONAL([BUILD_CHUNKED_MANUAL], [test -n "$A2X"])
AC_ARG_ENABLE([statistics],
AS_HELP_STRING([--enable-statistics=@<:@yes/no@:>@],
[Build SPICE with statistic code enabled @<:@default=no@:>@]))
AS_IF([test "$enable_statistics" = "yes"],
[AC_DEFINE([RED_STATISTICS], [1], [Enable SPICE statistics])])
dnl ===========================================================================
dnl check compiler flags