commit 165143140a4047ece83204ae80fd94e6c5f51c73
Author: Mark McLoughlin <markmc(a)redhat.com>
Date: Wed Apr 27 18:23:07 2011 +0100
build: check for mongodb headers
On my Fedora 14 system, without mongodb-devel I was seeing:
CXX meta.o
meta.cpp:34:35: fatal error: mongo/client/dbclient.h: No such file or directory
compilation terminated.
The header is C++ so we need AC_LANGUAGE_PUSH and, similar to meta.cpp,
we need to undefine VERSION before including the header.
Note, the AC_CHECK_LIB approach doesn't seem sufficient because the
mongodb package in Fedora doesn't ship versioned shared libraries with an
unversioned symlink in the -devel package.
With the new check, we fail with:
checking for mongo/client/dbclient.h... no
configure: error: Missing Mongo DB client development library: mongodb-devel
configure.ac | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 103c18a..8945f7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,12 @@ gl_LIBXML2([2.6.0])
AC_CHECK_HEADER([gc.h], ,
[AC_MSG_ERROR([Missing GC development library: gc-devel or libgc-dev])])
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER([mongo/client/dbclient.h], ,
+ [AC_MSG_ERROR([Missing Mongo DB client development library: mongodb-devel])],
+ [#undef VERSION])
+AC_LANG_POP
+
# from
http://www.gnu.org/software/autoconf-archive/
AX_BOOST_BASE
AX_BOOST_SYSTEM