]> err.no Git - util-linux/commitdiff
build-sys: add --disable-mount
authorAlon Bar-Lev <alon.barlev@gmail.com>
Fri, 14 Nov 2008 16:40:25 +0000 (18:40 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 19 Nov 2008 11:40:06 +0000 (12:40 +0100)
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...

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Makefile.am
configure.ac

index a643d4617a5ce1b7b5fdddc7c2535665814c2399..b78e8a77a582e6180915c6b01dc075c8b3eff05f 100644 (file)
@@ -17,10 +17,13 @@ SUBDIRS = \
 if LINUX
 SUBDIRS += \
        hwclock \
-       mount \
        partx
 endif
 
+if BUILD_MOUNT
+SUBDIRS += mount
+endif
+
 ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = \
@@ -42,5 +45,5 @@ distclean-local:
 ENABLE_ALL = --enable-static-programs \
  --enable-elvtune --enable-init --enable-kill --enable-last \
  --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
- --enable-login-utils --enable-write --enable-arch
+ --enable-login-utils --enable-write --enable-arch --enable-mount
 DISTCHECK_CONFIGURE_FLAGS = --disable-use-tty-group $(ENABLE_ALL)
index 770eb45ae85d32757fc3cff1d70a7808a627f9f7..3bbfd5736ddf9d7b41bfff379b6c179d13d029f8 100644 (file)
@@ -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
+elif test "x$linux_os" = xyes; then
+  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
+    AC_MSG_ERROR([blkid or volume_id is needed to build util-linux-ng mount utilities])
+  fi
+else
+  AC_MSG_WARN([non-linux system; do not build mount utilities])
+  build_mount=no
 fi
+AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
 
 dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
 dnl ----------------------------------