You must have rrdtool installed and the include and lib files available. Namely rrd.h and librrd.a are needed for php_rrdtool to compile.
php_rrdtool.tgz
tar zxvf php_rrdtool.tgz
phpize./configure --with-rrdtool=/path/to/rrdtool-1.x.x
Replace x.x by the rrdtool version installed on your system.
If you get errors here about rrdtool not being installed it's because the rrd.h file isn't found. Make sure you have the right path in the command above. It could mean you need to install rrdtool from source.
Now:
make && make install
Should do the trick. Don't forget to restart apache!
php_rrdtool.tgz
/usr/local/src/php-5.1.3/ext/
One tricky part to this is that I had to remove the old configuration file first before the new one could be created.
ext directory just cd ..
mv ./configure ./configure.old
PHP_AUTOCONF=autoconf-2.13 ./buildconf --force./buildconf --force
--with-rrdtool option