From: Antony Dovgal Date: Thu, 13 Oct 2005 15:13:29 +0000 (+0000) Subject: fix #34856 (configure fails to detect libiconv's type) X-Git-Tag: RELEASE_0_9_1~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c6d14bd0b8f0404662c7c5aa9439ceebd19c08d;p=php fix #34856 (configure fails to detect libiconv's type) --- diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 241c0f5320..2150122bef 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -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