From ca352e0f922e28f3d66a1d2e7d165e4dc846e5b8 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 14 Jul 2010 09:28:47 -0700 Subject: [PATCH] Rewrite FUSE macro to skip FUSE if not found unless --enabled If no configure flags are given, build the FUSE afsd iff FUSE is found. If --enable-fuse-client is explicitly given, always try to build the FUSE client and abort if FUSE libraries could not be found. Change-Id: Icc0d5bbb03239470ad856d87bca600304f030591 Reviewed-on: http://gerrit.openafs.org/2419 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/cf/fuse.m4 | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/cf/fuse.m4 b/src/cf/fuse.m4 index 5fa511b3f..054a4458f 100644 --- a/src/cf/fuse.m4 +++ b/src/cf/fuse.m4 @@ -1,25 +1,23 @@ -dnl -dnl $Id$ -dnl -dnl FUSE autoconf glue -dnl +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],[ - -AC_ARG_ENABLE([fuse-client], - [AS_HELP_STRING([--disable-fuse-client],[disable building of the FUSE userspace client, afsd.fuse (defaults to enabled)])],, - [enable_fuse_client="yes"]) - -if test "x$enable_fuse_client" = "xyes" ; then - PKG_PROG_PKG_CONFIG - PKG_CHECK_MODULES([FUSE], [fuse]) - ENABLE_FUSE_CLIENT=afsd.fuse - CLIENT_UAFS_DEP=libuafs -fi - -AC_SUBST(ENABLE_FUSE_CLIENT) -AC_SUBST(CLIENT_UAFS_DEP) -AC_SUBST(FUSE_CFLAGS) -AC_SUBST(FUSE_LIBS) - -])dnl +AC_DEFUN([OPENAFS_FUSE], +[openafs_fuse= + ENABLE_FUSE_CLIENT= + CLIENT_UAFS_DEP= + AC_ARG_ENABLE([fuse-client], + [AS_HELP_STRING([--disable-fuse-client], + [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]) + AC_SUBST([ENABLE_FUSE_CLIENT]) + AC_SUBST([CLIENT_UAFS_DEP]) + AC_SUBST([FUSE_CFLAGS]) + AC_SUBST([FUSE_LIBS])]) -- 2.39.5