From d8bad7a4ff9666c9af4ae2ab35528cd1b36a05d3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 5 Dec 2010 21:31:37 +0100 Subject: [PATCH] Fix linking of polkitagenthelperprivate.c with gcc 4.5 polkitagenthelperprivate.c calls g_type_init() which is in libgobject; so we need to explicitly link with this. Fixes building with the stricter linking behaviour of gcc 4.5. https://bugs.freedesktop.org/show_bug.cgi?id=32114 --- configure.ac | 4 ++++ src/polkitagent/Makefile.am | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 75c5c67..3e3ae84 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,10 @@ PKG_CHECK_MODULES(GLIB, [gio-2.0 >= 2.25.12]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +PKG_CHECK_MODULES(GOBJECT, [gobject-2.0]) +AC_SUBST(GOBJECT_CFLAGS) +AC_SUBST(GOBJECT_LIBS) + EXPAT_LIB="" AC_ARG_WITH(expat, [ --with-expat= Use expat from here], [ diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am index 96ffd7c..d8a59f9 100644 --- a/src/polkitagent/Makefile.am +++ b/src/polkitagent/Makefile.am @@ -97,6 +97,7 @@ polkit_agent_helper_1_CFLAGS = \ polkit_agent_helper_1_LDADD = \ $(AUTH_LIBS) \ + $(GOBJECT_LIBS) \ $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ $(NULL) -- 1.7.2.3