summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--mount/.gitignore1
-rw-r--r--mount/Makefile.am15
-rw-r--r--sys-utils/.gitignore1
-rw-r--r--sys-utils/Makefile.am17
-rw-r--r--sys-utils/losetup.8 (renamed from mount/losetup.8)0
-rw-r--r--sys-utils/losetup.c (renamed from mount/lomount.c)0
7 files changed, 29 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index c0d61acee..aa4af0880 100644
--- a/configure.ac
+++ b/configure.ac
@@ -687,6 +687,15 @@ UL_REQUIRES_BUILD([mount], [libblkid])
AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
+AC_ARG_ENABLE([losetup],
+ AS_HELP_STRING([--disable-losetup], [do not build losetup]),
+ [], enable_losetup=check
+)
+UL_BUILD_INIT([losetup])
+UL_REQUIRES_LINUX([losetup])
+AM_CONDITIONAL(BUILD_LOSETUP, test "x$build_losetup" = xyes)
+
+
AC_ARG_ENABLE([libmount-mount],
AS_HELP_STRING([--enable-libmount-mount], [link mount(8) with libmount (EXPERIMENTAL)]),
[], enable_libmount_mount=no
diff --git a/mount/.gitignore b/mount/.gitignore
index db657c719..629b07fcd 100644
--- a/mount/.gitignore
+++ b/mount/.gitignore
@@ -1,4 +1,3 @@
-losetup
mount
mtab_lock_test
swapon
diff --git a/mount/Makefile.am b/mount/Makefile.am
index a2d496dcd..073f05545 100644
--- a/mount/Makefile.am
+++ b/mount/Makefile.am
@@ -1,8 +1,8 @@
include $(top_srcdir)/config/include-Makefile.am
bin_PROGRAMS = mount umount
-sbin_PROGRAMS = losetup swapon
-dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
+sbin_PROGRAMS = swapon
+dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8
# generic sources for all programs (mount, umount)
srcs_common = sundries.c $(top_srcdir)/lib/canonicalize.c sundries.h
@@ -50,10 +50,6 @@ swapon_SOURCES = swapon.c swap_constants.h $(top_srcdir)/lib/linux_version.c \
swapon_CFLAGS = $(cflags_common)
swapon_LDADD = $(ldadd_common)
-losetup_SOURCES = lomount.c \
- $(top_srcdir)/lib/canonicalize.c \
- $(top_srcdir)/lib/strutils.c
-
mount_static_LDADD =
if HAVE_STATIC_MOUNT
@@ -72,13 +68,6 @@ umount_static_LDFLAGS = $(ldflags_static)
umount_static_LDADD = $(ldadd_static)
endif
-if HAVE_STATIC_LOSETUP
-bin_PROGRAMS += losetup.static
-losetup_static_SOURCES = $(losetup_SOURCES)
-losetup_static_LDFLAGS = $(ldflags_static)
-endif
-
-
if HAVE_SELINUX
mount_LDADD += $(SELINUX_LIBS)
mount_static_LDADD += $(SELINUX_LIBS_STATIC)
diff --git a/sys-utils/.gitignore b/sys-utils/.gitignore
index 01a3df986..3426674b0 100644
--- a/sys-utils/.gitignore
+++ b/sys-utils/.gitignore
@@ -14,6 +14,7 @@ ipcs
ldattach
linux32.8
linux64.8
+losetup
lscpu
mips32.8
mips64.8
diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am
index 7285bcb7e..8f2f12ec4 100644
--- a/sys-utils/Makefile.am
+++ b/sys-utils/Makefile.am
@@ -18,6 +18,23 @@ dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
ldattach.8 tunelp.8 rtcwake.8 fsfreeze.8 fstrim.8
endif
+if BUILD_LOSETUP
+sbin_PROGRAMS += losetup
+dist_man_MANS += losetup.8
+
+losetup_SOURCES = losetup.c \
+ $(top_srcdir)/lib/canonicalize.c \
+ $(top_srcdir)/lib/strutils.c
+
+if HAVE_STATIC_LOSETUP
+bin_PROGRAMS += losetup.static
+losetup_static_SOURCES = $(losetup_SOURCES)
+losetup_static_LDFLAGS = -all-static
+endif
+
+endif # BUILD_LOSETUP
+
+
if BUILD_PRLIMIT
usrbin_exec_PROGRAMS += prlimit
dist_man_MANS += prlimit.1
diff --git a/mount/losetup.8 b/sys-utils/losetup.8
index a6b45a0dd..a6b45a0dd 100644
--- a/mount/losetup.8
+++ b/sys-utils/losetup.8
diff --git a/mount/lomount.c b/sys-utils/losetup.c
index 3e19fa6a1..3e19fa6a1 100644
--- a/mount/lomount.c
+++ b/sys-utils/losetup.c