]> git.ipfire.org Git - thirdparty/cups.git/blob - xcode/config.h
Add support for ASL and journald when doing "syslog" logging (STR #4474)
[thirdparty/cups.git] / xcode / config.h
1 /*
2 * "$Id$"
3 *
4 * Configuration file for CUPS and Xcode.
5 *
6 * Copyright 2007-2015 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
14 */
15
16 #ifndef _CUPS_CONFIG_H_
17 #define _CUPS_CONFIG_H_
18
19 #include <AvailabilityMacros.h>
20
21 /*
22 * Version of software...
23 */
24
25 #define CUPS_SVERSION "CUPS v2.1svn"
26 #define CUPS_MINIMAL "CUPS/2.1svn"
27
28
29 /*
30 * Default user and groups...
31 */
32
33 #define CUPS_DEFAULT_USER "_lp"
34 #define CUPS_DEFAULT_GROUP "_lp"
35 #define CUPS_DEFAULT_SYSTEM_GROUPS "admin"
36 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@AUTHKEY(system.print.operator) @admin @lpadmin"
37 #define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
38
39
40 /*
41 * Default file permissions...
42 */
43
44 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
45 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
46
47
48 /*
49 * Default logging settings...
50 */
51
52 #define CUPS_DEFAULT_LOG_LEVEL "warn"
53 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
54
55
56 /*
57 * Default fatal error settings...
58 */
59
60 #define CUPS_DEFAULT_FATAL_ERRORS "config"
61
62
63 /*
64 * Default browsing settings...
65 */
66
67 #define CUPS_DEFAULT_BROWSING 1
68 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
69 #define CUPS_DEFAULT_DEFAULT_SHARED 1
70
71
72 /*
73 * Default IPP port...
74 */
75
76 #define CUPS_DEFAULT_IPP_PORT 631
77
78
79 /*
80 * Default printcap file...
81 */
82
83 #define CUPS_DEFAULT_PRINTCAP "/Library/Preferences/org.cups.printers.plist"
84
85
86 /*
87 * Default Samba and LPD config files...
88 */
89
90 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
91 #define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
92
93
94 /*
95 * Default MaxCopies value...
96 */
97
98 #define CUPS_DEFAULT_MAX_COPIES 9999
99
100
101 /*
102 * Do we have domain socket support, and if so what is the default one?
103 */
104
105 #define CUPS_DEFAULT_DOMAINSOCKET "/private/var/run/cupsd"
106
107
108 /*
109 * Default WebInterface value...
110 */
111
112 #define CUPS_DEFAULT_WEBIF 0
113
114
115 /*
116 * Where are files stored?
117 *
118 * Note: These are defaults, which can be overridden by environment
119 * variables at run-time...
120 */
121
122 #define CUPS_BINDIR "/usr/bin"
123 #define CUPS_CACHEDIR "/private/var/spool/cups/cache"
124 #define CUPS_DATADIR "/usr/share/cups"
125 #define CUPS_DOCROOT "/usr/share/doc/cups"
126 #define CUPS_FONTPATH "/usr/share/cups/fonts"
127 #define CUPS_LOCALEDIR "/usr/share/locale"
128 #define CUPS_LOGDIR "/private/var/log/cups"
129 #define CUPS_REQUESTS "/private/var/spool/cups"
130 #define CUPS_SBINDIR "/usr/sbin"
131 #define CUPS_SERVERBIN "/usr/libexec/cups"
132 #define CUPS_SERVERROOT "/private/etc/cups"
133 #define CUPS_STATEDIR "/private/etc/cups"
134
135
136 /*
137 * Do we have posix_spawn?
138 */
139
140 #define HAVE_POSIX_SPAWN 1
141
142
143 /*
144 * Do we have ZLIB?
145 */
146
147 #define HAVE_LIBZ 1
148 #define HAVE_INFLATECOPY 1
149
150
151 /*
152 * Do we have PAM stuff?
153 */
154
155 #ifndef HAVE_LIBPAM
156 #define HAVE_LIBPAM 1
157 #endif /* !HAVE_LIBPAM */
158
159 /* #undef HAVE_PAM_PAM_APPL_H */
160 #define HAVE_PAM_SET_ITEM 1
161 #define HAVE_PAM_SETCRED 1
162
163
164 /*
165 * Do we have <shadow.h>?
166 */
167
168 /* #undef HAVE_SHADOW_H */
169
170
171 /*
172 * Do we have <crypt.h>?
173 */
174
175 /* #undef HAVE_CRYPT_H */
176
177
178 /*
179 * Use <stdint.h>?
180 */
181
182 #define HAVE_STDINT_H 1
183
184
185 /*
186 * Use <string.h>, <strings.h>, and/or <bstring.h>?
187 */
188
189 #define HAVE_STRING_H 1
190 #define HAVE_STRINGS_H 1
191 /* #undef HAVE_BSTRING_H */
192
193
194 /*
195 * Do we have the long long type?
196 */
197
198 #define HAVE_LONG_LONG 1
199
200 #ifdef HAVE_LONG_LONG
201 # define CUPS_LLFMT "%lld"
202 # define CUPS_LLCAST (long long)
203 #else
204 # define CUPS_LLFMT "%ld"
205 # define CUPS_LLCAST (long)
206 #endif /* HAVE_LONG_LONG */
207
208
209 /*
210 * Do we have the strtoll() function?
211 */
212
213 #define HAVE_STRTOLL 1
214
215 #ifndef HAVE_STRTOLL
216 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
217 #endif /* !HAVE_STRTOLL */
218
219
220 /*
221 * Do we have the strXXX() functions?
222 */
223
224 #define HAVE_STRDUP 1
225 #define HAVE_STRLCAT 1
226 #define HAVE_STRLCPY 1
227
228
229 /*
230 * Do we have the geteuid() function?
231 */
232
233 #define HAVE_GETEUID 1
234
235
236 /*
237 * Do we have the setpgid() function?
238 */
239
240 #define HAVE_SETPGID 1
241
242
243 /*
244 * Do we have the vsyslog() function?
245 */
246
247 #define HAVE_VSYSLOG 1
248
249
250 /*
251 * Do we have the ASL functions?
252 */
253
254 #define HAVE_ASL_H
255
256
257 /*
258 * Do we have the systemd journal functions?
259 */
260
261 /*#undef HAVE_SYSTEMD_SD_JOURNAL_H*/
262
263
264 /*
265 * Do we have the (v)snprintf() functions?
266 */
267
268 #define HAVE_SNPRINTF 1
269 #define HAVE_VSNPRINTF 1
270
271
272 /*
273 * What signal functions to use?
274 */
275
276 #define HAVE_SIGSET 1
277 #define HAVE_SIGACTION 1
278
279
280 /*
281 * What wait functions to use?
282 */
283
284 #define HAVE_WAITPID 1
285 #define HAVE_WAIT3 1
286
287
288 /*
289 * Do we have the mallinfo function and malloc.h?
290 */
291
292 /* #undef HAVE_MALLINFO */
293 /* #undef HAVE_MALLOC_H */
294
295
296 /*
297 * Do we have the POSIX ACL functions?
298 */
299
300 #define HAVE_ACL_INIT 1
301
302
303 /*
304 * Do we have the langinfo.h header file?
305 */
306
307 #define HAVE_LANGINFO_H 1
308
309
310 /*
311 * Which encryption libraries do we have?
312 */
313
314 #define HAVE_CDSASSL 1
315 /* #undef HAVE_GNUTLS */
316 #define HAVE_SSL 1
317
318
319 /*
320 * Do we have the gnutls_transport_set_pull_timeout_function function?
321 */
322
323 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
324
325
326 /*
327 * Do we have the gnutls_priority_set_direct function?
328 */
329
330 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
331
332
333 /*
334 * What Security framework headers do we have?
335 */
336
337 #define HAVE_AUTHORIZATION_H 1
338 /* #undef HAVE_SECBASEPRIV_H */
339 #define HAVE_SECCERTIFICATE_H 1
340 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
341 #define HAVE_SECITEM_H 1
342 /* #undef HAVE_SECITEMPRIV_H */
343 #define HAVE_SECPOLICY_H 1
344 /* #undef HAVE_SECPOLICYPRIV_H */
345 /* #undef HAVE_SECURETRANSPORTPRIV_H */
346
347
348 /*
349 * Do we have the cssmErrorString function?
350 */
351
352 #define HAVE_CSSMERRORSTRING 1
353
354
355 /*
356 * Do we have the SecGenerateSelfSignedCertificate function?
357 */
358
359 /* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
360
361
362 /*
363 * Do we have the SecKeychainOpen function?
364 */
365
366 #define HAVE_SECKEYCHAINOPEN 1
367
368
369 /*
370 * Do we have (a working) SSLSetEnabledCiphers function?
371 */
372
373 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
374 # define HAVE_SSLSETENABLEDCIPHERS 1
375 #endif /* AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER */
376
377
378 /*
379 * Do we have libpaper?
380 */
381
382 /* #undef HAVE_LIBPAPER */
383
384
385 /*
386 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
387 */
388
389 #define HAVE_DNSSD 1
390
391
392 /*
393 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
394 */
395
396 /* #undef HAVE_AVAHI */
397
398
399 /*
400 * Do we have <sys/ioctl.h>?
401 */
402
403 #define HAVE_SYS_IOCTL_H 1
404
405
406 /*
407 * Does the "stat" structure contain the "st_gen" member?
408 */
409
410 #define HAVE_ST_GEN 1
411
412
413 /*
414 * Does the "tm" structure contain the "tm_gmtoff" member?
415 */
416
417 #define HAVE_TM_GMTOFF 1
418
419
420 /*
421 * Do we have rresvport_af()?
422 */
423
424 #define HAVE_RRESVPORT_AF 1
425
426
427 /*
428 * Do we have getaddrinfo()?
429 */
430
431 #define HAVE_GETADDRINFO 1
432
433
434 /*
435 * Do we have getnameinfo()?
436 */
437
438 #define HAVE_GETNAMEINFO 1
439
440
441 /*
442 * Do we have getifaddrs()?
443 */
444
445 #define HAVE_GETIFADDRS 1
446
447
448 /*
449 * Do we have hstrerror()?
450 */
451
452 #define HAVE_HSTRERROR 1
453
454
455 /*
456 * Do we have res_init()?
457 */
458
459 #define HAVE_RES_INIT 1
460
461
462 /*
463 * Do we have <resolv.h>
464 */
465
466 #define HAVE_RESOLV_H 1
467
468
469 /*
470 * Do we have the <sys/sockio.h> header file?
471 */
472
473 #define HAVE_SYS_SOCKIO_H 1
474
475
476 /*
477 * Does the sockaddr structure contain an sa_len parameter?
478 */
479
480 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
481
482
483 /*
484 * Do we have pthread support?
485 */
486
487 #define HAVE_PTHREAD_H 1
488
489
490 /*
491 * Do we have launchd support?
492 */
493
494 #define HAVE_LAUNCH_H 1
495 #define HAVE_LAUNCHD 1
496 #define HAVE_LAUNCH_ACTIVATE_SOCKET 1
497
498
499 /*
500 * Various scripting languages...
501 */
502
503 #define HAVE_JAVA 1
504 #define CUPS_JAVA "/usr/bin/java"
505 #define HAVE_PERL 1
506 #define CUPS_PERL "/usr/bin/perl"
507 #define HAVE_PHP 1
508 #define CUPS_PHP "/usr/bin/php"
509 #define HAVE_PYTHON 1
510 #define CUPS_PYTHON "/usr/bin/python"
511
512
513 /*
514 * Location of the poppler/Xpdf pdftops program...
515 */
516
517 /* #undef HAVE_PDFTOPS */
518 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
519 #define CUPS_PDFTOPS "/usr/bin/pdftops"
520
521
522 /*
523 * Location of the Ghostscript gs program...
524 */
525
526 /* #undef HAVE_GHOSTSCRIPT */
527 /* #undef HAVE_GHOSTSCRIPT_PS2WRITE */
528 #define CUPS_GHOSTSCRIPT "/usr/bin/gs"
529
530
531 /*
532 * Do we have CoreFoundation public and private headers?
533 */
534
535 #define HAVE_COREFOUNDATION_H 1
536 /* #undef HAVE_CFPRIV_H */
537 /* #undef HAVE_CFBUNDLEPRIV_H */
538
539
540 /*
541 * Do we have ApplicationServices public headers?
542 */
543
544 #define HAVE_APPLICATIONSERVICES_H 1
545
546
547 /*
548 * Do we have the SCDynamicStoreCopyComputerName function?
549 */
550
551 #define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
552
553
554 /*
555 * Do we have OS X 10.4's mbr_XXX functions?
556 */
557
558 #define HAVE_MEMBERSHIP_H 1
559 /* #undef HAVE_MEMBERSHIPPRIV_H */
560 #define HAVE_MBR_UID_TO_UUID 1
561
562
563 /*
564 * Do we have Darwin's notify_post header and function?
565 */
566
567 #define HAVE_NOTIFY_H 1
568 #define HAVE_NOTIFY_POST 1
569
570
571 /*
572 * Do we have DBUS?
573 */
574
575 /* #undef HAVE_DBUS */
576 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
577
578
579 /*
580 * Do we have the GSSAPI support library (for Kerberos support)?
581 */
582
583 #define HAVE_GSS_ACQUIRE_CRED_EX_F 1
584 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
585 #define HAVE_GSS_GSSAPI_H 1
586 /* #undef HAVE_GSS_GSSAPI_SPI_H */
587 #define HAVE_GSSAPI 1
588 /* #undef HAVE_GSSAPI_GSSAPI_H */
589 /* #undef HAVE_GSSAPI_H */
590
591
592 /*
593 * Default GSS service name...
594 */
595
596 #define CUPS_DEFAULT_GSSSERVICENAME "host"
597
598
599 /*
600 * Select/poll interfaces...
601 */
602
603 #define HAVE_POLL 1
604 /* #undef HAVE_EPOLL */
605 #define HAVE_KQUEUE 1
606
607
608 /*
609 * Do we have the <dlfcn.h> header?
610 */
611
612 #define HAVE_DLFCN_H 1
613
614
615 /*
616 * Do we have <sys/param.h>?
617 */
618
619 #define HAVE_SYS_PARAM_H 1
620
621
622 /*
623 * Do we have <sys/ucred.h>?
624 */
625
626 #define HAVE_SYS_UCRED_H 1
627
628
629 /*
630 * Do we have removefile()?
631 */
632
633 #define HAVE_REMOVEFILE 1
634
635
636 /*
637 * Do we have <sandbox.h>?
638 */
639
640 #define HAVE_SANDBOX_H 1
641
642
643 /*
644 * Which random number generator function to use...
645 */
646
647 #define HAVE_ARC4RANDOM 1
648 #define HAVE_RANDOM 1
649 #define HAVE_LRAND48 1
650
651 #ifdef HAVE_ARC4RANDOM
652 # define CUPS_RAND() arc4random()
653 # define CUPS_SRAND(v) arc4random_stir()
654 #elif defined(HAVE_RANDOM)
655 # define CUPS_RAND() random()
656 # define CUPS_SRAND(v) srandom(v)
657 #elif defined(HAVE_LRAND48)
658 # define CUPS_RAND() lrand48()
659 # define CUPS_SRAND(v) srand48(v)
660 #else
661 # define CUPS_RAND() rand()
662 # define CUPS_SRAND(v) srand(v)
663 #endif /* HAVE_ARC4RANDOM */
664
665
666 /*
667 * Do we have libusb?
668 */
669
670 /* #undef HAVE_LIBUSB */
671
672
673 /*
674 * Do we have libwrap and tcpd.h?
675 */
676
677 /* #undef HAVE_TCPD_H */
678
679
680 /*
681 * Do we have <iconv.h>?
682 */
683
684 #define HAVE_ICONV_H 1
685
686
687 /*
688 * Do we have statfs or statvfs and one of the corresponding headers?
689 */
690
691 #define HAVE_STATFS 1
692 #define HAVE_STATVFS 1
693 #define HAVE_SYS_MOUNT_H 1
694 /* #undef HAVE_SYS_STATFS_H */
695 #define HAVE_SYS_STATVFS_H 1
696 /* #undef HAVE_SYS_VFS_H */
697
698
699 /*
700 * Location of OS X localization bundle, if any.
701 */
702
703 #define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
704
705
706 /*
707 * Do we have XPC?
708 */
709
710 #define HAVE_XPC 1
711 /* #undef HAVE_XPC_PRIVATE_H */
712
713
714 /*
715 * Do we have Mini-XML?
716 */
717
718 /* #undef HAVE_MXML_H */
719
720
721 /*
722 * Do we have the C99 abs() function?
723 */
724
725 #define HAVE_ABS 1
726 #if !defined(HAVE_ABS) && !defined(abs)
727 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
728 # define abs(x) _cups_abs(x)
729 static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
730 # elif defined(_MSC_VER)
731 # define abs(x) _cups_abs(x)
732 static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
733 # else
734 # define abs(x) ((x) < 0 ? -(x) : (x))
735 # endif /* __GNUC__ || __STDC_VERSION__ */
736 #endif /* !HAVE_ABS && !abs */
737
738 #endif /* !_CUPS_CONFIG_H_ */
739
740 /*
741 * End of "$Id$".
742 */