From b3529cf43bba5c3c4cddefa7f5d0143d510fd3ec Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 8 Jan 2015 07:54:34 +0100 Subject: build: add --with-mini-gmp switch to disable linking libgmp This allows to disable linking the >400 KB big libgmp and replace it with the builtin mini-gmp which only increases size by ~30KB. Enabling this selectively decreases debugging verbosity (pr_debug). Signed-off-by: Steven Barth Signed-off-by: Pablo Neira Ayuso --- include/gmputil.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/gmputil.h') diff --git a/include/gmputil.h b/include/gmputil.h index 63eb0ba9..1bf696a5 100644 --- a/include/gmputil.h +++ b/include/gmputil.h @@ -1,7 +1,17 @@ #ifndef NFTABLES_GMPUTIL_H #define NFTABLES_GMPUTIL_H +#include + +#ifdef HAVE_LIBGMP #include +#else +#include +/* mini-gmp doesn't come with gmp_printf, so we use our own minimal variant */ +extern int mpz_printf(const char *format, const mpz_t value); +#define gmp_printf mpz_printf +#endif + #include enum mpz_word_order { -- cgit v1.2.3