diff --git a/configure.ac b/configure.ac index df2c205f1973d..2a62ca6eb8071 100644 --- a/configure.ac +++ b/configure.ac @@ -531,7 +531,6 @@ alphasort \ asctime_r \ chroot \ ctime_r \ -crypt \ explicit_memset \ flock \ ftok \ @@ -648,11 +647,6 @@ AC_FUNC_ALLOCA PHP_TIME_R_TYPE PHP_CHECK_IN_ADDR_T -AC_CHECK_FUNCS(crypt_r, [ php_crypt_r="1" ], [ php_crypt_r="0" ]) -if test "x$php_crypt_r" = "x1"; then - PHP_CRYPT_R_STYLE -fi - AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])]) if test "$ac_cv_func___crc32d" = "yes"; then diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 9f82ab1afa1a7..5081a6b677f22 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -51,14 +51,10 @@ if test "$ac_cv_flush_io" = "yes"; then AC_DEFINE(HAVE_FLUSHIO, 1, [Define if flush should be called explicitly after a buffered io.]) fi -dnl -dnl Check for crypt() capabilities -dnl -if test "$ac_cv_func_crypt" = "no"; then - AC_CHECK_LIB(crypt, crypt, [ - LIBS="-lcrypt $LIBS -lcrypt" - AC_DEFINE(HAVE_CRYPT, 1, [ ]) - ]) +PHP_CHECK_FUNC(crypt, crypt) +PHP_CHECK_FUNC(crypt_r, crypt) +if test "$ac_cv_func_crypt_r" = "yes"; then + PHP_CRYPT_R_STYLE fi AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[ @@ -262,7 +258,8 @@ int main() { dnl dnl If one of them is missing, use our own implementation, portable code is then possible dnl -if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "x$php_crypt_r" = "x0"; then +dnl TODO This is currently always enabled +if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || true; then dnl dnl Check for __alignof__ support in the compiler