Create php-arg.sh

This commit is contained in:
Whale 2021-06-02 00:35:07 +08:00 committed by GitHub
parent 6e9a975e94
commit 89a1526501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

52
docker/php-arg.sh Normal file
View File

@ -0,0 +1,52 @@
_php_arg="--prefix=/app/php-dist"
_php_arg="$_php_arg --disable-all"
_php_arg="$_php_arg --enable-shared=no"
_php_arg="$_php_arg --enable-static=yes"
_php_arg="$_php_arg --enable-inline-optimization"
_php_arg="$_php_arg --with-layout=GNU"
_php_arg="$_php_arg --enable-calendar"
_php_arg="$_php_arg --enable-ctype"
_php_arg="$_php_arg --enable-filter"
_php_arg="$_php_arg --enable-openssl"
_php_arg="$_php_arg --enable-bcmath"
_php_arg="$_php_arg --with-openssl-dir=/usr"
_php_arg="$_php_arg --enable-pcntl"
_php_arg="$_php_arg --enable-openssl"
_php_arg="$_php_arg --with-openssl"
_php_arg="$_php_arg --with-iconv"
_php_arg="$_php_arg --enable-json"
_php_arg="$_php_arg --enable-mbstring"
_php_arg="$_php_arg --enable-phar"
_php_arg="$_php_arg --enable-pdo"
_php_arg="$_php_arg --with-pdo-mysql=mysqlnd"
_php_arg="$_php_arg --enable-sockets"
_php_arg="$_php_arg --enable-swoole"
_php_arg="$_php_arg --enable-inotify"
_php_arg="$_php_arg --enable-redis"
_php_arg="$_php_arg --disable-redis-session"
_php_arg="$_php_arg --enable-simplexml"
_php_arg="$_php_arg --enable-dom"
_php_arg="$_php_arg --enable-xml"
_php_arg="$_php_arg --enable-xmlwriter"
_php_arg="$_php_arg --enable-xmlreader"
_php_arg="$_php_arg --with-zlib"
_php_arg="$_php_arg --enable-posix"
_php_arg="$_php_arg --enable-mysqlnd"
_php_arg="$_php_arg --enable-tokenizer"
_php_arg="$_php_arg --with-curl"
_php_arg="$_php_arg --with-pear=no"
_php_arg="$_php_arg --disable-cgi"
_php_arg="$_php_arg --disable-phpdbg"
case $1 in
7.3.*|7.2.*)
_php_arg="$_php_arg --with-gd"
_php_arg="$_php_arg --enable-libxml"
_php_arg="$_php_arg --enable-hash"
;;
*)
_php_arg="$_php_arg --enable-gd"
_php_arg="$_php_arg --with-libxml"
;;
esac
echo $_php_arg