Merge branch 'PHP-8.1'

* PHP-8.1:
  "Export" relevant GD macros
This commit is contained in:
Christoph M. Becker 2021-11-24 18:26:15 +01:00
commit 885f935090
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6

View File

@ -26,7 +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")) {
ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBWEBP /D HAVE_GD_WEBP");
AC_DEFINE("HAVE_LIBWEBP", 1, "WebP support");
AC_DEFINE("HAVE_GD_WEBP", 1, "WebP support");
} else {
WARNING("libwebp not enabled; libraries and headers not found");
}
@ -55,19 +56,19 @@ 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_LIBGD', 1, 'GD support');
AC_DEFINE('HAVE_GD_BUNDLED', 1, "Bundled GD");
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");
ADD_FLAG("CFLAGS_GD", " \
/D PHP_GD_EXPORTS=1 \
/D HAVE_GD_BUNDLED=1 \
/D HAVE_LIBFREETYPE=1 \
/D HAVE_GD_JPG \
/D HAVE_GD_PNG \
/D HAVE_GD_XPM \
/D HAVE_GD_FREETYPE=1 \
/D HAVE_GD_BMP \
/D HAVE_GD_TGA \
/D HAVE_LIBJPEG \
/D HAVE_LIBPNG \
/D HAVE_XPM \
/D HAVE_GD_GET_INTERPOLATION \
");
if (ICC_TOOLSET) {