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 --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 57ea99df..d8f949a2 100644 --- a/configure.ac +++ b/configure.ac @@ -73,8 +73,13 @@ AM_CONDITIONAL([BUILD_PDF], [test "$DBLATEX" == "found"]) PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3]) PKG_CHECK_MODULES([LIBNFTNL], [libnftnl >= 1.0.2]) -AC_CHECK_LIB([gmp], [__gmpz_init], , - AC_MSG_ERROR([No suitable version of libgmp found])) +AC_ARG_WITH([mini-gmp], [AS_HELP_STRING([--with-mini-gmp], + [Use builtin mini-gmp (for embedded builds)])], [], + [with_mini_gmp=no]) +AS_IF([test "x$with_mini_gmp" != xyes], [ +AC_CHECK_LIB([gmp],[__gmpz_init], , AC_MSG_ERROR([No suitable version of libgmp found])) +]) +AM_CONDITIONAL([BUILD_MINIGMP], [test "x$with_mini_gmp" == xyes]) AC_ARG_WITH([cli], [AS_HELP_STRING([--without-cli], [disable interactive CLI (libreadline support)])], @@ -130,4 +135,5 @@ AC_OUTPUT echo " nft configuration: cli support: ${with_cli} - enable debugging: ${with_debug}" + enable debugging: ${with_debug} + use mini-gmp: ${with_mini_gmp}" -- cgit v1.2.3