diff options
author | Remi Collet <remi@php.net> | 2014-12-26 08:33:21 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2014-12-26 08:33:21 +0100 |
commit | faba23015363d608b3e21a120ac323bbd2e729e9 (patch) | |
tree | 0d3a739bb4a81e84a9177777c0d8a4185699bc2a | |
parent | 316f72ce28f345228cc76f7ce537d593d33df765 (diff) | |
download | php-git-faba23015363d608b3e21a120ac323bbd2e729e9.tar.gz |
Fix bug #68656 Report gd library version
-rw-r--r-- | ext/gd/config.m4 | 1 | ||||
-rw-r--r-- | ext/gd/gd.c | 7 |
2 files changed, 8 insertions, 0 deletions
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"); |