Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=69b7a79e...
Commit: 69b7a79e053aecaf7218134b8536bc0d7332a17e
Parent: 46388807a62c24e4156584481f7df5eb7c8620cd
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Jul 3 18:54:27 2012 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Jul 3 19:02:53 2012 +0100
gfs2-utils: Make building gfs_controld optional
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(a)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