nettle: downgrade to 2.7.1 since gnutls is incompatible with 3.0
[openwrt/staging/chunkeey.git] / package / libs / nettle / patches / 0004-Added-auto-generated-nettle-config.h.patch
1 From 7508bb15de94b38402152757f75ff3e2094fdd86 Mon Sep 17 00:00:00 2001
2 From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3 Date: Sun, 9 Mar 2014 13:27:03 +0100
4 Subject: [PATCH 4/5] Added-auto-generated-nettle-config.h
5
6 ---
7 Makefile.in | 4 ++--
8 bignum.h | 1 +
9 configure.ac | 1 +
10 examples/ecc-benchmark.c | 1 +
11 nettle-config.h.in | 6 ++++++
12 testsuite/testutils.h | 1 +
13 7 files changed, 13 insertions(+), 2 deletions(-)
14 create mode 100644 nettle-config.h.in
15
16 diff --git a/Makefile.in b/Makefile.in
17 index 42be3a9..280dd30 100644
18 --- a/Makefile.in
19 +++ b/Makefile.in
20 @@ -151,7 +151,7 @@ HEADERS = aes.h arcfour.h arctwo.h asn1.h bignum.h blowfish.h \
21 des.h des-compat.h dsa.h ecc-curve.h ecc.h ecdsa.h \
22 gcm.h gosthash94.h hmac.h \
23 knuth-lfib.h \
24 - macros.h \
25 + macros.h nettle-config.h \
26 md2.h md4.h \
27 md5.h md5-compat.h \
28 memxor.h \
29 @@ -174,7 +174,7 @@ DISTFILES = $(SOURCES) $(HEADERS) getopt.h .bootstrap run-tests \
30 config.guess config.sub install-sh texinfo.tex \
31 config.h.in config.m4.in config.make.in Makefile.in \
32 README AUTHORS COPYING.LIB INSTALL NEWS TODO ChangeLog \
33 - nettle.pc.in hogweed.pc.in \
34 + nettle.pc.in hogweed.pc.in nettle-config.h.in \
35 memxor.c $(des_headers) descore.README \
36 aes-internal.h camellia-internal.h serpent-internal.h \
37 cast128_sboxes.h desinfo.h desCode.h \
38 diff --git a/bignum.h b/bignum.h
39 index 1f2ff07..c31ccaa 100644
40 --- a/bignum.h
41 +++ b/bignum.h
42 @@ -26,6 +26,7 @@
43 #ifndef NETTLE_BIGNUM_H_INCLUDED
44 #define NETTLE_BIGNUM_H_INCLUDED
45
46 +#include "nettle-config.h"
47 #include "nettle-meta.h"
48
49 #ifdef USE_MINI_GMP
50 diff --git a/configure.ac b/configure.ac
51 index c24f954..cb65bcd 100644
52 --- a/configure.ac
53 +++ b/configure.ac
54 @@ -10,6 +10,7 @@ AC_CONFIG_AUX_DIR([.])
55 AC_CONFIG_MACRO_DIR([.])
56
57 AC_CONFIG_HEADER([config.h])
58 +AC_CONFIG_HEADER([nettle-config.h])
59
60 LIBNETTLE_MAJOR=4
61 LIBNETTLE_MINOR=7
62 diff --git a/examples/ecc-benchmark.c b/examples/ecc-benchmark.c
63 index 16a1fd6..eaaf3a5 100644
64 --- a/examples/ecc-benchmark.c
65 +++ b/examples/ecc-benchmark.c
66 @@ -38,6 +38,7 @@
67 #include "timing.h"
68
69 #undef USE_MINI_GMP
70 +#define NETTLE_CONFIG_H_INCLUDED
71 #include <gmp.h>
72 #include "../ecc.h"
73 #include "../ecc-internal.h"
74 diff --git a/nettle-config.h.in b/nettle-config.h.in
75 new file mode 100644
76 index 0000000..11330ff
77 --- /dev/null
78 +++ b/nettle-config.h.in
79 @@ -0,0 +1,6 @@
80 +#ifndef NETTLE_CONFIG_H_INCLUDED
81 +#define NETTLE_CONFIG_H_INCLUDED
82 +
83 +#undef USE_MINI_GMP
84 +
85 +#endif
86 diff --git a/testsuite/testutils.h b/testsuite/testutils.h
87 index a677a2a..6e9b30c 100644
88 --- a/testsuite/testutils.h
89 +++ b/testsuite/testutils.h
90 @@ -15,6 +15,7 @@
91
92 #if WITH_HOGWEED
93 # include <gmp.h>
94 +# define NETTLE_CONFIG_H_INCLUDED
95 # undef USE_MINI_GMP
96 # include "rsa.h"
97 # include "dsa.h"
98 --
99 1.9.2
100