Include GIO/GLib in

Hello, I need to edit in order to add GIO/GLib inside. In this BOINC mailing list discussion
I have been told to take libnotify as example, but it is not trivial, since when it comes to edit things like PKG_CHECK_MODULES(LIBNOTIFY, [libnotify])
I have no idea about how to proceed.
Thank you

PKG_CHECK_MODULES([GLIB],[glib-2.0 gio-2.0])

and then add $(GLIB_CFLAGS) to your target’s CFLAGS variable, and $(GLIB_LIBS) to your target’s LDADD/LIBADD variable.


1 Like

For more information about Autotools, I recomment Autotools Mythbuster, which incidentally has a full chapter about finding dependencies with pkg-config.

1 Like

I think I will read the whole guide suggested by @ebassi because I cannot understand where are the target’s CFLAGS variable, and LDADD/LIBADD variable.

Try these lines:


GLib is a dependency of GIO; therefore, the above lines should include it automatically.

It’s not recommended to just blast over the global C pre-processor flags (which have nothing to do with the C compiler flags) and libraries, especially if the project is complex and has multiple targets.

You will have to ask somebody who is familiar with the build system of the project you’re patching; the maintainers should be able to help you.

Is this reply for @greg-king ?

I already asked in a BOINC development mailing list thread, but I am getting more detailed infos in this GNOME discourse thread

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.