Index: libarchive-1.2.57/configure.ac =================================================================== --- libarchive-1.2.57.orig/configure.ac +++ libarchive-1.2.57/configure.ac @@ -55,7 +55,6 @@ AC_CHECK_TOOL([STRIP],[strip]) AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([attr/xattr.h]) AC_CHECK_HEADERS([bzlib.h errno.h ext2fs/ext2_fs.h fcntl.h grp.h]) AC_CHECK_HEADERS([inttypes.h langinfo.h limits.h linux/ext2_fs.h]) # Include inttypes.h into archive.h only if appropriate. @@ -77,8 +76,6 @@ AC_ARG_ENABLE([static-bsdtar], AM_CONDITIONAL([STATIC_BSDTAR], [test "x$enable_static_bsdtar" != "xno"]) # Checks for libraries. -AC_CHECK_LIB(acl,acl_set_file) -AC_CHECK_LIB(attr,setxattr) AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) AC_CHECK_LIB(z,inflate) @@ -142,9 +139,8 @@ AC_FUNC_STRERROR_R AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS([chflags fchdir fchflags fchmod fchown futimes]) -AC_CHECK_FUNCS([ftruncate getopt_long getxattr]) +AC_CHECK_FUNCS([ftruncate getopt_long]) AC_CHECK_FUNCS([lchflags lchmod lchown]) -AC_CHECK_FUNCS([lgetxattr listxattr llistxattr fsetxattr lsetxattr]) AC_CHECK_FUNCS([lutimes memmove]) AC_CHECK_FUNCS([memset mkdir mkfifo nl_langinfo reallocf setlocale]) AC_CHECK_FUNCS([strchr strdup strerror strrchr timegm]) @@ -182,6 +178,16 @@ AC_CHECK_MEMBER(struct dirent.d_namlen,, #endif ]) +# Check for Extended Attributes support +AC_ARG_ENABLE([xattr], + AS_HELP_STRING([--disable-xattr], [Enable Extended Attributes support (default: check)])) + +if test "x$enable_xattr" != "xno"; then + AC_CHECK_HEADERS([attr/xattr.h]) + AC_CHECK_LIB(attr,setxattr) + AC_CHECK_FUNCS([getxattr lgetxattr listxattr llistxattr fsetxattr lsetxattr]) +fi + # Check for ACL support # # The ACL support in libarchive is written against the POSIX1e draft, @@ -189,6 +195,10 @@ AC_CHECK_MEMBER(struct dirent.d_namlen,, # platforms. Worse, some systems have completely non-POSIX acl functions, # which makes the following checks rather more complex than I would like. # +AC_ARG_ENABLE([acl], + AS_HELP_STRING([--disable-acl], [Enable ACL support (default: check)])) + +if test "x$enable_acl" != "xno"; then AC_CHECK_HEADERS([sys/acl.h]) AC_CHECK_LIB([acl],[acl_get_file]) AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file]) @@ -222,6 +232,7 @@ AC_CHECK_DECL([ACL_USER], [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])], [], [#include ]) +fi # Additional requirements AC_SYS_LARGEFILE