Index: libarchive-1.2.51/configure.ac =================================================================== --- libarchive-1.2.51.orig/configure.ac +++ libarchive-1.2.51/configure.ac @@ -55,11 +55,10 @@ 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]) AC_CHECK_HEADERS([inttypes.h langinfo.h limits.h linux/ext2_fs.h]) AC_CHECK_HEADERS([locale.h paths.h]) -AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/acl.h sys/ioctl.h]) +AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/ioctl.h]) AC_CHECK_HEADERS([sys/param.h sys/time.h unistd.h wchar.h zlib.h]) AC_ARG_ENABLE([static-bsdtar], @@ -68,8 +67,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) @@ -133,9 +130,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]) @@ -173,6 +169,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, @@ -180,6 +186,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]) @@ -213,6 +223,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