From c74da521af566bc208ff9a2da3e43634817f73d5 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Thu, 22 Mar 2012 14:51:30 -0700 Subject: Use a bundled glib2 to avoid circular dependency It's nice to say that glib is a base library and you should have it installed to build pkg-config, but it makes bootstrapping pkg-config really annoying since it introduces a circular dependency. Let's be nice to our users and bundle a copy to avoid this situation. The default is still to use the system's glib, but the internal copy can be used by passing --with-internal-glib to configure. The latest stable copy of glib is included and will be updated periodically with their stable releases. The top level autogen.sh is running recursively through glib. If this becomes an issue, we can switch autoreconf to --no-recursive and then descend to glib and run its autogen.sh script. Since this is default off, its integration will probably not be tested often. Therefore, it's forcefully turned on during distcheck to make sure to test it out before distributing a tarball. --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 49c047b..082b03d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,9 @@ pkg_config_LDADD=@GLIB_LIBS@ +if INTERNAL_GLIB +GLIB_SUBDIR = glib +endif + if USE_INSTALLED_POPT pkg_config_LDADD += $(POPT_LIBS) else @@ -43,4 +47,4 @@ pkg_config_SOURCES= \ parse.h \ parse.c \ main.c -DISTCHECK_CONFIGURE_FLAGS = --with-installed-popt \ No newline at end of file +DISTCHECK_CONFIGURE_FLAGS = --with-installed-popt --with-internal-glib -- cgit v1.2.1