]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-directories.m4
To prepare to load cups into easysw/current, perform 4 renames.
[thirdparty/cups.git] / config-scripts / cups-directories.m4
CommitLineData
ef416fc2 1dnl
2dnl "$Id: cups-directories.m4 4873 2005-12-07 01:46:54Z mike $"
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
46dnl Fix "sbindir" variable...
47if test "$sbindir" = "\${exec_prefix}/sbin"; then
48 sbindir="$exec_prefix/sbin"
49fi
50
51dnl Fix "sharedstatedir" variable if it hasn't been specified...
52if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
53 sharedstatedir="/usr/com"
54fi
55
56dnl Fix "datadir" variable if it hasn't been specified...
57if test "$datadir" = "\${prefix}/share"; then
58 if test "$prefix" = "/"; then
59 datadir="/usr/share"
60 else
61 datadir="$prefix/share"
62 fi
63fi
64
65dnl Fix "includedir" variable if it hasn't been specified...
66if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
67 includedir="/usr/include"
68fi
69
70dnl Fix "localstatedir" variable if it hasn't been specified...
71if test "$localstatedir" = "\${prefix}/var"; then
72 if test "$prefix" = "/"; then
73 if test "$uname" = Darwin; then
74 localstatedir="/private/var"
75 else
76 localstatedir="/var"
77 fi
78 else
79 localstatedir="$prefix/var"
80 fi
81fi
82
83dnl Fix "sysconfdir" variable if it hasn't been specified...
84if test "$sysconfdir" = "\${prefix}/etc"; then
85 if test "$prefix" = "/"; then
86 if test "$uname" = Darwin; then
87 sysconfdir="/private/etc"
88 else
89 sysconfdir="/etc"
90 fi
91 else
92 sysconfdir="$prefix/etc"
93 fi
94fi
95
96dnl Fix "libdir" variable for IRIX 6.x...
97if test "$libdir" = "\${exec_prefix}/lib"; then
98 if test "$uname" = "IRIX" -a $uversion -ge 62; then
99 libdir="$exec_prefix/lib32"
100 else
101 libdir="$exec_prefix/lib"
102 fi
103fi
104
105dnl Setup init.d locations...
106AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
107
108if test x$rcdir = x; then
109 case "$uname" in
110 FreeBSD* | OpenBSD*)
111 # FreeBSD and OpenBSD
112 INITDIR=""
113 INITDDIR=""
114 ;;
115
116 NetBSD*)
117 # NetBSD
118 INITDIR=""
119 INITDDIR="/etc/rc.d"
120 ;;
121
122 Darwin*)
123 # Darwin and MacOS X...
124 INITDIR=""
125 INITDDIR="/System/Library/StartupItems/PrintingServices"
126 ;;
127
128 Linux | GNU)
129 # Linux/HURD seems to choose an init.d directory at random...
130 if test -d /sbin/init.d; then
131 # SuSE
132 INITDIR="/sbin/init.d"
133 INITDDIR=".."
134 else
135 if test -d /etc/init.d; then
136 # Others
137 INITDIR="/etc"
138 INITDDIR="../init.d"
139 else
140 # RedHat
141 INITDIR="/etc/rc.d"
142 INITDDIR="../init.d"
143 fi
144 fi
145 ;;
146
147 OSF1* | HP-UX*)
148 INITDIR="/sbin"
149 INITDDIR="../init.d"
150 ;;
151
152 AIX*)
153 INITDIR="/etc/rc.d"
154 INITDDIR=".."
155 ;;
156
157 *)
158 INITDIR="/etc"
159 INITDDIR="../init.d"
160 ;;
161
162 esac
163else
164 INITDIR=""
165 INITDDIR="$rcdir"
166fi
167
168AC_SUBST(INITDIR)
169AC_SUBST(INITDDIR)
170
171dnl Setup default locations...
172# Cache data...
173AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
174
175if test x$cachedir = x; then
176 CUPS_CACHEDIR="$localstatedir/cache/cups"
177else
178 CUPS_CACHEDIR="$cachedir"
179fi
180AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR")
181AC_SUBST(CUPS_CACHEDIR)
182
183# Data files
184CUPS_DATADIR="$datadir/cups"
185AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
186AC_SUBST(CUPS_DATADIR)
187
188# Documentation files
189AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
190
191if test x$docdir = x; then
192 CUPS_DOCROOT="$datadir/doc/cups"
193 docdir="$datadir/doc/cups"
194else
195 CUPS_DOCROOT="$docdir"
196fi
197
198AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
199AC_SUBST(CUPS_DOCROOT)
200
201# Fonts
202AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
203
204if test "x$fontpath" = "x"; then
205 CUPS_FONTPATH="$datadir/cups/fonts"
206else
207 CUPS_FONTPATH="$fontpath"
208fi
209
210AC_SUBST(CUPS_FONTPATH)
211AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
212
213# Locale data
214case "$uname" in
215 Linux | GNU | *BSD* | Darwin*)
216 CUPS_LOCALEDIR="$datadir/locale"
217 ;;
218
219 OSF1* | AIX*)
220 CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
221 ;;
222
223 *)
224 # This is the standard System V location...
225 CUPS_LOCALEDIR="$exec_prefix/lib/locale"
226 ;;
227esac
228
229AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
230AC_SUBST(CUPS_LOCALEDIR)
231
232# Log files...
233AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
234
235if test x$logdir = x; then
236 CUPS_LOGDIR="$localstatedir/log/cups"
237 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
238else
239 CUPS_LOGDIR="$logdir"
240fi
241AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
242AC_SUBST(CUPS_LOGDIR)
243
244# Longer-term spool data
245CUPS_REQUESTS="$localstatedir/spool/cups"
246AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
247AC_SUBST(CUPS_REQUESTS)
248
249# Server executables...
250case "$uname" in
251 *BSD* | Darwin*)
252 # *BSD and Darwin (MacOS X)
253 INSTALL_SYSV=""
254 CUPS_SERVERBIN="$exec_prefix/libexec/cups"
255 ;;
256 *)
257 # All others
258 INSTALL_SYSV="install-sysv"
259 CUPS_SERVERBIN="$libdir/cups"
260 ;;
261esac
262
263AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
264AC_SUBST(CUPS_SERVERBIN)
265AC_SUBST(INSTALL_SYSV)
266
267# Configuration files
268CUPS_SERVERROOT="$sysconfdir/cups"
269AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
270AC_SUBST(CUPS_SERVERROOT)
271
272# Transient run-time state
273CUPS_STATEDIR="$localstatedir/run/cups"
274AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
275AC_SUBST(CUPS_STATEDIR)
276
277dnl
278dnl End of "$Id: cups-directories.m4 4873 2005-12-07 01:46:54Z mike $".
279dnl