summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/external/libldb.m415
-rw-r--r--src/ldb_modules/memberof.c4
2 files changed, 17 insertions, 2 deletions
diff --git a/src/external/libldb.m4 b/src/external/libldb.m4
index d3d3ccece..3e26b15a0 100644
--- a/src/external/libldb.m4
+++ b/src/external/libldb.m4
@@ -24,5 +24,20 @@ else
ldblibdir="${libdir}/ldb"
fi
fi
+
+AC_MSG_CHECKING([feature ldb runtime version check])
+AC_ARG_ENABLE(ldb-version-check,
+ [AS_HELP_STRING([--enable-ldb-version-check],
+ [compile with ldb runtime version check [default=no]])],
+ enable_ldb_version_check="$enableval",
+ enable_ldb_version_check="no")
+if test x"$enable_ldb_version_check" = xyes ; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([SSS_LDB_VERSION_CHECK], [1],
+ [Define to 1 if you want ldb version check.])
+else
+ AC_MSG_RESULT([no])
+fi
+
AC_MSG_NOTICE([ldb lib directory: $ldblibdir])
AC_SUBST(ldblibdir)
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index f7eeb4070..4a9328482 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -4566,8 +4566,8 @@ const struct ldb_module_ops ldb_memberof_module_ops = {
int ldb_init_module(const char *version)
{
-#ifdef LDB_MODULE_CHECK_VERSION
+#if defined(SSS_LDB_VERSION_CHECK) && defined(LDB_MODULE_CHECK_VERSION)
LDB_MODULE_CHECK_VERSION(version);
-#endif
+#endif /* SSS_LDB_VERSION_CHECK && LDB_MODULE_CHECK_VERSION */
return ldb_register_module(&ldb_memberof_module_ops);
}