#29 use pkg-config to look up freetype info

open
nobody
5
2013-01-21
2013-01-21
Mike Frysinger
No

the current logic uses freetype-config and hardcodes the subdir paths. unfortunately this breaks when using different ABIs (e.g. /usr/lib is not the native ABI) as well as when cross-compiling.

this could be easily solved by using pkg-config like so:
PKG_CHECK_MODULES([FREETYPE], [freetype2], [
LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
],[AC_MSG_ERROR([could not locate freetype2])])

Discussion