]>
git.ipfire.org Git - thirdparty/cups.git/blob - xcode/config.h
2 * Configuration file for CUPS and Xcode.
4 * Copyright 2007-2021 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products.
7 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
10 #ifndef _CUPS_CONFIG_H_
11 #define _CUPS_CONFIG_H_
13 #include <AvailabilityMacros.h>
14 #include <TargetConditionals.h>
18 * Version of software...
21 #define CUPS_SVERSION "CUPS v2.3.5"
22 #define CUPS_MINIMAL "CUPS/2.3.5"
26 * Default user and groups...
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"
37 * Default file permissions...
40 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
41 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
45 * Default logging settings...
48 #define CUPS_DEFAULT_LOG_LEVEL "warn"
49 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
53 * Default fatal error settings...
56 #define CUPS_DEFAULT_FATAL_ERRORS "config"
60 * Default browsing settings...
63 #define CUPS_DEFAULT_BROWSING 1
64 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
65 #define CUPS_DEFAULT_DEFAULT_SHARED 1
72 #define CUPS_DEFAULT_IPP_PORT 631
76 * Default printcap file...
79 #define CUPS_DEFAULT_PRINTCAP "/Library/Preferences/org.cups.printers.plist"
83 * Default Samba and LPD config files...
86 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
87 #define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
91 * Default MaxCopies value...
94 #define CUPS_DEFAULT_MAX_COPIES 9999
98 * Do we have domain socket support, and if so what is the default one?
101 #define CUPS_DEFAULT_DOMAINSOCKET "/private/var/run/cupsd"
105 * Default WebInterface value...
108 #define CUPS_DEFAULT_WEBIF 0
112 * Where are files stored?
114 * Note: These are defaults, which can be overridden by environment
115 * variables at run-time...
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"
133 * Do we have posix_spawn?
136 #define HAVE_POSIX_SPAWN 1
144 #define HAVE_INFLATECOPY 1
148 * Do we have PAM stuff?
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 */
160 * Do we have <shadow.h>?
163 /* #undef HAVE_SHADOW_H */
167 * Do we have <crypt.h>?
170 /* #undef HAVE_CRYPT_H */
177 #define HAVE_STDINT_H 1
181 * Use <string.h>, <strings.h>, and/or <bstring.h>?
184 #define HAVE_STRING_H 1
185 #define HAVE_STRINGS_H 1
186 /* #undef HAVE_BSTRING_H */
190 * Do we have the long long type?
193 #define HAVE_LONG_LONG 1
195 #ifdef HAVE_LONG_LONG
196 # define CUPS_LLFMT "%lld"
197 # define CUPS_LLCAST (long long)
199 # define CUPS_LLFMT "%ld"
200 # define CUPS_LLCAST (long)
201 #endif /* HAVE_LONG_LONG */
205 * Do we have the strtoll() function?
208 #define HAVE_STRTOLL 1
211 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
212 #endif /* !HAVE_STRTOLL */
216 * Do we have the strXXX() functions?
219 #define HAVE_STRDUP 1
220 #define HAVE_STRLCAT 1
221 #define HAVE_STRLCPY 1
225 * Do we have the geteuid() function?
228 #define HAVE_GETEUID 1
232 * Do we have the setpgid() function?
235 #define HAVE_SETPGID 1
239 * Do we have the vsyslog() function?
242 #define HAVE_VSYSLOG 1
246 * Do we have the systemd journal functions?
249 /* #undef HAVE_SYSTEMD_SD_JOURNAL_H */
253 * Do we have the (v)snprintf() functions?
256 #define HAVE_SNPRINTF 1
257 #define HAVE_VSNPRINTF 1
261 * What signal functions to use?
264 #define HAVE_SIGSET 1
265 #define HAVE_SIGACTION 1
269 * What wait functions to use?
272 #define HAVE_WAITPID 1
277 * Do we have the mallinfo function and malloc.h?
280 /* #undef HAVE_MALLINFO */
281 /* #undef HAVE_MALLOC_H */
285 * Do we have the POSIX ACL functions?
288 #define HAVE_ACL_INIT 1
292 * Do we have the langinfo.h header file?
295 #define HAVE_LANGINFO_H 1
299 * Which encryption libraries do we have?
302 #define HAVE_CDSASSL 1
303 /* #undef HAVE_GNUTLS */
304 /* #undef HAVE_SSPISSL */
309 * Do we have the gnutls_transport_set_pull_timeout_function function?
312 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
316 * Do we have the gnutls_priority_set_direct function?
319 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
323 * What Security framework headers do we have?
327 # define HAVE_AUTHORIZATION_H 1
328 #endif /* TARGET_OS_OSX */
330 #define HAVE_SECCERTIFICATE_H 1
331 #define HAVE_SECITEM_H 1
332 #define HAVE_SECPOLICY_H 1
336 * Do we have the SecGenerateSelfSignedCertificate function?
340 # define HAVE_SECGENERATESELFSIGNEDCERTIFICATE 1
341 #endif /* !TARGET_OS_OSX */
345 * Do we have libpaper?
348 /* #undef HAVE_LIBPAPER */
352 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
359 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
362 /* #undef HAVE_AVAHI */
366 * Do we have <sys/ioctl.h>?
369 #define HAVE_SYS_IOCTL_H 1
373 * Does the "stat" structure contain the "st_gen" member?
376 #define HAVE_ST_GEN 1
380 * Does the "tm" structure contain the "tm_gmtoff" member?
383 #define HAVE_TM_GMTOFF 1
387 * Do we have rresvport_af()?
390 #define HAVE_RRESVPORT_AF 1
394 * Do we have getaddrinfo()?
397 #define HAVE_GETADDRINFO 1
401 * Do we have getnameinfo()?
404 #define HAVE_GETNAMEINFO 1
408 * Do we have getifaddrs()?
411 #define HAVE_GETIFADDRS 1
415 * Do we have hstrerror()?
418 #define HAVE_HSTRERROR 1
422 * Do we have res_init()?
425 #define HAVE_RES_INIT 1
429 * Do we have <resolv.h>
432 #define HAVE_RESOLV_H 1
436 * Do we have the <sys/sockio.h> header file?
439 #define HAVE_SYS_SOCKIO_H 1
443 * Does the sockaddr structure contain an sa_len parameter?
446 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
450 * Do we have pthread support?
453 #define HAVE_PTHREAD_H 1
457 * Do we have on-demand support (launchd/systemd/upstart)?
460 #define HAVE_ONDEMAND 1
464 * Do we have launchd support?
467 #define HAVE_LAUNCH_H 1
468 #define HAVE_LAUNCHD 1
472 * Do we have systemd support?
475 /* #undef HAVE_SYSTEMD */
479 * Do we have upstart support?
482 /* #undef HAVE_UPSTART */
486 * Do we have CoreFoundation public headers?
489 #define HAVE_COREFOUNDATION_H 1
493 * Do we have ApplicationServices public headers?
497 # define HAVE_APPLICATIONSERVICES_H 1
498 #endif /* TARGET_OS_OSX */
502 * Do we have the SCDynamicStoreCopyComputerName function?
506 # define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
507 #endif /* TARGET_OS_OSX */
511 * Do we have the getgrouplist() function?
514 #define HAVE_GETGROUPLIST 1
518 * Do we have macOS 10.4's mbr_XXX functions?
521 #define HAVE_MEMBERSHIP_H 1
522 #define HAVE_MBR_UID_TO_UUID 1
526 * Do we have Darwin's notify_post header and function?
529 #define HAVE_NOTIFY_H 1
530 #define HAVE_NOTIFY_POST 1
537 /* #undef HAVE_DBUS */
538 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
539 /* #undef HAVE_DBUS_THREADS_INIT */
543 * Do we have the GSSAPI support library (for Kerberos support)?
547 # define HAVE_GSS_ACQUIRED_CRED_EX_F 1
548 # define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
549 # define HAVE_GSS_GSSAPI_H 1
550 /* #undef HAVE_GSS_GSSAPI_SPI_H */
551 # define HAVE_GSSAPI 1
552 /* #undef HAVE_GSSAPI_GSSAPI_H */
553 /* #undef HAVE_GSSAPI_H */
554 #endif /* TARGET_OS_OSX */
558 * Default GSS service name...
561 #define CUPS_DEFAULT_GSSSERVICENAME "host"
565 * Select/poll interfaces...
569 /* #undef HAVE_EPOLL */
570 #define HAVE_KQUEUE 1
574 * Do we have the <dlfcn.h> header?
577 #define HAVE_DLFCN_H 1
581 * Do we have <sys/param.h>?
584 #define HAVE_SYS_PARAM_H 1
588 * Do we have <sys/ucred.h>?
591 #define HAVE_SYS_UCRED_H 1
595 * Do we have removefile()?
598 #define HAVE_REMOVEFILE 1
602 * Do we have <sandbox.h>?
605 #define HAVE_SANDBOX_H 1
609 * Which random number generator function to use...
612 #define HAVE_ARC4RANDOM 1
613 #define HAVE_RANDOM 1
614 #define HAVE_LRAND48 1
616 #ifdef HAVE_ARC4RANDOM
617 # define CUPS_RAND() arc4random()
618 # define CUPS_SRAND(v)
619 #elif defined(HAVE_RANDOM)
620 # define CUPS_RAND() random()
621 # define CUPS_SRAND(v) srandom(v)
622 #elif defined(HAVE_LRAND48)
623 # define CUPS_RAND() lrand48()
624 # define CUPS_SRAND(v) srand48(v)
626 # define CUPS_RAND() rand()
627 # define CUPS_SRAND(v) srand(v)
628 #endif /* HAVE_ARC4RANDOM */
635 /* #undef HAVE_LIBUSB */
639 * Do we have libwrap and tcpd.h?
642 /* #undef HAVE_TCPD_H */
646 * Do we have <iconv.h>?
649 #define HAVE_ICONV_H 1
653 * Do we have statfs or statvfs and one of the corresponding headers?
656 #define HAVE_STATFS 1
657 #define HAVE_STATVFS 1
658 #define HAVE_SYS_MOUNT_H 1
659 /* #undef HAVE_SYS_STATFS_H */
660 #define HAVE_SYS_STATVFS_H 1
661 /* #undef HAVE_SYS_VFS_H */
665 * Location of localization bundle, if any.
669 # define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
671 # define CUPS_BUNDLEDIR "/System/Library/PrivateFrameworks/PrintKit.framework/Versions/A"
672 #endif /* TARGET_OS_OSX */
683 * Do we have the C99 abs() function?
687 #if !defined(HAVE_ABS) && !defined(abs)
688 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
689 # define abs(x) _cups_abs(x)
690 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
691 # elif defined(_MSC_VER)
692 # define abs(x) _cups_abs(x)
693 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
695 # define abs(x) ((x) < 0 ? -(x) : (x))
696 # endif /* __GNUC__ || __STDC_VERSION__ */
697 #endif /* !HAVE_ABS && !abs */
699 #endif /* !_CUPS_CONFIG_H_ */