]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Build config: add -DNO_GMP for use with nettle/mini-gmp
authorSimon Kelley <simon@thekelleys.org.uk>
Tue, 17 Jun 2014 18:49:31 +0000 (19:49 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 17 Jun 2014 18:49:31 +0000 (19:49 +0100)
Makefile
bld/pkg-wrapper
src/config.h
src/dnssec.c

index c58b50ba98b4b660128163d81c1d7d974e60c241..17eeb27b1b32b10609c4207337d3f6bb32937408 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,7 @@ lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CON
 lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1` 
 nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
 nettle_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
-gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp`
+gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
 sunos_libs =    `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
 version =     -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
 
index 9f9332d7d9a73531ac2c2133cf3903f44bc6ae96..0ddb678c6a2c48be7be0b42f55a4dd4fb493f834 100755 (executable)
@@ -11,9 +11,14 @@ in=`cat`
 
 if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
     echo $in | grep $search >/dev/null 2>&1; then
-
+# Nasty, nasty, in --copy, arg 2 is another config to search for, use with NO_GMP
     if [ $op = "--copy" ]; then
-       pkg="$*"
+       if grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \
+            echo $in | grep $pkg >/dev/null 2>&1; then
+           pkg=""
+       else 
+           pkg="$*"
+       fi
     elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
              echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
        pkg=`$pkg  --static $op $*`
index 21555440f851d8fc22da26e75dca6e253939d2e5..ee6d2187d92a729922c95ac45c4eff02d09866f9 100644 (file)
@@ -105,6 +105,8 @@ HAVE_AUTH
    define this to include the facility to act as an authoritative DNS
    server for one or more zones.
 
+HAVE_DNSSEC
+   include DNSSEC validator.
 
 NO_IPV6
 NO_TFTP
@@ -118,6 +120,11 @@ NO_AUTH
    which are enabled  by default in the distributed source tree. Building dnsmasq
    with something like "make COPTS=-DNO_SCRIPT" will do the trick.
 
+NO_NETTLE_ECC
+   Don't include the ECDSA cypher in DNSSEC validation. Needed for older Nettle versions.
+NO_GMP
+   Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp.
+
 LEASEFILE
 CONFFILE
 RESOLVFILE
index 44d626bc2f840b4eb075c2ca327bf922a13010ae..2ffb75df3cf133c9d70cb1da00eef627cc534229 100644 (file)
@@ -26,7 +26,8 @@
 #  include <nettle/ecc-curve.h>
 #endif
 #include <nettle/nettle-meta.h>
-#include <gmp.h>
+#include <nettle/bignum.h>
+
 
 #define SERIAL_UNDEF  -100
 #define SERIAL_EQ        0