[PATCH] afmongodb: Support system-installed libmongo-client at configure time.

Gergely Nagy algernon at balabit.hu
Wed May 25 20:06:28 CEST 2011


Modify configure.in to recognise a suitable version (>= 0.1.0) of the
libmongo-client library, and use it instead of the internal version if
requested so.

Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
 configure.in |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index 05fb5ce..3445a55 100644
--- a/configure.in
+++ b/configure.in
@@ -28,6 +28,7 @@ IVYKIS_MIN_VERSION="0.18"
 JSON_C_MIN_VERSION="0.7"
 JSON_GLIB_MIN_VERSION="0.12"
 PCRE_MIN_VERSION="6.1"
+LMC_MIN_VERSION="0.1.0"
 
 dnl ***************************************************************************
 dnl Initial setup
@@ -763,12 +764,13 @@ if test "x$with_libmongo_client" = "xinternal"; then
 		AC_MSG_WARN([Internal libmongo-client sources not found in modules/afmongodb/libmongo-client])
 		with_libmongo_client="no"
 	fi
-else
-	AC_MSG_WARN([Don't know how to locate system installed libmongo-client.])
-	with_libmongo_client="no"
+elif test "x$with_libmongo_client" = "xsystem"; then
+	PKG_CHECK_MODULES(LIBMONGO, libmongo-client >= $LMC_MIN_VERSION,,with_libmongo_client="no")
 fi
 
-
+if test "x$with_libmongo_client" = "xno"; then
+	enable_mongodb="no"
+fi
 
 dnl ***************************************************************************
 dnl misc features to be enabled
-- 
1.7.2.5


--=-=-=--



More information about the syslog-ng mailing list