File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-de
55
55
On MacOS, you can install these using ` brew ` :
56
56
57
57
``` shell
58
- brew install autoconf bison re2c iconv libxml2 sqlite
58
+ brew install autoconf bison re2c libiconv libxml2 sqlite
59
59
```
60
60
61
61
or with ` MacPorts ` :
Original file line number Diff line number Diff line change @@ -1796,7 +1796,17 @@ AC_DEFUN([PHP_SETUP_ICONV], [
1796
1796
1797
1797
dnl Check external libs for iconv funcs.
1798
1798
AS_VAR_IF ( [ found_iconv] , [ no] , [
1799
- for i in $PHP_ICONV /usr/local /usr; do
1799
+
1800
+ dnl Find /opt/homebrew/opt/libiconv on macOS
1801
+ dnl See: https://github.com/php/php-src/pull/19475
1802
+ php_brew_prefix=no
1803
+ AC_CHECK_PROG ( [ BREW] , [ brew] , [ brew] )
1804
+ if test -n "$BREW"; then
1805
+ AC_MSG_CHECKING ( [ for homebrew prefix] )
1806
+ php_brew_prefix=$($BREW --prefix 2> /dev/null)
1807
+ fi
1808
+
1809
+ for i in $PHP_ICONV $php_brew_prefix/opt/libiconv /usr/local /usr; do
1800
1810
if test -r $i/include/gnu-libiconv/iconv.h; then
1801
1811
ICONV_DIR=$i
1802
1812
ICONV_INCLUDE_DIR=$i/include/gnu-libiconv
You can’t perform that action at this time.
0 commit comments