1 From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2 Date: Thu, 22 Sep 2016 11:19:42 +0000
3 Subject: [PATCH] spamassassin: get it compiled against openssl 1.1.0
5 CRYPTO_lock was part of the old locking API which got removed. I picked
8 Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
10 spamc/configure | 22 +++++++++++-----------
11 spamc/configure.in | 2 +-
12 2 files changed, 12 insertions(+), 12 deletions(-)
14 Index: spamassassin-3.4.1/spamc/configure
15 ===================================================================
16 --- spamassassin-3.4.1.orig/spamc/configure
17 +++ spamassassin-3.4.1/spamc/configure
18 @@ -943,7 +943,7 @@ esac
20 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
27 @@ -1874,7 +1874,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
29 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30 (exit $ac_status); } &&
31 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
32 + { ac_try='test -z "$ac_c_werror_flag"
33 + || test ! -s conftest.err'
34 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37 @@ -1932,7 +1933,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
39 echo "$as_me:$LINENO: \$? = $ac_status" >&5
40 (exit $ac_status); } &&
41 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
42 + { ac_try='test -z "$ac_c_werror_flag"
43 + || test ! -s conftest.err'
44 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
47 @@ -2048,7 +2050,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
49 echo "$as_me:$LINENO: \$? = $ac_status" >&5
50 (exit $ac_status); } &&
51 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52 + { ac_try='test -z "$ac_c_werror_flag"
53 + || test ! -s conftest.err'
54 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
57 @@ -2102,7 +2105,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
59 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60 (exit $ac_status); } &&
61 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
62 + { ac_try='test -z "$ac_c_werror_flag"
63 + || test ! -s conftest.err'
64 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
67 @@ -2147,7 +2151,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
69 echo "$as_me:$LINENO: \$? = $ac_status" >&5
70 (exit $ac_status); } &&
71 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
72 + { ac_try='test -z "$ac_c_werror_flag"
73 + || test ! -s conftest.err'
74 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
77 @@ -2191,7 +2196,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
79 echo "$as_me:$LINENO: \$? = $ac_status" >&5
80 (exit $ac_status); } &&
81 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
82 + { ac_try='test -z "$ac_c_werror_flag"
83 + || test ! -s conftest.err'
84 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87 @@ -2523,7 +2529,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
89 echo "$as_me:$LINENO: \$? = $ac_status" >&5
90 (exit $ac_status); } &&
91 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
92 + { ac_try='test -z "$ac_c_werror_flag"
93 + || test ! -s conftest.err'
94 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
97 @@ -2693,7 +2700,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
99 echo "$as_me:$LINENO: \$? = $ac_status" >&5
100 (exit $ac_status); } &&
101 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
102 + { ac_try='test -z "$ac_c_werror_flag"
103 + || test ! -s conftest.err'
104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
107 @@ -2764,7 +2772,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
110 (exit $ac_status); } &&
111 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
112 + { ac_try='test -z "$ac_c_werror_flag"
113 + || test ! -s conftest.err'
114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
117 @@ -2917,7 +2926,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
120 (exit $ac_status); } &&
121 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
122 + { ac_try='test -z "$ac_c_werror_flag"
123 + || test ! -s conftest.err'
124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
127 @@ -3069,7 +3079,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
130 (exit $ac_status); } &&
131 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
132 + { ac_try='test -z "$ac_c_werror_flag"
133 + || test ! -s conftest.err'
134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
137 @@ -3260,7 +3271,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
140 (exit $ac_status); } &&
141 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
142 + { ac_try='test -z "$ac_c_werror_flag"
143 + || test ! -s conftest.err'
144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
147 @@ -3323,7 +3335,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
150 (exit $ac_status); } &&
151 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
152 + { ac_try='test -z "$ac_c_werror_flag"
153 + || test ! -s conftest.err'
154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
157 @@ -3388,7 +3401,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
160 (exit $ac_status); } &&
161 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
162 + { ac_try='test -z "$ac_c_werror_flag"
163 + || test ! -s conftest.err'
164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
167 @@ -3491,7 +3505,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
170 (exit $ac_status); } &&
171 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
172 + { ac_try='test -z "$ac_c_werror_flag"
173 + || test ! -s conftest.err'
174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
177 @@ -3557,7 +3572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
180 (exit $ac_status); } &&
181 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
182 + { ac_try='test -z "$ac_c_werror_flag"
183 + || test ! -s conftest.err'
184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
187 @@ -3628,7 +3644,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
190 (exit $ac_status); } &&
191 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
192 + { ac_try='test -z "$ac_c_werror_flag"
193 + || test ! -s conftest.err'
194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
197 @@ -3666,9 +3683,9 @@ fi
200 if test yes = "$sa_ssl_enabled"; then
201 - echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5
202 -echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6
203 -if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then
204 + echo "$as_me:$LINENO: checking for CRYPTO_malloc in -lcrypto" >&5
205 +echo $ECHO_N "checking for CRYPTO_malloc in -lcrypto... $ECHO_C" >&6
206 +if test "${ac_cv_lib_crypto_CRYPTO_malloc+set}" = set; then
207 echo $ECHO_N "(cached) $ECHO_C" >&6
209 ac_check_lib_save_LIBS=$LIBS
210 @@ -3686,11 +3703,11 @@ extern "C"
212 /* We use char because int might match the return type of a gcc2
213 builtin and then its argument prototype would still apply. */
214 -char CRYPTO_lock ();
215 +char CRYPTO_malloc ();
224 @@ -3704,7 +3721,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
227 (exit $ac_status); } &&
228 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
229 + { ac_try='test -z "$ac_c_werror_flag"
230 + || test ! -s conftest.err'
231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
234 @@ -3716,20 +3734,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
237 (exit $ac_status); }; }; then
238 - ac_cv_lib_crypto_CRYPTO_lock=yes
239 + ac_cv_lib_crypto_CRYPTO_malloc=yes
241 echo "$as_me: failed program was:" >&5
242 sed 's/^/| /' conftest.$ac_ext >&5
244 -ac_cv_lib_crypto_CRYPTO_lock=no
245 +ac_cv_lib_crypto_CRYPTO_malloc=no
247 rm -f conftest.err conftest.$ac_objext \
248 conftest$ac_exeext conftest.$ac_ext
249 LIBS=$ac_check_lib_save_LIBS
251 -echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5
252 -echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6
253 -if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
254 +echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_malloc" >&5
255 +echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_malloc" >&6
256 +if test $ac_cv_lib_crypto_CRYPTO_malloc = yes; then
257 SSLLIBS="-lcrypto $SSLLIBS"
260 @@ -3771,7 +3789,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
263 (exit $ac_status); } &&
264 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
265 + { ac_try='test -z "$ac_c_werror_flag"
266 + || test ! -s conftest.err'
267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
270 @@ -3804,7 +3823,7 @@ fi
271 # before defining SPAMC_SSL check that all its requirements are
273 if test yes = "$ac_cv_header_openssl_crypto_h" && \
274 - test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
275 + test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
276 test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
277 SSLCFLAGS="-DSPAMC_SSL"
279 @@ -3854,7 +3873,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
282 (exit $ac_status); } &&
283 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
284 + { ac_try='test -z "$ac_c_werror_flag"
285 + || test ! -s conftest.err'
286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
289 @@ -3927,7 +3947,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
292 (exit $ac_status); } &&
293 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
294 + { ac_try='test -z "$ac_c_werror_flag"
295 + || test ! -s conftest.err'
296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
299 @@ -4000,7 +4021,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
302 (exit $ac_status); } &&
303 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
304 + { ac_try='test -z "$ac_c_werror_flag"
305 + || test ! -s conftest.err'
306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
309 @@ -4073,7 +4095,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
312 (exit $ac_status); } &&
313 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
314 + { ac_try='test -z "$ac_c_werror_flag"
315 + || test ! -s conftest.err'
316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
319 @@ -4182,7 +4205,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
322 (exit $ac_status); } &&
323 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
324 + { ac_try='test -z "$ac_c_werror_flag"
325 + || test ! -s conftest.err'
326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
329 @@ -4246,7 +4270,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
332 (exit $ac_status); } &&
333 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
334 + { ac_try='test -z "$ac_c_werror_flag"
335 + || test ! -s conftest.err'
336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
339 @@ -4311,7 +4336,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
342 (exit $ac_status); } &&
343 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
344 + { ac_try='test -z "$ac_c_werror_flag"
345 + || test ! -s conftest.err'
346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
349 @@ -4368,7 +4394,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
352 (exit $ac_status); } &&
353 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
354 + { ac_try='test -z "$ac_c_werror_flag"
355 + || test ! -s conftest.err'
356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
359 @@ -4435,7 +4462,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
362 (exit $ac_status); } &&
363 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
364 + { ac_try='test -z "$ac_c_werror_flag"
365 + || test ! -s conftest.err'
366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
369 @@ -4500,7 +4528,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
372 (exit $ac_status); } &&
373 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
374 + { ac_try='test -z "$ac_c_werror_flag"
375 + || test ! -s conftest.err'
376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
379 @@ -4564,7 +4593,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
382 (exit $ac_status); } &&
383 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
384 + { ac_try='test -z "$ac_c_werror_flag"
385 + || test ! -s conftest.err'
386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
389 @@ -4628,7 +4658,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
392 (exit $ac_status); } &&
393 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
394 + { ac_try='test -z "$ac_c_werror_flag"
395 + || test ! -s conftest.err'
396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
399 @@ -4692,7 +4723,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
402 (exit $ac_status); } &&
403 - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
404 + { ac_try='test -z "$ac_c_werror_flag"
405 + || test ! -s conftest.err'
406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
409 @@ -5527,6 +5559,11 @@ esac
413 + if test x"$ac_file" != x-; then
414 + { echo "$as_me:$LINENO: creating $ac_file" >&5
415 +echo "$as_me: creating $ac_file" >&6;}
418 # Let's still pretend it is `configure' which instantiates (i.e., don't
419 # use $as_me), people would be surprised to read:
420 # /* config.h. Generated by config.status. */
421 @@ -5565,12 +5602,6 @@ echo "$as_me: error: cannot find input f
424 done` || { (exit 1); exit 1; }
426 - if test x"$ac_file" != x-; then
427 - { echo "$as_me:$LINENO: creating $ac_file" >&5
428 -echo "$as_me: creating $ac_file" >&6;}
432 cat >>$CONFIG_STATUS <<_ACEOF
434 Index: spamassassin-3.4.1/spamc/configure.in
435 ===================================================================
436 --- spamassassin-3.4.1.orig/spamc/configure.in
437 +++ spamassassin-3.4.1/spamc/configure.in
438 @@ -64,13 +64,13 @@ AC_CHECK_LIB(socket, socket)
441 if test yes = "$sa_ssl_enabled"; then
442 - AC_CHECK_LIB(crypto, CRYPTO_lock,[SSLLIBS="-lcrypto $SSLLIBS"])
443 + AC_CHECK_LIB(crypto, CRYPTO_malloc,[SSLLIBS="-lcrypto $SSLLIBS"])
444 AC_CHECK_LIB(ssl, SSL_CTX_free,[SSLLIBS="-lssl $SSLLIBS"],,-lcrypto)
446 # before defining SPAMC_SSL check that all its requirements are
448 if test yes = "$ac_cv_header_openssl_crypto_h" && \
449 - test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
450 + test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
451 test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
452 SSLCFLAGS="-DSPAMC_SSL"