Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CURL_STATICLIB flag set even if linked with shared lib #17855

Closed
@nono303

Description

@nono303

Description

Looking athttps://github.com/php/php-src/blob/master/ext/curl/config.w32#L18 when compilingext/curl on Windows, CFLAGCURL_STATICLIB is set event if linked withshared libcurl.
I don’t know the extent of the impact but it might be interesting to set it only when it’s built againststatic libcurl.
My working patch(which can definitely be improved)

diff --git a/ext/curl/config.w32 b/ext/curl/config.w32index 82be5212e5..14ac3ffca1 100644--- a/ext/curl/config.w32+++ b/ext/curl/config.w32@@ -27,7 +27,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 (CHECK_LIB("libcurl_a.lib", "curl", PHP_CURL)){+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");

PHP Version

PHP 8.4.4

Operating System

Windows 11 - MSVC x64 build

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp