Skip to content

Commit 81289e8

Browse files
committed
Support curl
1 parent 11fd47a commit 81289e8

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

.pkg-config/pkgconfig/libcurl.pc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=C:/usr
2+
libdir=${prefix}/lib
3+
includedir=${prefix}/include
4+
5+
Name: libcurl
6+
Description: winlibs libcurl package
7+
Url: https://github.com/winlibs/cURL
8+
Version: 8.10.1
9+
Requires: libssh2 nghttp2
10+
Libs: -L${libdir} -llibcurl_a
11+
Cflags: -I${includedir}

.pkg-config/pkgconfig/libssh2.pc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=C:/usr
2+
libdir=${prefix}/lib
3+
includedir=${prefix}/include
4+
5+
Name: libssh2
6+
Description: winlibs libssh2 package
7+
Url: https://github.com/winlibs/libssh2
8+
Version: 1.11.1
9+
Libs: -L${libdir} -llibssh2
10+
Cflags: -I${includedir}

.pkg-config/pkgconfig/nghttp2.pc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=C:/usr
2+
libdir=${prefix}/lib
3+
includedir=${prefix}/include
4+
5+
Name: nghttp2
6+
Description: winlibs nghttp2 package
7+
Url: https://github.com/winlibs/nghttp2
8+
Version: 1.63.0
9+
Libs: -L${libdir} -lnghttp2
10+
Cflags: -I${includedir}

ext/curl/config.w32

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
ARG_WITH("curl", "cURL support", "no");
44

55
if (PHP_CURL != "no") {
6-
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
7-
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
6+
if (PKG_CHECK_MODULES("LIBCURL", "libcurl") &&
87
SETUP_OPENSSL("curl", PHP_CURL) >= 2 &&
98
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
109
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
1110
SETUP_ZLIB_LIB("curl", PHP_CURL) &&
12-
(CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
13-
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
14-
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
15-
) {
11+
CHECK_LIB("normaliz.lib", "curl", PHP_CURL)
12+
) {
13+
PHP_EVAL_INCLINE(LIBCURL_CFLAGS, "curl");
14+
PHP_EVAL_LIBLINE(LIBCURL_LIBS, "curl");
1615
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
1716
AC_DEFINE('HAVE_CURL', 1, "Define to 1 if the PHP extension 'curl' is available.");
1817
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB /D PHP_CURL_EXPORTS=1");

0 commit comments

Comments
 (0)