[rhmessaging-commits] rhmessaging commits: r3354 - in store/trunk/cpp: tests and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue May 5 14:24:26 EDT 2009


Author: kpvdr
Date: 2009-05-05 14:24:25 -0400 (Tue, 05 May 2009)
New Revision: 3354

Modified:
   store/trunk/cpp/configure.ac
   store/trunk/cpp/tests/Makefile.am
Log:
Added external cluster test to make check

Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac	2009-04-30 15:41:55 UTC (rev 3353)
+++ store/trunk/cpp/configure.ac	2009-05-05 18:24:25 UTC (rev 3354)
@@ -178,7 +178,49 @@
 # If rpmlint is available we'll run it when building RPMs.
 AC_CHECK_PROG([RPMLINT], [rpmlint], [rpmlint])
 AM_CONDITIONAL([HAS_RPMLINT], [test -n "$RPMLINT"])
+ 
+# Check for optional cluster requirements.
+tmp_LIBS=$LIBS
+LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync"
+AC_CHECK_LIB([cpg],[cpg_local_get],[have_libcpg=yes],)
+AC_CHECK_HEADERS([openais/cpg.h corosync/cpg.h],[have_cpg_h=yes],)
+AC_ARG_WITH([cpg],  
+  [AS_HELP_STRING([--with-cpg], [Build with CPG support for clustering.])],
+  [case "${withval}" in
+    yes)                       # yes - require dependencies
+    test x$have_libcpg = xyes || AC_MSG_ERROR([libcpg not found, install openais-devel or corosync-devel])
+    test x$have_cpg_h = xyes || AC_MSG_ERROR([cpg.h not found, install openais-devel or corosync-devel])
+    with_cpg=yes
+    ;;
+    no) with_cpg=no ;; 
+    *) AC_MSG_ERROR([Bad value ${withval} for --with-cpg option]) ;;
+   esac],
+   [              # not specified - use if present
+    test x$have_libcpg = xyes -a x$have_cpg_h = xyes && with_cpg=yes
+   ]
+)
+AM_CONDITIONAL([HAVE_LIBCPG], [test x$with_cpg = xyes])
 
+AC_CHECK_LIB([cman],[cman_is_quorate],have_libcman=yes,)
+AC_CHECK_HEADERS([libcman.h],have_libcman_h=yes,)
+AC_ARG_WITH([libcman],  
+  [AS_HELP_STRING([--with-libcman], [Integration with libcman quorum service.])],
+  [case "${withval}" in
+    yes)                       # yes - require dependencies
+    test x$have_libcman = xyes || AC_MSG_ERROR([libcman not found, install cman-devel or cmanlib-devel])
+    test x$have_libcman_h = xyes || AC_MSG_ERROR([libcman.h not found, install cman-devel or cmanlib-devel])
+    with_libcman=yes
+    ;;
+    no) with_libcman=no ;; 
+    *) AC_MSG_ERROR([Bad value ${withval} for --with-libcman option]) ;;
+   esac],
+   [                           # not specified - use if present and we're using with_cpg
+    test x$have_libcman = xyes -a x$have_libcman_h = xyes -a x$with_cpg = xyes &&   with_libcman=yes
+   ]
+)
+AM_CONDITIONAL([HAVE_LIBCMAN], [test x$with_libcman = xyes])
+LIBS=$tmp_LIBS
+
 # Also doxygen for documentation...
 AC_CHECK_PROG([do_doxygen], [doxygen], [yes])
 AM_CONDITIONAL([DOXYGEN], [test x$do_doxygen = xyes])
@@ -186,6 +228,7 @@
 AC_CONFIG_FILES([
   Makefile
   tests/Makefile
+  tests/cluster/Makefile
   tests/jrnl/Makefile
   tests/jrnl/jtt/Makefile
   lib/Makefile

Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am	2009-04-30 15:41:55 UTC (rev 3353)
+++ store/trunk/cpp/tests/Makefile.am	2009-05-05 18:24:25 UTC (rev 3354)
@@ -28,7 +28,7 @@
 
 TMPDIR=$(abs_srcdir)/test_tmp
 
-SUBDIRS = jrnl .
+SUBDIRS = jrnl cluster .
 
 TESTS =						    \
   SimpleTest                    \
@@ -76,10 +76,10 @@
     .valgrindrc \
     .valgrind.supp
 
-TESTS_ENVIRONMENT =						\
-  QPID_DIR=$(QPID_DIR)						\
-  VALGRIND=$(VALGRIND)						\
-  abs_srcdir=$(abs_srcdir)					\
-  LIBBDBSTORE=$(abs_builddir)/../lib/.libs/msgstore.so      \
+TESTS_ENVIRONMENT = \
+  QPID_DIR=$(QPID_DIR) \
+  VALGRIND=$(VALGRIND) \
+  abs_srcdir=$(abs_srcdir) \
+  LIBBDBSTORE=$(abs_builddir)/../lib/.libs/msgstore.so \
   TMPDIR=$(TMPDIR) \
   $(srcdir)/run_test




More information about the rhmessaging-commits mailing list