separate alternative libs

This commit is contained in:
crazywhalecc 2023-10-01 01:06:11 +08:00 committed by Jerry Ma
parent 654c5cba0c
commit 8f43a09533

View File

@ -8,6 +8,13 @@ trait ldap
{
protected function build(): void
{
$alt = '';
// openssl support
$alt .= $this->builder->getLib('openssl') && $this->builder->getExt('zlib') ? '--with-tls=openssl ' : '';
// gmp support
$alt .= $this->builder->getLib('gmp') ? '--with-mp=gmp ' : '';
// libsodium support
$alt .= $this->builder->getLib('libsodium') ? '--with-argon2=libsodium ' : '';
shell()->cd($this->source_dir)
->exec(
$this->builder->configure_env . ' ' .
@ -19,9 +26,7 @@ trait ldap
'--disable-slurpd ' .
'--without-systemd ' .
'--without-cyrus-sasl ' .
($this->builder->getLib('openssl') && $this->builder->getExt('zlib') ? '--with-tls=openssl ' : '') .
($this->builder->getLib('gmp') ? '--with-mp=gmp ' : '') .
($this->builder->getLib('libsodium') ? '--with-argon2=libsodium ' : '') .
$alt .
'--prefix='
)
->exec('make clean')