Martin DeMello
Martin DeMello

Reputation: 12336

update glib-1.2 project to use glib2

I'm resurrecting an old open source project that uses glib-1.2. I figure one of the things I should do is update it to use glib2-2.34, but I can't find any documentation on doing that. In particular, I would like to know the changes I need to make to my autoconf setup, currently

configure.ac:AM_PATH_GLIB(1.2.0)

src/Makefile.am:AM_CPPFLAGS = @GLIB_CFLAGS@
src/Makefile.am:arccc_LDADD = @GLIB_LIBS@

Upvotes: 1

Views: 312

Answers (1)

Martin DeMello
Martin DeMello

Reputation: 12336

Found after looking through open source projects for examples: replace the above lines with

configure.ac:PKG_CHECK_MODULES([DEPS], [glib-2.0 >= 2.34.3])

src/Makefile.am:AM_CPPFLAGS = @DEPS_CFLAGS@
src/Makefile.am:arccc_LDADD = @DEPS_LIBS@

Also, I decided to move the entire project to cmake, and can recommend that route.

Upvotes: 2

Related Questions