summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2018-07-23 11:35:16 +0200
committerNiels de Vos <ndevos@redhat.com>2018-07-27 17:37:32 +0000
commit7f7296d1f52f1b4308551fafad4eb22e3855b382 (patch)
treeb754251445e6703f08ef1271a610e8f831248f23 /configure.ac
parent35cfc01fa2e395111f7d629f00dc06eecf35a709 (diff)
build: remove uuid from contrib/
Bundling libuuid is not needed anymore, all current distributions provide it now. Some OS's provide their own uuid_*() functions in libc. These may not be fully compatible with libuuid.so found on Linux systems. In that case, either e2fsprogs-libuuid can be installed, or support for the native uuid_*() functions can be added to libglusterfs/src/compat-uuid.h. Change-Id: Icfa48caea81307a3bca549364969c2038911942b Fixes: bz#1607319 Signed-off-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 3c9602033e0..e8fd0ea6952 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,7 +272,6 @@ AC_CONFIG_FILES([Makefile
events/tools/Makefile
contrib/fuse-util/Makefile
contrib/umountd/Makefile
- contrib/uuid/uuid_types.h
glusterfs-api.pc
libgfchangelog.pc
libgfdb.pc
@@ -504,13 +503,12 @@ dnl Math library
AC_CHECK_LIB([m], [pow], [MATH_LIB='-lm'], [MATH_LIB=''])
AC_SUBST(MATH_LIB)
-dnl use libuuid.so or fall-back to contrib/uuid
+dnl depend on libuuid.so
PKG_CHECK_MODULES([UUID], [uuid],
[have_uuid=yes
AC_DEFINE(HAVE_LIBUUID, 1, [have libuuid.so])
PKGCONFIG_UUID=uuid],
- [have_uuid=no
- UUID_CFLAGS='-I$(CONTRIBDIR)/uuid'])
+ [have_uuid=no])
AM_CONDITIONAL([HAVE_LIBUUID], [test x$have_uuid = xyes])
dnl older version of libuuid (from e2fsprogs) require including uuid/uuid.h
@@ -524,6 +522,21 @@ AC_CHECK_HEADER([uuid.h], [], [AC_CHECK_HEADER([uuid/uuid.h])],
CFLAGS=${saved_CFLAGS}
if test "x$ac_cv_header_uuid_uuid_h" = "xyes"; then
UUID_CFLAGS="${UUID_CFLAGS} -I$(pkg-config --variable=includedir uuid)/uuid"
+ have_uuid=yes
+fi
+
+if test "x$have_uuid" != "xyes"; then
+ case $host_os in
+ *freebsd*)
+ AC_MSG_ERROR([e2fsprogs-libuuid is required to build glusterfs])
+ ;;
+ linux*)
+ AC_MSG_ERROR([libuuid is required to build glusterfs])
+ ;;
+ *)
+ AC_MSG_ERROR([a Linux compatible libuuid is required to build glusterfs])
+ ;;
+ esac
fi
dnl libglusterfs needs uuid.h, practically everything depends on it