-
-
Save lucenarenato/3d4b222fb00a47bca788797ba6527d53 to your computer and use it in GitHub Desktop.
A quick configure script for building PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PHP=$1 | |
if [ $# -lt 1 ] | |
then | |
echo "Usage: $0 <php-version>" | |
echo | |
echo "php-version: php7 $PHP" | |
echo | |
exit 1 | |
fi | |
echo "Installation of PHP in /opt/$PHP with config in /etc/$PHP" | |
LIBDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr | |
#LIBDIR=/usr | |
CC=gcc ./configure \ | |
--prefix=/opt/$PHP \ | |
--enable-cli \ | |
--enable-sockets \ | |
--enable-zip \ | |
--enable-exif \ | |
--enable-gd-jis-conv \ | |
--enable-gd-native-ttf \ | |
--enable-ftp \ | |
--enable-soap \ | |
--enable-mbstring \ | |
--without-iconv \ | |
--with-config-file-path=/etc/$PHP \ | |
--with-config-file-scan-dir=/etc/$PHP/ext \ | |
--with-curl \ | |
--with-apxs2=/usr/sbin/apxs \ | |
--with-libxml-dir=$LIBDIR \ | |
--with-libedit=$LIBDIR \ | |
--with-zlib=$LIBDIR \ | |
--with-gd \ | |
--with-png-dir=$LIBDIR \ | |
--with-jpeg-dir=$LIBDIR \ | |
--with-openssl=/usr/local \ | |
--with-mysqli \ | |
--with-pdo-mysql \ | |
--with-mysql-sock=/tmp/mysql.sock | |
#--enable-intl \ | |
#--with-iconv-dir=$LIBDIR/lib \ | |
#--with-mcrypt=$LIBDIR/bin \ | |
#--with-openssl=$LIBDIR/ssl \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment