Skip to content

Commit 6fe086a

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Make curl brotli and zstd optional on Windows (php#21925)
2 parents cbf6598 + 1088c7d commit 6fe086a

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
@@ -25,11 +25,18 @@ if (PHP_CURL != "no") {
2525
(ver_num <= parseInt("0x073b00") || ver_num > parseInt("0x073b00") &&
2626
CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
2727
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
28-
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL) &&
29-
CHECK_LIB("brotlidec.lib", "curl", PHP_CURL) &&
30-
CHECK_LIB("brotlicommon.lib", "curl", PHP_CURL) &&
31-
CHECK_LIB("libzstd.lib", "curl", PHP_CURL))
28+
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
3229
) {
30+
if (!(CHECK_HEADER_ADD_INCLUDE("brotli/decode.h", "CFLAGS_CURL") &&
31+
CHECK_LIB("brotlidec.lib;brotlidec-static.lib", "curl", PHP_CURL) &&
32+
CHECK_LIB("brotlicommon.lib;brotlicommon-static.lib", "curl", PHP_CURL)
33+
)) {
34+
WARNING("brotli in curl not enabled; libraries or headers not found");
35+
}
36+
if (!(CHECK_LIB("libzstd.lib;libzstd_a.lib", "curl", PHP_CURL)
37+
)) {
38+
WARNING("zstd in curl not enabled; library not found");
39+
}
3340
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
3441
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
3542
ADD_FLAG("CFLAGS_CURL", "/D PHP_CURL_EXPORTS=1");

0 commit comments

Comments
 (0)