@@ -70,7 +70,7 @@ function MONGODB_ADD_SOURCES(dir, file_list)
70
70
}
71
71
72
72
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" ) ;
74
74
ARG_WITH ( "mongodb-client-side-encryption" , "MongoDB: Enable client-side encryption" , "yes" ) ;
75
75
76
76
if ( PHP_MONGODB != "no" ) {
@@ -235,17 +235,17 @@ if (PHP_MONGODB != "no") {
235
235
if ( PHP_MONGODB_SASL != "no" &&
236
236
CHECK_LIB ( "libsasl.lib" , "mongodb" , PHP_MONGODB ) &&
237
237
CHECK_HEADER_ADD_INCLUDE ( "sasl/sasl.h" , "CFLAGS_MONGODB" ) ) {
238
- mongoc_opts . MONGOC_ENABLE_SASL = 1 ;
239
238
240
239
// TODO 3.0: Remove warning on "yes" as it implies "sspi"
241
240
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 ." ) ;
243
242
}
244
243
245
244
if ( PHP_MONGODB_SASL == "yes" || PHP_MONGODB_SASL == "sspi" ) {
245
+ mongoc_opts . MONGOC_ENABLE_SASL = 1 ;
246
246
mongoc_opts . MONGOC_ENABLE_SASL_SSPI = 1 ;
247
247
} 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 ) ;
249
249
}
250
250
251
251
if ( CHECK_FUNC_IN_HEADER ( "sasl/sasl.h" , "sasl_client_done" ) ) {
0 commit comments