Import sendmail 8.13.4 into a new contrib directory as the first step
[dragonfly.git] / contrib / sendmail-8.13.4 / include / sm / config.h
blob5ebe548d7459e3a74ea50375878d81f3c32d5036
1 /*
2 * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
9 * $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
13 ** libsm configuration macros.
14 ** The values of these macros are platform dependent.
15 ** The default values are given here.
16 ** If the default is incorrect, then the correct value can be specified
17 ** in the m4 configuration file in devtools/OS.
20 #ifndef SM_CONFIG_H
21 # define SM_CONFIG_H
23 # include "sm_os.h"
26 ** SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
29 # ifndef SM_CONF_STDBOOL_H
30 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
31 # define SM_CONF_STDBOOL_H 1
32 # else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
33 # define SM_CONF_STDBOOL_H 0
34 # endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
35 # endif /* ! SM_CONF_STDBOOL_H */
38 ** Configuration macros that specify how __P is defined.
41 # ifndef SM_CONF_SYS_CDEFS_H
42 # define SM_CONF_SYS_CDEFS_H 0
43 # endif /* ! SM_CONF_SYS_CDEFS_H */
46 ** SM_CONF_STDDEF_H is 1 if <stddef.h> exists
49 # ifndef SM_CONF_STDDEF_H
50 # define SM_CONF_STDDEF_H 1
51 # endif /* ! SM_CONF_STDDEF_H */
54 ** Configuration macro that specifies whether strlcpy/strlcat are available.
55 ** Note: this is the default so that the libsm version (optimized) will
56 ** be used by default (sm_strlcpy/sm_strlcat).
59 # ifndef SM_CONF_STRL
60 # define SM_CONF_STRL 0
61 # endif /* ! SM_CONF_STRL */
64 ** Configuration macro indicating that setitimer is available
67 # ifndef SM_CONF_SETITIMER
68 # define SM_CONF_SETITIMER 1
69 # endif /* ! SM_CONF_SETITIMER */
72 ** Does <sys/types.h> define uid_t and gid_t?
75 # ifndef SM_CONF_UID_GID
76 # define SM_CONF_UID_GID 1
77 # endif /* ! SM_CONF_UID_GID */
80 ** Does <sys/types.h> define ssize_t?
82 # ifndef SM_CONF_SSIZE_T
83 # define SM_CONF_SSIZE_T 1
84 # endif /* ! SM_CONF_SSIZE_T */
87 ** Does the C compiler support long long?
90 # ifndef SM_CONF_LONGLONG
91 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
92 # define SM_CONF_LONGLONG 1
93 # else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
94 # if defined(__GNUC__)
95 # define SM_CONF_LONGLONG 1
96 # else /* defined(__GNUC__) */
97 # define SM_CONF_LONGLONG 0
98 # endif /* defined(__GNUC__) */
99 # endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
100 # endif /* ! SM_CONF_LONGLONG */
103 ** Does <sys/types.h> define quad_t and u_quad_t?
104 ** We only care if long long is not available.
107 # ifndef SM_CONF_QUAD_T
108 # define SM_CONF_QUAD_T 0
109 # endif /* ! SM_CONF_QUAD_T */
112 ** Configuration macro indicating that shared memory is available
115 # ifndef SM_CONF_SHM
116 # define SM_CONF_SHM 0
117 # endif /* ! SM_CONF_SHM */
120 ** Does <setjmp.h> define sigsetjmp?
123 # ifndef SM_CONF_SIGSETJMP
124 # define SM_CONF_SIGSETJMP 1
125 # endif /* ! SM_CONF_SIGSETJMP */
128 ** Does <sysexits.h> exist, and define the EX_* macros with values
129 ** that differ from the default BSD values in <sm/sysexits.h>?
132 # ifndef SM_CONF_SYSEXITS_H
133 # define SM_CONF_SYSEXITS_H 0
134 # endif /* ! SM_CONF_SYSEXITS_H */
136 /* has memchr() prototype? (if not: needs memory.h) */
137 # ifndef SM_CONF_MEMCHR
138 # define SM_CONF_MEMCHR 1
139 # endif /* ! SM_CONF_MEMCHR */
141 /* try LLONG tests in libsm/t-types.c? */
142 # ifndef SM_CONF_TEST_LLONG
143 # define SM_CONF_TEST_LLONG 1
144 # endif /* !SM_CONF_TEST_LLONG */
146 /* LDAP Checks */
147 # if LDAPMAP
148 # include <lber.h>
149 # include <ldap.h>
151 /* Does the LDAP library have ldap_memfree()? */
152 # ifndef SM_CONF_LDAP_MEMFREE
155 ** The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes
156 ** ldap_memfree() in the API. That draft states to use LDAP_API_VERSION
157 ** of 2004 to identify the API.
160 # if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004
161 # define SM_CONF_LDAP_MEMFREE 1
162 # else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
163 # define SM_CONF_LDAP_MEMFREE 0
164 # endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
165 # endif /* ! SM_CONF_LDAP_MEMFREE */
167 /* Does the LDAP library have ldap_initialize()? */
168 # ifndef SM_CONF_LDAP_INITIALIZE
171 ** Check for ldap_initialize() support for support for LDAP URI's with
172 ** non-ldap:// schemes.
175 /* OpenLDAP does it with LDAP_OPT_URI */
176 # ifdef LDAP_OPT_URI
177 # define SM_CONF_LDAP_INITIALIZE 1
178 # endif /* LDAP_OPT_URI */
179 # endif /* !SM_CONF_LDAP_INITIALIZE */
180 # endif /* LDAPMAP */
182 /* don't use strcpy() */
183 # ifndef DO_NOT_USE_STRCPY
184 # define DO_NOT_USE_STRCPY 1
185 # endif /* ! DO_NOT_USE_STRCPY */
187 #endif /* ! SM_CONFIG_H */