Created
September 16, 2020 15:35
-
-
Save heinthanth/bb6544153bcaf6652303ebceff471f3e to your computer and use it in GitHub Desktop.
Build PHP 8 on macOS.
This file contains hidden or 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
#!/usr/bin/env bash | |
brew install pkg-config iconv openssl oniguruma postgresql libzip | |
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
export LDFLAGS="-L /usr/local/opt/[email protected]/lib -L /usr/local/opt/readline/lib" | |
export CPPFLAGS="-I /usr/local/opt/[email protected]/include -I /usr/local/opt/readline/include" | |
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig" | |
./configure --prefix=$HOME/opt/php \ | |
--with-iconv=$(brew --prefix libiconv) \ | |
--enable-mysqlnd \ | |
--with-pdo-mysql \ | |
--with-pdo-mysql=mysqlnd \ | |
--with-pdo-pgsql=/usr/bin/pg_config \ | |
--enable-bcmath \ | |
--enable-fpm \ | |
--with-fpm-user=www-data \ | |
--with-fpm-group=www-data \ | |
--enable-mbstring \ | |
--enable-phpdbg \ | |
--enable-shmop \ | |
--enable-sockets \ | |
--enable-sysvmsg \ | |
--enable-sysvsem \ | |
--enable-sysvshm \ | |
--with-zip \ | |
--with-zlib \ | |
--with-curl \ | |
--with-pear \ | |
--with-openssl \ | |
--enable-pcntl \ | |
--with-readline=$(brew --prefix readline) | |
make -jN # N = number of core | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment