Skip to content

Instantly share code, notes, and snippets.

@bylatt
Last active December 11, 2017 06:34
Show Gist options
  • Select an option

  • Save bylatt/a9dad8569bbdef75614c to your computer and use it in GitHub Desktop.

Select an option

Save bylatt/a9dad8569bbdef75614c to your computer and use it in GitHub Desktop.

Build php 7.0 manually on macOS High Sierra

Install dependencies using homebrew

brew install autoconf automake gd icu4c libtool mcrypt openssl

Run configure script with these options

./configure \
  --prefix=/opt/php70 \
  --with-config-file-path=/opt/php70/etc \
  --enable-cli \
  --enable-gd-native-ttf \
  --enable-gd-jis-conv \
  --enable-exif \
  --enable-bcmath \
  --enable-mbstring \
  --enable-sockets \
  --enable-zip \
  --enable-filter \
  --enable-mysqlnd \
  --enable-opcache \
  --enable-simplexml \
  --enable-xmlreader \
  --enable-xmlwriter \
  --with-iconv=/usr \
  --with-libxml-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr \
  --with-freetype-dir=$(brew --prefix freetype) \
  --with-jpeg-dir=$(brew --prefix gd) \
  --with-png-dir=$(brew --prefix gd) \
  --with-webp-dir=$(brew --prefix gd) \
  --with-mcrypt=$(brew --prefix mcrypt) \
  --with-openssl=$(brew --prefix openssl) \
  --with-bz2 \
  --with-curl \
  --with-gd \
  --with-imap-ssl \
  --with-pear \
  --with-pdo-mysql \
  --with-pdo-sqlite \
  --with-pdo-pgsql \
  --with-xmlrpc \
  --with-xsl \
  --with-zlib \
  --with-libedit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment