- fix false assert trigger when message #0 is lost
[oweals/gnunet.git] / configure.ac
index 24915a14eb4646b32965599458294fa30f39a826..687ea1e206dddf70aab53718d4dda4b2e0562b77 100644 (file)
@@ -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