[libgweather] configure: consolidate dependencies in one pkg-config call



commit 8a175670f2a818727831d4274801703595141683
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Mar 5 21:50:21 2014 +0100

    configure: consolidate dependencies in one pkg-config call
    
    Makes it easier for unexperienced contributors to patch configure.ac

 configure.ac            |   17 +++++------------
 libgweather/Makefile.am |   18 +++++-------------
 2 files changed, 10 insertions(+), 25 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 68f48ec..bbd37e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,18 +57,11 @@ GLIB_GSETTINGS
 
 GNOME_COMPILE_WARNINGS([maximum])
 
-dnl -- Check for GTK+ 3.0 (required) ------------------------------------------
-PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)
-
-dnl -- Check for libxml (required) ------------------------------------------
-PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
-
-dnl -- check for libsoup (required) -----------------------------------------
-PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= $LIBSOUP_REQUIRED])
-
-dnl -- check for glib and gio (required) -----------------------------------------
-PKG_CHECK_MODULES(GIO,
-                 [glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED])
+PKG_CHECK_MODULES(DEPS, [gtk+-3.0 >= $GTK_REQUIRED
+                         libxml-2.0 >= $LIBXML_REQUIRED
+                         libsoup-2.4 >= $LIBSOUP_REQUIRED
+                         glib-2.0 >= $GLIB_REQUIRED
+                         gio-2.0])
 
 dnl -- check for glib; redundant at this point, but sets $GLIB_MKENUMS
 AM_PATH_GLIB_2_0($GLIB_REQUIRED)
diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
index 74f5575..e6b4595 100644
--- a/libgweather/Makefile.am
+++ b/libgweather/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libgweather-internal-3.la
 noinst_PROGRAMS = test_metar test_locations test_sun_moon
 
 AM_CPPFLAGS =                  \
-       $(GTK_CFLAGS)           \
+       $(DEPS_CFLAGS)          \
        -I$(top_srcdir)         \
        -I$(srcdir)
 
@@ -37,19 +37,13 @@ libgweather_internal_3_la_SOURCES = \
 
 libgweather_internal_3_la_CPPFLAGS = \
        $(AM_CPPFLAGS)                  \
-       $(LIBXML_CFLAGS)                \
-       $(LIBSOUP_CFLAGS)               \
-       $(GIO_CFLAGS)                   \
        -DG_LOG_DOMAIN=\"GWeather\"     \
        -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
        -DGWEATHER_XML_LOCATION_DIR=\""$(pkgdatadir)"\"
 
 libgweather_internal_3_la_LIBADD = \
        $(LIBM)         \
-       $(GTK_LIBS)     \
-       $(LIBXML_LIBS)  \
-       $(LIBSOUP_LIBS) \
-       $(GIO_LIBS) \
+       $(DEPS_LIBS)    \
        $(REGEX_LIBS)
 
 libgweather_3_la_SOURCES = 
@@ -59,15 +53,13 @@ libgweather_3_la_LDFLAGS = \
        -version-info $(LT_VERSION) -no-undefined
 
 test_metar_SOURCES = test_metar.c
-test_metar_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSOUP_CFLAGS)
-test_metar_LDADD = libgweather-internal-3.la $(GTK_LIBS)
+test_metar_LDADD = libgweather-internal-3.la $(DEPS_LIBS)
 
 test_locations_SOURCES = test_locations.c
-test_locations_LDADD = libgweather-3.la $(GTK_LIBS)
+test_locations_LDADD = libgweather-3.la $(DEPS_LIBS)
 
 test_sun_moon_SOURCES = test_sun_moon.c
-test_sun_moon_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSOUP_CFLAGS)
-test_sun_moon_LDADD = libgweather-internal-3.la $(GTK_LIBS)
+test_sun_moon_LDADD = libgweather-internal-3.la $(DEPS_LIBS)
 
 gweather-enum-types.h: $(gweather_new_headers)
        $(AM_V_GEN)( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.h.tmpl \


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