AS_HELP_STRING([--disable-libmount], [do not build libmount]),
[], enable_libmount=yes
)
+
+case "$enable_libblkid:$enable_libmount" in
+no:yes)
+ AC_MSG_ERROR([cannot enable libmount when libblkid is disabled]) ;;
+esac
+
AC_SUBST([LIBMOUNT_VERSION])
AC_SUBST([LIBMOUNT_VERSION_INFO])
AC_DEFINE_UNQUOTED(LIBMOUNT_VERSION, "$LIBMOUNT_VERSION", [libmount version string])
if BUILD_LIBBLKID
sbin_PROGRAMS += blkid findfs wipefs
-bin_PROGRAMS += findmnt
-dist_man_MANS += blkid.8 findfs.8 wipefs.8 findmnt.8
+dist_man_MANS += blkid.8 findfs.8 wipefs.8
blkid_SOURCES = blkid.c $(top_srcdir)/lib/ismounted.c \
$(top_srcdir)/lib/strtosize.c
blkid_LDADD = $(ul_libblkid_la)
wipefs_SOURCES = wipefs.c $(top_srcdir)/lib/strtosize.c
wipefs_LDADD = $(ul_libblkid_la)
wipefs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
-findmnt_LDADD = $(ul_libmount_la)
-findmnt_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir)
-findmnt_SOURCES = findmnt.c $(top_srcdir)/lib/tt.c
if HAVE_STATIC_BLKID
sbin_PROGRAMS += blkid.static
blkid_static_SOURCES = $(blkid_SOURCES)
endif
endif
+if BUILD_LIBMOUNT
+bin_PROGRAMS += findmnt
+dist_man_MANS += findmnt.8
+findmnt_LDADD = $(ul_libmount_la)
+findmnt_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir)
+findmnt_SOURCES = findmnt.c $(top_srcdir)/lib/tt.c
+endif
+
cal_SOURCES = cal.c $(top_srcdir)/lib/mbsalign.c
if HAVE_TINFO
cal_LDADD = -ltinfo @NCURSES_LIBS@