summaryrefslogtreecommitdiff
path: root/cpp/configure.ac
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-07-26 15:47:23 +0000
committerAlan Conway <aconway@apache.org>2007-07-26 15:47:23 +0000
commit233cc9184c758702d8fa4a83d1bf8ec7dc0b3474 (patch)
tree6a73a6dfb117218e8fd94c8b447def68e0ab9de0 /cpp/configure.ac
parent89a8765ee2bac1d77be65f1011ffeeb2cbbabe2d (diff)
downloadqpid-python-233cc9184c758702d8fa4a83d1bf8ec7dc0b3474.tar.gz
* README: Instructions for openais install.
* configure.ac: Enable clustering if suitable openais is present. * src/tests/Cluster.cpp, .h, Cluster_child: Updated for 0-10 * src/qpid/sys/ConcurrentQueue.h: Added waitPop() * src/Makefile.am, src/qpid/sys/ThreadSafeQueue.h, ProducerConsumer.h: Removed unused code, ConcurrentQueue provides same functionality. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@559859 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/configure.ac')
-rw-r--r--cpp/configure.ac30
1 files changed, 12 insertions, 18 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac
index ffccd4edcb..d9ec8cce21 100644
--- a/cpp/configure.ac
+++ b/cpp/configure.ac
@@ -159,28 +159,22 @@ AC_SUBST(DOWNLOAD_URL)
AC_CHECK_HEADERS([boost/shared_ptr.hpp uuid/uuid.h],,
AC_MSG_ERROR([Missing required header files.]))
-# Enable cluster functionality.
-AC_ARG_ENABLE([cluster],
- [AS_HELP_STRING([--enable-cluster],
- [Enable cluster functionality, requires openais (default no)])],
- [case $enableval in
- yes|no) enable_CLUSTER=$enableval;;
- *) AC_MSG_ERROR([Invalid value for --enable-apr-cluster: $enableval]);;
- esac],
- [enable_CLUSTER=no])
-
-AM_CONDITIONAL([CLUSTER], [test x$enable_CLUSTER = xyes])
-if test x$enable_CLUSTER = xyes; then
- CPPFLAGS+=" -DCLUSTER"
+# Check for cluster requirements.
+save_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais"
- # cpg_local_get is not yet in a packaged release as of 2007-06-20
- AC_CHECK_LIB([cpg],[cpg_local_get],,
- AC_MSG_ERROR([cpg_local_get not available. openais missing/too old.]))
- AC_CHECK_HEADERS([openais/cpg.h],,
- AC_MSG_ERROR([Required header files not found.],[]))
+AC_CHECK_LIB([cpg],[cpg_local_get],[cpg_lib=yes])
+AC_CHECK_HEADER([openais/cpg.h],[cpg_h=yes])
+if test x$cpg_lib = xyes -a x$cpg_h = xyes; then
+ enable_CLUSTER=yes;
+ CPPFLAGS+=" -DCLUSTER"
+else
+ enable_CLUSTER=no;
+ LDFLAGS=$save_ldflags
fi
+AM_CONDITIONAL([CLUSTER], [test x$enable_CLUSTER = xyes])
+# Files to generate
AC_CONFIG_FILES([
qpidc.spec
Makefile