|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-12-01 22:50 UTC] fransmeulenbroeks at gmail dot com
Description:
------------
when trying to cross-compile configure picked up the host iconv, not the target one, resulting in wrong paths later on and configure failing.
configure was called with configure --with-iconv=DIR (where DIR is the dir to find the iconv stuff).
This fails at two places. First one is due to a faulty test in acinclude.m4
It tests PHP_ICONV against "yes". However PHP_ICONV in my case contains the path so we should test against not "no"
(PHP_ICONV can be a dir because otherwise this code later on would not make any sense: for i in $PHP_ICONV /usr/local /usr; do )
The following patch is for 5.2.13, but I have verified it is also in the 5.2 snap from today.
Index: php-5.2.13/acinclude.m4
===================================================================
--- php-5.2.13.orig/acinclude.m4
+++ php-5.2.13/acinclude.m4
@@ -2430,7 +2430,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
- 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
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
Patchesacinclude_m4_v2.patch (last revision 2010-12-01 22:05 UTC by fransmeulenbroeks at gmail dot com)acinclude_m4.patch (last revision 2010-12-01 21:52 UTC by fransmeulenbroeks at gmail dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
There is a check right after what you have quoted which handles the supplied path. ... dnl dnl Check external libs for iconv funcs dnl if test "$found_iconv" = "no"; then for i in $PHP_ICONV /usr/local /usr; do ...