mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-06 16:26:55 +00:00
Allow installers to specify alternative program names for compression programs.
This adds --with-gzip, --with-bzip2 etc. switches to the configure, so that one can do, e.g. ./configure --with-bzip2=lbzip2 and have lbzip2 executed whenever user calls `tar --bzip2'. * acinclude.m4: New file. * configure.ac: Add TAR_COMPR_PROGRAM invocations for the supported compressors. * src/buffer.c (magic): Use *_COMPRESSOR defines instead of hardcoded program names. * src/suffix.c (compression_suffixes): Likewise.
This commit is contained in:
+6
-6
@@ -220,12 +220,12 @@ struct zip_magic
|
||||
static struct zip_magic const magic[] = {
|
||||
{ ct_tar },
|
||||
{ ct_none, },
|
||||
{ ct_compress, 2, "\037\235", "compress", "-Z" },
|
||||
{ ct_gzip, 2, "\037\213", "gzip", "-z" },
|
||||
{ ct_bzip2, 3, "BZh", "bzip2", "-j" },
|
||||
{ ct_lzma, 6, "\xFFLZMA", "lzma", "--lzma" },
|
||||
{ ct_lzop, 4, "\211LZO", "lzop", "--lzop" },
|
||||
{ ct_xz, 6, "\0xFD7zXZ", "xz", "-J" },
|
||||
{ ct_compress, 2, "\037\235", COMPRESS_PROGRAM, "-Z" },
|
||||
{ ct_gzip, 2, "\037\213", GZIP_PROGRAM, "-z" },
|
||||
{ ct_bzip2, 3, "BZh", BZIP2_PROGRAM, "-j" },
|
||||
{ ct_lzma, 6, "\xFFLZMA", LZMA_PROGRAM, "--lzma" },
|
||||
{ ct_lzop, 4, "\211LZO", LZOP_PROGRAM, "--lzop" },
|
||||
{ ct_xz, 6, "\0xFD7zXZ", XZ_PROGRAM, "-J" },
|
||||
};
|
||||
|
||||
#define NMAGIC (sizeof(magic)/sizeof(magic[0]))
|
||||
|
||||
Reference in New Issue
Block a user