From 1275c4fc1b31171706277a953ade9b0627c6686b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 3 Feb 2015 16:22:55 +0100 Subject: [PATCH] btrfs-progs: autoconf: make btrfs-convert build optional Proposed at https://github.com/kdave/btrfs-progs/pull/6, I've added the configure options. Signed-off-by: David Sterba --- Makefile.in | 7 ++++++- configure.ac | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index b87bf82b..c4deb517 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,6 +8,7 @@ RM = @RM@ RMDIR = @RMDIR@ INSTALL = @INSTALL@ DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ +DISABLE_BTRFSCONVERT = @DISABLE_BTRFSCONVERT@ # Non-static compilation flags CFLAGS = @CFLAGS@ \ @@ -67,7 +68,7 @@ endif MAKEOPTS = --no-print-directory Q=$(Q) progs = mkfs.btrfs btrfs-debug-tree btrfsck \ - btrfs btrfs-map-logical btrfs-image btrfs-zero-log btrfs-convert \ + btrfs btrfs-map-logical btrfs-image btrfs-zero-log \ btrfs-find-root btrfstune btrfs-show-super \ btrfs-corrupt-block btrfs-select-super btrfs-calc-size @@ -75,6 +76,10 @@ progs_extra = btrfs-fragments progs_static = $(foreach p,$(progs),$(p).static) +ifneq ($(DISABLE_BTRFSCONVERT),1) +progs += btrfs-convert +endif + # external libs required by various binaries; for btrfs-foo, # specify btrfs_foo_libs = ; see $($(subst...)) rules below btrfs_convert_libs = -lext2fs -lcom_err diff --git a/configure.ac b/configure.ac index 74e62b40..f523ba5d 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,14 @@ if test "x$enable_documentation" = xyes; then AC_PROG_SED fi +AC_ARG_ENABLE([convert], + AS_HELP_STRING([--disable-convert], [do not build btrfs-convert]), + [], [enable_btrfsconvert=yes] +) + +AS_IF([test "x$enable_btrfsconvert" = xyes], [DISABLE_BTRFSCONVERT=0], [DISABLE_BTRFSCONVERT=1]) +AC_SUBST([DISABLE_BTRFSCONVERT]) + dnl Define _LIBS= and _CFLAGS= by pkg-config dnl