1/* config.h.in.  Generated from configure.ac by autoheader.  */
2
3
4/* acconfig.h - autoheader configuration input */
5/*
6 * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in
17 *    the documentation and/or other materials provided with the
18 *    distribution.
19 *
20 * 3. The name "Carnegie Mellon University" must not be used to
21 *    endorse or promote products derived from this software without
22 *    prior written permission. For permission or any other legal
23 *    details, please contact
24 *      Office of Technology Transfer
25 *      Carnegie Mellon University
26 *      5000 Forbes Avenue
27 *      Pittsburgh, PA  15213-3890
28 *      (412) 268-4387, fax: (412) 268-7395
29 *      tech-transfer@andrew.cmu.edu
30 *
31 * 4. Redistributions of any form whatsoever must retain the following
32 *    acknowledgment:
33 *    "This product includes software developed by Computing Services
34 *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
35 *
36 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
37 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
39 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
40 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
41 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
42 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
43 */
44
45#ifndef CONFIG_H
46#define CONFIG_H
47
48
49/* Include SASLdb Support */
50#undef AUTH_SASLDB
51
52/* Do we need a leading _ for dlsym? */
53#undef DLSYM_NEEDS_UNDERSCORE
54
55/* Should we build a shared plugin (via dlopen) library? */
56#undef DO_DLOPEN
57
58/* should we support sasl_checkapop? */
59#undef DO_SASL_CHECKAPOP
60
61/* should we support setpass() for SRP? */
62#undef DO_SRP_SETPASS
63
64/* Define if your getpwnam_r()/getspnam_r() functions take 5 arguments */
65#undef GETXXNAM_R_5ARG
66
67/* should we mutex-wrap calls into the GSS library? */
68#undef GSS_USE_MUTEXES
69
70/* Enable 'alwaystrue' password verifier? */
71#undef HAVE_ALWAYSTRUE
72
73/* Define to 1 if you have the `asprintf' function. */
74#undef HAVE_ASPRINTF
75
76/* Include support for Courier's authdaemond? */
77#undef HAVE_AUTHDAEMON
78
79/* Define to 1 if you have the <crypt.h> header file. */
80#undef HAVE_CRYPT_H
81
82/* Define to 1 if you have the <des.h> header file. */
83#undef HAVE_DES_H
84
85/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
86   */
87#undef HAVE_DIRENT_H
88
89/* Define to 1 if you have the <dlfcn.h> header file. */
90#undef HAVE_DLFCN_H
91
92/* Define to 1 if you have the `dns_lookup' function. */
93#undef HAVE_DNS_LOOKUP
94
95/* Define to 1 if you have the `dn_expand' function. */
96#undef HAVE_DN_EXPAND
97
98/* Define to 1 if you have the <fcntl.h> header file. */
99#undef HAVE_FCNTL_H
100
101/* Do we have a getaddrinfo? */
102#undef HAVE_GETADDRINFO
103
104/* Define to 1 if you have the `getdomainname' function. */
105#undef HAVE_GETDOMAINNAME
106
107/* Define to 1 if you have the `gethostname' function. */
108#undef HAVE_GETHOSTNAME
109
110/* Do we have a getnameinfo() function? */
111#undef HAVE_GETNAMEINFO
112
113/* Define to 1 if you have the `getpassphrase' function. */
114#undef HAVE_GETPASSPHRASE
115
116/* Define to 1 if you have the `getpwnam' function. */
117#undef HAVE_GETPWNAM
118
119/* Define to 1 if you have the `getspnam' function. */
120#undef HAVE_GETSPNAM
121
122/* do we have getsubopt()? */
123#undef HAVE_GETSUBOPT
124
125/* Define to 1 if you have the `gettimeofday' function. */
126#undef HAVE_GETTIMEOFDAY
127
128/* Include GSSAPI/Kerberos 5 Support */
129#undef HAVE_GSSAPI
130
131/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
132#undef HAVE_GSSAPI_GSSAPI_EXT_H
133
134/* Define if you have the gssapi/gssapi.h header file */
135#undef HAVE_GSSAPI_GSSAPI_H
136
137/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
138#undef HAVE_GSSAPI_GSSAPI_KRB5_H
139
140/* Define if you have the gssapi.h header file */
141#undef HAVE_GSSAPI_H
142
143/* Define if your GSSAPI implementation defines
144   gsskrb5_register_acceptor_identity */
145#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
146
147/* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
148#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
149
150/* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
151#undef HAVE_GSS_C_NT_USER_NAME
152
153/* Define if your GSSAPI implementation defines GSS_C_SEC_CONTEXT_SASL_SSF */
154#undef HAVE_GSS_C_SEC_CONTEXT_SASL_SSF
155
156/* Define to 1 if you have the `gss_decapsulate_token' function. */
157#undef HAVE_GSS_DECAPSULATE_TOKEN
158
159/* Define to 1 if you have the `gss_encapsulate_token' function. */
160#undef HAVE_GSS_ENCAPSULATE_TOKEN
161
162/* Define to 1 if you have the `gss_get_name_attribute' function. */
163#undef HAVE_GSS_GET_NAME_ATTRIBUTE
164
165/* Define if your GSSAPI implementation defines gss_inquire_sec_context_by_oid
166   */
167#undef HAVE_GSS_INQUIRE_SEC_CONTEXT_BY_OID
168
169/* Define to 1 if you have the `gss_oid_equal' function. */
170#undef HAVE_GSS_OID_EQUAL
171
172/* Define if your GSSAPI implementation supports SPNEGO */
173#undef HAVE_GSS_SPNEGO
174
175/* Include HTTP form Support */
176#undef HAVE_HTTPFORM
177
178/* Define to 1 if you have the `inet_aton' function. */
179#undef HAVE_INET_ATON
180
181/* Define to 1 if you have the <inttypes.h> header file. */
182#undef HAVE_INTTYPES_H
183
184/* Define to 1 if you have the `jrand48' function. */
185#undef HAVE_JRAND48
186
187/* Do we have Kerberos 4 Support? */
188#undef HAVE_KRB
189
190/* Define to 1 if you have the <krb5.h> header file. */
191#undef HAVE_KRB5_H
192
193/* Define to 1 if you have the `krb_get_err_text' function. */
194#undef HAVE_KRB_GET_ERR_TEXT
195
196/* Define to 1 if you have the <lber.h> header file. */
197#undef HAVE_LBER_H
198
199/* Support for LDAP? */
200#undef HAVE_LDAP
201
202/* Define to 1 if you have the <ldap.h> header file. */
203#undef HAVE_LDAP_H
204
205/* Define to 1 if you have the `resolv' library (-lresolv). */
206#undef HAVE_LIBRESOLV
207
208/* Define to 1 if you have the <limits.h> header file. */
209#undef HAVE_LIMITS_H
210
211/* Define to 1 if you have the <malloc.h> header file. */
212#undef HAVE_MALLOC_H
213
214/* Define to 1 if you have the `memcpy' function. */
215#undef HAVE_MEMCPY
216
217/* Define to 1 if you have the `memmem' function. */
218#undef HAVE_MEMMEM
219
220/* Define to 1 if you have the <memory.h> header file. */
221#undef HAVE_MEMORY_H
222
223/* Define to 1 if you have the `mkdir' function. */
224#undef HAVE_MKDIR
225
226/* Do we have mysql support? */
227#undef HAVE_MYSQL
228
229/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
230#undef HAVE_NDIR_H
231
232/* Do we have OpenSSL? */
233#undef HAVE_OPENSSL
234
235/* Use OPIE for server-side OTP? */
236#undef HAVE_OPIE
237
238/* Support for PAM? */
239#undef HAVE_PAM
240
241/* Define to 1 if you have the <paths.h> header file. */
242#undef HAVE_PATHS_H
243
244/* Do we have Postgres support? */
245#undef HAVE_PGSQL
246
247/* Include Support for pwcheck daemon? */
248#undef HAVE_PWCHECK
249
250/* Include support for saslauthd? */
251#undef HAVE_SASLAUTHD
252
253/* Define to 1 if you have the `select' function. */
254#undef HAVE_SELECT
255
256/* Do we have SHA512? */
257#undef HAVE_SHA512
258
259/* Include SIA Support */
260#undef HAVE_SIA
261
262/* Does the system have snprintf()? */
263#undef HAVE_SNPRINTF
264
265/* Does sockaddr have an sa_len? */
266#undef HAVE_SOCKADDR_SA_LEN
267
268/* Define to 1 if you have the `socket' function. */
269#undef HAVE_SOCKET
270
271/* Do we have a socklen_t? */
272#undef HAVE_SOCKLEN_T
273
274/* Do we have SQLite support? */
275#undef HAVE_SQLITE
276
277/* Do we have SQLite3 support? */
278#undef HAVE_SQLITE3
279
280/* Is there an ss_family in sockaddr_storage? */
281#undef HAVE_SS_FAMILY
282
283/* Define to 1 if you have the <stdarg.h> header file. */
284#undef HAVE_STDARG_H
285
286/* Define to 1 if you have the <stdint.h> header file. */
287#undef HAVE_STDINT_H
288
289/* Define to 1 if you have the <stdlib.h> header file. */
290#undef HAVE_STDLIB_H
291
292/* Define to 1 if you have the `strchr' function. */
293#undef HAVE_STRCHR
294
295/* Define to 1 if you have the `strdup' function. */
296#undef HAVE_STRDUP
297
298/* Define to 1 if you have the `strerror' function. */
299#undef HAVE_STRERROR
300
301/* Define to 1 if you have the <strings.h> header file. */
302#undef HAVE_STRINGS_H
303
304/* Define to 1 if you have the <string.h> header file. */
305#undef HAVE_STRING_H
306
307/* Define to 1 if you have the `strlcat' function. */
308#undef HAVE_STRLCAT
309
310/* Define to 1 if you have the `strlcpy' function. */
311#undef HAVE_STRLCPY
312
313/* Define to 1 if you have the `strspn' function. */
314#undef HAVE_STRSPN
315
316/* Define to 1 if you have the `strstr' function. */
317#undef HAVE_STRSTR
318
319/* Define to 1 if you have the `strtol' function. */
320#undef HAVE_STRTOL
321
322/* Do we have struct sockaddr_stroage? */
323#undef HAVE_STRUCT_SOCKADDR_STORAGE
324
325/* Define to 1 if you have the <sysexits.h> header file. */
326#undef HAVE_SYSEXITS_H
327
328/* Define to 1 if you have the `syslog' function. */
329#undef HAVE_SYSLOG
330
331/* Define to 1 if you have the <syslog.h> header file. */
332#undef HAVE_SYSLOG_H
333
334/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
335   */
336#undef HAVE_SYS_DIR_H
337
338/* Define to 1 if you have the <sys/file.h> header file. */
339#undef HAVE_SYS_FILE_H
340
341/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
342   */
343#undef HAVE_SYS_NDIR_H
344
345/* Define to 1 if you have the <sys/param.h> header file. */
346#undef HAVE_SYS_PARAM_H
347
348/* Define to 1 if you have the <sys/socket.h> header file. */
349#undef HAVE_SYS_SOCKET_H
350
351/* Define to 1 if you have the <sys/stat.h> header file. */
352#undef HAVE_SYS_STAT_H
353
354/* Define to 1 if you have the <sys/time.h> header file. */
355#undef HAVE_SYS_TIME_H
356
357/* Define to 1 if you have the <sys/types.h> header file. */
358#undef HAVE_SYS_TYPES_H
359
360/* Define to 1 if you have the <sys/uio.h> header file. */
361#undef HAVE_SYS_UIO_H
362
363/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
364#undef HAVE_SYS_WAIT_H
365
366/* Define to 1 if you have the <unistd.h> header file. */
367#undef HAVE_UNISTD_H
368
369/* Define to 1 if you have the <varargs.h> header file. */
370#undef HAVE_VARARGS_H
371
372/* Does the system have vsnprintf()? */
373#undef HAVE_VSNPRINTF
374
375/* Define to 1 if you have the <ws2tcpip.h> header file. */
376#undef HAVE_WS2TCPIP_H
377
378/* Should we keep handle to DB open in SASLDB plugin? */
379#undef KEEP_DB_OPEN
380
381/* Ignore IP Address in Kerberos 4 tickets? */
382#undef KRB4_IGNORE_IP_ADDRESS
383
384/* Using Heimdal */
385#undef KRB5_HEIMDAL
386
387/* Define to the sub-directory where libtool stores uninstalled libraries. */
388#undef LT_OBJDIR
389
390/* Name of package */
391#undef PACKAGE
392
393/* Define to the address where bug reports for this package should be sent. */
394#undef PACKAGE_BUGREPORT
395
396/* Define to the full name of this package. */
397#undef PACKAGE_NAME
398
399/* Define to the full name and version of this package. */
400#undef PACKAGE_STRING
401
402/* Define to the one symbol short name of this package. */
403#undef PACKAGE_TARNAME
404
405/* Define to the home page for this package. */
406#undef PACKAGE_URL
407
408/* Define to the version of this package. */
409#undef PACKAGE_VERSION
410
411/* Where do we look for Courier authdaemond's socket? */
412#undef PATH_AUTHDAEMON_SOCKET
413
414/* Where do we look for saslauthd's socket? */
415#undef PATH_SASLAUTHD_RUNDIR
416
417/* Force a preferred mechanism */
418#undef PREFER_MECH
419
420/* Location of pwcheck socket */
421#undef PWCHECKDIR
422
423/* Use BerkeleyDB for SASLdb */
424#undef SASL_BERKELEYDB
425
426/* Path to default SASLdb database */
427#undef SASL_DB_PATH
428
429/* File to use for source of randomness */
430#undef SASL_DEV_RANDOM
431
432/* Use GDBM for SASLdb */
433#undef SASL_GDBM
434
435/* Use LMDB for SASLdb */
436#undef SASL_LMDB
437
438/* Use NDBM for SASLdb */
439#undef SASL_NDBM
440
441/* The size of `long', as computed by sizeof. */
442#undef SIZEOF_LONG
443
444/* Link ANONYMOUS Statically */
445#undef STATIC_ANONYMOUS
446
447/* Link CRAM-MD5 Statically */
448#undef STATIC_CRAMMD5
449
450/* Link DIGEST-MD5 Statically */
451#undef STATIC_DIGESTMD5
452
453/* Link GSSAPI Statically */
454#undef STATIC_GSSAPIV2
455
456/* User KERBEROS_V4 Staticly */
457#undef STATIC_KERBEROS4
458
459/* Link ldapdb plugin Statically */
460#undef STATIC_LDAPDB
461
462/* Link LOGIN Statically */
463#undef STATIC_LOGIN
464
465/* Link NTLM Statically */
466#undef STATIC_NTLM
467
468/* Link OTP Statically */
469#undef STATIC_OTP
470
471/* Link PASSDSS Statically */
472#undef STATIC_PASSDSS
473
474/* Link PLAIN Staticly */
475#undef STATIC_PLAIN
476
477/* Link SASLdb Staticly */
478#undef STATIC_SASLDB
479
480/* Link SCRAM Statically */
481#undef STATIC_SCRAM
482
483/* Link SQL plugin statically */
484#undef STATIC_SQL
485
486/* Link SRP Statically */
487#undef STATIC_SRP
488
489/* Define to 1 if you have the ANSI C header files. */
490#undef STDC_HEADERS
491
492/* Should we try to dlopen() plugins while statically compiled? */
493#undef TRY_DLOPEN_WHEN_STATIC
494
495/* use the doors IPC API for saslauthd? */
496#undef USE_DOORS
497
498/* Enable extensions on AIX 3, Interix.  */
499#ifndef _ALL_SOURCE
500# undef _ALL_SOURCE
501#endif
502/* Enable GNU extensions on systems that have them.  */
503#ifndef _GNU_SOURCE
504# undef _GNU_SOURCE
505#endif
506/* Enable threading extensions on Solaris.  */
507#ifndef _POSIX_PTHREAD_SEMANTICS
508# undef _POSIX_PTHREAD_SEMANTICS
509#endif
510/* Enable extensions on HP NonStop.  */
511#ifndef _TANDEM_SOURCE
512# undef _TANDEM_SOURCE
513#endif
514/* Enable general extensions on Solaris.  */
515#ifndef __EXTENSIONS__
516# undef __EXTENSIONS__
517#endif
518
519
520/* Version number of package */
521#undef VERSION
522
523/* Use DES */
524#undef WITH_DES
525
526/* Linking against dmalloc? */
527#undef WITH_DMALLOC
528
529/* Use RC4 */
530#undef WITH_RC4
531
532/* Use OpenSSL DES Implementation */
533#undef WITH_SSL_DES
534
535/* Define to 1 if on MINIX. */
536#undef _MINIX
537
538/* Define to 2 if the system does not provide POSIX.1 features except with
539   this defined. */
540#undef _POSIX_1_SOURCE
541
542/* Define to 1 if you need to in order for `stat' and other things to work. */
543#undef _POSIX_SOURCE
544
545/* Define to empty if `const' does not conform to ANSI C. */
546#undef const
547
548/* Define to `__inline__' or `__inline' if that's what the C compiler
549   calls it, or to nothing if 'inline' is not supported under any name.  */
550#ifndef __cplusplus
551#undef inline
552#endif
553
554/* Define to `int' if <sys/types.h> does not define. */
555#undef mode_t
556
557/* Define to `int' if <sys/types.h> does not define. */
558#undef pid_t
559
560
561
562#define RETSIGTYPE void
563
564/* Create a struct iovec if we need one */
565#if !defined(_WIN32)
566#if !defined(HAVE_SYS_UIO_H)
567/* (win32 is handled in sasl.h) */
568struct iovec {
569    char *iov_base;
570    long iov_len;
571};
572#else
573#include <sys/types.h>
574#include <sys/uio.h>
575#endif
576#endif
577
578/* location of the random number generator */
579#ifdef DEV_RANDOM
580#undef DEV_RANDOM
581#endif
582#define DEV_RANDOM SASL_DEV_RANDOM
583
584/* if we've got krb_get_err_txt, we might as well use it;
585   especially since krb_err_txt isn't in some newer distributions
586   (MIT Kerb for Mac 4 being a notable example). If we don't have
587   it, we fall back to the krb_err_txt array */
588#ifdef HAVE_KRB_GET_ERR_TEXT
589#define get_krb_err_txt krb_get_err_text
590#else
591#define get_krb_err_txt(X) (krb_err_txt[(X)])
592#endif
593
594/* Make Solaris happy... */
595#ifndef __EXTENSIONS__
596#define __EXTENSIONS__
597#endif
598
599/* Make Linux happy... */
600#ifndef _GNU_SOURCE
601#define _GNU_SOURCE
602#endif
603
604#define SASL_PATH_ENV_VAR "SASL_PATH"
605#define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
606
607#include <stdlib.h>
608#include <sys/types.h>
609#ifndef WIN32
610# include <sys/socket.h>
611# include <netdb.h>
612# include <netinet/in.h>
613# ifdef HAVE_SYS_PARAM_H
614#  include <sys/param.h>
615# endif
616#else /* WIN32 */
617# include <winsock2.h>
618#endif /* WIN32 */
619#include <string.h>
620
621#ifndef HAVE_SOCKLEN_T
622typedef unsigned int socklen_t;
623#endif /* HAVE_SOCKLEN_T */
624
625#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
626#define	_SS_MAXSIZE	128	/* Implementation specific max size */
627#define	_SS_PADSIZE	(_SS_MAXSIZE - sizeof (struct sockaddr))
628
629struct sockaddr_storage {
630	struct	sockaddr ss_sa;
631	char		__ss_pad2[_SS_PADSIZE];
632};
633# define ss_family ss_sa.sa_family
634#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
635
636#ifndef AF_INET6
637/* Define it to something that should never appear */
638#define	AF_INET6	AF_MAX
639#endif
640
641#ifndef HAVE_GETADDRINFO
642#define	getaddrinfo	sasl_getaddrinfo
643#define	freeaddrinfo	sasl_freeaddrinfo
644#define	gai_strerror	sasl_gai_strerror
645#endif
646
647#ifndef HAVE_GETNAMEINFO
648#define	getnameinfo	sasl_getnameinfo
649#endif
650
651#if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
652#include "gai.h"
653#endif
654
655#ifndef AI_NUMERICHOST   /* support glibc 2.0.x */
656#define AI_NUMERICHOST  4
657#define NI_NUMERICHOST  2
658#define NI_NAMEREQD     4
659#define NI_NUMERICSERV  8
660#endif
661
662#ifndef HAVE_SYSEXITS_H
663#include "exits.h"
664#else
665#include "sysexits.h"
666#endif
667
668/* Get the correct time.h */
669#if TIME_WITH_SYS_TIME
670# include <sys/time.h>
671# include <time.h>
672#else
673# if HAVE_SYS_TIME_H
674#  include <sys/time.h>
675# else
676#  include <time.h>
677# endif
678#endif
679
680#ifndef HIER_DELIMITER
681#define HIER_DELIMITER '/'
682#endif
683
684#ifdef WIN32
685#define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
686#define SASL_PLUGIN_PATH_ATTR "SearchPath"
687#define SASL_CONF_PATH_ATTR "ConfFile"
688
689#include <windows.h>
690inline static unsigned int sleep(unsigned int seconds) {
691       Sleep(seconds * 1000);
692       return 0;
693}
694#endif
695
696/* handy string manipulation functions */
697#ifndef HAVE_STRLCPY
698extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
699#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
700#endif
701#ifndef HAVE_STRLCAT
702extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
703#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
704#endif
705#ifndef HAVE_ASPRINTF
706extern int asprintf(char **str, const char *fmt, ...);
707#endif
708
709#endif /* CONFIG_H */
710
711
712#if defined __GNUC__ &&  __GNUC__ > 6
713    #define GCC_FALLTHROUGH __attribute__((fallthrough));
714#else
715    #define GCC_FALLTHROUGH /* fall through */
716#endif
717
718