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.
Thanks Daniel. (In reply to comment #0) > 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. What are configure tests good for if the user will later run against different versions of packages? I mean, say cairo checks fontconfig version at compile time and it's good, then at run time you try to run it with older fontconfig. It has all the reasons to fail. Right? No difference here. > 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. Sure, at some point we'll just remove that. In the mean time, there's little harm in it, so I won't touch it now. Probably after 1.6 is out.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/52.
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.