While compiling cairo-1.0.0 on MirOS (an OpenBSD derivative), I came across this problem. The configure scripts to find Xrender have two cases: if a .pc file is found, then there is no problem. If not, the script probes for <X11/extensions/Xrender.h> without checking for X or adding -I/usr/X11R6/include to CPPFLAGS. Ironically, this is done afterwards. Then it tries a function in Xrender (XrmFinalize) while adding the right libraries. However, these never make it into the cairo .pc file. You see, our linker does not know about shared library dependencies, so you always have to give it all the dependent libraries. Thus, any user of cairo also has to link against Xrender + dependencies. My patch shuffles the order of the tests for them to work, adds X_CFLAGS to CPPFLAGS and introduces a new variable XRENDER_LIBS that is added to the "Libs" line of cairo.pc if xrender.pc is not used. (For the record, the X server here is XFree86 4.5.0 final.)
Created attachment 3525 [details] [review] proposed patch
Random comment, not sure if it is relevant - XrmFinalize isn't in Xrender.
I also noticed that problem can happen. Patch looks good.
Fixed: commit b85032584b32af968dc8d8a0fcfc9f3e1d2770a0 Author: Behdad Esfahbod <behdad@behdad.org> Date: Wed Sep 5 00:26:56 2007 -0400 [configure.in] Fix non-pkgconfig Xrender detection path (#4724)
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.