]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | dnl |
fa73b229 | 2 | dnl "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $" |
ef416fc2 | 3 | dnl |
4 | dnl Directory stuff for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
6 | dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. | |
7 | dnl | |
8 | dnl These coded instructions, statements, and computer programs are the | |
9 | dnl property of Easy Software Products and are protected by Federal | |
10 | dnl copyright law. Distribution and use rights are outlined in the file | |
11 | dnl "LICENSE.txt" which should have been included with this file. If this | |
12 | dnl file is missing or damaged please contact Easy Software Products | |
13 | dnl at: | |
14 | dnl | |
15 | dnl Attn: CUPS Licensing Information | |
16 | dnl Easy Software Products | |
17 | dnl 44141 Airport View Drive, Suite 204 | |
18 | dnl Hollywood, Maryland 20636 USA | |
19 | dnl | |
20 | dnl Voice: (301) 373-9600 | |
21 | dnl EMail: cups-info@cups.org | |
22 | dnl WWW: http://www.cups.org | |
23 | dnl | |
24 | ||
25 | AC_PREFIX_DEFAULT(/) | |
26 | ||
27 | dnl Fix "prefix" variable if it hasn't been specified... | |
28 | if test "$prefix" = "NONE"; then | |
29 | prefix="/" | |
30 | fi | |
31 | ||
32 | dnl Fix "exec_prefix" variable if it hasn't been specified... | |
33 | if test "$exec_prefix" = "NONE"; then | |
34 | if test "$prefix" = "/"; then | |
35 | exec_prefix="/usr" | |
36 | else | |
37 | exec_prefix="$prefix" | |
38 | fi | |
39 | fi | |
40 | ||
41 | dnl Fix "bindir" variable... | |
42 | if test "$bindir" = "\${exec_prefix}/bin"; then | |
43 | bindir="$exec_prefix/bin" | |
44 | fi | |
45 | ||
fa73b229 | 46 | AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir") |
47 | ||
ef416fc2 | 48 | dnl Fix "sbindir" variable... |
49 | if test "$sbindir" = "\${exec_prefix}/sbin"; then | |
50 | sbindir="$exec_prefix/sbin" | |
51 | fi | |
52 | ||
fa73b229 | 53 | AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir") |
54 | ||
ef416fc2 | 55 | dnl Fix "sharedstatedir" variable if it hasn't been specified... |
56 | if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then | |
57 | sharedstatedir="/usr/com" | |
58 | fi | |
59 | ||
60 | dnl Fix "datadir" variable if it hasn't been specified... | |
61 | if test "$datadir" = "\${prefix}/share"; then | |
62 | if test "$prefix" = "/"; then | |
63 | datadir="/usr/share" | |
64 | else | |
65 | datadir="$prefix/share" | |
66 | fi | |
67 | fi | |
68 | ||
69 | dnl Fix "includedir" variable if it hasn't been specified... | |
70 | if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then | |
71 | includedir="/usr/include" | |
72 | fi | |
73 | ||
74 | dnl Fix "localstatedir" variable if it hasn't been specified... | |
75 | if test "$localstatedir" = "\${prefix}/var"; then | |
76 | if test "$prefix" = "/"; then | |
77 | if test "$uname" = Darwin; then | |
78 | localstatedir="/private/var" | |
79 | else | |
80 | localstatedir="/var" | |
81 | fi | |
82 | else | |
83 | localstatedir="$prefix/var" | |
84 | fi | |
85 | fi | |
86 | ||
87 | dnl Fix "sysconfdir" variable if it hasn't been specified... | |
88 | if test "$sysconfdir" = "\${prefix}/etc"; then | |
89 | if test "$prefix" = "/"; then | |
90 | if test "$uname" = Darwin; then | |
91 | sysconfdir="/private/etc" | |
92 | else | |
93 | sysconfdir="/etc" | |
94 | fi | |
95 | else | |
96 | sysconfdir="$prefix/etc" | |
97 | fi | |
98 | fi | |
99 | ||
100 | dnl Fix "libdir" variable for IRIX 6.x... | |
101 | if test "$libdir" = "\${exec_prefix}/lib"; then | |
102 | if test "$uname" = "IRIX" -a $uversion -ge 62; then | |
103 | libdir="$exec_prefix/lib32" | |
104 | else | |
105 | libdir="$exec_prefix/lib" | |
106 | fi | |
107 | fi | |
108 | ||
109 | dnl Setup init.d locations... | |
110 | AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="") | |
111 | ||
112 | if test x$rcdir = x; then | |
113 | case "$uname" in | |
114 | FreeBSD* | OpenBSD*) | |
115 | # FreeBSD and OpenBSD | |
116 | INITDIR="" | |
117 | INITDDIR="" | |
118 | ;; | |
119 | ||
120 | NetBSD*) | |
121 | # NetBSD | |
122 | INITDIR="" | |
123 | INITDDIR="/etc/rc.d" | |
124 | ;; | |
125 | ||
126 | Darwin*) | |
127 | # Darwin and MacOS X... | |
128 | INITDIR="" | |
129 | INITDDIR="/System/Library/StartupItems/PrintingServices" | |
130 | ;; | |
131 | ||
132 | Linux | GNU) | |
133 | # Linux/HURD seems to choose an init.d directory at random... | |
134 | if test -d /sbin/init.d; then | |
135 | # SuSE | |
136 | INITDIR="/sbin/init.d" | |
137 | INITDDIR=".." | |
138 | else | |
139 | if test -d /etc/init.d; then | |
140 | # Others | |
141 | INITDIR="/etc" | |
142 | INITDDIR="../init.d" | |
143 | else | |
144 | # RedHat | |
145 | INITDIR="/etc/rc.d" | |
146 | INITDDIR="../init.d" | |
147 | fi | |
148 | fi | |
149 | ;; | |
150 | ||
151 | OSF1* | HP-UX*) | |
152 | INITDIR="/sbin" | |
153 | INITDDIR="../init.d" | |
154 | ;; | |
155 | ||
156 | AIX*) | |
157 | INITDIR="/etc/rc.d" | |
158 | INITDDIR=".." | |
159 | ;; | |
160 | ||
161 | *) | |
162 | INITDIR="/etc" | |
163 | INITDDIR="../init.d" | |
164 | ;; | |
165 | ||
166 | esac | |
167 | else | |
168 | INITDIR="" | |
169 | INITDDIR="$rcdir" | |
170 | fi | |
171 | ||
172 | AC_SUBST(INITDIR) | |
173 | AC_SUBST(INITDDIR) | |
174 | ||
175 | dnl Setup default locations... | |
176 | # Cache data... | |
177 | AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="") | |
178 | ||
179 | if test x$cachedir = x; then | |
180 | CUPS_CACHEDIR="$localstatedir/cache/cups" | |
181 | else | |
182 | CUPS_CACHEDIR="$cachedir" | |
183 | fi | |
184 | AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR") | |
185 | AC_SUBST(CUPS_CACHEDIR) | |
186 | ||
187 | # Data files | |
188 | CUPS_DATADIR="$datadir/cups" | |
189 | AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups") | |
190 | AC_SUBST(CUPS_DATADIR) | |
191 | ||
192 | # Documentation files | |
193 | AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="") | |
194 | ||
195 | if test x$docdir = x; then | |
196 | CUPS_DOCROOT="$datadir/doc/cups" | |
197 | docdir="$datadir/doc/cups" | |
198 | else | |
199 | CUPS_DOCROOT="$docdir" | |
200 | fi | |
201 | ||
202 | AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir") | |
203 | AC_SUBST(CUPS_DOCROOT) | |
204 | ||
205 | # Fonts | |
206 | AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="") | |
207 | ||
208 | if test "x$fontpath" = "x"; then | |
209 | CUPS_FONTPATH="$datadir/cups/fonts" | |
210 | else | |
211 | CUPS_FONTPATH="$fontpath" | |
212 | fi | |
213 | ||
214 | AC_SUBST(CUPS_FONTPATH) | |
215 | AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH") | |
216 | ||
217 | # Locale data | |
218 | case "$uname" in | |
219 | Linux | GNU | *BSD* | Darwin*) | |
220 | CUPS_LOCALEDIR="$datadir/locale" | |
221 | ;; | |
222 | ||
223 | OSF1* | AIX*) | |
224 | CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg" | |
225 | ;; | |
226 | ||
227 | *) | |
228 | # This is the standard System V location... | |
229 | CUPS_LOCALEDIR="$exec_prefix/lib/locale" | |
230 | ;; | |
231 | esac | |
232 | ||
233 | AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR") | |
234 | AC_SUBST(CUPS_LOCALEDIR) | |
235 | ||
236 | # Log files... | |
237 | AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="") | |
238 | ||
239 | if test x$logdir = x; then | |
240 | CUPS_LOGDIR="$localstatedir/log/cups" | |
241 | AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups") | |
242 | else | |
243 | CUPS_LOGDIR="$logdir" | |
244 | fi | |
245 | AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR") | |
246 | AC_SUBST(CUPS_LOGDIR) | |
247 | ||
248 | # Longer-term spool data | |
249 | CUPS_REQUESTS="$localstatedir/spool/cups" | |
250 | AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups") | |
251 | AC_SUBST(CUPS_REQUESTS) | |
252 | ||
253 | # Server executables... | |
254 | case "$uname" in | |
255 | *BSD* | Darwin*) | |
256 | # *BSD and Darwin (MacOS X) | |
257 | INSTALL_SYSV="" | |
258 | CUPS_SERVERBIN="$exec_prefix/libexec/cups" | |
259 | ;; | |
260 | *) | |
261 | # All others | |
262 | INSTALL_SYSV="install-sysv" | |
263 | CUPS_SERVERBIN="$libdir/cups" | |
264 | ;; | |
265 | esac | |
266 | ||
267 | AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN") | |
268 | AC_SUBST(CUPS_SERVERBIN) | |
269 | AC_SUBST(INSTALL_SYSV) | |
270 | ||
271 | # Configuration files | |
272 | CUPS_SERVERROOT="$sysconfdir/cups" | |
273 | AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups") | |
274 | AC_SUBST(CUPS_SERVERROOT) | |
275 | ||
276 | # Transient run-time state | |
277 | CUPS_STATEDIR="$localstatedir/run/cups" | |
278 | AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups") | |
279 | AC_SUBST(CUPS_STATEDIR) | |
280 | ||
281 | dnl | |
fa73b229 | 282 | dnl End of "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $". |
ef416fc2 | 283 | dnl |