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

index 241c0f532078e30f3a597db1717fc1176208c342..2150122bef47c8b596d03776723506d013a77d7b 100644 (file)
@@ -17,6 +17,16 @@ if test "$PHP_ICONV" != "no"; then
     iconv_cflags_save="$CFLAGS"
     iconv_ldflags_save="$LDFLAGS"
 
+    if test -z "$ICONV_DIR"; then
+      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
+
     if test -z "$ICONV_DIR"; then
       PHP_ICONV_PREFIX="/usr"
     else