]>
git.ipfire.org Git - thirdparty/cups.git/blob - xcode/config.h
2 * Configuration file for CUPS and Xcode.
4 * Copyright 2007-2016 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products.
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/".
14 #ifndef _CUPS_CONFIG_H_
15 #define _CUPS_CONFIG_H_
17 #include <AvailabilityMacros.h>
18 #include <TargetConditionals.h>
22 * Version of software...
25 #define CUPS_SVERSION "CUPS v2.2"
26 #define CUPS_MINIMAL "CUPS/2.2"
30 * Default user and groups...
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"
41 * Default file permissions...
44 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
45 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
49 * Default logging settings...
52 #define CUPS_DEFAULT_LOG_LEVEL "warn"
53 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
57 * Default fatal error settings...
60 #define CUPS_DEFAULT_FATAL_ERRORS "config"
64 * Default browsing settings...
67 #define CUPS_DEFAULT_BROWSING 1
68 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
69 #define CUPS_DEFAULT_DEFAULT_SHARED 1
76 #define CUPS_DEFAULT_IPP_PORT 631
80 * Default printcap file...
83 #define CUPS_DEFAULT_PRINTCAP "/Library/Preferences/org.cups.printers.plist"
87 * Default Samba and LPD config files...
90 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
91 #define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
95 * Default MaxCopies value...
98 #define CUPS_DEFAULT_MAX_COPIES 9999
102 * Do we have domain socket support, and if so what is the default one?
105 #define CUPS_DEFAULT_DOMAINSOCKET "/private/var/run/cupsd"
109 * Default WebInterface value...
112 #define CUPS_DEFAULT_WEBIF 0
116 * Where are files stored?
118 * Note: These are defaults, which can be overridden by environment
119 * variables at run-time...
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"
137 * Do we have posix_spawn?
140 #define HAVE_POSIX_SPAWN 1
148 #define HAVE_INFLATECOPY 1
152 * Do we have PAM stuff?
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 */
164 * Do we have <shadow.h>?
167 /* #undef HAVE_SHADOW_H */
171 * Do we have <crypt.h>?
174 /* #undef HAVE_CRYPT_H */
181 #define HAVE_STDINT_H 1
185 * Use <string.h>, <strings.h>, and/or <bstring.h>?
188 #define HAVE_STRING_H 1
189 #define HAVE_STRINGS_H 1
190 /* #undef HAVE_BSTRING_H */
194 * Do we have the long long type?
197 #define HAVE_LONG_LONG 1
199 #ifdef HAVE_LONG_LONG
200 # define CUPS_LLFMT "%lld"
201 # define CUPS_LLCAST (long long)
203 # define CUPS_LLFMT "%ld"
204 # define CUPS_LLCAST (long)
205 #endif /* HAVE_LONG_LONG */
209 * Do we have the strtoll() function?
212 #define HAVE_STRTOLL 1
215 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
216 #endif /* !HAVE_STRTOLL */
220 * Do we have the strXXX() functions?
223 #define HAVE_STRDUP 1
224 #define HAVE_STRLCAT 1
225 #define HAVE_STRLCPY 1
229 * Do we have the geteuid() function?
232 #define HAVE_GETEUID 1
236 * Do we have the setpgid() function?
239 #define HAVE_SETPGID 1
243 * Do we have the vsyslog() function?
246 #define HAVE_VSYSLOG 1
250 * Do we have the systemd journal functions?
253 /*#undef HAVE_SYSTEMD_SD_JOURNAL_H*/
257 * Do we have the (v)snprintf() functions?
260 #define HAVE_SNPRINTF 1
261 #define HAVE_VSNPRINTF 1
265 * What signal functions to use?
268 #define HAVE_SIGSET 1
269 #define HAVE_SIGACTION 1
273 * What wait functions to use?
276 #define HAVE_WAITPID 1
281 * Do we have the mallinfo function and malloc.h?
284 /* #undef HAVE_MALLINFO */
285 /* #undef HAVE_MALLOC_H */
289 * Do we have the POSIX ACL functions?
292 #define HAVE_ACL_INIT 1
296 * Do we have the langinfo.h header file?
299 #define HAVE_LANGINFO_H 1
303 * Which encryption libraries do we have?
306 #define HAVE_CDSASSL 1
307 /* #undef HAVE_GNUTLS */
312 * Do we have the gnutls_transport_set_pull_timeout_function function?
315 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
319 * Do we have the gnutls_priority_set_direct function?
322 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
326 * What Security framework headers do we have?
330 # define HAVE_AUTHORIZATION_H 1
331 #endif /* !TARGET_OS_IOS */
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 */
344 * Do we have the cssmErrorString function?
348 # define HAVE_CSSMERRORSTRING 1
349 #endif /* !TARGET_OS_IOS */
353 * Do we have the SecGenerateSelfSignedCertificate function?
357 # define HAVE_SECGENERATESELFSIGNEDCERTIFICATE 1
358 #endif /* TARGET_OS_IOS */
362 * Do we have the SecKeychainOpen function?
366 # define HAVE_SECKEYCHAINOPEN 1
367 #endif /* !TARGET_OS_IOS */
371 * Do we have (a working) SSLSetEnabledCiphers function?
374 #define HAVE_SSLSETENABLEDCIPHERS 1
378 * Do we have libpaper?
381 /* #undef HAVE_LIBPAPER */
385 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
392 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
395 /* #undef HAVE_AVAHI */
399 * Do we have <sys/ioctl.h>?
402 #define HAVE_SYS_IOCTL_H 1
406 * Does the "stat" structure contain the "st_gen" member?
409 #define HAVE_ST_GEN 1
413 * Does the "tm" structure contain the "tm_gmtoff" member?
416 #define HAVE_TM_GMTOFF 1
420 * Do we have rresvport_af()?
423 #define HAVE_RRESVPORT_AF 1
427 * Do we have getaddrinfo()?
430 #define HAVE_GETADDRINFO 1
434 * Do we have getnameinfo()?
437 #define HAVE_GETNAMEINFO 1
441 * Do we have getifaddrs()?
444 #define HAVE_GETIFADDRS 1
448 * Do we have hstrerror()?
451 #define HAVE_HSTRERROR 1
455 * Do we have res_init()?
458 #define HAVE_RES_INIT 1
462 * Do we have <resolv.h>
465 #define HAVE_RESOLV_H 1
469 * Do we have the <sys/sockio.h> header file?
472 #define HAVE_SYS_SOCKIO_H 1
476 * Does the sockaddr structure contain an sa_len parameter?
479 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
483 * Do we have pthread support?
486 #define HAVE_PTHREAD_H 1
490 * Do we have on-demand support (launchd/systemd/upstart)?
493 #define HAVE_ONDEMAND 1
497 * Do we have launchd support?
500 #define HAVE_LAUNCH_H 1
501 #define HAVE_LAUNCHD 1
505 * Do we have systemd support?
508 /* #undef HAVE_SYSTEMD */
512 * Do we have upstart support?
515 /* #undef HAVE_UPSTART */
519 * Various scripting languages...
524 # define CUPS_JAVA "/usr/bin/java"
526 # define CUPS_PERL "/usr/bin/perl"
528 # define CUPS_PHP "/usr/bin/php"
529 # define HAVE_PYTHON 1
530 # define CUPS_PYTHON "/usr/bin/python"
531 #endif /* !TARGET_OS_IOS */
535 * Do we have CoreFoundation public and private headers?
538 #define HAVE_COREFOUNDATION_H 1
539 /* #undef HAVE_CFPRIV_H */
540 /* #undef HAVE_CFBUNDLEPRIV_H */
544 * Do we have ApplicationServices public headers?
548 # define HAVE_APPLICATIONSERVICES_H 1
549 #endif /* !TARGET_OS_IOS */
553 * Do we have the SCDynamicStoreCopyComputerName function?
557 # define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
558 #endif /* !TARGET_OS_IOS */
562 * Do we have the getgrouplist() function?
565 #define HAVE_GETGROUPLIST 1
569 * Do we have macOS 10.4's mbr_XXX functions?
572 #define HAVE_MEMBERSHIP_H 1
573 /* #undef HAVE_MEMBERSHIPPRIV_H */
574 #define HAVE_MBR_UID_TO_UUID 1
578 * Do we have Darwin's notify_post header and function?
581 #define HAVE_NOTIFY_H 1
582 #define HAVE_NOTIFY_POST 1
589 /* #undef HAVE_DBUS */
590 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
594 * Do we have the GSSAPI support library (for Kerberos support)?
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 */
609 * Default GSS service name...
612 #define CUPS_DEFAULT_GSSSERVICENAME "host"
616 * Select/poll interfaces...
620 /* #undef HAVE_EPOLL */
621 #define HAVE_KQUEUE 1
625 * Do we have the <dlfcn.h> header?
628 #define HAVE_DLFCN_H 1
632 * Do we have <sys/param.h>?
635 #define HAVE_SYS_PARAM_H 1
639 * Do we have <sys/ucred.h>?
642 #define HAVE_SYS_UCRED_H 1
646 * Do we have removefile()?
649 #define HAVE_REMOVEFILE 1
653 * Do we have <sandbox.h>?
656 #define HAVE_SANDBOX_H 1
660 * Which random number generator function to use...
663 #define HAVE_ARC4RANDOM 1
664 #define HAVE_RANDOM 1
665 #define HAVE_LRAND48 1
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)
677 # define CUPS_RAND() rand()
678 # define CUPS_SRAND(v) srand(v)
679 #endif /* HAVE_ARC4RANDOM */
686 /* #undef HAVE_LIBUSB */
690 * Do we have libwrap and tcpd.h?
693 /* #undef HAVE_TCPD_H */
697 * Do we have <iconv.h>?
700 #define HAVE_ICONV_H 1
704 * Do we have statfs or statvfs and one of the corresponding headers?
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 */
716 * Location of macOS localization bundle, if any.
720 # define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
721 #endif /* !TARGET_OS_IOS */
729 /* #undef HAVE_XPC_PRIVATE_H */
733 * Do we have Mini-XML?
736 /* #undef HAVE_MXML_H */
740 * Do we have the C99 abs() function?
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
); }
752 # define abs(x) ((x) < 0 ? -(x) : (x))
753 # endif /* __GNUC__ || __STDC_VERSION__ */
754 #endif /* !HAVE_ABS && !abs */
756 #endif /* !_CUPS_CONFIG_H_ */