]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Link ceph-fuse to fuse on DARWIN
authorYan, Zheng <zyan@redhat.com>
Sun, 5 Jul 2015 07:49:49 +0000 (15:49 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Aug 2015 08:00:22 +0000 (16:00 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
configure.ac
src/Makefile-client.am
src/client/Makefile.am
src/client/fuse_ll.cc
src/rbd_fuse/rbd-fuse.cc

index 2503c87b077575a2a59c5cf1adc8a36ae8d178ea..53b7e09a1666757c8004413a730cd376199acd3f 100644 (file)
@@ -508,20 +508,11 @@ AC_ARG_WITH([fuse],
             [],
             [with_fuse=yes])
 LIBFUSE=
-AS_IF([test "x$with_fuse" != xno],
-           [AC_CHECK_LIB([fuse], [fuse_main],
-             [AC_SUBST([LIBFUSE], ["-lfuse"])
-               AC_DEFINE([HAVE_LIBFUSE], [1],
-                         [Define if you have fuse])
-               HAVE_LIBFUSE=1
-              # look for fuse_getgroups and define FUSE_GETGROUPS if found
-           LIBS_saved="$LIBS"
-           LIBS="$LIBS -lfuse"
-              AC_CHECK_FUNCS([fuse_getgroups])
-           LIBS="$LIBS_saved"
-              ],
-             [AC_MSG_FAILURE(
-                   [no FUSE found (use --without-fuse to disable)])])])
+AS_IF([test "x$with_fuse" != xno], [
+  PKG_CHECK_MODULES([LIBFUSE], [fuse],
+    [HAVE_LIBFUSE=1],
+    [AC_MSG_FAILURE([no FUSE found (use --without-fuse to disable)])])
+])
 AM_CONDITIONAL(WITH_FUSE, [test "$HAVE_LIBFUSE" = "1"])
 
 # jemalloc?
index a8b697c4056e02dd58373e4ee124340efd3222ba..af1a84427822f9c0be36b89fa12fbdeb5ae96ccb 100644 (file)
@@ -75,7 +75,8 @@ bin_PROGRAMS += ceph-fuse
 
 if WITH_RBD
 rbd_fuse_SOURCES = rbd_fuse/rbd-fuse.cc
-rbd_fuse_LDADD = -lfuse $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
+rbd_fuse_CXXFLAGS = $(AM_CXXFLAGS) $(LIBFUSE_CFLAGS)
+rbd_fuse_LDADD = $(LIBFUSE_LIBS) $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
 bin_PROGRAMS += rbd-fuse
 endif # WITH_RBD
 endif # WITH_FUSE
index 5ef480b8c09bb0f4e731067d3208314e4286af7c..8e47f51b1dfba697086e88a6b13bdcb928d26f66 100644 (file)
@@ -27,7 +27,8 @@ noinst_HEADERS += \
 
 if WITH_FUSE
 libclient_fuse_la_SOURCES = client/fuse_ll.cc
-libclient_fuse_la_LIBADD = libclient.la -lfuse
+libclient_fuse_la_LIBADD = libclient.la $(LIBFUSE_LIBS)
+libclient_fuse_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBFUSE_CFLAGS)
 noinst_LTLIBRARIES += libclient_fuse.la
 noinst_HEADERS += client/fuse_ll.h
 endif
index ee9f552f5ee4a5d281947fe17b29faa261d51b6f..e2d3cc1ef890d8ecd7266db64cd74adc659e59a2 100644 (file)
@@ -14,8 +14,8 @@
 
 #define FUSE_USE_VERSION 30
 
-#include <fuse/fuse.h>
-#include <fuse/fuse_lowlevel.h>
+#include <fuse.h>
+#include <fuse_lowlevel.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
index 4602cbfab971140981f8b4ab48f1d1a9352969ef..f7ac46c7677837c662502db30699f3ad0dee24b4 100644 (file)
@@ -12,7 +12,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #if defined(DARWIN) 
-#include <fuse/fuse.h>
+#include <fuse.h>
 #include "porting.h"
 #else
 #include <fuse.h>