I found one nit:
+ AC_CHECK_HEADERS([linux/xattr.h]) + AC_CHECK_HEADERS([sys/xattr.h], + [AC_CHECK_FUNCS_ONCE([getxattr])])
This is missing _ONCE and non-ONCE calls, which doesn't work as expected. Simplest fix is to replace AC_CHECK_FUNCS_ONCE with AC_CHECK_FUNCS.