]>
git.ipfire.org Git - thirdparty/cups.git/blob - config.h.in
2 * Configuration file for CUPS.
4 * Copyright 2007-2019 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products.
7 * Licensed under Apache License v2.0. See the file "LICENSE" for more
11 #ifndef _CUPS_CONFIG_H_
12 #define _CUPS_CONFIG_H_
15 * Version of software...
18 #define CUPS_SVERSION ""
19 #define CUPS_MINIMAL ""
24 * Default user and groups...
27 #define CUPS_DEFAULT_USER "lp"
28 #define CUPS_DEFAULT_GROUP "sys"
29 #define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
30 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@SYSTEM"
31 #define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
35 * Default file permissions...
38 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
39 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
43 * Default logging settings...
46 #define CUPS_DEFAULT_LOG_LEVEL "warn"
47 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
51 * Default fatal error settings...
54 #define CUPS_DEFAULT_FATAL_ERRORS "config"
58 * Default browsing settings...
61 #define CUPS_DEFAULT_BROWSING 1
62 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
63 #define CUPS_DEFAULT_DEFAULT_SHARED 1
70 #define CUPS_DEFAULT_IPP_PORT 631
74 * Default printcap file...
77 #define CUPS_DEFAULT_PRINTCAP "/etc/printcap"
81 * Default Samba and LPD config files...
84 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
85 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
89 * Default MaxCopies value...
92 #define CUPS_DEFAULT_MAX_COPIES 9999
96 * Do we have domain socket support, and if so what is the default one?
99 #undef CUPS_DEFAULT_DOMAINSOCKET
103 * Default WebInterface value...
106 #undef CUPS_DEFAULT_WEBIF
110 * Where are files stored?
112 * Note: These are defaults, which can be overridden by environment
113 * variables at run-time...
116 #define CUPS_BINDIR "/usr/bin"
117 #define CUPS_CACHEDIR "/var/cache/cups"
118 #define CUPS_DATADIR "/usr/share/cups"
119 #define CUPS_DOCROOT "/usr/share/doc/cups"
120 #define CUPS_FONTPATH "/usr/share/cups/fonts"
121 #define CUPS_LOCALEDIR "/usr/share/locale"
122 #define CUPS_LOGDIR "/var/logs/cups"
123 #define CUPS_REQUESTS "/var/spool/cups"
124 #define CUPS_SBINDIR "/usr/sbin"
125 #define CUPS_SERVERBIN "/usr/lib/cups"
126 #define CUPS_SERVERROOT "/etc/cups"
127 #define CUPS_STATEDIR "/var/run/cups"
131 * Do we have posix_spawn?
134 #undef HAVE_POSIX_SPAWN
142 #undef HAVE_INFLATECOPY
146 * Do we have PAM stuff?
149 #define HAVE_LIBPAM 0
150 #undef HAVE_PAM_PAM_APPL_H
151 #undef HAVE_PAM_SET_ITEM
152 #undef HAVE_PAM_SETCRED
156 * Do we have <shadow.h>?
163 * Do we have <crypt.h>?
177 * Use <string.h>, <strings.h>, and/or <bstring.h>?
181 #undef HAVE_STRINGS_H
182 #undef HAVE_BSTRING_H
186 * Do we have the long long type?
189 #undef HAVE_LONG_LONG
191 #ifdef HAVE_LONG_LONG
192 # define CUPS_LLFMT "%lld"
193 # define CUPS_LLCAST (long long)
195 # define CUPS_LLFMT "%ld"
196 # define CUPS_LLCAST (long)
197 #endif /* HAVE_LONG_LONG */
201 * Do we have the strtoll() function?
207 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
208 #endif /* !HAVE_STRTOLL */
212 * Do we have the strXXX() functions?
221 * Do we have the geteuid() function?
228 * Do we have the setpgid() function?
235 * Do we have the vsyslog() function?
242 * Do we have the systemd journal functions?
245 #undef HAVE_SYSTEMD_SD_JOURNAL_H
249 * Do we have the (v)snprintf() functions?
253 #undef HAVE_VSNPRINTF
257 * What signal functions to use?
261 #undef HAVE_SIGACTION
265 * What wait functions to use?
273 * Do we have the mallinfo function and malloc.h?
281 * Do we have the POSIX ACL functions?
288 * Do we have the langinfo.h header file?
291 #undef HAVE_LANGINFO_H
295 * Which encryption libraries do we have?
305 * Do we have the gnutls_fips140_set_mode function?
308 #undef HAVE_GNUTLS_FIPS140_SET_MODE
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?
329 #undef HAVE_AUTHORIZATION_H
330 #undef HAVE_SECCERTIFICATE_H
331 #undef HAVE_SECITEM_H
332 #undef HAVE_SECPOLICY_H
336 * Do we have the SecGenerateSelfSignedCertificate function?
339 #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE
343 * Do we have libpaper?
350 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
357 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
364 * Do we have <sys/ioctl.h>?
367 #undef HAVE_SYS_IOCTL_H
371 * Does the "stat" structure contain the "st_gen" member?
378 * Does the "tm" structure contain the "tm_gmtoff" member?
381 #undef HAVE_TM_GMTOFF
385 * Do we have rresvport_af()?
388 #undef HAVE_RRESVPORT_AF
392 * Do we have getaddrinfo()?
395 #undef HAVE_GETADDRINFO
399 * Do we have getnameinfo()?
402 #undef HAVE_GETNAMEINFO
406 * Do we have getifaddrs()?
409 #undef HAVE_GETIFADDRS
413 * Do we have hstrerror()?
416 #undef HAVE_HSTRERROR
420 * Do we have res_init()?
427 * Do we have <resolv.h>
434 * Do we have the <sys/sockio.h> header file?
437 #undef HAVE_SYS_SOCKIO_H
441 * Does the sockaddr structure contain an sa_len parameter?
444 #undef HAVE_STRUCT_SOCKADDR_SA_LEN
448 * Do we have pthread support?
451 #undef HAVE_PTHREAD_H
455 * Do we have on-demand support (launchd/systemd/upstart)?
462 * Do we have launchd support?
470 * Do we have systemd support?
477 * Do we have upstart support?
484 * Do we have CoreFoundation public headers?
487 #undef HAVE_COREFOUNDATION_H
491 * Do we have ApplicationServices public headers?
494 #undef HAVE_APPLICATIONSERVICES_H
498 * Do we have the SCDynamicStoreCopyComputerName function?
501 #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
505 * Do we have the getgrouplist() function?
508 #undef HAVE_GETGROUPLIST
512 * Do we have macOS 10.4's mbr_XXX functions?
515 #undef HAVE_MEMBERSHIP_H
516 #undef HAVE_MBR_UID_TO_UUID
520 * Do we have Darwin's notify_post header and function?
524 #undef HAVE_NOTIFY_POST
532 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
533 #undef HAVE_DBUS_THREADS_INIT
537 * Do we have the GSSAPI support library (for Kerberos support)?
540 #undef HAVE_GSS_ACQUIRE_CRED_EX_F
541 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
542 #undef HAVE_GSS_GSSAPI_H
543 #undef HAVE_GSS_GSSAPI_SPI_H
545 #undef HAVE_GSSAPI_GSSAPI_H
550 * Default GSS service name...
553 #define CUPS_DEFAULT_GSSSERVICENAME ""
557 * Select/poll interfaces...
566 * Do we have the <dlfcn.h> header?
573 * Do we have <sys/param.h>?
576 #undef HAVE_SYS_PARAM_H
580 * Do we have <sys/ucred.h>?
583 #undef HAVE_SYS_UCRED_H
587 * Do we have removefile()?
590 #undef HAVE_REMOVEFILE
594 * Do we have <sandbox.h>?
597 #undef HAVE_SANDBOX_H
601 * Which random number generator function to use...
604 #undef HAVE_ARC4RANDOM
608 #ifdef HAVE_ARC4RANDOM
609 # define CUPS_RAND() arc4random()
610 # define CUPS_SRAND(v)
611 #elif defined(HAVE_RANDOM)
612 # define CUPS_RAND() random()
613 # define CUPS_SRAND(v) srandom(v)
614 #elif defined(HAVE_LRAND48)
615 # define CUPS_RAND() lrand48()
616 # define CUPS_SRAND(v) srand48(v)
618 # define CUPS_RAND() rand()
619 # define CUPS_SRAND(v) srand(v)
620 #endif /* HAVE_ARC4RANDOM */
631 * Do we have libwrap and tcpd.h?
638 * Do we have <iconv.h>?
645 * Do we have statfs or statvfs and one of the corresponding headers?
650 #undef HAVE_SYS_MOUNT_H
651 #undef HAVE_SYS_STATFS_H
652 #undef HAVE_SYS_STATVFS_H
653 #undef HAVE_SYS_VFS_H
657 * Location of macOS localization bundle, if any.
660 #undef CUPS_BUNDLEDIR
671 * Do we have the C99 abs() function?
675 #if !defined(HAVE_ABS) && !defined(abs)
676 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
677 # define abs(x) _cups_abs(x)
678 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
679 # elif defined(_MSC_VER)
680 # define abs(x) _cups_abs(x)
681 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
683 # define abs(x) ((x) < 0 ? -(x) : (x))
684 # endif /* __GNUC__ || __STDC_VERSION__ */
685 #endif /* !HAVE_ABS && !abs */
687 #endif /* !_CUPS_CONFIG_H_ */