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