Line 0
Link Here
|
|
|
1 |
--- configure.ac.orig 2015-05-12 18:43:09 UTC |
2 |
+++ configure.ac |
3 |
@@ -860,26 +860,28 @@ then |
4 |
AC_SEARCH_LIBS([ERR_peek_error], [crypto], , |
5 |
AC_MSG_ERROR([libcrypto not found])) |
6 |
|
7 |
- AC_SEARCH_LIBS([SSL_library_init], [ssl], , |
8 |
- [ |
9 |
- if test x"$enable_shared" = x"yes" |
10 |
- then |
11 |
- AC_MSG_ERROR([Cannot build shared opendkim |
12 |
- against static openssl libraries. |
13 |
- Configure with --disable-shared |
14 |
- to get this working or obtain a |
15 |
- shared libssl library for |
16 |
- opendkim to use.]) |
17 |
- fi |
18 |
|
19 |
- # avoid caching issue - last result of SSL_library_init |
20 |
- # shouldn't be cached for this next check |
21 |
- unset ac_cv_search_SSL_library_init |
22 |
- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" |
23 |
- AC_SEARCH_LIBS([SSL_library_init], [ssl], , |
24 |
- AC_MSG_ERROR([libssl not found]), [-ldl]) |
25 |
- ] |
26 |
- ) |
27 |
+ AC_LINK_IFELSE( |
28 |
+ [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], |
29 |
+ [[SSL_library_init();]])], |
30 |
+ [od_have_ossl="yes";], |
31 |
+ [od_have_ossl="no";]) |
32 |
+ if test x"$od_have_ossl" = x"no" |
33 |
+ then |
34 |
+ if test x"$enable_shared" = x"yes" |
35 |
+ then |
36 |
+ AC_MSG_ERROR([Cannot build shared opendkim |
37 |
+ against static openssl libraries. |
38 |
+ Configure with --disable-shared |
39 |
+ to get this working or obtain a |
40 |
+ shared libssl library for |
41 |
+ opendkim to use.]) |
42 |
+ fi |
43 |
+ |
44 |
+ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" |
45 |
+ AC_SEARCH_LIBS([SSL_library_init], [ssl], , |
46 |
+ AC_MSG_ERROR([libssl not found]), [-ldl]) |
47 |
+ fi |
48 |
|
49 |
AC_CHECK_DECL([SHA256_DIGEST_LENGTH], |
50 |
AC_DEFINE([HAVE_SHA256], 1, |