diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-07 17:09:43 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-07 17:22:58 +0530 |
commit | 67fb77e759d6babaf5d8853b68241150bf10b6f7 (patch) | |
tree | c8db783f65c54a02d45b47864018823745b8ab8a | |
parent | 144a22cd9f547b54a712e0a78cd698edae12dc23 (diff) |
build: add uuid and pthread libraries to dependency list
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | daemon/Makefile.am | 2 | ||||
-rw-r--r-- | rpc/Makefile.am | 2 |
3 files changed, 18 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index e18b3e2..d51c87e 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AC_INIT([glusterfs-block], AC_SUBST([PACKAGE_RELEASE], 1) AC_ARG_WITH(systemddir, - [ --with-systemddir=DIR systemd service files in DIR @<:@PREFIX/lib/systemd/system@:>@], + [--with-systemddir=DIR systemd service files in DIR @<:@PREFIX/lib/systemd/system@:>@], [systemddir=$withval], [systemddir='${prefix}/lib/systemd/system']) AC_SUBST(systemddir) @@ -44,11 +44,22 @@ LT_INIT AC_PROG_CC # Checks for header files. -AC_CHECK_HEADERS([memory.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h]) +AC_CHECK_HEADERS([stdio.h stdlib.h string.h stdbool.h \ + unistd.h errno.h memory.h time.h \ + netdb.h netinet/in.h sys/socket.h \ + pthread.h uuid/uuid.h glusterfs/api/glfs.h \ + rpc/pmap_clnt.h ]) # Checks for libraries. -AC_CHECK_LIB([gfapi], [glfs_init]) -PKG_CHECK_MODULES([GLFS], [glusterfs-api >= 3]) +AC_CHECK_LIB([gfapi], [glfs_init], [GFAPI="-lgfapi"], + AC_MSG_ERROR([gfapi library is required to build gluster-block])) +AC_SUBST(GFAPI) +AC_CHECK_LIB([uuid], [uuid_generate], [UUID="-luuid"], + AC_MSG_ERROR([uuid library is required to build gluster-block])) +AC_SUBST(UUID) +AC_CHECK_LIB([pthread], [pthread_mutex_init],[PTHREAD="-lpthread"], + AC_MSG_ERROR([Posix threads library is required to build gluster-block])) +AC_SUBST(PTHREAD) # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL @@ -66,7 +77,7 @@ cat <<EOF $PACKAGE_NAME version $PACKAGE_VERSION Prefix.........: $prefix C Compiler.....: $CC $CFLAGS $CPPFLAGS - Linker.........: $LD $MORE_LDFLAGS $LDFLAGS $LIBS + Linker.........: $LD $LDFLAGS $LIBS --------------------------------------------- Check the above options and compile with: diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 0b04f74..1e018a8 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -4,7 +4,7 @@ gluster_blockd_SOURCES = gluster-blockd.c gluster_blockd_CFLAGS = -I$(top_srcdir)/utils/ -I$(top_srcdir)/rpc -gluster_blockd_LDADD = $(top_srcdir)/rpc/libgbxdr.la $(top_srcdir)/utils/libgb.la +gluster_blockd_LDADD = $(PTHREAD) $(top_srcdir)/rpc/libgbxdr.la $(top_srcdir)/utils/libgb.la DISTCLEANFILES = Makefile.in diff --git a/rpc/Makefile.am b/rpc/Makefile.am index 20ed49d..51beeb8 100644 --- a/rpc/Makefile.am +++ b/rpc/Makefile.am @@ -6,7 +6,7 @@ noinst_HEADERS = block.h glfs-operations.h libgbxdr_la_CFLAGS = -I$(top_srcdir)/utils/ -libgbxdr_la_LIBADD = -lgfapi +libgbxdr_la_LIBADD = $(GFAPI) $(UUID) libgbxdr_ladir = $(includedir)/gluster-block/rpc |