diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-03-09 13:40:39 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-03-09 13:50:28 +0100 |
commit | ac946390530caea325111c10c2e437ecd5f3cd77 (patch) | |
tree | 9dc3100805abbfcd76032dbd3026746ec4cd95eb /m4 | |
parent | eefcdd8815f9629409f006a76a5710f479eca341 (diff) | |
download | gnutls-ac946390530caea325111c10c2e437ecd5f3cd77.tar.gz |
Added option to enable linking with nettle-mini
Diffstat (limited to 'm4')
-rw-r--r-- | m4/hooks.m4 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/m4/hooks.m4 b/m4/hooks.m4 index ab0a3d05ea..f669d938f2 100644 --- a/m4/hooks.m4 +++ b/m4/hooks.m4 @@ -82,13 +82,23 @@ AC_MSG_ERROR([[ GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed" + AC_ARG_WITH(nettle-mini, + AS_HELP_STRING([--with-nettle-mini], [Link against a mini-nettle (that includes mini-gmp)]), + mini_nettle=$withval, + mini_nettle=no) + AC_ARG_VAR(GMP_CFLAGS, [C compiler flags for gmp]) AC_ARG_VAR(GMP_LIBS, [linker flags for gmp]) - if test x$GMP_LIBS = x; then - AC_CHECK_LIB(gmp, __gmpz_cmp, [GMP_LIBS="-lgmp"], [AC_MSG_ERROR([[ + if test "$mini_nettle" != no;then + GMP_CLFLAGS="" + GMP_LIBS="" + else + if test x$GMP_LIBS = x; then + AC_CHECK_LIB(gmp, __gmpz_cmp, [GMP_LIBS="-lgmp"], [AC_MSG_ERROR([[ *** *** gmp was not found. ]])]) + fi fi AC_SUBST(GMP_CFLAGS) AC_SUBST(GMP_LIBS) |