]> granicus.if.org Git - php/commitdiff
MFH: fix #34856 (configure fails to detect libiconv's type)
authorAntony Dovgal <tony2001@php.net>
Thu, 13 Oct 2005 15:23:11 +0000 (15:23 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 13 Oct 2005 15:23:11 +0000 (15:23 +0000)
NEWS
ext/iconv/config.m4

diff --git a/NEWS b/NEWS
index fb725d286de478096a492da1f2d1da8b5bc9409f..03d9d1e6f0d84e6f1910ff5abee70aacc5880337 100644 (file)
--- 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
index 241c0f532078e30f3a597db1717fc1176208c342..d87c124fb18472803df73835d76d78620aa21da9 100644 (file)
@@ -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