[Spice-devel] build-sys: Add configure option to enable statistics

Submitted by Pavel Grunt on Nov. 29, 2016, 8:38 a.m.

Details

Message ID 20161129083827.676-1-pgrunt@redhat.com
State Accepted
Commit 06cb7378ade43a0834e69076643a00b4663230aa
Headers show
Series "build-sys: Add configure option to enable statistics" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Pavel Grunt Nov. 29, 2016, 8:38 a.m.
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(-)

Patch hide | download patch | download mbox

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

Comments

Thanks :)

Acked-by: Christophe Fergeau <cfergeau@redhat.com>

On Tue, Nov 29, 2016 at 09:38:27AM +0100, Pavel Grunt wrote:
> 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel