]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | dnl |
a74454a7 | 2 | dnl "$Id: cups-directories.m4 5466 2006-04-26 19:52:27Z mike $" |
ef416fc2 | 3 | dnl |
4 | dnl Directory stuff for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
e1d6a774 | 6 | dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 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 | |
e1d6a774 | 102 | if test "$uname" = "IRIX"; then |
ef416fc2 | 103 | libdir="$exec_prefix/lib32" |
104 | else | |
e1d6a774 | 105 | if test "$uname" = Linux -a -d /usr/lib64; then |
106 | libdir="$exec_prefix/lib64" | |
107 | else | |
108 | libdir="$exec_prefix/lib" | |
109 | fi | |
ef416fc2 | 110 | fi |
111 | fi | |
112 | ||
113 | dnl Setup init.d locations... | |
114 | AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="") | |
115 | ||
116 | if test x$rcdir = x; then | |
117 | case "$uname" in | |
118 | FreeBSD* | OpenBSD*) | |
119 | # FreeBSD and OpenBSD | |
120 | INITDIR="" | |
121 | INITDDIR="" | |
122 | ;; | |
123 | ||
124 | NetBSD*) | |
125 | # NetBSD | |
126 | INITDIR="" | |
127 | INITDDIR="/etc/rc.d" | |
128 | ;; | |
129 | ||
130 | Darwin*) | |
131 | # Darwin and MacOS X... | |
132 | INITDIR="" | |
a4d04587 | 133 | AC_CHECK_PROG(INITDDIR, launchd, |
134 | "/System/Library/LaunchDaemons", | |
135 | "/System/Library/StartupItems/PrintingServices") | |
ef416fc2 | 136 | ;; |
137 | ||
138 | Linux | GNU) | |
139 | # Linux/HURD seems to choose an init.d directory at random... | |
140 | if test -d /sbin/init.d; then | |
141 | # SuSE | |
142 | INITDIR="/sbin/init.d" | |
143 | INITDDIR=".." | |
144 | else | |
145 | if test -d /etc/init.d; then | |
146 | # Others | |
147 | INITDIR="/etc" | |
148 | INITDDIR="../init.d" | |
149 | else | |
150 | # RedHat | |
151 | INITDIR="/etc/rc.d" | |
152 | INITDDIR="../init.d" | |
153 | fi | |
154 | fi | |
155 | ;; | |
156 | ||
157 | OSF1* | HP-UX*) | |
158 | INITDIR="/sbin" | |
159 | INITDDIR="../init.d" | |
160 | ;; | |
161 | ||
162 | AIX*) | |
163 | INITDIR="/etc/rc.d" | |
164 | INITDDIR=".." | |
165 | ;; | |
166 | ||
167 | *) | |
168 | INITDIR="/etc" | |
169 | INITDDIR="../init.d" | |
170 | ;; | |
171 | ||
172 | esac | |
173 | else | |
174 | INITDIR="" | |
175 | INITDDIR="$rcdir" | |
176 | fi | |
177 | ||
178 | AC_SUBST(INITDIR) | |
179 | AC_SUBST(INITDDIR) | |
180 | ||
e1d6a774 | 181 | dnl Xinetd support... |
182 | XINETD="" | |
183 | for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do | |
184 | if test -d $dir; then | |
185 | XINETD="$dir" | |
186 | break | |
187 | fi | |
188 | done | |
189 | ||
190 | AC_SUBST(XINETD) | |
191 | ||
ef416fc2 | 192 | dnl Setup default locations... |
193 | # Cache data... | |
194 | AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="") | |
195 | ||
196 | if test x$cachedir = x; then | |
a4d04587 | 197 | if test "x$uname" = xDarwin; then |
198 | CUPS_CACHEDIR="$localstatedir/tmp/cups" | |
199 | else | |
200 | CUPS_CACHEDIR="$localstatedir/cache/cups" | |
201 | fi | |
ef416fc2 | 202 | else |
203 | CUPS_CACHEDIR="$cachedir" | |
204 | fi | |
205 | AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR") | |
206 | AC_SUBST(CUPS_CACHEDIR) | |
207 | ||
208 | # Data files | |
209 | CUPS_DATADIR="$datadir/cups" | |
210 | AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups") | |
211 | AC_SUBST(CUPS_DATADIR) | |
212 | ||
213 | # Documentation files | |
214 | AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="") | |
215 | ||
216 | if test x$docdir = x; then | |
217 | CUPS_DOCROOT="$datadir/doc/cups" | |
218 | docdir="$datadir/doc/cups" | |
219 | else | |
220 | CUPS_DOCROOT="$docdir" | |
221 | fi | |
222 | ||
223 | AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir") | |
224 | AC_SUBST(CUPS_DOCROOT) | |
225 | ||
226 | # Fonts | |
227 | AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="") | |
228 | ||
229 | if test "x$fontpath" = "x"; then | |
230 | CUPS_FONTPATH="$datadir/cups/fonts" | |
231 | else | |
232 | CUPS_FONTPATH="$fontpath" | |
233 | fi | |
234 | ||
235 | AC_SUBST(CUPS_FONTPATH) | |
236 | AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH") | |
237 | ||
238 | # Locale data | |
239 | case "$uname" in | |
240 | Linux | GNU | *BSD* | Darwin*) | |
241 | CUPS_LOCALEDIR="$datadir/locale" | |
242 | ;; | |
243 | ||
244 | OSF1* | AIX*) | |
245 | CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg" | |
246 | ;; | |
247 | ||
248 | *) | |
249 | # This is the standard System V location... | |
250 | CUPS_LOCALEDIR="$exec_prefix/lib/locale" | |
251 | ;; | |
252 | esac | |
253 | ||
254 | AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR") | |
255 | AC_SUBST(CUPS_LOCALEDIR) | |
256 | ||
257 | # Log files... | |
258 | AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="") | |
259 | ||
260 | if test x$logdir = x; then | |
261 | CUPS_LOGDIR="$localstatedir/log/cups" | |
262 | AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups") | |
263 | else | |
264 | CUPS_LOGDIR="$logdir" | |
265 | fi | |
266 | AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR") | |
267 | AC_SUBST(CUPS_LOGDIR) | |
268 | ||
269 | # Longer-term spool data | |
270 | CUPS_REQUESTS="$localstatedir/spool/cups" | |
271 | AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups") | |
272 | AC_SUBST(CUPS_REQUESTS) | |
273 | ||
274 | # Server executables... | |
275 | case "$uname" in | |
276 | *BSD* | Darwin*) | |
277 | # *BSD and Darwin (MacOS X) | |
278 | INSTALL_SYSV="" | |
279 | CUPS_SERVERBIN="$exec_prefix/libexec/cups" | |
280 | ;; | |
281 | *) | |
282 | # All others | |
283 | INSTALL_SYSV="install-sysv" | |
e1d6a774 | 284 | CUPS_SERVERBIN="$exec_prefix/lib/cups" |
ef416fc2 | 285 | ;; |
286 | esac | |
287 | ||
288 | AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN") | |
289 | AC_SUBST(CUPS_SERVERBIN) | |
290 | AC_SUBST(INSTALL_SYSV) | |
291 | ||
292 | # Configuration files | |
293 | CUPS_SERVERROOT="$sysconfdir/cups" | |
294 | AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups") | |
295 | AC_SUBST(CUPS_SERVERROOT) | |
296 | ||
297 | # Transient run-time state | |
298 | CUPS_STATEDIR="$localstatedir/run/cups" | |
299 | AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups") | |
300 | AC_SUBST(CUPS_STATEDIR) | |
301 | ||
302 | dnl | |
a74454a7 | 303 | dnl End of "$Id: cups-directories.m4 5466 2006-04-26 19:52:27Z mike $". |
ef416fc2 | 304 | dnl |