I struggled with this issue for a long time and found out that when you run configure, just pass it the path to the correct php-config
tool.
In my case, it was
./configure --with-php-config=/usr/local/zend/bin/php-config
... If you're unsure, run a locate php-config
on your machine and find the right one amongst the different versions installed.
Hope this helps somebody in the future.
PS. My default php-config
was set to 20090926 which is PHP 5.3. The one I manually entered as a param for ./configure was
for PHP 5.4 (2010...)