On Wed, Aug 28, 2013 at 03:27:13PM +0800, Robin Dong wrote: > When using sheepfs on rhel5 environment, it will report: > > fuse: unknown option `big_writes' > > because the 'big_writes' option is only supported by libfuse with version >= > 2.8.0. > > So we should add check for version of libfuse in configure.ac. > > Signed-off-by: RobinDong <[email protected]> > --- > configure.ac | 8 ++++++++ > sheepfs/core.c | 2 ++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 9e878f5..6ab58cc 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -323,6 +323,14 @@ if test "x${enable_sheepfs}" = xyes; then > [#define _FILE_OFFSET_BITS 64]) > AC_DEFINE_UNQUOTED([HAVE_SHEEPFS], 1, [have sheepfs]) > PACKAGE_FEATURES="$PACKAGE_FEATURES sheepfs" > + for FUSE_SO_FILE in /lib/libfuse.so /lib64/libfuse.so /lib/libfuse.so.2 > /lib64/libfuse.so.2; do > + if [[[ -a $FUSE_SO_FILE ]]]; then > + if [[[ `file $FUSE_SO_FILE|awk -F"libfuse.so.|'" > '{print $(NF-1)}'|sed s/\\\.//g` -ge 280 ]]]; then > + AC_DEFINE_UNQUOTED([FUSE_SUPPORT_BIGWRITES], 1, > [Support -obig_writes for fuse]) > + break; > + fi > + fi > + done > fi
Maybe better take use of pkgconfig/fuse.pc to get version? Thanks Yuan -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
