Skip to content

Instantly share code, notes, and snippets.

@nazo
Created January 16, 2020 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazo/6e277b27d0dbf13fc3f1c956f4bb41cf to your computer and use it in GitHub Desktop.
Save nazo/6e277b27d0dbf13fc3f1c956f4bb41cf to your computer and use it in GitHub Desktop.
Macでphp-buildする時の環境変数など一式

php-build 7.4.1

brew install libedit libiconv libxml2 oniguruma bzip2 libzip libpng icu4c libressl tidy-html5
export PATH="/usr/local/opt/krb5/bin:$PATH"
export PATH="/usr/local/opt/krb5/sbin:$PATH"
export PATH="/usr/local/opt/libressl/bin:$PATH"
export PATH="/usr/local/opt/bzip2/bin:$PATH"
export PATH="/usr/local/opt/libiconv/bin:$PATH"
export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PATH="/usr/local/opt/icu4c/sbin:$PATH"
export PATH="/usr/local/opt/libxml2/bin:$PATH"

export LDFLAGS="-L/usr/local/opt/krb5/lib -L/usr/local/opt/libressl/lib -L/usr/local/opt/bzip2/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libedit
export CPPFLAGS="-I/usr/local/opt/krb5/include -I/usr/local/opt/libressl/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/icu4c/include -I/

export PKG_CONFIG_PATH="/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libedit/lib/pkgconfig:/usr/local/o

export PHP_BUILD_CONFIGURE_OPTS="--with-bz2=$(brew --prefix bzip2) --with-iconv=$(brew --prefix libiconv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment