summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-02-23 11:37:58 +0100
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-02-25 16:22:22 +0530
commitcf23c6e16217a9bc52e73799ad70cae22dc7a746 (patch)
tree4ee7f0bfda4276461a73db1e5c25a68ead3ec36d /configure.ac
parent9f1c8a5ba49e7cad67b7ebf6e3e119eeb32a7ff0 (diff)
build: refactor
- tcmu-runner and targetcli are not build dependencies - use pkg-config to get libgfapi build parameters - cleanup .spec file Change-Id: Ib1451f7a375438cd2e78ae4137d1d02e01516fbd Signed-off-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 7 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 90ffafb..231e6a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_PREREQ([2.69])
AC_INIT([gluster-block],
m4_esyscmd(echo -n `git describe --always --tags`),
[pkalever@redhat.com],,
- [https://github.com/pkalever/gluster-block.git])
+ [https://github.com/gluster/gluster-block.git])
AC_SUBST([PACKAGE_RELEASE], 1)
@@ -51,9 +51,12 @@ AC_CHECK_HEADERS([stdio.h stdlib.h string.h stdbool.h stddef.h \
rpc/pmap_clnt.h ])
# Checks for libraries.
-AC_CHECK_LIB([gfapi], [glfs_init], [GFAPI="-lgfapi"],
- AC_MSG_ERROR([gfapi library is required to build gluster-block]))
-AC_SUBST(GFAPI)
+# glusterfs-api versions have a prefix of "7."
+PKG_CHECK_MODULES([GFAPI], [glusterfs-api >= 7.3.6],,
+ [AC_MSG_ERROR([gfapi library >= 3.6 is required to build gluster-block])])
+AC_SUBST(GFAPI_CFLAGS)
+AC_SUBST(GFAPI_LIBS)
+
AC_CHECK_LIB([uuid], [uuid_generate], [UUID="-luuid"],
AC_MSG_ERROR([uuid library is required to build gluster-block]))
AC_SUBST(UUID)
@@ -61,17 +64,6 @@ AC_CHECK_LIB([pthread], [pthread_mutex_init],[PTHREAD="-lpthread"],
AC_MSG_ERROR([Posix threads library is required to build gluster-block]))
AC_SUBST(PTHREAD)
-AC_CHECK_PROG(TCMURUNNER, tcmu-runner, yes, no)
-if test "x$TCMURUNNER" = "xno"; then
- AC_MSG_ERROR([tcmu-runner not found; try again after installing])
-fi
-
-# FIXME: version check, need atleast 'targetcli-2.1.fb43'
-AC_CHECK_PROG(TARGETCLI, targetcli, yes, no)
-if test "x$TARGETCLI" = "xno"; then
- AC_MSG_ERROR([targetcli not found; try again after installing])
-fi
-
# Dirty hacky stuff to make STATEDIR work
if test "x$prefix" = xNONE; then
test $localstatedir = '${prefix}/var' && localstatedir=$ac_default_prefix/var