Skip to content

Commit 4e9543e

Browse files
committed
Recognize gnu-libiconv location on alpine
1 parent ef61f05 commit 4e9543e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build/php.m4

+8-2
Original file line numberDiff line numberDiff line change
@@ -1944,8 +1944,14 @@ AC_DEFUN([PHP_SETUP_ICONV], [
19441944
if test "$found_iconv" = "no"; then
19451945
19461946
for i in $PHP_ICONV /usr/local /usr; do
1947-
if test -r $i/include/iconv.h; then
1947+
if test -r $i/include/gnu-libiconv/iconv.h; then
19481948
ICONV_DIR=$i
1949+
ICONV_INCLUDE_DIR=$i/include/gnu-libiconv
1950+
iconv_lib_name=iconv
1951+
break
1952+
elif test -r $i/include/iconv.h; then
1953+
ICONV_DIR=$i
1954+
ICONV_INCLUDE_DIR=$i/include
19491955
iconv_lib_name=iconv
19501956
break
19511957
fi
@@ -1979,7 +1985,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
19791985
AC_DEFINE(HAVE_ICONV,1,[ ])
19801986
if test -n "$ICONV_DIR"; then
19811987
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
1982-
PHP_ADD_INCLUDE($ICONV_DIR/include)
1988+
PHP_ADD_INCLUDE($ICONV_INCLUDE_DIR)
19831989
fi
19841990
$2
19851991
ifelse([$3],[],,[else $3])

0 commit comments

Comments
 (0)