Skip to content

Commit 28c6125

Browse files
committed
Sync with recent changes to default libcurl build
(cherry picked from commit a1ba300)
1 parent c0a389a commit 28c6125

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

ext/curl/config.w32

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,28 @@
44
ARG_WITH("curl", "cURL support", "no");
55

66
if (PHP_CURL != "no") {
7+
var ver_num = NaN;
8+
var f = PHP_PHP_BUILD + "/include/curl/curlver.h";
9+
if (FSO.FileExists(f)) {
10+
var reg = /LIBCURL_VERSION_NUM\s+(0x[a-z0-9]+)/gi;
11+
var m = reg.exec(file_get_contents(PHP_PHP_BUILD + "/include/curl/curlver.h"));
12+
if (!!m && m.length >= 2) {
13+
ver_num = parseInt(m[1]);
14+
}
15+
}
16+
717
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
818
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
919
SETUP_OPENSSL("curl", PHP_CURL) > 0 &&
1020
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
1121
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
1222
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
13-
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
23+
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
24+
!isNaN(ver_num) &&
25+
(ver_num <= parseInt("0x073b00") || ver_num > parseInt("0x073b00") &&
26+
CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
27+
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
28+
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
1429
) {
1530
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
1631
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');

0 commit comments

Comments
 (0)