summaryrefslogtreecommitdiff
path: root/cpp/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/configure.ac')
-rw-r--r--cpp/configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac
index 13c2ca8870..664b1e5c74 100644
--- a/cpp/configure.ac
+++ b/cpp/configure.ac
@@ -158,11 +158,21 @@ AC_SUBST(DOWNLOAD_URL)
# Check for headers from required devel kits.
missing=""
-AC_CHECK_HEADERS([libdaemon/daemon.h],,[missing="$missing libdaemon development files"])
-AC_CHECK_HEADERS([boost/shared_ptr.hpp],,[missing="$missing boost developement files"])
+AC_CHECK_HEADERS([libdaemon/daemon.h],,[missing="$missing libdaemon"])
+AC_CHECK_HEADERS([boost/shared_ptr.hpp],,[missing="$missing boost"])
test -z "$missing" ||
AC_MSG_ERROR([Missing required headers. Install the folowing packages or -devel rpms: $missing.])
+# Enable/disable cluster functionality based on presence of openais
+AC_CHECK_HEADER([openais/cpg.h],[cluster=yes],[cluster=no])
+AM_CONDITIONAL([CLUSTER], test x$cluster = xyes)
+if test x$cluster = xyes; then
+ LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais"
+ CPPFLAGS+=-DCLUSTER
+ AC_CHECK_LIB([cpg], [cpg_initialize], [],
+ [AC_MSG_ERROR([Cannot find library -lcpg. Install openais.])])
+fi
+
AC_CONFIG_FILES([
qpidc.spec
Makefile