@@ -1406,7 +1406,9 @@ dnl ***************************************************************************
14061406dnl mongo-c-driver headers/libraries
14071407dnl ***************************************************************************
14081408
1409- PKG_CHECK_MODULES(LIBMONGO, libmongoc-1.0 >= $LMC_MIN_VERSION, with_mongoc="yes", with_mongoc="no")
1409+ PKG_CHECK_MODULES(LIBMONGO, mongoc2 >= $LMC_MIN_VERSION, with_mongoc="yes", [
1410+ PKG_CHECK_MODULES(LIBMONGO, libmongoc-1.0 >= $LMC_MIN_VERSION, with_mongoc="yes", with_mongoc="no")
1411+ ] )
14101412
14111413if test "x$with_mongoc" = "xno" && test "x$enable_mongodb" = "xyes"; then
14121414 AC_MSG_ERROR ( [ Could not find mongo-c-driver, and MongoDB support was explicitly enabled.] )
@@ -1416,8 +1418,8 @@ if test "x$with_mongoc" = "xyes"; then
14161418CPPFLAGS_SAVE="$CPPFLAGS"
14171419CPPFLAGS="$CPPFLAGS $LIBMONGO_CFLAGS"
14181420
1419- AC_CHECK_DECLS ( [ mongoc_uri_set_option_as_int32] , [ ] , [ ] , [ [ #include <mongoc.h>] ] )
1420- AC_CHECK_DECLS ( [ MONGOC_URI_SERVERSELECTIONTIMEOUTMS] , [ ] , [ ] , [ [ #include <mongoc.h>] ] )
1421+ AC_CHECK_DECLS ( [ mongoc_uri_set_option_as_int32] , [ ] , [ ] , [ [ #include <mongoc/mongoc .h>] ] )
1422+ AC_CHECK_DECLS ( [ MONGOC_URI_SERVERSELECTIONTIMEOUTMS] , [ ] , [ ] , [ [ #include <mongoc/mongoc .h>] ] )
14211423
14221424CPPFLAGS="$CPPFLAGS_SAVE"
14231425fi
0 commit comments