[libgepub] Don't link the library against GTK+



commit 41ec35d96d11341e55bce336554798ed12d11545
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 1 01:21:02 2016 +0200

    Don't link the library against GTK+
    
    Only link the test binary against GTK+, not the library.
    Otherwise it will get dragged in by dependency checkers in package
    managers.

 configure.ac      |   12 +++++++++++-
 tests/Makefile.am |    4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3e149c1..5bbf804 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,6 @@ AC_PROG_LIBTOOL
 PKG_CHECK_MODULES(GEPUB,
                   glib-2.0
                   gobject-2.0
-                  gtk+-3.0
                   gio-2.0
                   libxml-2.0
                   libarchive)
@@ -27,6 +26,17 @@ PKG_CHECK_MODULES(GEPUB,
 AC_SUBST(GEPUB_CFLAGS)
 AC_SUBST(GEPUB_LIBS)
 
+PKG_CHECK_MODULES(GEPUB_TESTS,
+                  glib-2.0
+                  gobject-2.0
+                  gtk+-3.0
+                  gio-2.0
+                  libxml-2.0
+                  libarchive)
+
+AC_SUBST(GEPUB_TESTS_CFLAGS)
+AC_SUBST(GEPUB_TESTS_LIBS)
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([
     Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 43c0319..b205ab4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -7,11 +7,11 @@ test_gepub_CPPFLAGS = \
        $(AM_CPPFLAGS)
 
 test_gepub_CFLAGS = \
-       $(GEPUB_CFLAGS) \
+       $(GEPUB_TESTS_CFLAGS) \
        $(WARN_CFLAGS) \
        $(AM_CFLAGS)
 
 test_gepub_LDADD = \
        $(top_builddir)/libgepub/libgepub.la \
-       $(GEPUB_LIBS) \
+       $(GEPUB_TESTS_LIBS) \
        $(GTK_LIBS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]