0fcc948a5b90fad3f853c0aeffe2ec81d2329dc7
[samba.git] / source / ntvfs / posix / config.m4
1
2
3 dnl #############################################
4 dnl see if we have nanosecond resolution for stat
5 AC_CACHE_CHECK([for tv_nsec nanosecond fields in struct stat],ac_cv_have_stat_tv_nsec,[
6 AC_TRY_COMPILE(
7 [
8 #include <sys/types.h>
9 #include <sys/stat.h>
10 #include <unistd.h>
11 ],
12 [struct stat st; 
13  st.st_mtim.tv_nsec;
14  st.st_atim.tv_nsec;
15  st.st_ctim.tv_nsec;
16 ],
17 ac_cv_decl_have_stat_tv_nsec=yes,
18 ac_cv_decl_have_stat_tv_nsec=no)
19 ])
20 if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
21    AC_DEFINE(HAVE_STAT_TV_NSEC,1,[Whether stat has tv_nsec nanosecond fields])
22 fi
23
24 dnl ############################################
25 dnl use flistxattr as the key function for having 
26 dnl sufficient xattr support for posix xattr backend
27 AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h)
28 AC_SEARCH_LIBS(flistxattr, [attr])
29 AC_CHECK_FUNCS(flistxattr)
30
31 if test x"$ac_cv_func_flistxattr" = x"yes"; then
32         AC_DEFINE(HAVE_XATTR_SUPPORT,1,[Whether we have xattr support])
33 fi