From 67fb77e759d6babaf5d8853b68241150bf10b6f7 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Tue, 7 Feb 2017 17:09:43 +0530 Subject: build: add uuid and pthread libraries to dependency list Signed-off-by: Prasanna Kumar Kalever --- configure.ac | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'configure.ac') 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 <