AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$enable_libmount" = xyes)
+AC_ARG_ENABLE([libmount-mount],
+ AS_HELP_STRING([--enable-libmount-mount], [link mount(8) with libmount (EXPERIMENTAL)]),
+ [], enable_libmount_mount=no
+)
+
+case "$enable_libmount:$enable_libmount_mount" in
+no:yes)
+ AC_MSG_ERROR([cannot link mount(8) with libmount when libmount is disabled]) ;;
+yes:yes)
+ AC_DEFINE(HAVE_LIBMOUNT_MOUNT, 1, [use libmount for mount(8)])
+esac
+AM_CONDITIONAL(BUILD_LIBMOUNT_MOUNT, test "x$enable_libmount_mount" = xyes)
+
+
UTIL_CHECK_LIB(util, openpty)
UTIL_CHECK_LIB(termcap, tgetnum)
mount_static_LDADD += $(SELINUX_LIBS_STATIC)
endif
+if BUILD_LIBMOUNT_MOUNT
+mount_LDADD += $(ul_libmount_la)
+mount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+umount_LDADD += $(ul_libmount_la)
+umount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+if HAVE_STATIC_MOUNT
+mount_static_LDADD += $(ul_libmount_la)
+mount_static_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+endif
+if HAVE_STATIC_UMOUNT
+umount_static_LDADD += $(ul_libmount_la)
+umount_static_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+endif
+endif
+
+if !BUILD_LIBMOUNT_MOUNT
noinst_PROGRAMS = mtab_lock_test
mtab_lock_test_SOURCES = fstab.c $(srcs_common) $(hdrs_mount)
mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS)
+endif
install-exec-hook:
cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff
ts_init "$*"
ts_skip_nonroot
+if [ ! -x "$TS_CMD_MTABLOCK" ]; then
+ ts_slip "not compiled"
+fi
+
#
# Be careful with number of processes. Don't forget that there is time limit
# when the mount waits on the mtab lock. If you define too much processes some