mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
26 lines
659 B
PHP
26 lines
659 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace SPC\builder\extension;
|
||
|
|
|
||
|
|
use SPC\builder\Extension;
|
||
|
|
use SPC\util\CustomExt;
|
||
|
|
|
||
|
|
#[CustomExt('gd')]
|
||
|
|
class gd extends Extension
|
||
|
|
{
|
||
|
|
public function getUnixConfigureArg(): string
|
||
|
|
{
|
||
|
|
$arg = '--enable-gd';
|
||
|
|
if ($this->builder->getLib('freetype')) {
|
||
|
|
$arg .= ' --with-freetype ' .
|
||
|
|
'FREETYPE2_CFLAGS=-I"' . BUILD_INCLUDE_PATH . '/freetype2" ' .
|
||
|
|
'FREETYPE2_LIBS="' . $this->getLibFilesString() . '"';
|
||
|
|
}
|
||
|
|
$arg .= ' PNG_CFLAGS=-I"' . BUILD_INCLUDE_PATH . '" ' .
|
||
|
|
'PNG_LIBS="' . $this->getLibFilesString() . '"';
|
||
|
|
return $arg;
|
||
|
|
}
|
||
|
|
}
|