From 3c6d14bd0b8f0404662c7c5aa9439ceebd19c08d Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 13 Oct 2005 15:13:29 +0000 Subject: [PATCH] fix #34856 (configure fails to detect libiconv's type) --- ext/iconv/config.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.50.1