Skip to content

Commit

Permalink
Merge branch 'PHP-8.3' into PHP-8.4
Browse files Browse the repository at this point in the history
* PHP-8.3:
  Fix GH-17855: CURL_STATICLIB flag set even if linked with shared lib
  • Loading branch information
cmb69 committed Feb 21, 2025
2 parents 77847b0 + 29c39a3 commit 07a3719
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ PHP NEWS

- Windows:
. Fixed phpize for Windows 11 (24H2). (bwoebi)
. Fixed GH-17855 (CURL_STATICLIB flag set even if linked with shared lib).
(cmb)

- Zlib:
. Fixed bug GH-17745 (zlib extension incorrectly handles object arguments).
Expand Down
8 changes: 6 additions & 2 deletions ext/curl/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ if (PHP_CURL != "no") {
}
}

if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
var curl_location;
if ((curl_location = CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL)) &&
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
SETUP_OPENSSL("curl", PHP_CURL) >= 2 &&
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
Expand All @@ -27,7 +28,10 @@ if (PHP_CURL != "no") {
) {
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, "Define to 1 if the PHP extension 'curl' is available.");
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB /D PHP_CURL_EXPORTS=1");
ADD_FLAG("CFLAGS_CURL", "/D PHP_CURL_EXPORTS=1");
if (curl_location.match(/libcurl_a\.lib$/)) {
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
}
PHP_INSTALL_HEADERS("ext/curl", "php_curl.h");
} else {
WARNING("curl not enabled; libraries and headers not found");
Expand Down

0 comments on commit 07a3719

Please sign in to comment.