]> git.ipfire.org Git - thirdparty/cups.git/blob - config.h.in
Make sure we don't use functions that are not available.
[thirdparty/cups.git] / config.h.in
1 /*
2 * "$Id$"
3 *
4 * Configuration file for CUPS.
5 *
6 * Copyright 2007-2013 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
14 */
15
16 #ifndef _CUPS_CONFIG_H_
17 #define _CUPS_CONFIG_H_
18
19 /*
20 * Version of software...
21 */
22
23 #define CUPS_SVERSION ""
24 #define CUPS_MINIMAL ""
25
26
27 /*
28 * Default user and groups...
29 */
30
31 #define CUPS_DEFAULT_USER "lp"
32 #define CUPS_DEFAULT_GROUP "sys"
33 #define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
34 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@SYSTEM"
35 #define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
36
37
38 /*
39 * Default file permissions...
40 */
41
42 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
43 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
44
45
46 /*
47 * Default logging settings...
48 */
49
50 #define CUPS_DEFAULT_LOG_LEVEL "warn"
51 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
52
53
54 /*
55 * Default fatal error settings...
56 */
57
58 #define CUPS_DEFAULT_FATAL_ERRORS "config"
59
60
61 /*
62 * Default browsing settings...
63 */
64
65 #define CUPS_DEFAULT_BROWSING 1
66 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
67 #define CUPS_DEFAULT_DEFAULT_SHARED 1
68
69
70 /*
71 * Default IPP port...
72 */
73
74 #define CUPS_DEFAULT_IPP_PORT 631
75
76
77 /*
78 * Default printcap file...
79 */
80
81 #define CUPS_DEFAULT_PRINTCAP "/etc/printcap"
82
83
84 /*
85 * Default Samba and LPD config files...
86 */
87
88 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
89 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
90
91
92 /*
93 * Default MaxCopies value...
94 */
95
96 #define CUPS_DEFAULT_MAX_COPIES 100
97
98
99 /*
100 * Do we have domain socket support, and if so what is the default one?
101 */
102
103 #undef CUPS_DEFAULT_DOMAINSOCKET
104
105
106 /*
107 * Default WebInterface value...
108 */
109
110 #undef CUPS_DEFAULT_WEBIF
111
112
113 /*
114 * Where are files stored?
115 *
116 * Note: These are defaults, which can be overridden by environment
117 * variables at run-time...
118 */
119
120 #define CUPS_BINDIR "/usr/bin"
121 #define CUPS_CACHEDIR "/var/cache/cups"
122 #define CUPS_DATADIR "/usr/share/cups"
123 #define CUPS_DOCROOT "/usr/share/doc/cups"
124 #define CUPS_FONTPATH "/usr/share/cups/fonts"
125 #define CUPS_LOCALEDIR "/usr/share/locale"
126 #define CUPS_LOGDIR "/var/logs/cups"
127 #define CUPS_REQUESTS "/var/spool/cups"
128 #define CUPS_SBINDIR "/usr/sbin"
129 #define CUPS_SERVERBIN "/usr/lib/cups"
130 #define CUPS_SERVERROOT "/etc/cups"
131 #define CUPS_STATEDIR "/var/run/cups"
132
133
134 /*
135 * Do we have ZLIB?
136 */
137
138 #undef HAVE_LIBZ
139 #undef HAVE_INFLATECOPY
140
141
142 /*
143 * Do we have PAM stuff?
144 */
145
146 #ifndef HAVE_LIBPAM
147 #define HAVE_LIBPAM 0
148 #endif /* !HAVE_LIBPAM */
149
150 #undef HAVE_PAM_PAM_APPL_H
151 #undef HAVE_PAM_SET_ITEM
152 #undef HAVE_PAM_SETCRED
153
154
155 /*
156 * Do we have <shadow.h>?
157 */
158
159 #undef HAVE_SHADOW_H
160
161
162 /*
163 * Do we have <crypt.h>?
164 */
165
166 #undef HAVE_CRYPT_H
167
168
169 /*
170 * Use <stdint.h>?
171 */
172
173 #undef HAVE_STDINT_H
174
175
176 /*
177 * Use <string.h>, <strings.h>, and/or <bstring.h>?
178 */
179
180 #undef HAVE_STRING_H
181 #undef HAVE_STRINGS_H
182 #undef HAVE_BSTRING_H
183
184
185 /*
186 * Do we have the long long type?
187 */
188
189 #undef HAVE_LONG_LONG
190
191 #ifdef HAVE_LONG_LONG
192 # define CUPS_LLFMT "%lld"
193 # define CUPS_LLCAST (long long)
194 #else
195 # define CUPS_LLFMT "%ld"
196 # define CUPS_LLCAST (long)
197 #endif /* HAVE_LONG_LONG */
198
199
200 /*
201 * Do we have the strtoll() function?
202 */
203
204 #undef HAVE_STRTOLL
205
206 #ifndef HAVE_STRTOLL
207 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
208 #endif /* !HAVE_STRTOLL */
209
210
211 /*
212 * Do we have the strXXX() functions?
213 */
214
215 #undef HAVE_STRDUP
216 #undef HAVE_STRLCAT
217 #undef HAVE_STRLCPY
218
219
220 /*
221 * Do we have the geteuid() function?
222 */
223
224 #undef HAVE_GETEUID
225
226
227 /*
228 * Do we have the setpgid() function?
229 */
230
231 #undef HAVE_SETPGID
232
233
234 /*
235 * Do we have the vsyslog() function?
236 */
237
238 #undef HAVE_VSYSLOG
239
240
241 /*
242 * Do we have the (v)snprintf() functions?
243 */
244
245 #undef HAVE_SNPRINTF
246 #undef HAVE_VSNPRINTF
247
248
249 /*
250 * What signal functions to use?
251 */
252
253 #undef HAVE_SIGSET
254 #undef HAVE_SIGACTION
255
256
257 /*
258 * What wait functions to use?
259 */
260
261 #undef HAVE_WAITPID
262 #undef HAVE_WAIT3
263
264
265 /*
266 * Do we have the mallinfo function and malloc.h?
267 */
268
269 #undef HAVE_MALLINFO
270 #undef HAVE_MALLOC_H
271
272
273 /*
274 * Do we have the POSIX ACL functions?
275 */
276
277 #undef HAVE_ACL_INIT
278
279
280 /*
281 * Do we have the langinfo.h header file?
282 */
283
284 #undef HAVE_LANGINFO_H
285
286
287 /*
288 * Which encryption libraries do we have?
289 */
290
291 #undef HAVE_CDSASSL
292 #undef HAVE_GNUTLS
293 #undef HAVE_SSL
294
295
296 /*
297 * What Security framework headers do we have?
298 */
299
300 #undef HAVE_AUTHORIZATION_H
301 #undef HAVE_SECBASEPRIV_H
302 #undef HAVE_SECCERTIFICATE_H
303 #undef HAVE_SECIDENTITYSEARCHPRIV_H
304 #undef HAVE_SECITEM_H
305 #undef HAVE_SECITEMPRIV_H
306 #undef HAVE_SECPOLICY_H
307 #undef HAVE_SECPOLICYPRIV_H
308 #undef HAVE_SECURETRANSPORTPRIV_H
309
310
311 /*
312 * Do we have the cssmErrorString function?
313 */
314
315 #undef HAVE_CSSMERRORSTRING
316
317
318 /*
319 * Do we have the SecGenerateSelfSignedCertificate function?
320 */
321
322 #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE
323
324
325 /*
326 * Do we have the SecKeychainOpen function?
327 */
328
329 #undef HAVE_SECKEYCHAINOPEN
330
331
332 /*
333 * Do we have libpaper?
334 */
335
336 #undef HAVE_LIBPAPER
337
338
339 /*
340 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
341 */
342
343 #undef HAVE_DNSSD
344
345
346 /*
347 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
348 */
349
350 #undef HAVE_AVAHI
351
352
353 /*
354 * Do we have <sys/ioctl.h>?
355 */
356
357 #undef HAVE_SYS_IOCTL_H
358
359
360 /*
361 * Does the "stat" structure contain the "st_gen" member?
362 */
363
364 #undef HAVE_ST_GEN
365
366
367 /*
368 * Does the "tm" structure contain the "tm_gmtoff" member?
369 */
370
371 #undef HAVE_TM_GMTOFF
372
373
374 /*
375 * Do we have rresvport_af()?
376 */
377
378 #undef HAVE_RRESVPORT_AF
379
380
381 /*
382 * Do we have getaddrinfo()?
383 */
384
385 #undef HAVE_GETADDRINFO
386
387
388 /*
389 * Do we have getnameinfo()?
390 */
391
392 #undef HAVE_GETNAMEINFO
393
394
395 /*
396 * Do we have getifaddrs()?
397 */
398
399 #undef HAVE_GETIFADDRS
400
401
402 /*
403 * Do we have hstrerror()?
404 */
405
406 #undef HAVE_HSTRERROR
407
408
409 /*
410 * Do we have res_init()?
411 */
412
413 #undef HAVE_RES_INIT
414
415
416 /*
417 * Do we have <resolv.h>
418 */
419
420 #undef HAVE_RESOLV_H
421
422
423 /*
424 * Do we have the <sys/sockio.h> header file?
425 */
426
427 #undef HAVE_SYS_SOCKIO_H
428
429
430 /*
431 * Does the sockaddr structure contain an sa_len parameter?
432 */
433
434 #undef HAVE_STRUCT_SOCKADDR_SA_LEN
435
436
437 /*
438 * Do we have pthread support?
439 */
440
441 #undef HAVE_PTHREAD_H
442
443
444 /*
445 * Do we have launchd support?
446 */
447
448 #undef HAVE_LAUNCH_H
449 #undef HAVE_LAUNCHD
450
451
452 /*
453 * Various scripting languages...
454 */
455
456 #undef HAVE_JAVA
457 #define CUPS_JAVA "/usr/bin/java"
458 #undef HAVE_PERL
459 #define CUPS_PERL "/usr/bin/perl"
460 #undef HAVE_PHP
461 #define CUPS_PHP "/usr/bin/php"
462 #undef HAVE_PYTHON
463 #define CUPS_PYTHON "/usr/bin/python"
464
465
466 /*
467 * Location of the poppler/Xpdf pdftops program...
468 */
469
470 #undef HAVE_PDFTOPS
471 #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES
472 #define CUPS_PDFTOPS "/usr/bin/pdftops"
473
474
475 /*
476 * Location of the Ghostscript gs program...
477 */
478
479 #undef HAVE_GHOSTSCRIPT
480 #undef HAVE_GHOSTSCRIPT_PS2WRITE
481 #define CUPS_GHOSTSCRIPT "/usr/bin/gs"
482
483
484 /*
485 * Do we have CoreFoundation public and private headers?
486 */
487
488 #undef HAVE_COREFOUNDATION_H
489 #undef HAVE_CFPRIV_H
490 #undef HAVE_CFBUNDLEPRIV_H
491
492
493 /*
494 * Do we have ApplicationServices public headers?
495 */
496
497 #undef HAVE_APPLICATIONSERVICES_H
498
499
500 /*
501 * Do we have the SCDynamicStoreCopyComputerName function?
502 */
503
504 #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
505
506
507 /*
508 * Do we have OS X 10.4's mbr_XXX functions?
509 */
510
511 #undef HAVE_MEMBERSHIP_H
512 #undef HAVE_MEMBERSHIPPRIV_H
513 #undef HAVE_MBR_UID_TO_UUID
514
515
516 /*
517 * Do we have Darwin's notify_post header and function?
518 */
519
520 #undef HAVE_NOTIFY_H
521 #undef HAVE_NOTIFY_POST
522
523
524 /*
525 * Do we have DBUS?
526 */
527
528 #undef HAVE_DBUS
529 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
530
531
532 /*
533 * Do we have the GSSAPI support library (for Kerberos support)?
534 */
535
536 #undef HAVE_GSS_ACQUIRE_CRED_EX_F
537 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
538 #undef HAVE_GSS_GSSAPI_H
539 #undef HAVE_GSS_GSSAPI_SPI_H
540 #undef HAVE_GSSAPI
541 #undef HAVE_GSSAPI_GSSAPI_H
542 #undef HAVE_GSSAPI_H
543
544
545 /*
546 * Default GSS service name...
547 */
548
549 #define CUPS_DEFAULT_GSSSERVICENAME ""
550
551
552 /*
553 * Select/poll interfaces...
554 */
555
556 #undef HAVE_POLL
557 #undef HAVE_EPOLL
558 #undef HAVE_KQUEUE
559
560
561 /*
562 * Do we have the <dlfcn.h> header?
563 */
564
565 #undef HAVE_DLFCN_H
566
567
568 /*
569 * Do we have <sys/param.h>?
570 */
571
572 #undef HAVE_SYS_PARAM_H
573
574
575 /*
576 * Do we have <sys/ucred.h>?
577 */
578
579 #undef HAVE_SYS_UCRED_H
580
581
582 /*
583 * Do we have removefile()?
584 */
585
586 #undef HAVE_REMOVEFILE
587
588
589 /*
590 * Do we have <sandbox.h>?
591 */
592
593 #undef HAVE_SANDBOX_H
594
595
596 /*
597 * Which random number generator function to use...
598 */
599
600 #undef HAVE_ARC4RANDOM
601 #undef HAVE_RANDOM
602 #undef HAVE_LRAND48
603
604 #ifdef HAVE_ARC4RANDOM
605 # define CUPS_RAND() arc4random()
606 # define CUPS_SRAND(v) arc4random_stir()
607 #elif defined(HAVE_RANDOM)
608 # define CUPS_RAND() random()
609 # define CUPS_SRAND(v) srandom(v)
610 #elif defined(HAVE_LRAND48)
611 # define CUPS_RAND() lrand48()
612 # define CUPS_SRAND(v) srand48(v)
613 #else
614 # define CUPS_RAND() rand()
615 # define CUPS_SRAND(v) srand(v)
616 #endif /* HAVE_ARC4RANDOM */
617
618
619 /*
620 * Do we have vproc_transaction_begin/end?
621 */
622
623 #undef HAVE_VPROC_TRANSACTION_BEGIN
624
625
626 /*
627 * Do we have libusb?
628 */
629
630 #undef HAVE_LIBUSB
631
632
633 /*
634 * Do we have libwrap and tcpd.h?
635 */
636
637 #undef HAVE_TCPD_H
638
639
640 /*
641 * Do we have <iconv.h>?
642 */
643
644 #undef HAVE_ICONV_H
645
646
647 /*
648 * Do we have statfs or statvfs and one of the corresponding headers?
649 */
650
651 #undef HAVE_STATFS
652 #undef HAVE_STATVFS
653 #undef HAVE_SYS_MOUNT_H
654 #undef HAVE_SYS_STATFS_H
655 #undef HAVE_SYS_STATVFS_H
656 #undef HAVE_SYS_VFS_H
657
658
659 /*
660 * Location of OS X localization bundle, if any.
661 */
662
663 #undef CUPS_BUNDLEDIR
664
665
666 /*
667 * Do we have XPC?
668 */
669
670 #undef HAVE_XPC
671 #undef HAVE_XPC_PRIVATE_H
672
673
674 /*
675 * Do we have Mini-XML?
676 */
677
678 #undef HAVE_MXML_H
679
680
681 /*
682 * Do we have the C99 abs() function?
683 */
684
685 #undef HAVE_ABS
686 #if !defined(HAVE_ABS) && !defined(abs)
687 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
688 # define abs(x) _cups_abs(x)
689 static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
690 # elif defined(_MSC_VER)
691 # define abs(x) _cups_abs(x)
692 static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
693 # else
694 # define abs(x) ((x) < 0 ? -(x) : (x))
695 # endif /* __GNUC__ || __STDC_VERSION__ */
696 #endif /* !HAVE_ABS && !abs */
697
698 #endif /* !_CUPS_CONFIG_H_ */
699
700 /*
701 * End of "$Id$".
702 */