]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-directories.m4
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / config-scripts / cups-directories.m4
CommitLineData
ef416fc2 1dnl
5a1d7a17 2dnl Directory stuff for CUPS.
ef416fc2 3dnl
f2b8078b 4dnl Copyright 2007-2014 by Apple Inc.
5a1d7a17 5dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
ef416fc2 6dnl
5a1d7a17
MS
7dnl These coded instructions, statements, and computer programs are the
8dnl property of Apple Inc. and are protected by Federal copyright
9dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
10dnl which should have been included with this file. If this file is
11dnl file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 12dnl
13
14AC_PREFIX_DEFAULT(/)
15
16dnl Fix "prefix" variable if it hasn't been specified...
17if test "$prefix" = "NONE"; then
18 prefix="/"
19fi
20
21dnl Fix "exec_prefix" variable if it hasn't been specified...
22if test "$exec_prefix" = "NONE"; then
23 if test "$prefix" = "/"; then
24 exec_prefix="/usr"
25 else
26 exec_prefix="$prefix"
27 fi
28fi
29
30dnl Fix "bindir" variable...
31if test "$bindir" = "\${exec_prefix}/bin"; then
32 bindir="$exec_prefix/bin"
33fi
34
fa73b229 35AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir")
36
ef416fc2 37dnl Fix "sbindir" variable...
38if test "$sbindir" = "\${exec_prefix}/sbin"; then
39 sbindir="$exec_prefix/sbin"
40fi
41
fa73b229 42AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir")
43
ef416fc2 44dnl Fix "sharedstatedir" variable if it hasn't been specified...
45if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
46 sharedstatedir="/usr/com"
47fi
48
d09495fa 49dnl Fix "datarootdir" variable if it hasn't been specified...
50if test "$datarootdir" = "\${prefix}/share"; then
51 if test "$prefix" = "/"; then
52 datarootdir="/usr/share"
53 else
54 datarootdir="$prefix/share"
55 fi
56fi
57
ef416fc2 58dnl Fix "datadir" variable if it hasn't been specified...
59if test "$datadir" = "\${prefix}/share"; then
60 if test "$prefix" = "/"; then
61 datadir="/usr/share"
62 else
63 datadir="$prefix/share"
64 fi
d09495fa 65elif test "$datadir" = "\${datarootdir}"; then
66 datadir="$datarootdir"
ef416fc2 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
c277e2f8 100dnl Fix "libdir" variable...
ef416fc2 101if test "$libdir" = "\${exec_prefix}/lib"; then
c277e2f8 102 case "$uname" in
c277e2f8 103 Linux*)
5a9febac 104 if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
c277e2f8
MS
105 libdir="$exec_prefix/lib64"
106 fi
107 ;;
c277e2f8 108 esac
ef416fc2 109fi
110
71e16022 111dnl Setup private include directory...
5180a04c 112AC_ARG_WITH(privateinclude, [ --with-privateinclude set path for private include files, default=none],privateinclude="$withval",privateinclude="")
71e16022
MS
113if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then
114 PRIVATEINCLUDE="$privateinclude/cups"
115else
116 privateinclude=""
117 PRIVATEINCLUDE=""
118fi
119AC_SUBST(privateinclude)
120AC_SUBST(PRIVATEINCLUDE)
121
2e4ff8af
MS
122dnl LPD sharing support...
123AC_ARG_WITH(lpdconfig, [ --with-lpdconfig set URI for LPD config file],
124 LPDCONFIG="$withval", LPDCONFIG="")
125
126if test "x$LPDCONFIG" = x; then
127 if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then
128 LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
129 elif test "x$XINETD" != x; then
130 LPDCONFIG="xinetd://$XINETD/cups-lpd"
131 fi
132fi
133
134if test "x$LPDCONFIG" = xoff; then
135 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "")
136else
137 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "$LPDCONFIG")
138fi
139
140dnl SMB sharing support...
141AC_ARG_WITH(smbconfig, [ --with-smbconfig set URI for Samba config file],
142 SMBCONFIG="$withval", SMBCONFIG="")
143
144if test "x$SMBCONFIG" = x; then
145 if test -f /System/Library/LaunchDaemons/smbd.plist; then
146 SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist"
147 else
148 for dir in /etc /etc/samba /usr/local/etc; do
149 if test -f $dir/smb.conf; then
150 SMBCONFIG="samba://$dir/smb.conf"
151 break
152 fi
153 done
154 fi
155fi
156
157if test "x$SMBCONFIG" = xoff; then
158 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "")
159else
160 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "$SMBCONFIG")
161fi
162
ef416fc2 163dnl Setup default locations...
164# Cache data...
165AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
166
167if test x$cachedir = x; then
a4d04587 168 if test "x$uname" = xDarwin; then
d09495fa 169 CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
a4d04587 170 else
171 CUPS_CACHEDIR="$localstatedir/cache/cups"
172 fi
ef416fc2 173else
174 CUPS_CACHEDIR="$cachedir"
175fi
176AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR")
177AC_SUBST(CUPS_CACHEDIR)
178
179# Data files
180CUPS_DATADIR="$datadir/cups"
181AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
182AC_SUBST(CUPS_DATADIR)
183
f7deaa1a 184# Icon directory
185AC_ARG_WITH(icondir, [ --with-icondir set path for application icons],icondir="$withval",icondir="")
186
187if test "x$icondir" = x -a -d /usr/share/icons; then
188 ICONDIR="/usr/share/icons"
189else
190 ICONDIR="$icondir"
191fi
192
193AC_SUBST(ICONDIR)
194
195# Menu directory
196AC_ARG_WITH(menudir, [ --with-menudir set path for application menus],menudir="$withval",menudir="")
197
198if test "x$menudir" = x -a -d /usr/share/applications; then
199 MENUDIR="/usr/share/applications"
200else
201 MENUDIR="$menudir"
202fi
203
204AC_SUBST(MENUDIR)
205
ef416fc2 206# Documentation files
207AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
208
209if test x$docdir = x; then
210 CUPS_DOCROOT="$datadir/doc/cups"
211 docdir="$datadir/doc/cups"
212else
213 CUPS_DOCROOT="$docdir"
214fi
215
216AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
217AC_SUBST(CUPS_DOCROOT)
218
219# Fonts
220AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
221
222if test "x$fontpath" = "x"; then
223 CUPS_FONTPATH="$datadir/cups/fonts"
224else
225 CUPS_FONTPATH="$fontpath"
226fi
227
228AC_SUBST(CUPS_FONTPATH)
229AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
230
2e4ff8af
MS
231# Locale data
232if test "$localedir" = "\${datarootdir}/locale"; then
db1f069b
MS
233 case "$uname" in
234 Linux | GNU | *BSD* | Darwin*)
2e4ff8af 235 CUPS_LOCALEDIR="$datarootdir/locale"
db1f069b 236 ;;
ef416fc2 237
db1f069b
MS
238 *)
239 # This is the standard System V location...
240 CUPS_LOCALEDIR="$exec_prefix/lib/locale"
241 ;;
242 esac
243else
244 CUPS_LOCALEDIR="$localedir"
245fi
ef416fc2 246
247AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
248AC_SUBST(CUPS_LOCALEDIR)
249
250# Log files...
251AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
252
253if test x$logdir = x; then
254 CUPS_LOGDIR="$localstatedir/log/cups"
255 AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
256else
257 CUPS_LOGDIR="$logdir"
258fi
259AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
260AC_SUBST(CUPS_LOGDIR)
261
262# Longer-term spool data
263CUPS_REQUESTS="$localstatedir/spool/cups"
264AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
265AC_SUBST(CUPS_REQUESTS)
266
267# Server executables...
268case "$uname" in
269 *BSD* | Darwin*)
270 # *BSD and Darwin (MacOS X)
271 INSTALL_SYSV=""
272 CUPS_SERVERBIN="$exec_prefix/libexec/cups"
273 ;;
274 *)
275 # All others
276 INSTALL_SYSV="install-sysv"
e1d6a774 277 CUPS_SERVERBIN="$exec_prefix/lib/cups"
ef416fc2 278 ;;
279esac
280
281AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
282AC_SUBST(CUPS_SERVERBIN)
283AC_SUBST(INSTALL_SYSV)
284
285# Configuration files
286CUPS_SERVERROOT="$sysconfdir/cups"
287AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
288AC_SUBST(CUPS_SERVERROOT)
289
290# Transient run-time state
6961465f
MS
291AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[
292 case "$uname" in
293 Darwin*)
294 # Darwin (OS X)
295 CUPS_STATEDIR="$CUPS_SERVERROOT"
296 ;;
297 *)
298 # All others
299 CUPS_STATEDIR="$localstatedir/run/cups"
300 ;;
301 esac])
e07d4801 302AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
ef416fc2 303AC_SUBST(CUPS_STATEDIR)