]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/sylpheed/files/sylpheed-gnutls.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.patch
1 diff -upr --exclude='*.o' --exclude='*~' --exclude=configure clean/sylpheed-1.0.0-gtk2-20041224/config.h.in sylpheed-1.0.0-gtk2-20041224/config.h.in
2 --- clean/sylpheed-1.0.0-gtk2-20041224/config.h.in      2004-12-24 06:17:08.000000000 +0000
3 +++ sylpheed-1.0.0-gtk2-20041224/config.h.in    2005-01-02 18:22:27.000000000 +0000
4 @@ -260,6 +260,9 @@
5  /* Define to 1 if your <sys/time.h> declares `struct tm'. */
6  #undef TM_IN_SYS_TIME
7  
8 +/* Define if you use GnuTLS to support SSL. */
9 +#undef USE_GNUTLS
10 +
11  /* Define if you use GPGME to support OpenPGP. */
12  #undef USE_GPGME
13  
14 @@ -270,6 +273,9 @@
15  #undef USE_LDAP
16  
17  /* Define if you use OpenSSL to support SSL. */
18 +#undef USE_OPENSSL
19 +
20 +/* Define if SSL is supported. */
21  #undef USE_SSL
22  
23  /* Whether to use multithread or not */
24 diff -upr --exclude='*.o' --exclude='*~' --exclude=configure clean/sylpheed-1.0.0-gtk2-20041224/configure.in sylpheed-1.0.0-gtk2-20041224/configure.in
25 --- clean/sylpheed-1.0.0-gtk2-20041224/configure.in     2004-12-24 05:39:37.000000000 +0000
26 +++ sylpheed-1.0.0-gtk2-20041224/configure.in   2005-01-02 18:23:11.000000000 +0000
27 @@ -265,7 +265,8 @@ if test $ac_cv_enable_ssl = yes; then
28  #include <openssl/opensslv.h>
29  ],     [ return OPENSSL_VERSION_NUMBER; ],
30         [ AC_MSG_RESULT(yes)
31 -         AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
32 +         AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
33 +         AC_DEFINE(USE_OPENSSL, 1, Define if you use OpenSSL to support SSL.) ],
34         [ AC_MSG_RESULT(no)
35           LIBS="$ac_save_LIBS"
36           ac_cv_enable_ssl=no ])
37 @@ -273,6 +274,27 @@ else
38         AC_MSG_RESULT(no)
39  fi
40  
41 +AC_ARG_ENABLE(gnutls,
42 +       [  --enable-gnutls         Enable SSL support using GnuTLS [default=no]],
43 +       [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=no])
44 +AC_MSG_CHECKING([whether to use GnuTLS])
45 +if test $ac_cv_enable_gnutls = yes; then
46 +       AC_MSG_RESULT(yes)
47 +       AC_MSG_CHECKING([if GnuTLS is available])
48 +       LIBS="$LIBS -lgnutls-openssl"
49 +       AC_TRY_LINK([
50 +#include <gnutls/openssl.h>
51 +],     [ return OPENSSL_VERSION_NUMBER; ],
52 +       [ AC_MSG_RESULT(yes)
53 +         AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
54 +         AC_DEFINE(USE_GNUTLS, 1, Define if you use GnuTLS to support SSL.) ],
55 +       [ AC_MSG_RESULT(no)
56 +         LIBS="$ac_save_LIBS"
57 +         ac_cv_enable_gnutls=no ])
58 +else
59 +       AC_MSG_RESULT(no)
60 +fi
61 +
62  dnl Check for X-Face support
63  AC_ARG_ENABLE(compface,
64         [  --disable-compface      Do not use compface (X-Face)],
65 @@ -415,6 +437,7 @@ echo "GnuPG         : $ac_cv_enable_gpgm
66  echo "JPilot        : $ac_cv_enable_jpilot"
67  echo "LDAP          : $ac_cv_enable_ldap"
68  echo "OpenSSL       : $ac_cv_enable_ssl"
69 +echo "GnuTLS        : $ac_cv_enable_gnutls"
70  echo "iconv         : $am_cv_func_iconv"
71  echo "compface      : $ac_cv_enable_compface"
72  echo "IPv6          : $ac_cv_enable_ipv6"
73 diff -upr --exclude='*.o' --exclude='*~' --exclude=configure clean/sylpheed-1.0.0-gtk2-20041224/src/ssl.h sylpheed-1.0.0-gtk2-20041224/src/ssl.h
74 --- clean/sylpheed-1.0.0-gtk2-20041224/src/ssl.h        2003-09-06 10:26:34.000000000 +0100
75 +++ sylpheed-1.0.0-gtk2-20041224/src/ssl.h      2005-01-02 18:25:00.000000000 +0000
76 @@ -27,11 +27,20 @@
77  #if USE_SSL
78  
79  #include <glib.h>
80 +
81 +#if USE_OPENSSL
82  #include <openssl/crypto.h>
83  #include <openssl/x509.h>
84  #include <openssl/pem.h>
85  #include <openssl/ssl.h>
86  #include <openssl/err.h>
87 +#else
88 +#if USE_GNUTLS
89 +#include <gnutls/openssl.h>
90 +#else
91 +#error Must select either GnuTLS or OpenSSL
92 +#endif
93 +#endif
94  
95  #include "socket.h"
96