f54043acddbaf0a05138e5da68bb7ec03235b1e5
[openssl.git] / include / openssl / opensslconf.h.in
1 /* opensslconf.h */
2 {- join("\n",map { "/* $_ */" } @autowarntext) -}
3
4 #ifdef  __cplusplus
5 extern "C" {
6 #endif
7 /* OpenSSL was configured with the following options: */
8 {-
9     if (@{$config{openssl_sys_defines}}) {
10       foreach (@{$config{openssl_sys_defines}}) {
11         $OUT .= "#ifndef $_\n";
12         $OUT .= "# define $_ 1\n";
13         $OUT .= "#endif\n";
14       }
15     }
16     "";
17 -}
18 #ifndef OPENSSL_DOING_MAKEDEPEND
19
20 {-
21     if (@{$config{openssl_experimental_defines}}) {
22       foreach (@{$config{openssl_experimental_defines}}) {
23         (my $ex = $_) =~ s/_NO_/_EXPERIMENTAL_/;
24         $OUT .= "#ifndef $ex\n";
25         $OUT .= "# ifndef $_\n";
26         $OUT .= "#  define $_\n";
27         $OUT .= "# endif\n";
28         $OUT .= "#endif\n";
29       }
30     }
31     "";
32 -}
33 {-
34     foreach (@{$config{openssl_api_defines}}) {
35         (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/;
36         $OUT .= "#define OPENSSL_MIN_API $value\n";
37     }
38 -}
39 {-
40     if (@{$config{openssl_algorithm_defines}}) {
41       foreach (@{$config{openssl_algorithm_defines}}) {
42         $OUT .= "#ifndef $_\n";
43         $OUT .= "# define $_\n";
44         $OUT .= "#endif\n";
45       }
46     } else {
47       "   /* no ciphers excluded */\n";
48     }
49 -}
50
51 #endif /* OPENSSL_DOING_MAKEDEPEND */
52
53 {-
54     if (@{$config{openssl_thread_defines}}) {
55       foreach (@{$config{openssl_thread_defines}}) {
56         $OUT .= "#ifndef $_\n";
57         $OUT .= "# define $_\n";
58         $OUT .= "#endif\n";
59       }
60     }
61     "";
62 -}
63 {-
64     if (@{$config{openssl_other_defines}}) {
65       foreach (@{$config{openssl_other_defines}}) {
66         $OUT .= "#ifndef $_\n";
67         $OUT .= "# define $_\n";
68         $OUT .= "#endif\n";
69       }
70     }
71     "";
72 -}
73
74 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
75    asks for it.  This is a transient feature that is provided for those
76    who haven't had the time to do the appropriate changes in their
77    applications.  */
78 #ifdef OPENSSL_ALGORITHM_DEFINES
79 {-
80     if (@{$config{openssl_algorithm_defines}}) {
81       foreach (@{$config{openssl_algorithm_defines}}) {
82         (my $ex = $_) =~ s/^OPENSSL_//;
83         $OUT .= "# if defined($_) \&\& !defined($ex)\n";
84         $OUT .= "#  define $ex\n";
85         $OUT .= "# endif\n";
86       }
87     }
88     "";
89 -}
90 #endif
91
92 {- $target{cpuid_obj} ne "mem_clr.o" ? "#define OPENSSL_CPUID_OBJ" : "" -}
93
94 /*
95  * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
96  * declarations of functions deprecated in or before <version>. Otherwise, they
97  * still won't see them if the library has been built to disable deprecated
98  * functions.
99  */
100 #if defined(OPENSSL_NO_DEPRECATED)
101 # define DECLARE_DEPRECATED(f)
102 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
103 # define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
104 #else
105 # define DECLARE_DEPRECATED(f)   f;
106 #endif
107
108 #ifndef OPENSSL_MIN_API
109 #define OPENSSL_MIN_API 0
110 #endif
111
112 #if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
113 #undef OPENSSL_API_COMPAT
114 #define OPENSSL_API_COMPAT OPENSSL_MIN_API
115 #endif
116
117 #if OPENSSL_API_COMPAT < 0x10100000L
118 # define DEPRECATEDIN_1_1_0(f)   DECLARE_DEPRECATED(f)
119 #else
120 # define DEPRECATEDIN_1_1_0(f)
121 #endif
122
123 #if OPENSSL_API_COMPAT < 0x10000000L
124 # define DEPRECATEDIN_1_0_0(f)   DECLARE_DEPRECATED(f)
125 #else
126 # define DEPRECATEDIN_1_0_0(f)
127 #endif
128
129 #if OPENSSL_API_COMPAT < 0x00908000L
130 # define DEPRECATEDIN_0_9_8(f)   DECLARE_DEPRECATED(f)
131 #else
132 # define DEPRECATEDIN_0_9_8(f)
133 #endif
134
135 /* Generate 80386 code? */
136 {- $config{processor} eq "386" ? "#define" : "#undef" -} I386_ONLY
137
138 #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
139 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
140 #define ENGINESDIR {- quotify1($config{enginesdir}) -}
141 #define OPENSSLDIR {- quotify1($config{openssldir}) -}
142 #endif
143 #endif
144
145 #undef OPENSSL_UNISTD
146 #define OPENSSL_UNISTD {- $target{unistd} -}
147
148 #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
149 {- $config{export_var_as_fn} ? "#define OPENSSL_EXPORT_VAR_AS_FUNCTION" : "" -}
150
151 /*
152  * The following are cipher-specific, but are part of the public API.
153  */
154
155 #define OSSL_DES_LONG {- $config{des_int} -}
156
157 #if !defined(OPENSSL_SYS_UEFI)
158 {- $config{bn_ll} ? "#define" : "#undef" -} BN_LLONG
159     
160 /* Only one for the following should be defined */
161 {- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG
162 {- $config{b64}  ? "#define" : "#undef" -} SIXTY_FOUR_BIT
163 {- $config{b32}  ? "#define" : "#undef" -} THIRTY_TWO_BIT
164 #endif
165
166 # define RC2_INT {- $config{rc2_int} -}
167 # define IDEA_INT {- $config{idea_int} -}
168 # define MD2_INT {- $config{md2_int} -}
169 # define RC4_INT {- $config{rc4_int} -}
170
171 #ifdef  __cplusplus
172 }
173 #endif