board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / php / 0002-iconv-tweak-iconv-detection.patch
bloba34664930bca2acbbe9d84993a05a7cd614dda32
1 From 1357df0196806d5697b1f84497ef72aab5faa8a3 Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Tue, 9 Aug 2016 11:50:49 +0200
4 Subject: [PATCH] iconv: tweak iconv detection
6 Tweak PHP_SETUP_ICONV from aclocal/acinclude.m4 to not
7 PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use
8 test instead of AC_TRY_LINK to find headers which is bad,
9 specially when adding /usr and /usr/local to the mix.
10 Do basically the same with ext/iconv/config.m4 by tweaking
11 PHP_ICONV_H_PATH which, again, uses test and absolute paths.
13 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
14 [Gustavo: convert to nice m4 instead of patching configure]
15 [Gustavo: update for 5.6.10]
16 ---
17 acinclude.m4 | 2 +-
18 ext/iconv/config.m4 | 22 ----------------------
19 2 files changed, 1 insertion(+), 23 deletions(-)
21 diff --git a/acinclude.m4 b/acinclude.m4
22 index af4aa06..1bd2652 100644
23 --- a/acinclude.m4
24 +++ b/acinclude.m4
25 @@ -2471,7 +2471,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
26 dnl
27 if test "$found_iconv" = "no"; then
29 - for i in $PHP_ICONV /usr/local /usr; do
30 + for i in $PHP_ICONV; do
31 if test -r $i/include/giconv.h; then
32 AC_DEFINE(HAVE_GICONV_H, 1, [ ])
33 ICONV_DIR=$i
34 diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
35 index 6a05697..694fcb8 100644
36 --- a/ext/iconv/config.m4
37 +++ b/ext/iconv/config.m4
38 @@ -14,28 +14,6 @@ if test "$PHP_ICONV" != "no"; then
41 if test "$iconv_avail" != "no"; then
42 - if test -z "$ICONV_DIR"; then
43 - for i in /usr/local /usr; do
44 - if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
45 - PHP_ICONV_PREFIX="$i"
46 - break
47 - fi
48 - done
49 - if test -z "$PHP_ICONV_PREFIX"; then
50 - PHP_ICONV_PREFIX="/usr"
51 - fi
52 - else
53 - PHP_ICONV_PREFIX="$ICONV_DIR"
54 - fi
56 - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
57 - LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS"
59 - if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then
60 - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
61 - else
62 - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
63 - fi
65 AC_MSG_CHECKING([if iconv is glibc's])
66 AC_TRY_LINK([#include <gnu/libc-version.h>],[gnu_get_libc_version();],
67 --
68 2.7.4