Skip to content

Commit 48e14cf

Browse files
committed
Fail early when building ext/gd without ext/zlib
The bundled libgd relies on zlib; we're setting up the library, but don't check for the header (which is included by gd_gd2.c), which may pass configure, although the build fails. We better fail early if the required header is not available.
1 parent 89db321 commit 48e14cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/gd/config.w32

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ if (PHP_GD != "no") {
1616
CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng12")) &&
1717
(CHECK_LIB("libiconv_a.lib;libiconv.lib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) &&
1818
CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_GD", PHP_GD) &&
19-
SETUP_ZLIB_LIB("gd", PHP_GD)
19+
SETUP_ZLIB_LIB("gd", PHP_GD) &&
20+
CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS", "..\\zlib;" + php_usual_include_suspects)
2021
) {
2122

2223
if (CHECK_LIB("libXpm_a.lib", "gd", PHP_GD) &&

0 commit comments

Comments
 (0)