Skip to content

Commit 885f935

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: "Export" relevant GD macros
2 parents 2439661 + a2c0ffb commit 885f935

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ext/gd/config.w32

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ if (PHP_GD != "no") {
2626
if ((CHECK_LIB("libwebp_a.lib", "gd", PHP_GD) || CHECK_LIB("libwebp.lib", "gd", PHP_GD)) &&
2727
CHECK_HEADER_ADD_INCLUDE("decode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp") &&
2828
CHECK_HEADER_ADD_INCLUDE("encode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp")) {
29-
ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBWEBP /D HAVE_GD_WEBP");
29+
AC_DEFINE("HAVE_LIBWEBP", 1, "WebP support");
30+
AC_DEFINE("HAVE_GD_WEBP", 1, "WebP support");
3031
} else {
3132
WARNING("libwebp not enabled; libraries and headers not found");
3233
}
@@ -55,19 +56,19 @@ if (PHP_GD != "no") {
5556
gd_filter.c gd_pixelate.c gd_rotate.c gd_color_match.c gd_webp.c gd_avif.c \
5657
gd_crop.c gd_interpolation.c gd_matrix.c gd_bmp.c gd_tga.c", "gd");
5758
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
59+
AC_DEFINE('HAVE_GD_BUNDLED', 1, "Bundled GD");
60+
AC_DEFINE('HAVE_GD_PNG', 1, "PNG support");
61+
AC_DEFINE('HAVE_GD_BMP', 1, "BMP support");
62+
AC_DEFINE('HAVE_GD_TGA', 1, "TGA support");
63+
AC_DEFINE('HAVE_LIBPNG', 1, "PNG support");
64+
AC_DEFINE('HAVE_LIBJPEG', 1, "JPEG support");
65+
AC_DEFINE('HAVE_GD_JPG', 1, "JPEG support");
66+
AC_DEFINE('HAVE_XPM', 1, "XPM support");
67+
AC_DEFINE('HAVE_GD_XPM', 1, "XPM support");
68+
AC_DEFINE('HAVE_LIBFREETYPE', 1, "Freetype support");
69+
AC_DEFINE('HAVE_GD_FREETYPE', 1, "Freetype support");
5870
ADD_FLAG("CFLAGS_GD", " \
5971
/D PHP_GD_EXPORTS=1 \
60-
/D HAVE_GD_BUNDLED=1 \
61-
/D HAVE_LIBFREETYPE=1 \
62-
/D HAVE_GD_JPG \
63-
/D HAVE_GD_PNG \
64-
/D HAVE_GD_XPM \
65-
/D HAVE_GD_FREETYPE=1 \
66-
/D HAVE_GD_BMP \
67-
/D HAVE_GD_TGA \
68-
/D HAVE_LIBJPEG \
69-
/D HAVE_LIBPNG \
70-
/D HAVE_XPM \
7172
/D HAVE_GD_GET_INTERPOLATION \
7273
");
7374
if (ICC_TOOLSET) {

0 commit comments

Comments
 (0)