On Saturday 24 May 2008, Szabolcs Szakacsits wrote:
>
> Hi Alon,
>
> On Tue, 20 May 2008, Alon Bar-Lev wrote:
>
> > OK. I will do this soon.
>
> Thanks!
>
> The man part below is commited, and for the moment the /sbin/mount.ntfs-3g
> fix is used temporarily but I didn't check how it could be made 'make
> install' safe. But I'm sure your improvement will take care about it ;-)
>
> Thanks again,
> Szaka
OK,
The attached patch does the followings:
1. Add --enable-mount-helper, default enabled on linux.
2. Trivial fixup casing in --disable-device-default-io-ops
3. Add --with-rootfs drop the uses of none standard exec-prefix, lib and core
utils will be installed here, default /
4. Warn fuse none rootfs only if rootfs is /
5. Dependency of sbin.
6. As it is none standard to install anything out side of prefix, added
DISTCHECK_HACK=1 environment that "make distcheck" works
Please review.
Alon
---
Index: configure.ac
===================================================================
RCS file: /cvsroot/ntfs-3g/ntfs-3g/configure.ac,v
retrieving revision 1.65
diff -u -B -r1.65 configure.ac
--- configure.ac 24 May 2008 15:49:56 -0000 1.65
+++ configure.ac 24 May 2008 18:30:42 -0000
@@ -73,6 +73,18 @@
)
AC_ARG_ENABLE(
+ [mount-helper],
+ [AC_HELP_STRING([--enable-mount-helper], [install mount helper
@<:@default=enabled for linux@:>@])],
+ ,
+ [
+ case "${target_os}" in
+ linux*) enable_mount_helper="yes" ;;
+ *) enable_mount_helper="no" ;;
+ esac
+ ]
+)
+
+AC_ARG_ENABLE(
[ldconfig],
[AC_HELP_STRING([--disable-ldconfig], [do not update dynamic linker
cache using ldconfig])],
,
@@ -95,11 +107,18 @@
AC_ARG_ENABLE(
[device-default-io-ops],
- [AC_HELP_STRING([--disable-device-default-io-ops], [Install default IO
ops])],
+ [AC_HELP_STRING([--disable-device-default-io-ops], [install default IO
ops])],
,
[enable_device_default_io_ops="yes"]
)
+AC_ARG_WITH(
+ [rootfs],
+ [AC_HELP_STRING([--with-rootfs=DIR], [rootfs location
@<:@default=/@:>@])],
+ ,
+ [with_rootfs="/"]
+)
+
# pthread_rwlock_t requires _GNU_SOURCE
AC_GNU_SOURCE
@@ -289,22 +308,17 @@
test "${enable_really_static}" = "yes" && enable_library="no"
test "${enable_library}" = "no" && enable_ldconfig="no"
-# Settings
+if test "x${DISTCHECK_HACK}" != "x"; then
+ with_rootfs=`echo "${prefix}" | sed "s#NONE#${ac_default_prefix}#"`
+ enable_mount_helper="no"
+ enable_ldconfig="no"
+fi
+
+rootbindir="${with_rootfs}/bin"
+rootsbindir="${with_rootfs}/sbin"
+rootlibdir="${with_rootfs}/lib${libdir##*/lib}"
pkgconfigdir="\$(libdir)/pkgconfig"
ntfs3gincludedir="\$(includedir)/ntfs-3g"
-# Executables should be installed to the root filesystem, otherwise
-# automounting NTFS volumes can fail during boot if the driver binaries
-# and their dependencies are on an unmounted partition. Use --exec-prefix
-# to override this.
-if test "x${exec_prefix}" = "xNONE"; then
- rootbindir="/bin"
- rootsbindir="/sbin"
- rootlibdir="/lib${libdir##*/lib}"
-else
- rootbindir="\$(bindir)"
- rootsbindir="\$(sbindir)"
- rootlibdir="\$(libdir)"
-fi
AC_SUBST([pkgconfigdir])
AC_SUBST([ntfs3gincludedir])
AC_SUBST([rootbindir])
@@ -320,6 +334,7 @@
AM_CONDITIONAL([RUN_LDCONFIG], [test "${enable_ldconfig}" = "yes"])
AM_CONDITIONAL([REALLYSTATIC], [test "${enable_really_static}" = "yes"])
AM_CONDITIONAL([INSTALL_LIBRARY], [test "${enable_library}" = "yes"])
+AM_CONDITIONAL([ENABLE_MOUNT_HELPER], [test "${enable_mount_helper}" = "yes"])
# workaround for <autoconf-2.60
if test -z "${docdir}"; then
@@ -343,7 +358,7 @@
])
AC_OUTPUT
-if test "${with_fuse}" = "external"; then
+if test "${with_fuse}" = "external" -a "${with_rootfs}" = "/"; then
if ! echo "x$FUSE_LIB_PATH" | grep -- "x-L/lib" > /dev/null; then
cat <<EOF
****************************************************************************
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/ntfs-3g/ntfs-3g/src/Makefile.am,v
retrieving revision 1.12
diff -u -B -r1.12 Makefile.am
--- src/Makefile.am 24 May 2008 17:37:46 -0000 1.12
+++ src/Makefile.am 24 May 2008 18:30:43 -0000
@@ -37,13 +37,17 @@
$(LDCONFIG)
endif
-install-exec-local:
- $(INSTALL) -d "$(DESTDIR)/sbin"
+if ENABLE_MOUNT_HELPER
+install-exec-local: install-rootbinPROGRAMS
+ $(MKDIR_P) "$(DESTDIR)/sbin"
$(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)/sbin/mount.ntfs-3g"
+endif
install-data-local: install-man8
$(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
uninstall-local:
- $(RM) -f "$(DESTDIR)/sbin/mount.ntfs-3g"
$(RM) -f "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
+if ENABLE_MOUNT_HELPER
+ $(RM) -f "$(DESTDIR)/sbin/mount.ntfs-3g"
+endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel