diff options
author | Colin Walters <walters@verbum.org> | 2012-10-31 20:21:32 +0100 |
---|---|---|
committer | Pavel Šimerda <psimerda@redhat.com> | 2012-10-31 21:08:18 +0100 |
commit | 1977fb6c4912f055ce05fcd5da354ce1be39c01e (patch) | |
tree | c751b59c4418496dc66460647765aa5b25b2cfb7 /libnm-glib/Makefile.am | |
parent | 59f2cd0f8d9a934b47822dcf31015d2aedeaea35 (diff) | |
download | NetworkManager-1977fb6c4912f055ce05fcd5da354ce1be39c01e.tar.gz |
build: clean up GLib-related pkg-config usage (bgo #687218)
We had separate checks for glib-2.0, gobject-2.0, gmodule-2.0, and
gio-unix-2.0. It doesn't make sense to link a binary against all 4
because gio-unix-2.0 depends on glib-2.0 and gobject-2.0. Doing this
actually breaks things in unusual circumstances.
Generally, few bits of NM actually just use glib, and not gio. We
might as well coalesce those requirements together, even if it means
in some cases we "overlink". Additionally, I chose for now to fold
gmodule-2.0 in as well, even though many fewer programs need it. The
cost of overlinking is quite small.
The benefit of this is less repeated junk in Makefile.am, as well as
more centralized control over GLib. A followup patch will allow us to
set -DGLIB_VERSION_MIN_REQUIRED in just one place, rather than having
to replicate it 4 times.
The NM configure is still suboptimal - for example, libpolkit-1
depends on gio-2.0, so really we should determine the compiler flags
all in one pass. But it doesn't matter too much for now.
Diffstat (limited to 'libnm-glib/Makefile.am')
-rw-r--r-- | libnm-glib/Makefile.am | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am index 600b04055a..9b6c1f57d0 100644 --- a/libnm-glib/Makefile.am +++ b/libnm-glib/Makefile.am @@ -45,7 +45,7 @@ libdeprecated_HEADERS = libnm_glib.h lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la libnm_glib_la_CFLAGS = \ - $(GIO_CFLAGS) \ + $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ $(GUDEV_CFLAGS) @@ -139,7 +139,7 @@ nm_glib_marshal_sources = $(libnm_glib_la_SOURCES) libnm_glib_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(builddir)/libdeprecated-nm-glib.la \ - $(GIO_LIBS) \ + $(GLIB_LIBS) \ $(DBUS_LIBS) \ $(GUDEV_LIBS) @@ -151,8 +151,8 @@ libnm_glib_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \ noinst_PROGRAMS = libnm-glib-test libnm_glib_test_SOURCES = libnm-glib-test.c -libnm_glib_test_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS) -libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS) +libnm_glib_test_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) +libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS) libnm_glib_vpn_la_SOURCES = \ @@ -162,8 +162,8 @@ libnm_glib_vpn_la_SOURCES = \ nm-vpn-enum-types.c GLIB_GENERATED += nm-vpn-enum-types.h nm-vpn-enum-types.c nm_vpn_enum_types_sources = $(libnmvpn_HEADERS) -libnm_glib_vpn_la_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS) -libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS) +libnm_glib_vpn_la_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) +libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS) libnm_glib_vpn_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib-vpn.ver \ -version-info "2:0:1" @@ -174,7 +174,7 @@ BUILT_SOURCES += $(GLIB_GENERATED) ##################################################### libnm_glib_test_la_CFLAGS = \ - $(GIO_CFLAGS) \ + $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ $(GUDEV_CFLAGS) \ -DLIBNM_GLIB_TEST @@ -185,7 +185,7 @@ libnm_glib_test_la_SOURCES = \ libnm_glib_test_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ - $(GIO_LIBS) \ + $(GLIB_LIBS) \ $(DBUS_LIBS) \ $(GUDEV_LIBS) |