X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=m4%2Ffreetype.m4;h=3ffbea0a17d80a9b6e5431f4645b5f48ff179f53;hb=55a7733e5e1162a5b6929dc1dadc9754faecee20;hp=5e956771d431e43bdd636f7434746ea5e317d098;hpb=356de1faa3f444b04d1f470127587becba9ca3c0;p=swftools.git diff --git a/m4/freetype.m4 b/m4/freetype.m4 index 5e95677..3ffbea0 100644 --- a/m4/freetype.m4 +++ b/m4/freetype.m4 @@ -20,7 +20,7 @@ AC_DEFUN(RFX_CHECK_FREETYPE, AC_CHECK_PROGS(FREETYPE_CONFIG, freetype-config,) OLDCPPFLAGS="${CPPFLAGS}" OLDLIBS="${LIBS}" -if test "x${FREETYPE_CONFIG}" != "x"; then +if test "x${FREETYPE_CONFIG}" '!=' "x"; then CPPFLAGS="$CPPFLAGS "`freetype-config --cflags` else if test -d /usr/include/freetype2; then CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2" @@ -29,29 +29,52 @@ else if test -d /usr/local/include/freetype2; then fi fi fi + AC_CHECK_LIB(freetype, FT_Init_FreeType,HAVE_LIB_FREETYPE=1,) AC_CHECK_HEADERS(freetype/freetype.h,HAVE_FREETYPE_FREETYPE_H=1) -if test "x${HAVE_LIB_FREETYPE}" != "x";then -if test "x${HAVE_FREETYPE_FREETYPE_H}" != "x";then - HAVE_FREETYPE=1 -fi +AC_CHECK_HEADERS(ft2build.h,HAVE_FT2BUILD_H=1) + +if test "x${HAVE_LIB_FREETYPE}" '!=' "x";then + if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then + HAVE_FREETYPE=1 + fi + if test "x${HAVE_FT2BUILD_H}" '!=' "x";then + HAVE_FREETYPE=1 + fi fi if test "x${HAVE_FREETYPE}" = "x1"; then - if test "x{$FREETYPE_CONFIG}" != "x"; then + if test "x{$FREETYPE_CONFIG}" '!=' "x"; then LIBS="$LIBS "`freetype-config --libs` else LIBS="$LIBS -lfreetype" fi +if test "x${HAVE_FT2BUILD_H}" = "x1"; then + HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H' +fi + AC_MSG_CHECKING([whether we can compile the freetype test program]) cat > conftest.c << EOF +$HAVE_FT2BUILD_H_DEFINE + +#ifdef HAVE_FT2BUILD_H +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_SIZES_H +#include FT_SFNT_NAMES_H +#include FT_TRUETYPE_IDS_H +#include FT_OUTLINE_H +#else #include #include +#include #include #include #include +#endif int main() { @@ -104,7 +127,7 @@ EOF fi # if the above didn't work out, reset all changes to the compiler variables. -if test "x${HAVE_FREETYPE}" "!=" "x1"; then +if test "x${HAVE_FREETYPE}" '!=' "x1"; then CPPFLAGS=$OLDCPPFLAGS LIBS=$OLDLIBS fi