Skip to content

Commit da24040

Browse files
committed
PHPC-1241: OpenSSL 1.1 not found if pkg-config is not available
1 parent d2b2bd5 commit da24040

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

scripts/autotools/libmongoc/CheckSSL.m4

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,21 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
8383
[have_crypto_lib="no"],
8484
[$OPENSSL_LIBDIR_LDFLAG])
8585
86-
have_ssl_lib="no"
8786
88-
dnl OpenSSL < 1.1.0
87+
AC_MSG_NOTICE([checking whether OpenSSL >= 1.1.0 is available])
8988
PHP_CHECK_LIBRARY([ssl],
90-
[SSL_library_init],
89+
[OPENSSL_init_ssl],
9190
[have_ssl_lib="yes"],
92-
[],
91+
[have_ssl_lib="no"],
9392
[$OPENSSL_LIBDIR_LDFLAG -lcrypto])
9493
95-
dnl OpenSSL >= 1.1.0
9694
if test "$have_ssl_lib" = "no"; then
97-
PHP_CHECK_LIBRARY([ssl],
98-
[OPENSSL_init_ssl],
99-
[have_ssl_lib="yes"],
100-
[],
101-
[$OPENSSL_LIBDIR_LDFLAG -lcrypto])
95+
AC_MSG_NOTICE([checking whether OpenSSL < 1.1.0 is available])
96+
PHP_CHECK_LIBRARY([ssl],
97+
[SSL_library_init],
98+
[have_ssl_lib="yes"],
99+
[have_ssl_lib="no"],
100+
[$OPENSSL_LIBDIR_LDFLAG -lcrypto])
102101
fi
103102
104103
if test "$have_ssl_lib" = "yes" -a "$have_crypto_lib" = "yes"; then

0 commit comments

Comments
 (0)