diff options
-rw-r--r-- | ext/iconv/config.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -18,6 +18,16 @@ if test "$PHP_ICONV" != "no"; then 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 PHP_ICONV_PREFIX="$ICONV_DIR" |