]> granicus.if.org Git - php/commitdiff
- MFB:
authorPierre Joye <pajoye@php.net>
Tue, 7 Apr 2009 09:44:21 +0000 (09:44 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 7 Apr 2009 09:44:21 +0000 (09:44 +0000)
 - #47812, undefined symbol: gdJpegGetVersionInt
 - #46015, Build fails with system gd
 - enable gd_compat when built using system's gd

ext/gd/config.m4
ext/gd/gd.c

index 42cd9018ea72848fe85f7c3fb981aff09e15dab6..f796b6b0a753aab60ca304043b5fea7d63c11888 100644 (file)
@@ -309,7 +309,7 @@ elif test "$PHP_GD" != "no"; then
   fi
 
   GD_MODULE_TYPE=external
-  extra_sources="gdcache.c"
+  extra_sources="gdcache.c libgd/gd_compat.c"
 
   GD_FEATURES=`$GDLIB_CONFIG --features`
 
index be91077a2b61df9148127d76f1ebe4b6fdc95368..2621015c8f3727e3239168e9dfb86eed6eac51ec 100644 (file)
 #endif
 
 #if HAVE_LIBGD
+#if !HAVE_GD_BUNDLED
+# include "libgd/gd_compat.h"
+#endif
+
 
 static int le_gd, le_gd_font;
 #if HAVE_LIBT1
@@ -75,7 +79,6 @@ static void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC);
 # ifdef HAVE_LIBFREETYPE
 #  include <ft2build.h>
 #  include FT_FREETYPE_H
-# else
 # endif
 #endif
 
@@ -1181,8 +1184,10 @@ PHP_RSHUTDOWN_FUNCTION(gd)
 #endif
 /* }}} */
 
-#ifdef HAVE_GD_BUNDLED
-#define PHP_GD_VERSION_STRING "bundled (2.0.28 compatible)"
+#if HAVE_GD_BUNDLED
+#define PHP_GD_VERSION_STRING "bundled (2.0.34 compatible)"
+#else
+#define PHP_GD_VERSION_STRING "2.0"
 #endif
 
 /* {{{ PHP_MINFO_FUNCTION
@@ -1212,6 +1217,7 @@ PHP_MINFO_FUNCTION(gd)
 #endif
                php_info_print_table_row(2, "FreeType Version", tmp);
        }
+#else
        php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
 #endif
 #endif
@@ -1231,8 +1237,8 @@ PHP_MINFO_FUNCTION(gd)
 #ifdef HAVE_GD_JPG
        {
                char tmp[12];
-               snprintf(tmp, sizeof(tmp), "%d", gdJpegGetVersionInt());
-               php_info_print_table_row(2, "JPG Support", "enabled");
+               snprintf(tmp, sizeof(tmp), "%s", gdJpegGetVersionString());
+               php_info_print_table_row(2, "JPEG Support", "enabled");
                php_info_print_table_row(2, "libJPEG Version", tmp);
        }
 #endif