btrfs-progs: build: make libudev selectable
Previously the build would be optional based on what is installed on the system. Add an option to make this selectable by user, ie. to allow build without libudev even if it is installed on the system. For most users and distros libudev dependency should be ok, but we've had requests to disable various features (embedded, systems with non-systemd user space base system) so let's do the same. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c6c2e3da0a
commit
1d0fa3781e
6
INSTALL
6
INSTALL
|
@ -22,6 +22,12 @@ dependencies are not desired.
|
|||
- libsodium
|
||||
- libkcapi
|
||||
|
||||
Optionally, multipath device detection requires libudev and running udev
|
||||
daemon, as it's the only source of the path information. Static build has a
|
||||
fallback and does not need static version of libudev.
|
||||
|
||||
- libudev
|
||||
|
||||
For zoned device support, the system headers installed in /usr/include/linux
|
||||
must be 5.10 or newer.
|
||||
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -317,13 +317,14 @@ fi
|
|||
AS_IF([test "x$enable_zstd" = xyes], [BTRFSRESTORE_ZSTD=1], [BTRFSRESTORE_ZSTD=0])
|
||||
AC_SUBST(BTRFSRESTORE_ZSTD)
|
||||
|
||||
PKG_CHECK_EXISTS([libudev], [pkg_config_libudev=yes], [pkg_config_libudev=no])
|
||||
if test "x$pkg_config_libudev" = xyes; then
|
||||
AC_ARG_ENABLE([libudev],
|
||||
AS_HELP_STRING([--disable-libudev], [build without libudev support (for multipath)]),
|
||||
[], [enable_libudev=yes]
|
||||
)
|
||||
|
||||
if test "x$enable_libudev" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev])
|
||||
AC_DEFINE([HAVE_LIBUDEV], [1], [Define to 1 if libudev is available])
|
||||
else
|
||||
AC_MSG_CHECKING([for LIBUDEV])
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([python],
|
||||
|
@ -430,6 +431,7 @@ AC_MSG_RESULT([
|
|||
Python bindings: ${enable_python}
|
||||
Python interpreter: ${PYTHON}
|
||||
crypto provider: ${cryptoprovider} ${cryptoproviderversion}
|
||||
libudev: ${enable_libudev}
|
||||
zoned device: ${enable_zoned}
|
||||
${experimental_msg}
|
||||
Type 'make' to compile.
|
||||
|
|
Loading…
Reference in New Issue