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