Edit report at http://bugs.php.net/bug.php?id=53442&edit=1

 ID:                 53442
 Comment by:         fransmeulenbroeks at gmail dot com
 Reported by:        fransmeulenbroeks at gmail dot com
 Summary:            [fix provided] configure --with-iconv=DIR fails due
                     to two faulty tests
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   linux
 PHP Version:        5.2SVN-2010-12-01 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

oh and the subject line is wrong this reports and fixes only one faulty
test, the other one is reported and fixed in 53443


Previous Comments:
------------------------------------------------------------------------
[2010-12-01 23:09:00] fransmeulenbroeks at gmail dot com

oops, made typo in patch

This line:

+  if test "$PHP_ICONV" != no"; then

is missing a " and must read

+  if test "$PHP_ICONV" != "no"; then



Uploaded a new patch.

Sorry for any inconvenience!

------------------------------------------------------------------------
[2010-12-01 22:50:49] 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

     ],[





------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53442&edit=1

Reply via email to