From 6be2406b63990967f1e316f32575e5b48bb2547f Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sat, 19 Apr 2003 07:44:16 +0000 Subject: [PATCH] Made phpinfo() / gd_info() indicate availability of JIS feature --- ext/gd/config.m4 | 3 ++- ext/gd/gd.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index d1431b7068..4ef33473f0 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -230,7 +230,7 @@ AC_DEFUN(PHP_GD_TTSTR,[ AC_DEFUN(PHP_GD_JISX0208,[ if test "$PHP_GD_JIS_CONV" = "yes"; then - USE_GD_JIS_CONV=1 + USE_GD_JIS_CONV=1 fi ]) @@ -330,6 +330,7 @@ dnl enable the support in bundled GD library fi if test -n "$USE_GD_JIS_CONV"; then + AC_DEFINE(USE_GD_JISX0208, 1, [ ]) GDLIB_CFLAGS="$GDLIB_CFLAGS -DJISX0208" fi diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 1e36cd4e0f..df06e051ca 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -499,6 +499,9 @@ PHP_MINFO_FUNCTION(gd) #endif #ifdef HAVE_GD_XBM php_info_print_table_row(2, "XBM Support", "enabled"); +#endif +#if defined(USE_GD_JISX0208) && defined(HAVE_GD_BUNDLED) + php_info_print_table_row(2, "JIS-mapped Japanese Font Support", "enabled"); #endif php_info_print_table_end(); } @@ -570,6 +573,11 @@ PHP_FUNCTION(gd_info) #else add_assoc_bool(return_value, "XBM Support", 0); #endif +#if defined(USE_GD_JISX0208) && defined(HAVE_GD_BUNDLED) + add_assoc_bool(return_value, "JIS-mapped Japanese Font Support", 1); +#else + add_assoc_bool(return_value, "JIS-mapped Japanese Font Support", 0); +#endif } /* }}} */ -- 2.50.1