-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update gd extension preprocessor macros help texts #15296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ if (PHP_GD != "no") { | |
if ((CHECK_LIB("libwebp_a.lib", "gd", PHP_GD) || CHECK_LIB("libwebp.lib", "gd", PHP_GD)) && | ||
CHECK_HEADER_ADD_INCLUDE("decode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp") && | ||
CHECK_HEADER_ADD_INCLUDE("encode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp")) { | ||
AC_DEFINE("HAVE_LIBWEBP", 1, "WebP support"); | ||
AC_DEFINE("HAVE_GD_WEBP", 1, "WebP support"); | ||
AC_DEFINE("HAVE_LIBWEBP", 1, "Define to 1 if you have the libwebp library."); | ||
AC_DEFINE("HAVE_GD_WEBP", 1, "Define to 1 if gd extension has WebP support."); | ||
} else { | ||
WARNING("libwebp not enabled; libraries and headers not found"); | ||
} | ||
|
@@ -56,16 +56,16 @@ if (PHP_GD != "no") { | |
gd_filter.c gd_pixelate.c gd_rotate.c gd_color_match.c gd_webp.c gd_avif.c \ | ||
gd_crop.c gd_interpolation.c gd_matrix.c gd_bmp.c gd_tga.c", "gd"); | ||
AC_DEFINE('HAVE_GD_BUNDLED', 1, "Define to 1 if gd extension uses GD library bundled in PHP."); | ||
AC_DEFINE('HAVE_GD_PNG', 1, "PNG support"); | ||
AC_DEFINE('HAVE_GD_BMP', 1, "BMP support"); | ||
AC_DEFINE('HAVE_GD_TGA', 1, "TGA support"); | ||
AC_DEFINE('HAVE_LIBPNG', 1, "PNG support"); | ||
AC_DEFINE('HAVE_LIBJPEG', 1, "JPEG support"); | ||
AC_DEFINE('HAVE_GD_JPG', 1, "JPEG support"); | ||
AC_DEFINE('HAVE_XPM', 1, "XPM support"); | ||
AC_DEFINE('HAVE_GD_XPM', 1, "XPM support"); | ||
AC_DEFINE('HAVE_LIBFREETYPE', 1, "Freetype support"); | ||
AC_DEFINE('HAVE_GD_FREETYPE', 1, "Freetype support"); | ||
AC_DEFINE('HAVE_GD_PNG', 1, "Define to 1 if gd extension has PNG support."); | ||
AC_DEFINE('HAVE_GD_BMP', 1, "Define to 1 if gd extension has BMP support."); | ||
AC_DEFINE('HAVE_GD_TGA', 1, "Define to 1 if gd extension has TGA support."); | ||
AC_DEFINE('HAVE_LIBPNG', 1, "Define to 1 if you have the libpng library."); | ||
AC_DEFINE('HAVE_LIBJPEG', 1, "Define to 1 if you have the libjpeg library."); | ||
AC_DEFINE('HAVE_GD_JPG', 1, "Define to 1 if gd extension has JPEG support."); | ||
AC_DEFINE('HAVE_XPM', 1, "Define to 1 if you have the xpm library."); | ||
AC_DEFINE('HAVE_GD_XPM', 1, "Define to 1 if gd extension has XPM support."); | ||
AC_DEFINE('HAVE_LIBFREETYPE', 1, "Define to 1 if you have the FreeType library."); | ||
AC_DEFINE('HAVE_GD_FREETYPE', 1, "Define to 1 if gd extension has FreeType support."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I thought that the bundled libgd also has JIT-mapped Japanese font support on Windows, but apparently not. For better compatibility with system libgd, we may consider to add that; on the other hand, this is a feature which always looked somewhat arbitrary to me – why not have that for other character encodings, too. Or maybe better, why not leave converting to UTF-8 up to users? Anyhow, again unrelated to the PR at hand. |
||
ADD_FLAG("CFLAGS_GD", " \ | ||
/D PHP_GD_EXPORTS=1 \ | ||
/D HAVE_GD_GET_INTERPOLATION \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
gdImageGetInterpolationMethod()
is available as of libgd 2.1.1; do we still support such old versions?However, not really related to this PR; just mentioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be merged as is however centos 8 libgd version is 2.2.5. can be addressed in another PR eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all in favor of bumping the libgd minimum version however issue is that bundled libgd is of version ~2.0.35. Probably adjusted already to a partially newer version. But it doesn't have the gdImageGetInterpolationMethod as an exported function yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is bad. There is special support for this, so it claims to be 2.1.0 compatible, but that is also wrong. In fact it is closer to 2.2 or likely even 2.3, although it is certainly not fully compatible with any system libgd. Long time ago I suggested to update the bundled GD version numbers/string, but that was rejected because the goal was to drop bundled GD – but that still didn't happen.
Anyway, we can resolve this in another PR, and just ignore this for this PR.