[Spice-devel] [spice-gtk] build-sys: Don't build tests when not building static libs

Marc-André Lureau mlureau at redhat.com
Mon Feb 17 03:54:29 PST 2014


ack

----- Original Message -----
> The tests rely on static linking in order to get access to symbols which
> are not exported in spice-gtk shared libraries. When build of static
> libraries is disabled with --disable-static, we should not attempt to build
> the tests as this will result in link errors.
> ---
>  Makefile.am  | 6 +++++-
>  configure.ac | 2 ++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index ab10f5f..8add19f 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,7 +1,11 @@
>  ACLOCAL_AMFLAGS = -I m4
>  NULL =
>  
> -SUBDIRS = spice-common gtk po doc data tests
> +SUBDIRS = spice-common gtk po doc data
> +
> +if BUILD_TESTS
> +SUBDIRS += tests
> +endif
>  
>  if HAVE_INTROSPECTION
>  if WITH_VALA
> diff --git a/configure.ac b/configure.ac
> index 24416a9..e2dd742 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -696,6 +696,8 @@ AC_SUBST(SPICE_GTK_REQUIRES)
>  
>  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
>  
> +AM_CONDITIONAL([BUILD_TESTS], [test x"$enable_static" = xyes])
> +
>  AC_OUTPUT([
>  Makefile
>  spice-client-glib-2.0.pc
> --
> 1.8.5.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list