$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

On Mac OS X 10.8 situation is slightly different. Highly voted solution from Bob Spryn doesn't work, because it doesn't create symlinks, so after installing autoconf you should make them:

sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoconf /usr/bin/autoconf
sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoheader /usr/bin/autoheader

I know that this question was for 10.7, but I hope my answer is useful for someone on 10.8. :)

Updated: Also works on 10.10 Yosemite.


brew install autoconf

Much easier solution


You need to install autoconfig. I usually like to install libraries from source. So you can do the following:

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install

I just went through this with Mountain Lion.