From: David Oberhollenzer Date: Tue, 29 Nov 2016 21:31:11 +0000 (+0100) Subject: Define WITHOUT_XATTR if sys/acl.h or sys/xattr.h is missing X-Git-Tag: v2.0.0-rc1~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3a6aff82ce1419350514942e7fca1769793bcd7a;p=mtd-utils.git Define WITHOUT_XATTR if sys/acl.h or sys/xattr.h is missing The programs mkfs.jffs2 and mkfs.ubifs include those two headers if WITHOUT_XATTR is not defined. Up to now, this macro is only defined if the configure script is run with --without-xattr. If the headers are not present on a system and the configure script is run without special flags set, the build fails. This patch adds a check for the presence of those headers and disables the feature if one of the headers is missing. Signed-off-by: David Oberhollenzer --- diff --git a/configure.ac b/configure.ac index 18ff9af..2fdf49c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,9 @@ AC_ARG_WITH([xattr], esac], [AM_CONDITIONAL([WITHOUT_XATTR], [false])]) +AC_CHECK_HEADER(sys/xattr.h, [], [AM_CONDITIONAL([WITHOUT_XATTR], [true])]) +AC_CHECK_HEADER(sys/acl.h, [], [AM_CONDITIONAL([WITHOUT_XATTR], [true])]) + AC_ARG_WITH([lzo], [AS_HELP_STRING([--without-lzo], [Disable support for LZO compression])],