mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
24 lines
549 B
PHP
24 lines
549 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace SPC\builder\extension;
|
||
|
|
|
||
|
|
use SPC\builder\Extension;
|
||
|
|
use SPC\store\FileSystem;
|
||
|
|
use SPC\util\CustomExt;
|
||
|
|
|
||
|
|
#[CustomExt('ldap')]
|
||
|
|
class ldap extends Extension
|
||
|
|
{
|
||
|
|
public function patchBeforeConfigure(): bool
|
||
|
|
{
|
||
|
|
$output = shell()->execWithResult('$PKG_CONFIG --libs-only-l --static ldap');
|
||
|
|
if (!empty($output[1][0])) {
|
||
|
|
$libs = $output[1][0];
|
||
|
|
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/configure', '-lldap ', $libs . ' ');
|
||
|
|
}
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|