moriyoshi               Tue Sep  9 15:08:34 2003 EDT

  Modified files:              
    /php-src/ext/gd     gd.c 
  Log:
  Add an phpinfo entry showing which version of freetype is linked to gd.
  
  
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.277 php-src/ext/gd/gd.c:1.278
--- php-src/ext/gd/gd.c:1.277   Thu Aug 28 17:00:15 2003
+++ php-src/ext/gd/gd.c Tue Sep  9 15:08:30 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.277 2003/08/28 21:00:15 andrey Exp $ */
+/* $Id: gd.c,v 1.278 2003/09/09 19:08:30 moriyoshi Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
    Cold Spring Harbor Labs. */
@@ -67,6 +67,13 @@
 #include "libgd/wbmp.h"
 #endif
 #ifdef ENABLE_GD_TTF
+# ifdef HAVE_LIBFREETYPE
+#  include <freetype/freetype.h>
+# else
+#  ifdef HAVE_LIBTTF
+#   include <freetype.h>
+#  endif
+# endif
 # include "gdttf.h"
 #endif
 
@@ -467,8 +474,18 @@
        php_info_print_table_row(2, "FreeType Support", "enabled");
 #if HAVE_LIBFREETYPE
        php_info_print_table_row(2, "FreeType Linkage", "with freetype");
+       {
+               char tmp[256];
+               snprintf(tmp, sizeof(tmp), "%d.%d.%d", FREETYPE_MAJOR, FREETYPE_MINOR, 
FREETYPE_PATCH);
+               php_info_print_table_row(2, "FreeType Version", tmp);
+       }
 #elif HAVE_LIBTTF
        php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
+       {
+               char tmp[256];
+               snprintf(tmp, sizeof(tmp), "%d.%d", TT_FREETYPE_MAJOR, 
TT_FREETYPE_MINOR);
+               php_info_print_table_row(2, "FreeType Version", tmp);
+       }
 #else
        php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to