]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-directories.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-directories.m4
CommitLineData
ef416fc2 1dnl
fa73b229 2dnl "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $"
ef416fc2 3dnl
4dnl Directory stuff for the Common UNIX Printing System (CUPS).
5dnl
6dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
7dnl
8dnl These coded instructions, statements, and computer programs are the
9dnl property of Easy Software Products and are protected by Federal
10dnl copyright law. Distribution and use rights are outlined in the file
11dnl "LICENSE.txt" which should have been included with this file. If this
12dnl file is missing or damaged please contact Easy Software Products
13dnl at:
14dnl
15dnl Attn: CUPS Licensing Information
16dnl Easy Software Products
17dnl 44141 Airport View Drive, Suite 204
18dnl Hollywood, Maryland 20636 USA
19dnl
20dnl Voice: (301) 373-9600
21dnl EMail: cups-info@cups.org
22dnl WWW: http://www.cups.org
23dnl
24
25AC_PREFIX_DEFAULT(/)
26
27dnl Fix "prefix" variable if it hasn't been specified...
28if test "$prefix" = "NONE"; then
29 prefix="/"
30fi
31
32dnl Fix "exec_prefix" variable if it hasn't been specified...
33if test "$exec_prefix" = "NONE"; then
34 if test "$prefix" = "/"; then
35 exec_prefix="/usr"
36 else
37 exec_prefix="$prefix"
38 fi
39fi
40
41dnl Fix "bindir" variable...
42if test "$bindir" = "\${exec_prefix}/bin"; then
43 bindir="$exec_prefix/bin"
44fi
45
fa73b229 46AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir")
47
ef416fc2 48dnl Fix "sbindir" variable...
49if test "$sbindir" = "\${exec_prefix}/sbin"; then
50 sbindir="$exec_prefix/sbin"
51fi
52
fa73b229 53AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir")
54
ef416fc2 55dnl Fix "sharedstatedir" variable if it hasn't been specified...
56if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
57 sharedstatedir="/usr/com"
58fi
59
60dnl Fix "datadir" variable if it hasn't been specified...
61if test "$datadir" = "\${prefix}/share"; then
62 if test "$prefix" = "/"; then
63 datadir="/usr/share"
64 else
65 datadir="$prefix/share"
66 fi
67fi
68
69dnl Fix "includedir" variable if it hasn't been specified...
70if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
71 includedir="/usr/include"
72fi
73
74dnl Fix "localstatedir" variable if it hasn't been specified...
75if 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
85fi
86
87dnl Fix "sysconfdir" variable if it hasn't been specified...
88if 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
98fi
99
100dnl Fix "libdir" variable for IRIX 6.x...
101if 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
107fi
108
109dnl Setup init.d locations...
110AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
111
112if 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
167else
168 INITDIR=""
169 INITDDIR="$rcdir"
170fi
171
172AC_SUBST(INITDIR)
173AC_SUBST(INITDDIR)
174
175dnl Setup default locations...
176# Cache data...
177AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
178
179if test x$cachedir = x; then
180 CUPS_CACHEDIR="$localstatedir/cache/cups"
181else
182 CUPS_CACHEDIR="$cachedir"
183fi
184AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR")
185AC_SUBST(CUPS_CACHEDIR)
186
187# Data files
188CUPS_DATADIR="$datadir/cups"
189AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
190AC_SUBST(CUPS_DATADIR)
191
192# Documentation files
193AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
194
195if test x$docdir = x; then
196 CUPS_DOCROOT="$datadir/doc/cups"
197 docdir="$datadir/doc/cups"
198else
199 CUPS_DOCROOT="$docdir"
200fi
201
202AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
203AC_SUBST(CUPS_DOCROOT)
204
205# Fonts
206AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
207
208if test "x$fontpath" = "x"; then
209 CUPS_FONTPATH="$datadir/cups/fonts"
210else
211 CUPS_FONTPATH="$fontpath"
212fi
213
214AC_SUBST(CUPS_FONTPATH)
215AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
216
217# Locale data
218case "$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 ;;
231esac
232
233AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
234AC_SUBST(CUPS_LOCALEDIR)
235
236# Log files...
237AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
238
239if test x$logdir = x; then
240 CUPS_LOGDIR="$localstatedir/log/cups"
241 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
242else
243 CUPS_LOGDIR="$logdir"
244fi
245AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
246AC_SUBST(CUPS_LOGDIR)
247
248# Longer-term spool data
249CUPS_REQUESTS="$localstatedir/spool/cups"
250AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
251AC_SUBST(CUPS_REQUESTS)
252
253# Server executables...
254case "$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 ;;
265esac
266
267AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
268AC_SUBST(CUPS_SERVERBIN)
269AC_SUBST(INSTALL_SYSV)
270
271# Configuration files
272CUPS_SERVERROOT="$sysconfdir/cups"
273AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
274AC_SUBST(CUPS_SERVERROOT)
275
276# Transient run-time state
277CUPS_STATEDIR="$localstatedir/run/cups"
278AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
279AC_SUBST(CUPS_STATEDIR)
280
281dnl
fa73b229 282dnl End of "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $".
ef416fc2 283dnl