File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ PHP NEWS
75
75
76
76
- Windows:
77
77
. Fixed phpize for Windows 11 (24H2). (bwoebi)
78
+ . Fixed GH-17855 (CURL_STATICLIB flag set even if linked with shared lib).
79
+ (cmb)
78
80
79
81
- Zlib:
80
82
. Fixed bug GH-17745 (zlib extension incorrectly handles object arguments).
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ if (PHP_CURL != "no") {
13
13
}
14
14
}
15
15
16
- if ( CHECK_LIB ( "libcurl_a.lib;libcurl.lib" , "curl" , PHP_CURL ) &&
16
+ var curl_location ;
17
+ if ( ( curl_location = CHECK_LIB ( "libcurl_a.lib;libcurl.lib" , "curl" , PHP_CURL ) ) &&
17
18
CHECK_HEADER_ADD_INCLUDE ( "curl/easy.h" , "CFLAGS_CURL" ) &&
18
19
SETUP_OPENSSL ( "curl" , PHP_CURL ) >= 2 &&
19
20
CHECK_LIB ( "winmm.lib" , "curl" , PHP_CURL ) &&
@@ -27,7 +28,10 @@ if (PHP_CURL != "no") {
27
28
) {
28
29
EXTENSION ( "curl" , "interface.c multi.c share.c curl_file.c" ) ;
29
30
AC_DEFINE ( 'HAVE_CURL' , 1 , "Define to 1 if the PHP extension 'curl' is available." ) ;
30
- ADD_FLAG ( "CFLAGS_CURL" , "/D CURL_STATICLIB /D PHP_CURL_EXPORTS=1" ) ;
31
+ ADD_FLAG ( "CFLAGS_CURL" , "/D PHP_CURL_EXPORTS=1" ) ;
32
+ if ( curl_location . match ( / l i b c u r l _ a \. l i b $ / ) ) {
33
+ ADD_FLAG ( "CFLAGS_CURL" , "/D CURL_STATICLIB" ) ;
34
+ }
31
35
PHP_INSTALL_HEADERS ( "ext/curl" , "php_curl.h" ) ;
32
36
} else {
33
37
WARNING ( "curl not enabled; libraries and headers not found" ) ;
You can’t perform that action at this time.
0 commit comments