1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- dnl TAR_CHECK_COMPRESS(TOOL, SUF[, SUF2])
- dnl Tests whether tar can create archives using TOOL (i.e. using the --TOOL
- dnl command line option). SUF and optional SUF2 are suffixes for created
- dnl archives (without leading dot). Tar should be able to use TOOL to
- dnl automatically decompress archives with names ending on these suffixes.
- m4_define([TAR_CHECK_COMPRESS],
- [AT_SETUP([compress: $1])
- AT_KEYWORDS([compression compress-$1 $1])
- AT_CHECK([
- AT_GZIP_PREREQ($1)
- unset TAR_OPTIONS
- touch empty
- set -e
- : create with --$1
- tar --$1 -cf k.tar.$2 empty
- tar tf k.tar.$2
- m4_foreach([SUF], m4_quote(m4_shift($@)),
- [
- echo testing .SUF
- tar -acf k2.tar.SUF empty
- cat k2.tar.SUF | $1 -d > k.SUF.tar
- tar tf k.SUF.tar
- ])
- rm -f empty
- tar xf k.tar.$2
- test -f empty
- ],
- [0],
- [empty
- m4_foreach([SUF],m4_quote(m4_shift($@)),[testing .SUF
- empty
- ])])
- AT_CLEANUP
- ])
|