mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Added inline compiler optimization for big servers
This commit is contained in:
parent
e5bed548b9
commit
75eb324967
@ -101,9 +101,17 @@ mv pthreads-$PTHREADS_VERSION $DIR/install_data/php/ext/pthreads
|
|||||||
echo " done!"
|
echo " done!"
|
||||||
|
|
||||||
echo -n "[PHP5] checking..."
|
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
|
cd php
|
||||||
./buildconf --force >> $DIR/install.log 2>&1
|
./buildconf --force >> $DIR/install.log 2>&1
|
||||||
./configure --prefix=$DIR/php5 \
|
./configure $OPTIMIZATION--prefix=$DIR/php5 \
|
||||||
--exec-prefix=$DIR/php5 \
|
--exec-prefix=$DIR/php5 \
|
||||||
--enable-embedded-mysqli \
|
--enable-embedded-mysqli \
|
||||||
--enable-bcmath \
|
--enable-bcmath \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user