From c0438262ae866a9902d281d6acd50136eb4a1aca Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 13 Mar 2019 11:14:46 +0800 Subject: [PATCH] Update install.sh --- plugins/php/versions/53/install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index ca0823b5d..d02d76a28 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -7,7 +7,7 @@ rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source - +sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl Install_php() @@ -40,15 +40,18 @@ if [ -f $serverPath/php/53/bin/php ];then return fi -# -# --without-iconv=$serverPath/lib/libiconv \ +OPTIONS='' +if [ $sysName == 'Darwin' ]; then + OPTIONS='--without-iconv' +else + OPTIONS="--with-iconv=${serverPath}/lib/libiconv" +fi # --enable-intl \ cd $sourcePath/php/php-5.3.29 && ./configure \ --prefix=$serverPath/php/53 \ --exec-prefix=$serverPath/php/53 \ --with-config-file-path=$serverPath/php/53/etc \ ---without-iconv \ --with-zlib-dir=$serverPath/lib/zlib \ --enable-zip \ --enable-exif \ @@ -70,6 +73,7 @@ cd $sourcePath/php/php-5.3.29 && ./configure \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ +$OPTIONS \ --enable-fpm \ && make && make install && make clean @@ -91,7 +95,7 @@ Uninstall_php() { $serverPath/php/init.d/php53 stop rm -rf $serverPath/php/53 - echo "卸载php-5.3.29 ..." > $install_tmp + echo "uninstall php-5.3.29 ..." > $install_tmp } action=${1}