qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r619148 - in /incubator/qpid/trunk/qpid/cpp: configure.ac qpidc.spec.in src/cluster.mk src/tests/cluster.mk
Date Wed, 06 Feb 2008 20:49:08 GMT
Author: aconway
Date: Wed Feb  6 12:49:05 2008
New Revision: 619148

URL: http://svn.apache.org/viewvc?rev=619148&view=rev
Log:

Replaced --enable-cluster option with --with-cpg to enable/disable CPG.

make rpmbuild uses --with-cpg, will fail unless openais is installed.

Normal builds respect explicit --with/--without, or use CPG if
installed when neither is specified.

Modified:
    incubator/qpid/trunk/qpid/cpp/configure.ac
    incubator/qpid/trunk/qpid/cpp/qpidc.spec.in
    incubator/qpid/trunk/qpid/cpp/src/cluster.mk
    incubator/qpid/trunk/qpid/cpp/src/tests/cluster.mk

Modified: incubator/qpid/trunk/qpid/cpp/configure.ac
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/configure.ac?rev=619148&r1=619147&r2=619148&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/configure.ac (original)
+++ incubator/qpid/trunk/qpid/cpp/configure.ac Wed Feb  6 12:49:05 2008
@@ -138,29 +138,33 @@
 AC_CHECK_HEADERS([boost/shared_ptr.hpp uuid/uuid.h],,
   AC_MSG_ERROR([Missing required header files.]))
 
-# Check for cluster requirements. 
-save_ldflags=$LDFLAGS  
+# Check for optional CPG requirement.
+save_ldflags=$LDFLAGS
 LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais"
-AC_CHECK_LIB([cpg],[cpg_initialize],[cpg_lib=yes],[cpg_lib=no])
-AC_CHECK_HEADER([openais/cpg.h],[cpg_h=yes])
-test x$cpg_lib = xyes -a x$cpg_h = xyes && enable_CLUSTER=yes 
 
-if test x$enable_CLUSTER = xyes; then
-  AC_ARG_ENABLE([cluster],  
-    [AS_HELP_STRING([--disable-cluster],
-      [disable cluster functionality (default enabled)])],
-    [enable_CLUSTER=$enableval])   
-fi
-AM_CONDITIONAL([CLUSTER], [test x$enable_CLUSTER = xyes])
-if test x$enable_CLUSTER = xyes; then
-  CPPFLAGS+=" -DCLUSTER"
-  SPEC_REQUIRES_OPENAIS="Requires: openais"
-  AC_SUBST(SPEC_REQUIRES_OPENAIS)
-  SPEC_REQUIRES_OPENAIS_DEVEL="Requires: openais-devel"
-  AC_SUBST(SPEC_REQUIRES_OPENAIS_DEVEL)
+AC_ARG_WITH([cpg],  
+  [AS_HELP_STRING([--with-cpg], [Build with CPG support])],
+  [case "${withval}" in
+    yes)			# yes - enable
+    with_CPG=yes
+    AC_CHECK_LIB([cpg],[cpg_initialize],,[AC_MSG_ERROR([libcpg not found, install openais])])
+    AC_CHECK_HEADERS([openais/cpg.h],,[AC_MSG_ERROR([openais/cpg.h not found, install openais-devel])])
+    ;;
+    no)				# no -disable
+    with_CPG=no
+    ;; 
+    *) AC_MSG_ERROR([Bad value ${withval} for --with-cpg option]) ;;
+   esac],
+   [ # not specified - enable if libs/headers available.
+    with_CPG=yes
+    AC_CHECK_LIB([cpg],[cpg_initialize],,[with_CPG=no])
+    AC_CHECK_HEADERS([openais/cpg.h],,[with_CPG=no])
+   ]
+)
+AM_CONDITIONAL([CPG], [test x$with_CPG = xyes])
+if test x$with_CPG = xyes; then
+  CPPFLAGS+=" -DCPG"
 else
-  SPEC_CONFIGURE_OPTS=--disable-cluster  
-  AC_SUBST(SPEC_CONFIGURE_OPTS)
   LDFLAGS=$save_ldflags	    
 fi
 	

Modified: incubator/qpid/trunk/qpid/cpp/qpidc.spec.in
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/qpidc.spec.in?rev=619148&r1=619147&r2=619148&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/qpidc.spec.in (original)
+++ incubator/qpid/trunk/qpid/cpp/qpidc.spec.in Wed Feb  6 12:49:05 2008
@@ -52,7 +52,7 @@
 Summary: An AMQP message broker daemon
 Group: System Environment/Daemons
 Requires: %name = %version-%release
-@SPEC_REQUIRES_OPENAIS@
+Requires: openais
 
 %description -n %{qpidd}
 A message broker daemon that receives stores and routes messages using
@@ -63,7 +63,7 @@
 Group: Development/System
 Requires: %name-devel = %version-%release
 Requires: %{qpidd} = %version-%release
-@SPEC_REQUIRES_OPENAIS_DEVEL@
+Requires: openais-devel
 
 %description -n %{qpidd}-devel
 Libraries and header files for developing extensions to the
@@ -73,7 +73,7 @@
 %setup -q
 
 %build
-%configure --disable-static @SPEC_CONFIGURE_OPTS@ CXXFLAGS="-O3 -DNDEBUG"
+%configure --disable-static --with-cpg CXXFLAGS="-O3 -DNDEBUG"
 make %{?_smp_mflags}
 # Remove this generated perl file, we don't need it and it upsets rpmlint.
 rm docs/api/html/installdox

Modified: incubator/qpid/trunk/qpid/cpp/src/cluster.mk
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/cluster.mk?rev=619148&r1=619147&r2=619148&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/cluster.mk (original)
+++ incubator/qpid/trunk/qpid/cpp/src/cluster.mk Wed Feb  6 12:49:05 2008
@@ -3,7 +3,7 @@
 # 
 lib_LTLIBRARIES += libqpidcluster.la
 
-if CLUSTER
+if CPG
 
 libqpidcluster_la_SOURCES = \
   qpid/cluster/Cluster.cpp \

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/cluster.mk
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/cluster.mk?rev=619148&r1=619147&r2=619148&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/cluster.mk (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/cluster.mk Wed Feb  6 12:49:05 2008
@@ -1,4 +1,4 @@
-if CLUSTER
+if CPG
 #
 # Cluster tests makefile fragment, to be included in Makefile.am
 # 



Mime
View raw message