]>
Commit | Line | Data |
---|---|---|
09ec0018 | 1 | dnl |
c24d2134 | 2 | dnl "$Id: cups-defaults.m4 6754 2007-08-01 19:00:07Z mike $" |
09ec0018 | 3 | dnl |
4 | dnl Default cupsd configuration settings for the Common UNIX Printing System | |
5 | dnl (CUPS). | |
6 | dnl | |
ac884b6a | 7 | dnl Copyright 2007-2008 by Apple Inc. |
b86bc4cf | 8 | dnl Copyright 2006-2007 by Easy Software Products, all rights reserved. |
09ec0018 | 9 | dnl |
10 | dnl These coded instructions, statements, and computer programs are the | |
bc44d920 | 11 | dnl property of Apple Inc. and are protected by Federal copyright |
12 | dnl law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
13 | dnl which should have been included with this file. If this file is | |
14 | dnl file is missing or damaged, see the license at "http://www.cups.org/". | |
09ec0018 | 15 | dnl |
16 | ||
bc44d920 | 17 | dnl Default languages... |
18 | LANGUAGES="`ls -1 locale/*.po | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`" | |
19 | ||
20 | AC_ARG_WITH(languages, [ --with-languages set installed languages, default=all ],[ | |
21 | case "$withval" in | |
22 | none | no) LANGUAGES="" ;; | |
23 | all) ;; | |
24 | *) LANGUAGES="$withval" ;; | |
25 | esac]) | |
e1d6a774 | 26 | AC_SUBST(LANGUAGES) |
27 | ||
09ec0018 | 28 | dnl Default ConfigFilePerm |
ed486911 | 29 | AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640], |
a4d04587 | 30 | CUPS_CONFIG_FILE_PERM="$withval", |
31 | if test "x$uname" = xDarwin; then | |
32 | CUPS_CONFIG_FILE_PERM="644" | |
33 | else | |
34 | CUPS_CONFIG_FILE_PERM="640" | |
35 | fi) | |
09ec0018 | 36 | AC_SUBST(CUPS_CONFIG_FILE_PERM) |
a4d04587 | 37 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM) |
09ec0018 | 38 | |
39 | dnl Default LogFilePerm | |
ed486911 | 40 | AC_ARG_WITH(log_file_perm, [ --with-log-file-perm set default LogFilePerm value, default=0644], |
a4d04587 | 41 | CUPS_LOG_FILE_PERM="$withval", |
42 | CUPS_LOG_FILE_PERM="644") | |
09ec0018 | 43 | AC_SUBST(CUPS_LOG_FILE_PERM) |
a4d04587 | 44 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_FILE_PERM, 0$CUPS_LOG_FILE_PERM) |
09ec0018 | 45 | |
46 | dnl Default Browsing | |
47 | AC_ARG_ENABLE(browsing, [ --enable-browsing enable Browsing by default, default=yes]) | |
48 | if test "x$enable_browsing" = xno; then | |
49 | CUPS_BROWSING="No" | |
50 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSING, 0) | |
51 | else | |
52 | CUPS_BROWSING="Yes" | |
53 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSING, 1) | |
54 | fi | |
55 | AC_SUBST(CUPS_BROWSING) | |
56 | ||
57 | dnl Default BrowseLocalProtocols | |
ed486911 | 58 | AC_ARG_WITH(local_protocols, [ --with-local-protocols set default BrowseLocalProtocols, default="CUPS"], |
f7deaa1a | 59 | default_local_protocols="$withval", |
60 | default_local_protocols="default") | |
61 | ||
62 | if test x$with_local_protocols != xno; then | |
63 | if test "x$default_local_protocols" = "xdefault"; then | |
64 | if test "x$DNSSDLIBS" != "x"; then | |
65 | CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS dnssd" | |
66 | else | |
67 | CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS" | |
68 | fi | |
69 | else | |
70 | CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols" | |
71 | fi | |
72 | else | |
73 | CUPS_BROWSE_LOCAL_PROTOCOLS="" | |
74 | fi | |
75 | ||
09ec0018 | 76 | AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS) |
77 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS, | |
a4d04587 | 78 | "$CUPS_BROWSE_LOCAL_PROTOCOLS") |
09ec0018 | 79 | |
80 | dnl Default BrowseRemoteProtocols | |
ed486911 | 81 | AC_ARG_WITH(remote_protocols, [ --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"], |
f7deaa1a | 82 | default_remote_protocols="$withval", |
83 | default_remote_protocols="default") | |
84 | ||
85 | if test x$with_remote_protocols != xno; then | |
86 | if test "x$default_remote_protocols" = "xdefault"; then | |
87 | if test "$uname" = "Darwin" -a $uversion -ge 90; then | |
88 | CUPS_BROWSE_REMOTE_PROTOCOLS="" | |
89 | else | |
90 | CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS" | |
91 | fi | |
92 | else | |
93 | CUPS_BROWSE_REMOTE_PROTOCOLS="$default_remote_protocols" | |
94 | fi | |
95 | else | |
96 | CUPS_BROWSE_REMOTE_PROTOCOLS="" | |
97 | fi | |
98 | ||
09ec0018 | 99 | AC_SUBST(CUPS_BROWSE_REMOTE_PROTOCOLS) |
100 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS, | |
a4d04587 | 101 | "$CUPS_BROWSE_REMOTE_PROTOCOLS") |
09ec0018 | 102 | |
103 | dnl Default BrowseShortNames | |
104 | AC_ARG_ENABLE(browse_short, [ --enable-browse-short-names | |
105 | enable BrowseShortNames by default, default=yes]) | |
106 | if test "x$enable_browse_short" = xno; then | |
107 | CUPS_BROWSE_SHORT_NAMES="No" | |
108 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 0) | |
109 | else | |
110 | CUPS_BROWSE_SHORT_NAMES="Yes" | |
111 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 1) | |
112 | fi | |
113 | AC_SUBST(CUPS_BROWSE_SHORT_NAMES) | |
114 | ||
115 | dnl Default DefaultShared | |
116 | AC_ARG_ENABLE(default_shared, [ --enable-default-shared enable DefaultShared by default, default=yes]) | |
117 | if test "x$enable_default_shared" = xno; then | |
118 | CUPS_DEFAULT_SHARED="No" | |
119 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DEFAULT_SHARED, 0) | |
120 | else | |
121 | CUPS_DEFAULT_SHARED="Yes" | |
122 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DEFAULT_SHARED, 1) | |
123 | fi | |
124 | AC_SUBST(CUPS_DEFAULT_SHARED) | |
125 | ||
126 | dnl Default ImplicitClasses | |
127 | AC_ARG_ENABLE(implicit, [ --enable-implicit-classes | |
128 | enable ImplicitClasses by default, default=yes]) | |
129 | if test "x$enable_implicit" = xno; then | |
130 | CUPS_IMPLICIT_CLASSES="No" | |
131 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 0) | |
132 | else | |
133 | CUPS_IMPLICIT_CLASSES="Yes" | |
134 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 1) | |
135 | fi | |
136 | AC_SUBST(CUPS_IMPLICIT_CLASSES) | |
137 | ||
e00b005a | 138 | dnl Default UseNetworkDefault |
09a101d6 | 139 | AC_ARG_ENABLE(use_network_default, [ --enable-use-network-default |
e53920b9 | 140 | enable UseNetworkDefault by default, default=auto]) |
09a101d6 | 141 | if test "x$enable_use_network_default" != xno; then |
e53920b9 | 142 | AC_MSG_CHECKING(whether to use network default printers) |
09a101d6 | 143 | if test "x$enable_use_network_default" = xyes -o $uname != Darwin; then |
e53920b9 | 144 | CUPS_USE_NETWORK_DEFAULT="Yes" |
145 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 1) | |
146 | AC_MSG_RESULT(yes) | |
147 | else | |
148 | CUPS_USE_NETWORK_DEFAULT="No" | |
149 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0) | |
150 | AC_MSG_RESULT(no) | |
151 | fi | |
152 | else | |
e00b005a | 153 | CUPS_USE_NETWORK_DEFAULT="No" |
154 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0) | |
e00b005a | 155 | fi |
156 | AC_SUBST(CUPS_USE_NETWORK_DEFAULT) | |
157 | ||
bd7854cb | 158 | dnl Determine the correct username and group for this OS... |
ed486911 | 159 | AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS], |
bd7854cb | 160 | CUPS_USER="$withval", |
161 | AC_MSG_CHECKING(for default print user) | |
355e94dc | 162 | if test x$uname = xDarwin; then |
c24d2134 | 163 | if test x`id -u _lp 2>/dev/null` = x; then |
355e94dc MS |
164 | CUPS_USER="lp"; |
165 | else | |
166 | CUPS_USER="_lp"; | |
167 | fi | |
c24d2134 | 168 | AC_MSG_RESULT($CUPS_USER) |
355e94dc | 169 | elif test -f /etc/passwd; then |
bd7854cb | 170 | CUPS_USER="" |
171 | for user in lp lpd guest daemon nobody; do | |
172 | if test "`grep \^${user}: /etc/passwd`" != ""; then | |
173 | CUPS_USER="$user" | |
174 | AC_MSG_RESULT($user) | |
175 | break; | |
176 | fi | |
177 | done | |
178 | ||
179 | if test x$CUPS_USER = x; then | |
180 | CUPS_USER="nobody" | |
181 | AC_MSG_RESULT(not found, using "$CUPS_USER") | |
182 | fi | |
183 | else | |
184 | CUPS_USER="nobody" | |
185 | AC_MSG_RESULT(no password file, using "$CUPS_USER") | |
186 | fi) | |
187 | ||
ed486911 | 188 | AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS], |
bd7854cb | 189 | CUPS_GROUP="$withval", |
190 | AC_MSG_CHECKING(for default print group) | |
355e94dc | 191 | if test x$uname = xDarwin; then |
c24d2134 | 192 | if test x`id -g _lp 2>/dev/null` = x; then |
355e94dc MS |
193 | CUPS_GROUP="lp"; |
194 | else | |
195 | CUPS_GROUP="_lp"; | |
196 | fi | |
c24d2134 | 197 | AC_MSG_RESULT($CUPS_GROUP) |
355e94dc MS |
198 | elif test -f /etc/group; then |
199 | GROUP_LIST="_lp lp nobody" | |
bd7854cb | 200 | CUPS_GROUP="" |
201 | for group in $GROUP_LIST; do | |
202 | if test "`grep \^${group}: /etc/group`" != ""; then | |
203 | CUPS_GROUP="$group" | |
204 | AC_MSG_RESULT($group) | |
205 | break; | |
206 | fi | |
207 | done | |
208 | ||
209 | if test x$CUPS_GROUP = x; then | |
210 | CUPS_GROUP="nobody" | |
211 | AC_MSG_RESULT(not found, using "$CUPS_GROUP") | |
212 | fi | |
213 | else | |
214 | CUPS_GROUP="nobody" | |
215 | AC_MSG_RESULT(no group file, using "$CUPS_GROUP") | |
216 | fi) | |
217 | ||
ed486911 | 218 | AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS], |
bd7854cb | 219 | CUPS_SYSTEM_GROUPS="$withval", |
220 | if test x$uname = xDarwin; then | |
355e94dc | 221 | CUPS_SYSTEM_GROUPS="admin" |
bd7854cb | 222 | else |
bc44d920 | 223 | AC_MSG_CHECKING(for default system groups) |
224 | if test -f /etc/group; then | |
225 | CUPS_SYSTEM_GROUPS="" | |
226 | GROUP_LIST="lpadmin sys system root" | |
227 | for group in $GROUP_LIST; do | |
228 | if test "`grep \^${group}: /etc/group`" != ""; then | |
229 | if test "x$CUPS_SYSTEM_GROUPS" = x; then | |
230 | CUPS_SYSTEM_GROUPS="$group" | |
231 | else | |
232 | CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group" | |
233 | fi | |
bd7854cb | 234 | fi |
bc44d920 | 235 | done |
bd7854cb | 236 | |
bc44d920 | 237 | if test "x$CUPS_SYSTEM_GROUPS" = x; then |
238 | CUPS_SYSTEM_GROUPS="$GROUP_LIST" | |
239 | AC_MSG_RESULT(no groups found, using "$CUPS_SYSTEM_GROUPS") | |
240 | else | |
241 | AC_MSG_RESULT("$CUPS_SYSTEM_GROUPS") | |
242 | fi | |
bd7854cb | 243 | else |
bc44d920 | 244 | CUPS_SYSTEM_GROUPS="$GROUP_LIST" |
245 | AC_MSG_RESULT(no group file, using "$CUPS_SYSTEM_GROUPS") | |
bd7854cb | 246 | fi |
bd7854cb | 247 | fi) |
248 | ||
bc44d920 | 249 | |
bd7854cb | 250 | CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`" |
251 | ||
252 | AC_SUBST(CUPS_USER) | |
253 | AC_SUBST(CUPS_GROUP) | |
254 | AC_SUBST(CUPS_SYSTEM_GROUPS) | |
255 | AC_SUBST(CUPS_PRIMARY_SYSTEM_GROUP) | |
256 | ||
257 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER") | |
258 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP") | |
259 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS") | |
260 | ||
e53920b9 | 261 | dnl Default printcap file... |
a74454a7 | 262 | AC_ARG_WITH(printcap, [ --with-printcap set default printcap file], |
e53920b9 | 263 | default_printcap="$withval", |
ed486911 | 264 | default_printcap="default") |
e53920b9 | 265 | |
07725fee | 266 | if test x$default_printcap != xno; then |
ed486911 | 267 | if test "x$default_printcap" = "xdefault"; then |
268 | case $uname in | |
269 | Darwin*) | |
270 | if test $uversion -ge 90; then | |
271 | CUPS_DEFAULT_PRINTCAP="" | |
272 | else | |
273 | CUPS_DEFAULT_PRINTCAP="/etc/printcap" | |
274 | fi | |
275 | ;; | |
276 | SunOS*) | |
277 | CUPS_DEFAULT_PRINTCAP="/etc/printers.conf" | |
278 | ;; | |
279 | *) | |
280 | CUPS_DEFAULT_PRINTCAP="/etc/printcap" | |
281 | ;; | |
282 | esac | |
07725fee | 283 | else |
284 | CUPS_DEFAULT_PRINTCAP="$default_printcap" | |
e53920b9 | 285 | fi |
286 | else | |
287 | CUPS_DEFAULT_PRINTCAP="" | |
288 | fi | |
289 | ||
290 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP") | |
09ec0018 | 291 | |
f7deaa1a | 292 | dnl Default MaxCopies value... |
293 | AC_ARG_WITH(max-copies, [ --with-max-copies set max copies value, default=100 ], | |
294 | CUPS_MAX_COPIES="$withval", | |
295 | if test "x$uname" = xDarwin; then | |
296 | CUPS_MAX_COPIES="999" | |
297 | else | |
298 | CUPS_MAX_COPIES="100" | |
299 | fi) | |
300 | ||
301 | AC_SUBST(CUPS_MAX_COPIES) | |
302 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_COPIES, $CUPS_MAX_COPIES) | |
303 | ||
09a101d6 | 304 | dnl Default raw printing state |
305 | AC_ARG_ENABLE(raw_printing, [ --enable-raw-printing enable raw printing by default, default=auto]) | |
306 | if test "x$enable_raw_printing" != xno; then | |
307 | AC_MSG_CHECKING(whether to enable raw printing) | |
308 | if test "x$enable_raw_printing" = xyes -o $uname = Darwin; then | |
309 | DEFAULT_RAW_PRINTING="" | |
310 | AC_MSG_RESULT(yes) | |
311 | else | |
312 | DEFAULT_RAW_PRINTING="#" | |
313 | AC_MSG_RESULT(no) | |
314 | fi | |
315 | else | |
316 | DEFAULT_RAW_PRINTING="#" | |
317 | fi | |
318 | AC_SUBST(DEFAULT_RAW_PRINTING) | |
319 | ||
bc44d920 | 320 | dnl Default SNMP options... |
321 | AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, default=auto ], | |
322 | if test "x$withval" = x; then | |
323 | CUPS_SNMP_ADDRESS="" | |
324 | else | |
325 | CUPS_SNMP_ADDRESS="Address $withval" | |
326 | fi, | |
327 | if test "x$uname" = xDarwin; then | |
328 | CUPS_SNMP_ADDRESS="" | |
329 | else | |
330 | CUPS_SNMP_ADDRESS="Address @LOCAL" | |
331 | fi) | |
332 | ||
333 | AC_ARG_WITH(snmp-community, [ --with-snmp-community set SNMP community, default=public ], | |
334 | CUPS_SNMP_COMMUNITY="Community $withval", | |
335 | CUPS_SNMP_COMMUNITY="Community public") | |
336 | ||
337 | AC_SUBST(CUPS_SNMP_ADDRESS) | |
338 | AC_SUBST(CUPS_SNMP_COMMUNITY) | |
339 | ||
ac884b6a MS |
340 | dnl New default port definition for IPP... |
341 | AC_ARG_WITH(ipp-port, [ --with-ipp-port set default port number for IPP ], | |
342 | DEFAULT_IPP_PORT="$withval", | |
343 | DEFAULT_IPP_PORT="631") | |
344 | ||
345 | AC_SUBST(DEFAULT_IPP_PORT) | |
346 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT) | |
347 | ||
09ec0018 | 348 | dnl |
c24d2134 | 349 | dnl End of "$Id: cups-defaults.m4 6754 2007-08-01 19:00:07Z mike $". |
09ec0018 | 350 | dnl |