2023-04-29 18:59:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('mongodb')]
|
|
|
|
|
class mongodb extends Extension
|
|
|
|
|
{
|
|
|
|
|
public function getUnixConfigureArg(): string
|
|
|
|
|
{
|
2023-05-24 03:48:40 +08:00
|
|
|
$arg = ' --enable-mongodb ';
|
|
|
|
|
$arg .= ' --with-mongodb-system-libs=no ';
|
|
|
|
|
$arg .= ' --with-mongodb-sasl=no ';
|
2023-05-08 11:44:44 +08:00
|
|
|
if ($this->builder->getLib('openssl')) {
|
2023-05-24 03:48:40 +08:00
|
|
|
$arg .= '--with-mongodb-ssl=openssl';
|
2023-05-08 11:44:44 +08:00
|
|
|
}
|
|
|
|
|
if ($this->builder->getLib('icu')) {
|
2023-05-24 03:48:40 +08:00
|
|
|
$arg .= ' --with-mongodb-icu=yes ';
|
2023-05-08 11:44:44 +08:00
|
|
|
}
|
|
|
|
|
return $arg;
|
2023-04-29 18:59:47 +08:00
|
|
|
}
|
|
|
|
|
}
|