From: Alan Somers <asomers(a)gmail.com>
This can be used to disable the linuxdisk plugin, which otherwise is
always built if a suitable mke2fs command is present.
---
configure.ac | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index f24c3734..c93e822b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,18 +483,25 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[
LIBS="$old_LIBS"
])
+AC_ARG_WITH([linuxdisk],
+ [AS_HELP_STRING([--without-linuxdisk],
+ [disable linuxdisk plugin @<:@default=check@:>@])],
+ [],
+ [with_linuxdisk=check])
dnl Check for mke2fs -d (used by linuxdisk plugin). There are two
dnl possible outcomes that we care about: (1) We have mke2fs and
dnl it supports the -d option. (2) We either don't have mke2fs
dnl or it's too old to support the -d option (eg. on RHEL 7).
mke2fs_with_d=no
-AC_MSG_CHECKING([for mke2fs supporting the -d option])
-AS_IF([mke2fs -V >/dev/null 2>&1], [
- AS_IF([LANG=C mke2fs -d 2>&1 | grep -sq "option requires an
argument"], [
- mke2fs_with_d=yes
+AS_IF([test "$with_linuxdisk" != "no"], [
+ AC_MSG_CHECKING([for mke2fs supporting the -d option])
+ AS_IF([mke2fs -V >/dev/null 2>&1], [
+ AS_IF([LANG=C mke2fs -d 2>&1 | grep -sq "option requires an
argument"], [
+ mke2fs_with_d=yes
+ ])
])
+ AC_MSG_RESULT([$mke2fs_with_d])
])
-AC_MSG_RESULT([$mke2fs_with_d])
AM_CONDITIONAL([HAVE_MKE2FS_WITH_D],[test "x$mke2fs_with_d" =
"xyes"])
dnl Check for valgrind.
--
2.26.2