-AC_CHECK_LIB(freetype, FT_Init_FreeType,HAVE_LIB_FREETYPE=1,)
-AC_CHECK_HEADERS(freetype/freetype.h,HAVE_FREETYPE_FREETYPE_H=1)
-AC_CHECK_HEADERS(ft2build.h,HAVE_FT2BUILD_H=1)
+if test "x${FREETYPE_CONFIG}" '=' "x";then
+ # if we didn't find the freetype-config program, we won't
+ # know where the libs are expected to be. So just blindly
+ # try to link against them.
+ AC_CHECK_LIB(freetype, FT_Init_FreeType,HAVE_LIB_FREETYPE=1,)
+fi