mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
27 lines
604 B
PHP
27 lines
604 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
use SPC\builder\Extension;
|
|
use SPC\util\CustomExt;
|
|
|
|
#[CustomExt('redis')]
|
|
class redis extends Extension
|
|
{
|
|
public function getUnixConfigureArg(): string
|
|
{
|
|
$arg = '--enable-redis';
|
|
if (!$this->builder->getExt('session')) {
|
|
$arg .= ' --disable-redis-session';
|
|
} else {
|
|
$arg .= ' --enable-redis-session';
|
|
}
|
|
if ($this->builder->getLib('zstd')) {
|
|
$arg .= ' --enable-redis-zstd --with-libzstd="' . BUILD_ROOT_PATH . '"';
|
|
}
|
|
return $arg;
|
|
}
|
|
}
|