Skip to content

Commit 9d3907f

Browse files
authored
Fix RAND_egd check (#14588)
When building with OpenSSL (--with-openssl) the OpenSSL libraries (crypto and ssl) are added to LIBS. When building --with-openssl=shared the libraries are added to OPENSSL_SHARED_LIBADD. This fixes the check for the shared build when OpenSSL is built with RAND_egd support.
1 parent 1f48715 commit 9d3907f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/openssl/config0.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ if test "$PHP_OPENSSL" != "no"; then
2424
[AC_DEFINE([HAVE_OPENSSL_EXT], [1],
2525
[Define to 1 if the openssl extension is available.])])
2626

27-
AC_CHECK_FUNCS([RAND_egd])
27+
PHP_CHECK_LIBRARY([crypto], [RAND_egd],
28+
[AC_DEFINE([HAVE_RAND_EGD], [1],
29+
[Define to 1 if OpenSSL crypto library has the 'RAND_egd' function.])],,
30+
[$OPENSSL_LIBS])
2831

2932
if test "$PHP_SYSTEM_CIPHERS" != "no"; then
3033
AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ])

0 commit comments

Comments
 (0)