]>
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_transport_set_pull_timeout_function function?
308 #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
312 * Do we have the gnutls_priority_set_direct function?
315 #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT
319 * What Security framework headers do we have?
322 #undef HAVE_AUTHORIZATION_H
323 #undef HAVE_SECCERTIFICATE_H
324 #undef HAVE_SECITEM_H
325 #undef HAVE_SECPOLICY_H
329 * Do we have the SecGenerateSelfSignedCertificate function?
332 #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE
336 * Do we have libpaper?
343 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
350 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
357 * Do we have <sys/ioctl.h>?
360 #undef HAVE_SYS_IOCTL_H
364 * Does the "stat" structure contain the "st_gen" member?
371 * Does the "tm" structure contain the "tm_gmtoff" member?
374 #undef HAVE_TM_GMTOFF
378 * Do we have rresvport_af()?
381 #undef HAVE_RRESVPORT_AF
385 * Do we have getaddrinfo()?
388 #undef HAVE_GETADDRINFO
392 * Do we have getnameinfo()?
395 #undef HAVE_GETNAMEINFO
399 * Do we have getifaddrs()?
402 #undef HAVE_GETIFADDRS
406 * Do we have hstrerror()?
409 #undef HAVE_HSTRERROR
413 * Do we have res_init()?
420 * Do we have <resolv.h>
427 * Do we have the <sys/sockio.h> header file?
430 #undef HAVE_SYS_SOCKIO_H
434 * Does the sockaddr structure contain an sa_len parameter?
437 #undef HAVE_STRUCT_SOCKADDR_SA_LEN
441 * Do we have pthread support?
444 #undef HAVE_PTHREAD_H
448 * Do we have on-demand support (launchd/systemd/upstart)?
455 * Do we have launchd support?
463 * Do we have systemd support?
470 * Do we have upstart support?
477 * Do we have CoreFoundation public headers?
480 #undef HAVE_COREFOUNDATION_H
484 * Do we have ApplicationServices public headers?
487 #undef HAVE_APPLICATIONSERVICES_H
491 * Do we have the SCDynamicStoreCopyComputerName function?
494 #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
498 * Do we have the getgrouplist() function?
501 #undef HAVE_GETGROUPLIST
505 * Do we have macOS 10.4's mbr_XXX functions?
508 #undef HAVE_MEMBERSHIP_H
509 #undef HAVE_MBR_UID_TO_UUID
513 * Do we have Darwin's notify_post header and function?
517 #undef HAVE_NOTIFY_POST
525 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
526 #undef HAVE_DBUS_THREADS_INIT
530 * Do we have the GSSAPI support library (for Kerberos support)?
533 #undef HAVE_GSS_ACQUIRE_CRED_EX_F
534 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
535 #undef HAVE_GSS_GSSAPI_H
536 #undef HAVE_GSS_GSSAPI_SPI_H
538 #undef HAVE_GSSAPI_GSSAPI_H
543 * Default GSS service name...
546 #define CUPS_DEFAULT_GSSSERVICENAME ""
550 * Select/poll interfaces...
559 * Do we have the <dlfcn.h> header?
566 * Do we have <sys/param.h>?
569 #undef HAVE_SYS_PARAM_H
573 * Do we have <sys/ucred.h>?
576 #undef HAVE_SYS_UCRED_H
580 * Do we have removefile()?
583 #undef HAVE_REMOVEFILE
587 * Do we have <sandbox.h>?
590 #undef HAVE_SANDBOX_H
594 * Which random number generator function to use...
597 #undef HAVE_ARC4RANDOM
601 #ifdef HAVE_ARC4RANDOM
602 # define CUPS_RAND() arc4random()
603 # define CUPS_SRAND(v)
604 #elif defined(HAVE_RANDOM)
605 # define CUPS_RAND() random()
606 # define CUPS_SRAND(v) srandom(v)
607 #elif defined(HAVE_LRAND48)
608 # define CUPS_RAND() lrand48()
609 # define CUPS_SRAND(v) srand48(v)
611 # define CUPS_RAND() rand()
612 # define CUPS_SRAND(v) srand(v)
613 #endif /* HAVE_ARC4RANDOM */
624 * Do we have libwrap and tcpd.h?
631 * Do we have <iconv.h>?
638 * Do we have statfs or statvfs and one of the corresponding headers?
643 #undef HAVE_SYS_MOUNT_H
644 #undef HAVE_SYS_STATFS_H
645 #undef HAVE_SYS_STATVFS_H
646 #undef HAVE_SYS_VFS_H
650 * Location of macOS localization bundle, if any.
653 #undef CUPS_BUNDLEDIR
664 * Do we have the C99 abs() function?
668 #if !defined(HAVE_ABS) && !defined(abs)
669 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
670 # define abs(x) _cups_abs(x)
671 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
672 # elif defined(_MSC_VER)
673 # define abs(x) _cups_abs(x)
674 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
676 # define abs(x) ((x) < 0 ? -(x) : (x))
677 # endif /* __GNUC__ || __STDC_VERSION__ */
678 #endif /* !HAVE_ABS && !abs */
680 #endif /* !_CUPS_CONFIG_H_ */