1 Tweak PHP_SETUP_ICONV from aclocal/acinclude.m4 to not
2 PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use
3 test instead of AC_TRY_LINK to find headers which is bad,
4 specially when adding /usr and /usr/local to the mix.
5 Do basically the same with ext/iconv/config.m4 by tweaking
6 PHP_ICONV_H_PATH which, again, uses test and absolute paths.
8 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
9 [Gustavo: convert to nice m4 instead of patching configure]
10 [Gustavo: update for 5.6.10]
12 diff -Nura php-5.6.10.orig/acinclude.m4 php-5.6.10/acinclude.m4
13 --- php-5.6.10.orig/acinclude.m4 2015-06-12 16:09:06.274355813 -0300
14 +++ php-5.6.10/acinclude.m4 2015-06-12 16:10:10.884544865 -0300
17 if test "$found_iconv" = "no"; then
19 - for i in $PHP_ICONV /usr/local /usr; do
20 + for i in $PHP_ICONV; do
21 if test -r $i/include/giconv.h; then
22 AC_DEFINE(HAVE_GICONV_H, 1, [ ])
24 diff -Nura php-5.6.10.orig/ext/iconv/config.m4 php-5.6.10/ext/iconv/config.m4
25 --- php-5.6.10.orig/ext/iconv/config.m4 2015-06-12 16:09:07.792407246 -0300
26 +++ php-5.6.10/ext/iconv/config.m4 2015-06-12 16:11:07.752471600 -0300
30 if test "$iconv_avail" != "no"; then
31 - if test -z "$ICONV_DIR"; then
32 - for i in /usr/local /usr; do
33 - if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
34 - PHP_ICONV_PREFIX="$i"
38 - if test -z "$PHP_ICONV_PREFIX"; then
39 - PHP_ICONV_PREFIX="/usr"
42 - PHP_ICONV_PREFIX="$ICONV_DIR"
45 - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
46 - LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS"
48 - if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then
49 - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
51 - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
54 AC_MSG_CHECKING([if iconv is glibc's])
55 AC_TRY_LINK([#include <gnu/libc-version.h>],[gnu_get_libc_version();],