On Friday 14 November 2008, Karel Zak wrote: > On Fri, Nov 14, 2008 at 09:18:23AM +0200, Alon Bar-Lev wrote: > > Thank you for responding. > > I use busybox for most of the utilities, still lacks a few that I wish > > to use from util-linux... > > > > So mount comes from busybox. > > And during the cross compile I don't want to compile the mount > > dependencies only to make the configure script happy... > > Is the use case makes sense now? > > Yes. Send a patch. > > Karel > I took the --enable-cramfs template and created --enable-mount. I ifdefed the whole mount utilities as I could not find any single usable utility. Please review. Signed-off-by: Alon Bar-Lev <alon.barlev@xxxxxxxxx> --- diff --git a/configure.ac b/configure.ac index 770eb45..aabed3e 100644 --- a/configure.ac +++ b/configure.ac @@ -144,20 +144,32 @@ AC_ARG_WITH([fsprobe], [], [with_fsprobe=blkid] ) +AC_ARG_ENABLE([mount], + AS_HELP_STRING([--disable-mount], [do not build mount utilities]), + [], enable_mount=check +) + AM_CONDITIONAL(HAVE_BLKID, false) AM_CONDITIONAL(HAVE_VOLUME_ID, false) - -have_blkid=no -have_volume_id=no -if test "x$with_fsprobe" = xblkid; then - UTIL_CHECK_LIB(blkid, blkid_known_fstype) -elif test "x$with_fsprobe" = xvolume_id; then - UTIL_CHECK_LIB(volume_id, volume_id_encode_string) -fi - -if test "x$have_blkid" = xno && test "x$have_volume_id" = xno; then - AC_MSG_ERROR([blkid or volume_id is needed to build util-linux-ng.]) +if test "${enable_mount}" = "no"; then + build_mount=no +else + build_mount=yes + have_blkid=no + have_volume_id=no + if test "x$with_fsprobe" = xblkid; then + UTIL_CHECK_LIB(blkid, blkid_known_fstype) + elif test "x$with_fsprobe" = xvolume_id; then + UTIL_CHECK_LIB(volume_id, volume_id_encode_string) + fi + if test "x$have_blkid" = xno && test "x$have_volume_id" = xno; then + build_mount="no" + fi + case $enable_mount:$build_mount in + yes:no) AC_MSG_ERROR([blkid or volume_id is needed to build util-linux-ng mount utilities.]);; + esac fi +AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes) dnl UTIL_PKG_STATIC(VARIABLE, MODULES) dnl ---------------------------------- diff --git a/mount/Makefile.am b/mount/Makefile.am index a43fcd5..48866b8 100644 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/config/include-Makefile.am EXTRA_DIST = README.mount +if BUILD_MOUNT + bin_PROGRAMS = mount umount sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -89,3 +91,5 @@ install-exec-hook: chmod 4755 $(DESTDIR)$(bindir)/mount chmod 4755 $(DESTDIR)$(bindir)/umount cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff + +endif -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html