Follow up to 5fba8dd1a346248f215f0167d113fb20a7bb733a to make it easier to enable them --- Suggested by Christophe in: https://lists.freedesktop.org/archives/spice-devel/2016-November/033824.html --- .gitlab-ci.yml | 2 +- configure.ac | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 122e74c..77e2a08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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) diff --git a/configure.ac b/configure.ac index d36e27e..4fa4c83 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.10.2 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel