]>
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 ""
23 * Default user and groups...
26 #define CUPS_DEFAULT_USER "lp"
27 #define CUPS_DEFAULT_GROUP "sys"
28 #define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
29 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@SYSTEM"
30 #define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
34 * Default file permissions...
37 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
38 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
42 * Default logging settings...
45 #define CUPS_DEFAULT_LOG_LEVEL "warn"
46 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
50 * Default fatal error settings...
53 #define CUPS_DEFAULT_FATAL_ERRORS "config"
57 * Default browsing settings...
60 #define CUPS_DEFAULT_BROWSING 1
61 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
62 #define CUPS_DEFAULT_DEFAULT_SHARED 1
69 #define CUPS_DEFAULT_IPP_PORT 631
73 * Default printcap file...
76 #define CUPS_DEFAULT_PRINTCAP "/etc/printcap"
80 * Default Samba and LPD config files...
83 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
84 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
88 * Default MaxCopies value...
91 #define CUPS_DEFAULT_MAX_COPIES 9999
95 * Do we have domain socket support, and if so what is the default one?
98 #undef CUPS_DEFAULT_DOMAINSOCKET
102 * Default WebInterface value...
105 #undef CUPS_DEFAULT_WEBIF
109 * Where are files stored?
111 * Note: These are defaults, which can be overridden by environment
112 * variables at run-time...
115 #define CUPS_BINDIR "/usr/bin"
116 #define CUPS_CACHEDIR "/var/cache/cups"
117 #define CUPS_DATADIR "/usr/share/cups"
118 #define CUPS_DOCROOT "/usr/share/doc/cups"
119 #define CUPS_FONTPATH "/usr/share/cups/fonts"
120 #define CUPS_LOCALEDIR "/usr/share/locale"
121 #define CUPS_LOGDIR "/var/logs/cups"
122 #define CUPS_REQUESTS "/var/spool/cups"
123 #define CUPS_SBINDIR "/usr/sbin"
124 #define CUPS_SERVERBIN "/usr/lib/cups"
125 #define CUPS_SERVERROOT "/etc/cups"
126 #define CUPS_STATEDIR "/var/run/cups"
130 * Do we have posix_spawn?
133 #undef HAVE_POSIX_SPAWN
141 #undef HAVE_INFLATECOPY
145 * Do we have PAM stuff?
148 #define HAVE_LIBPAM 0
149 #undef HAVE_PAM_PAM_APPL_H
150 #undef HAVE_PAM_SET_ITEM
151 #undef HAVE_PAM_SETCRED
155 * Do we have <shadow.h>?
162 * Do we have <crypt.h>?
176 * Use <string.h>, <strings.h>, and/or <bstring.h>?
180 #undef HAVE_STRINGS_H
181 #undef HAVE_BSTRING_H
185 * Do we have the long long type?
188 #undef HAVE_LONG_LONG
190 #ifdef HAVE_LONG_LONG
191 # define CUPS_LLFMT "%lld"
192 # define CUPS_LLCAST (long long)
194 # define CUPS_LLFMT "%ld"
195 # define CUPS_LLCAST (long)
196 #endif /* HAVE_LONG_LONG */
200 * Do we have the strtoll() function?
206 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
207 #endif /* !HAVE_STRTOLL */
211 * Do we have the strXXX() functions?
220 * Do we have the geteuid() function?
227 * Do we have the setpgid() function?
234 * Do we have the vsyslog() function?
241 * Do we have the systemd journal functions?
244 #undef HAVE_SYSTEMD_SD_JOURNAL_H
248 * Do we have the (v)snprintf() functions?
252 #undef HAVE_VSNPRINTF
256 * What signal functions to use?
260 #undef HAVE_SIGACTION
264 * What wait functions to use?
272 * Do we have the mallinfo function and malloc.h?
280 * Do we have the POSIX ACL functions?
287 * Do we have the langinfo.h header file?
290 #undef HAVE_LANGINFO_H
294 * Which encryption libraries do we have?
304 * Do we have the gnutls_transport_set_pull_timeout_function function?
307 #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
311 * Do we have the gnutls_priority_set_direct function?
314 #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT
318 * What Security framework headers do we have?
321 #undef HAVE_AUTHORIZATION_H
322 #undef HAVE_SECCERTIFICATE_H
323 #undef HAVE_SECITEM_H
324 #undef HAVE_SECPOLICY_H
328 * Do we have the SecGenerateSelfSignedCertificate function?
331 #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE
335 * Do we have libpaper?
342 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
349 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
356 * Do we have <sys/ioctl.h>?
359 #undef HAVE_SYS_IOCTL_H
363 * Does the "stat" structure contain the "st_gen" member?
370 * Does the "tm" structure contain the "tm_gmtoff" member?
373 #undef HAVE_TM_GMTOFF
377 * Do we have rresvport_af()?
380 #undef HAVE_RRESVPORT_AF
384 * Do we have getaddrinfo()?
387 #undef HAVE_GETADDRINFO
391 * Do we have getnameinfo()?
394 #undef HAVE_GETNAMEINFO
398 * Do we have getifaddrs()?
401 #undef HAVE_GETIFADDRS
405 * Do we have hstrerror()?
408 #undef HAVE_HSTRERROR
412 * Do we have res_init()?
419 * Do we have <resolv.h>
426 * Do we have the <sys/sockio.h> header file?
429 #undef HAVE_SYS_SOCKIO_H
433 * Does the sockaddr structure contain an sa_len parameter?
436 #undef HAVE_STRUCT_SOCKADDR_SA_LEN
440 * Do we have pthread support?
443 #undef HAVE_PTHREAD_H
447 * Do we have on-demand support (launchd/systemd/upstart)?
454 * Do we have launchd support?
462 * Do we have systemd support?
469 * Do we have upstart support?
476 * Do we have CoreFoundation public headers?
479 #undef HAVE_COREFOUNDATION_H
483 * Do we have ApplicationServices public headers?
486 #undef HAVE_APPLICATIONSERVICES_H
490 * Do we have the SCDynamicStoreCopyComputerName function?
493 #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
497 * Do we have the getgrouplist() function?
500 #undef HAVE_GETGROUPLIST
504 * Do we have macOS 10.4's mbr_XXX functions?
507 #undef HAVE_MEMBERSHIP_H
508 #undef HAVE_MBR_UID_TO_UUID
512 * Do we have Darwin's notify_post header and function?
516 #undef HAVE_NOTIFY_POST
524 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
525 #undef HAVE_DBUS_THREADS_INIT
529 * Do we have the GSSAPI support library (for Kerberos support)?
532 #undef HAVE_GSS_ACQUIRE_CRED_EX_F
533 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
534 #undef HAVE_GSS_GSSAPI_H
535 #undef HAVE_GSS_GSSAPI_SPI_H
537 #undef HAVE_GSSAPI_GSSAPI_H
542 * Default GSS service name...
545 #define CUPS_DEFAULT_GSSSERVICENAME ""
549 * Select/poll interfaces...
558 * Do we have the <dlfcn.h> header?
565 * Do we have <sys/param.h>?
568 #undef HAVE_SYS_PARAM_H
572 * Do we have <sys/ucred.h>?
575 #undef HAVE_SYS_UCRED_H
579 * Do we have removefile()?
582 #undef HAVE_REMOVEFILE
586 * Do we have <sandbox.h>?
589 #undef HAVE_SANDBOX_H
593 * Which random number generator function to use...
596 #undef HAVE_ARC4RANDOM
600 #ifdef HAVE_ARC4RANDOM
601 # define CUPS_RAND() arc4random()
602 # define CUPS_SRAND(v)
603 #elif defined(HAVE_RANDOM)
604 # define CUPS_RAND() random()
605 # define CUPS_SRAND(v) srandom(v)
606 #elif defined(HAVE_LRAND48)
607 # define CUPS_RAND() lrand48()
608 # define CUPS_SRAND(v) srand48(v)
610 # define CUPS_RAND() rand()
611 # define CUPS_SRAND(v) srand(v)
612 #endif /* HAVE_ARC4RANDOM */
623 * Do we have libwrap and tcpd.h?
630 * Do we have <iconv.h>?
637 * Do we have statfs or statvfs and one of the corresponding headers?
642 #undef HAVE_SYS_MOUNT_H
643 #undef HAVE_SYS_STATFS_H
644 #undef HAVE_SYS_STATVFS_H
645 #undef HAVE_SYS_VFS_H
649 * Location of macOS localization bundle, if any.
652 #undef CUPS_BUNDLEDIR
663 * Do we have the C99 abs() function?
667 #if !defined(HAVE_ABS) && !defined(abs)
668 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
669 # define abs(x) _cups_abs(x)
670 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
671 # elif defined(_MSC_VER)
672 # define abs(x) _cups_abs(x)
673 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
675 # define abs(x) ((x) < 0 ? -(x) : (x))
676 # endif /* __GNUC__ || __STDC_VERSION__ */
677 #endif /* !HAVE_ABS && !abs */
679 #endif /* !_CUPS_CONFIG_H_ */