summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2015-01-08 07:54:34 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-01-08 12:23:13 +0100
commitb3529cf43bba5c3c4cddefa7f5d0143d510fd3ec (patch)
tree20bb09a946f083601714a3fa38aab99c1f5fdbb7 /configure.ac
parentc434c709e0a8e0ca2aa92ad139b61025173ae033 (diff)
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 <cyrus@openwrt.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
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}"