diff options
Diffstat (limited to 'archivers/libarchive/files/configure.ac')
-rw-r--r-- | archivers/libarchive/files/configure.ac | 83 |
1 files changed, 63 insertions, 20 deletions
diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac index bda5e6eb01d..3a8ac6a853b 100644 --- a/archivers/libarchive/files/configure.ac +++ b/archivers/libarchive/files/configure.ac @@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.2.1]) -m4_define([LIBARCHIVE_VERSION_N],[3002001]) +m4_define([LIBARCHIVE_VERSION_S],[3.3.1]) +m4_define([LIBARCHIVE_VERSION_N],[3003001]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -89,7 +89,7 @@ inc_windows_files=no inc_cygwin_files=no case "$host_os" in *mingw* ) inc_windows_files=yes ;; - *cygwin*) inc_cygwin_files=yes ;; + *cygwin* | *msys*) inc_cygwin_files=yes ;; esac AM_CONDITIONAL([INC_WINDOWS_FILES], [test $inc_windows_files = yes]) AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes]) @@ -243,7 +243,7 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ]) # Set up defines needed before including any headers case $host in - *mingw* | *cygwin* ) + *mingw* | *cygwin* | *msys* ) AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.]) @@ -270,6 +270,19 @@ AS_VAR_IF([ac_cv_have_decl_EXT2_IOC_GETFLAGS], [yes], AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h]) AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h]) + +AC_CACHE_CHECK([whether FS_IOC_GETFLAGS is usable], + [ac_cv_have_decl_FS_IOC_GETFLAGS], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <sys/ioctl.h> +@%:@include <linux/fs.h>], + [int x = FS_IOC_GETFLAGS])], + [AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes])], + [AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [no])])]) + +AS_VAR_IF([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes], + [AC_DEFINE_UNQUOTED([HAVE_WORKING_FS_IOC_GETFLAGS], [1], + [Define to 1 if you have a working FS_IOC_GETFLAGS])]) + AC_CHECK_HEADERS([locale.h paths.h poll.h pthread.h pwd.h]) AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h]) @@ -302,7 +315,7 @@ AC_ARG_WITH([bz2lib], if test "x$with_bz2lib" != "xno"; then AC_CHECK_HEADERS([bzlib.h]) case "$host_os" in - *mingw* | *cygwin*) + *mingw* | *cygwin* | *msys*) dnl AC_CHECK_LIB cannot be used on the Windows port of libbz2, therefore dnl use AC_LINK_IFELSE. AC_MSG_CHECKING([for BZ2_bzDecompressInit in -lbz2]) @@ -326,14 +339,6 @@ if test "x$with_bz2lib" != "xno"; then esac fi -AC_ARG_WITH([lzmadec], - AS_HELP_STRING([--without-lzmadec], [Don't build support for lzma through lzmadec])) - -if test "x$with_lzmadec" != "xno"; then - AC_CHECK_HEADERS([lzmadec.h]) - AC_CHECK_LIB(lzmadec,lzmadec_decode) -fi - AC_ARG_WITH([iconv], AS_HELP_STRING([--without-iconv], [Don't try to link against iconv])) @@ -387,9 +392,9 @@ if test "x$with_lzma" != "xno"; then fi AC_ARG_WITH([lzo2], - AS_HELP_STRING([--without-lzo2], [Don't build support for lzop through liblzo2])) + AS_HELP_STRING([--with-lzo2], [Build with LZO support from liblzo2])) -if test "x$with_lzo2" != "xno"; then +if test "x$with_lzo2" = "xyes"; then AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h]) AC_CHECK_LIB(lzo2,lzo1x_decompress_safe) fi @@ -624,6 +629,13 @@ AC_CHECK_TYPES(struct vfsconf,,, #include <sys/mount.h> ]) +AC_CHECK_TYPES(struct xvfsconf,,, + [#if HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif + #include <sys/mount.h> + ]) + # There are several variants of readdir_r around; we only # accept the POSIX-compliant version. AC_COMPILE_IFELSE( @@ -688,7 +700,8 @@ if test "x$enable_acl" != "xno"; then AC_CHECK_HEADERS([acl/libacl.h]) 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]) + AC_CHECK_FUNCS([acl_create_entry acl_get_fd_np]) + AC_CHECK_FUNCS([acl_init acl_set_fd acl_set_fd_np acl_set_file]) AC_CHECK_TYPES(acl_permset_t,,, [#if HAVE_SYS_TYPES_H @@ -703,7 +716,8 @@ if test "x$enable_acl" != "xno"; then # (It's a pretty obvious oversight; otherwise, there's no way to # test for specific permissions in a permset.) Linux uses the obvious # name, FreeBSD adds _np to mark it as "non-Posix extension." - # Test for both as a double-check that we really have POSIX-style ACL support. + # Test for both as a double-check that we really have POSIX-style ACL + # support. AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np,,, [#if HAVE_SYS_TYPES_H #include <sys/types.h> @@ -713,12 +727,41 @@ if test "x$enable_acl" != "xno"; then #endif ]) + # Check for acl_is_trivial_np on FreeBSD + AC_CHECK_FUNCS(acl_is_trivial_np,,, + [#if HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif + #if HAVE_SYS_ACL_H + #include <sys/acl.h> + #endif + ]) + + # Check for ACL_TYPE_NFS4 + AC_CHECK_DECL([ACL_TYPE_NFS4], + [AC_DEFINE(HAVE_ACL_TYPE_NFS4, 1, [True for FreeBSD with NFSv4 ACL support])], + [], + [#include <sys/acl.h>]) + # MacOS has an acl.h that isn't POSIX. It can be detected by # checking for ACL_USER AC_CHECK_DECL([ACL_USER], [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])], [], [#include <sys/acl.h>]) + + # MacOS has ACL_TYPE_EXTENDED instead + AC_CHECK_DECL([ACL_TYPE_EXTENDED], + [AC_DEFINE(HAVE_ACL_TYPE_EXTENDED, 1, [True for MacOS ACL support])], + [], + [#include <sys/types.h> + #include <sys/acl.h>]) + + # Solaris and derivates ACLs + AC_CHECK_LIB([sec], [acl_get]) + AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]]) + AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]]) + AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set) fi # Additional requirements @@ -786,7 +829,7 @@ main(int argc, char **argv) ]) case "$host_os" in - *mingw* | *cygwin*) + *mingw* | *cygwin* | *msys*) ;; *) CRYPTO_CHECK(MD5, LIBC, md5) @@ -829,7 +872,7 @@ if test "x$with_openssl" != "xno"; then AC_CHECK_HEADERS([openssl/evp.h]) saved_LIBS=$LIBS case "$host_os" in - *mingw* | *cygwin*) + *mingw* | *cygwin* | *msys*) case "$host_cpu" in x86_64) AC_CHECK_LIB(eay64,OPENSSL_config) @@ -875,7 +918,7 @@ if test "x$found_LIBMD" != "xyes"; then fi case "$host_os" in - *mingw* | *cygwin*) + *mingw* | *cygwin* | *msys*) CRYPTO_CHECK_WIN(MD5, CALG_MD5) CRYPTO_CHECK_WIN(SHA1, CALG_SHA1) CRYPTO_CHECK_WIN(SHA256, CALG_SHA_256) |