2 dnl "$Id: cups-directories.m4,v 1.12 2004/06/29 03:44:52 mike Exp $"
4 dnl Directory stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2004 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-3142 USA
20 dnl Voice: (301) 373-9600
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
27 AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
28 AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
29 AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
30 AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
32 dnl Fix "prefix" variable if it hasn't been specified...
33 if test "$prefix" = "NONE"; then
37 dnl Fix "exec_prefix" variable if it hasn't been specified...
38 if test "$exec_prefix" = "NONE"; then
39 if test "$prefix" = "/"; then
46 dnl Fix "sharedstatedir" variable if it hasn't been specified...
47 if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
48 sharedstatedir="/usr/com"
51 dnl Fix "datadir" variable if it hasn't been specified...
52 if test "$datadir" = "\${prefix}/share"; then
53 if test "$prefix" = "/"; then
56 datadir="$prefix/share"
60 dnl Fix "includedir" variable if it hasn't been specified...
61 if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
62 includedir="/usr/include"
65 dnl Fix "localstatedir" variable if it hasn't been specified...
66 if test "$localstatedir" = "\${prefix}/var"; then
67 if test "$prefix" = "/"; then
70 localstatedir="$prefix/var"
74 dnl Fix "sysconfdir" variable if it hasn't been specified...
75 if test "$sysconfdir" = "\${prefix}/etc"; then
76 if test "$prefix" = "/"; then
79 sysconfdir="$prefix/etc"
83 dnl Fix "libdir" variable for IRIX 6.x...
84 if test "$libdir" = "\${exec_prefix}/lib"; then
85 libdir="$exec_prefix/lib"
88 if test "$uname" = "IRIX" -a $uversion -ge 62; then
89 libdir="$exec_prefix/lib32"
92 dnl Fix "fontpath" variable...
93 if test "x$fontpath" = "x"; then
94 fontpath="$datadir/cups/fonts"
97 dnl Setup init.d locations...
98 if test x$rcdir = x; then
101 # FreeBSD and OpenBSD
113 # Darwin and MacOS X...
115 INITDDIR="/System/Library/StartupItems/PrintingServices"
119 # Linux seems to choose an init.d directory at random...
120 if test -d /sbin/init.d; then
122 INITDIR="/sbin/init.d"
125 if test -d /etc/rc.d; then
161 dnl Setup default locations...
162 CUPS_SERVERROOT="$sysconfdir/cups"
163 CUPS_REQUESTS="$localstatedir/spool/cups"
165 AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
166 AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
168 if test x$logdir = x; then
169 CUPS_LOGDIR="$localstatedir/log/cups"
170 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
172 CUPS_LOGDIR="$logdir"
173 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$logdir")
176 dnl See what directory to put server executables...
179 # *BSD and Darwin (MacOS X)
181 CUPS_SERVERBIN="$exec_prefix/libexec/cups"
182 AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$exec_prefix/libexec/cups")
186 INSTALL_SYSV="install-sysv"
187 CUPS_SERVERBIN="$libdir/cups"
188 AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$libdir/cups")
192 AC_SUBST(INSTALL_SYSV)
193 AC_SUBST(CUPS_SERVERROOT)
194 AC_SUBST(CUPS_SERVERBIN)
195 AC_SUBST(CUPS_LOGDIR)
196 AC_SUBST(CUPS_REQUESTS)
198 dnl Set the CUPS_LOCALE directory...
200 Linux* | *BSD* | Darwin*)
201 CUPS_LOCALEDIR="$datadir/locale"
202 AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$datadir/locale")
206 CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
207 AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/nls/msg")
211 # This is the standard System V location...
212 CUPS_LOCALEDIR="$exec_prefix/lib/locale"
213 AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/locale")
217 AC_SUBST(CUPS_LOCALEDIR)
219 dnl Set the CUPS_DATADIR directory...
220 CUPS_DATADIR="$datadir/cups"
221 AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
222 AC_SUBST(CUPS_DATADIR)
224 dnl Set the CUPS_DOCROOT directory...
225 if test x$docdir = x; then
226 CUPS_DOCROOT="$datadir/doc/cups"
227 docdir="$datadir/doc/cups"
229 CUPS_DOCROOT="$docdir"
232 AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
233 AC_SUBST(CUPS_DOCROOT)
235 dnl Set the CUPS_FONTPATH directory...
236 CUPS_FONTPATH="$fontpath"
237 AC_SUBST(CUPS_FONTPATH)
238 AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$fontpath")
241 dnl End of "$Id: cups-directories.m4,v 1.12 2004/06/29 03:44:52 mike Exp $".