diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-11 21:05:38 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-11 21:05:38 +0200 |
commit | caa4e428604780bb098060f7286c69d30c8b4007 (patch) | |
tree | be6ca91d7ba94b888343b21482bc83f8e25bcccb /lib/util/xattr.m4 | |
parent | 4604ca430294d8d9a522dd29705e7a7a1c969304 (diff) | |
download | samba-caa4e428604780bb098060f7286c69d30c8b4007.tar.gz samba-caa4e428604780bb098060f7286c69d30c8b4007.tar.xz samba-caa4e428604780bb098060f7286c69d30c8b4007.zip |
Move lib/util from source4 to top-level libutil.
Conflicts:
source4/Makefile
Diffstat (limited to 'lib/util/xattr.m4')
-rw-r--r-- | lib/util/xattr.m4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/util/xattr.m4 b/lib/util/xattr.m4 new file mode 100644 index 0000000000..497809a47a --- /dev/null +++ b/lib/util/xattr.m4 @@ -0,0 +1,32 @@ +dnl ############################################ +dnl use flistxattr as the key function for having +dnl sufficient xattr support for posix xattr backend +AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h) +AC_SEARCH_LIBS_EXT(flistxattr, [attr], XATTR_LIBS) +AC_CHECK_FUNC_EXT(flistxattr, $XATTR_LIBS) +SMB_EXT_LIB(XATTR,[${XATTR_LIBS}],[${XATTR_CFLAGS}],[${XATTR_CPPFLAGS}],[${XATTR_LDFLAGS}]) +if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then + AC_CACHE_CHECK([whether xattr interface takes additional options], smb_attr_cv_xattr_add_opt, + [old_LIBS=$LIBS + LIBS="$LIBS $XATTRLIBS" + AC_TRY_COMPILE([ + #include <sys/types.h> + #if HAVE_ATTR_XATTR_H + #include <attr/xattr.h> + #elif HAVE_SYS_XATTR_H + #include <sys/xattr.h> + #endif + #ifndef NULL + #define NULL ((void *)0) + #endif + ],[ + getxattr(NULL, NULL, NULL, 0, 0, 0); + ],smb_attr_cv_xattr_add_opt=yes,smb_attr_cv_xattr_add_opt=no) + LIBS=$old_LIBS]) + if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then + AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [xattr functions have additional options]) + fi + AC_DEFINE(HAVE_XATTR_SUPPORT,1,[Whether we have xattr support]) + SMB_ENABLE(XATTR,YES) +fi + |