com web/php: Slight improvement for dependencies installation and configure procedures: get-involved.php

From: Date: Fri, 01 Jul 2011 21:31:37 +0000
Subject: com web/php: Slight improvement for dependencies installation and configure procedures: get-involved.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-23515@lists.php.net to get a copy of this message
Commit: e26a8bbd1d6f3c616b16d6494a03702cc8f17b8f Author: Hannes Magnusson <bjori@php.net> Fri, 1 Jul 2011 21:31:37 +0000 Parents: a38ce55c827583264297027b170aab167e59df67 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e26a8bbd1d6f3c616b16d6494a03702cc8f17b8f Log: Slight improvement for dependencies installation and configure procedures Changed paths: M get-involved.php Diff: diff --git a/get-involved.php b/get-involved.php index f38cc97..bcfcbeb 100644 --- a/get-involved.php +++ b/get-involved.php @@ -18,18 +18,49 @@ site_header("Get Involved", array("current" => "community")); <h2>Improving PHP</h2> <p> - On Linux you'll need have the following + This particular article assumes you are running <i>Ubuntu Linux</i>. +</p> +<p> + To get a working build environment you need to run the following command; + <ul> + <li>sudo apt-get build-dep php5</li> + </ul> +For any extension that requires 3rd party libraries you need to install those libraries. +The simplest way to accomplish that is to to use <em>apt-get</em> to install the Ubuntu build dependencies for that particular extension. For example, if you want to build PHP with <a href="/manual/intl">intl</a> support you have to run; + <ul> + <li>sudo apt-get build-dep php5<em>-intl</em></li> + </ul> +to install the ext/intl dependencies. +</p> +<p> +To actually build PHP with ext/intl support you need to configure PHP to enable it, f.e. + <ul> + <li>./configure --enable-intl</li> + </ul> + The rule of thumb for configuring PHP is;<br /> <ul> - <li>autoconf</li> - <li>automake</li> - <li>gcc</li> - <li>bison</li> - <li>flex</li> - <li>re2c</li> + <li>If its a pure PHP functionality use <em>--enable</em>extension-name<br /> + Example; + <ul> + <li>./configure --enable-soap</li> + </ul> + </li> + <li>And for extensions wrapping external libraries use <em>--with</em>-extension-name<br /> + Example; + <ul> + <li>./configure --with-m--with-pgsql</li> + </ul> + </li> </ul> + But as you saw with ext/intl, rules are meant to be broken - so you <em>should</em> check <i>./configure --help</i> first.<br /> + When PHP encounters unknown configure argument you will be notified in the end, so you can modify your arguments and re-run ./configure before executing <em>make</em>. +</p> +<p> +PHP creates a script called <em>config.nice</em> after every successful <em>./configure --some --arguments</em> so you don't have to remember all the options you passed to ./configure every time you want to rebuild PHP, running <em>./config.nice</em> will do that for you </p> + <p> -Once you have those tools installed you'll need to checkout PHP from SVN, configure and build it; +Once you have the build dependencies installed you'll need to checkout PHP from SVN, configure and build it; <ul> <li>svn co https://svn.php.net/repository/php/php-src/branches/PHP_5_4 php54</li> <li>cd php54</li>

« previous php.webmaster (#23515) next »