From 941a22e7f8d484ae553c653669a671de9f796b3e Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Sat, 27 Oct 2012 13:18:07 +0200 Subject: [PATCH] configure.ac: Disable checks for libfuse when not building ntfs-3g. When we aren't building ntfs-3g but only the tools, then there's no need for libfuse. Still the configure script checked for libfuse availability and wouln't proceed unless either libfuse was detected or libfuse-lite was enabled. This commit fixes this issue by running the libfuse checks only when ntfs-3g is built, meaning that we can now build the ntfsprogs even when libfuse library or headers aren't available. --- configure.ac | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 29602749..64b16067 100644 --- a/configure.ac +++ b/configure.ac @@ -210,27 +210,31 @@ case "${target}" in ;; esac -AC_MSG_CHECKING([fuse compatibility]) -case "${target_os}" in -linux*|solaris*) - AC_ARG_WITH( - [fuse], - [AS_HELP_STRING([--with-fuse=],[Select FUSE library: internal or external @<:@default=internal@:>@])], - , - [with_fuse="internal"] - ) - ;; -darwin*|netbsd*|kfreebsd*-gnu) - with_fuse="external" - ;; -freebsd*) - AC_MSG_ERROR([Please see FreeBSD support at http://www.freshports.org/sysutils/fusefs-ntfs]) - ;; -*) - AC_MSG_ERROR([ntfs-3g can be built for Linux, FreeBSD, Mac OS X, NetBSD, and Solaris only.]) - ;; -esac -AC_MSG_RESULT([${with_fuse}]) +if test "x${enable_ntfs_3g}" = "xyes"; then + AC_MSG_CHECKING([fuse compatibility]) + case "${target_os}" in + linux*|solaris*) + AC_ARG_WITH( + [fuse], + [AS_HELP_STRING([--with-fuse=],[Select FUSE library: internal or external @<:@default=internal@:>@])], + , + [with_fuse="internal"] + ) + ;; + darwin*|netbsd*|kfreebsd*-gnu) + with_fuse="external" + ;; + freebsd*) + AC_MSG_ERROR([Please see FreeBSD support at http://www.freshports.org/sysutils/fusefs-ntfs]) + ;; + *) + AC_MSG_ERROR([ntfs-3g can be built for Linux, FreeBSD, Mac OS X, NetBSD, and Solaris only.]) + ;; + esac + AC_MSG_RESULT([${with_fuse}]) +else + with_fuse="none" +fi case "${target_os}" in solaris*) @@ -270,7 +274,7 @@ if test "${with_fuse}" = "internal"; then [1], [Define to 1 if using internal fuse] ) -else +elif test "${with_fuse}" = "external"; then if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi