XAMPP 1.7.7 for Linux の PHP を 5.3.24 にバージョンアップする

Ubuntu 12.04 で XAMPP 1.7.7 for LinuxPHP を 5.3.20 にバージョンアップしました。

まず、コンパイルに必要なパッケージを追加します。

$ sudo apt-get install libltdl-dev libreadline6-dev

PHP のソースを展開します。

$ tar xvf php-5.3.24.tar.bz2
$ cd php-5.3.24

phpinfo() から Configure Command をコピーし、環境変数 EXTRA_LIBS="-liconv -lstdc++" を追加して、ペーストします。

$ EXTRA_LIBS="-liconv -lstdc++" './configure' '--prefix=/opt/lampp' '--with-apxs2=/opt/lampp/bin/apxs' '--with-config-file-path=/opt/lampp/etc' '--with-mysql=mysqlnd' '--enable-inline-optimization' '--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-magic-quotes' '--enable-shmop' '--disable-sigchild' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-gdbm=/opt/lampp' '--with-jpeg-dir=/opt/lampp' '--with-png-dir=/opt/lampp' '--with-freetype-dir=/opt/lampp' '--with-zlib=yes' '--with-zlib-dir=/opt/lampp' '--with-openssl=/opt/lampp' '--with-xsl=/opt/lampp' '--with-ldap=/opt/lampp' '--with-gd' '--with-imap-ssl' '--with-imap=/opt/lampp' '--with-gettext=/opt/lampp' '--with-mssql=/opt/lampp' '--with-sybase-ct=/opt/lampp' '--with-mysql-sock=/opt/lampp/var/mysql/mysql.sock' '--with-mcrypt=/opt/lampp' '--with-mhash=/opt/lampp' '--enable-sockets' '--enable-mbstring=all' '--with-curl=/opt/lampp' '--enable-mbregex' '--enable-zend-multibyte' '--enable-exif' '--with-bz2=/opt/lampp' '--with-sqlite=shared,/opt/lampp' '--with-sqlite3=/opt/lampp' '--with-libxml-dir=/opt/lampp' '--enable-soap' '--enable-pcntl' '--with-mysqli=mysqlnd' '--with-iconv' '--with-pdo-mysql=mysqlnd' '--with-pdo-sqlite' '--enable-intl' '--with-icu-dir=/opt/lampp' '--enable-fileinfo' '--enable-phar' --with-xmlrpc --with-readline

以下のオプションは削除しました。

'--with-interbase=shared,/opt/interbase'
'--with-oci8=shared,instantclient,/opt/lampp/lib/instantclient'
'--with-pdo-pgsql=/opt/lampp/postgresql'
'--with-pgsql=shared,/opt/lampp/postgresql'
'--enable-intl'

以下のオプションを追加しました。

--with-xmlrpc
--with-readline

コンパイルしてインストールします。コンパイルは手許の環境では 5分59秒かかりました。

$ time make
$ sudo make install

おしまい。