-AC_INIT([xfsprogs], [4.15.0], [linux-xfs@vger.kernel.org])
+AC_INIT([xfsprogs], [4.20.0], [linux-xfs@vger.kernel.org])
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
enable_threadsan=no)
AC_SUBST(enable_threadsan)
+AC_ARG_ENABLE(lto,
+[ --enable-lto=[yes/no] Enable link time optimization (LTO) [default=no]],,
+ enable_lto=no)
+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 in xfs_scrub (libicu) [default=probe]],,
+ enable_libicu=probe)
+
#
# If the user specified a libdir ending in lib64 do not append another
# 64 to the library names.
AC_HAVE_MINCORE
AC_HAVE_SENDFILE
AC_HAVE_GETMNTENT
-AC_HAVE_GETMNTINFO
AC_HAVE_FALLOCATE
AC_HAVE_FIEMAP
AC_HAVE_PWRITEV2
AC_HAVE_MALLINFO
AC_PACKAGE_WANT_ATTRIBUTES_H
AC_HAVE_LIBATTR
-AC_PACKAGE_WANT_UNINORM_H
-AC_HAVE_U8NORMALIZE
+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
AC_HAVE_SG_IO
AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.])
fi
+if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then
+ AC_PACKAGE_CHECK_LTO
+fi
+if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
+ AC_MSG_ERROR([LTO not supported by compiler.])
+fi
+
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([char *])
AC_TYPE_UMODE_T