+build-sys
+--------
+
+ - we use something like
+
+ AC_ARG_ENABLE(...., enable_foo=check)
+ build_foo=yes
+ if test "x$enable_foo" = xcheck; then
+ if test "x$linux_os" = xno; then
+ build_foo=no
+ fi
+ fi
+ AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_foo" = xyes)
+
+ for Linux-only utils in configure.ac. It would be nice to set all defaults
+ for all $enable_ variables at begin of the configure script according to
+ $linux_os. Something like:
+
+ if test "x$linux_os" = xno
+ enable_mount=no
+ enable_libmount=no
+ enable_lsblk=no
+ fi
+
+ then we can remove all "if test "x$enable_foo" = xcheck;" stuff from the rest
+ of the configure script.
+
+ - it would be nice to remove all "if BUILD_LIB{MOUNT,BLKID,UUID}" from the
+ Makefiles (e.g. misc-utils/Makefile.am) and use BUILD_<utilname> only
+
+ The configure.ac has to care about dependence between utils and librares and
+ enable BUILD_<utilname>.
+
fsprobe
-------
AC_ARG_ENABLE([libmount],
AS_HELP_STRING([--disable-libmount], [do not build libmount]),
- [], enable_libmount=yes
+ [], enable_libmount=check
)
+build_libmount=yes
+if test "x$enable_libmount" = xcheck; then
+ if test "x$linux_os" = xno; then
+ AC_MSG_WARN([non-linux system; do not build libmount])
+ build_libmount=no
+ fi
+elif test "x$enable_libmount" = xno; then
+ build_libmount=no
+fi
-case "$enable_libblkid:$enable_libmount" in
+case "$enable_libblkid:$build_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])
-AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$enable_libmount" = xyes)
+AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
AC_ARG_ENABLE([libmount-mount],
[], enable_libmount_mount=no
)
-case "$enable_libmount:$enable_libmount_mount" in
+case "$build_libmount:$enable_libmount_mount" in
no:yes)
AC_MSG_ERROR([cannot link mount(8) with libmount when libmount is disabled]) ;;
yes:yes)
wipefs_LDADD = $(ul_libblkid_la)
wipefs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+if LINUX
bin_PROGRAMS += lsblk
dist_man_MANS += lsblk.8
lsblk_SOURCES = lsblk.c \
$(top_srcdir)/lib/strutils.c
lsblk_LDADD = $(ul_libblkid_la)
lsblk_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+endif
+
if HAVE_STATIC_BLKID
sbin_PROGRAMS += blkid.static
blkid_static_SOURCES = $(blkid_SOURCES)