pkg-config 0.16.0 and 0.17.2 fail if g++ is not installed, but do not use g++ to compile anything. pkg-config 0.15.0 compiles fine without g++ installed. I will submit a patch after some testing that removes this from configure.in/configure.
Added link to Source Mage GNU/Linux bug report (http://bugs.sourcemage.org/show_bug.cgi?id=8957) in URL.
This is because libtool always checks for a C++ compiler and pkg-config uses libtool. Please take this up with libtool upstream, it's nothing which can be done with this in pkg-config.
According to the libtool guys: "Yes. Known bug, fixed properly in branch-2-0. Unfortunately I don't know of a clean workaround for branch-1-5, and we have a handful of patches (at least, and one of them tricky) that need to go into branch-2-0 before we can release the next 2.0alpha, and then hopefully 2.0 soon after that. Sorry."
Err, just remembered to ask, this is a libtool bug even though pkg-config 0.15.0 compiles fine without g++, yet 0.16.0 and 0.17.2 fail, without changing anything else on the system (other than installing/removing g++ and trying different versions of pkg-config)?
No, it's not a pkg-config bug. It happens because pkg-config 0.15's aclocal.m4 (which is built by aclocal, based on the used macros in configure.in from the set of macros available on the system) was built with an ancient version of libtool installed. Modern pkg-config tarballs are built today, with updated tools around. This means the configure scripts are victim of the whims of the upstreams and there's nothing which pkg-config can do about it, short of hand-editing aclocal.m4 before each release. This is something I'm not going to do, I think for obvious reasons. :-)
The libtool guys recommended trying libtool 1.5.18 (I believe that's the latest stable release) as I was using 1.5.16. I'll try this on my box.
Just tested with libtool 1.5.18, running `aclocal && autoconf` in both the main src dir and the glib dir, and pkg-config no longer needs g++. Try using a newer version of libtool to make the pkg-config tarball.
Sorry, I misspoke and misunderstood what was reported to me: this fix worked for freetype2 (2.1.10), but did not work for pkg-config. So there is something wrong with pkg-config, AFAICT, since other packages (libmad and freetype2 to name two recently "fixed" packages) have this problem "removed" after running `aclocal && autoconf` with libtool 1.5.18, autoconf 2.59, and automake 1.9.5 (versions tested here).
If I'd read my developer's notes correctly, I would have remembered this is the fix for pkg-config: pkg-config needed two runs of aclocal && autoconf, one in the main src dir, one in the glib-1.2.8 subdirectory.
Just for the record, this bug will be fixed once my distribution gets around to updating libtool, this bug will be fixed automatically.
Hey, pkg-config-0.22 uses libtool 1.5.22, so this should really be fixed now!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.