Inappropriate pkg-config version test
Submitted by Daniel Macks
Assigned to Carl Worth @cworth
Description
cairo's ./configure uses the version of the pkg-config program to determine whether to place Requires.private: vs Requires: in the cairo.pc file. The configure test is for whether the pkg-config is new enough to be able to process the .private directive:
dnl ===========================================================================
dnl Check for recent pkg-config which supports Requires.private
case `$PKG_CONFIG --version` in
[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;;
*) PKGCONFIG_REQUIRES="Requires.private"; ;;
esac
AC_SUBST(PKGCONFIG_REQUIRES)
But what matters is the version of pkg-config that reads the file, i.e., the one used when other packages ask to link against cairo, not the one that is present when cairo itself is being compiled. So the test results don't matter and the action taken as the result of the test might not be correct for when that result is used.
pkg-config-0.17 is several years old now, and major distros would almost certainly have newer. Many packages in other projects (example: gnome) assume support for .private. Recent versions of pkg-config also have a "pkg-config" virtual package, so if you really wanted to make sure cairo.pc is processed by a new enough version of pkg-config to understand the contents of that file, you can just add it to the Requires line.
Version: 1.5.11