ntfs-3g provides libntfs-3g, useful independent of the ntfs-3g fuse
filesystem.  Allow building just the library, without the fuse
filesystem support, to support users of the library alone.
---
 configure.ac    |   28 ++++++++++++++++++----------
 src/Makefile.am |   11 ++++++-----
 2 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index 87d8741..f0d4b6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,12 @@ if test "x$prefix" = "xNONE"; then
 fi
 
 # Command-line options.
+AC_ARG_WITH(fuse,
+       AS_HELP_STRING(--without-fuse, disable use of fuse), ,
+       with_fuse=yes
+)
+AM_CONDITIONAL(FUSE, test x$with_fuse = xyes)
+
 AC_ARG_ENABLE(debug,
        AS_HELP_STRING(--enable-debug,enable additional debugging code and
                       output), ,
@@ -78,16 +84,18 @@ export 
PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:/opt/gnome/lib/pkgc
 # Enable large file support.
 AC_SYS_LARGEFILE
 
-case "$target_os" in
-linux*)
-       PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.5.0, [ 
compile_fuse_module=true ],
-       [
-               AC_MSG_ERROR([ntfs-3g requires FUSE >= 2.5.0. Please see 
http://fuse.sf.net/ or install __all__ the precompiled fuse packages.])
-       ]);;
-*)
-               AC_MSG_ERROR([ntfs-3g can be built only under Linux.])
-       ;;
-esac
+if test x$with_fuse = xyes; then
+       case "$target_os" in
+       linux*)
+               PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.5.0, [ 
compile_fuse_module=true ],
+               [
+                       AC_MSG_ERROR([ntfs-3g requires FUSE >= 2.5.0. Please 
see http://fuse.sf.net/, install __all__ the precompiled fuse packages, or 
configure --without-fuse.])
+               ]);;
+       *)
+                       AC_MSG_ERROR([ntfs-3g can be built only under Linux, 
unless configured --without-fuse.])
+               ;;
+       esac
+fi
 
 # add --with-extra-includes and --with-extra-libs switch to ./configure
 all_libraries="$all_libraries $USER_LDFLAGS"
diff --git a/src/Makefile.am b/src/Makefile.am
index fa65bab..56c737c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,10 +11,11 @@ endif
 # Workaround to make REALLYSTATIC work with automake 1.5.
 LINK=$(STATIC_LINK) $(LIBTOOL_LINK)
 
-man_MANS               = ntfs-3g.8 
-
 MAINTAINERCLEANFILES   = Makefile.in
 
+if FUSE
+man_MANS               = ntfs-3g.8 
+
 linux_ntfsincludedir   = -I$(top_srcdir)/include/ntfs
 
 bin_PROGRAMS           = ntfs-3g
@@ -32,9 +33,6 @@ ntfs_3g_CFLAGS        = $(FUSE_MODULE_CFLAGS) 
-DFUSE_USE_VERSION=25
 strip: $(bin_PROGRAMS)
        $(STRIP) $^
 
-libs:
-       (cd ../libntfs-3g && $(MAKE) libs) || exit 1;
-
 install-exec-hook:
        $(INSTALL) -d $(DESTDIR)/sbin
        $(LN_S) -f $(bindir)/ntfs-3g $(DESTDIR)/sbin/mount.ntfs-3g
@@ -47,4 +45,7 @@ install-data-hook:
 uninstall-local:
        $(RM) -f $(DESTDIR)/sbin/mount.ntfs-3g
        $(RM) -f $(DESTDIR)$(man8dir)/mount.ntfs-3g.8
+endif
 
+libs:
+       (cd ../libntfs-3g && $(MAKE) libs) || exit 1;
-- 
1.4.4.2

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to