Skip to content

Commit 3a40e3d

Browse files
authored
Use a link test to check for GNU libiconv (#13894)
1 parent 843946a commit 3a40e3d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

ext/iconv/config.m4

+1-10
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,11 @@ if test "$PHP_ICONV" != "no"; then
2828

2929
if test -z "$iconv_impl_name"; then
3030
AC_MSG_CHECKING([if using GNU libiconv])
31-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
32-
#include <iconv.h>
33-
#include <stdio.h>
34-
int main(void) {
35-
printf("%d", _libiconv_version);
36-
return 0;
37-
}
38-
]])],[
31+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <iconv.h>], [(void) _libiconv_version])],[
3932
AC_MSG_RESULT(yes)
4033
iconv_impl_name="gnu_libiconv"
4134
],[
4235
AC_MSG_RESULT(no)
43-
],[
44-
AC_MSG_RESULT([no, cross-compiling])
4536
])
4637
fi
4738

0 commit comments

Comments
 (0)