Skip to content

Commit b6042ee

Browse files
committed
Apply feedback from Copilot
1 parent 3752cd6 commit b6042ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

config.w32

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function MONGODB_ADD_SOURCES(dir, file_list)
7070
}
7171

7272
ARG_ENABLE("mongodb", "MongoDB support", "no");
73-
ARG_WITH("mongodb-sasl", "MongoDB: Build with SSPI SASL", "yes");
73+
ARG_WITH("mongodb-sasl", "MongoDB: Build with SSPI SASL (valid values: 'yes' (fallback to SSPI), 'sspi', 'no')", "yes");
7474
ARG_WITH("mongodb-client-side-encryption", "MongoDB: Enable client-side encryption", "yes");
7575

7676
if (PHP_MONGODB != "no") {
@@ -235,17 +235,17 @@ if (PHP_MONGODB != "no") {
235235
if (PHP_MONGODB_SASL != "no" &&
236236
CHECK_LIB("libsasl.lib", "mongodb", PHP_MONGODB) &&
237237
CHECK_HEADER_ADD_INCLUDE("sasl/sasl.h", "CFLAGS_MONGODB")) {
238-
mongoc_opts.MONGOC_ENABLE_SASL = 1;
239238

240239
// TODO 3.0: Remove warning on "yes" as it implies "sspi"
241240
if (PHP_MONGODB_SASL == "yes") {
242-
WARNING("Cyrus SASL support for Windows was removed. Falling back to SSPI.");
241+
WARNING("Cyrus SASL support for Windows was removed. Falling back to SSPI; use '--with-mongodb-sasl=sspi' to avoid this warning.");
243242
}
244243

245244
if (PHP_MONGODB_SASL == "yes" || PHP_MONGODB_SASL == "sspi") {
245+
mongoc_opts.MONGOC_ENABLE_SASL = 1;
246246
mongoc_opts.MONGOC_ENABLE_SASL_SSPI = 1;
247247
} else {
248-
WARNING("mongodb sasl support not enabled, unknown value for PHP_MONGODB_SASL: " + PHP_MONGODB_SASL);
248+
WARNING("MongoDB SASL support not enabled, unknown value for PHP_MONGODB_SASL: " + PHP_MONGODB_SASL);
249249
}
250250

251251
if (CHECK_FUNC_IN_HEADER("sasl/sasl.h", "sasl_client_done")) {

0 commit comments

Comments
 (0)