To install the pecl run following command:
sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin
To install autoconf:
brew install autoconf
To install intl:
cd /Applications/XAMPP/bin
Then php -m | grep intl, if it returns you intl then it is installed. If not installed then should return empty.
Now,
sudo ./pecl install intl
Will ask specify where ICU libraries and headers can be found, simply hit enter,
And this will install intl, also will return this message You should add "extension=intl.so" to php.ini.
restart your apache: sudo apachectl restart