Added inline compiler optimization for big servers

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-24 17:11:30 +01:00
parent e5bed548b9
commit 75eb324967

View File

@ -101,9 +101,17 @@ mv pthreads-$PTHREADS_VERSION $DIR/install_data/php/ext/pthreads
echo " done!"
echo -n "[PHP5] checking..."
MAX_MEMORY=$(free -m | awk '/^Mem:/{print $2}')
if [ $MAX_MEMORY -gt 2048 ]
then
echo -n " enabling optimizations..."
OPTIMIZATION="--enable-inline-optimization "
else
OPTIMIZATION=""
fi
cd php
./buildconf --force >> $DIR/install.log 2>&1
./configure --prefix=$DIR/php5 \
./configure $OPTIMIZATION--prefix=$DIR/php5 \
--exec-prefix=$DIR/php5 \
--enable-embedded-mysqli \
--enable-bcmath \