diff options
author | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-01-15 18:09:13 +0900 |
---|---|---|
committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-01-15 22:12:39 +0900 |
commit | 1d934cd2d85872728c8e17a4f5afed5582980eb3 (patch) | |
tree | 8372fad1e7af184266826d66d72820c0c8d5403e /m4 | |
parent | 6db42999415c48d96d2498a6ac51cd233a308fd2 (diff) | |
download | portable-1d934cd2d85872728c8e17a4f5afed5582980eb3.tar.gz portable-1d934cd2d85872728c8e17a4f5afed5582980eb3.tar.bz2 portable-1d934cd2d85872728c8e17a4f5afed5582980eb3.zip |
Fix to use -export-symbols for libcrypto
- generating platform specific crypto/crypto_portable.sym from crypto.sym
Diffstat (limited to 'm4')
-rw-r--r-- | m4/check-libc.m4 | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index 466a70e..b58f0b1 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 | |||
@@ -141,3 +141,73 @@ if test "x$ac_cv_have___va_copy" = "xyes" ; then | |||
141 | AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists]) | 141 | AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists]) |
142 | fi | 142 | fi |
143 | ]) | 143 | ]) |
144 | |||
145 | AC_DEFUN([GENERATE_CRYPTO_PORTABLE_SYM], [ | ||
146 | crypto_sym=$srcdir/crypto/crypto.sym | ||
147 | crypto_p_sym=$srcdir/crypto/crypto_portable.sym | ||
148 | echo "generating $crypto_p_sym ..." | ||
149 | chmod u+w $srcdir/crypto | ||
150 | cp $crypto_sym $crypto_p_sym | ||
151 | chmod u+w $crypto_p_sym | ||
152 | if test "x$ac_cv_func_arc4random" = "xno" ; then | ||
153 | echo arc4random >> $crypto_p_sym | ||
154 | fi | ||
155 | if test "x$ac_cv_func_arc4random_buf" = "xno" ; then | ||
156 | echo arc4random_buf >> $crypto_p_sym | ||
157 | fi | ||
158 | if test "x$ac_cv_func_arc4random_uniform" = "xno" ; then | ||
159 | echo arc4random_uniform >> $crypto_p_sym | ||
160 | fi | ||
161 | if test "x$ac_cv_func_asprintf" = "xno" ; then | ||
162 | echo asprintf >> $crypto_p_sym | ||
163 | echo vasprintf >> $crypto_p_sym | ||
164 | fi | ||
165 | if test "x$ac_cv_func_explicit_bzero" = "xno" ; then | ||
166 | echo explicit_bzero >> $crypto_p_sym | ||
167 | fi | ||
168 | if test "x$ac_cv_func_getentropy" = "xno" ; then | ||
169 | echo getentropy >> $crypto_p_sym | ||
170 | fi | ||
171 | if test "x$ac_cv_func_inet_pton" = "xno" ; then | ||
172 | echo inet_pton >> $crypto_p_sym | ||
173 | fi | ||
174 | if test "x$ac_cv_func_reallocarray" = "xno" ; then | ||
175 | echo reallocarray >> $crypto_p_sym | ||
176 | fi | ||
177 | if test "x$ac_cv_func_strlcat" = "xno" ; then | ||
178 | echo strlcat >> $crypto_p_sym | ||
179 | fi | ||
180 | if test "x$ac_cv_func_strlcpy" = "xno" ; then | ||
181 | echo strlcpy >> $crypto_p_sym | ||
182 | fi | ||
183 | if test "x$ac_cv_func_strndup" = "xno" ; then | ||
184 | echo strndup >> $crypto_p_sym | ||
185 | fi | ||
186 | if test "x$ac_cv_func_strnlen" = "xno" ; then | ||
187 | echo strnlen >> $crypto_p_sym | ||
188 | fi | ||
189 | if test "x$ac_cv_func_timegm" = "xno" ; then | ||
190 | echo timegm >> $crypto_p_sym | ||
191 | fi | ||
192 | if test "x$ac_cv_func_timingsafe_bcmp" = "xno" ; then | ||
193 | echo timingsafe_bcmp >> $crypto_p_sym | ||
194 | fi | ||
195 | if test "x$ac_cv_func_timingsafe_memcmp" = "xno" ; then | ||
196 | echo timingsafe_memcmp >> $crypto_p_sym | ||
197 | fi | ||
198 | if test "x$HOST_OS" = "xwin" ; then | ||
199 | echo posix_perror >> $crypto_p_sym | ||
200 | echo posix_fopen >> $crypto_p_sym | ||
201 | echo posix_fgets >> $crypto_p_sym | ||
202 | echo posix_rename >> $crypto_p_sym | ||
203 | echo posix_connect >> $crypto_p_sym | ||
204 | echo posix_close >> $crypto_p_sym | ||
205 | echo posix_read >> $crypto_p_sym | ||
206 | echo posix_write >> $crypto_p_sym | ||
207 | echo posix_getsockopt >> $crypto_p_sym | ||
208 | echo posix_setsockopt >> $crypto_p_sym | ||
209 | |||
210 | grep -v BIO_s_log $crypto_p_sym > $crypto_p_sym.tmp | ||
211 | mv $crypto_p_sym.tmp $crypto_p_sym | ||
212 | fi | ||
213 | ]) | ||