summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshavardhana <harsha@zresearch.com>2009-07-01 04:13:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-01 18:32:20 -0700
commit5feb0ccb6efc006b2b17d29509b63a41fa14293c (patch)
tree112181b32213c93f43037407f92f66755d8c1400
parent88f907af098c2876ca8777783098dae9ad624540 (diff)
fuse 2.8 version check at configure level
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
-rw-r--r--configure.ac19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8be8d921cbe..e32ccedfdb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,7 +300,6 @@ AC_SUBST(MOD_GLUSTERFS_HTTPD_VERSION)
# FUSE section
-# TODO: make a clean version check of libfuse
AC_ARG_ENABLE([fuse-client],
AC_HELP_STRING([--disable-fuse-client],
[Do not build the fuse client. NOTE: you cannot mount glusterfs without the client]))
@@ -310,6 +309,24 @@ if test "x$enable_fuse_client" != "xno"; then
[fuse_req_interrupt_func],
[HAVE_LIBFUSE="yes"],
[HAVE_LIBFUSE="no"])
+
+ if test "x$HAVE_LIBFUSE" = "xyes"; then
+ AC_TRY_COMPILE([#define FUSE_USE_VERSION 26
+ #define _FILE_OFFSET_BITS 64
+ #include <fuse.h>],
+ #define _GLFS_FUSE_VERSION_28 28
+ #if (FUSE_VERSION < _GLFS_FUSE_VERSION_28)
+ #error "fuse version 2.8 not found"
+ #endif
+ ,
+ [HAVE_FUSE_VERSION_28="yes"],
+ [HAVE_FUSE_VERSION_28="no"])
+ fi
+fi
+
+
+if test "x$HAVE_LIBFUSE" = "xyes" -a "x$HAVE_FUSE_VERSION_28" = "xyes"; then
+ AC_DEFINE(HAVE_FUSE_VERSION_28, 1, [found fuse 2.8 version])
fi
if test "x$enable_fuse_client" = "xyes" -a "x$HAVE_LIBFUSE" = "xno"; then