]> granicus.if.org Git - php/commitdiff
Added check for freetype.h
authorZeev Suraski <zeev@php.net>
Fri, 23 Jul 1999 15:18:37 +0000 (15:18 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 23 Jul 1999 15:18:37 +0000 (15:18 +0000)
ChangeLog
ext/gd/config.m4
ext/gd/gd.c
ext/gd/gdcache.c
ext/gd/gdttf.c
ext/gd/php3_gd.h

index 251661142f426725dab60b8cf2e7c82138ee08ec..ff7843ef54cdcf32e7b52eb4c28b0a6321f3e1e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ PHP 4.0 CHANGE LOG                                                    ChangeLog
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ??? ?? 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)
index 6378535f0ad10df16df37bac40b978b1853fddee..12c6e7bb762fd12c36c95e7052eee75c5e71bf5f 100644 (file)
@@ -48,6 +48,7 @@ if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
     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"
index 511e3495863befa521b8cd4304a080621d73eda0..efa03ea71b09efb5e8daa33d7138379bc747c0d9 100644 (file)
@@ -49,7 +49,7 @@
 #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
 
@@ -57,7 +57,7 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
 static void php3_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int);
 #endif
 
@@ -118,7 +118,7 @@ function_entry gd_functions[] = {
        {"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
@@ -175,7 +175,7 @@ void php3_info_gd(ZEND_MODULE_INFO_FUNC_ARGS)
 #else
        php3_printf("Version 1.2");
 #endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
        php3_printf(" with FreeType support");
 #endif
 }
@@ -1671,7 +1671,7 @@ PHP_FUNCTION(imagesyfn)
 }
 /* }}} */
 
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
 
 #define TTFTEXT_DRAW 0
 #define TTFTEXT_BBOX 1
index 1662ebb184db5216602ce6f58fe3b4ca1c9165fc..e9c628607b512cb01b338f856d04f4cadb997ed9 100644 (file)
 
 /* 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"
 
@@ -198,4 +198,4 @@ main(char *argv[], int argc)
 
 #endif
 
-#endif /* HAVE_LIBTTF */
+#endif /* ENABLE_GD_TTF */
index 93bb3528d1be519f6f2ce36edb4ff4d753b6ec83..33019e030a52b4a4773f8620f7f7fc5f30ee33f7 100644 (file)
@@ -9,7 +9,7 @@
 #else
 #include "php_config.h"
 #endif
-#if HAVE_LIBTTF
+#ifdef ENABLE_GD_TTF
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -852,7 +852,7 @@ gdttf(gdImage *im, int *brect, int fg, char *fontname,
     return (char *)NULL;
 }
    
-#endif /* HAVE_LIBTTF */
+#endif /* ENABLE_GD_TTF */
 
 /*
  * Local variables:
index d3f4dfced3d5b1ccae1711545f662510ffd4db0a..d6ef1d53b10ebe845f453b1c06ff97e33db13d35 100644 (file)
 #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
@@ -89,7 +94,7 @@ PHP_FUNCTION(imagesyfn);
 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