2 dnl "$Id: cups-directories.m4 4873 2005-12-07 01:46:54Z mike $"
4 dnl Directory stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
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
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
20 dnl Voice: (301) 373-9600
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
27 dnl Fix "prefix" variable if it hasn't been specified...
28 if test "$prefix" = "NONE"; then
32 dnl Fix "exec_prefix" variable if it hasn't been specified...
33 if test "$exec_prefix" = "NONE"; then
34 if test "$prefix" = "/"; then
41 dnl Fix "bindir" variable...
42 if test "$bindir" = "\${exec_prefix}/bin"; then
43 bindir="$exec_prefix/bin"
46 dnl Fix "sbindir" variable...
47 if test "$sbindir" = "\${exec_prefix}/sbin"; then
48 sbindir="$exec_prefix/sbin"
51 dnl Fix "sharedstatedir" variable if it hasn't been specified...
52 if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
53 sharedstatedir="/usr/com"
56 dnl Fix "datadir" variable if it hasn't been specified...
57 if test "$datadir" = "\${prefix}/share"; then
58 if test "$prefix" = "/"; then
61 datadir="$prefix/share"
65 dnl Fix "includedir" variable if it hasn't been specified...
66 if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
67 includedir="/usr/include"
70 dnl Fix "localstatedir" variable if it hasn't been specified...
71 if test "$localstatedir" = "\${prefix}/var"; then
72 if test "$prefix" = "/"; then
73 if test "$uname" = Darwin; then
74 localstatedir="/private/var"
79 localstatedir="$prefix/var"
83 dnl Fix "sysconfdir" variable if it hasn't been specified...
84 if test "$sysconfdir" = "\${prefix}/etc"; then
85 if test "$prefix" = "/"; then
86 if test "$uname" = Darwin; then
87 sysconfdir="/private/etc"
92 sysconfdir="$prefix/etc"
96 dnl Fix "libdir" variable for IRIX 6.x...
97 if test "$libdir" = "\${exec_prefix}/lib"; then
98 if test "$uname" = "IRIX" -a $uversion -ge 62; then
99 libdir="$exec_prefix/lib32"
101 libdir="$exec_prefix/lib"
105 dnl Setup init.d locations...
106 AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
108 if test x$rcdir = x; then
111 # FreeBSD and OpenBSD
123 # Darwin and MacOS X...
125 INITDDIR="/System/Library/StartupItems/PrintingServices"
129 # Linux/HURD seems to choose an init.d directory at random...
130 if test -d /sbin/init.d; then
132 INITDIR="/sbin/init.d"
135 if test -d /etc/init.d; then
171 dnl Setup default locations...
173 AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
175 if test x$cachedir = x; then
176 CUPS_CACHEDIR="$localstatedir/cache/cups"
178 CUPS_CACHEDIR="$cachedir"
180 AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR")
181 AC_SUBST(CUPS_CACHEDIR)
184 CUPS_DATADIR="$datadir/cups"
185 AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
186 AC_SUBST(CUPS_DATADIR)
188 # Documentation files
189 AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
191 if test x$docdir = x; then
192 CUPS_DOCROOT="$datadir/doc/cups"
193 docdir="$datadir/doc/cups"
195 CUPS_DOCROOT="$docdir"
198 AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
199 AC_SUBST(CUPS_DOCROOT)
202 AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
204 if test "x$fontpath" = "x"; then
205 CUPS_FONTPATH="$datadir/cups/fonts"
207 CUPS_FONTPATH="$fontpath"
210 AC_SUBST(CUPS_FONTPATH)
211 AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
215 Linux | GNU | *BSD* | Darwin*)
216 CUPS_LOCALEDIR="$datadir/locale"
220 CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
224 # This is the standard System V location...
225 CUPS_LOCALEDIR="$exec_prefix/lib/locale"
229 AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
230 AC_SUBST(CUPS_LOCALEDIR)
233 AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
235 if test x$logdir = x; then
236 CUPS_LOGDIR="$localstatedir/log/cups"
237 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
239 CUPS_LOGDIR="$logdir"
241 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
242 AC_SUBST(CUPS_LOGDIR)
244 # Longer-term spool data
245 CUPS_REQUESTS="$localstatedir/spool/cups"
246 AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
247 AC_SUBST(CUPS_REQUESTS)
249 # Server executables...
252 # *BSD and Darwin (MacOS X)
254 CUPS_SERVERBIN="$exec_prefix/libexec/cups"
258 INSTALL_SYSV="install-sysv"
259 CUPS_SERVERBIN="$libdir/cups"
263 AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
264 AC_SUBST(CUPS_SERVERBIN)
265 AC_SUBST(INSTALL_SYSV)
267 # Configuration files
268 CUPS_SERVERROOT="$sysconfdir/cups"
269 AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
270 AC_SUBST(CUPS_SERVERROOT)
272 # Transient run-time state
273 CUPS_STATEDIR="$localstatedir/run/cups"
274 AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
275 AC_SUBST(CUPS_STATEDIR)
278 dnl End of "$Id: cups-directories.m4 4873 2005-12-07 01:46:54Z mike $".