mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
24 lines
730 B
PHP
24 lines
730 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
use SPC\builder\Extension;
|
|
use SPC\util\CustomExt;
|
|
|
|
#[CustomExt('swoole')]
|
|
class swoole extends Extension
|
|
{
|
|
public function getUnixConfigureArg(): string
|
|
{
|
|
$arg = '--enable-swoole';
|
|
// pgsql hook is buggy for static php
|
|
$arg .= ' --disable-swoole-pgsql';
|
|
$arg .= $this->builder->getLib('openssl') ? ' --enable-openssl' : ' --disable-openssl --without-openssl';
|
|
$arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ' --disable-brotli';
|
|
$arg .= $this->builder->getExt('curl') ? ' --enable-swoole-curl' : ' --disable-swoole-curl';
|
|
return $arg;
|
|
}
|
|
}
|