Alexandre Julliard wrote:
Basically do a
AC_CHECK_HEADERS(freetype/freetype.h freetype/foo.h freetype/bar.h)
Unfortunately it's not that simple, because the FreeType include files won't always be in /usr/include/freetype. On Red Hat 7.1, for example, they're in /usr/include/freetype2/freetype, to distinguish them from the FreeType 1.x headers.
The required compiler flag to include the proper directories is in the FREETYPEINCL variable. For example, on my Red Hat system it is set to '-I/usr/include/freetype2'. I tried the following:
ft_incl_dir=${FREETYPEINCL#-I} AC_CHECK_HEADER("$ft_incl_dir/freetype/freetype.h",AC_DEFINE(HAVE_FREETYPE_H))
When I run autoconf, autoheader, and configure, I get the following:
checking for FT_Init_FreeType in -lfreetype... yes checking for freetype-config... freetype-config checking for /usr/include/freetype2/freetype/freetype.h... no
So the AC_CHECK_HEADER macro isn't finding the file, even though it is right there.
Anyone have any idea why?