use pkg-config to look up freetype info
Swiss army knife of image processing
Brought to you by:
bfriesen
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])])
This is finally addressed in development GraphicsMagick and will appear in the next release.