mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
27 lines
652 B
PHP
27 lines
652 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace SPC\builder\extension;
|
||
|
|
|
||
|
|
use SPC\builder\Extension;
|
||
|
|
use SPC\util\CustomExt;
|
||
|
|
|
||
|
|
#[CustomExt('event')]
|
||
|
|
class event extends Extension
|
||
|
|
{
|
||
|
|
public function getUnixConfigureArg(): string
|
||
|
|
{
|
||
|
|
$arg = '--with-event-core --with-event-extra --with-event-libevent-dir=' . BUILD_ROOT_PATH;
|
||
|
|
if ($this->builder->getLib('openssl')) {
|
||
|
|
$arg .= ' --with-event-openssl=' . BUILD_ROOT_PATH;
|
||
|
|
}
|
||
|
|
if ($this->builder->getExt('sockets')) {
|
||
|
|
$arg .= ' --enable-event-sockets';
|
||
|
|
} else {
|
||
|
|
$arg .= ' --disable-event-sockets';
|
||
|
|
}
|
||
|
|
return $arg;
|
||
|
|
}
|
||
|
|
}
|