if test "x$with_mylibgd" = "xyes"; then
-AC_ARG_WITH(freetype,
- [AC_HELP_STRING([--with-freetype],
- [use freetype library])])
+dnl FreeType configure tests snarfed from libgd ..from libwmf ..
-### default is to build with freetype
-if test "x$with_freetype" != "xno"; then
- with_freetype=yes
-fi
-
-if test "x$with_freetype" = "xyes"; then
- dnl FreeType configure tests snarfed from libgd ..from libwmf ..
FREETYPE_DIR="yes"
AC_ARG_WITH(freetype,
[ --with-freetype=DIR where to find the freetype 2.x library],
- FREETYPE_DIR=$withval)
+ FREETYPE_DIR=$withval)
- if test "x$FREETYPE_DIR" = "xno"; then
- AC_MSG_WARN(Optional FREETYPE2 library disabled)
+ ### default is to build with freetype
+ if test "x$with_freetype" = "xno"; then
+ AC_MSG_WARN(Optional FREETYPE library disabled)
else
-
- if test "x$FREETYPE_DIR" != "xyes"; then
- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config,,[$FREETYPE_DIR/bin:$PATH])
- else
+
+ if test "x$FREETYPE_DIR" = "xyes"; then
AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
+ else
+ AC_PATH_PROG(FREETYPE_CONFIG,freetype-config,,[$FREETYPE_DIR/bin:$PATH])
fi
if test -n "$FREETYPE_CONFIG"; then
AC_SUBST(FT_LIBS)
fi
fi
-fi
dnl ----------------------------------
dnl INCLUDES and LIBS for FONTCONFIG (only with mylibgd)
#ifdef HAVE_LIBGD
#include "gd.h"
-#ifdef HAVE_GD_FREETYPE
+#if defined(HAVE_LIBFREETYPE) && defined(HAVE_GD_FREETYPE)
/* fontsize at which text is omitted entirely */
#define FONTSIZE_MUCH_TOO_SMALL 0.15
err = gdImageStringFTEx(NULL, brect, -1, fontlist,
fontsize, 0, 0, 0, para->str, &strex);
- if (err)
+ if (err) {
+ fprintf(stderr,"%s\n", err);
return;
+ }
if (strex.xshow) {
/* transfer malloc'ed xshow string to para */
#endif
gvplugin_installed_t gvtextlayout_gd_types[] = {
-#if defined(HAVE_LIBGD) && defined(HAVE_GD_FREETYPE)
+#if defined(HAVE_LIBGD) && defined(HAVE_LIBFREETYPE) && defined(HAVE_GD_FREETYPE)
{0, "textlayout", 2, &textlayout_engine, NULL},
#endif
{0, NULL, 0, NULL, NULL}