Skip to content

Commit c288b40

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Make curl brotli and zstd optional on Windows (#21925)
2 parents 71eff10 + 6e90c02 commit c288b40

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

ext/curl/config.w32

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@ if (PHP_CURL != "no") {
1212
SETUP_ZLIB_LIB("curl", PHP_CURL) &&
1313
(CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
1414
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
15-
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL) &&
16-
CHECK_LIB("brotlidec.lib", "curl", PHP_CURL) &&
17-
CHECK_LIB("brotlicommon.lib", "curl", PHP_CURL) &&
18-
CHECK_LIB("libzstd.lib", "curl", PHP_CURL))
15+
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
1916
) {
17+
if (!(CHECK_HEADER_ADD_INCLUDE("brotli/decode.h", "CFLAGS_CURL") &&
18+
CHECK_LIB("brotlidec.lib;brotlidec-static.lib", "curl", PHP_CURL) &&
19+
CHECK_LIB("brotlicommon.lib;brotlicommon-static.lib", "curl", PHP_CURL)
20+
)) {
21+
WARNING("brotli in curl not enabled; libraries or headers not found");
22+
}
23+
if (!(CHECK_LIB("libzstd.lib;libzstd_a.lib", "curl", PHP_CURL)
24+
)) {
25+
WARNING("zstd in curl not enabled; library not found");
26+
}
2027
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
2128
AC_DEFINE('HAVE_CURL', 1, "Define to 1 if the PHP extension 'curl' is available.");
2229
ADD_FLAG("CFLAGS_CURL", "/D PHP_CURL_EXPORTS=1");

0 commit comments

Comments
 (0)