Skip to content

PHPC-2309: Remove --with-openssl-dir configure option #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ UPGRADE FROM 1.x to 2.0
* The constructor of `MongoDB\BSON\UTCDateTime` no longer accepts a `string`
argument. To pass 64-bit integers on 32-bit platforms, use the
`MongoDB\BSON\Int64` class instead.
* The `--with-openssl-dir` configure option has been removed. If using OpenSSL,
ensure that it is detected by `pkg-config`.
Copy link
Member Author

@jmikola jmikola Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that we never added a warning when using the option in 1.x. Opened PHPC-2452 and #1677 to address that.

21 changes: 3 additions & 18 deletions scripts/autotools/libmongoc/CheckSSL.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ fi

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

PHP_ARG_WITH([openssl-dir],
[deprecated option for OpenSSL library path],
[AS_HELP_STRING([--with-openssl-dir=@<:@auto/DIR@:>@],
[MongoDB: OpenSSL library path (deprecated for pkg-config) [default=auto]])],
[auto],
[no])

if test "$PHP_OPENSSL_DIR" != "auto"; then
AC_MSG_WARN([Using --with-openssl-dir is deprecated and will be removed in a future version.])
fi

AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
found_openssl="no"

Expand All @@ -54,13 +43,10 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
unset OPENSSL_INCDIR
unset OPENSSL_LIBDIR

dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
dnl Support documented "auto" and older, undocumented "yes" options
if test "$PHP_OPENSSL_DIR" = "auto" -o "$PHP_OPENSSL_DIR" = "yes"; then
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
OPENSSL_SEARCH_PATHS="/usr/local/ssl /usr/local /usr /usr/local/openssl"

for i in $PHP_OPENSSL_DIR; do
for i in $OPENSSL_SEARCH_PATHS; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_INCDIR="$i/include"
fi
Expand All @@ -80,7 +66,6 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
[have_crypto_lib="no"],
[$OPENSSL_LIBDIR_LDFLAG])


dnl Check whether OpenSSL >= 1.1.0 is available
PHP_CHECK_LIBRARY([ssl],
[OPENSSL_init_ssl],
Expand Down