2016-08-09 12:03:08 +02:00
|
|
|
From 1357df0196806d5697b1f84497ef72aab5faa8a3 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
|
|
Date: Tue, 9 Aug 2016 11:50:49 +0200
|
|
|
|
Subject: [PATCH] iconv: tweak iconv detection
|
|
|
|
|
2015-04-08 17:39:28 +02:00
|
|
|
Tweak PHP_SETUP_ICONV from aclocal/acinclude.m4 to not
|
|
|
|
PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use
|
|
|
|
test instead of AC_TRY_LINK to find headers which is bad,
|
|
|
|
specially when adding /usr and /usr/local to the mix.
|
|
|
|
Do basically the same with ext/iconv/config.m4 by tweaking
|
|
|
|
PHP_ICONV_H_PATH which, again, uses test and absolute paths.
|
|
|
|
|
|
|
|
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
|
|
[Gustavo: convert to nice m4 instead of patching configure]
|
2015-06-12 21:22:38 +02:00
|
|
|
[Gustavo: update for 5.6.10]
|
2018-02-02 13:50:39 +01:00
|
|
|
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
2018-12-27 18:49:03 +01:00
|
|
|
[aduskett@gmail.com: Update for 7.3.0]
|
2016-08-09 12:03:08 +02:00
|
|
|
---
|
|
|
|
acinclude.m4 | 2 +-
|
|
|
|
ext/iconv/config.m4 | 22 ----------------------
|
|
|
|
2 files changed, 1 insertion(+), 23 deletions(-)
|
2015-04-08 17:39:28 +02:00
|
|
|
|
2016-08-09 12:03:08 +02:00
|
|
|
diff --git a/acinclude.m4 b/acinclude.m4
|
|
|
|
index af4aa06..1bd2652 100644
|
|
|
|
--- a/acinclude.m4
|
|
|
|
+++ b/acinclude.m4
|
2018-12-27 18:49:03 +01:00
|
|
|
@@ -2444,7 +2444,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
2015-04-08 17:39:28 +02:00
|
|
|
dnl
|
|
|
|
if test "$found_iconv" = "no"; then
|
|
|
|
|
|
|
|
- for i in $PHP_ICONV /usr/local /usr; do
|
|
|
|
+ for i in $PHP_ICONV; do
|
|
|
|
if test -r $i/include/giconv.h; then
|
|
|
|
AC_DEFINE(HAVE_GICONV_H, 1, [ ])
|
|
|
|
ICONV_DIR=$i
|
2016-08-09 12:03:08 +02:00
|
|
|
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
|
2018-12-27 18:49:03 +01:00
|
|
|
index 72334f79..29c358ad 100644
|
2016-08-09 12:03:08 +02:00
|
|
|
--- a/ext/iconv/config.m4
|
|
|
|
+++ b/ext/iconv/config.m4
|
2018-12-27 18:49:03 +01:00
|
|
|
@@ -12,28 +12,6 @@ if test "$PHP_ICONV" != "no"; then
|
2015-04-08 17:39:28 +02:00
|
|
|
])
|
|
|
|
|
|
|
|
if test "$iconv_avail" != "no"; then
|
|
|
|
- if test -z "$ICONV_DIR"; then
|
|
|
|
- for i in /usr/local /usr; do
|
|
|
|
- if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
|
|
|
|
- PHP_ICONV_PREFIX="$i"
|
|
|
|
- break
|
|
|
|
- fi
|
|
|
|
- done
|
|
|
|
- if test -z "$PHP_ICONV_PREFIX"; then
|
|
|
|
- PHP_ICONV_PREFIX="/usr"
|
|
|
|
- fi
|
|
|
|
- else
|
|
|
|
- PHP_ICONV_PREFIX="$ICONV_DIR"
|
|
|
|
- fi
|
2015-06-12 21:22:38 +02:00
|
|
|
-
|
2015-04-08 17:39:28 +02:00
|
|
|
- CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
|
|
|
|
- LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS"
|
|
|
|
-
|
|
|
|
- if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then
|
|
|
|
- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
|
|
|
|
- else
|
|
|
|
- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
|
2015-06-12 21:22:38 +02:00
|
|
|
- fi
|
2015-04-08 17:39:28 +02:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([if iconv is glibc's])
|
2018-12-27 18:49:03 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnu/libc-version.h>]], [[gnu_get_libc_version();]])],[
|
2016-08-09 12:03:08 +02:00
|
|
|
--
|
|
|
|
2.7.4
|
|
|
|
|