@@ -391,7 +391,7 @@ if test "$PHP_PCRE_DIR" != "no"; then
391391fi
392392
393393PHP_ARG_WITH(mongodb-sasl, for Cyrus SASL support,
394- [ --with-mongodb-sasl[ =DIR] mongodb: Include Cyrus SASL support] , auto, yes )
394+ [ --with-mongodb-sasl[ =DIR] mongodb: Include Cyrus SASL support] , auto, no )
395395
396396if test "$PHP_MONGODB_SASL" != "no"; then
397397 AC_MSG_CHECKING ( for SASL )
@@ -405,31 +405,35 @@ if test "$PHP_MONGODB_SASL" != "no"; then
405405
406406 if test -z "$MONGODB_SASL_DIR"; then
407407 AC_MSG_RESULT ( not found )
408- if test "$MONGODB_SASL " != "auto"; then
408+ if test "$PHP_MONGODB_SASL " != "auto"; then
409409 AC_MSG_ERROR ( [ sasl.h not found!] )
410+ else
411+ AC_SUBST ( MONGOC_ENABLE_SASL , 0 )
412+ AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 0 )
410413 fi
411- fi
414+ else
412415
413- PHP_CHECK_LIBRARY(sasl2, sasl_version,
414- [
415- PHP_ADD_INCLUDE($MONGODB_SASL_DIR)
416- PHP_ADD_LIBRARY_WITH_PATH(sasl2, $MONGODB_SASL_DIR/$PHP_LIBDIR, MONGODB_SHARED_LIBADD)
417- MONGOC_ENABLE_SASL=1
418- AC_SUBST ( MONGOC_ENABLE_SASL )
419- ] , [
420- if test "$MONGODB_SASL" != "auto"; then
421- AC_MSG_ERROR ( [ MONGO SASL check failed. Please check config.log for more information.] )
422- fi
423- ] , [
424- -L$MONGODB_SASL_DIR/$PHP_LIBDIR
425- ] )
416+ PHP_CHECK_LIBRARY(sasl2, sasl_version,
417+ [
418+ PHP_ADD_INCLUDE($MONGODB_SASL_DIR)
419+ PHP_ADD_LIBRARY_WITH_PATH(sasl2, $MONGODB_SASL_DIR/$PHP_LIBDIR, MONGODB_SHARED_LIBADD)
420+ MONGOC_ENABLE_SASL=1
421+ AC_SUBST ( MONGOC_ENABLE_SASL )
422+ ] , [
423+ if test "$MONGODB_SASL" != "auto"; then
424+ AC_MSG_ERROR ( [ MONGO SASL check failed. Please check config.log for more information.] )
425+ fi
426+ ] , [
427+ -L$MONGODB_SASL_DIR/$PHP_LIBDIR
428+ ] )
426429
427- PHP_CHECK_LIBRARY(sasl2, sasl_client_done,
428- [
429- AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 1 )
430- ] , [
431- AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 0 )
432- ] )
430+ PHP_CHECK_LIBRARY(sasl2, sasl_client_done,
431+ [
432+ AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 1 )
433+ ] , [
434+ AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 0 )
435+ ] )
436+ fi
433437else
434438 AC_SUBST ( MONGOC_ENABLE_SASL , 0 )
435439 AC_SUBST ( MONGOC_HAVE_SASL_CLIENT_DONE , 0 )
0 commit comments