diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-12-12 13:46:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-12-12 13:46:11 +0100 |
commit | f4b5ccdd0183a1b6f4d3c34b6390804eb05c2478 (patch) | |
tree | beb372def38ed6d1d6547b47ab24dd8040cac473 /configure.ac | |
parent | 39f27765a28dd4c04842085fc1928d5e0d5a33be (diff) |
add missing configure checks for libgnurl and coverage:
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 57 |
1 files changed, 50 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index fd7c9981..67d5450c 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,8 @@ AS_IF([test $jansson = 0], *** ]])]) # check for libgnurl -LIBGNURL_CHECK_CONFIG([], [7.34.0], [gnurl=1], [gnurl=0]) +# libgnurl +LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0) if test "$gnurl" = 1 then AM_CONDITIONAL(HAVE_LIBGNURL, true) @@ -134,11 +135,52 @@ then else AM_CONDITIONAL(HAVE_LIBGNURL, false) fi -AS_IF([test $gnurl = 0], - [AC_MSG_ERROR([[ -*** -*** You need libgnurl to build this program. -*** ]])]) + +# libcurl-gnutls +LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false]) +if test "x$curl" = xtrue +then + AC_CHECK_HEADERS([curl/curl.h], + AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]), + [curl=false]) + # need libcurl-gnutls.so, everything else is not acceptable + AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false]) + # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 + +fi +if test x$curl = xfalse +then + AM_CONDITIONAL(HAVE_LIBCURL, false) +if test "$gnurl" = 0 +then + AC_MSG_WARN([GNUnet requires libcurl-gnutls >= 7.34]) +fi +else + AM_CONDITIONAL(HAVE_LIBCURL, true) + AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL]) +fi + +# libgnurl +if test "x$gnurl" = "x0" +then + if test "x$curl" = "x0" + then + AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.]) + AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon]) + else + AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.]) + fi +fi + +# gcov compilation +AC_MSG_CHECKING(whether to compile with support for code coverage analysis) +AC_ARG_ENABLE([coverage], + AS_HELP_STRING([--enable-coverage], + [compile the library with code coverage support]), + [use_gcov=${enableval}], + [use_gcov=no]) +AC_MSG_RESULT($use_gcov) +AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) # Require minimum libgcrypt version need_libgcrypt_version=1.6.1 @@ -173,5 +215,6 @@ AC_CONFIG_FILES([Makefile src/Makefile src/include/Makefile src/backenddb/Makefile -src/backend/Makefile]) +src/backend/Makefile +src/lib/Makefile]) AC_OUTPUT |