summaryrefslogtreecommitdiffstats
path: root/INSTALL
blob: b40559884087435dd1f91feedef9c8e942e5bfe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Requirements
------------
You will need a C99 compiler. (gcc 3.3.6 or newer is recommended).
I use gcc 6.1.0 and 3.3.6, but the code should compile with any standards
compliant compiler.
Gcc is available at http://gcc.gnu.org.

The operating system must allow signal handlers read access to objects with
static storage duration so that the cleanup handler for Control-C can delete
the partial output file.


Procedure
---------
1. Unpack the archive if you have not done so already:

	tar -xf clzip[version].tar.lz
or
	lzip -cd clzip[version].tar.lz | tar -xf -

This creates the directory ./clzip[version] containing the source code
extracted from the archive.

2. Change to clzip directory and run configure.
   (Try 'configure --help' for usage instructions).

	cd clzip[version]
	./configure

   If you choose a C standard, enable the POSIX features explicitly:

	./configure CFLAGS+='--std=c99 -D_XOPEN_SOURCE=500'

   If you are compiling on MinGW, use:

	./configure CFLAGS+='-D __USE_MINGW_ANSI_STDIO'

3. Run make.

	make

4. Optionally, type 'make check' to run the tests that come with clzip.

5. Type 'make install' to install the program and any data files and
   documentation. You need root privileges to install into a prefix owned
   by root.

   Or type 'make install-compress', which additionally compresses the
   info manual and the man page after installation.
   (Installing compressed docs may become the default in the future).

   You can install only the program, the info manual, or the man page by
   typing 'make install-bin', 'make install-info', or 'make install-man'
   respectively.

   Instead of 'make install', you can type 'make install-as-lzip' to
   install the program and any data files and documentation, and link
   the program to the name 'lzip'.


Another way
-----------
You can also compile clzip into a separate directory.
To do this, you must use a version of 'make' that supports the variable
'VPATH', such as 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 '.', in '..', and
in the directory that 'configure' is in.

'configure' recognizes the option '--srcdir=DIR' to control where to look
for the source code. Usually 'configure' can determine that directory
automatically.

After running 'configure', you can run 'make' and 'make install' as
explained above.


Copyright (C) 2010-2024 Antonio Diaz Diaz.

This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.