builder->getLib('ncurses') ? ('--with-libncurses-prefix=' . BUILD_ROOT_PATH . ' ') : ''; $extra .= $this->builder->getLib('libxml2') ? ('--with-libxml2-prefix=' . BUILD_ROOT_PATH . ' ') : ''; $zts = $this->builder->getOption('enable-zts') ? '--enable-threads=isoc+posix ' : '--disable-threads '; $cflags = $this->builder->getOption('enable-zts') ? '-lpthread -D_REENTRANT' : ''; $ldflags = $this->builder->getOption('enable-zts') ? '-lpthread' : ''; shell()->cd($this->source_dir)->initializeEnv($this) ->appendEnv(['CFLAGS' => $cflags, 'LDFLAGS' => $ldflags]) ->exec( './configure ' . '--enable-static ' . '--disable-shared ' . '--enable-pic ' . '--disable-java ' . '--disable-c++ ' . $zts . $extra . '--with-included-gettext ' . '--with-libiconv-prefix=' . BUILD_ROOT_PATH . ' ' . '--prefix=' . BUILD_ROOT_PATH ) ->exec('make clean') ->exec("make -j{$this->builder->concurrency}") ->exec('make install'); $this->patchLaDependencyPrefix(['libintl.la']); } }