Add libcares support for curl

This commit is contained in:
crazywhalecc 2024-08-08 01:12:07 +08:00 committed by Jerry Ma
parent 9259f8e53d
commit 4f5177d57e
3 changed files with 6 additions and 3 deletions

View File

@ -53,7 +53,8 @@
"libssh2",
"brotli",
"nghttp2",
"zstd"
"zstd",
"libcares"
],
"lib-suggests-windows": [
"brotli",

View File

@ -47,6 +47,8 @@ trait curl
$extra .= $this->builder->getLib('idn2') ? '-DUSE_LIBIDN2=ON ' : '-DUSE_LIBIDN2=OFF ';
// lib:psl
$extra .= $this->builder->getLib('psl') ? '-DCURL_USE_LIBPSL=ON ' : '-DCURL_USE_LIBPSL=OFF ';
// lib:libcares
$extra .= $this->builder->getLib('libcares') ? '-DENABLE_ARES=ON ' : '';
FileSystem::resetDir($this->source_dir . '/build');
// compile

View File

@ -19,13 +19,13 @@ $upx = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'imap,swoole,openssl,rar',
'Linux', 'Darwin' => 'curl',
'Windows' => 'amqp,apcu',
};
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
$with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => '',
'Linux', 'Darwin' => 'libcares',
'Windows' => '',
};