Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Upstream-status: Unknown |
| 2 | |
| 3 | diff --git a/acinclude.m4 b/acinclude.m4 |
| 4 | index a6c0d84..df11abd 100644 |
| 5 | --- a/acinclude.m4 |
| 6 | +++ b/acinclude.m4 |
| 7 | @@ -2452,7 +2452,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ |
| 8 | dnl Check libc first if no path is provided in --with-iconv |
| 9 | dnl |
| 10 | |
| 11 | - if test "$PHP_ICONV" = "yes"; then |
| 12 | + dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes |
| 13 | + if test "$PHP_ICONV" != "no"; then |
| 14 | dnl Reset LIBS temporarily as it may have already been included |
| 15 | dnl -liconv in. |
| 16 | LIBS_save="$LIBS" |
| 17 | diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 |
| 18 | index d673b0a..1fbef13 100644 |
| 19 | --- a/ext/iconv/config.m4 |
| 20 | +++ b/ext/iconv/config.m4 |
| 21 | @@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then |
| 22 | |
| 23 | if test "$iconv_avail" != "no"; then |
| 24 | if test -z "$ICONV_DIR"; then |
| 25 | - for i in /usr/local /usr; do |
| 26 | + for i in $PHP_ICONV /usr/local /usr; do |
| 27 | if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then |
| 28 | PHP_ICONV_PREFIX="$i" |
| 29 | break |
| 30 | -- |
| 31 | 1.9.3 |
| 32 | |