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])
[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])
# 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