From 146346b1b55eb95d1c88a12dd286f0b818008444 Mon Sep 17 00:00:00 2001 From: Alexandre Rostovtsev Date: Wed, 2 Oct 2013 15:54:42 -0400 Subject: [PATCH] tests: fix underlinking https://bugs.freedesktop.org/show_bug.cgi?id=70051 --- Makefile.am | 5 ++++- configure.ac | 7 +++++++ test/Makefile.am | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9794eb1..cc880a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,9 +18,12 @@ SUBDIRS= \ $(GTK_SUBDIRS) \ $(VIVI_SUBDIRS) \ data \ - test \ tools +if HAVE_GMODULE +SUBDIRS+=test +endif + ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST=depcomp \ diff --git a/configure.ac b/configure.ac index f7375fc..6cd3e70 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,13 @@ AC_SUBST(GLIB_GENMARSHAL) GLIB_MKENUMS=glib-mkenums AC_SUBST(GLIB_MKENUMS) +dnl gmodule is needed for tests +PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_VER, HAVE_GMODULE=yes, HAVE_GMODULE=no) +if test "$HAVE_GMODULE" = "no"; then + AC_MSG_WARN([gmodule-2.0 >= $GLIB_VER not found; tests will be disabled]) +fi +AM_CONDITIONAL(HAVE_GMODULE, [test "x$HAVE_GMODULE" = xyes]) + PANGO_VER=1.16 PKG_CHECK_MODULES(PANGO, pangocairo >= $PANGO_VER, HAVE_PANGO=yes, HAVE_PANGO=no) if test "$HAVE_PANGO" = "no"; then diff --git a/test/Makefile.am b/test/Makefile.am index 886f980..341aee5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -49,8 +49,8 @@ noinst_HEADERS = \ swfdec_test_test.h \ swfdec_test_utils.h -swfdec_test_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) -swfdec_test_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS) $(CAIRO_LIBS) +swfdec_test_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) $(GMODULE_CFLAGS) +swfdec_test_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS) $(CAIRO_LIBS) $(GMODULE_LIBS) swfdec_test_function_list.h: $(swfdec_test_sources) (cd $(srcdir) \ -- 1.8.3.2