|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
??? ?? 1999, Version 4.0 Beta 2
+- Added a check for freetype.h - fixed build on RedHat 6.0 (Zeev)
- Fixed array_walk() to work in PHP4 (Andrey)
- Ported all remaining date() format options from PHP3 (Andrey)
- $php_errormsg now works (Andrey)
GD_INCLUDE="-I/usr/pkg/include/gd"
fi
AC_CHECK_LIB(ttf, TT_Open_Face)
+ AC_CHECK_HEADERS(freetype.h)
PHP_EXTENSION(gd)
EXTRA_LIBS="$EXTRA_LIBS $GD_LIBS"
INCLUDES="$INCLUDES $GD_INCLUDE"
#include <gdfontmb.h> /* 3 Medium bold font */
#include <gdfontl.h> /* 4 Large font */
#include <gdfontg.h> /* 5 Giant font */
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
# include "gdttf.h"
#endif
#define M_PI 3.14159265358979323846
#endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
static void php3_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int);
#endif
{"imagesx", php3_imagesxfn, NULL},
{"imagesy", php3_imagesyfn, NULL},
{"imagedashedline", php3_imagedashedline, NULL},
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
{"imagettfbbox", php3_imagettfbbox, NULL},
{"imagettftext", php3_imagettftext, NULL},
#endif
#else
php3_printf("Version 1.2");
#endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
php3_printf(" with FreeType support");
#endif
}
}
/* }}} */
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
#define TTFTEXT_DRAW 0
#define TTFTEXT_BBOX 1
/* This just seems unessacary */
#if (WIN32|WINNT)
-#define HAVE_LIBTTF 1
+#define ENABLE_GD_TTF
#else
#include "php_config.h"
#endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
#include "gdcache.h"
#endif
-#endif /* HAVE_LIBTTF */
+#endif /* ENABLE_GD_TTF */
#else
#include "php_config.h"
#endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
return (char *)NULL;
}
-#endif /* HAVE_LIBTTF */
+#endif /* ENABLE_GD_TTF */
/*
* Local variables:
#ifndef _PHP3_GD_H
#define _PHP3_GD_H
+
+#if defined(HAVE_LIBTTF) && defined(HAVE_FREETYPE_H)
+#define ENABLE_GD_TTF
+#endif
+
#if COMPILE_DL
#undef HAVE_LIBGD
#define HAVE_LIBGD 1
void php3_free_gd_font(gdFontPtr);
void _php3_gdimagecharup(gdImagePtr, gdFontPtr, int, int, int, int);
PHP_FUNCTION(imagedashedline);
-#ifdef HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
PHP_FUNCTION(imagettfbbox);
PHP_FUNCTION(imagettftext);
#endif