Building php-gtk2 under Ubuntu 8.10

I write this post because compile PHP-GTK 2 in Ubuntu Intrepid is not as obvious as it should be, or at least as they say here.

I downloaded the latest stable version of PHP-GTK 2, 2.0.1 but when trying to compile it throws some errors. In Launchpad there is a report about this bug. The fix for this is

$ cd /usr/share/aclocal
$ cat lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 >> libtool.m4

due to a problem with libtool. But after do that I found still errors during compilation. I also try  using the lastest CVS version but the errors continued. And the final solution was to download the previous version to stable (version 2.0.0) of PHP-GTK2. This is the link to download http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.0.tar.gz

Once downloaded, you just have to make

$ ./buildconf --with-phpize=/usr/bin/phpize5
$ ./configure --with-php-config=/usr/bin/php-config5
$ make
$ sudo make install

Then you need create /etc/php5/conf.d/php_gtk2.ini, with the following content

extension=php_gtk2.so

and you can check if the module was loaded correctly with

$ php -m|grep php-gtk

and ready, that's all!