]>
Commit | Line | Data |
---|---|---|
b66edc18 MT |
1 | From 063efb330a3f341c2548e2cf1f67f83e49cd6395 Mon Sep 17 00:00:00 2001 |
2 | From: Simon Kelley <simon@thekelleys.org.uk> | |
3 | Date: Tue, 17 Jun 2014 19:49:31 +0100 | |
4 | Subject: [PATCH] Build config: add -DNO_GMP for use with nettle/mini-gmp | |
5 | ||
6 | --- | |
7 | Makefile | 2 +- | |
8 | bld/pkg-wrapper | 9 +++++++-- | |
9 | src/config.h | 7 +++++++ | |
10 | src/dnssec.c | 3 ++- | |
11 | 4 files changed, 17 insertions(+), 4 deletions(-) | |
12 | ||
13 | diff --git a/Makefile b/Makefile | |
14 | index c58b50b..17eeb27 100644 | |
15 | --- a/Makefile | |
16 | +++ b/Makefile | |
17 | @@ -61,7 +61,7 @@ lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CON | |
18 | lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1` | |
19 | nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed` | |
20 | nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed` | |
21 | -gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp` | |
22 | +gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp` | |
23 | sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi` | |
24 | version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"' | |
25 | ||
26 | diff --git a/bld/pkg-wrapper b/bld/pkg-wrapper | |
27 | index 9f9332d..0ddb678 100755 | |
28 | --- a/bld/pkg-wrapper | |
29 | +++ b/bld/pkg-wrapper | |
30 | @@ -11,9 +11,14 @@ in=`cat` | |
31 | ||
32 | if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \ | |
33 | echo $in | grep $search >/dev/null 2>&1; then | |
34 | - | |
35 | +# Nasty, nasty, in --copy, arg 2 is another config to search for, use with NO_GMP | |
36 | if [ $op = "--copy" ]; then | |
37 | - pkg="$*" | |
38 | + if grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \ | |
39 | + echo $in | grep $pkg >/dev/null 2>&1; then | |
40 | + pkg="" | |
41 | + else | |
42 | + pkg="$*" | |
43 | + fi | |
44 | elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \ | |
45 | echo $in | grep ${search}_STATIC >/dev/null 2>&1; then | |
46 | pkg=`$pkg --static $op $*` | |
47 | diff --git a/src/config.h b/src/config.h | |
48 | index 2155544..ee6d218 100644 | |
49 | --- a/src/config.h | |
50 | +++ b/src/config.h | |
51 | @@ -105,6 +105,8 @@ HAVE_AUTH | |
52 | define this to include the facility to act as an authoritative DNS | |
53 | server for one or more zones. | |
54 | ||
55 | +HAVE_DNSSEC | |
56 | + include DNSSEC validator. | |
57 | ||
58 | NO_IPV6 | |
59 | NO_TFTP | |
60 | @@ -118,6 +120,11 @@ NO_AUTH | |
61 | which are enabled by default in the distributed source tree. Building dnsmasq | |
62 | with something like "make COPTS=-DNO_SCRIPT" will do the trick. | |
63 | ||
64 | +NO_NETTLE_ECC | |
65 | + Don't include the ECDSA cypher in DNSSEC validation. Needed for older Nettle versions. | |
66 | +NO_GMP | |
67 | + Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp. | |
68 | + | |
69 | LEASEFILE | |
70 | CONFFILE | |
71 | RESOLVFILE | |
72 | diff --git a/src/dnssec.c b/src/dnssec.c | |
73 | index 44d626b..2ffb75d 100644 | |
74 | --- a/src/dnssec.c | |
75 | +++ b/src/dnssec.c | |
76 | @@ -26,7 +26,8 @@ | |
77 | # include <nettle/ecc-curve.h> | |
78 | #endif | |
79 | #include <nettle/nettle-meta.h> | |
80 | -#include <gmp.h> | |
81 | +#include <nettle/bignum.h> | |
82 | + | |
83 | ||
84 | #define SERIAL_UNDEF -100 | |
85 | #define SERIAL_EQ 0 | |
86 | -- | |
87 | 1.7.10.4 | |
88 |