Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 2 Nov
 2011 16:54:57 +0100 Subject: [PATCH] Upstream-Status: Pending

update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 build/php.m4        | 3 ++-
 ext/iconv/config.m4 | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/build/php.m4 b/build/php.m4
index 7392876..5c45d13 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
   echo > ext/iconv/php_iconv_supports_errno.h
 
   dnl Check libc first if no path is provided in --with-iconv.
-  if test "$PHP_ICONV" = "yes"; then
+  dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
+  if test "$PHP_ICONV" != "no"; then
     dnl Reset LIBS temporarily as it may have already been included -liconv in.
     LIBS_save="$LIBS"
     LIBS=
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
index fe9b47a..b6b632f 100644
--- a/ext/iconv/config.m4
+++ b/ext/iconv/config.m4
@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
 
   if test "$iconv_avail" != "no"; then
     if test -z "$ICONV_DIR"; then
-      for i in /usr/local /usr; do
+      for i in $PHP_ICONV /usr/local /usr; do
         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
           PHP_ICONV_PREFIX="$i"
           break
-- 
2.7.4

