Skip to content

Instantly share code, notes, and snippets.

@platy
Forked from royriojas/install.apc.sh
Last active August 29, 2015 14:01
Show Gist options
  • Save platy/cd7d0cf0d98d4e7c5ec8 to your computer and use it in GitHub Desktop.
Save platy/cd7d0cf0d98d4e7c5ec8 to your computer and use it in GitHub Desktop.
Modified from install.apc.sh for installing the INTL library
#!/bin/bash
echo '===> install intl.so in OSX Mavericks'
mkdir -p ~/tmp/intl-deps
# Compile PCRE - Perl Compatible Regular Expressions
cd ~/tmp/intl-deps
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.33.tar.gz
tar -xvzf pcre-8.33.tar.gz
cd pcre-8.33
./configure
make
sudo make install
HAVE_AUTOCONF=$(which autoconf)
if [[ $HAVE_AUTOCONF == "" ]] ; then
echo '===> no autoconf found'
echo '===> trying to install it...'
cd ~/tmp/intl-deps
curl -O http://gnu.mirrors.hoobly.com/gnu/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
else
echo '===> autoconf found'
fi
echo '===> Now get intl and installed it'
# Compile PHP INTL
cd ~/tmp/intl-deps
curl -O http://pecl.php.net/get/intl-3.0.0.tgz
tar zxvf intl-3.0.0.tgz
cd intl-3.0.0
phpize
./configure --with-php-config=/usr/bin/php-config
make && sudo make install
echo '===> Done!. Modify your php.ini to load the intl.so. See the logs to find the proper location.'
echo '===> usually it is something like this... /usr/lib/php/extensions/no-debug-non-zts-20100525/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment