]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/sylpheed/files/sylpheed-gnutls_2.0.0beta6.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / sylpheed / files / sylpheed-gnutls_2.0.0beta6.patch
1 --- sylpheed-2.0.0beta6/config.h.in.old 2005-07-18 11:57:23.000000000 +0200
2 +++ sylpheed-2.0.0beta6/config.h.in     2005-07-18 11:59:57.000000000 +0200
3 @@ -263,6 +263,9 @@
4  /* Define to 1 if your <sys/time.h> declares `struct tm'. */
5  #undef TM_IN_SYS_TIME
6  
7 +/* Define if you use GnuTLS to support SSL. */
8 +#undef USE_GNUTLS
9 +
10  /* Define if you use GPGME to support OpenPGP. */
11  #undef USE_GPGME
12  
13 @@ -273,6 +276,9 @@
14  #undef USE_LDAP
15  
16  /* Define if you use OpenSSL to support SSL. */
17 +#undef USE_OPENSSL
18 +
19 +/* Define if SSL is supported. */
20  #undef USE_SSL
21  
22  /* Whether to use multithread or not */
23 --- sylpheed-2.0.0beta6/configure.in.old        2005-07-18 12:00:24.000000000 +0200
24 +++ sylpheed-2.0.0beta6/configure.in    2005-07-18 12:04:33.000000000 +0200
25 @@ -202,7 +202,8 @@
26  #include <openssl/opensslv.h>
27  ],             [ return OPENSSL_VERSION_NUMBER; ],
28                 [ AC_MSG_RESULT(yes)
29 -                 AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
30 +                 AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
31 +                 AC_DEFINE(USE_OPENSSL, 1, Define if you use OpenSSL to support SSL.) ],
32                 [ AC_MSG_RESULT(no)
33                   LIBS="$ac_save_LIBS"
34                   ac_cv_enable_ssl=no ])
35 @@ -211,6 +212,27 @@
36         AC_MSG_RESULT(no)
37  fi
38  
39 +AC_ARG_ENABLE(gnutls,
40 +       [  --enable-gnutls         Enable SSL support using GnuTLS [default=no]],
41 +       [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=no])
42 +AC_MSG_CHECKING([whether to use GnuTLS])
43 +if test $ac_cv_enable_gnutls = yes; then
44 +       AC_MSG_RESULT(yes)
45 +       AC_MSG_CHECKING([if GnuTLS is available])
46 +       LIBS="$LIBS -lgnutls-openssl"
47 +       AC_TRY_LINK([
48 +#include <gnutls/openssl.h>
49 +],     [ return OPENSSL_VERSION_NUMBER; ],
50 +       [ AC_MSG_RESULT(yes)
51 +         AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
52 +         AC_DEFINE(USE_GNUTLS, 1, Define if you use GnuTLS to support SSL.) ],
53 +       [ AC_MSG_RESULT(no)
54 +         LIBS="$ac_save_LIBS"
55 +         ac_cv_enable_gnutls=no ])
56 +else
57 +       AC_MSG_RESULT(no)
58 +fi
59 +
60  dnl Check for X-Face support
61  AC_ARG_ENABLE(compface,
62         [  --disable-compface      Do not use compface (X-Face)],
63 @@ -350,6 +372,7 @@
64  echo "JPilot        : $ac_cv_enable_jpilot"
65  echo "LDAP          : $ac_cv_enable_ldap"
66  echo "OpenSSL       : $ac_cv_enable_ssl"
67 +echo "GnuTLS        : $ac_cv_enable_gnutls"
68  echo "iconv         : $am_cv_func_iconv"
69  echo "compface      : $ac_cv_enable_compface"
70  echo "IPv6          : $ac_cv_enable_ipv6"
71 --- sylpheed-2.0.0beta6/src/ssl.h.old   2005-07-18 12:09:35.000000000 +0200
72 +++ sylpheed-2.0.0beta6/src/ssl.h       2005-07-18 12:11:15.000000000 +0200
73 @@ -27,11 +27,19 @@
74  #if USE_SSL
75  
76  #include <glib.h>
77 +#if USE_OPENSSL
78  #include <openssl/crypto.h>
79  #include <openssl/x509.h>
80  #include <openssl/pem.h>
81  #include <openssl/ssl.h>
82  #include <openssl/err.h>
83 +#else
84 +#if USE_GNUTLS
85 +#include <gnutls/openssl.h>
86 +#else
87 +#error Must select either GnuTLS or OpenSSL
88 +#endif
89 +#endif
90  
91  #include "socket.h"
92