]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: make scrub build config-optional
authorEric Sandeen <sandeen@redhat.com>
Tue, 9 Oct 2018 16:49:47 +0000 (11:49 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 9 Oct 2018 16:49:47 +0000 (11:49 -0500)
This lets us do:

# ./configure --enable-scrub=no
or
# ./configure --disable-scrub

for any distros that may not want to ship the experimental scrub utility.

The default is still to build scrub.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Makefile
configure.ac
include/builddefs.in

index 4f6435cfdc62566f9657bd6313b4ea735580d777..d031a6035985f3dd24368e309ee270cbab40b4cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,11 @@ LIBFROG_SUBDIR = libfrog
 DLIB_SUBDIRS = libxlog libxcmd libhandle
 LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
 TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
-               mdrestore repair rtcp m4 man doc debian spaceman scrub
+               mdrestore repair rtcp m4 man doc debian spaceman
+
+ifeq ("$(ENABLE_SCRUB)","yes")
+TOOL_SUBDIRS += scrub
+endif
 
 ifneq ("$(XGETTEXT)","")
 TOOL_SUBDIRS += po
index 3fd7691eaab5758a09aec7caa49d66bd3bc1a22e..c2834ab7220248443f1f22e534f9e1b4140924d3 100644 (file)
@@ -95,9 +95,15 @@ AC_ARG_ENABLE(lto,
        enable_lto=probe)
 AC_SUBST(enable_lto)
 
+# Enable xfs_scrub build
+AC_ARG_ENABLE(scrub,
+[ --enable-scrub=[yes/no]    Enable build of xfs_scrub utility [default=yes]],,
+       enable_scrub=yes)
+AC_SUBST(enable_scrub)
+
 # Enable libicu for xfs_scrubbing of malicious unicode sequences in names
 AC_ARG_ENABLE(libicu,
-[ --enable-libicu=[yes/no]   Enable Unicode name scanning (libicu) [default=probe]],,
+[ --enable-libicu=[yes/no]   Enable Unicode name scanning in xfs_scrub (libicu) [default=probe]],,
        enable_libicu=probe)
 
 #
@@ -177,11 +183,13 @@ AC_HAVE_DEVMAPPER
 AC_HAVE_MALLINFO
 AC_PACKAGE_WANT_ATTRIBUTES_H
 AC_HAVE_LIBATTR
-if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
-       AC_HAVE_LIBICU
-fi
-if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
-        AC_MSG_ERROR([libicu not found.])
+if test "$enable_scrub" = "yes"; then
+        if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
+                AC_HAVE_LIBICU
+        fi
+        if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
+                AC_MSG_ERROR([libicu not found.])
+        fi
 fi
 AC_HAVE_OPENAT
 AC_HAVE_FSTATAT
index 7ad5b3d020f12d7046eec34757827d3e141a3f18..defea2c337c7b1625dd62c75c4990f5e868f05db 100644 (file)
@@ -80,6 +80,7 @@ ENABLE_GETTEXT        = @enable_gettext@
 ENABLE_EDITLINE        = @enable_editline@
 ENABLE_READLINE        = @enable_readline@
 ENABLE_BLKID   = @enable_blkid@
+ENABLE_SCRUB   = @enable_scrub@
 
 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@