mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Looks like ngtcp2 does not happy with pkg-config
This commit is contained in:
parent
4cdafe2497
commit
dea3c4afeb
@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||
use SPC\builder\macos\library\MacOSLibraryBase;
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\exception\WrongUsageException;
|
||||
@ -19,17 +21,23 @@ trait ngtcp2
|
||||
protected function build(): void
|
||||
{
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->optionalLib('openssl', fn ($lib) => implode(' ', [
|
||||
->optionalLib('openssl', fn (LinuxLibraryBase|MacOSLibraryBase $lib) => implode(' ', [
|
||||
'--with-openssl=yes',
|
||||
"OPENSSL_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||
"OPENSSL_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||
]), '--with-openssl=no')
|
||||
->optionalLib('libev', ...ac_with_args('libev', true))
|
||||
->optionalLib('nghttp3', ...ac_with_args('libnghttp3', true))
|
||||
->optionalLib('jemalloc', ...ac_with_args('jemalloc', true))
|
||||
->optionalLib(
|
||||
'brotli',
|
||||
fn ($lib) => implode(' ', [
|
||||
'--with-libbrotlidec=yes',
|
||||
fn (LinuxLibraryBase|MacOSLibraryBase $lib) => implode(' ', [
|
||||
'--with-brotlidec=yes',
|
||||
"LIBBROTLIDEC_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||
"LIBBROTLIDEC_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||
'--with-libbrotlienc=yes',
|
||||
"LIBBROTLIENC_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||
"LIBBROTLIENC_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||
])
|
||||
)
|
||||
->appendEnv(['PKG_CONFIG' => '$PKG_CONFIG --static'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user