]> git.ipfire.org Git - thirdparty/cups.git/blame - INSTALL.txt
Import CUPS v2.0.3
[thirdparty/cups.git] / INSTALL.txt
CommitLineData
a215cf84 1INSTALL - CUPS v2.0.3 - 2015-06-08
b9367124 2----------------------------------
ef416fc2 3
557dde9f
MS
4This file describes how to compile and install CUPS from source code. For more
5information on CUPS see the file called "README.txt". A complete change log can
6be found in "CHANGES.txt".
ef416fc2 7
0cb67df3
MS
8*******************************************************************************
9*******************************************************************************
10**** ****
11**** USING CUPS REQUIRES ADDITIONAL THIRD-PARTY SUPPORT SOFTWARE AND ****
12**** PRINTER DRIVERS. THESE ARE TYPICALLY INCLUDED WITH YOUR OPERATING ****
13**** SYSTEM DISTRIBUTION. APPLE DOES NOT ENDORSE OR SUPPORT THIRD-PARTY ****
14**** SUPPORT SOFTWARE FOR CUPS. ****
15**** ****
16*******************************************************************************
17*******************************************************************************
ef416fc2 18
19
20BEFORE YOU BEGIN
21
557dde9f
MS
22 You'll need ANSI-compliant C and C++ compilers, plus a make program and
23 POSIX-compliant shell (/bin/sh). The GNU compiler tools and Bash work well
24 and we have tested the current CUPS code against several versions of GCC
25 with excellent results.
ef416fc2 26
557dde9f
MS
27 The makefiles used by the project should work with most versions of make.
28 We've tested them with GNU make as well as the make programs shipped by
29 Compaq, HP, SGI, and Sun. BSD users should use GNU make (gmake) since BSD
30 make does not support "include".
ef416fc2 31
6961465f
MS
32 Besides these tools you'll want ZLIB library for compression support, the
33 CDSA, GNU TLS, or OpenSSL libraries for encryption support, and either MIT
34 (1.6.3 or higher) or Heimdal Kerberos for Kerberos support. CUPS will
35 compile and run without these, however you'll miss out on many of the
36 features provided by CUPS.
37
38 Also, please note that CUPS does not include print filters to support PDF
39 or raster printing. You *must* download GPL Ghostscript and/or the Open
40 Printing CUPS filters package separately to print on operating systems
41 other than OS X.
7ff4fea9 42
ef416fc2 43
557dde9f 44COMPILING THE SUBVERSION REPOSITORY CODE
ef416fc2 45
557dde9f
MS
46 The CUPS Subversion repository doesn't hold a copy of the pre-built
47 configure script. You'll need to run the GNU autoconf software (2.60 or
48 higher) to create it:
ef416fc2 49
4e6f60f0 50 autoconf
ef416fc2 51
52
53CONFIGURATION
54
557dde9f
MS
55 CUPS uses GNU autoconf, so you should find the usual "configure" script in
56 the main CUPS source directory. To configure CUPS for your system, type:
ef416fc2 57
4744bd90 58 ./configure
ef416fc2 59
557dde9f
MS
60 The default installation will put the CUPS software in the "/etc", "/usr",
61 and "/var" directories on your system, which will overwrite any existing
62 printing commands on your system. Use the "--prefix" option to install the
63 CUPS software in another location:
ef416fc2 64
4744bd90 65 ./configure --prefix=/some/directory
ef416fc2 66
557dde9f 67 To see a complete list of configuration options, use the --help option:
ef416fc2 68
4744bd90 69 ./configure --help
ef416fc2 70
557dde9f
MS
71 If any of the dependent libraries are not installed in a system default
72 location (typically "/usr/include" and "/usr/lib") you'll need to set the
73 CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables
74 prior to running configure:
ef416fc2 75
4744bd90 76 setenv CFLAGS "-I/some/directory"
77 setenv CPPFLAGS "-I/some/directory"
78 setenv CXXFLAGS "-I/some/directory"
79 setenv DSOFLAGS "-L/some/directory"
80 setenv LDFLAGS "-L/some/directory"
81 ./configure ...
ef416fc2 82
4744bd90 83 or:
ef416fc2 84
4744bd90 85 CFLAGS="-I/some/directory" \
86 CPPFLAGS="-I/some/directory" \
87 CXXFLAGS="-I/some/directory" \
88 DSOFLAGS="-L/some/directory" \
89 LDFLAGS="-L/some/directory" \
90 ./configure ...
ef416fc2 91
557dde9f
MS
92 The "--enable-debug" option compiles CUPS with debugging information
93 enabled. Additional debug logging support can be enabled using the
94 "--enable-debug-printfs" option - these debug messages are enabled using the
95 CUPS_DEBUG_LOG environment variable at run-time.
96
97 CUPS also includes an extensive set of unit tests that can be used to find
98 and diagnose a variety of common problems - use the "--enable-unit-tests"
99 configure option to run them at build time.
634763e8 100
b9367124
MS
101 On OS X, use the "--with-archflags" option to build with the correct set of
102 architectures:
103
104 ./configure --with-archflags="-arch i386 -arch x86_64" ...
105
4744bd90 106 Once you have configured things, just type:
ef416fc2 107
4744bd90 108 make ENTER
ef416fc2 109
4744bd90 110 or if you have FreeBSD, NetBSD, or OpenBSD type:
ef416fc2 111
4744bd90 112 gmake ENTER
ef416fc2 113
4744bd90 114 to build the software.
ef416fc2 115
116
557dde9f
MS
117TESTING THE SOFTWARE
118
119 Aside from the built-in unit tests, CUPS includes an automated test
120 framework for testing the entire printing system. To run the tests, just
121 type:
122
123 make check ENTER
124
125 or if you have FreeBSD, NetBSD, or OpenBSD type:
126
127 gmake check ENTER
128
129 The test framework runs a copy of the CUPS scheduler (cupsd) on port 8631
130 in /tmp/cups-$USER and produces a nice HTML report of the results.
131
132
ef416fc2 133INSTALLING THE SOFTWARE
134
557dde9f
MS
135 Once you have built the software you need to install it. The "install"
136 target provides a quick way to install the software on your local system:
ef416fc2 137
4744bd90 138 make install ENTER
ef416fc2 139
4744bd90 140 or for FreeBSD, NetBSD, or OpenBSD:
ef416fc2 141
4744bd90 142 gmake install ENTER
ef416fc2 143
4ef75dec
MS
144 Use the BUILDROOT variable to install to an alternate root directory:
145
146 make BUILDROOT=/some/other/root/directory install ENTER
147
557dde9f
MS
148 You can also build binary packages that can be installed on other machines
149 using the RPM spec file ("packaging/cups.spec") or EPM list file
150 ("packaging/cups.list"). The latter also supports building of binary RPMs,
151 so it may be more convenient to use.
ef416fc2 152
4744bd90 153 You can find the RPM software at:
ef416fc2 154
4744bd90 155 http://www.rpm.org/
ef416fc2 156
4744bd90 157 The EPM software is available at:
ef416fc2 158
9520743f 159 http://www.msweet.org/
ef416fc2 160
161
162CREATING BINARY DISTRIBUTIONS WITH EPM
163
4744bd90 164 The top level makefile supports generation of many types of binary
165 distributions using EPM. To build a binary distribution type:
ef416fc2 166
4744bd90 167 make <format> ENTER
ef416fc2 168
4744bd90 169 or
ef416fc2 170
4744bd90 171 gmake <format> ENTER
ef416fc2 172
557dde9f
MS
173 for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of the
174 following:
ef416fc2 175
4744bd90 176 epm - Builds a script + tarfile package
4744bd90 177 bsd - Builds a *BSD package
178 deb - Builds a Debian package
4744bd90 179 pkg - Builds a Solaris package
180 rpm - Builds a RPM package
4744bd90 181 slackware - Build a Slackware package
ef416fc2 182
183
634763e8
MS
184GETTING DEBUG LOGGING FROM CUPS
185
557dde9f
MS
186 When configured with the "--enable-debug-printfs" option, CUPS compiles in
187 additional debug logging support in the scheduler, CUPS API, and CUPS
e07d4801
MS
188 Imaging API. The following environment variables are used to enable and
189 control debug logging:
190
191 CUPS_DEBUG_FILTER Specifies a POSIX regular expression to control
192 which messages are logged.
193 CUPS_DEBUG_LEVEL Specifies a number from 0 to 9 to control the
194 verbosity of the logging. The default level is 1.
f11a948a
MS
195 CUPS_DEBUG_LOG Specifies a log file to use. Specify the name "-"
196 to send the messages to stderr. Prefix a filename
197 with "+" to append to an existing file.
634763e8
MS
198
199
ef416fc2 200REPORTING PROBLEMS
201
557dde9f 202 If you have problems, READ THE DOCUMENTATION FIRST! If the documentation
9520743f 203 does not solve your problems, please post a message on the users forum at:
4744bd90 204
9520743f 205 http://www.cups.org/
4744bd90 206
557dde9f
MS
207 Include your operating system and version, compiler and version, and any
208 errors or problems you've run into. The "config.log" file and the output
209 from the configure script and make should also be sent, as it often helps to
210 determine the cause of your problem.
4744bd90 211
557dde9f
MS
212 If you are running a version of Linux, be sure to provide the Linux
213 distribution you have, too.