diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-09-04 12:49:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-09-04 12:49:32 +0000 |
commit | 83995cf89e0515b46d65badd09b641c988a5ea9d (patch) | |
tree | 40933754d17c45b1d6592a8842a647a46b57b834 /configure.ac | |
parent | 3e36950d8d3f6319544b9d627156c70eaaf9bdaf (diff) |
address Debian #758937: allow use of curl if it is really the gnutls version and libgnurl is unavailable
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 24915a14e..687ea1e20 100644 --- a/configure.ac +++ b/configure.ac @@ -461,6 +461,27 @@ else AM_CONDITIONAL(HAVE_LIBGNURL, false) fi +# 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) + AC_MSG_WARN([GNUnet requires libcurl-gnutls >= 7.34]) +else + AM_CONDITIONAL(HAVE_LIBCURL, true) + AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL]) +fi + # libidn AC_MSG_CHECKING([if Libidn can be used]) @@ -1197,7 +1218,7 @@ AC_ARG_ENABLE([malicious], [malicious=0 enable_malicious=no]) AC_MSG_RESULT($enable_malicious) -AM_CONDITIONAL([ENABLE_MALICIOUS], [$malicious]) +AM_CONDITIONAL([ENABLE_MALICIOUS], [1=$malicious]) AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], [enable compilation of malicious code]) @@ -1552,10 +1573,16 @@ fi # libgnurl if test "x$gnurl" = "x0" then - AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.]) - AC_MSG_WARN([libgnurl not found. hostlist daemon will not be compiled, and you probably WANT hostlist daemon]) + 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 + # bluetooth if test "x$bluetooth" = "x0" then |