From: Remi Collet Date: Fri, 26 Dec 2014 07:33:21 +0000 (+0100) Subject: Fix bug #68656 Report gd library version X-Git-Tag: php-5.6.5RC1~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=faba23015363d608b3e21a120ac323bbd2e729e9;p=php Fix bug #68656 Report gd library version --- diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 446c2425ae..e643e52736 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -251,6 +251,7 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_FREETYPE, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) + PHP_CHECK_LIBRARY(gd, gdVersionString, [AC_DEFINE(HAVE_GD_LIBVERSION, 1, [ ])], [], [ $GD_SHARED_LIBADD ]) ]) dnl diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 7bf0b757a9..1c30357a47 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1289,7 +1289,14 @@ PHP_MINFO_FUNCTION(gd) /* need to use a PHPAPI function here because it is external module in windows */ +#if defined(HAVE_GD_BUNDLED) php_info_print_table_row(2, "GD Version", PHP_GD_VERSION_STRING); +#else + php_info_print_table_row(2, "GD headers Version", PHP_GD_VERSION_STRING); +#if defined(HAVE_GD_LIBVERSION) + php_info_print_table_row(2, "GD library Version", gdVersionString()); +#endif +#endif #ifdef ENABLE_GD_TTF php_info_print_table_row(2, "FreeType Support", "enabled");