[vala/wip/valadate: 16/16] Don't hardcode gio-2.0 linker dependency



commit 6275a27e08327172e708936c13114d6796f355ca
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Sep 26 09:30:47 2016 +0200

    Don't hardcode gio-2.0 linker dependency

 configure.ac         |    5 +++++
 tests/Makefile.am    |    8 ++++++--
 valadate/Makefile.am |    6 ++----
 3 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4dcc616..871ffdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,11 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+PKG_CHECK_MODULES(GIO, gio-2.0 >= $GLIB_REQUIRED)
+
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
 
 AC_SUBST(GMODULE_CFLAGS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8dbfd27..e36d4d2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,20 +18,22 @@ valadatetests_SOURCES = \
 
 valadatetests_LDADD = \
        $(GLIB_LIBS) \
+       $(GIO_LIBS) \
        $(GMODULE_LIBS) \
-       -lgio-2.0 \
        -lm \
        $(top_srcdir)/valadate/libvaladate.la
        
 valadatetests_CPPFLAGS = \
        -I$(top_srcdir)/valadate \
        $(GLIB_CPPFLAGS) \
+       $(GIO_CFLAGS) \
        $(GMODULE_CPPFLAGS) \
        -fPIE
        
 valadatetests_CFLAGS = \
        -I$(top_srcdir)/valadate \
        $(GLIB_CFLAGS) \
+       $(GIO_CFLAGS) \
        $(GMODULE_CFLAGS) \
        -pie \
        -g
@@ -52,20 +54,22 @@ valactests@PACKAGE_SUFFIX@_SOURCES = \
 
 valactests@PACKAGE_SUFFIX@_LDADD = \
        $(GLIB_LIBS) \
+       $(GIO_LIBS) \
        $(GMODULE_LIBS) \
-       -lgio-2.0 \
        -lm \
        $(top_srcdir)/valadate/libvaladate.la
        
 valactests@PACKAGE_SUFFIX@_CPPFLAGS = \
        -I$(top_srcdir)/valadate \
        $(GLIB_CPPFLAGS) \
+       $(GIO_CFLAGS) \
        $(GMODULE_CPPFLAGS) \
        -fPIE
        
 valactests@PACKAGE_SUFFIX@_CFLAGS = \
        -I$(top_srcdir)/valadate \
        $(GLIB_CFLAGS) \
+       $(GIO_CFLAGS) \
        $(GMODULE_CFLAGS) \
        -pie \
        -g
diff --git a/valadate/Makefile.am b/valadate/Makefile.am
index 58393ef..250751d 100644
--- a/valadate/Makefile.am
+++ b/valadate/Makefile.am
@@ -32,9 +32,9 @@ libvaladate_la_VALAFLAGS = \
        -g \
        $(NULL)
 
-
 libvaladate_la_CFLAGS = \
        $(GLIB_CFLAGS) \
+       $(GIO_CFLAGS) \
        $(GMODULE_CFLAGS) \
        $(NULL)
 
@@ -47,7 +47,6 @@ libvaladate_la_CPPFLAGS = \
        -I$(top_srcdir)/ccode \
        $(NULL)
 
-
 libvaladate_la_LDFLAGS = \
        -export-dynamic \
        -shared \
@@ -57,8 +56,8 @@ libvaladate_la_LIBADD = \
        $(top_builddir)/codegen/libvala@PACKAGE_SUFFIX@.la \
        $(COVERAGE_LIBS) \
        $(GLIB_LIBS) \
+       $(GIO_LIBS) \
        $(GMODULE_LIBS) \
-       -lgio-2.0 \
        $(NULL)
 
 libvaladateincludedir = $(includedir)/vala@PACKAGE_SUFFIX@
@@ -75,7 +74,6 @@ CLEANFILES = \
        valadate.h \
        $(NULL)
        
-
 MAINTAINERCLEANFILES = \
        valadate.vapi \
        valadate.h \


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