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