]> www.infradead.org Git - mtd-utils.git/commitdiff
Define WITHOUT_XATTR if sys/acl.h or sys/xattr.h is missing
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Tue, 29 Nov 2016 21:31:11 +0000 (22:31 +0100)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Tue, 29 Nov 2016 21:31:11 +0000 (22:31 +0100)
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 <david.oberhollenzer@sigma-star.at>
configure.ac

index 18ff9affaf5d73809ed69431cc5ae1463359cfa6..2fdf49c9276d0cc082e3ff89f2a7a30f493c1880 100644 (file)
@@ -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])],