Skip to content

Commit d84f2bb

Browse files
committed
Warn when explicitly building with libressl
1 parent 0378a6e commit d84f2bb

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

scripts/autotools/libmongoc/CheckSSL.m4

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,28 @@ PHP_ARG_WITH([mongodb-ssl],
55
[auto],
66
[no])
77

8+
dnl PHP_ARG_WITH without a value assigns "yes". Treat it like "auto" but
9+
dnl require a crypto library.
10+
if test "$PHP_MONGODB_SSL" = "yes"; then
11+
PHP_MONGODB_SSL="auto"
12+
fi
13+
14+
dnl TODO 3.0: Remove libressl from valid options
15+
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SSL], [auto openssl libressl darwin no])
16+
17+
if test "$PHP_MONGODB_SSL" = "libressl"; then
18+
dnl libressl is a valid option, but it is not supported by libmongoc
19+
dnl Warn users that it is not supported and treat it like "auto"
20+
PHP_MONGODB_SSL="auto"
21+
AC_MSG_WARN([Building with libressl is not supported by libmongoc. Falling back to "auto".])
22+
fi
23+
824
if test "$PHP_MONGODB_SSL" = "auto" -o "$PHP_MONGODB_SSL" = "no"; then
925
crypto_required="no"
1026
else
1127
crypto_required="yes"
12-
13-
dnl PHP_ARG_WITH without a value assigns "yes". Treat it like "auto" but
14-
dnl require a crypto library.
15-
if test "$PHP_MONGODB_SSL" = "yes"; then
16-
PHP_MONGODB_SSL="auto"
17-
fi
1828
fi
1929

20-
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SSL], [auto openssl libressl darwin no])
21-
2230
AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
2331
found_openssl="no"
2432

0 commit comments

Comments
 (0)