summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-10-13 15:23:11 +0000
committerAntony Dovgal <tony2001@php.net>2005-10-13 15:23:11 +0000
commitc47fb30b5b9cc7d5233539ce2338ec5a806f64ae (patch)
tree5ef2aa15fb2260a4f553e41b343b69b9a0a0496f
parent81b8096ea8d71b080f37b0383627a86cd3d518a7 (diff)
downloadphp-git-c47fb30b5b9cc7d5233539ce2338ec5a806f64ae.tar.gz
MFH: fix #34856 (configure fails to detect libiconv's type)
-rw-r--r--NEWS1
-rw-r--r--ext/iconv/config.m49
2 files changed, 9 insertions, 1 deletions
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