Skip to content

Commit ae06481

Browse files
authored
PHPC-2309: Remove --with-openssl-dir configure option (#1676)
For the time being, we will preserve fall back logic to detect OpenSSL with PHP_CHECK_LIBRARY; however, that will be eventually be removed (PHPC-2451). It should be noted that PHP 7.4+ relies exclusively on pkg-config to detect OpenSSL: php/php-src@fe8fdfa
1 parent cb3d922 commit ae06481

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

UPGRADE-2.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ UPGRADE FROM 1.x to 2.0
3030
* The constructor of `MongoDB\BSON\UTCDateTime` no longer accepts a `string`
3131
argument. To pass 64-bit integers on 32-bit platforms, use the
3232
`MongoDB\BSON\Int64` class instead.
33+
* The `--with-openssl-dir` configure option has been removed. If using OpenSSL,
34+
ensure that it is detected by `pkg-config`.

scripts/autotools/libmongoc/CheckSSL.m4

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ fi
1919

2020
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SSL], [auto openssl libressl darwin no])
2121

22-
PHP_ARG_WITH([openssl-dir],
23-
[deprecated option for OpenSSL library path],
24-
[AS_HELP_STRING([--with-openssl-dir=@<:@auto/DIR@:>@],
25-
[MongoDB: OpenSSL library path (deprecated for pkg-config) [default=auto]])],
26-
[auto],
27-
[no])
28-
29-
if test "$PHP_OPENSSL_DIR" != "auto"; then
30-
AC_MSG_WARN([Using --with-openssl-dir is deprecated and will be removed in a future version.])
31-
fi
32-
3322
AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
3423
found_openssl="no"
3524
@@ -54,13 +43,10 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
5443
unset OPENSSL_INCDIR
5544
unset OPENSSL_LIBDIR
5645
57-
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
58-
dnl Support documented "auto" and older, undocumented "yes" options
59-
if test "$PHP_OPENSSL_DIR" = "auto" -o "$PHP_OPENSSL_DIR" = "yes"; then
60-
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
61-
fi
46+
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
47+
OPENSSL_SEARCH_PATHS="/usr/local/ssl /usr/local /usr /usr/local/openssl"
6248
63-
for i in $PHP_OPENSSL_DIR; do
49+
for i in $OPENSSL_SEARCH_PATHS; do
6450
if test -r $i/include/openssl/evp.h; then
6551
OPENSSL_INCDIR="$i/include"
6652
fi
@@ -80,7 +66,6 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
8066
[have_crypto_lib="no"],
8167
[$OPENSSL_LIBDIR_LDFLAG])
8268
83-
8469
dnl Check whether OpenSSL >= 1.1.0 is available
8570
PHP_CHECK_LIBRARY([ssl],
8671
[OPENSSL_init_ssl],

0 commit comments

Comments
 (0)