1 dnl ############################################
2 dnl use flistxattr as the key function for having
3 dnl sufficient xattr support for posix xattr backend
4 AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h)
5 AC_SEARCH_LIBS_EXT(flistxattr, [attr], XATTR_LIBS)
6 AC_CHECK_FUNC_EXT(flistxattr, $XATTR_LIBS)
7 SMB_EXT_LIB(XATTR,[${XATTR_LIBS}],[${XATTR_CFLAGS}],[${XATTR_CPPFLAGS}],[${XATTR_LDFLAGS}])
8 if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
9 AC_CACHE_CHECK([whether xattr interface takes additional options], smb_attr_cv_xattr_add_opt,
11 LIBS="$LIBS $XATTRLIBS"
13 #include <sys/types.h>
15 #include <attr/xattr.h>
16 #elif HAVE_SYS_XATTR_H
17 #include <sys/xattr.h>
20 #define NULL ((void *)0)
23 getxattr(NULL, NULL, NULL, 0, 0, 0);
24 ],smb_attr_cv_xattr_add_opt=yes,smb_attr_cv_xattr_add_opt=no)
26 if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
27 AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [xattr functions have additional options])
29 AC_DEFINE(HAVE_XATTR_SUPPORT,1,[Whether we have xattr support])