]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
fuse: Autodetect Solaris 11 FUSE
authorAndrew Deason <adeason@sinenomine.net>
Fri, 23 Dec 2011 23:31:10 +0000 (18:31 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 11 Sep 2013 21:34:15 +0000 (14:34 -0700)
FUSE exists in Solaris 11, but it does not come with a fuse.pc
pkg-config configuration. Autodetect the presence of FUSE anyway.

Reviewed-on: http://gerrit.openafs.org/6422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 2e5545342b0c644546f8a370bdbf836a6da68b60)

Change-Id: Ib9ef1702af1ff20d836b1c1649fc1182c93e209b
Reviewed-on: http://gerrit.openafs.org/9455
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/cf/fuse.m4

index 054a4458fcf7a36dea0255da1c21703eee023164..43d28a48dc381b90bb9d054500132333f8374785 100644 (file)
@@ -2,6 +2,28 @@ dnl FUSE Autoconf glue.  Build with FUSE if it's available; if it's not,
 dnl don't enable the FUSE build.  If --enable is given explicitly, FUSE
 dnl must be found or we bail out.
 
+AC_DEFUN([OPENAFS_FUSE_DEFS],
+ [ENABLE_FUSE_CLIENT=afsd.fuse
+  CLIENT_UAFS_DEP=libuafs])
+
+dnl Solaris 11 has a FUSE package, but it does not come with a pkg-config
+dnl fuse.pc configuration. The libraries, headers, etc are in predictable
+dnl places, though.
+AC_DEFUN([OPENAFS_SUN511_FUSE],
+ [AS_CASE([$AFS_SYSNAME],
+   [sun4x_511|sunx86_511],
+    [sol11fuse=
+     fuse_cppflags=-D_FILE_OFFSET_BITS=64
+     save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$fuse_cppflags $CPPFLAGS"
+     AC_CHECK_HEADER([fuse.h], [sol11fuse=yes])
+     AS_IF([test x"$sol11fuse" = xyes],
+      [FUSE_CFLAGS="$fuse_cppflags"
+       FUSE_LIBS=-lfuse
+       openafs_fuse=yes
+       OPENAFS_FUSE_DEFS])
+     CPPFLAGS="$save_CPPFLAGS"])])
+
 AC_DEFUN([OPENAFS_FUSE],
 [openafs_fuse=
  ENABLE_FUSE_CLIENT=
@@ -11,12 +33,16 @@ AC_DEFUN([OPENAFS_FUSE],
         [disable building of the FUSE userspace client, afsd.fuse
          (defaults to enabled)])],
     [openafs_fuse="$enableval"])
+
  AS_IF([test -z "$openafs_fuse"],
-    [PKG_CHECK_EXISTS([fuse], [openafs_fuse=yes])])
- AS_IF([test x"$openafs_fuse" = xyes],
-    [PKG_CHECK_MODULES([FUSE], [fuse])
-     ENABLE_FUSE_CLIENT=afsd.fuse
-     CLIENT_UAFS_DEP=libuafs])
+    [PKG_CHECK_EXISTS([fuse], [openafs_fuse=yes], [OPENAFS_SUN511_FUSE])])
+
+ AS_IF([test x"$openafs_fuse" = xyes && test x"$ENABLE_FUSE_CLIENT" = x],
+    [PKG_CHECK_MODULES([FUSE], [fuse],
+       [OPENAFS_FUSE_DEFS],
+       [OPENAFS_SUN511_FUSE
+           AS_IF([test x"ENABLE_FUSE_CLIENT" = x],
+               [AC_MSG_ERROR(["$FUSE_PACKAGE_ERRORS"])])])])
  AC_SUBST([ENABLE_FUSE_CLIENT])
  AC_SUBST([CLIENT_UAFS_DEP])
  AC_SUBST([FUSE_CFLAGS])