From 4a0cdf9a6affc7a1ced24788363fb606f4fcb151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Sat, 1 Dec 2012 20:13:58 +0100 Subject: [PATCH] Link libserver to GnuTLS --- README | 3 ++- configure.ac | 8 ++++++++ test/simline/Makefile.am | 4 ++-- test/simline/server.c | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README b/README index 777c5c9..b1ae907 100644 --- a/README +++ b/README @@ -19,7 +19,8 @@ This code is written in ISO99 C language and requires libxml2, (optional but strongly recommended) cURL, libgcrypt, GPGME, and >=expat-2.0.0 libraries at compilation time. gnupg2 is required at run time (provides gpgsm that uses gpgme to process CMS). Build system preparation from VCS requires ->=automake-1.11, autoconf and libtool in addition. +>=automake-1.11, autoconf and libtool in addition. Tests require GnuTLS +library. Applications linked against this library need to be linked to libxml2 too. diff --git a/configure.ac b/configure.ac index 53f8587..7adbca8 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,14 @@ AM_CONDITIONAL([BUILD_ONLINE_TEST], [test -n "$LIBCURL" -a "$enable_test" = "yes" \ -a "$enable_online_test" = "yes"]) +dnl Simulated tests require gnutls +PKG_PROG_PKG_CONFIG() +AS_IF([test "$enable_test" = "yes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls]) + AC_SUBST(LIBGNUTLS_CFLAGS) + AC_SUBST(LIBGNUTLS_LIBS) + ]) + #TODO: Determine minimal version AM_PATH_LIBGCRYPT([1:1.4.0]) diff --git a/test/simline/Makefile.am b/test/simline/Makefile.am index 6143676..c5fb635 100644 --- a/test/simline/Makefile.am +++ b/test/simline/Makefile.am @@ -27,8 +27,8 @@ noinst_LTLIBRARIES = libserver.la libserver_la_SOURCES = ../test.c ../test-tools.h http.c http.h \ server.c server.h service.c service.h \ services.h server_types.h -libserver_la_CPPFLAGS = @XML_CPPFLAGS@ -libserver_la_LIBADD = @XML_LIBS@ +libserver_la_CPPFLAGS = @XML_CPPFLAGS@ @LIBGNUTLS_CFLAGS@ +libserver_la_LIBADD = @XML_LIBS@ @LIBGNUTLS_LIBS@ # Standalone server noinst_PROGRAMS = server_cli $(TESTS) diff --git a/test/simline/server.c b/test/simline/server.c index 2992d2b..cd8f205 100644 --- a/test/simline/server.c +++ b/test/simline/server.c @@ -20,6 +20,7 @@ #include #include #include +#include const char *server_error = NULL; -- 2.11.4.GIT