]> git.ipfire.org Git - thirdparty/cups.git/blame - xcode/config.h
Do some cleanup for the on-demand support - remove old launchd support (no
[thirdparty/cups.git] / xcode / config.h
CommitLineData
82f97232 1/*
996acce8 2 * Configuration file for CUPS and Xcode.
82f97232 3 *
f73476ae 4 * Copyright 2007-2016 by Apple Inc.
996acce8 5 * Copyright 1997-2007 by Easy Software Products.
82f97232 6 *
996acce8
MS
7 * These coded instructions, statements, and computer programs are the
8 * property of Apple Inc. and are protected by Federal copyright
9 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 * which should have been included with this file. If this file is
11 * file is missing or damaged, see the license at "http://www.cups.org/".
82f97232
MS
12 */
13
14#ifndef _CUPS_CONFIG_H_
15#define _CUPS_CONFIG_H_
16
ee6226a5 17#include <AvailabilityMacros.h>
9688061e
MS
18#include <TargetConditionals.h>
19
ee6226a5 20
82f97232
MS
21/*
22 * Version of software...
23 */
24
24343173
MS
25#define CUPS_SVERSION "CUPS v2.2"
26#define CUPS_MINIMAL "CUPS/2.2"
82f97232
MS
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"
996acce8 37#define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
82f97232
MS
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
37e7e6e0 68#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
82f97232 69#define CUPS_DEFAULT_DEFAULT_SHARED 1
82f97232
MS
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
c82f05ea
MS
136/*
137 * Do we have posix_spawn?
138 */
139
140#define HAVE_POSIX_SPAWN 1
141
142
82f97232 143/*
db8b865d 144 * Do we have ZLIB?
82f97232
MS
145 */
146
82f97232 147#define HAVE_LIBZ 1
db8b865d 148#define HAVE_INFLATECOPY 1
82f97232
MS
149
150
151/*
152 * Do we have PAM stuff?
153 */
154
9688061e
MS
155#if TARGET_OS_OSX
156# define HAVE_LIBPAM 1
82f97232 157/* #undef HAVE_PAM_PAM_APPL_H */
9688061e
MS
158# define HAVE_PAM_SET_ITEM 1
159# define HAVE_PAM_SETCRED 1
160#endif /* TARGET_OS_OSX */
82f97232
MS
161
162
163/*
164 * Do we have <shadow.h>?
165 */
166
167/* #undef HAVE_SHADOW_H */
168
169
170/*
171 * Do we have <crypt.h>?
172 */
173
174/* #undef HAVE_CRYPT_H */
175
176
177/*
cb7f98ee 178 * Use <stdint.h>?
82f97232
MS
179 */
180
cb7f98ee 181#define HAVE_STDINT_H 1
82f97232
MS
182
183
184/*
185 * Use <string.h>, <strings.h>, and/or <bstring.h>?
186 */
187
188#define HAVE_STRING_H 1
189#define HAVE_STRINGS_H 1
190/* #undef HAVE_BSTRING_H */
191
37e7e6e0 192
82f97232
MS
193/*
194 * Do we have the long long type?
195 */
196
197#define HAVE_LONG_LONG 1
198
199#ifdef HAVE_LONG_LONG
200# define CUPS_LLFMT "%lld"
201# define CUPS_LLCAST (long long)
202#else
203# define CUPS_LLFMT "%ld"
204# define CUPS_LLCAST (long)
205#endif /* HAVE_LONG_LONG */
206
37e7e6e0 207
82f97232
MS
208/*
209 * Do we have the strtoll() function?
210 */
211
212#define HAVE_STRTOLL 1
213
214#ifndef HAVE_STRTOLL
215# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
216#endif /* !HAVE_STRTOLL */
217
37e7e6e0 218
82f97232
MS
219/*
220 * Do we have the strXXX() functions?
221 */
222
223#define HAVE_STRDUP 1
82f97232
MS
224#define HAVE_STRLCAT 1
225#define HAVE_STRLCPY 1
226
227
228/*
229 * Do we have the geteuid() function?
230 */
231
232#define HAVE_GETEUID 1
233
234
88f9aafc
MS
235/*
236 * Do we have the setpgid() function?
237 */
238
239#define HAVE_SETPGID 1
240
241
82f97232
MS
242/*
243 * Do we have the vsyslog() function?
244 */
245
246#define HAVE_VSYSLOG 1
247
248
0dc4a6bf
MS
249/*
250 * Do we have the ASL functions?
251 */
252
253#define HAVE_ASL_H
254
255
256/*
257 * Do we have the systemd journal functions?
258 */
259
260/*#undef HAVE_SYSTEMD_SD_JOURNAL_H*/
261
262
82f97232
MS
263/*
264 * Do we have the (v)snprintf() functions?
265 */
266
267#define HAVE_SNPRINTF 1
268#define HAVE_VSNPRINTF 1
269
270
271/*
272 * What signal functions to use?
273 */
274
275#define HAVE_SIGSET 1
276#define HAVE_SIGACTION 1
277
278
279/*
280 * What wait functions to use?
281 */
282
283#define HAVE_WAITPID 1
284#define HAVE_WAIT3 1
285
286
287/*
288 * Do we have the mallinfo function and malloc.h?
289 */
290
291/* #undef HAVE_MALLINFO */
292/* #undef HAVE_MALLOC_H */
293
294
295/*
296 * Do we have the POSIX ACL functions?
297 */
298
299#define HAVE_ACL_INIT 1
300
301
302/*
303 * Do we have the langinfo.h header file?
304 */
305
306#define HAVE_LANGINFO_H 1
307
308
309/*
310 * Which encryption libraries do we have?
311 */
312
313#define HAVE_CDSASSL 1
314/* #undef HAVE_GNUTLS */
82f97232
MS
315#define HAVE_SSL 1
316
317
19ba6878
MS
318/*
319 * Do we have the gnutls_transport_set_pull_timeout_function function?
320 */
321
322/* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
323
324
325/*
326 * Do we have the gnutls_priority_set_direct function?
327 */
328
329/* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
330
331
82f97232
MS
332/*
333 * What Security framework headers do we have?
334 */
335
9688061e
MS
336#if !TARGET_OS_IOS
337# define HAVE_AUTHORIZATION_H 1
338#endif /* !TARGET_OS_IOS */
339
a469f8a5 340/* #undef HAVE_SECBASEPRIV_H */
82f97232 341#define HAVE_SECCERTIFICATE_H 1
a469f8a5 342/* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
82f97232 343#define HAVE_SECITEM_H 1
a469f8a5 344/* #undef HAVE_SECITEMPRIV_H */
82f97232 345#define HAVE_SECPOLICY_H 1
a469f8a5
MS
346/* #undef HAVE_SECPOLICYPRIV_H */
347/* #undef HAVE_SECURETRANSPORTPRIV_H */
82f97232
MS
348
349
82f97232
MS
350/*
351 * Do we have the cssmErrorString function?
352 */
353
9688061e
MS
354#if !TARGET_OS_IOS
355# define HAVE_CSSMERRORSTRING 1
356#endif /* !TARGET_OS_IOS */
82f97232
MS
357
358
8aaeeaa9
MS
359/*
360 * Do we have the SecGenerateSelfSignedCertificate function?
361 */
362
9688061e
MS
363#if TARGET_OS_IOS
364# define HAVE_SECGENERATESELFSIGNEDCERTIFICATE 1
365#endif /* TARGET_OS_IOS */
8aaeeaa9
MS
366
367
368/*
369 * Do we have the SecKeychainOpen function?
370 */
371
9688061e
MS
372#if !TARGET_OS_IOS
373# define HAVE_SECKEYCHAINOPEN 1
374#endif /* !TARGET_OS_IOS */
8aaeeaa9
MS
375
376
ee6226a5
MS
377/*
378 * Do we have (a working) SSLSetEnabledCiphers function?
379 */
380
9688061e 381#define HAVE_SSLSETENABLEDCIPHERS 1
ee6226a5
MS
382
383
82f97232 384/*
37e7e6e0 385 * Do we have libpaper?
82f97232
MS
386 */
387
37e7e6e0 388/* #undef HAVE_LIBPAPER */
82f97232
MS
389
390
391/*
37e7e6e0 392 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
82f97232
MS
393 */
394
37e7e6e0 395#define HAVE_DNSSD 1
82f97232
MS
396
397
398/*
37e7e6e0 399 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
82f97232
MS
400 */
401
37e7e6e0 402/* #undef HAVE_AVAHI */
82f97232
MS
403
404
405/*
406 * Do we have <sys/ioctl.h>?
407 */
408
409#define HAVE_SYS_IOCTL_H 1
410
411
412/*
413 * Does the "stat" structure contain the "st_gen" member?
414 */
415
416#define HAVE_ST_GEN 1
417
418
419/*
420 * Does the "tm" structure contain the "tm_gmtoff" member?
421 */
422
423#define HAVE_TM_GMTOFF 1
424
425
426/*
427 * Do we have rresvport_af()?
428 */
429
430#define HAVE_RRESVPORT_AF 1
431
432
433/*
434 * Do we have getaddrinfo()?
435 */
436
437#define HAVE_GETADDRINFO 1
438
439
440/*
441 * Do we have getnameinfo()?
442 */
443
444#define HAVE_GETNAMEINFO 1
445
446
447/*
448 * Do we have getifaddrs()?
449 */
450
451#define HAVE_GETIFADDRS 1
452
453
454/*
455 * Do we have hstrerror()?
456 */
457
458#define HAVE_HSTRERROR 1
459
460
461/*
462 * Do we have res_init()?
463 */
464
465#define HAVE_RES_INIT 1
466
467
468/*
469 * Do we have <resolv.h>
470 */
471
472#define HAVE_RESOLV_H 1
473
474
475/*
476 * Do we have the <sys/sockio.h> header file?
477 */
478
479#define HAVE_SYS_SOCKIO_H 1
480
481
482/*
483 * Does the sockaddr structure contain an sa_len parameter?
484 */
485
486/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
487
488
82f97232
MS
489/*
490 * Do we have pthread support?
491 */
492
493#define HAVE_PTHREAD_H 1
494
495
1166bf58
MS
496/*
497 * Do we have on-demand support (launchd/systemd/upstart)?
498 */
499
500#define HAVE_ONDEMAND 1
501
502
82f97232
MS
503/*
504 * Do we have launchd support?
505 */
506
507#define HAVE_LAUNCH_H 1
508#define HAVE_LAUNCHD 1
1166bf58
MS
509
510
511/*
512 * Do we have systemd support?
513 */
514
515/* #undef HAVE_SYSTEMD */
516
517
518/*
519 * Do we have upstart support?
520 */
521
522/* #undef HAVE_UPSTART */
82f97232
MS
523
524
525/*
526 * Various scripting languages...
527 */
528
9688061e
MS
529#if !TARGET_OS_IOS
530# define HAVE_JAVA 1
531# define CUPS_JAVA "/usr/bin/java"
532# define HAVE_PERL 1
533# define CUPS_PERL "/usr/bin/perl"
534# define HAVE_PHP 1
535# define CUPS_PHP "/usr/bin/php"
536# define HAVE_PYTHON 1
537# define CUPS_PYTHON "/usr/bin/python"
538#endif /* !TARGET_OS_IOS */
82f97232
MS
539
540
82f97232
MS
541/*
542 * Do we have CoreFoundation public and private headers?
543 */
544
545#define HAVE_COREFOUNDATION_H 1
a469f8a5
MS
546/* #undef HAVE_CFPRIV_H */
547/* #undef HAVE_CFBUNDLEPRIV_H */
82f97232
MS
548
549
550/*
551 * Do we have ApplicationServices public headers?
552 */
553
9688061e
MS
554#if !TARGET_OS_IOS
555# define HAVE_APPLICATIONSERVICES_H 1
556#endif /* !TARGET_OS_IOS */
82f97232
MS
557
558
559/*
560 * Do we have the SCDynamicStoreCopyComputerName function?
561 */
562
9688061e
MS
563#if !TARGET_OS_IOS
564# define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
565#endif /* !TARGET_OS_IOS */
82f97232
MS
566
567
6eb98aee
MS
568/*
569 * Do we have the getgrouplist() function?
570 */
571
572#define HAVE_GETGROUPLIST 1
8072030b 573
6eb98aee 574
82f97232 575/*
8072030b 576 * Do we have macOS 10.4's mbr_XXX functions?
82f97232
MS
577 */
578
579#define HAVE_MEMBERSHIP_H 1
a469f8a5 580/* #undef HAVE_MEMBERSHIPPRIV_H */
82f97232
MS
581#define HAVE_MBR_UID_TO_UUID 1
582
583
584/*
585 * Do we have Darwin's notify_post header and function?
586 */
587
588#define HAVE_NOTIFY_H 1
589#define HAVE_NOTIFY_POST 1
590
591
82f97232 592/*
37e7e6e0 593 * Do we have DBUS?
82f97232
MS
594 */
595
37e7e6e0
MS
596/* #undef HAVE_DBUS */
597/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
82f97232
MS
598
599
600/*
601 * Do we have the GSSAPI support library (for Kerberos support)?
602 */
603
9688061e
MS
604#if !TARGET_OS_IOS
605# define HAVE_GSS_ACQUIRE_CRED_EX_F 1
606# define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
607# define HAVE_GSS_GSSAPI_H 1
a469f8a5 608/* #undef HAVE_GSS_GSSAPI_SPI_H */
9688061e 609# define HAVE_GSSAPI 1
37e7e6e0
MS
610/* #undef HAVE_GSSAPI_GSSAPI_H */
611/* #undef HAVE_GSSAPI_H */
9688061e 612#endif /* !TARGET_OS_IOS */
82f97232
MS
613
614
615/*
616 * Default GSS service name...
617 */
618
619#define CUPS_DEFAULT_GSSSERVICENAME "host"
620
621
622/*
623 * Select/poll interfaces...
624 */
625
626#define HAVE_POLL 1
627/* #undef HAVE_EPOLL */
628#define HAVE_KQUEUE 1
629
630
631/*
632 * Do we have the <dlfcn.h> header?
633 */
634
635#define HAVE_DLFCN_H 1
636
637
638/*
639 * Do we have <sys/param.h>?
640 */
641
642#define HAVE_SYS_PARAM_H 1
643
644
645/*
646 * Do we have <sys/ucred.h>?
647 */
648
649#define HAVE_SYS_UCRED_H 1
650
651
652/*
653 * Do we have removefile()?
654 */
655
656#define HAVE_REMOVEFILE 1
657
658
659/*
660 * Do we have <sandbox.h>?
661 */
662
663#define HAVE_SANDBOX_H 1
664
665
666/*
667 * Which random number generator function to use...
668 */
669
670#define HAVE_ARC4RANDOM 1
671#define HAVE_RANDOM 1
672#define HAVE_LRAND48 1
673
674#ifdef HAVE_ARC4RANDOM
675# define CUPS_RAND() arc4random()
676# define CUPS_SRAND(v) arc4random_stir()
677#elif defined(HAVE_RANDOM)
678# define CUPS_RAND() random()
679# define CUPS_SRAND(v) srandom(v)
680#elif defined(HAVE_LRAND48)
681# define CUPS_RAND() lrand48()
682# define CUPS_SRAND(v) srand48(v)
683#else
684# define CUPS_RAND() rand()
685# define CUPS_SRAND(v) srand(v)
686#endif /* HAVE_ARC4RANDOM */
687
688
82f97232
MS
689/*
690 * Do we have libusb?
691 */
692
37e7e6e0 693/* #undef HAVE_LIBUSB */
82f97232
MS
694
695
696/*
697 * Do we have libwrap and tcpd.h?
698 */
699
700/* #undef HAVE_TCPD_H */
701
702
703/*
704 * Do we have <iconv.h>?
705 */
706
707#define HAVE_ICONV_H 1
708
709
710/*
711 * Do we have statfs or statvfs and one of the corresponding headers?
712 */
713
714#define HAVE_STATFS 1
715#define HAVE_STATVFS 1
716#define HAVE_SYS_MOUNT_H 1
717/* #undef HAVE_SYS_STATFS_H */
718#define HAVE_SYS_STATVFS_H 1
719/* #undef HAVE_SYS_VFS_H */
720
721
722/*
8072030b 723 * Location of macOS localization bundle, if any.
82f97232
MS
724 */
725
9688061e
MS
726#if !TARGET_OS_IOS
727# define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
728#endif /* !TARGET_OS_IOS */
82f97232
MS
729
730
731/*
37e7e6e0 732 * Do we have XPC?
82f97232
MS
733 */
734
37e7e6e0 735#define HAVE_XPC 1
a469f8a5 736/* #undef HAVE_XPC_PRIVATE_H */
82f97232
MS
737
738
eac3a0a0 739/*
37e7e6e0 740 * Do we have Mini-XML?
eac3a0a0
MS
741 */
742
37e7e6e0
MS
743/* #undef HAVE_MXML_H */
744
745
746/*
747 * Do we have the C99 abs() function?
748 */
eac3a0a0 749
37e7e6e0
MS
750#define HAVE_ABS 1
751#if !defined(HAVE_ABS) && !defined(abs)
752# if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
753# define abs(x) _cups_abs(x)
754static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
755# elif defined(_MSC_VER)
756# define abs(x) _cups_abs(x)
757static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
758# else
759# define abs(x) ((x) < 0 ? -(x) : (x))
760# endif /* __GNUC__ || __STDC_VERSION__ */
761#endif /* !HAVE_ABS && !abs */
eac3a0a0 762
82f97232 763#endif /* !_CUPS_CONFIG_H_ */