From 2de27d2b0fcab8ffcb85e9a200cdef7815a501b7 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 6 Jun 2014 19:27:42 +0200 Subject: [PATCH] Add cairo dependencies to GTK_TEST in configure https://bugs.freedesktop.org/show_bug.cgi?id=79411 --- configure.ac | 13 +++++++++---- test/Makefile.am | 8 -------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 4d55bec..49e5339 100644 --- a/configure.ac +++ b/configure.ac @@ -465,6 +465,7 @@ fi CAIRO_VERSION="1.10.0" AC_SUBST(CAIRO_VERSION) +CAIRO_DEPS="cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION)" AC_ARG_ENABLE(cairo-output, AC_HELP_STRING([--disable-cairo-output], [Don't build the cairo graphics backend.]), @@ -472,9 +473,9 @@ AC_ARG_ENABLE(cairo-output, enable_cairo_output="try") use_cairo="" if test x$enable_cairo_output = xyes; then - PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION) + PKG_CHECK_MODULES(CAIRO, $CAIRO_DEPS) elif test x$enable_cairo_output = xtry; then - PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION, + PKG_CHECK_MODULES(CAIRO, $CAIRO_DEPS, [enable_cairo_output="yes"], [enable_cairo_output="no" use_cairo="no (requires cairo >= $CAIRO_VERSION)"]) @@ -699,15 +700,19 @@ fi AM_CONDITIONAL(BUILD_POPPLER_CPP, test "x$enable_poppler_cpp" = "xyes") +GTK_TEST_DEPS='gtk+-3.0 >= 3.8 gdk-pixbuf-2.0' +if test x$enable_cairo_output = xyes; then + GTK_TEST_DEPS="$GTK_TEST_DEPS $CAIRO_DEPS" +fi AC_ARG_ENABLE(gtk-test, AC_HELP_STRING([--disable-gtk-test], [Don't compile GTK+ test program.]), enable_gtk_test=$enableval, enable_gtk_test="try") if test x$enable_gtk_test = xyes; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.8 gdk-pixbuf-2.0) + PKG_CHECK_MODULES(GTK_TEST, $GTK_TEST_DEPS) elif test x$enable_gtk_test = xtry; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.8 gdk-pixbuf-2.0, + PKG_CHECK_MODULES(GTK_TEST, $GTK_TEST_DEPS, [enable_gtk_test="yes"], [enable_gtk_test="no"]) fi diff --git a/test/Makefile.am b/test/Makefile.am index af5bcf2..89bebb1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -12,10 +12,6 @@ if BUILD_CAIRO_OUTPUT pdf_inspector = \ pdf_inspector -cairo_includes = \ - $(CAIRO_CFLAGS) \ - $(FREETYPE_CFLAGS) - endif gtk_test = \ @@ -38,7 +34,6 @@ INCLUDES = \ -I$(top_srcdir)/poppler \ -I$(top_srcdir)/glib \ -I$(top_builddir)/glib \ - $(cairo_includes) \ $(GTK_TEST_CFLAGS) noinst_PROGRAMS = $(pdf_inspector) $(perf_test) $(pdf_fullrewrite) $(gtk_test) @@ -51,7 +46,6 @@ gtk_test_SOURCES = \ gtk_test_LDADD = \ $(top_builddir)/poppler/libpoppler.la \ $(top_builddir)/glib/libpoppler-glib.la \ - $(CAIRO_LIBS) \ $(GTK_TEST_LIBS) \ $(PTHREAD_LIBS) @@ -62,8 +56,6 @@ pdf_inspector_SOURCES = \ pdf_inspector_LDADD = \ $(top_builddir)/poppler/libpoppler-cairo.la \ $(top_builddir)/poppler/libpoppler.la \ - $(CAIRO_LIBS) \ - $(FREETYPE_LIBS) \ $(GTK_TEST_LIBS) \ $(X_EXTRA_LIBS) \ $(PTHREAD_LIBS) -- 1.8.3.2