+ENABLE_XATTR=no
+AC_ARG_ENABLE([xattr],
+ [AS_HELP_STRING([--enable-xattr], [Enable the xattr interface to access WIM
+ alternate data streams (default: autodetect)])],
+ [ENABLE_XATTR=$enableval],
+ [AC_CHECK_FUNC([setxattr],
+ [AC_CHECK_HEADER([attr/xattr.h],
+ [ENABLE_XATTR=yes],
+ [AC_MSG_WARN([Cannot find the "attr/xattr.h" header. You will not be
+ able to use the xattr interface to access WIM alternate data
+ streams.])])],
+ [AC_MSG_WARN([Cannot find the setxattr() function. You will not be
+ able to use the xattr interface to access WIM alternate data
+ streams.])])])
+
+if test "x$ENABLE_XATTR" = "xyes"; then
+ AC_DEFINE([ENABLE_XATTR], [1], [Define to 1 if using the xattr
+ interface to WIM alternate data streams])
+fi
+