From: Antony Dovgal Date: Thu, 13 Oct 2005 15:23:11 +0000 (+0000) Subject: MFH: fix #34856 (configure fails to detect libiconv's type) X-Git-Tag: php-5.1.0RC2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c47fb30b5b9cc7d5233539ce2338ec5a806f64ae;p=php MFH: fix #34856 (configure fails to detect libiconv's type) --- diff --git a/NEWS b/NEWS index fb725d286d..03d9d1e6f0 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,7 @@ PHP NEWS - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34856 (configure fails to detect libiconv's type). (Tony) - Fixed bug #34855 (ibase_service_attach() segfault on AMD64). (irie at gmx dot de, Tony) - Fixed bug #34850 (--program-suffix and --program-prefix not included in diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 241c0f5320..d87c124fb1 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -18,7 +18,14 @@ if test "$PHP_ICONV" != "no"; then iconv_ldflags_save="$LDFLAGS" if test -z "$ICONV_DIR"; then - PHP_ICONV_PREFIX="/usr" + for i in /usr /usr/local; do + if test -f "$i/include/iconv.h" -o test -f "$i/include/giconv.h"; then + PHP_ICONV_PREFIX="$i" + fi + done + if test -z "$PHP_ICONV_PREFIX"; then + PHP_ICONV_PREFIX="/usr" + fi else PHP_ICONV_PREFIX="$ICONV_DIR" fi