mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Wrap iconv errno check in AC_CACHE_CHECK (#14438)
Cross-compiling in this case is passed but for the sake of consistency this check is also cached to enable manual overriding with the php_cv_iconv_errno cache variable.
This commit is contained in:
parent
75033c01c3
commit
354b2636a5
1 changed files with 8 additions and 10 deletions
|
@ -76,8 +76,8 @@ if test "$PHP_ICONV" != "no"; then
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([if iconv supports errno])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
AC_CACHE_CHECK([if iconv supports errno], [php_cv_iconv_errno],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <iconv.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -94,14 +94,12 @@ int main(void) {
|
|||
iconv_close( cd );
|
||||
return 2;
|
||||
}
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR(iconv does not support errno)
|
||||
],[
|
||||
AC_MSG_RESULT(yes, cross-compiling)
|
||||
])
|
||||
])],
|
||||
[php_cv_iconv_errno=yes],
|
||||
[php_cv_iconv_errno=no],
|
||||
[php_cv_iconv_errno=yes])])
|
||||
AS_VAR_IF([php_cv_iconv_errno], [yes],,
|
||||
[AC_MSG_ERROR([iconv does not support errno])])
|
||||
|
||||
AC_CACHE_CHECK([if iconv supports //IGNORE], [php_cv_iconv_ignore],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue