cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] gfs2-utils: Make building gfs2_controld optional
@ 2012-07-03 18:00 Andrew Price
  2012-07-04  9:51 ` Steven Whitehouse
  2012-07-04 11:03 ` Fabio M. Di Nitto
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Price @ 2012-07-03 18:00 UTC (permalink / raw)
  To: cluster-devel.redhat.com

As of Fedora 17 gfs_controld isn't required and also doesn't build. This
patch adds an --enable-gfs_controld option to allow it to be built on
older systems while defaulting to future norm of not building it.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 README.build      |    6 ++++++
 configure.ac      |   27 ++++++++++++++++++---------
 group/Makefile.am |    6 +++++-
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/README.build b/README.build
index 007f2d7..27e022a 100644
--- a/README.build
+++ b/README.build
@@ -21,6 +21,12 @@ Plus the following libraries:
   - libcfg
  - openaislib
 
+By default gfs_controld is not built as it is not required in Fedora 17 and
+later and cannot build on it. To re-enable it for older systems, use
+--enable-gfs_controld when running the configure script (see below). The
+library dependencies for gfs_controld are only required when this option is
+given.
+
 Run the following commands:
 
 ./autogen.sh
diff --git a/configure.ac b/configure.ac
index 570f826..d56cfac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,10 @@ AC_ARG_ENABLE([debug],
 	[  --enable-debug          enable debug build. ],
 	[ default="no" ])
 
+AC_ARG_ENABLE([gfs_controld],
+	[  --enable-gfs_controld   build gfs_controld. ],
+	[ default="no" ])
+
 AC_ARG_WITH([syslogfacility],
 	[  --syslogfacility=FACILITY
                           cluster default syslog facility. ],
@@ -114,15 +118,20 @@ AC_ARG_WITH([kernel],
 
 KERNEL_CPPFLAGS="-I$KERNEL_DIR/include"
 
-PKG_CHECK_MODULES([corosync],[corosync])
-PKG_CHECK_MODULES([cpg],[libcpg])
-PKG_CHECK_MODULES([sackpt],[libSaCkpt])
-PKG_CHECK_MODULES([logt],[liblogthread])
-PKG_CHECK_MODULES([ccs],[libccs])
-PKG_CHECK_MODULES([cfg],[libcfg])
-PKG_CHECK_MODULES([fenced],[libfenced])
-PKG_CHECK_MODULES([dlmcontrol],[libdlmcontrol])
-PKG_CHECK_MODULES([quorum],[libquorum])
+# gfs_controld isn't required in the latest versions of cluster
+AM_CONDITIONAL([BUILD_GFS_CONTROLD], [test "x$enable_gfs_controld" = "xyes"])
+AS_IF([test "x$enable_gfs_controld" = "xyes"], [
+	PKG_CHECK_MODULES([corosync],[corosync])
+	PKG_CHECK_MODULES([cpg],[libcpg])
+	PKG_CHECK_MODULES([sackpt],[libSaCkpt])
+	PKG_CHECK_MODULES([logt],[liblogthread])
+	PKG_CHECK_MODULES([ccs],[libccs])
+	PKG_CHECK_MODULES([cfg],[libcfg])
+	PKG_CHECK_MODULES([fenced],[libfenced])
+	PKG_CHECK_MODULES([dlmcontrol],[libdlmcontrol])
+	PKG_CHECK_MODULES([quorum],[libquorum])
+])
+
 PKG_CHECK_MODULES([zlib],[zlib])
 
 # old versions of ncurses don't ship pkg-config files
diff --git a/group/Makefile.am b/group/Makefile.am
index 5b7d0f8..2904ce1 100644
--- a/group/Makefile.am
+++ b/group/Makefile.am
@@ -1,3 +1,7 @@
 MAINTAINERCLEANFILES	= Makefile.in
 
-SUBDIRS			= libgfscontrol gfs_control gfs_controld man include
+if BUILD_GFS_CONTROLD
+DIR_GFS_CONTROLD	= gfs_controld
+endif
+
+SUBDIRS			= libgfscontrol gfs_control $(DIR_GFS_CONTROLD) man include
-- 
1.7.10.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-04 11:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 18:00 [Cluster-devel] [PATCH] gfs2-utils: Make building gfs2_controld optional Andrew Price
2012-07-04  9:51 ` Steven Whitehouse
2012-07-04 11:03 ` Fabio M. Di Nitto
2012-07-04 11:43   ` [Cluster-devel] [PATCH] gfs2-utils: Only build group/ when gfs_controld is enabled Andrew Price
2012-07-04 11:48     ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).