dist-xz, dist-bzip2: don't hard-code -9, honor envvar settings
Before the present change, automake-generated `dist-xz' rule used
a hard-coded `xz -9'. That was a problem because on this front,
xz differs from gzip and bzip2. While the latter two don't incur
any run-time decompression penalty for using a higher compression
level, specifying -9 with xz imposes a potentially fatal virtual
memory requirement on any client that wants to decompress your
tar.xz file.
People have complained that a tarball compressed with -9 cannot
be uncompressed in a low-memory environment (wrt-based embedded).
Hence, instead of defaulting to -9, which is useful only for very
large tarballs, it defaults to -e (equivalent to -6e). This
limits the default memory requirements imposed on decompressors,
yet still gives very good compression ratios.
* lib/am/distdir.am (dist-xz): Do not hard-code xz's -9: that made
it impossible to override. Actually don't default to -9, either,
since that induced inordinately large virtual memory usage when
merely decompressing. Instead, use its XZ_OPT envvar, defaulting
to -e if not defined. Suggested by Lasse Collin.
(dist, dist-all) [?XZ?]: Likewise
(dist-bzip2): Similarly, do not hard-code -9, but do continue to
use -9 by default. Honor the BZIP2 envvar.
(dist, dist-all) [?BZIP2?]: Likewise
* NEWS: Update.
* doc/automake.texi (The Types of Distributions): Describe the
newly enabled environment variables.
This is inspired to commit
v1.11-389-g6da46f3, with additional
changes to reflect that the xz compression level should default
to -e, not -9.