In current autoconf there is AC_PATH_TOOL which tries both with and
without the prefix, and which prints a warning if the tool is only
found without the prefix and cross compiling is in effect.
My suggestion would be to replace instances of MY_AC_PATH_PROG which
specify ${ac_tool_prefix} (and possibly some that don't) with calls
to a new function MY_AC_PATH_TOOL, which mimics this behaviour (but
which is implemented using AC_PATH_PROGS), except that I think
binaries without prefix should be ignored rather than warned about
when cross-compiling. There is nothing wrong with having
"freetype-config" installed when cross-compiling, so it does not
warrant a warning, but using it for the cross-compilation will give
incorrect results, so we shouldn't.
Something like this:
define(MY_AC_PATH_TOOL,[
if test "x$enable_binary" = "xno"; then
AC_PATH_PROG($1,nobinary_dummy,$3,$BINDIR)
elif test "x$cross_compiling" = "xyes" -o "x$ac_tool_prefix" = "x"; then
AC_PATH_PROG($1,${ac_tool_prefix}$2,$3,$4)
else
AC_PATH_PROGS($1,${ac_tool_prefix}$2 $2,$3,$4)
fi
])