[Spice-commits] Makefile.am configure.ac

Christophe Fergau teuf at kemper.freedesktop.org
Thu Feb 20 02:52:54 PST 2014


 Makefile.am  |    6 +++++-
 configure.ac |    2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit aece5f02f62d6d482404c78abda2e58c168f54d6
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri Feb 14 14:25:32 2014 +0100

    build-sys: Don't build tests when not building static libs
    
    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.

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


More information about the Spice-commits mailing list