|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53443 configure --with-iconv=/path/to/iconv picks up host iconv
Submitted: 2010-12-01 22:58 UTC Modified: 2013-10-15 11:54 UTC
Avg. Score:3.3 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: fransmeulenbroeks at gmail dot com Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2SVN-2010-12-01 (snap) OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-12-01 22:58 UTC] fransmeulenbroeks at gmail dot com
configure --with-iconv=/path/to/iconv picks up the host iconv

ext/iconv/config.m4 does not take the case that a dir is given into account.

I fixed this by adding $PHP_ICONV to the for loop. This patch makes the code identical to a similar snippet of code in acinclude.m4

The problem has been detected in 5.2.13 but I verified the 5.2 snap from today and the problem is still there.

Attached patch fixes the problem

Index: php-5.2.13/ext/iconv/config.m4
--- php-5.2.13.orig/ext/iconv/config.m4
+++ php-5.2.13/ext/iconv/config.m4
@@ -15,7 +15,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


iconv_v2.patch (last revision 2010-12-01 22:03 UTC by fransmeulenbroeks at gmail dot com)
iconv.patch (last revision 2010-12-01 21:58 UTC by fransmeulenbroeks at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-10 18:16 UTC] poopsm at gmail dot com
I'm having this same problem with php 5.3.5, and this patch isn't fixing it.

When using the options
--with-iconv --with-iconv-dir=/usr/local/iconv

I still get
checking if iconv is glibc's... yes

but it should be using libiconv
 [2013-08-01 23:20 UTC]
-Status: Open +Status: Feedback
 [2013-08-01 23:20 UTC]
Please try using this snapshot:
For Windows:

Breifly looking PHP 5.5's configure script, it seems ok.
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 09:01:27 2023 UTC