summaryrefslogtreecommitdiff
path: root/packages/libetpan/libetpan-0.36/etpan_configure.patch
blob: 35723390101f51151306bc1d611fcb24f9f6d2b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- libetpan/configure.in~etpan_configure	2005-03-10 10:11:29.000000000 +0100
+++ libetpan/configure.in	2005-03-11 13:57:00.232491234 +0100
@@ -76,6 +76,38 @@
 esac
 fi
 
+dnl GNUTLS
+AC_ARG_WITH(gnutls,    [ --with-gnutls[=DIR]      include GnuTLS support (default=no)],
+ [], [with_gnutls=no])
+if test "x$with_gnutls" != "xno"; then
+  OCPPFLAGS="$CPPFLAGS"
+  OLDFLAGS="$LDFLAGS"
+  if test "x$with_gnutls" != "xyes" ; then
+    CPPFLAGS="CRPPFLAGS -I$with_gnutls/include"
+    LDFLAGS="$LDFLAGS -L$with_gnutls/lib"
+  fi
+  GNUTLSLIBS=""
+  AC_CHECK_HEADER(gnutls/gnutls.h, [
+  AC_CHECK_LIB(gnutls, gnutls_global_deinit, with_gnutls=yes,[GNUTLSLIBS="-lgnutls -lgnutls-openssl"])
+  ])
+  if test "x$with_gnutls" != "xyes"; then
+   CPPFLAGS="$OCPPFLAGS"
+   LDFLAGS="$OLDFLAGS"
+  else
+   with_openssl="no"
+  fi
+fi
+
+if test "x$with_gnutls" = "xyes"; then
+  AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
+  AC_DEFINE([USE_SSL], 1, [Define to use OpenSSL])
+  GNUTLSLIBS="-lgnutls -lgnutls-openssl"
+else
+  AC_MSG_WARN([GnuTLS support disabled.])
+  GNUTLSLIBS=""
+fi
+AC_SUBST(GNUTLSLIBS)
+
 dnl OpenSSL -- very primitive right now
 AC_ARG_WITH(openssl,   [  --with-openssl[=DIR]    include OpenSSL support (default=auto)],
             [], [with_openssl=yes])
@@ -336,7 +368,7 @@
   REENTRANT=1
 else
   REENTRANT=0
-  LIBSUFFIX=-no-mt
+  LIBSUFFIX=
 fi
 AC_SUBST(LIBSUFFIX)
 AC_SUBST(REENTRANT)