X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fpharext%2FTask%2FConfigure.php;fp=src%2Fpharext%2FTask%2FConfigure.php;h=3effbfbb28b51c331bc71893e7d2b1933b12a78a;hb=861260c111bff72f60665393660b6f5375559510;hp=0000000000000000000000000000000000000000;hpb=d774f309d3216bf1923f6bd5b49ee0fb287e0ce7;p=pharext%2Fpharext diff --git a/src/pharext/Task/Configure.php b/src/pharext/Task/Configure.php new file mode 100644 index 0000000..3effbfb --- /dev/null +++ b/src/pharext/Task/Configure.php @@ -0,0 +1,54 @@ +cwd = $cwd; + $cmd = $common_name . "-config"; + if (isset($prefix)) { + $cmd = $prefix . "/bin/" . $cmd; + } + $this->args = ["--with-php-config=$cmd"]; + if ($args) { + $this->args = array_merge($this->args, $args); + } + } + + public function run($verbose = false) { + $pwd = getcwd(); + if (!chdir($this->cwd)) { + throw new Exception; + } + try { + $cmd = new ExecCmd("./configure", $verbose); + $cmd->run($this->args); + } finally { + chdir($pwd); + } + } +}