]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #31396 (compile fails with gd 2.0.33 without freetype)
authorfoobar <sniper@php.net>
Tue, 4 Jan 2005 06:52:18 +0000 (06:52 +0000)
committerfoobar <sniper@php.net>
Tue, 4 Jan 2005 06:52:18 +0000 (06:52 +0000)
ext/gd/config.m4
ext/gd/gd.c

index 1534a46cac6c8d6d535f9fa6a405ca7d94c7bc1f..36596b0bf069e8ab390cd33c5b22dc0a67158794 100644 (file)
@@ -257,8 +257,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
   PHP_CHECK_LIBRARY(gd, gdImageColorResolve,    [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageGifCtx,          [AC_DEFINE(HAVE_GD_GIF_CTX,          1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdCacheCreate,          [AC_DEFINE(HAVE_GD_CACHE_CREATE,     1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
-  PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown,    [AC_DEFINE(HAVE_GD_THREAD_SAFE,      1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
-  PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx,      [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX,    1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown,    [AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdFreeFontCache,        [AC_DEFINE(HAVE_GD_FREEFONTCACHE,    1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx,      [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX,   1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 ])
 
 dnl
@@ -308,6 +309,7 @@ dnl These are always available with bundled library
   AC_DEFINE(HAVE_GD_GIF_READ,         1, [ ])
   AC_DEFINE(HAVE_GD_GIF_CREATE,       1, [ ])
   AC_DEFINE(HAVE_GD_IMAGEELLIPSE,     1, [ ])
+  AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])
   AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX,   1, [ ])
 
 dnl Make sure the libgd/ is first in the include path
index 31042027803de9a10f622b962d1c1486968ed983..3ee5acd26d76bc7295113bea74ffbd9395121a84 100644 (file)
@@ -289,7 +289,7 @@ zend_module_entry gd_module_entry = {
        PHP_MINIT(gd),
        PHP_MSHUTDOWN(gd),
        NULL,
-#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
+#if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || HAVE_GD_FREEFONTCACHE)
        PHP_RSHUTDOWN(gd),
 #else
        NULL,
@@ -393,10 +393,10 @@ PHP_MINIT_FUNCTION(gd)
 
 /* {{{ PHP_RSHUTDOWN_FUNCTION
  */
-#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
+#if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || HAVE_GD_FREEFONTCACHE)
 PHP_RSHUTDOWN_FUNCTION(gd)
 {
-#if defined(HAVE_GD_THREAD_SAFE) || defined(HAVE_GD_BUNDLED)
+#if HAVE_GD_FONTCACHESHUTDOWN
        gdFontCacheShutdown();
 #else 
        gdFreeFontCache();