summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 21:12:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 21:12:04 +0000
commiteac54b7c4aec25060d7bd856f7cdc290943d6aae (patch)
tree9a6d81c9f88df4698e746d63d14ddafeddd918b8 /INSTALL
parentInitial commit. (diff)
downloadxz-utils-eac54b7c4aec25060d7bd856f7cdc290943d6aae.tar.xz
xz-utils-eac54b7c4aec25060d7bd856f7cdc290943d6aae.zip
Adding upstream version 5.4.1.upstream/5.4.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--INSTALL716
-rw-r--r--INSTALL.generic368
2 files changed, 1084 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..67df188
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,716 @@
+
+XZ Utils Installation
+=====================
+
+ 0. Preface
+ 1. Supported platforms
+ 1.1. Compilers
+ 1.2. Platform-specific notes
+ 1.2.1. AIX
+ 1.2.2. IRIX
+ 1.2.3. MINIX 3
+ 1.2.4. OpenVMS
+ 1.2.5. Solaris, OpenSolaris, and derivatives
+ 1.2.6. Tru64
+ 1.2.7. Windows
+ 1.2.8. DOS
+ 1.2.9. z/OS
+ 1.3. Adding support for new platforms
+ 2. configure options
+ 2.1. Static vs. dynamic linking of liblzma
+ 2.2. Optimizing xzdec and lzmadec
+ 3. xzgrep and other scripts
+ 3.1. Dependencies
+ 3.2. PATH
+ 4. Troubleshooting
+ 4.1. "No C99 compiler was found."
+ 4.2. "No POSIX conforming shell (sh) was found."
+ 4.3. configure works but build fails at crc32_x86.S
+ 4.4. Lots of warnings about symbol visibility
+ 4.5. "make check" fails
+ 4.6. liblzma.so (or similar) not found when running xz
+
+
+0. Preface
+----------
+
+ If you aren't familiar with building packages that use GNU Autotools,
+ see the file INSTALL.generic for generic instructions before reading
+ further.
+
+ If you are going to build a package for distribution, see also the
+ file PACKAGERS. It contains information that should help making the
+ binary packages as good as possible, but the information isn't very
+ interesting to those making local builds for private use or for use
+ in special situations like embedded systems.
+
+
+1. Supported platforms
+----------------------
+
+ XZ Utils are developed on GNU/Linux, but they should work on many
+ POSIX-like operating systems like *BSDs and Solaris, and even on
+ a few non-POSIX operating systems.
+
+
+1.1. Compilers
+
+ A C99 compiler is required to compile XZ Utils. If you use GCC, you
+ need at least version 3.x.x. GCC version 2.xx.x doesn't support some
+ C99 features used in XZ Utils source code, thus GCC 2 won't compile
+ XZ Utils.
+
+ XZ Utils takes advantage of some GNU C extensions when building
+ with GCC. Because these extensions are used only when building
+ with GCC, it should be possible to use any C99 compiler.
+
+
+1.2. Platform-specific notes
+
+1.2.1. AIX
+
+ If you use IBM XL C compiler, pass CC=xlc_r to configure. If
+ you use CC=xlc instead, you must disable threading support
+ with --disable-threads (usually not recommended).
+
+
+1.2.2. IRIX
+
+ MIPSpro 7.4.4m has been reported to produce broken code if using
+ the -O2 optimization flag ("make check" fails). Using -O1 should
+ work.
+
+ A problem has been reported when using shared liblzma. Passing
+ --disable-shared to configure works around this. Alternatively,
+ putting "-64" to CFLAGS to build a 64-bit version might help too.
+
+
+1.2.3. MINIX 3
+
+ The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
+ which doesn't support C99. Install GCC to compile XZ Utils.
+
+ MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has
+ to be patched before XZ Utils can be compiled correctly. See
+ <http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
+
+ MINIX 3.2.0 and later use a different libc and aren't affected by
+ the above bug.
+
+ XZ Utils doesn't have code to detect the amount of physical RAM and
+ number of CPU cores on MINIX 3.
+
+ See section 4.4 in this file about symbol visibility warnings (you
+ may want to pass gl_cv_cc_visibility=no to configure).
+
+
+1.2.4. OpenVMS
+
+ XZ Utils can be built for OpenVMS, but the build system files
+ are not included in the XZ Utils source package. The required
+ OpenVMS-specific files are maintained by Jouk Jansen and can be
+ downloaded here:
+
+ http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
+
+
+1.2.5. Solaris, OpenSolaris, and derivatives
+
+ The following linker error has been reported on some x86 systems:
+
+ ld: fatal: relocation error: R_386_GOTOFF: ...
+
+ This can be worked around by passing gl_cv_cc_visibility=no
+ as an argument to the configure script.
+
+ test_scripts.sh in "make check" may fail if good enough tools are
+ missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). Nowadays
+ /usr/xpg4/bin is added to the script PATH by default on Solaris
+ (see --enable-path-for-scripts=PREFIX in section 2), but old xz
+ releases needed extra steps. See sections 4.5 and 3.2 for more
+ information.
+
+
+1.2.6. Tru64
+
+ If you try to use the native C compiler on Tru64 (passing CC=cc to
+ configure), you may need the workaround mention in section 4.1 in
+ this file (pass also ac_cv_prog_cc_c99= to configure).
+
+
+1.2.7. Windows
+
+ If it is enough to build liblzma (no command line tools):
+
+ - There is CMake support. It should be good enough to build
+ static liblzma or liblzma.dll with Visual Studio. The CMake
+ support may work with MinGW or MinGW-w64. Read the comment
+ in the beginning of CMakeLists.txt before running CMake!
+
+ - There are Visual Studio project files under the "windows"
+ directory. See windows/INSTALL-MSVC.txt. In the future the
+ project files will be removed when CMake support is good
+ enough. Thus, please test the CMake version and help fix
+ possible issues.
+
+ To build also the command line tools:
+
+ - MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
+ for building the official binary packages for Windows.
+ There is windows/build.bash to ease packaging XZ Utils with
+ MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
+ See windows/INSTALL-MinGW.txt for more information.
+
+ - MinGW + MSYS (32-bit x86): I haven't recently tested this.
+
+ - Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
+ under Cygwin older than 1.7.35 can lead to DATA LOSS! If
+ you must use an old Cygwin version, stick to XZ Utils 5.0.x
+ which is safe under older Cygwin versions. You can check
+ the Cygwin version with the command "cygcheck -V".
+
+ It may be possible to build liblzma with other toolchains too, but
+ that will probably require writing a separate makefile. Building
+ the command line tools with non-GNU toolchains will be harder than
+ building only liblzma.
+
+ Even if liblzma is built with MinGW(-w64), the resulting DLL can
+ be used by other compilers and linkers, including MSVC. See
+ windows/README-Windows.txt for details.
+
+
+1.2.8. DOS
+
+ There is a Makefile in the "dos" directory to build XZ Utils on
+ DOS using DJGPP. Support for long file names (LFN) is needed at
+ build time but the resulting xz.exe works without LFN support too.
+ See dos/INSTALL.txt and dos/README.txt for more information.
+
+
+1.2.9. z/OS
+
+ To build XZ Utils on z/OS UNIX System Services using xlc, pass
+ these options to the configure script: CC='xlc -qhaltonmsg=CCN3296'
+ CPPFLAS='-D_UNIX03_THREADS -D_XOPEN_SOURCE=600'. The first makes
+ xlc throw an error if a header file is missing, which is required
+ to make the tests in configure work. The CPPFLAGS are needed to
+ get pthread support (some other CPPFLAGS may work too; if there
+ are problems, try -D_UNIX95_THREADS instead of -D_UNIX03_THREADS).
+
+ test_scripts.sh in "make check" will fail even if the scripts
+ actually work because the test data includes compressed files
+ with US-ASCII text.
+
+ No other tests should fail. If test_files.sh fails, check that
+ the included .xz test files weren't affected by EBCDIC conversion.
+
+ XZ Utils doesn't have code to detect the amount of physical RAM and
+ number of CPU cores on z/OS.
+
+
+1.3. Adding support for new platforms
+
+ If you have written patches to make XZ Utils to work on previously
+ unsupported platform, please send the patches to me! I will consider
+ including them to the official version. It's nice to minimize the
+ need of third-party patching.
+
+ One exception: Don't request or send patches to change the whole
+ source package to C89. I find C99 substantially nicer to write and
+ maintain. However, the public library headers must be in C89 to
+ avoid frustrating those who maintain programs, which are strictly
+ in C89 or C++.
+
+
+2. configure options
+--------------------
+
+ In most cases, the defaults are what you want. Many of the options
+ below are useful only when building a size-optimized version of
+ liblzma or command line tools.
+
+ --enable-encoders=LIST
+ --disable-encoders
+ Specify a comma-separated LIST of filter encoders to
+ build. See "./configure --help" for exact list of
+ available filter encoders. The default is to build all
+ supported encoders.
+
+ If LIST is empty or --disable-encoders is used, no filter
+ encoders will be built and also the code shared between
+ encoders will be omitted.
+
+ Disabling encoders will remove some symbols from the
+ liblzma ABI, so this option should be used only when it
+ is known to not cause problems.
+
+ --enable-decoders=LIST
+ --disable-decoders
+ This is like --enable-encoders but for decoders. The
+ default is to build all supported decoders.
+
+ --enable-match-finders=LIST
+ liblzma includes two categories of match finders:
+ hash chains and binary trees. Hash chains (hc3 and hc4)
+ are quite fast but they don't provide the best compression
+ ratio. Binary trees (bt2, bt3 and bt4) give excellent
+ compression ratio, but they are slower and need more
+ memory than hash chains.
+
+ You need to enable at least one match finder to build the
+ LZMA1 or LZMA2 filter encoders. Usually hash chains are
+ used only in the fast mode, while binary trees are used to
+ when the best compression ratio is wanted.
+
+ The default is to build all the match finders if LZMA1
+ or LZMA2 filter encoders are being built.
+
+ --enable-checks=LIST
+ liblzma support multiple integrity checks. CRC32 is
+ mandatory, and cannot be omitted. See "./configure --help"
+ for exact list of available integrity check types.
+
+ liblzma and the command line tools can decompress files
+ which use unsupported integrity check type, but naturally
+ the file integrity cannot be verified in that case.
+
+ Disabling integrity checks may remove some symbols from
+ the liblzma ABI, so this option should be used only when
+ it is known to not cause problems.
+
+ --enable-external-sha256
+ Try to use SHA-256 code from the operating system libc
+ or similar base system libraries. This doesn't try to
+ use OpenSSL or libgcrypt or such libraries.
+
+ The reasons to use this option:
+
+ - It makes liblzma slightly smaller.
+
+ - It might improve SHA-256 speed if the implementation
+ in the operating is very good (but see below).
+
+ External SHA-256 is disabled by default for two reasons:
+
+ - On some operating systems the symbol names of the
+ SHA-256 functions conflict with OpenSSL's libcrypto.
+ This causes weird problems such as decompression
+ errors if an application is linked against both
+ liblzma and libcrypto. This problem affects at least
+ FreeBSD 10 and older and MINIX 3.3.0 and older, but
+ other OSes that provide a function "SHA256_Init" might
+ also be affected. FreeBSD 11 has the problem fixed.
+ NetBSD had the problem but it was fixed it in 2009
+ already. OpenBSD uses "SHA256Init" and thus never had
+ a conflict with libcrypto.
+
+ - The SHA-256 code in liblzma is faster than the SHA-256
+ code provided by some operating systems. If you are
+ curious, build two copies of xz (internal and external
+ SHA-256) and compare the decompression (xz --test)
+ times:
+
+ dd if=/dev/zero bs=1024k count=1024 \
+ | xz -v -0 -Csha256 > foo.xz
+ time xz --test foo.xz
+
+ --disable-microlzma
+ Don't build MicroLZMA encoder and decoder. This omits
+ lzma_microlzma_encoder() and lzma_microlzma_decoder()
+ API functions from liblzma. These functions are needed
+ by specific applications only. They were written for
+ erofs-utils but they may be used by others too.
+
+ --disable-lzip-decoder
+ Disable decompression support for .lz (lzip) files.
+ This omits the API function lzma_lzip_decoder() from
+ liblzma and .lz support from the xz tool.
+
+ --disable-xz
+ --disable-xzdec
+ --disable-lzmadec
+ --disable-lzmainfo
+ Don't build and install the command line tool mentioned
+ in the option name.
+
+ NOTE: Disabling xz will skip some tests in "make check".
+
+ NOTE: If xzdec is disabled and lzmadec is left enabled,
+ a dangling man page symlink lzmadec.1 -> xzdec.1 is
+ created.
+
+ --disable-lzma-links
+ Don't create symlinks for LZMA Utils compatibility.
+ This includes lzma, unlzma, and lzcat. If scripts are
+ installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep,
+ lzmore, and lzless will be omitted if this option is used.
+
+ --disable-scripts
+ Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
+ and their symlinks.
+
+ --disable-doc
+ Don't install the documentation files to $docdir
+ (often /usr/doc/xz or /usr/local/doc/xz). Man pages
+ will still be installed. The $docdir can be changed
+ with --docdir=DIR.
+
+ --disable-assembler
+ liblzma includes some assembler optimizations. Currently
+ there is only assembler code for CRC32 and CRC64 for
+ 32-bit x86.
+
+ All the assembler code in liblzma is position-independent
+ code, which is suitable for use in shared libraries and
+ position-independent executables. So far only i386
+ instructions are used, but the code is optimized for i686
+ class CPUs. If you are compiling liblzma exclusively for
+ pre-i686 systems, you may want to disable the assembler
+ code.
+
+ --disable-clmul-crc
+ Disable the use carryless multiplication for CRC
+ calculation even if compiler support for it is detected.
+ The code uses runtime detection of SSSE3, SSE4.1, and
+ CLMUL instructions on x86. On 32-bit x86 this currently
+ is used only if --disable-assembler is used (this might
+ be fixed in the future). The code works on E2K too.
+
+ If using compiler options that unconditionally allow the
+ required extensions (-msse4.1 -mpclmul) then runtime
+ detection isn't used and the generic code is omitted.
+
+ --enable-unaligned-access
+ Allow liblzma to use unaligned memory access for 16-bit,
+ 32-bit, and 64-bit loads and stores. This should be
+ enabled only when the hardware supports this, that is,
+ when unaligned access is fast. Some operating system
+ kernels emulate unaligned access, which is extremely
+ slow. This option shouldn't be used on systems that
+ rely on such emulation.
+
+ Unaligned access is enabled by default on x86, x86-64,
+ big endian PowerPC, some ARM, and some ARM64 systems.
+
+ --enable-unsafe-type-punning
+ This enables use of code like
+
+ uint8_t *buf8 = ...;
+ *(uint32_t *)buf8 = ...;
+
+ which violates strict aliasing rules and may result
+ in broken code. There should be no need to use this
+ option with recent GCC or Clang versions on any
+ arch as just as fast code can be generated in a safe
+ way too (using __builtin_assume_aligned + memcpy).
+
+ However, this option might improve performance in some
+ other cases, especially with old compilers (for example,
+ GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7).
+
+ --enable-small
+ Reduce the size of liblzma by selecting smaller but
+ semantically equivalent version of some functions, and
+ omit precomputed lookup tables. This option tends to
+ make liblzma slightly slower.
+
+ Note that while omitting the precomputed tables makes
+ liblzma smaller on disk, the tables are still needed at
+ run time, and need to be computed at startup. This also
+ means that the RAM holding the tables won't be shared
+ between applications linked against shared liblzma.
+
+ This option doesn't modify CFLAGS to tell the compiler
+ to optimize for size. You need to add -Os or equivalent
+ flag(s) to CFLAGS manually.
+
+ --enable-assume-ram=SIZE
+ On the most common operating systems, XZ Utils is able to
+ detect the amount of physical memory on the system. This
+ information is used by the options --memlimit-compress,
+ --memlimit-decompress, and --memlimit when setting the
+ limit to a percentage of total RAM.
+
+ On some systems, there is no code to detect the amount of
+ RAM though. Using --enable-assume-ram one can set how much
+ memory to assume on these systems. SIZE is given as MiB.
+ The default is 128 MiB.
+
+ Feel free to send patches to add support for detecting
+ the amount of RAM on the operating system you use. See
+ src/common/tuklib_physmem.c for details.
+
+ --enable-threads=METHOD
+ Threading support is enabled by default so normally there
+ is no need to specify this option.
+
+ Supported values for METHOD:
+
+ yes Autodetect the threading method. If none
+ is found, configure will give an error.
+
+ posix Use POSIX pthreads. This is the default
+ except on Windows outside Cygwin.
+
+ win95 Use Windows 95 compatible threads. This
+ is compatible with Windows XP and later
+ too. This is the default for 32-bit x86
+ Windows builds. The `win95' threading is
+ incompatible with --enable-small.
+
+ vista Use Windows Vista compatible threads. The
+ resulting binaries won't run on Windows XP
+ or older. This is the default for Windows
+ excluding 32-bit x86 builds (that is, on
+ x86-64 the default is `vista').
+
+ no Disable threading support. This is the
+ same as using --disable-threads.
+ NOTE: If combined with --enable-small
+ and the compiler doesn't support
+ __attribute__((__constructor__)), the
+ resulting liblzma won't be thread safe,
+ that is, if a multi-threaded application
+ calls any liblzma functions from more than
+ one thread, something bad may happen.
+
+ --enable-sandbox=METHOD
+ There is limited sandboxing support in the xz tool. If
+ built with sandbox support, it's used automatically when
+ (de)compressing exactly one file to standard output and
+ the options --files or --files0 weren't used. This is a
+ common use case, for example, (de)compressing .tar.xz
+ files via GNU tar. The sandbox is also used for
+ single-file `xz --test' or `xz --list'.
+
+ Supported METHODs:
+
+ auto Look for a supported sandboxing method
+ and use it if found. If no method is
+ found, then sandboxing isn't used.
+ This is the default.
+
+ no Disable sandboxing support.
+
+ capsicum
+ Use Capsicum (FreeBSD >= 10) for
+ sandboxing. If no Capsicum support
+ is found, configure will give an error.
+
+ pledge Use pledge(2) (OpenBSD >= 5.9) for
+ sandboxing. If pledge(2) isn't found,
+ configure will give an error.
+
+ --enable-symbol-versions
+ Use symbol versioning for liblzma. This is enabled by
+ default on GNU/Linux, other GNU-based systems, and
+ FreeBSD.
+
+ --enable-debug
+ This enables the assert() macro and possibly some other
+ run-time consistency checks. It makes the code slower, so
+ you normally don't want to have this enabled.
+
+ --enable-werror
+ If building with GCC, make all compiler warnings an error,
+ that abort the compilation. This may help catching bugs,
+ and should work on most systems. This has no effect on the
+ resulting binaries.
+
+ --enable-path-for-scripts=PREFIX
+ If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
+ the beginning of the scripts (xzgrep and others).
+ The default is empty except on Solaris the default is
+ /usr/xpg4/bin.
+
+ This can be useful if the default PATH doesn't contain
+ modern POSIX tools (as can be the case on Solaris) or if
+ one wants to ensure that the correct xz binary is in the
+ PATH for the scripts. Note that the latter use can break
+ "make check" if the prefixed PATH causes a wrong xz binary
+ (other than the one that was just built) to be used.
+
+ Older xz releases support a different method for setting
+ the PATH for the scripts. It is described in section 3.2
+ and is supported in this xz version too.
+
+
+2.1. Static vs. dynamic linking of liblzma
+
+ On 32-bit x86, linking against static liblzma can give a minor
+ speed improvement. Static libraries on x86 are usually compiled as
+ position-dependent code (non-PIC) and shared libraries are built as
+ position-independent code (PIC). PIC wastes one register, which can
+ make the code slightly slower compared to a non-PIC version. (Note
+ that this doesn't apply to x86-64.)
+
+ If you want to link xz against static liblzma, the simplest way
+ is to pass --disable-shared to configure. If you want also shared
+ liblzma, run configure again and run "make install" only for
+ src/liblzma.
+
+
+2.2. Optimizing xzdec and lzmadec
+
+ xzdec and lzmadec are intended to be relatively small instead of
+ optimizing for the best speed. Thus, it is a good idea to build
+ xzdec and lzmadec separately:
+
+ - To link the tools against static liblzma, pass --disable-shared
+ to configure.
+
+ - To select somewhat size-optimized variant of some things in
+ liblzma, pass --enable-small to configure.
+
+ - Tell the compiler to optimize for size instead of speed.
+ For example, with GCC, put -Os into CFLAGS.
+
+ - xzdec and lzmadec will never use multithreading capabilities of
+ liblzma. You can avoid dependency on libpthread by passing
+ --disable-threads to configure.
+
+ - There are and will be no translated messages for xzdec and
+ lzmadec, so it is fine to pass also --disable-nls to configure.
+
+ - Only decoder code is needed, so you can speed up the build
+ slightly by passing --disable-encoders to configure. This
+ shouldn't affect the final size of the executables though,
+ because the linker is able to omit the encoder code anyway.
+
+ If you have no use for xzdec or lzmadec, you can disable them with
+ --disable-xzdec and --disable-lzmadec.
+
+
+3. xzgrep and other scripts
+---------------------------
+
+3.1. Dependencies
+
+ POSIX shell (sh) and bunch of other standard POSIX tools are required
+ to run the scripts. The configure script tries to find a POSIX
+ compliant sh, but if it fails, you can force the shell by passing
+ gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
+ script.
+
+ xzdiff (xzcmp/lzdiff/lzcmp) may use mktemp if it is available. As
+ a fallback xzdiff will use mkdir to securely create a temporary
+ directory. Having mktemp available is still recommended since the
+ mkdir fallback method isn't as robust as mktemp is. The original
+ mktemp can be found from <http://www.mktemp.org/>. On GNU, most will
+ use the mktemp program from GNU coreutils instead of the original
+ implementation. Both mktemp versions are fine.
+
+ In addition to using xz to decompress .xz files, xzgrep and xzdiff
+ use gzip, bzip2, and lzop to support .gz, bz2, and .lzo files.
+
+
+3.2. PATH
+
+ The method described below is supported by older xz releases.
+ It is supported by the current version too, but the newer
+ --enable-path-for-scripts=PREFIX described in section 2 may be
+ more convenient.
+
+ The scripts assume that the required tools (standard POSIX utilities,
+ mktemp, and xz) are in PATH; the scripts don't set the PATH themselves
+ (except as described for --enable-path-for-scripts=PREFIX). Some
+ people like this while some think this is a bug. Those in the latter
+ group can easily patch the scripts before running the configure script
+ by taking advantage of a placeholder line in the scripts.
+
+ For example, to make the scripts prefix /usr/bin:/bin to PATH:
+
+ perl -pi -e 's|^#SET_PATH.*$|PATH=/usr/bin:/bin:\$PATH|' \
+ src/scripts/xz*.in
+
+
+4. Troubleshooting
+------------------
+
+4.1. "No C99 compiler was found."
+
+ You need a C99 compiler to build XZ Utils. If the configure script
+ cannot find a C99 compiler and you think you have such a compiler
+ installed, set the compiler command by passing CC=/path/to/c99 as
+ an argument to the configure script.
+
+ If you get this error even when you think your compiler supports C99,
+ you can override the test by passing ac_cv_prog_cc_c99= as an argument
+ to the configure script. The test for C99 compiler is not perfect (and
+ it is not as easy to make it perfect as it sounds), so sometimes this
+ may be needed. You will get a compile error if your compiler doesn't
+ support enough C99.
+
+
+4.2. "No POSIX conforming shell (sh) was found."
+
+ xzgrep and other scripts need a shell that (roughly) conforms
+ to POSIX. The configure script tries to find such a shell. If
+ it fails, you can force the shell to be used by passing
+ gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
+ script. Alternatively you can omit the installation of scripts and
+ this error by passing --disable-scripts to configure.
+
+
+4.3. configure works but build fails at crc32_x86.S
+
+ The easy fix is to pass --disable-assembler to the configure script.
+
+ The configure script determines if assembler code can be used by
+ looking at the configure triplet; there is currently no check if
+ the assembler code can actually actually be built. The x86 assembler
+ code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW,
+ Cygwin, and DJGPP. On other x86 systems, there may be problems and
+ the assembler code may need to be disabled with the configure option.
+
+ If you get this error when building for x86-64, you have specified or
+ the configure script has misguessed your architecture. Pass the
+ correct configure triplet using the --build=CPU-COMPANY-SYSTEM option
+ (see INSTALL.generic).
+
+
+4.4. Lots of warnings about symbol visibility
+
+ On some systems where symbol visibility isn't supported, GCC may
+ still accept the visibility options and attributes, which will make
+ configure think that visibility is supported. This will result in
+ many compiler warnings. You can avoid the warnings by forcing the
+ visibility support off by passing gl_cv_cc_visibility=no as an
+ argument to the configure script. This has no effect on the
+ resulting binaries, but fewer warnings looks nicer and may allow
+ using --enable-werror.
+
+
+4.5. "make check" fails
+
+ If the other tests pass but test_scripts.sh fails, then the problem
+ is in the scripts in src/scripts. Comparing the contents of
+ tests/xzgrep_test_output to tests/xzgrep_expected_output might
+ give a good idea about problems in xzgrep. One possibility is that
+ some tools are missing from the current PATH or the tools lack
+ support for some POSIX features. This can happen at least on
+ Solaris where the tools in /bin may be ancient but good enough
+ tools are available in /usr/xpg4/bin or /usr/xpg6/bin. For possible
+ fixes, see --enable-path-for-scripts=PREFIX in section 2 and the
+ older alternative method described in section 3.2 of this file.
+
+ If tests other than test_scripts.sh fail, a likely reason is that
+ libtool links the test programs against an installed version of
+ liblzma instead of the version that was just built. This is
+ obviously a bug which seems to happen on some platforms.
+ A workaround is to uninstall the old liblzma versions first.
+
+ If the problem isn't any of those described above, then it's likely
+ a bug in XZ Utils or in the compiler. See the platform-specific
+ notes in this file for possible known problems. Please report
+ a bug if you cannot solve the problem. See README for contact
+ information.
+
+
+4.6. liblzma.so (or similar) not found when running xz
+
+ If you installed the package with "make install" and get an error
+ about liblzma.so (or a similarly named file) being missing, try
+ running "ldconfig" to update the run-time linker cache (if your
+ operating system has such a command).
+
diff --git a/INSTALL.generic b/INSTALL.generic
new file mode 100644
index 0000000..8865734
--- /dev/null
+++ b/INSTALL.generic
@@ -0,0 +1,368 @@
+Installation Instructions
+*************************
+
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the 'README' file for
+instructions specific to this package. Some packages provide this
+'INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The 'configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
+you can run in the future to recreate the current configuration, and a
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
+
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
+be considered for the next release. If you are using the cache, and at
+some point 'config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
+
+ Running 'configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type 'make' to compile the package.
+
+ 3. Optionally, type 'make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type 'make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the 'make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior 'make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type 'make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide 'make
+ distcheck', which can by used by developers to test that all other
+ targets like 'make install' and 'make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the 'configure' script does not know about. Run './configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU 'make'. 'cd' to the
+directory where you want the object files and executables to go and run
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
+
+ With a non-GNU 'make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use 'make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the 'lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to 'configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+'make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, 'make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, 'configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of 'make' will be. For these packages, running './configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with 'make V=1'; while running './configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with 'make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
+
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features 'configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, 'configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option '--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with '--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to 'configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the 'configure' command line, using 'VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified 'gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+'configure' Invocation
+======================
+
+ 'configure' recognizes the following options to control how it
+operates.
+
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
+
+'--help=short'
+'--help=recursive'
+ Print a summary of the options unique to this package's
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
+
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
+ script, and exit.
+
+'--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
+ disable caching.
+
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
+
+'--quiet'
+'--silent'
+'-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to '/dev/null' (any error
+ messages will still be shown).
+
+'--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ 'configure' can determine that directory automatically.
+
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
+
+'--no-create'
+'-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.