brew install openssl freetype pkg-config libiconv mhash libmcrypt libjpeg
./configure --prefix=/data/local/php-7.1.15 --with-mysqli --with-pdo-mysql --with-iconv-dir=/usr/local/Cellar/libiconv/1.15/ --with-freetype-dir=/usr/local/Cellar/freetype/2.8.1/ --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --with-curl --with-mcrypt --with-openssl=/usr/local/Cellar/openssl/1.0.2l/ --with-mhash --with-xmlrpc --with-gd --enable-xml --enable-dba --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-gd-native-ttf --enable-pcntl --enable-sockets --enable-zip --enable-soap --disable-rpath --without-pear --with-zlib-dir --with-pcre-dir --with-xsl