diff --git a/.github/scripts/brew.sh b/.github/scripts/brew.sh deleted file mode 100755 index 5c22b41..0000000 --- a/.github/scripts/brew.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -eux - -if [ -e "$HOME/.brew" ] ; then - ( - cd "$HOME/.brew" - git fetch --depth 1 - git reset --hard origin/master - ) -else - git clone --depth=1 https://github.com/Homebrew/brew "$HOME/.brew" -fi -export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH" - -mkdir -p $GITHUB_WORKSPACE/.brew_cache -export HOMEBREW_CACHE=$GITHUB_WORKSPACE/.brew_cache -mkdir -p $GITHUB_WORKSPACE/.brew_logs -export HOMEBREW_LOGS=$GITHUB_WORKSPACE/.brew_logs -mkdir -p /private/tmp/.brew_tmp -export HOMEBREW_TEMP=/private/tmp/.brew_tmp - -brew update -brew install ${1+"$@"} - diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 2cdaf85..76515c9 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -72,9 +72,7 @@ jobs: - if: runner.os == 'macOS' name: Install automake via brew run: | - bash .github/scripts/brew.sh automake libtool - echo "$HOME/.brew/bin" >> $GITHUB_PATH - echo "$HOME/.brew/sbin" >> $GITHUB_PATH + brew install autoconf automake libtool gettext - id: get run: | diff --git a/README.md b/README.md index b968fb3..f01ed02 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ This project is separated into two packages: * `libarchive`: the Haskell bindings (this is what you want to depend on) * `libarchive-clib`: bundled C sources to avoid depending on system libarchive -* `zlib-clib`: bundled C sources to avoid depending on system zlib ## Installing from Git @@ -25,8 +24,28 @@ source-repository-package tag: subdir: libarchive libarchive-clib - zlib-clib post-checkout-command: sh -c "cd libarchive-clib && autoreconf -i" ``` +## Features + +The following cabal flags of `libarchive-clib` control unpacking features: + +* zlib: Build support for gzip through zlib (default enabled) +* iconv: Link against iconv (default disabled) +* lz4: Build support for lz4 through liblz4 (default disabled) +* zstd: Build support for zstd through libzstd (default disabled) +* lzma: Build support for xz through lzma (default disabled) +* bz2lib: Build support for bzip2 through bz2lib (default disabled) +* acl: Enable ACL support (default disabled) +* xattr: Extended Attributes support (default disabled) + +At least `zlib` is necessary to unpack zip archives. + +You can force it in `cabal.project` as such: + +``` +package libarchive-clib + flags: +zlib +``` diff --git a/libarchive-clib/build/autoconf/config.rpath b/libarchive-clib/build/autoconf/config.rpath new file mode 100755 index 0000000..51cf442 --- /dev/null +++ b/libarchive-clib/build/autoconf/config.rpath @@ -0,0 +1,696 @@ +#! /bin/sh +# +# NOTE: This file was brought from +# http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/config.rpath +# You should sometimes check if the file is updated and bring it to +# our trunk and copy this note to the top of that file. +# +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2011 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + newsos6) + ;; + *nto* | *qnx*) + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | msys* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + haiku*) + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + bsdi[45]*) + ;; + cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then + : + else + ld_shlibs=no + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + *nto* | *qnx*) + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix[4-9]*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | msys* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + haiku*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + *nto* | *qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + tpf*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT([$LD]) +else + AC_MSG_RESULT([no]) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff --git a/libarchive-clib/build/autoconf/lib-link.m4 b/libarchive-clib/build/autoconf/lib-link.m4 new file mode 100644 index 0000000..e7c9ba9 --- /dev/null +++ b/libarchive-clib/build/autoconf/lib-link.m4 @@ -0,0 +1,777 @@ +# lib-link.m4 serial 26 (gettext-0.18.2) +dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.54]) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[m4_translit([$1],[./+-], [____])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + popdef([NAME]) + popdef([Name]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. The missing-message +dnl defaults to 'no' and may contain additional hints for the user. +dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} +dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[m4_translit([$1],[./+-], [____])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[$3]], [[$4]])], + [ac_cv_lib[]Name=yes], + [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + popdef([NAME]) + popdef([Name]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_libname_spec, +dnl acl_library_names_spec, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/libarchive-clib/build/autoconf/lib-prefix.m4 b/libarchive-clib/build/autoconf/lib-prefix.m4 new file mode 100644 index 0000000..7e5f0bd --- /dev/null +++ b/libarchive-clib/build/autoconf/lib-prefix.m4 @@ -0,0 +1,224 @@ +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) diff --git a/libarchive-clib/build/autoconf/m4_ax_compile_check_sizeof.m4 b/libarchive-clib/build/autoconf/m4_ax_compile_check_sizeof.m4 new file mode 100644 index 0000000..f834df6 --- /dev/null +++ b/libarchive-clib/build/autoconf/m4_ax_compile_check_sizeof.m4 @@ -0,0 +1,115 @@ +# ============================================================================ +# https://www.gnu.org/software/autoconf-archive/ax_compile_check_sizeof.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]]) +# +# DESCRIPTION +# +# This macro checks for the size of TYPE using compile checks, not run +# checks. You can supply extra HEADERS to look into. the check will cycle +# through 1 2 4 8 16 and any EXTRA_SIZES the user supplies. If a match is +# found, it will #define SIZEOF_`TYPE' to that value. Otherwise it will +# emit a configure time error indicating the size of the type could not be +# determined. +# +# The trick is that C will not allow duplicate case labels. While this is +# valid C code: +# +# switch (0) case 0: case 1:; +# +# The following is not: +# +# switch (0) case 0: case 0:; +# +# Thus, the AC_COMPILE_IFELSE will fail if the currently tried size does +# not match. +# +# Here is an example skeleton configure.in script, demonstrating the +# macro's usage: +# +# AC_PROG_CC +# AC_CHECK_HEADERS(stddef.h unistd.h) +# AC_TYPE_SIZE_T +# AC_CHECK_TYPE(ssize_t, int) +# +# headers='#ifdef HAVE_STDDEF_H +# #include +# #endif +# #ifdef HAVE_UNISTD_H +# #include +# #endif +# ' +# +# AX_COMPILE_CHECK_SIZEOF(char) +# AX_COMPILE_CHECK_SIZEOF(short) +# AX_COMPILE_CHECK_SIZEOF(int) +# AX_COMPILE_CHECK_SIZEOF(long) +# AX_COMPILE_CHECK_SIZEOF(unsigned char *) +# AX_COMPILE_CHECK_SIZEOF(void *) +# AX_COMPILE_CHECK_SIZEOF(size_t, $headers) +# AX_COMPILE_CHECK_SIZEOF(ssize_t, $headers) +# AX_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers) +# AX_COMPILE_CHECK_SIZEOF(off_t, $headers) +# +# LICENSE +# +# Copyright (c) 2008 Kaveh Ghazi +# Copyright (c) 2017 Reini Urban +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 8 + +AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF]) +AC_DEFUN([AX_COMPILE_CHECK_SIZEOF], +[changequote(<<, >>)dnl +dnl The name to #define. +define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of $1) +AC_CACHE_VAL(AC_CV_NAME, +[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +$2 +]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size]) + if test x$AC_CV_NAME != x ; then break; fi +done +]) +if test x$AC_CV_NAME = x ; then + AC_MSG_ERROR([cannot determine a size for $1]) +fi +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) diff --git a/libarchive-clib/c/config.h.in b/libarchive-clib/c/config.h.in index 1f5fd8a..77cf778 100644 --- a/libarchive-clib/c/config.h.in +++ b/libarchive-clib/c/config.h.in @@ -1,5 +1,38 @@ /* c/config.h.in. Generated from configure.ac by autoheader. */ +/* Darwin ACL support */ +#undef ARCHIVE_ACL_DARWIN + +/* FreeBSD ACL support */ +#undef ARCHIVE_ACL_FREEBSD + +/* FreeBSD NFSv4 ACL support */ +#undef ARCHIVE_ACL_FREEBSD_NFS4 + +/* Linux POSIX.1e ACL support via libacl */ +#undef ARCHIVE_ACL_LIBACL + +/* Linux NFSv4 ACL support via librichacl */ +#undef ARCHIVE_ACL_LIBRICHACL + +/* Solaris ACL support */ +#undef ARCHIVE_ACL_SUNOS + +/* Solaris NFSv4 ACL support */ +#undef ARCHIVE_ACL_SUNOS_NFS4 + +/* AIX xattr support */ +#undef ARCHIVE_XATTR_AIX + +/* Darwin xattr support */ +#undef ARCHIVE_XATTR_DARWIN + +/* FreeBSD xattr support */ +#undef ARCHIVE_XATTR_FREEBSD + +/* Linux xattr support */ +#undef ARCHIVE_XATTR_LINUX + /* Version number of bsdcat */ #undef BSDCAT_VERSION_STRING @@ -9,64 +42,231 @@ /* Version number of bsdtar */ #undef BSDTAR_VERSION_STRING +/* Version number of bsdunzip */ +#undef BSDUNZIP_VERSION_STRING + +/* Define to 1 if the system has the type 'ace_t'. */ +#undef HAVE_ACE_T + +/* Define to 1 if you have the 'acl' function. */ +#undef HAVE_ACL + +/* Define to 1 if the system has the type 'aclent_t'. */ +#undef HAVE_ACLENT_T + +/* Define to 1 if you have the 'acl_add_flag_np' function. */ +#undef HAVE_ACL_ADD_FLAG_NP + +/* Define to 1 if you have the 'acl_add_perm' function. */ +#undef HAVE_ACL_ADD_PERM + +/* Define to 1 if you have the 'acl_clear_flags_np' function. */ +#undef HAVE_ACL_CLEAR_FLAGS_NP + +/* Define to 1 if you have the 'acl_clear_perms' function. */ +#undef HAVE_ACL_CLEAR_PERMS + +/* Define to 1 if you have the 'acl_create_entry' function. */ +#undef HAVE_ACL_CREATE_ENTRY + +/* Define to 1 if you have the 'acl_delete_def_file' function. */ +#undef HAVE_ACL_DELETE_DEF_FILE + +/* Define to 1 if the system has the type 'acl_entry_t'. */ +#undef HAVE_ACL_ENTRY_T + +/* Define to 1 if you have the 'acl_free' function. */ +#undef HAVE_ACL_FREE + +/* Define to 1 if you have the 'acl_get_brand_np' function. */ +#undef HAVE_ACL_GET_BRAND_NP + +/* Define to 1 if you have the 'acl_get_entry' function. */ +#undef HAVE_ACL_GET_ENTRY + +/* Define to 1 if you have the 'acl_get_entry_type_np' function. */ +#undef HAVE_ACL_GET_ENTRY_TYPE_NP + +/* Define to 1 if you have the 'acl_get_fd' function. */ +#undef HAVE_ACL_GET_FD + +/* Define to 1 if you have the 'acl_get_fd_np' function. */ +#undef HAVE_ACL_GET_FD_NP + +/* Define to 1 if you have the 'acl_get_file' function. */ +#undef HAVE_ACL_GET_FILE + +/* Define to 1 if you have the 'acl_get_flagset_np' function. */ +#undef HAVE_ACL_GET_FLAGSET_NP + +/* Define to 1 if you have the 'acl_get_flag_np' function. */ +#undef HAVE_ACL_GET_FLAG_NP + +/* Define to 1 if you have the 'acl_get_link_np' function. */ +#undef HAVE_ACL_GET_LINK_NP + +/* Define to 1 if you have the 'acl_get_perm' function. */ +#undef HAVE_ACL_GET_PERM + +/* Define to 1 if you have the 'acl_get_permset' function. */ +#undef HAVE_ACL_GET_PERMSET + +/* Define to 1 if you have the 'acl_get_perm_np' function. */ +#undef HAVE_ACL_GET_PERM_NP + +/* Define to 1 if you have the 'acl_get_qualifier' function. */ +#undef HAVE_ACL_GET_QUALIFIER + +/* Define to 1 if you have the 'acl_get_tag_type' function. */ +#undef HAVE_ACL_GET_TAG_TYPE + +/* Define to 1 if you have the 'acl_init' function. */ +#undef HAVE_ACL_INIT + +/* Define to 1 if you have the 'acl_is_trivial_np' function. */ +#undef HAVE_ACL_IS_TRIVIAL_NP + /* Define to 1 if you have the header file. */ #undef HAVE_ACL_LIBACL_H -/* Define to 1 if you have the `arc4random_buf' function. */ +/* Define to 1 if the system has the type 'acl_permset_t'. */ +#undef HAVE_ACL_PERMSET_T + +/* Define to 1 if you have the 'acl_set_entry_type_np' function. */ +#undef HAVE_ACL_SET_ENTRY_TYPE_NP + +/* Define to 1 if you have the 'acl_set_fd' function. */ +#undef HAVE_ACL_SET_FD + +/* Define to 1 if you have the 'acl_set_fd_np' function. */ +#undef HAVE_ACL_SET_FD_NP + +/* Define to 1 if you have the 'acl_set_file' function. */ +#undef HAVE_ACL_SET_FILE + +/* Define to 1 if you have the 'acl_set_link_np' function. */ +#undef HAVE_ACL_SET_LINK_NP + +/* Define to 1 if you have the 'acl_set_qualifier' function. */ +#undef HAVE_ACL_SET_QUALIFIER + +/* Define to 1 if you have the 'acl_set_tag_type' function. */ +#undef HAVE_ACL_SET_TAG_TYPE + +/* Define to 1 if the system has the type 'acl_t'. */ +#undef HAVE_ACL_T + +/* Define to 1 if the system has the type 'acl_tag_t'. */ +#undef HAVE_ACL_TAG_T + +/* Define to 1 if you have the 'arc4random_buf' function. */ #undef HAVE_ARC4RANDOM_BUF /* Define to 1 if you have the header file. */ #undef HAVE_ATTR_XATTR_H -/* Define to 1 if you have the `chflags' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_BZLIB_H + +/* Define to 1 if you have the 'chflags' function. */ #undef HAVE_CHFLAGS -/* Define to 1 if you have the `chown' function. */ +/* Define to 1 if you have the 'chown' function. */ #undef HAVE_CHOWN -/* Define to 1 if you have the `chroot' function. */ +/* Define to 1 if you have the 'chroot' function. */ #undef HAVE_CHROOT +/* Define to 1 if you have the 'closefrom' function. */ +#undef HAVE_CLOSEFROM + +/* Define to 1 if you have the 'close_range' function. */ +#undef HAVE_CLOSE_RANGE + /* cmtime_s function */ #undef HAVE_CMTIME_S /* Define to 1 if you have the header file. */ #undef HAVE_COPYFILE_H -/* Define to 1 if you have the `ctime_r' function. */ +/* Define to 1 if you have the 'ctime_r' function. */ #undef HAVE_CTIME_R /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H -/* Define to 1 if you have the `cygwin_conv_path' function. */ +/* Define to 1 if you have the 'cygwin_conv_path' function. */ #undef HAVE_CYGWIN_CONV_PATH -/* Define to 1 if you have the declaration of `INT32_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'ACE_GETACL', and to 0 if you + don't. */ +#undef HAVE_DECL_ACE_GETACL + +/* Define to 1 if you have the declaration of 'ACE_GETACLCNT', and to 0 if you + don't. */ +#undef HAVE_DECL_ACE_GETACLCNT + +/* Define to 1 if you have the declaration of 'ACE_SETACL', and to 0 if you + don't. */ +#undef HAVE_DECL_ACE_SETACL + +/* Define to 1 if you have the declaration of 'ACL_SYNCHRONIZE', and to 0 if + you don't. */ +#undef HAVE_DECL_ACL_SYNCHRONIZE + +/* Define to 1 if you have the declaration of 'ACL_TYPE_EXTENDED', and to 0 if + you don't. */ +#undef HAVE_DECL_ACL_TYPE_EXTENDED + +/* Define to 1 if you have the declaration of 'ACL_TYPE_NFS4', and to 0 if you + don't. */ +#undef HAVE_DECL_ACL_TYPE_NFS4 + +/* Define to 1 if you have the declaration of 'ACL_USER', and to 0 if you + don't. */ +#undef HAVE_DECL_ACL_USER + +/* Define to 1 if you have the declaration of 'EXTATTR_NAMESPACE_USER', and to + 0 if you don't. */ +#undef HAVE_DECL_EXTATTR_NAMESPACE_USER + +/* Define to 1 if you have the declaration of 'GETACL', and to 0 if you don't. + */ +#undef HAVE_DECL_GETACL + +/* Define to 1 if you have the declaration of 'GETACLCNT', and to 0 if you + don't. */ +#undef HAVE_DECL_GETACLCNT + +/* Define to 1 if you have the declaration of 'INT32_MAX', and to 0 if you don't. */ #undef HAVE_DECL_INT32_MAX -/* Define to 1 if you have the declaration of `INT32_MIN', and to 0 if you +/* Define to 1 if you have the declaration of 'INT32_MIN', and to 0 if you don't. */ #undef HAVE_DECL_INT32_MIN -/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'INT64_MAX', and to 0 if you don't. */ #undef HAVE_DECL_INT64_MAX -/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you +/* Define to 1 if you have the declaration of 'INT64_MIN', and to 0 if you don't. */ #undef HAVE_DECL_INT64_MIN -/* Define to 1 if you have the declaration of `INTMAX_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'INTMAX_MAX', and to 0 if you don't. */ #undef HAVE_DECL_INTMAX_MAX -/* Define to 1 if you have the declaration of `INTMAX_MIN', and to 0 if you +/* Define to 1 if you have the declaration of 'INTMAX_MIN', and to 0 if you don't. */ #undef HAVE_DECL_INTMAX_MIN -/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'SETACL', and to 0 if you don't. + */ +#undef HAVE_DECL_SETACL + +/* Define to 1 if you have the declaration of 'SIZE_MAX', and to 0 if you don't. */ #undef HAVE_DECL_SIZE_MAX @@ -74,23 +274,27 @@ don't. */ #undef HAVE_DECL_SSIZE_MAX -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you +/* Define to 1 if you have the declaration of 'strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R -/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'UINT32_MAX', and to 0 if you don't. */ #undef HAVE_DECL_UINT32_MAX -/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'UINT64_MAX', and to 0 if you don't. */ #undef HAVE_DECL_UINT64_MAX -/* Define to 1 if you have the declaration of `UINTMAX_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'UINTMAX_MAX', and to 0 if you don't. */ #undef HAVE_DECL_UINTMAX_MAX -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the declaration of 'XATTR_NOFOLLOW', and to 0 if + you don't. */ +#undef HAVE_DECL_XATTR_NOFOLLOW + +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_DIRENT_H @@ -100,7 +304,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if nl_langinfo supports D_MD_ORDER */ @@ -118,88 +322,148 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EXT2FS_EXT2_FS_H -/* Define to 1 if you have the `fchdir' function. */ +/* Define to 1 if you have the 'extattr_get_fd' function. */ +#undef HAVE_EXTATTR_GET_FD + +/* Define to 1 if you have the 'extattr_get_file' function. */ +#undef HAVE_EXTATTR_GET_FILE + +/* Define to 1 if you have the 'extattr_get_link' function. */ +#undef HAVE_EXTATTR_GET_LINK + +/* Define to 1 if you have the 'extattr_list_fd' function. */ +#undef HAVE_EXTATTR_LIST_FD + +/* Define to 1 if you have the 'extattr_list_file' function. */ +#undef HAVE_EXTATTR_LIST_FILE + +/* Define to 1 if you have the 'extattr_list_link' function. */ +#undef HAVE_EXTATTR_LIST_LINK + +/* Define to 1 if you have the 'extattr_set_fd' function. */ +#undef HAVE_EXTATTR_SET_FD + +/* Define to 1 if you have the 'extattr_set_link' function. */ +#undef HAVE_EXTATTR_SET_LINK + +/* Define to 1 if you have the 'facl' function. */ +#undef HAVE_FACL + +/* Define to 1 if you have the 'fchdir' function. */ #undef HAVE_FCHDIR -/* Define to 1 if you have the `fchflags' function. */ +/* Define to 1 if you have the 'fchflags' function. */ #undef HAVE_FCHFLAGS -/* Define to 1 if you have the `fchmod' function. */ +/* Define to 1 if you have the 'fchmod' function. */ #undef HAVE_FCHMOD -/* Define to 1 if you have the `fchown' function. */ +/* Define to 1 if you have the 'fchown' function. */ #undef HAVE_FCHOWN -/* Define to 1 if you have the `fcntl' function. */ +/* Define to 1 if you have the 'fcntl' function. */ #undef HAVE_FCNTL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fdopendir' function. */ +/* Define to 1 if you have the 'fdopendir' function. */ #undef HAVE_FDOPENDIR -/* Define to 1 if you have the `fnmatch' function. */ +/* Define to 1 if you have the 'fgetea' function. */ +#undef HAVE_FGETEA + +/* Define to 1 if you have the 'fgetxattr' function. */ +#undef HAVE_FGETXATTR + +/* Define to 1 if you have the 'flistea' function. */ +#undef HAVE_FLISTEA + +/* Define to 1 if you have the 'flistxattr' function. */ +#undef HAVE_FLISTXATTR + +/* Define to 1 if you have the 'fnmatch' function. */ #undef HAVE_FNMATCH /* Define to 1 if you have the header file. */ #undef HAVE_FNMATCH_H -/* Define to 1 if you have the `fork' function. */ +/* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +/* Define to 1 if fseeko (and ftello) are declared in stdio.h. */ #undef HAVE_FSEEKO -/* Define to 1 if you have the `fstat' function. */ +/* Define to 1 if you have the 'fsetea' function. */ +#undef HAVE_FSETEA + +/* Define to 1 if you have the 'fsetxattr' function. */ +#undef HAVE_FSETXATTR + +/* Define to 1 if you have the 'fstat' function. */ #undef HAVE_FSTAT -/* Define to 1 if you have the `fstatat' function. */ +/* Define to 1 if you have the 'fstatat' function. */ #undef HAVE_FSTATAT -/* Define to 1 if you have the `fstatfs' function. */ +/* Define to 1 if you have the 'fstatfs' function. */ #undef HAVE_FSTATFS -/* Define to 1 if you have the `fstatvfs' function. */ +/* Define to 1 if you have the 'fstatvfs' function. */ #undef HAVE_FSTATVFS -/* Define to 1 if you have the `ftruncate' function. */ +/* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE -/* Define to 1 if you have the `futimens' function. */ +/* Define to 1 if you have the 'futimens' function. */ #undef HAVE_FUTIMENS -/* Define to 1 if you have the `futimes' function. */ +/* Define to 1 if you have the 'futimes' function. */ #undef HAVE_FUTIMES -/* Define to 1 if you have the `futimesat' function. */ +/* Define to 1 if you have the 'futimesat' function. */ #undef HAVE_FUTIMESAT -/* Define to 1 if you have the `geteuid' function. */ +/* Define to 1 if you have the 'getea' function. */ +#undef HAVE_GETEA + +/* Define to 1 if you have the 'getegid' function. */ +#undef HAVE_GETEGID + +/* Define to 1 if you have the 'geteuid' function. */ #undef HAVE_GETEUID -/* Define to 1 if you have the `getgrgid_r' function. */ +/* Define to 1 if you have the 'getgrgid_r' function. */ #undef HAVE_GETGRGID_R -/* Define to 1 if you have the `getgrnam_r' function. */ +/* Define to 1 if you have the 'getgrnam_r' function. */ #undef HAVE_GETGRNAM_R -/* Define to 1 if you have the `getline' function. */ +/* Define to 1 if you have the 'getline' function. */ #undef HAVE_GETLINE -/* Define to 1 if you have the `getpid' function. */ +/* Define to 1 if you have the 'getpid' function. */ #undef HAVE_GETPID -/* Define to 1 if you have the `getpwnam_r' function. */ +/* Define to 1 if you have the 'getpwnam_r' function. */ #undef HAVE_GETPWNAM_R -/* Define to 1 if you have the `getpwuid_r' function. */ +/* Define to 1 if you have the 'getpwuid_r' function. */ #undef HAVE_GETPWUID_R -/* Define to 1 if you have the `getvfsbyname' function. */ +/* Define to 1 if you have the 'getresgid' function. */ +#undef HAVE_GETRESGID + +/* Define to 1 if you have the 'getresuid' function. */ +#undef HAVE_GETRESUID + +/* Define to 1 if you have the 'getvfsbyname' function. */ #undef HAVE_GETVFSBYNAME -/* Define to 1 if you have the `gmtime_r' function. */ +/* Define to 1 if you have the 'getxattr' function. */ +#undef HAVE_GETXATTR + +/* Define to 1 if you have the 'gmtime_r' function. */ #undef HAVE_GMTIME_R /* gmtime_s function */ @@ -208,7 +472,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_GRP_H -/* Define to 1 if the system has the type `intmax_t'. */ +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#undef HAVE_ICONV_H + +/* Define to 1 if the system has the type 'intmax_t'. */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ @@ -217,25 +487,61 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IO_H +/* Define to 1 if you have the 'issetugid' function. */ +#undef HAVE_ISSETUGID + /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H -/* Define to 1 if you have the `lchflags' function. */ +/* Define to 1 if you have the 'lchflags' function. */ #undef HAVE_LCHFLAGS -/* Define to 1 if you have the `lchmod' function. */ +/* Define to 1 if you have the 'lchmod' function. */ #undef HAVE_LCHMOD -/* Define to 1 if you have the `lchown' function. */ +/* Define to 1 if you have the 'lchown' function. */ #undef HAVE_LCHOWN +/* Define to 1 if you have the 'lgetea' function. */ +#undef HAVE_LGETEA + +/* Define to 1 if you have the 'lgetxattr' function. */ +#undef HAVE_LGETXATTR + +/* Define to 1 if you have the 'acl' library (-lacl). */ +#undef HAVE_LIBACL + +/* Define to 1 if you have the 'bz2' library (-lbz2). */ +#undef HAVE_LIBBZ2 + +/* Define to 1 if you have the 'charset' library (-lcharset). */ +#undef HAVE_LIBCHARSET + +/* Define to 1 if you have the `iconv' library (-liconv). */ +#undef HAVE_LIBICONV + +/* Define to 1 if you have the 'lz4' library (-llz4). */ +#undef HAVE_LIBLZ4 + +/* Define to 1 if you have the `lzma' library. */ +#undef HAVE_LIBLZMA + +/* Define to 1 if you have the 'richacl' library (-lrichacl). */ +#undef HAVE_LIBRICHACL + +/* Define to 1 if you have zlib >= 1.2.1 */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the 'zstd' library (-lzstd). */ +#undef HAVE_LIBZSTD + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H -/* Define to 1 if you have the `link' function. */ +/* Define to 1 if you have the 'link' function. */ #undef HAVE_LINK -/* Define to 1 if you have the `linkat' function. */ +/* Define to 1 if you have the 'linkat' function. */ #undef HAVE_LINKAT /* Define to 1 if you have the header file. */ @@ -250,77 +556,125 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_TYPES_H +/* Define to 1 if you have the 'listea' function. */ +#undef HAVE_LISTEA + +/* Define to 1 if you have the 'listxattr' function. */ +#undef HAVE_LISTXATTR + +/* Define to 1 if you have the 'llistea' function. */ +#undef HAVE_LLISTEA + +/* Define to 1 if you have the 'llistxattr' function. */ +#undef HAVE_LLISTXATTR + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALCHARSET_H + +/* Define to 1 if you have the 'locale_charset' function. */ +#undef HAVE_LOCALE_CHARSET + /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #undef HAVE_LOCALTIME_R /* localtime_s function */ #undef HAVE_LOCALTIME_S -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT -/* Define to 1 if you have the `lstat' function. */ +/* Define to 1 if you have the 'lsetea' function. */ +#undef HAVE_LSETEA + +/* Define to 1 if you have the 'lsetxattr' function. */ +#undef HAVE_LSETXATTR + +/* Define to 1 if you have the 'lstat' function. */ #undef HAVE_LSTAT -/* Define to 1 if `lstat' has the bug that it succeeds when given the +/* Define to 1 if 'lstat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_LSTAT_EMPTY_STRING_BUG -/* Define to 1 if you have the `lutimes' function. */ +/* Define to 1 if you have the 'lutimes' function. */ #undef HAVE_LUTIMES -/* Define to 1 if you have the `mbrtowc' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_LZ4HC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LZ4_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LZMA_H + +/* Define to 1 if you have the `lzma_stream_encoder_mt' function. */ +#undef HAVE_LZMA_STREAM_ENCODER_MT + +/* Define to 1 if you have the 'mbrtowc' function. */ #undef HAVE_MBRTOWC +/* Define to 1 if you have the 'mbr_gid_to_uuid' function. */ +#undef HAVE_MBR_GID_TO_UUID + +/* Define to 1 if you have the 'mbr_uid_to_uuid' function. */ +#undef HAVE_MBR_UID_TO_UUID + +/* Define to 1 if you have the 'mbr_uuid_to_id' function. */ +#undef HAVE_MBR_UUID_TO_ID + /* Define to 1 if you have the header file. */ #undef HAVE_MEMBERSHIP_H -/* Define to 1 if you have the `memmove' function. */ +/* Define to 1 if you have the 'memmove' function. */ #undef HAVE_MEMMOVE -/* Define to 1 if you have the `memset' function. */ +/* Define to 1 if you have the 'memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H -/* Define to 1 if you have the `mkdir' function. */ +/* Define to 1 if you have the 'mkdir' function. */ #undef HAVE_MKDIR -/* Define to 1 if you have the `mkfifo' function. */ +/* Define to 1 if you have the 'mkfifo' function. */ #undef HAVE_MKFIFO -/* Define to 1 if you have the `mknod' function. */ +/* Define to 1 if you have the 'mknod' function. */ #undef HAVE_MKNOD -/* Define to 1 if you have the `mkstemp' function. */ +/* Define to 1 if you have the 'mkstemp' function. */ #undef HAVE_MKSTEMP -/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #undef HAVE_NL_LANGINFO -/* Define to 1 if you have the `openat' function. */ +/* Define to 1 if you have the 'openat' function. */ #undef HAVE_OPENAT /* Define to 1 if you have the header file. */ #undef HAVE_PATHS_H -/* Define to 1 if you have the `pipe' function. */ +/* Define to 1 if you have the 'pipe' function. */ #undef HAVE_PIPE -/* Define to 1 if you have the `poll' function. */ +/* Define to 1 if you have the 'poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H -/* Define to 1 if you have the `posix_spawnp' function. */ +/* Define to 1 if you have the 'posix_spawn' function. */ +#undef HAVE_POSIX_SPAWN + +/* Define to 1 if you have the 'posix_spawnp' function. */ #undef HAVE_POSIX_SPAWNP /* Define to 1 if you have the header file. */ @@ -329,31 +683,52 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H -/* Define to 1 if you have a POSIX compatible readdir_r */ -#undef HAVE_READDIR_R - -/* Define to 1 if you have the `readlink' function. */ +/* Define to 1 if you have the 'readlink' function. */ #undef HAVE_READLINK -/* Define to 1 if you have the `readlinkat' function. */ +/* Define to 1 if you have the 'readlinkat' function. */ #undef HAVE_READLINKAT -/* Define to 1 if you have the `readpassphrase' function. */ +/* Define to 1 if you have the 'readpassphrase' function. */ #undef HAVE_READPASSPHRASE /* Define to 1 if you have the header file. */ #undef HAVE_READPASSPHRASE_H -/* Define to 1 if you have the `select' function. */ +/* Define to 1 if you have the 'richacl_alloc' function. */ +#undef HAVE_RICHACL_ALLOC + +/* Define to 1 if you have the 'richacl_equiv_mode' function. */ +#undef HAVE_RICHACL_EQUIV_MODE + +/* Define to 1 if you have the 'richacl_free' function. */ +#undef HAVE_RICHACL_FREE + +/* Define to 1 if you have the 'richacl_get_fd' function. */ +#undef HAVE_RICHACL_GET_FD + +/* Define to 1 if you have the 'richacl_get_file' function. */ +#undef HAVE_RICHACL_GET_FILE + +/* Define to 1 if you have the 'richacl_set_fd' function. */ +#undef HAVE_RICHACL_SET_FD + +/* Define to 1 if you have the 'richacl_set_file' function. */ +#undef HAVE_RICHACL_SET_FILE + +/* Define to 1 if you have the 'select' function. */ #undef HAVE_SELECT -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV -/* Define to 1 if you have the `setlocale' function. */ +/* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the `sigaction' function. */ +/* Define to 1 if you have the 'setxattr' function. */ +#undef HAVE_SETXATTR + +/* Define to 1 if you have the 'sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the header file. */ @@ -362,13 +737,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SPAWN_H -/* Define to 1 if you have the `statfs' function. */ +/* Define to 1 if you have the 'statfs' function. */ #undef HAVE_STATFS -/* Define to 1 if you have the `statvfs' function. */ +/* Define to 1 if you have the 'statvfs' function. */ #undef HAVE_STATVFS -/* Define to 1 if `stat' has the bug that it succeeds when given the +/* Define to 1 if 'stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG @@ -384,19 +759,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strchr' function. */ +/* Define to 1 if you have the 'strchr' function. */ #undef HAVE_STRCHR -/* Define to 1 if you have the `strdup' function. */ +/* Define to 1 if you have the 'strdup' function. */ #undef HAVE_STRDUP -/* Define to 1 if you have the `strerror' function. */ +/* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR -/* Define if you have `strerror_r'. */ +/* Define if you have 'strerror_r'. */ #undef HAVE_STRERROR_R -/* Define to 1 if you have the `strftime' function. */ +/* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ @@ -405,76 +780,85 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strncpy_s' function. */ +/* Define to 1 if you have the 'strncpy_s' function. */ #undef HAVE_STRNCPY_S -/* Define to 1 if you have the `strnlen' function. */ +/* Define to 1 if you have the 'strnlen' function. */ #undef HAVE_STRNLEN -/* Define to 1 if you have the `strrchr' function. */ +/* Define to 1 if you have the 'strrchr' function. */ #undef HAVE_STRRCHR -/* Define to 1 if the system has the type `struct statfs'. */ +/* Define to 1 if the system has the type 'struct richace'. */ +#undef HAVE_STRUCT_RICHACE + +/* Define to 1 if the system has the type 'struct richacl'. */ +#undef HAVE_STRUCT_RICHACL + +/* Define to 1 if the system has the type 'struct statfs'. */ #undef HAVE_STRUCT_STATFS -/* Define to 1 if `f_iosize' is a member of `struct statfs'. */ +/* Define to 1 if 'f_iosize' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_IOSIZE -/* Define to 1 if `f_namemax' is a member of `struct statfs'. */ +/* Define to 1 if 'f_namemax' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_NAMEMAX -/* Define to 1 if `f_iosize' is a member of `struct statvfs'. */ +/* Define to 1 if 'f_iosize' is a member of 'struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_IOSIZE -/* Define to 1 if `st_birthtime' is a member of `struct stat'. */ +/* Define to 1 if 'st_birthtime' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIME -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ +/* Define to 1 if 'st_birthtimespec.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC -/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +/* Define to 1 if 'st_blksize' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_flags' is a member of `struct stat'. */ +/* Define to 1 if 'st_flags' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_FLAGS -/* Define to 1 if `st_mtimespec.tv_nsec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtimespec.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -/* Define to 1 if `st_mtime_n' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtime_n' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIME_N -/* Define to 1 if `st_mtime_usec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtime_usec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIME_USEC -/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtim.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -/* Define to 1 if `st_umtime' is a member of `struct stat'. */ +/* Define to 1 if 'st_umtime' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_UMTIME -/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ +/* Define to 1 if 'tm_gmtoff' is a member of 'struct tm'. */ #undef HAVE_STRUCT_TM_TM_GMTOFF -/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */ +/* Define to 1 if '__tm_gmtoff' is a member of 'struct tm'. */ #undef HAVE_STRUCT_TM___TM_GMTOFF -/* Define to 1 if the system has the type `struct vfsconf'. */ +/* Define to 1 if the system has the type 'struct vfsconf'. */ #undef HAVE_STRUCT_VFSCONF -/* Define to 1 if the system has the type `struct xvfsconf'. */ +/* Define to 1 if the system has the type 'struct xvfsconf'. */ #undef HAVE_STRUCT_XVFSCONF -/* Define to 1 if you have the `symlink' function. */ +/* Define to 1 if you have the 'symlink' function. */ #undef HAVE_SYMLINK +/* Define to 1 if you have the 'sysconf' function. */ +#undef HAVE_SYSCONF + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ACL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CDEFS_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H @@ -493,7 +877,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MOUNT_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H @@ -503,9 +887,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_QUEUE_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RICHACL_H @@ -545,49 +926,55 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_XATTR_H -/* Define to 1 if you have the `timegm' function. */ +/* Define to 1 if you have the 'tcgetattr' function. */ +#undef HAVE_TCGETATTR + +/* Define to 1 if you have the 'tcsetattr' function. */ +#undef HAVE_TCSETATTR + +/* Define to 1 if you have the 'timegm' function. */ #undef HAVE_TIMEGM /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H -/* Define to 1 if you have the `tzset' function. */ +/* Define to 1 if you have the 'tzset' function. */ #undef HAVE_TZSET -/* Define to 1 if the system has the type `uintmax_t'. */ +/* Define to 1 if the system has the type 'uintmax_t'. */ #undef HAVE_UINTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `unlinkat' function. */ +/* Define to 1 if you have the 'unlinkat' function. */ #undef HAVE_UNLINKAT -/* Define to 1 if you have the `unsetenv' function. */ +/* Define to 1 if you have the 'unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if the system has the type `unsigned long long'. */ +/* Define to 1 if the system has the type 'unsigned long long'. */ #undef HAVE_UNSIGNED_LONG_LONG -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT -/* Define to 1 if you have the `utime' function. */ +/* Define to 1 if you have the 'utime' function. */ #undef HAVE_UTIME -/* Define to 1 if you have the `utimensat' function. */ +/* Define to 1 if you have the 'utimensat' function. */ #undef HAVE_UTIMENSAT -/* Define to 1 if you have the `utimes' function. */ +/* Define to 1 if you have the 'utimes' function. */ #undef HAVE_UTIMES /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H -/* Define to 1 if you have the `vfork' function. */ +/* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK -/* Define to 1 if you have the `vprintf' function. */ +/* Define to 1 if you have the 'vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ @@ -596,19 +983,19 @@ /* Define to 1 if the system has the type `wchar_t'. */ #undef HAVE_WCHAR_T -/* Define to 1 if you have the `wcrtomb' function. */ +/* Define to 1 if you have the 'wcrtomb' function. */ #undef HAVE_WCRTOMB -/* Define to 1 if you have the `wcscmp' function. */ +/* Define to 1 if you have the 'wcscmp' function. */ #undef HAVE_WCSCMP -/* Define to 1 if you have the `wcscpy' function. */ +/* Define to 1 if you have the 'wcscpy' function. */ #undef HAVE_WCSCPY -/* Define to 1 if you have the `wcslen' function. */ +/* Define to 1 if you have the 'wcslen' function. */ #undef HAVE_WCSLEN -/* Define to 1 if you have the `wctomb' function. */ +/* Define to 1 if you have the 'wctomb' function. */ #undef HAVE_WCTOMB /* Define to 1 if you have the header file. */ @@ -623,13 +1010,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WINIOCTL_H -/* Define to 1 if you have the `wmemcmp' function. */ +/* Define to 1 if you have the 'wmemcmp' function. */ #undef HAVE_WMEMCMP -/* Define to 1 if you have the `wmemcpy' function. */ +/* Define to 1 if you have the 'wmemcpy' function. */ #undef HAVE_WMEMCPY -/* Define to 1 if you have the `wmemmove' function. */ +/* Define to 1 if you have the 'wmemmove' function. */ #undef HAVE_WMEMMOVE /* Define to 1 if you have a working EXT2_IOC_GETFLAGS */ @@ -638,33 +1025,58 @@ /* Define to 1 if you have a working FS_IOC_GETFLAGS */ #undef HAVE_WORKING_FS_IOC_GETFLAGS -/* Define to 1 if you have the `_fseeki64' function. */ +/* Define to 1 if you have zlib >= 1.2.1 */ +#undef HAVE_ZLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ZSTD_H + +/* Define to 1 if you have the `zstd' library (-lzstd) with compression + support. */ +#undef HAVE_ZSTD_compressStream + +/* Define to 1 if you have a `zstd' library version with ZSTD_minCLevel(). */ +#undef HAVE_ZSTD_minCLevel + +/* Define to 1 if you have the '_fseeki64' function. */ #undef HAVE__FSEEKI64 -/* Define to 1 if you have the `_get_timezone' function. */ +/* Define to 1 if you have the '_get_timezone' function. */ #undef HAVE__GET_TIMEZONE /* _mkgmtime function */ #undef HAVE__MKGMTIME +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST + +/* Libacl version coming from pkg-config. */ +#undef LIBACL_PKGCONFIG_VERSION + /* Version number of libarchive as a single integer */ #undef LIBARCHIVE_VERSION_NUMBER /* Version number of libarchive */ #undef LIBARCHIVE_VERSION_STRING -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Libattr version coming from pkg-config. */ +#undef LIBATTR_PKGCONFIG_VERSION + +/* Librichacl version coming from pkg-config. */ +#undef LIBRICHACL_PKGCONFIG_VERSION + +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR -/* Define to 1 if `major', `minor', and `makedev' are declared in . +/* Define to 1 if 'major', 'minor', and 'makedev' are declared in . */ #undef MAJOR_IN_MKDEV -/* Define to 1 if `major', `minor', and `makedev' are declared in +/* Define to 1 if 'major', 'minor', and 'makedev' are declared in . */ #undef MAJOR_IN_SYSMACROS @@ -689,10 +1101,16 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of `wchar_t', as computed by sizeof. */ +/* The number of bytes in type int */ +#undef SIZEOF_INT + +/* The number of bytes in type long */ +#undef SIZEOF_LONG + +/* The size of 'wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS @@ -700,7 +1118,7 @@ /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P -/* Enable extensions on AIX 3, Interix. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif @@ -761,11 +1179,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# undef __STDC_WANT_IEC_60559_EXT__ +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif @@ -794,12 +1216,15 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* Define to 1 if necessary to make fseeko visible. */ #undef _LARGEFILE_SOURCE -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES +/* Number of bits in time_t, on hosts where this is settable. */ +#undef _TIME_BITS + /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ @@ -821,14 +1246,17 @@ /* Internal macro for sanity checks */ #undef __LIBARCHIVE_CONFIG_H_INCLUDED -/* Define to empty if `const' does not conform to ANSI C. */ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +#undef __MINGW_USE_VC2005_COMPAT + +/* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* Define to match typeof st_gid field of struct stat if doesn't define. */ #undef gid_t -/* Define to `unsigned long' if does not define. */ +/* Define to 'unsigned long' if does not define. */ #undef id_t /* Define to the type of a signed integer type of width exactly 16 bits if @@ -847,13 +1275,13 @@ not define. */ #undef intmax_t -/* Define to `int' if does not define. */ +/* Define to 'int' if does not define. */ #undef mode_t -/* Define to `long long' if does not define. */ +/* Define to 'long long' if does not define. */ #undef off_t -/* Define to `unsigned int' if does not define. */ +/* Define as 'unsigned int' if doesn't define. */ #undef size_t /* Define to match typeof st_uid field of struct stat if doesn't @@ -880,5 +1308,5 @@ do not define. */ #undef uintmax_t -/* Define to `unsigned int' if does not define. */ +/* Define to 'unsigned int' if does not define. */ #undef uintptr_t diff --git a/libarchive-clib/configure.ac b/libarchive-clib/configure.ac index 0363abe..c4835c3 100644 --- a/libarchive-clib/configure.ac +++ b/libarchive-clib/configure.ac @@ -1,12 +1,13 @@ -m4_define([LIBARCHIVE_VERSION_S],[3.7.2]) -m4_define([LIBARCHIVE_VERSION_N],[3007002]) +m4_define([LIBARCHIVE_VERSION_S],[3.8.6]) +m4_define([LIBARCHIVE_VERSION_N],[3008006]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) m4_define([BSDCPIO_VERSION_S],LIBARCHIVE_VERSION_S()) m4_define([BSDCAT_VERSION_S],LIBARCHIVE_VERSION_S()) +m4_define([BSDUNZIP_VERSION_S],LIBARCHIVE_VERSION_S()) -AC_PREREQ([2.69]) +AC_PREREQ([2.71]) AC_INIT([Haskell libarchive-clib package],[3.7.2],[vamchale@gmail.com],[libarchive-clib]) # @@ -27,7 +28,7 @@ AC_CONFIG_MACRO_DIR([build/autoconf]) ARCHIVE_MINOR=$(( (LIBARCHIVE_VERSION_N() / 1000) % 1000 )) # Libarchive 2.7 == libtool interface 9 = 2 + 7 # Libarchive 2.8 == libtool interface 10 = 2 + 8 -# Libarchive 2.9 == libtool interface 11 = 2 + 8 +# Libarchive 2.9 == libtool interface 11 = 2 + 9 # Libarchive 3.0 == libtool interface 12 # Libarchive 3.1 == libtool interface 13 ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))` @@ -49,6 +50,8 @@ AC_DEFINE([BSDTAR_VERSION_STRING],"BSDTAR_VERSION_S()", [Version number of bsdtar]) AC_DEFINE([BSDCAT_VERSION_STRING],"BSDTAR_VERSION_S()", [Version number of bsdcat]) +AC_DEFINE([BSDUNZIP_VERSION_STRING],"BSDUNZIP_VERSION_S()", + [Version number of bsdunzip]) # The shell variables here must be the same as the AC_SUBST() variables # below, but the shell variable names apparently cannot be the same as @@ -56,6 +59,7 @@ AC_DEFINE([BSDCAT_VERSION_STRING],"BSDTAR_VERSION_S()", BSDCPIO_VERSION_STRING=BSDCPIO_VERSION_S() BSDTAR_VERSION_STRING=BSDTAR_VERSION_S() BSDCAT_VERSION_STRING=BSDCAT_VERSION_S() +BSDUNZIP_VERSION_STRING=BSDUNZIP_VERSION_S() LIBARCHIVE_VERSION_STRING=LIBARCHIVE_VERSION_S() LIBARCHIVE_VERSION_NUMBER=LIBARCHIVE_VERSION_N() @@ -66,6 +70,7 @@ AC_SUBST(ARCHIVE_LIBTOOL_VERSION) AC_SUBST(BSDCPIO_VERSION_STRING) AC_SUBST(BSDTAR_VERSION_STRING) AC_SUBST(BSDCAT_VERSION_STRING) +AC_SUBST(BSDUNZIP_VERSION_STRING) AC_SUBST(LIBARCHIVE_VERSION_STRING) AC_SUBST(LIBARCHIVE_VERSION_NUMBER) @@ -89,8 +94,8 @@ AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CPP AC_USE_SYSTEM_EXTENSIONS -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL + +LT_INIT([win32-dll]) AC_CHECK_TOOL([STRIP],[strip]) AC_PROG_MKDIR_P @@ -99,7 +104,8 @@ AC_PROG_MKDIR_P case $host in *mingw* | *cygwin* | *msys* ) AC_PREPROC_IFELSE([AC_LANG_PROGRAM( - [[#ifdef _WIN32_WINNT + [[#include + #ifdef _WIN32_WINNT # error _WIN32_WINNT already defined #endif ]],[[;]]) @@ -108,7 +114,8 @@ case $host in AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.]) ]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM( - [[#ifdef WINVER + [[#include + #ifdef WINVER # error WINVER already defined #endif ]],[[;]]) @@ -156,11 +163,12 @@ AC_CHECK_HEADERS([locale.h membership.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]) AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h]) -AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h sys/queue.h]) +AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h]) AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h]) AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h]) AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h]) AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h]) +AC_CHECK_TYPE([suseconds_t]) AC_CHECK_HEADERS([windows.h]) # check windows.h first; the other headers require it. AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[], @@ -169,8 +177,146 @@ AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[], #endif ]]) +# Checks for libraries. +AC_ARG_WITH([zlib], + AS_HELP_STRING([--without-zlib], [Don't build support for gzip through zlib])) + +if test "x$with_zlib" = "xyes" || test "$CABAL_FLAG_zlib" = 1; then + old_LIBS="$LIBS" + LIBS="$LIBS -lz" + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + #if !defined(ZLIB_VERNUM) + // zlib 1.2.0 should work too, but it's difficult to test for. + // zlib 1.2.1 onwards have ZLIB_VERNUM, which is easy to check. + #error zlib >= 1.2.1 is required. + #endif + // Check that there's an inflate function. + int main(int argc, char **argv) { inflate(NULL, 0); return 0; } + ]])], + [AC_DEFINE([HAVE_ZLIB_H], [1], [Define to 1 if you have zlib >= 1.2.1]) + AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have zlib >= 1.2.1]) + AC_MSG_RESULT([found a suitable version of zlib (>= 1.2.1)]) + ], + [AC_MSG_ERROR([could not find a suitable version of zlib (>= 1.2.1)])]) +fi + +AC_ARG_WITH([bz2lib], + AS_HELP_STRING([--without-bz2lib], [Don't build support for bzip2 through bz2lib])) + +if test "x$with_bz2lib" = "xyes" || test "$CABAL_FLAG_bz2lib" = 1; then + AC_CHECK_HEADERS([bzlib.h]) + case "$host_os" in + *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]) + old_LIBS="$LIBS" + LIBS="-lbz2 $LIBS" + AC_LINK_IFELSE( + [AC_LANG_SOURCE(#include + int main() { return BZ2_bzDecompressInit(NULL, 0, 0); })], + [ac_cv_lib_bz2_BZ2_bzDecompressInit=yes], + [ac_cv_lib_bz2_BZ2_bzDecompressInit=no]) + LIBS="$old_LIBS" + AC_MSG_RESULT($ac_cv_lib_bz2_BZ2_bzDecompressInit) + if test "x$ac_cv_lib_bz2_BZ2_bzDecompressInit" = xyes; then + AC_DEFINE([HAVE_LIBBZ2], [1], [Define to 1 if you have the `bz2' library (-lbz2).]) + LIBS="-lbz2 $LIBS" + else + AC_MSG_ERROR([Could not find a suitable version of bz2lib]) + fi + ;; + *) + AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) + ;; + esac +fi + +PKG_PROG_PKG_CONFIG + AM_CONDITIONAL([INC_BLAKE2], [test "x$ac_cv_lib_b2_blake2sp_init" != "xyes"]) +AC_ARG_WITH([iconv], + AS_HELP_STRING([--without-iconv], [Don't try to link against iconv])) + +if test "x$with_iconv" = "xyes" || test "$CABAL_FLAG_iconv" = 1; then + AM_ICONV + AC_CHECK_HEADERS([iconv.h],[],[],[#include ]) + if test "x$am_cv_func_iconv" = "xyes"; then + AC_CHECK_HEADERS([localcharset.h]) + LIBS="${LIBS} ${LIBICONV}" + if test -n "$LIBICONV"; then + AC_DEFINE([HAVE_LIBICONV], [1], [Define to 1 if you have the `iconv' library (-liconv).]) + + # Most platforms do not provide iconv.pc, but MSYS2 MinGW does. + # We add it to our Requires.private only if it exists. + PKG_CHECK_MODULES(ICONV_PC, [iconv], [ + LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" + ], [true]) + fi + AC_CHECK_FUNCS([locale_charset]) + if test "x$ac_cv_func_locale_charset" != "xyes"; then + # If locale_charset() is not in libiconv, we have to find libcharset. + AC_CHECK_LIB(charset,locale_charset) + fi + fi +fi + +AC_ARG_WITH([lz4], + AS_HELP_STRING([--without-lz4], [Don't build support for lz4 through liblz4])) + +if test "x$with_lz4" = "xyes" || test "$CABAL_FLAG_lz4" = 1; then + AC_CHECK_HEADERS([lz4.h lz4hc.h]) + AC_CHECK_LIB(lz4,LZ4_decompress_safe) +fi + +AC_ARG_WITH([zstd], + AS_HELP_STRING([--without-zstd], [Don't build support for zstd through libzstd])) + +if test "x$with_zstd" = "xyes" || test "$CABAL_FLAG_zstd" = 1; then + AC_CHECK_HEADERS([zstd.h]) + AC_CHECK_LIB(zstd,ZSTD_decompressStream) + AC_CHECK_LIB(zstd,ZSTD_compressStream, + AC_DEFINE([HAVE_ZSTD_compressStream], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.])) + AC_CHECK_LIB(zstd,ZSTD_minCLevel, + AC_DEFINE([HAVE_ZSTD_minCLevel], [1], [Define to 1 if you have a `zstd' library version with ZSTD_minCLevel().]), + AC_MSG_ERROR([Could not find a suitable version of zstr])) +fi + +AC_ARG_WITH([lzma], + AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma])) + +if test "x$with_lzma" = "xyes" || test "$CABAL_FLAG_lzma" = 1; then + PKG_PROG_PKG_CONFIG + PKG_CHECK_MODULES(LZMA_PC, [liblzma], [ + CFLAGS="${CFLAGS} ${LZMA_PC_CFLAGS}" + LIBS="${LIBS} ${LZMA_PC_LIBS}" + AC_DEFINE(HAVE_LIBLZMA, [1], [Define to 1 if you have the `lzma' library.]) + ], [ + AC_CHECK_LIB(lzma,lzma_stream_decoder, [], AC_MSG_ERROR([Could not find a suitable version of lzma])) + ]) + AC_CHECK_HEADERS([lzma.h]) + + # Some pre-release (but widely distributed) versions of liblzma + # included a disabled version of lzma_stream_encoder_mt that + # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need + # to do something more complex here: + AC_CACHE_CHECK( + [whether we have multithread support in lzma], + ac_cv_lzma_has_mt, + [AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[#include ] + [#if LZMA_VERSION < 50020000] + [#error unsupported] + [#endif]], + [[int ignored __attribute__((unused)); ignored = lzma_stream_encoder_mt(0, 0);]])], + [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])]) + if test "x$ac_cv_lzma_has_mt" != xno; then + AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.]) + fi +fi + # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -265,10 +411,12 @@ AC_CHECK_TYPE([wchar_t], AC_CHECK_SIZEOF([wchar_t])], []) +AX_COMPILE_CHECK_SIZEOF(int) +AX_COMPILE_CHECK_SIZEOF(long) + AC_CHECK_HEADERS_ONCE([sys/time.h]) # Checks for library functions. -AC_PROG_GCC_TRADITIONAL AC_HEADER_MAJOR AC_FUNC_FSEEKO AC_FUNC_MEMCMP @@ -282,19 +430,25 @@ AC_FUNC_VPRINTF # To avoid necessity for including windows.h or special forward declaration # workarounds, we use 'void *' for 'struct SECURITY_ATTRIBUTES *' AC_CHECK_STDCALL_FUNC([CreateHardLinkA],[const char *, const char *, void *]) -AC_CHECK_FUNCS([arc4random_buf chflags chown chroot ctime_r]) +AC_CHECK_FUNCS([arc4random_buf chflags chown chroot]) +AC_CHECK_FUNCS([closefrom close_range ctime_r]) AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fdopendir fnmatch fork]) AC_CHECK_FUNCS([fstat fstatat fstatfs fstatvfs ftruncate]) AC_CHECK_FUNCS([futimens futimes futimesat]) -AC_CHECK_FUNCS([geteuid getline getpid getgrgid_r getgrnam_r]) -AC_CHECK_FUNCS([getpwnam_r getpwuid_r getvfsbyname gmtime_r]) +AC_CHECK_FUNCS([getegid geteuid getline getpid getresgid getresuid]) +AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r]) +AC_CHECK_FUNCS([getvfsbyname gmtime_r]) +AC_CHECK_FUNCS([issetugid]) AC_CHECK_FUNCS([lchflags lchmod lchown link linkat localtime_r lstat lutimes]) AC_CHECK_FUNCS([mbrtowc memmove memset]) AC_CHECK_FUNCS([mkdir mkfifo mknod mkstemp]) -AC_CHECK_FUNCS([nl_langinfo openat pipe poll posix_spawnp readlink readlinkat]) +AC_CHECK_FUNCS([nl_langinfo openat pipe poll posix_spawn posix_spawnp]) +AC_CHECK_FUNCS([readlink readlinkat]) AC_CHECK_FUNCS([readpassphrase]) AC_CHECK_FUNCS([select setenv setlocale sigaction statfs statvfs]) AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strnlen strrchr symlink]) +AC_CHECK_FUNCS([sysconf]) +AC_CHECK_FUNCS([tcgetattr tcsetattr]) AC_CHECK_FUNCS([timegm tzset unlinkat unsetenv utime utimensat utimes vfork]) AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy wmemmove]) AC_CHECK_FUNCS([_fseeki64 _get_timezone]) @@ -340,14 +494,6 @@ AC_CHECK_TYPES(struct statfs,,, #include ]) -# There are several variants of readdir_r around; we only -# accept the POSIX-compliant version. -AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[DIR *dir; struct dirent e, *r; - return(readdir_r(dir, &e, &r));]])], - [AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have a POSIX compatible readdir_r])] -) # dirfd can be either a function or a macro. AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include @@ -376,8 +522,322 @@ AC_CHECK_MEMBER(struct dirent.d_namlen,,, #endif ]) +# Check for Extended Attributes support +AC_ARG_ENABLE([xattr], + AS_HELP_STRING([--disable-xattr], + [Disable Extended Attributes support (default: check)])) + +if test "x$enable_xattr" = "xyes" || test "$CABAL_FLAG_xattr" = 1; then + AC_SEARCH_LIBS([setxattr], [attr gnu]) + AC_CHECK_DECLS([EXTATTR_NAMESPACE_USER], [], [], [#include +#include +]) + AC_CHECK_DECLS([XATTR_NOFOLLOW], [], [], [#include +]) + ATTR_PC_VER=`$PKG_CONFIG --modversion libattr` + if test "x$ATTR_PC_VER" != "x"; then + AC_DEFINE_UNQUOTED([LIBATTR_PKGCONFIG_VERSION], ["$ATTR_PC_VER"], [Libattr version coming from pkg-config.]) + fi + if test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_XATTR_NOFOLLOW" = "xyes"; then + # Darwin extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_darwin], + [AC_CHECK_FUNCS(fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + listxattr \ + setxattr, + [ac_cv_archive_xattr_darwin=yes], + [ac_cv_archive_xattr_darwin=no]) + ] + ) + elif test "x$ac_cv_header_sys_extattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_EXTATTR_NAMESPACE_USER" = "xyes"; then + # FreeBSD extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_freebsd], + [AC_CHECK_FUNCS(extattr_get_fd \ + extattr_get_file \ + extattr_get_link \ + extattr_list_fd \ + extattr_list_file \ + extattr_list_link \ + extattr_set_fd \ + extattr_set_link, + [ac_cv_archive_xattr_freebsd=yes], + [ac_cv_archive_xattr_freebsd=no]) + ] + ) + elif test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -o "x$ac_cv_header_attr_xattr_h" = "xyes"; then + # Linux extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_linux], + [AC_CHECK_FUNCS(fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + lgetxattr \ + listxattr \ + llistxattr \ + lsetxattr, + [ac_cv_archive_xattr_linux=yes], + [ac_cv_archive_xattr_linux=no]) + ] + ) + elif test "x$ac_cv_header_sys_ea_h" = "xyes"; then + # AIX extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_aix], + [AC_CHECK_FUNCS(fgetea \ + flistea \ + fsetea \ + getea \ + lgetea \ + listea \ + llistea \ + lsetea, + [ac_cv_archive_xattr_aix=yes], + [ac_cv_archive_xattr_aix=no]) + ] + ) + fi + + AC_MSG_CHECKING([for extended attributes support]) + if test "x$ac_cv_archive_xattr_linux" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_LINUX], [1], [Linux xattr support]) + AC_MSG_RESULT([Linux]) + elif test "x$ac_cv_archive_xattr_darwin" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_DARWIN], [1], [Darwin xattr support]) + AC_MSG_RESULT([Darwin]) + elif test "x$ac_cv_archive_xattr_freebsd" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_FREEBSD], [1], [FreeBSD xattr support]) + AC_MSG_RESULT([FreeBSD]) + elif test "x$ac_cv_archive_xattr_aix" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_AIX], [1], [AIX xattr support]) + AC_MSG_RESULT([AIX]) + else + AC_MSG_ERROR([Could not find a suitable version of xattr]) + fi +fi + +# Check for ACL support +# +# The ACL support in libarchive is written against the POSIX1e draft, +# which was never officially approved and varies quite a bit across +# 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], + [Disable ACL support (default: check)])) + +if test "x$enable_acl" = "xyes" || test "$CABAL_FLAG_acl" = 1; then + # Libacl + AC_CHECK_LIB([acl], [acl_get_file]) + ACL_PC_VER=`$PKG_CONFIG --modversion libacl` + if test "x$ACL_PC_VER" != "x"; then + AC_DEFINE_UNQUOTED([LIBACL_PKGCONFIG_VERSION], ["$ACL_PC_VER"], [Libacl version coming from pkg-config.]) + fi + AC_CHECK_TYPES([acl_t, acl_entry_t, acl_permset_t, acl_tag_t], [], [], [ + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + ]) + + AC_CHECK_LIB([richacl], [richacl_get_file]) + RICHACL_PC_VER=`$PKG_CONFIG --modversion librichacl` + if test "x$RICHACL_PC_VER" != "x"; then + AC_DEFINE_UNQUOTED([LIBRICHACL_PKGCONFIG_VERSION], ["$RICHACL_PC_VER"], [Librichacl version coming from pkg-config.]) + fi + AC_CHECK_TYPES([[struct richace], [struct richacl]], [], [], [ + #if HAVE_SYS_RICHACL_H + #include + #endif + ]) + + # Solaris and derivates ACLs + AC_CHECK_FUNCS(acl facl) + + if test "x$ac_cv_lib_richacl_richacl_get_file" = "xyes" \ + -a "x$ac_cv_type_struct_richace" = "xyes" \ + -a "x$ac_cv_type_struct_richacl" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_librichacl], + [AC_CHECK_FUNCS(richacl_alloc \ + richacl_equiv_mode \ + richacl_free \ + richacl_get_fd \ + richacl_get_file \ + richacl_set_fd \ + richacl_set_file, + [ac_cv_archive_acl_librichacl=yes], [ac_cv_archive_acl_librichacl=no])]) + fi + + if test "x$ac_cv_func_acl" = "xyes" \ + -a "x$ac_cv_func_facl" = "xyes"; then + AC_CHECK_TYPES([aclent_t], [], [], [[#include ]]) + if test "x$ac_cv_type_aclent_t" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_sunos], + [AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT], + [ac_cv_archive_acl_sunos=yes], [ac_cv_archive_acl_sunos=no], + [#include ])]) + AC_CHECK_TYPES([ace_t], [], [], [[#include ]]) + if test "x$ac_cv_type_ace_t" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_sunos_nfs4], + [AC_CHECK_DECLS([ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], + [ac_cv_archive_acl_sunos_nfs4=yes], + [ac_cv_archive_acl_sonos_nfs4=no], + [#include ])]) + fi + fi + elif test "x$ac_cv_type_acl_t" = "xyes" \ + -a "x$ac_cv_type_acl_entry_t" = "xyes" \ + -a "x$ac_cv_type_acl_permset_t" = "xyes" \ + -a "x$ac_cv_type_acl_tag_t" = "xyes"; then + # POSIX.1e ACL functions + AC_CACHE_VAL([ac_cv_posix_acl_funcs], + [AC_CHECK_FUNCS(acl_add_perm \ + acl_clear_perms \ + acl_create_entry \ + acl_delete_def_file \ + acl_free \ + acl_get_entry \ + acl_get_fd \ + acl_get_file \ + acl_get_permset \ + acl_get_qualifier \ + acl_get_tag_type \ + acl_init \ + acl_set_fd \ + acl_set_file \ + acl_set_qualifier \ + acl_set_tag_type, + [ac_cv_posix_acl_funcs=yes], [ac_cv_posix_acl_funcs=no]) + ]) + + AC_CHECK_FUNCS(acl_get_perm) + + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_header_acl_libacl_h" = "xyes" \ + -a "x$ac_cv_lib_acl_acl_get_file" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm"; then + AC_CACHE_VAL([ac_cv_archive_acl_libacl], + [ac_cv_archive_acl_libacl=yes]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [POSIX.1e ACL support via libacl]) + else + # FreeBSD/Darwin + AC_CHECK_FUNCS(acl_add_flag_np \ + acl_clear_flags_np \ + acl_get_brand_np \ + acl_get_entry_type_np \ + acl_get_flag_np \ + acl_get_flagset_np \ + acl_get_fd_np \ + acl_get_link_np \ + acl_get_perm_np \ + acl_is_trivial_np \ + acl_set_entry_type_np \ + acl_set_fd_np \ + acl_set_link_np) + + AC_CHECK_FUNCS(mbr_uid_to_uuid \ + mbr_uuid_to_id \ + mbr_gid_to_uuid) + + AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_TYPE_NFS4, ACL_USER, + ACL_SYNCHRONIZE], [], [], + [#include + #include ]) + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_func_acl_get_fd_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm" != "xyes" \ + -a "x$ac_cv_func_acl_get_perm_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_fd_np" = "xyes"; then + if test "x$ac_cv_have_decl_ACL_USER" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_freebsd], + [ac_cv_archive_acl_freebsd=yes]) + if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_brand_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_entry_type_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_entry_type_np" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_freebsd_nfs4], + [ac_cv_archive_acl_freebsd_nfs4=yes]) + fi + elif test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_link_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_link_np" = "xyes" \ + -a "x$ac_cv_func_mbr_uid_to_uuid" = "xyes" \ + -a "x$ac_cv_func_mbr_uuid_to_id" = "xyes" \ + -a "x$ac_cv_func_mbr_gid_to_uuid" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_darwin], + [ac_cv_archive_acl_darwin=yes]) + fi + fi + fi + fi + AC_MSG_CHECKING([for ACL support]) + if test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -a "x$ac_cv_archive_acl_librichacl" = "xyes"; then + AC_MSG_RESULT([libacl (POSIX.1e) + librichacl (NFSv4)]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [Linux POSIX.1e ACL support via libacl]) + AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1], + [Linux NFSv4 ACL support via librichacl]) + elif test "x$ac_cv_archive_acl_libacl" = "xyes"; then + AC_MSG_RESULT([libacl (POSIX.1e)]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [Linux POSIX.1e ACL support via libacl]) + elif test "x$ac_cv_archive_acl_librichacl" = "xyes"; then + AC_MSG_RESULT([librichacl (NFSv4)]) + AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1], + [Linux NFSv4 ACL support via librichacl]) + elif test "x$ac_cv_archive_acl_darwin" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_DARWIN], [1], [Darwin ACL support]) + AC_MSG_RESULT([Darwin (limited NFSv4)]) + elif test "x$ac_cv_archive_acl_sunos" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_SUNOS], [1], [Solaris ACL support]) + if test "x$ac_cv_archive_acl_sunos_nfs4" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_SUNOS_NFS4], [1], + [Solaris NFSv4 ACL support]) + AC_MSG_RESULT([Solaris (POSIX.1e and NFSv4)]) + else + AC_MSG_RESULT([Solaris (POSIX.1e)]) + fi + elif test "x$ac_cv_archive_acl_freebsd" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_FREEBSD], [1], [FreeBSD ACL support]) + if test "x$ac_cv_archive_acl_freebsd_nfs4" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_FREEBSD_NFS4], [1], + [FreeBSD NFSv4 ACL support]) + AC_MSG_RESULT([FreeBSD (POSIX.1e and NFSv4)]) + else + AC_MSG_RESULT([FreeBSD (POSIX.1e)]) + fi + else + AC_MSG_ERROR([Could not find a suitable version of acl]) + fi +fi + + +AM_CONDITIONAL([INC_LINUX_ACL], + [test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -o "x$ac_cv_archive_acl_librichacl" = "xyes"]) +AM_CONDITIONAL([INC_SUNOS_ACL], [test "x$ac_cv_archive_acl_sunos" = "xyes"]) +AM_CONDITIONAL([INC_DARWIN_ACL], + [test "x$ac_cv_archive_acl_darwin" = "xyes"]) +AM_CONDITIONAL([INC_FREEBSD_ACL], + [test "x$ac_cv_archive_acl_freebsd" = "xyes"]) + # Additional requirements AC_SYS_LARGEFILE +AC_SUBST([EXTRA_LIBS],[` printf " %s " "$LIBS" | sed -E 's/ -l([[^ ]]*)/\1 /g' `]) +AC_CONFIG_FILES([libarchive-clib.buildinfo]) + AC_OUTPUT diff --git a/libarchive-clib/libarchive-clib.buildinfo.in b/libarchive-clib/libarchive-clib.buildinfo.in new file mode 100644 index 0000000..eff41cd --- /dev/null +++ b/libarchive-clib/libarchive-clib.buildinfo.in @@ -0,0 +1,3 @@ +extra-libraries: @EXTRA_LIBS@ +cc-options: @CFLAGS@ +ld-options: @LDFLAGS@ diff --git a/libarchive-clib/libarchive-clib.cabal b/libarchive-clib/libarchive-clib.cabal index 18eafe6..8412118 100644 --- a/libarchive-clib/libarchive-clib.cabal +++ b/libarchive-clib/libarchive-clib.cabal @@ -1,6 +1,8 @@ cabal-version: 2.0 name: libarchive-clib -version: 3.8.6 +-- this is actually corresponding to upstream's 3.8.6, +-- but we had to fix configure.ac and PVP has no patch versions +version: 3.8.6.1 license: OtherLicense license-file: LICENSE copyright: Copyright: (c) 2018-2020 Vanessa McHale @@ -24,11 +26,44 @@ extra-source-files: ./build/autoconf/ltmain.sh configure configure.ac + libarchive-clib.buildinfo.in source-repository head type: git location: https://github.com/vmchale/libarchive +flag zlib + description: Build support for gzip through zlib + default: True + +flag iconv + description: Link against iconv + default: False + +flag lz4 + description: Build support for lz4 through liblz4 + default: False + +flag zstd + description: Build support for zstd through libzstd + default: False + +flag lzma + description: Build support for xz through lzma + default: False + +flag bz2lib + description: Build support for bzip2 through bz2lib + default: False + +flag acl + description: Enable ACL support + default: False + +flag xattr + description: Extended Attributes support + default: False + library default-language: Haskell2010 if os(windows) @@ -60,12 +95,11 @@ library ./c/archive_entry_stat.c ./c/archive_entry_strmode.c ./c/archive_entry_xattr.c - ./c/archive_parse_date.c - ./c/archive_time.c ./c/archive_hmac.c ./c/archive_match.c ./c/archive_options.c ./c/archive_pack_dev.c + ./c/archive_parse_date.c ./c/archive_pathmatch.c ./c/archive_ppmd7.c ./c/archive_ppmd8.c @@ -121,6 +155,7 @@ library ./c/archive_read_support_format_zip.c ./c/archive_string.c ./c/archive_string_sprintf.c + ./c/archive_time.c ./c/archive_util.c ./c/archive_version_details.c ./c/archive_virtual.c @@ -152,8 +187,8 @@ library ./c/archive_write_set_format_ar.c ./c/archive_write_set_format_by_name.c ./c/archive_write_set_format.c - ./c/archive_write_set_format_cpio.c ./c/archive_write_set_format_cpio_binary.c + ./c/archive_write_set_format_cpio.c ./c/archive_write_set_format_cpio_newc.c ./c/archive_write_set_format_cpio_odc.c ./c/archive_write_set_format_filter_by_ext.c diff --git a/libarchive/libarchive.cabal b/libarchive/libarchive.cabal index 93bfc4f..9c5a328 100644 --- a/libarchive/libarchive.cabal +++ b/libarchive/libarchive.cabal @@ -16,6 +16,7 @@ category: Codec build-type: Custom extra-source-files: test/data/aarch64-linux-dist.tar + test/data/plan_json.zip extra-doc-files: README.md @@ -130,6 +131,8 @@ executable archive libarchive, lzma-static, time, + cryptohash-sha256, + base16-bytestring, zlib ^>=0.7.1.1 if flag(no-exe) @@ -149,6 +152,8 @@ test-suite libarchive-test ghc-options: -threaded -rtsopts "-with-rtsopts=-N -K1K" -Wall build-depends: base, + base16-bytestring, + cryptohash-sha256, deepseq, libarchive, hspec, @@ -156,6 +161,7 @@ test-suite libarchive-test directory >=1.2.5.0, filepath, temporary, + text, mtl >=2.2.2, dir-traverse, composition-prelude >=2.0.5.0, diff --git a/libarchive/test/Spec.cpphs b/libarchive/test/Spec.cpphs index 4591d1e..3e70099 100644 --- a/libarchive/test/Spec.cpphs +++ b/libarchive/test/Spec.cpphs @@ -1,4 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE LambdaCase #-} module Main ( main ) where import Codec.Archive @@ -7,6 +9,7 @@ import Codec.Archive.Test import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.Either (isRight) +import Data.List (uncons) import Data.Foldable (traverse_) import System.Directory (doesDirectoryExist, listDirectory) import System.FilePath (()) @@ -19,6 +22,11 @@ import Test.Hspec.Core.Runner #endif import Test.Hspec +import qualified Data.ByteString.Base16 as B16 +import qualified Crypto.Hash.SHA256 as SHA256 +import qualified Data.Text.Encoding as E +import qualified Data.Text as T + testFp :: FilePath -> Spec testFp fp = it ("sucessfully unpacks/packs (" ++ fp ++ ")") $ roundtrip fp >>= (`shouldSatisfy` isRight) @@ -58,6 +66,20 @@ repack packer str fp = it ("should repack (" ++ str ++ ")") $ do bsValid :: Either a BSL.ByteString -> Bool bsValid = \x -> case x of { Left{} -> False; Right b -> not $ BSL.null b } +testArchiveContentChecksum :: FilePath -- ^ archive + -> FilePath -- ^ file inside archive + -> String -- ^ base64 encoded sha256sum + -> Spec +testArchiveContentChecksum archive file sha = it ("Verify checksum of " <> file <> " in archive " <> archive) $ do + entries' <- runArchiveM (readArchiveFile archive) + entries <- either (ioError . userError . show) pure $ entries' + let cabal_exe = uncons . fmap content . filter (\Entry{..} -> filepath == file) $ entries + c <- case cabal_exe of + (Just (NormalFile c, _)) -> pure c + _ -> ioError $ userError $ "Could not find file " <> file <> " in archive " <> archive + digest <- either (ioError . userError . show) pure . E.decodeUtf8' . B16.encode . SHA256.hash $ c + digest `shouldBe` T.pack sha + main :: IO () main = do @@ -65,7 +87,7 @@ main = do tarballs <- if dir then listDirectory "test/data" else pure [] let tarPaths = ("test/data" ) <$> tarballs - hspec' $ + hspec' $ do describe "roundtrip" $ do traverse_ testFp tarPaths @@ -113,6 +135,13 @@ main = do [ stripOwnership (simpleFile "a.txt" (NormalFile "text")) ] xcontext "having entry without timestamp" . itPacksUnpacks $ [ stripTime (simpleFile "a.txt" (NormalFile "text")) ] + + describe "checksums" $ do + testArchiveContentChecksum + "test/data/plan_json.zip" + "plan.json" + "5eac50e94666fff2491e43f81a670ef243c272aa3afe1fc59c720004fe186feb" + where #ifdef mingw32_HOST_OS hspec' spec = getArgs >>= readConfig defaultConfig >>= (\c -> withArgs [] . runSpec spec $ c{ configConcurrentJobs = Nothing }) >>= evaluateSummary diff --git a/libarchive/test/data/plan_json.zip b/libarchive/test/data/plan_json.zip new file mode 100644 index 0000000..afc791a Binary files /dev/null and b/libarchive/test/data/plan_json.zip differ