summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2016-01-26 14:39:13 +0100
committerKarel Zak2016-01-26 14:39:13 +0100
commit5a9713293d5f0e20230646fc403ec4a5bf8c1a1f (patch)
tree3b3c7318dcbe66734c05d683fcaf070abdd7ca52 /configure.ac
parentmore: remove unnecessary compatibility layer (diff)
downloadkernel-qcow2-util-linux-5a9713293d5f0e20230646fc403ec4a5bf8c1a1f.tar.gz
kernel-qcow2-util-linux-5a9713293d5f0e20230646fc403ec4a5bf8c1a1f.tar.xz
kernel-qcow2-util-linux-5a9713293d5f0e20230646fc403ec4a5bf8c1a1f.zip
libmount: consolidate btrfs stuff, make it more portable
- add --with-btrfs (enabled by default) - check for linux/btrfs.h - add "btrfs" to libmount features list (see mount -V) - #ifdef HAVE_BTRFS_SUPPORT for all btrfs stuff in libmount Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eee916c6a..3002e77a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,6 +197,7 @@ AC_CHECK_HEADERS([ \
fcntl.h \
getopt.h \
inttypes.h \
+ linux/btrfs.h \
linux/cdrom.h \
linux/falloc.h \
linux/watchdog.h \
@@ -264,6 +265,7 @@ AC_CHECK_HEADERS([langinfo.h],
dnl Convert some ac_cv_header_* variables to have_*
dnl
+have_linux_btrfs_h=$ac_cv_header_linux_btrfs_h
have_linux_raw_h=$ac_cv_header_linux_raw_h
have_linux_securebits_h=$ac_cv_header_linux_securebits_h
have_linux_watchdog_h=$ac_cv_header_linux_watchdog_h
@@ -1786,6 +1788,25 @@ UL_BUILD_INIT([write])
AM_CONDITIONAL([BUILD_WRITE], [test "x$build_write" = xyes])
+AC_ARG_WITH([btrfs],
+ AS_HELP_STRING([--with-btrfs], [build with support for btrfs]),
+ [], [with_btrfs=check]
+)
+have_btrfs=no
+AS_IF([test "x$with_btrfs" != xno], [
+ AS_CASE([$with_btrfs:$have_linux_btrfs_h],
+ [yes:no],
+ [AC_MSG_ERROR([btrfs selected but linux/btrfs.h not found])],
+ [check:no],
+ [AC_MSG_WARN([linux/btrfs.h not found, do not build with btrfs support])],
+ [*:yes],
+ [have_btrfs=yes
+ AC_DEFINE([HAVE_BTRFS_SUPPORT], [1], [Define if btrfs stuff is available])]
+ )
+])
+AM_CONDITIONAL([HAVE_BTRFS], [test "x$have_btrfs" = xyes])
+
+
AC_ARG_WITH([systemd],
AS_HELP_STRING([--with-systemd], [build with support for systemd]),
[], [with_systemd=check]
@@ -2061,6 +2082,7 @@ AC_MSG_RESULT([
Bash completions: ${with_bashcompletiondir}
Systemd support: ${have_systemd}
+ Btrfs support: ${have_btrfs}
warnings: