dnl ---- configure.ac for gb.mongodb

m4_include([../version.m4])
AC_INIT(gambas3-gb-mongodb,[GB_VERSION], [GB_MAIL],[],[GB_URL])
AC_CONFIG_MACRO_DIR([m4])

GB_INIT(gb.mongodb)
LT_INIT

GB_COMPONENT_PKG_CONFIG(
  mongodb,
  MONGODB,
  gb.mongodb,
  [src],
  mongoc2)

if test "$have_mongodb" != "yes"; then

GB_COMPONENT_PKG_CONFIG_AGAIN(
  mongodb,
  MONGODB,
  gb.mongodb,
  [src],
  libmongoc-1.0)
  gb_use_mongoc2=0
  AC_MSG_NOTICE([Using mongo C library 1.0])

else

  AC_DEFINE_UNQUOTED(MONGOC2, 1, mongoc2 is used)
  gb_use_mongoc2=1
  AC_MSG_NOTICE([Using mongo C library 2.0])

fi

AC_CONFIG_FILES( Makefile src/Makefile )
AC_OUTPUT

GB_PRINT_MESSAGES
