Split up pkg-config dependencies
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 1 Jul 2010 14:46:21 +0000 (15:46 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 1 Jul 2010 16:43:17 +0000 (17:43 +0100)
backends/telepathy/Makefile.am
configure.ac
folks/Makefile.am

index a06b200..8719e99 100644 (file)
@@ -2,7 +2,6 @@ GEN_INTROSPECT = $(shell pkg-config vala-1.0 --variable="gen_introspect")
 VAPIGEN = $(shell pkg-config vala-1.0 --variable="vapigen")
 
 AM_CPPFLAGS = \
-       $(LIBFOLKS_CFLAGS) \
        -I$(top_srcdir)/folks \
        -include $(CONFIG_HEADER) \
        -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
@@ -39,7 +38,10 @@ libtp_lowlevel_la_SOURCES = \
        $(NULL)
 
 libtp_lowlevel_la_CPPFLAGS = \
-       $(LIBTP_LOWLEVEL_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_GLIB_CFLAGS) \
+       $(AM_CPPFLAGS) \
        $(NULL)
 
 # the -shared and -rpath arguments are to force it to be compiled to a .so,
@@ -47,12 +49,15 @@ libtp_lowlevel_la_CPPFLAGS = \
 # vala-gen-introspect)
 libtp_lowlevel_la_LDFLAGS = \
        -shared -rpath $(libdir) \
-       $(LIBTP_LOWLEVEL_LIBS) \
+       $(GLIB_LIBS) \
+       $(TP_GLIB_LIBS) \
        $(NULL)
 
 tp-lowlevel.gi: $(libtp-lowlevel_la_SOURCES) libtp-lowlevel.la
        $(VGI_V)$(GEN_INTROSPECT) --namespace=Folks tp-lowlevel.h \
                $(shell pkg-config telepathy-glib --cflags) \
+               $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS) $(GEE_CFLAGS) \
+               $(TP_VALA_CFLAGS) -I$(top_srcdir)/folks \
                .libs/libtp-lowlevel.so > tp-lowlevel.gi
 
 tp-lowlevel.vapi: tp-lowlevel.gi tp-lowlevel.metadata
@@ -85,13 +90,18 @@ libfolks_telepathy_la_SOURCES = \
        $(NULL)
 
 libfolks_telepathy_la_CPPFLAGS = \
-       $(LIBFOLKS_TELEPATHY_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_VALA_CFLAGS) \
        $(AM_CPPFLAGS) \
        $(NULL)
 
 libfolks_telepathy_la_LIBADD = \
-       $(LIBFOLKS_TELEPATHY_LIBS) \
-       $(LIBFOLKS_LIBS) \
+       $(GLIB_LIBS) \
+       $(DBUS_GLIB_LIBS) \
+       $(GEE_LIBS) \
+       $(TP_VALA_LIBS) \
        $(NULL)
 
 folks_telepathy_includedir = $(includedir)/folks
@@ -134,13 +144,18 @@ libfolks_backend_telepathy_la_SOURCES = \
        $(NULL)
 
 libfolks_backend_telepathy_la_CPPFLAGS = \
-       $(LIBFOLKS_BACKEND_TELEPATHY_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_VALA_CFLAGS) \
        $(AM_CPPFLAGS) \
        $(NULL)
 
 libfolks_backend_telepathy_la_LIBADD = \
-       $(LIBFOLKS_BACKEND_TELEPATHY_LIBS) \
-       $(LIBFOLKS_LIBS) \
+       $(GLIB_LIBS) \
+       $(DBUS_GLIB_LIBS) \
+       $(GEE_LIBS) \
+       $(TP_VALA_LIBS) \
        -L$(abs_top_srcdir)/backends/telepathy/.libs \
        -lfolks-telepathy \
        $(NULL)
index 6168f47..712f194 100644 (file)
@@ -54,19 +54,34 @@ AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
 GTK_DOC_CHECK([1.10])
 
+# -----------------------------------------------------------
+# Dependencies
+# -----------------------------------------------------------
 GLIB_REQUIRED=2.12.0
 TP_GLIB_REQUIRED=0.11.4.1
 TP_VALA_REQUIRED=0.11.4.1
 
-PKG_CHECK_MODULES(LIBFOLKS,
+PKG_CHECK_MODULES(GLIB,
                   glib-2.0 >= $GLIB_REQUIRED
-                  gobject-2.0 >= $GLIB_REQUIRED
-                  dbus-glib-1
-                  gee-1.0
-                  telepathy-vala >= $TP_VALA_REQUIRED
-                  )
-AC_SUBST(LIBFOLKS_CFLAGS)
-AC_SUBST(LIBFOLKS_LIBS)
+                  gobject-2.0 >= $GLIB_REQUIRED)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+
+PKG_CHECK_MODULES(GEE, gee-1.0)
+AC_SUBST(GEE_CFLAGS)
+AC_SUBST(GEE_LIBS)
+
+PKG_CHECK_MODULES(TP_VALA, telepathy-vala >= $TP_VALA_REQUIRED)
+AC_SUBST(TP_VALA_CFLAGS)
+AC_SUBST(TP_VALA_LIBS)
+
+PKG_CHECK_MODULES(TP_GLIB, telepathy-glib >= $TP_GLIB_REQUIRED)
+AC_SUBST(TP_GLIB_CFLAGS)
+AC_SUBST(TP_GLIB_LIBS)
 
 # -----------------------------------------------------------
 # Documentation
@@ -83,37 +98,6 @@ AS_IF([test "x$enable_docs" != xno],
      [AC_MSG_ERROR([valadoc not found])])])
 
 # -----------------------------------------------------------
-# Telepathy backend
-# -----------------------------------------------------------
-PKG_CHECK_MODULES(LIBFOLKS_TELEPATHY,
-                  glib-2.0 >= $GLIB_REQUIRED
-                  gobject-2.0 >= $GLIB_REQUIRED
-                  dbus-glib-1
-                  gee-1.0
-                  telepathy-vala >= $TP_VALA_REQUIRED
-                  )
-AC_SUBST(LIBFOLKS_TELEPATHY_CFLAGS)
-AC_SUBST(LIBFOLKS_TELEPATHY_LIBS)
-
-PKG_CHECK_MODULES(LIBFOLKS_BACKEND_TELEPATHY,
-                  glib-2.0 >= $GLIB_REQUIRED
-                  gobject-2.0 >= $GLIB_REQUIRED
-                  dbus-glib-1
-                  gee-1.0
-                  telepathy-vala >= $TP_VALA_REQUIRED
-                  )
-AC_SUBST(LIBFOLKS_BACKEND_TELEPATHY_CFLAGS)
-AC_SUBST(LIBFOLKS_BACKEND_TELEPATHY_LIBS)
-
-PKG_CHECK_MODULES(LIBTP_LOWLEVEL,
-                  glib-2.0 >= $GLIB_REQUIRED
-                  gobject-2.0 >= $GLIB_REQUIRED
-                  telepathy-glib >= $TP_GLIB_REQUIRED
-                  )
-AC_SUBST(LIBTP_LOWLEVEL_CFLAGS)
-AC_SUBST(LIBTP_LOWLEVEL_LIBS)
-
-# -----------------------------------------------------------
 # Error flags
 # -----------------------------------------------------------
 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
index 7d553e9..8e53d1a 100644 (file)
@@ -5,7 +5,6 @@ sharedir = $(datadir)/folks
 backenddir = $(libdir)/folks
 
 AM_CPPFLAGS = \
-       $(LIBFOLKS_CFLAGS) \
        -include $(CONFIG_HEADER) \
        -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
        -DDATA_DIR=\"$(shareddir)\" \
@@ -43,8 +42,18 @@ libfolks_la_SOURCES = \
        $(libfolks_la_VALASOURCES:.vala=.c) \
        $(NULL)
 
+libfolks_la_CFLAGS = \
+       $(GLIB_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_VALA_CFLAGS) \
+       $(NULL)
+
 libfolks_la_LIBADD = \
-       $(LIBFOLKS_LIBS) \
+       $(GLIB_LIBS) \
+       $(DBUS_GLIB_LIBS) \
+       $(GEE_LIBS) \
+       $(TP_VALA_LIBS) \
        $(NULL)
 
 folksdir = $(includedir)/folks