From 36e89f6debe9a18385badeba3147829f03c1d405 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Tue, 9 Sep 2003 19:08:30 +0000 Subject: [PATCH] Add an phpinfo entry showing which version of freetype is linked to gd. --- ext/gd/gd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 1352255aa1..3b37ccf921 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -67,6 +67,13 @@ static void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC); #include "libgd/wbmp.h" #endif #ifdef ENABLE_GD_TTF +# ifdef HAVE_LIBFREETYPE +# include +# else +# ifdef HAVE_LIBTTF +# include +# endif +# endif # include "gdttf.h" #endif @@ -467,8 +474,18 @@ PHP_MINFO_FUNCTION(gd) 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 -- 2.50.1