2023-07-26 00:08:20 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('memcached')]
|
|
|
|
|
class memcached extends Extension
|
|
|
|
|
{
|
2025-03-27 11:12:19 +07:00
|
|
|
public function getUnixConfigureArg(bool $shared = false): string
|
2023-07-26 00:08:20 +08:00
|
|
|
{
|
|
|
|
|
$rootdir = BUILD_ROOT_PATH;
|
2025-03-07 18:25:19 +08:00
|
|
|
$zlib_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : "--with-zlib-dir={$rootdir}";
|
2025-05-22 15:46:42 +07:00
|
|
|
return "--enable-memcached" . ($shared ? '=shared' : '') . " {$zlib_dir} --with-libmemcached-dir={$rootdir} --disable-memcached-sasl --enable-memcached-json";
|
2023-07-26 00:08:20 +08:00
|
|
|
}
|
|
|
|
|
}
|