Sun Jul 3 17:57:11 2016, original submission:
suggested by Vincent Torri, mail to karl 2 July 2016. The idea being that we require fontconfig on the system anyway, so may as well use system's idea of how to package it. Vincent writes:
---
In Build/source/m4/kpse-fontconfig.m4, one adds configure options to
get include and library directory of fontconfig. If they are not used,
one calls pkg-config to fill these 2 variables. In case they are not
empty, one checks if some type and function are found or not
(FcObjectSet and FcInit()). And finally, you set FONTCONFIG_INCLUDES
and FONTCONFIG_LIBS.
Imho, nowadays, one should trust packagers and require fontconfig
package (windows or Unix). That one call:
PKG_CHECK_MODULES([FONTCONFIG], [fontconfig])
1) can use FONTCONFIG_CFLAGS and FONTCONFIG_LIBS environment variables
if they are set.
2) in the last case, use the values in fontconfig.pc.
3) fails if fontconfig is not found.
I know that it maybe implies a lot of changes and you don't want to
change a build system that works. But nowadays, this PKG_CHECK_MODULES
use is very common and save a lot of work from a developper
perspective. As an example, the Enlightenment project, which works on
Linux, Mac, all the BSD OS, Solaris and Windows.
|