summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/gnutls.pc.in2
-rw-r--r--lib/nettle/Makefile.am5
-rw-r--r--m4/hooks.m411
4 files changed, 17 insertions, 3 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f1e672c47d..3beb7c7207 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -140,7 +140,7 @@ thirdparty_libadd += $(LIBTASN1_LIBS)
endif
if ENABLE_NETTLE
-thirdparty_libadd += $(NETTLE_LIBS) $(HOGWEED_LIBS)
+thirdparty_libadd += $(NETTLE_LIBS) $(HOGWEED_LIBS) $(GMP_LIBS)
libgnutls_la_LIBADD += nettle/libcrypto.la
endif
diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
index 13f2d3ba1e..a25fcdf637 100644
--- a/lib/gnutls.pc.in
+++ b/lib/gnutls.pc.in
@@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system
URL: http://www.gnutls.org/
Version: @VERSION@
Libs: -L${libdir} -lgnutls
-Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@
+Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@
@GNUTLS_REQUIRES_PRIVATE@
Cflags: -I${includedir}
diff --git a/lib/nettle/Makefile.am b/lib/nettle/Makefile.am
index e2b704e9ce..0987c8e186 100644
--- a/lib/nettle/Makefile.am
+++ b/lib/nettle/Makefile.am
@@ -25,7 +25,10 @@ AM_CPPFLAGS = \
-I$(srcdir)/../includes \
-I$(builddir)/../includes \
-I$(builddir)/../../gl \
- -I$(srcdir)/..
+ -I$(srcdir)/.. \
+ $(NETTLE_CFLAGS) \
+ $(HOGWEED_CFLAGS) \
+ $(GMP_CFLAGS)
if ENABLE_MINITASN1
AM_CPPFLAGS += -I$(srcdir)/../minitasn1
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index 3439edb2a8..cd9ef5ce97 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -82,6 +82,17 @@ AC_MSG_ERROR([[
GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed"
+ 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([[
+***
+*** gmp was not found.
+]])])
+ fi
+ AC_SUBST(GMP_CFLAGS)
+ AC_SUBST(GMP_LIBS)
+
AC_ARG_WITH(included-libtasn1,
AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]),
included_libtasn1=$withval,